Search completed in 1.25 seconds.
296 results for "region":
Your results are loading. Please wait...
ARIA live regions - Accessibility
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. ...
... 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. Note: Assistive technologies will announce dynamic changes in the content of a live region. Including an aria-live attribute or a specialized live region role (such as role="alert") on the element you want to announce changes to works as long as you add the attribute before the changes occur -- either in the original markup, or dynamically using JavaScript. Simple live regions Dynamic content which updates without a page reload is generally either a region or a widget. Simple conte...
...on role (such as role="alert") on the element you want to announce changes to works as long as you add the attribute before the changes occur -- either in the original markup, or dynamically using JavaScript. Simple live regions Dynamic content which updates without a page reload is generally either a region or a widget. Simple content changes which are not interactive should be marked as live regions. Below is a list of each related ARIA live region property with a description. aria-live: The aria-live=POLITENESS_SETTING is used to set the priority with which screen reader should treat updates to live regions - the possible settings are: off, polite or assertive. The default setting is off. This attribute is by far the most important. aria-controls: The aria-controls=[IDLIST] is used ...
...And 15 more matches
WAI ARIA Live Regions/API Support - Developer guides
As always, we're open to questions and suggestions for changes in community forums. ...
...As always, we're open to questions and suggestions for changes in community forums. ...
...As always, we're open to questions and suggestions for changes in community forums. ...
...And 9 more matches
CanvasRenderingContext2D.addHitRegion() - Web APIs
When provided, it is an Object which can contain the following properties: path A Path2D object describing the area of the hit region. If not provided, the current path is used. fillRule The algorithm by which to determine if a point is inside or outside the hit region. Possible values: nonzero: The non-zero winding rule. Default rule. evenodd: The even-odd winding rule. ...
... 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. Syntax void ctx.addHitRegion(options); Options The options argument is optional. When provided, it is an Object which can contain the following properties: path A Path2D object describing the area of the hit region. If not provided, the current path is used. fillRule The algorithm by which to determine if a point is inside or outside the hit region. Possible values: nonzero: The non-zero winding rule. Default rule. evenodd: The even-odd winding rule. id The ID for this hit region to reference it for later use in events, for example. ...
... control An element (descendant of the canvas) to which events are to be routed. Defaults to null. ...
...And 8 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. It is used to provide a generic landmark for people to be able to navigate to easily when none of the other landmark roles are appropriate. <div role="region" aria-label="Example"> <!-- region content --> </div> Description The region role is an ARIA landmark role. Landmark roles provide a way to identify the organization and structure of a web page. By classifying and labeling sections of a page, structural information conveyed visually through layout is represented programmatically. Screen readers use landmark roles to provide keyboard navigation to important sections of a page. ...
...tent --> </div> Description The region role is an ARIA landmark role. Landmark roles provide a way to identify the organization and structure of a web page. By classifying and labeling sections of a page, structural information conveyed visually through layout is represented programmatically. Screen readers use landmark roles to provide keyboard navigation to important sections of a page. The region role should be reserved for sections of content sufficiently important that users will likely want to navigate to the section easily and to have it listed in a summary of the page. ...
...ctions of a page, structural information conveyed visually through layout is represented programmatically. Screen readers use landmark roles to provide keyboard navigation to important sections of a page. The region role should be reserved for sections of content sufficiently important that users will likely want to navigate to the section easily and to have it listed in a summary of the page. ...
...And 8 more matches
Accessibility/LiveRegionDevGuide
This page is currently under construction. This developer's guide lays out general guidelines that assistive technology (AT) developers can use in developing live region support. This guide was written from an ATK/AT-SPI point of view as part of the Orca Live Region Support project. However, many of the concepts were also used during the development of FireVox, an AT using IAccessible2. Sometimes the very best guide for some developers is the code itself. Please refer to the liveregions and Gecko Python modules in Orca for a real world example. For more information about Live Regions, please read the ARIA properties spec or the live region report to learn about ARIA Live Region markup and the Live Region API Support document for the latest Firefox API with regards to Live Regions. As al...
...in Orca for a real world example. For more information about Live Regions, please read the ARIA properties spec or the live region report to learn about ARIA Live Region markup and the Live Region API Support document for the latest Firefox API with regards to Live Regions. As always, we're open to questions and suggestions for changes in community forums. Priority Queue The heart of any live region support module is the priority queue. It is responsible for queuing messages derived from live region events, where priority is determined by chronological order and the live politeness properties. In addition to the standard priority queue methods, additional methods will need to be implemented that purge the queue based on one of the priority criterion. The "purge by timestamp" method will be ...
...ueue based on one of the priority criterion. The "purge by timestamp" method will be used to remove old messages that are no longer deemed relevant while "purge by politeness" is used to satisfy the ARIA live politeness specification. The later method will be explained in detail below. Event Types The table for web page mutation event types lists the two major event types associated with live regions, namely text-changed and object changed events. Both will be discussed in detail below. Object Changed The object changed events are slightly different in AT-SPI and IAccessible2. In AT-SPI, the object changed event are called object:children-changed events because the event is triggered on the parent of the object. The actual object that change can then be found in the event.any_data field. ...
...And 7 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. For example, English is spoken in the United Kingdom and the United States of America, but there are differences in spelling and other language conventions between those two countries. Knowing the locale's region helps JavaScript programmers make sure that the content from their sites and applications is correctly displayed when viewed from different areas of the world. ...
...es. For example, English is spoken in the United Kingdom and the United States of America, but there are differences in spelling and other language conventions between those two countries. Knowing the locale's region helps JavaScript programmers make sure that the content from their sites and applications is correctly displayed when viewed from different areas of the world. ...
...gdom and the United States of America, but there are differences in spelling and other language conventions between those two countries. Knowing the locale's region helps JavaScript programmers make sure that the content from their sites and applications is correctly displayed when viewed from different areas of the world. Examples Setting the region in the locale identifer string argument The region is the third part of a valid Unicode language identifier string, and can be set by adding it to the locale identifier string that is passed into the Locale constructor. ...
...And 6 more matches
MouseEvent.region - Web APIs
Web › API › MouseEvent › region
The MouseEvent.region read-only property returns the id of the canvas hit region affected by the event. If no hit region is affected, null is returned. Syntax var hitRegion = instanceOfMouseEvent.region Return value A DOMString representing the id of the hit region. Example Example of using the event.region combined with CanvasRenderingContext2D.addHitRegion() method. ...
...fMouseEvent.region Return value A DOMString representing the id of the hit region. Example Example of using the event.region combined with CanvasRenderingContext2D.addHitRegion() method. ...
...mple Example of using the event.region combined with CanvasRenderingContext2D.addHitRegion() method. ...
...And 2 more matches
NPN_InvalidateRegion - Archive of obsolete content
Syntax #include <npapi.h> void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); Parameters The function has the following parameters: instance Pointer to the current plug-in instance. invalidRegion The area to invalidate, specified in a coordinate system that originates at the top left of the plug-in. 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(). ...
...If a plug-in calls this method, it receives a paint message later. The browser redraws invalid areas of the document and windowless plug-ins at regularly timed intervals. ...
...If a plug-in calls this method, it receives a paint message later. The browser redraws invalid areas of the document and windowless plug-ins at regularly timed intervals. ...
...e 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. The browser redraws invalid areas of the document and windowless plug-ins at regularly timed intervals. To force a paint message, the plug-in can call NPN_ForceRedraw() after calling this method. See also NPN_ForceRedraw() NPN_InvalidateRect() NPRegion NPP ...
msRegionOverflow - Web APIs
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The msRegionOverflow read-only property determines if content fully fits into the region or not. This proprietary property is specific to Internet Explorer. Syntax string = object.msRegionOverflow Values Type:DOMString overflow: The region element's content overflows the region's content box. Note that the region's overflow property value can be used to control the visibility of the overflowing content. This means that the region is the last one in the region chain and not able to fit the rem...
...orer. Syntax string = object.msRegionOverflow Values Type:DOMString overflow: The region element's content overflows the region's content box. Note that the region's overflow property value can be used to control the visibility of the overflowing content. This means that the region is the last one in the region chain and not able to fit the remaining content from the named flow. fit: The region element's content fits into the region's content box. It does not overflow. If the region is the last one in the region chain, it means that the content fits without overflowing. If the region is not the last one in the region chain, that means the named flow content is further fitted in subsequent regions. ...
...ent from the named flow. fit: The region element's content fits into the region's content box. It does not overflow. If the region is the last one in the region chain, it means that the content fits without overflowing. If the region is not the last one in the region chain, that means the named flow content is further fitted in subsequent regions. 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). empty: The region element has no content and is empty. All content from the named flow was fitted in regions with a lower content-order value. undefined: The element is not a region. ...
...fitted in subsequent regions. 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). empty: The region element has no content and is empty. All content from the named flow was fitted in regions with a lower content-order value. undefined: The element is not a region. When the region is an actual element, msRegionOverflow provides the ability to find out if content fully fits into the region or not. However, it is only available to regions that are document elements and not to regions that are pseudo-elements. See also Microsoft API extensions ...
::cue-region - CSS: Cascading Style Sheets
The ::cue-region CSS pseudo-element matches WebVTT cues within a selected element. This can be used to style captions and other cues in media with VTT tracks. ::cue-region { color: yellow; font-weight: bold; } The properties are applied to the entire set of cues as if they were a single unit. The only exception is that background and its shorthand properties apply to each cue individually, to avoid creating boxes and obscuring unexpectedly large areas of the media. ...
... be used to style captions and other cues in media with VTT tracks. ::cue-region { color: yellow; font-weight: bold; } The properties are applied to the entire set of cues as if they were a single unit. The only exception is that background and its shorthand properties apply to each cue individually, to avoid creating boxes and obscuring unexpectedly large areas of the media. ...
...le captions and other cues in media with VTT tracks. ::cue-region { color: yellow; font-weight: bold; } The properties are applied to the entire set of cues as if they were a single unit. The only exception is that background and its shorthand properties apply to each cue individually, to avoid creating boxes and obscuring unexpectedly large areas of the media. ...
... Candidate Recommendation Initial definition. ...
Hit regions and accessibility - Web APIs
rules Accessible Rich Internet Applications (ARIA) defines ways to make Web content and Web applications more accessible to people with disabilities. You can use ARIA attributes to describe the behavior and purpose of the canvas element. See ARIA and ARIA techniques for more information. <canvas id="button" tabindex="0" role="button" aria-pressed="false" aria-label="Start game"></canvas> Hit regions Whether the mouse coordinates are within a particular area on the canvas, is a common problem to solve. The hit region API allows you to define an area of your canvas and provides another possibility to expose interactive content on a canvas to accessibility tools. It allows you to make hit detection easier and lets you route events to DOM elements. The API has the following three methods (whic...
... allows you to define an area of your canvas and provides another possibility to expose interactive content on a canvas to accessibility tools. It allows you to make hit detection easier and lets you route events to DOM elements. The API has the following three methods (which are still experimental in current web browsers; check the browser compatibility tables). CanvasRenderingContext2D.addHitRegion() Adds a hit region to the canvas. CanvasRenderingContext2D.removeHitRegion() Removes the hit region with the specified id from the canvas. CanvasRenderingContext2D.clearHitRegions() Removes all hit regions from the canvas. You can add a hit region to your path and check for the MouseEvent.region property to test if your mouse is hitting your region, for example. <canvas id="canvas"...
...ns() Removes all hit regions from the canvas. You can add a hit region to your path and check for the MouseEvent.region property to test if your mouse is hitting your region, for example. <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) { alert('hit region: ' + event.region); } }); </script> The addHitRegion() method also takes a control option to route events to an element (that is a descendant of the canvas): ctx.addHitRegion({control: element}); This can be useful for routing to <input> elements, for example. See also this co...
VTTRegion - Web APIs
Web › API › VTTRegion
The VTTRegion interface--part of the API for handling WebVTT (text tracks on media presentations)--describes a portion of the video to render a VTTCue onto. Constructor VTTRegion() Returns a newly created VTTRegion object. Properties VTTRegion.id A DOMString that identifies the region. VTTRegion.width A double representing the width of the region, as a percentage of the video. VTTRegion.lines A double representing the height of the region, in number of lines. VTTRegion.regionAnchorX A double representing the region anchor X offset, as a percentage of the region. VTTRegion.regionAnchorY A double representing the region anchor Y offset, as a percentage of the region. VTTRegion.viewportAnchorX A double representing the viewport anchor X offset, as a percentage of the video. V...
...es A double representing the height of the region, in number of lines. VTTRegion.regionAnchorX A double representing the region anchor X offset, as a percentage of the region. VTTRegion.regionAnchorY A double representing the region anchor Y offset, as a percentage of the region. VTTRegion.viewportAnchorX A double representing the viewport anchor X offset, as a percentage of the video. VTTRegion.viewportAnchorY A double representing the viewport anchor Y offset, as a percentage of the video. VTTRegion.scroll An enum representing how adding new cues will move existing cues. Examples var region = new VTTRegion(); region.width = 50; // Use 50% of the video width region.lines = 4; // Use 4 lines of height. region.viewportAnchorX = 25; // Have the region start at 25% from the left. v...
...Y offset, as a percentage of the video. VTTRegion.scroll An enum representing how adding new cues will move existing cues. Examples var region = new VTTRegion(); region.width = 50; // Use 50% of the video width region.lines = 4; // Use 4 lines of height. region.viewportAnchorX = 25; // Have the region start at 25% from the left. var cue = new VTTCue(2, 3, 'Cool text to be displayed'); cue.region = region; // This cue will be drawn only within this region. Specifications Specification Status Comment WebVTT: The Web Video Text Tracks Format Candidate Recommendation ...
-moz-image-region - CSS: Cascading Style Sheets
For certain XUL elements and pseudo-elements that use an image from the list-style-image property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance. /* Keyword value */ -moz-image-region: auto; /* <shape> value */ -moz-image-region: rect(0, 8px, 4px, 4px); /* Global values */ -moz-image-region: inherit; -moz-image-region: initial; -moz-image-region: unset; The syntax is similar to the clip property. All four values are relative to the upper left corner of the image. Note: For a system that works on any background, see -moz-image-rect(). Syntax Values auto Automatically defines the region of the image to use. <shape> A shape defining the part of th...
...mage to use. <shape> A shape defining the part of the image to use. The rect() function defines a rectangle to use as shape. Its parameters define the top, right, bottom, and left offsets of the edges of the image, in this order. Formal definition Initial valueautoApplies toXUL <image> elements and :-moz-tree-image, :-moz-tree-twisty, and :-moz-tree-checkbox pseudo-elements. Note: -moz-image-region only works with <image> elements where the icon is specified using list-style-image. It will not work with XUL <image src="url" />.InheritedyesComputed valueas specifiedAnimation typediscrete Formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) Examples Clipping an image #example-button { /* display only the 4x4 area from the top left of this image */ list-s...
... list-style-image. It will not work with XUL <image src="url" />.InheritedyesComputed valueas specifiedAnimation typediscrete Formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) Examples Clipping an image #example-button { /* display only the 4x4 area from the top left of this image */ list-style-image: url("chrome://example/skin/example.png"); -moz-image-region: rect(0px, 4px, 4px, 0px); } #example-button:hover { /* use the 4x4 area to the right of the first for the hovered button */ -moz-image-region: rect(0px, 8px, 4px, 4px); } Specifications Not part of any standard. ...
JS_EnumerateDiagnosticMemoryRegions
This article covers features introduced in SpiderMonkey 17 Enumerate memory regions that contain diagnostic information.. 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. Description JS_EnumerateDiagnosticMemoryRegions enumerates memory regions that contain diagnostic information intended to be included in crash report minidumps. ...
...e_t length); Name Type Description ptr void * Pointer to the allocated memory. length size_t Length of the allocated memory. ...
AddressErrors.regionCode - Web APIs
An object based on AddressErrors includes a regionCode property when the address's regionCode property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. Syntax var regionCodeError = AddressErrors.regionCode; Value If the value specified in the PaymentAddress object's regionCode property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. If the regionCode value was validated successfully, this property is not included in the AddressErrors object. Usage notes The region code is derived from the ISO 3166-2 country subdivision name standard. Specifications Specification Status Comment Payment ...
...ion of the validation error and offers suggestions for correcting it. If the regionCode value was validated successfully, this property is not included in the AddressErrors object. Usage notes The region code is derived from the ISO 3166-2 country subdivision name standard. Specifications Specification Status Comment Payment Request APIThe definition of 'AddressErrors.regionCode' in that specification. Candidate Recommendation Initial definition. ...
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. For example, this may be a state, province, oblast, or prefecture. Syntax var paymentRegion = PaymentAddress.region; Value A DOMString specifying the top-level administrative subdivision within the country in which the address is located. This region has different names in different countries, such as: state, province, oblast, prefecture, or county. Usage notes In some countries, like Belgium, it's uncommon for people to provide a region as part of their postal address. In such cases, the browser returns an empty string as the value of region. However, the address should still be acceptable to use for its intende...
...ostal address. In such cases, the browser returns an empty string as the value of region. However, the address should still be acceptable to use for its intended purpose (e.g., to ship a product). However, always verify addresses to make sure what the user provides is usable. Specifications Specification Status Comment Payment Request APIThe definition of 'PaymentAddress.region' 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). The code is derived from the ISO 3166-2 standard, which defines codes for identifying the subdivisions (e.g., states, provinces, autonomous regions, etc.) of all countries in the world. 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. ...
...nces, autonomous regions, etc.) of all countries in the world. 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. This should correspond to region, but should be the ISO 3166--2 standard's region code. The string is empty if the region code couldn't be determined, isn't needed for the address's country, or was not provided. ...
msGetRegionContent - Web APIs
Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future. The msGetRegionContent returns an array of Range instances corresponding to the content from the region flow that is positioned in the region. This proprietary method is specific to Internet Explorer browser. Syntax var retVal = Element.msGetRegionContent(); Parameters retVal [out, reval] Type: MSRangeCollection The name of the property to enable. Return value Type: Boolean Returned ranges are sorted by document position and do not overlap. If an element is not a region, this method throw...
...et Explorer browser. Syntax var retVal = Element.msGetRegionContent(); Parameters retVal [out, reval] Type: MSRangeCollection The name of the property to enable. Return value Type: Boolean Returned ranges are sorted by document position and do not overlap. If an element is not a region, this method throws a DOMException with the InvalidAccessError error code. This is only available to regions that are document elements and not to regions that are pseudo-elements. See also Microsoft API extensions ...
NPRegion - Archive of obsolete content
<< Gecko Plugin API Reference << Browser Side Plug-in API Summary Represents a platform-defined region of a page. Syntax Windows: typedef HRGN NPRegion; Mac OS X: typedef RgnHandle NPRegion; Note: This may need to be updated for the Cocoa event model. XWindows: typedef Region NPRegion; Description NPRegion defines the region of the plug-in window to be updated, painted, invalidated, or clipped to. For information about the region type definition used by your platform, see your platform documentation. See also NPN_ForceRedraw() NPN_InvalidateRect() NPN_InvalidateRegion() NPWindow NPRect ...
AddressErrors.region - Web APIs
An object based on AddressErrors includes a region property when the address's region property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. Syntax var regionError = AddressErrors.region; Value If the value specified in the PaymentAddress object's region property could not be validated, this property contains a DOMString offering a human-readable explanation of the validation error and offers suggestions for correcting it. If the region value was validated successfully, this property is not included in the AddressErrors object. Specifications Specification Status Comment Payment Request APIThe definition of 'AddressErrors.region' in that specification. Candidate Recommendation Initial defini...
CanvasRenderingContext2D.clearHitRegions() - Web APIs
The CanvasRenderingContext2D method clearHitRegions() removes all hit regions from the canvas. Syntax void ctx.clearHitRegions(); Examples Using the clearHitRegions method This example demonstrates the clearHitRegions() method. 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. See https://github.com/whatwg/html/issues/3407 for more information. ...
CanvasRenderingContext2D.removeHitRegion() - Web APIs
The CanvasRenderingContext2D method removeHitRegion() removes a given hit region from the canvas. Syntax void ctx.removeHitRegion(id); Parameters id A DOMString representing the id of the region that is to be removed. Examples Using the removeHitRegion method This example demonstrates the removeHitRegion() method. 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. See https://github.com/whatwg/html/issues/3407 for more informatio...
Space Manager Detailed Design - Archive of obsolete content
p of classes that manage the occupied and available space that exists in horizontal bands across a canvas. The primary goal of the Space Manager is to provide information about those bands of space to support the CSS notion of floated elements. There are three important parts to the Space Manager API: the parts that deal with the coordinate space of the Space Manager, the parts that deal with the regions managed by the Space Manager, and the parts that manage float impact intervals. The class nsSpaceManager is declared in the file nsSpaceManger.h. The class is only used in the layout module and cannot be exported outside of that module (nor does it need to be). It is not a general purpose class, and is not intended to be subclasses . Here is the class declaration, taken from the source file as o...
... NS_OK if successful and NS_ERROR_FAILURE if the band data is not * not large enough. ...
...e 'count' member of the band data struct * indicates how large the array of trapezoids needs to be */ nsresult GetBandData(nscoord aYOffset, const nsSize& aMaxSize, nsBandData& aBandData) const; /** * Add a rectangular region of unavailable space. The space is * relative to the local coordinate system. * * The region is tagged with a frame * * @param aFrame the frame used to identify the region. ...
...And 21 more matches
Index - Web APIs
Web › API › Index
AddressErrors.recipient API, Address, AddressErrors, Error, Payment Request, Payment Request API, Property, Read-only, Reference, name, payment An object based on AddressErrors includes a recipient property when the address's recipient property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. ...
...ame, payment An object based on AddressErrors includes a recipient property when the address's recipient property couldn't be validated. The returned string explains the error and should offer suggestions for how to correct it. 39 AddressErrors.region API, Address, AddressErrors, Error, Payment Request, Payment Request API, Property, Read-only, Reference, Validation, payment, region An object based on AddressErrors includes a region property when the address's region property couldn't be validated. ...
...The returned string explains the error and should offer suggestions for how to correct it. ...
...And 18 more matches
ARIA Test Cases - Accessibility
(AL) If the screen reader provides a keystroke to announce the current progress, this should work with an ARIA progressbar as well. JAWS - JAWS announces the le...
... (AL) If the screen reader provides a keystroke to announce the current progress, this should work with an ARIA progressbar as well. JAWS - JAWS announces the level of progress at each time interval th...
... NVDA - n/a - - Zoom (Leopard) pass n/a pass pass ZoomText - - - - Orca - - - - Progressbar dojo nightly build Progress bar in "off" live region Progressbar in "assertive" live region Expected AT Behavior: The progress updates should be treated as the screen reader treats any progress updates. The live region markup should not affect how the progress updates are presented. (AL) If the screen reader provides a keystroke to announce the current progress, this should work with an ARIA progressbar as well. JAWS - JAWS announces the level of progress at each time interval the user selects in JAWS configuration. Markup used: role="progressbar", aria-valuemin, aria-valuenow, aria-valuemax Notes: Re...
...And 12 more matches
Accessibility API cross-reference
type of object Go through the ATK info and make sure it's up-to-date Accessible Roles Description & Notes MSAA Role (ROLE_SYSTEM_*) Java Accessibility Role Gnome Accessibility Role (ATK_ROLE_*) Mac OS X Accessibility Role ARIA (role=*) HTML Tagged PDF Relevant XUL For alerts, in Java/Gnome for any alert, in MSAA if no other role applies. ARIA live region. ALERT ALERT ALERT alert, alertdialog Content changes over time, such as animated gif ANIMATION n/a no spec n/a A section that forms an independent part of a document, page, or site. article <article> <Part> or <Art> Object representing entire app. ARIA role denotes interactive (not bro...
...ocument, page, or site. article <article> <Part> or <Art> Object representing entire app. ARIA role denotes interactive (not browsable) content operable in ways that differ from any of the other interactive ARIA roles, and may be only a part of the main document. APPLICATION FRAME n/a application See <Div> and <NonStruct> A region that contains mostly site-oriented content, rather than page-specific content. banner A portion of quoted content which is 'too long' to appear 'inline' n/a blockquote <BlockQuote> Entire window border as 1 object BORDER n/a n/a n/a Specific kind of button that drops down a list of i...
...y to the main content at a similar level in the DOM hierarchy, but remains meaningful when separated from the main content. complementary <aside> n/a but <Div> or even <p> have been suggested for this purpose A widget that may contain navigable descendants or owned children. composite (abstract role) A large perceivable region that contains information about the parent document such as copyright, authors' names etc. contentinfo <footer> Page footers are often tagged as an Artifact (not "real" content) with the 'contentinfo' provided as document level XMP metadata instead The mouse pointer - when and how is this used? CURSOR n/a n/a n/a A definit...
...And 8 more matches
CanvasRenderingContext2D.clip() - Web APIs
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(). ...
...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(). ...
...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 6 more matches
break-before - CSS: Cascading Style Sheets
The break-before CSS property sets how page, column, or region breaks should behave before a generated box. If there is no generated box, the property is ignored. ...
...If there is no generated box, the property is ignored. ...
...is ignored. /* Generic break values */ break-before: auto; break-before: avoid; break-before: always; break-before: all; /* Page break values */ break-before: avoid-page; break-before: page; break-before: left; break-before: right; break-before: recto; break-before: verso; /* Column break values */ break-before: avoid-column; break-before: column; /* Region break values */ break-before: avoid-region; break-before: region; /* Global values */ break-before: inherit; break-before: initial; break-before: unset; Each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element. To determine if a break must be done, the...
...And 6 more matches
Drawing and Event Handling - Plugins
a platform-specific event to the instance. NPP_Print: Request a platform-specific print operation for the instance. NPP_SetWindow: Set the window in which a plug-in draws. Browser-side methods, called by the plug-in: NPN_ForceRedraw: Force a paint message to a windowless plug-in. NPN_InvalidateRect: Invalidate an area in a windowless plug-in before repainting or refreshing. NPN_InvalidateRegion: Invalidate a region in a windowless plug-in before repainting or refreshing. Printing the Plug-in The browser calls the NPP_Print method to ask the plug-in instance to print itself. void NPP_Print(NPP instance, NPPrint *printInfo); The instance parameter represents the current plug-in. The PrintInfo parameter determines the print mode. It is set to either NP_FULL to indicate full-page plu...
...inates. Because the plug-in and the browser share the same graphics port, they share the responsibility for managing it correctly. The browser sets up the port for the plug-in before passing the plug-in an update event in two ways: The browser calls SetOrigin(npport->portx, npport->porty). This method makes the instance's upper-left coordinate equal to (0,0). The browser sets the port's clip region to the region of the plug-in currently visible (not scrolled off the page, obscured by floating palettes, or otherwise hidden). However, for the plug-in to draw at any other time, for example, to highlight on a mouse-down event or draw animation at idle time, it must save the current setting of the port, set up its drawing environment as appropriate, draw, and then restore the port to the previ...
... int16 argc, char *argn[], char *argv[], NPSavedData *saved) { ... NPError result = NPN_SetValue(instance, NPPVpluginWindowBool, (void*)false); } Invalidating the Drawing Area Before it can repaint or refresh part of its drawing area, a windowless plug-in must first invalidate the area with either of these browser methods: NPN_InvalidateRect or NPN_InvalidateRegion. Both methods perform the same operations: They invalidate the specified drawing area prior to repainting or refreshing. They pass an update event or a paint message to the plug-in. The browser redraws invalid areas of the document and windowless plug-ins at regularly timed intervals. To force a paint message, the plug-in can call NPN_ForceRedraw after calling one of the invalidate methods.
...And 5 more matches
break-after - CSS: Cascading Style Sheets
The break-after CSS property sets how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored. ...
...erated box. If there is no generated box, the property is ignored. /* Generic break values */ break-after: auto; break-after: avoid; break-after: always; break-after: all; /* Page break values */ break-after: avoid-page; break-after: page; break-after: left; break-after: right; break-after: recto; break-after: verso; /* Column break values */ break-after: avoid-column; break-after: column; /* Region break values */ break-after: avoid-region; break-after: region; /* Global values */ break-after: inherit; break-after: initial; break-after: unset; Each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element. To ...
... point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element. ...
...And 5 more matches
Gecko object attributes
ribute. The first item should have posinset="1", and the last item should have a posinset value equal to the setsize. Applied to: listitem, option Exposed in ARIA: aria-posinset setsize If this item is in a group, this indicates the number of items in the group. This is useful when combined with the posinset object attribute. Applied to: listitem, option Exposed in ARIA: aria-setsize Live region attribues atomic true when the entire region should be presented as a whole, when changes within it are considered important enough to automatically present. Applied to: any role Exposed via ARIA: aria-atomic live A hint as to whether changes within the current region or subtree should be automatically presented. Possible values are "off" which is the same as not being set -- this means t...
...Please see the ARIA States and Properties module for more information. Additional information may be provide by the object attributes atomic and relevant. ...
...Please see the ARIA States and Properties module for more information. Additional information may be provide by the object attributes atomic and relevant. ...
...And 4 more matches
nsIDragService
void dragMoved(in long aX, in long aY); Native code only! void fireDragEventAtSource(in unsigned long aMsg); Obsolete since Gecko 43 void fireDragEventAtSource(in mozilla::EventMessage aEventMessage); Native code only! ...
... dragMoved(in long aX, in long aY); Native code only! void fireDragEventAtSource(in unsigned long aMsg); Obsolete since Gecko 43 void fireDragEventAtSource(in mozilla::EventMessage aEventMessage); Native code only! ...
...gEventAtSource(in mozilla::EventMessage aEventMessage); Native code only! ...
...And 4 more matches
Web Video Text Tracks Format (WebVTT) - Web APIs
It is used for providing an interface in Document Object Model API, where different attributes supported by it can be used to prepare and alter the cues in number of ways. Constructor is the first point for starting the Cue which is defined using the default constructor VTTCue(startTime, endTime, text) where starting time, ending time and text for cue can be adjusted. After that we can set the region for that particular cue to which this cue belongs using cue.region. Vertical, horizontal, line, lineAlign, Position, positionAlign, text, size and Align can be used to alter the cue and its formation, just like we can alter the objects form, shape and visibility in HTML using CSS. But the VTTCue interface is within the WebVTT provides the vast range of adjustment variables which can be used direc...
... API: enum AutoKeyword { "auto" }; enum DirectionSetting { "" /* horizontal */, "rl", "lr" }; enum LineAlignSetting { "start", "center", "end" }; enum PositionAlignSetting { "line-left", "center", "line-right", "auto" }; enum AlignSetting { "start", "center", "end", "left", "right" }; [Constructor(double startTime, double endTime, DOMString text)] interface VTTCue : TextTrackCue { attribute VTTRegion? ...
...num AutoKeyword { "auto" }; enum DirectionSetting { "" /* horizontal */, "rl", "lr" }; enum LineAlignSetting { "start", "center", "end" }; enum PositionAlignSetting { "line-left", "center", "line-right", "auto" }; enum AlignSetting { "start", "center", "end", "left", "right" }; [Constructor(double startTime, double endTime, DOMString text)] interface VTTCue : TextTrackCue { attribute VTTRegion? ...
...And 4 more matches
break-inside - CSS: Cascading Style Sheets
The break-inside CSS property sets how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored. /* Keyword values */ break-inside: auto; break-inside: avoid; break-inside: avoid-page; break-inside: avoid-column; break-inside: avoid-region; /* Global values */ break-inside: inherit; break-inside: initial; break-inside: unset; Each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element. To determine if a break must be done, the following rules are applied: If any of the three concerned values is a forced break value (always, left, right, page,...
... point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element. ...
...e (always, left, right, page, column, or region), it has precedence. If more than one of them are such a break, the value of the element that appears the latest in the flow is used. Thus, the break-before value has precedence over the break-after value, which in turn has precedence over the break-inside value. If any of the three concerned values is an avoid break value (avoid, avoid-page, avoid-region, or avoid-column), no such break will be applied at that point. Once forced breaks have been applied, soft breaks may be added if needed, but not on element boundaries that resolve in a corresponding avoid value. Syntax The break-inside property is specified as one of the keyword values from the list below. ...
...And 4 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. The Space Manager is responsible for keeping track of where space is taken up and where it is available. ...
...information about the space available for other elements (GetAvailableSpace in nsBlockReflowState). Additionally, there is a need to manage impacts to lines caused by changes to floated elements. This is referred to as Propagation of Float Damage and is handled by the Block Frame, making use of the Space Manager. When a float is incrementally reflowed, the Space Manager is notified if the float's region has changed. 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). During the incremental reflow of dirty lines the block frame may encounter lines that are NOT dirty. In this case the Space Manager is also asked if there is any float dama...
...ly, SplitHorizontally) and some methods that query or manipulate the frames associated with the band (IsOccupiedBy, AddFrame, RemoveFrame). BandList: A subclass of BandRect that provides a list interface - Head(), Tail(), IsEmpty(), etc. FrameInfo: A structure that keeps information about the rectangle associated with a specific frame, in a linked list. nsBandTrapezoid: Represents the discrete regions within a band that are either Available, Occupied by a single frame, or Occupied by several frames. This is used to communicate information about the space in the band to the clients of the Space Manager. There is no internal use of the nsBandTrapezoid by the Space Manager, rather it uses its internal BandList to create a BandData collection, which is largely made up of nsTrapezoid data. Use C...
...And 3 more matches
SVG documentation index - SVG: Scalable Vector Graphics
Web › SVG › Index
t coordinate system. 39 class Reference, SVG, SVG Attribute Assigns a class name or set of class names to an element. You may assign the same class name or names to any number of elements, however, multiple class names must be separated by whitespace characters. 40 clip SVG, SVG Attribute The clip attribute is a presentation attribute defining the visible region of an element. 41 clip-path SVG, SVG Attribute The clip-path presentation attribute defines or associates a clipping path with the element it is related to. 42 clip-rule SVG, SVG Attribute The clip-rule attribute only applies to graphics elements that are contained within a <clipPath> element. The clip-rule attribute basically works as the fill-rule attri...
... the intermediate images in pixels of a filter primitive. 76 filterUnits NeedsExample, SVG, SVG Attribute, SVG Filter The filterUnits attribute defines the coordinate system for the attributes x, y, width and height. 77 flood-color SVG, SVG Attribute, SVG Filter The flood-color attribute indicates what color to use to flood the current filter primitive subregion. 78 flood-opacity SVG, SVG Attribute, SVG Filter The flood-opacity attribute indicates the opacity value to use across the current filter primitive subregion. 79 font-family SVG, SVG Attribute 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 na...
...attribute defines the color of the light source for lighting filter primitives. 126 limitingConeAngle Filters, SVG, SVG Attribute The limitingConeAngle attribute represents the angle in degrees between the spot light axis (i.e. the axis between the light source and the point to which it is pointing at) and the spot light cone. So it defines a limiting cone which restricts the region where the light is projected. No light is projected outside the cone. 127 local Deprecated, SVG, SVG Attribute The local attribute specifies the unique ID for a locally stored color profile as specified by International Color Consortium. 128 marker-end SVG, SVG Attribute The marker-end attribute defines the arrowhead or polymarker that will be drawn at th...
...And 3 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
es. The last section specifies details of the button. 7. Create a plain text file named button.css. Copy the following content, making sure that you scroll to get all of it. ...
... text file named button.css. Copy the following content, making sure that you scroll to get all of it. ...
...croll to get all of it. ...
...And 2 more matches
WAI-ARIA basics - Learn web development
tatic websites with largely text content are therefore easy to make accessible for people with visual impairments. The problem is that modern web apps are often not just static text -- they tend to have a lot of dynamically updating content, i.e. content that updates without the entire page reloading via a mechanism like XMLHttpRequest, Fetch, or DOM APIs. These are sometimes referred to as live regions. Let's look at a quick example -- see aria-no-live.html (also see it running live). In this example we have a simple random quote box: <section> <h1>Random quote</h1> <blockquote> <p></p> </blockquote> </section> Our JavaScript loads a JSON file via XMLHttpRequest containing a series of random quotes and their authors. Once that is done, we start up a setInterval() loop that loads a...
..., like so: <section aria-live="assertive" aria-atomic="true"> The aria-atomic="true" attribute tells screenreaders to read out the entire element contents as one atomic unit, not just the bits that were updated. Note: You can see the finished example at aria-live.html (see it running live). Note: The aria-relevant property is also quite useful for controlling what gets read out when a live region is updated. You can for example only get content additions or removals read out. Enhancing keyboard accessibility As discussed in a few other places in the module, one of the key strengths of HTML with respect to accessibility is the built-in keyboard accessibility of features such as buttons, form controls, and links. Generally, you are able to use the tab key to move between controls, the En...
...t accessibility article (read Keeping it unobtrusive for a full recap). At the end of this section we showed that we have included some ARIA attributes on the error message box that displays any validation errors when you try to submit the form: <div class="errors" role="alert" aria-relevant="all"> <ul> </ul> </div> role="alert" automatically turns the element it is applied to into a live region, so changes to it are read out; it also semantically identifies it as an alert message (important time/context sensitive information), and represents a better, more accessible way of delivering an alert to a user (modal dialogs like alert() calls have a number of accessibility problems; see Popup Windows by WebAIM). An aria-relevant value of all instructs the screenreader to read out the content...
...And 2 more matches
PR_Unmap
The parameter addr is the return value of an earlier call to PR_MemMap. ...
...The parameter addr is the return value of an earlier call to PR_MemMap. ...
...The parameter addr is the return value of an earlier call to PR_MemMap. ...
...And 2 more matches
Animated PNG graphics
Mozilla › Tech › APNG
owing frame. 20 delay_num unsigned short Frame delay fraction numerator. 22 delay_den unsigned short Frame delay fraction denominator. 24 dispose_op byte Type of frame area disposal to be done after rendering this frame. 25 blend_op byte Type of frame area rendering for this frame. ...
...t Frame delay fraction denominator. 24 dispose_op byte Type of frame area disposal to be done after rendering this frame. 25 blend_op byte Type of frame area rendering for this frame. The frame must be rendered within the region defined by x_offset, y_offset, width, and height. The offsets must be non-negative, the dimensions must be positive, and the region may not fall outside of the default image. Constraints on frame regions: x_offset >= 0 y_offset >= 0 width > 0 height > 0 x_offset + width <= 'IHDR' width y_offset + height <= 'IHDR' height The delay_num and delay_den parameters together specify a fraction indicating the time to display the current frame, in seconds. If the denominator is 0, it is to be treated as if it were 100 (that ...
...spose_op specifies how the output buffer should be changed at the end of the delay (before rendering the next frame). Valid values for dispose_op are: Value Constant Description 0 APNG_DISPOSE_OP_NONE No disposal is done on this frame before rendering the next; the contents of the output buffer are left as is. 1 APNG_DISPOSE_OP_BACKGROUND The frame's region of the output buffer is to be cleared to fully transparent black before rendering the next frame. 2 APNG_DISPOSE_OP_PREVIOUS The frame's region of the output buffer is to be reverted to the previous contents before rendering the next frame. If the first 'fcTL' chunk uses a dispose_op of APNG_DISPOSE_OP_PREVIOUS it should be treated as APNG_DISPOSE_OP_BACKGROUND. blend_op<co...
...And 2 more matches
nsISelectionController
Move(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); ...
..._IME_SELECTEDRAWTEXT 8 SELECTION_IME_CONVERTEDTEXT 16 SELECTION_IME_SELECTEDCONVERTEDTEXT 32 SELECTION_ACCESSIBILITY 64 For accessibility API usage. SELECTION_FIND 128 NUM_SELECTIONTYPES 8 9 SELECTION_ANCHOR_REGION 0 SELECTION_FOCUS_REGION 1 SELECTION_WHOLE_SELECTION 2 NUM_SELECTION_REGIONS 2 3 SELECTION_OFF 0 SELECTION_HIDDEN 1 Hidden displays selection. SELECTION_ON 2 SELECTION_DISABLED ...
...ne() Will scroll line up or down dependent on the boolean. void scrollLine( in boolean forward ); Parameters forward Scroll forward or backwards in selection. scrollPage() Will scroll the page without affecting the selection. void scrollPage( in boolean forward ); Parameters forward Scroll forward or backwards in selection. scrollSelectionIntoView() Scrolls a region of the selection, so that it is visible in the scrolled view. Note: If isSynchronous is true, calling this method may flush the pending reflow. This is dangerous for some objects. See bug 418470, comment 12 for details. void scrollSelectionIntoView( in short type, in short region, in short flags ); Parameters type The selection to scroll into view. (SelectionType) reg...
...And 2 more matches
Using the log role - Accessibility
Description This technique demonstrates how to use the log role and describes the effect it has on browsers and assistive technology. The log role is used to identify an element that creates a live region where new information is added in a meaningful order and old information may disappear. For example, chat logs, messaging history or an error log. In contrast to other types of live region, this role is sequentially ordered and new information is only added to the end of the log. When this role is added to an element, the browser will send out an accessible log event to assistive technology products which can then notify the user about it. By default updates contain only the changes to the live region and these are announced when the user is idle. Where the user needs to hear the ent...
...is sequentially ordered and new information is only added to the end of the log. When this role is added to an element, the browser will send out an accessible log event to assistive technology products which can then notify the user about it. By default updates contain only the changes to the live region and these are announced when the user is idle. Where the user needs to hear the entire live region upon a change aria-atomic="true" should be set. 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. Possible effects on user agents and assistive technology When the log role is added to an element, or such an element becomes visible, the user agent should do the following: Expose the element as ...
... Screen magnifiers may visually indicate that a log update has occurred. Note: Opinons may differ on how assistive technology should handle this technique. The information provided above is one of those opinions and therefore not normative. Examples Example 1: Adding the role in the HTML code The snippet below shows how the log role is added directly into the html source code. <div id="liveregion" class="region" role="log"></div> Example 2: Snippet from an example application This snippet creates the chat log in an AJAX chat application. <div id="chatArea" role="log"> <ul id="chatRegion" aria-live="polite" aria-atomic="false"> <li>Please choose a user name to begin using AJAX Chat.</li> </ul> <ul id="userListRegion" aria-live="off" aria-relevant="additions removals text"> <...
...And 2 more matches
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. ...
...t as having a status role in the operating system's accessibility API. Fire an accessible status event using the operating system's accessibility API if it supports it. Assistive technology products should listen for such an event and notify the user accordingly: Screen readers may provide a special key to announce the current status, and this should present the contents of any status live region. 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. Screen magnifiers may enlarge the status. Note: Opinons may differ on how assistive technology should handle this technique. The information provided above is one of those opinions and therefore not normative. Examples Example 1: Adding the status role i...
...The information provided above is one of those opinions and therefore not normative. Examples Example 1: Adding the status role in HTML The snippet below shows how the status role is added directly into the html source code. ...
...And 2 more matches
Accessibility documentation index - Accessibility
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. Live region markup is a complex area which is somewhat open to interpretation. The following is intended to provide implementation guidance that respects screen readers developers' need to try different things. The intention is to strike a balance between providing useful guidance on how to use the markup's intended meaning while supporting live regions as an area for screen readers to innovate and compete. ...
...ble document), and comments (e.g. an editorial comment related to a part of a document under review). 6 ARIA guides ARIA Accessible Rich Internet Applications (ARIA) defines ways to make the Web more accessible to people with disabilities. A few guidelines to follow that ensure better accessibility, like using drag and drop for placement of the widgets. 7 ARIA live regions ARIA, Accessibility, ariaLive 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 n...
...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. 8 Forms ARIA, Accessibility The following pages provide various techniques for improving the accessibility of web forms: 9 Alerts ARIA, Accessibility, Forms, Web You have a form -- a contact form, for example -- tha...
...And 2 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
e file instead of having one file for every icon. One reason is that it would be complicated to manage that many files, and it becomes more likely that changes made to some of the files lead to an inconsistent appearance that is not obvious by looking at the individual files. It is easier to be able to edit all icons in one go. There is also a performance gain from using a single file. To get the region that corresponds to a specific state of an icon, the -moz-image-region CSS property is used. Here are some examples of how the CSS for a toolbarbutton would look like on the 3 major platforms. This assumes that you've set the class xs-hw-toolbarbutton to all of your buttons. Windows: /* The second and third selectors at the bottom are necessary to prevent conflicts with installed themes. */...
...selectors at the bottom are necessary to prevent conflicts with installed themes. */ toolbarbutton.xulschoolhello-toolbarbutton, window:not([active="true"]) toolbarbutton.xulschoolhello-toolbarbutton, toolbar[iconsize="small"] toolbarbutton.xulschoolhello-toolbarbutton { list-style-image: url("chrome://xulschoolhello-os/skin/toolbar.png"); } #xulschoolhello-hello-world-button { -moz-image-region: rect(0px, 16px, 16px, 0px); } Mac OS X: /* The second and third selectors at the bottom are necessary to prevent conflicts with installed themes. */ toolbarbutton.xulschoolhello-toolbarbutton, window:not([active="true"]) toolbarbutton.xulschoolhello-toolbarbutton, toolbar[iconsize="small"] toolbarbutton.xulschoolhello-toolbarbutton { list-style-image: url("chrome://xulschoolhello-os/ski...
...selectors at the bottom are necessary to prevent conflicts with installed themes. */ toolbarbutton.xulschoolhello-toolbarbutton, window:not([active="true"]) toolbarbutton.xulschoolhello-toolbarbutton, toolbar[iconsize="small"] toolbarbutton.xulschoolhello-toolbarbutton { list-style-image: url("chrome://xulschoolhello-os/skin/toolbar.png"); } #xulschoolhello-hello-world-button { -moz-image-region: rect(0px, 16px, 16px, 0px); } Linux: /* The second and third selectors at the bottom are necessary to prevent conflicts with installed themes. */ toolbarbutton.xulschoolhello-toolbarbutton, window:not([active="true"]) toolbarbutton.xulschoolhello-toolbarbutton { list-style-image: url("chrome://xulschoolhello-os/skin/toolbar-large.png"); } #xulschoolhello-hello-world-button { -moz-imag...
...rect(0px, 16px, 16px, 0px); } Linux: /* The second and third selectors at the bottom are necessary to prevent conflicts with installed themes. */ toolbarbutton.xulschoolhello-toolbarbutton, window:not([active="true"]) toolbarbutton.xulschoolhello-toolbarbutton { list-style-image: url("chrome://xulschoolhello-os/skin/toolbar-large.png"); } #xulschoolhello-hello-world-button { -moz-image-region: rect(0px, 24px, 24px, 0px); } toolbar[iconsize="small"] #xulschoolhello-hello-world-button { list-style-image: url("chrome://xulschoolhello-os/skin/toolbar.png"); -moz-image-region: rect(0px, 16px, 16px, 0px); } Several CSS rules apply by default to all toolbar buttons. These add the button-like look you want. If for some reason you want to override these styles (not recommended), you'll ...
Index - Archive of obsolete content
ut system, specifically Block Layout. See the High Level Design document for an overview of the Space Manager, and as an introduction to the classes, structures and algorithms container in this, the Detailed Design Document. 636 Space Manager High Level Design Gecko The Space Manager and associated classes and structures are used by Block and Line layout to manage rectangular regions that are occupied and available, for correct handling of floated elements and the elements that flow around them. When elements are floated to the left or right in a layout, they take up space and influence where other elements can be placed. The Space Manager is responsible for keeping track of where space is taken up and where it is available. This information is used by block layout to correc...
...ons, Non-standard, Obsolete, Reference, recipe:css-property The -ms-filter CSS property is a Microsoft extension that sets or retrieves the filter or collection of filters applied to an object. 2101 -ms-flow-from CSS, CSS Property, Non-standard, Reference, recipe:css-property The -ms-flow-from CSS property is a Microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source. 2102 -ms-flow-into CSS, CSS Property, Non-standard, Reference, recipe:css-property The -ms-flow-into CSS property is a Microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source. 2103 -ms-high-contrast-adjust C...
...erty. 3648 NPN_IdentifierIsString NPAPI, Plugins Determines whether or not an identifier is a string. 3649 NPN_IntFromIdentifier NPAPI, Plugins Returns the integer value corresponding to the given integer identifier. 3650 NPN_InvalidateRect NPAPI, Plugins Invalidates the specified portion of the plugin's drawing area, adding it to the region that needs to be redrawn when the plugin next repaints its contents. 3651 NPN_InvalidateRegion NPAPI, Plugins Invalidates the specified drawing region prior to repainting or refreshing a windowless plug-in. 3652 NPN_Invoke NPAPI, Plugins Invokes a method on the given NPObject. 3653 NPN_InvokeDefault NPAPI, Plugins Invokes the default ...
... information the plug-in needs to print itself in full-page or embedded mode. 3692 NPPrintCallbackStruct NPAPI, Plugins Contains information required by the platformPrint field of the NPEmbedPrint structure during embedded mode printing on Unix systems. 3693 NPRect NPAPI, Plugins Represents a rectangular area of a plug-in's content area. 3694 NPRegion API, Gecko, NPAPI, Plugins, Reference Represents a platform-defined region of a page. 3695 NPSavedData NPAPI, Plugins 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. 3696 NPSetWindowCallbackStruct API, Gecko, NPAPI, Plugins, Reference, Ref...
In-Depth - Archive of obsolete content
-direction Controls which way the items in this box are displayed. Normal in English web browsers items are displayed top to bottom and left to right. This will flip it around so items inside of this box will be displayed bottom to top and right to left. This is useful for, say, putting the navigation controls (back button) on the right hand side of the toolbar. Values: Normal, Reverse -moz-image-region This is useful for dividing up an image into multiple smaller images. It uses a rect() object to determine the clipping region. Check out the section on Organizing Images for more information. Example: -moz-image-region: rect(168px 69px 189px 46px); -moz-opacity Makes boxes semi-transparent. It takes a decimal value, 0.00 is invisible and 1.00 is totally visible. How do I know what to Modify? No...
...ge that is listed there by default (chrome://navigator/skin/icons/btn1.gif) is actually a bunch of images grouped together in one file, so somewhere one of the CSS attributes is telling it what portion of the larger image to cut out and display. If you go back into the DOM inspector and look at the Rule column again, you'll see the #back-button id. Select that one and it lists a bunch of -x-image-region-left type styles in chrome://navigator/skin/. Open up navigator.css, again (if you closed it), and look for the #back-button section. It has a -moz-image-region style in there which you can change. If you look through the rest of this file, you'll also notice that there are regions for the different states of #back-button. Change those to match your new image as well. Just continue this process f...
..., you'll also notice that there are regions for the different states of #back-button. Change those to match your new image as well. Just continue this process for everything that you wish to change and you'll have a new skin in no time. Organizing Images To organize all of your icons you can store them all in one image and then tell Mozilla which portions to use. This is done using the -moz-image-region style. A bunch of 20px X 20px icons in a grid format Above is the source image of some icons setup to use the -moz-image-region style. Each row is a different icon in one of its 4 different states (Normal, Hover, Mouse Down, and Disabled). ...
...ns to use. This is done using the -moz-image-region style. A bunch of 20px X 20px icons in a grid format Above is the source image of some icons setup to use the -moz-image-region style. Each row is a different icon in one of its 4 different states (Normal, Hover, Mouse Down, and Disabled). To cut the pieces out you need to define rectangles in the css file like this: #button-send { -moz-image-region: rect(294px 23px 315px 0px); } #button-send:hover { -moz-image-region: rect(294px 46px 315px 23px); } #button-send:hover:active { -moz-image-region: rect(294px 69px 315px 46px); } #button-send[disabled="true"] { -moz-image-region: rect(294px 92px 315px 69px) !important; } The properties for Rect are listed in a clockwise fashion - Top, Right, Bottom, Left. Adding an image to the right o...
Internationalization - MDN Web Docs Glossary: Definitions of Web-related terms
Also so that a user can browse features to translate or localize the application to access all the content without breaking the layout. ...
...Also so that a user can browse features to translate or localize the application to access all the content without breaking the layout. ...
...Also so that a user can browse features to translate or localize the application to access all the content without breaking the layout. ...
...Also so that a user can browse features to translate or localize the application to access all the content without breaking the layout. ...
Experimental features in Firefox
provides a canvas that can be rendered offscreen. It is available in both the window and worker contexts. See bug 1390089 for more details. Release channel Version added Enabled by default? Nightly 44 No Developer Edition 44 No Beta 44 No Release 44 No Preference name gfx.offscreencanvas.enabled Hit regions Whether the mouse coordinates are within a particular area on the canvas is a common problem to solve. The hit region API allows you define an area of your canvas and provides another possibility to expose interactive content on a canvas to accessibility tools. Release channel Version added Enabled by default? Nightly 30 No Developer Edition 30 ...
...Currently, there are no WebGL extensions being tested by Firefox. ...
...ential changes to the API are held. Work is ongoing. See bug 1318984 for more details on the state of this API. Release channel Version added Enabled by default? Nightly 55 No Developer Edition 55 No Beta 55 No Release 55 No Preference name dom.payments.request.enabled and dom.payments.request.supportedRegions Basic Card API Extends the Payment Request API with dictionaries that define data structures describing card payment types and payment responses. See BasicCardRequest and BasicCardResponse. Release channel Version added Enabled by default? Nightly 56 No Developer Edition 56 No Beta 56 No Release 56 No ...
...ata structures describing card payment types and payment responses. See BasicCardRequest and BasicCardResponse. Release channel Version added Enabled by default? Nightly 56 No Developer Edition 56 No Beta 56 No Release 56 No Preference name dom.payments.request.enabled and dom.payments.request.supportedRegions Visual Viewport API The Visual Viewport API provides access to information describing the position of the visual viewport relative to the document as well as to the window's content area. It also supports events to monitor changes to this information. See bug 1550390 for more details. There currently is no real plan to ship this on desktop, but you can track the state of that just in cas...
Index
derMonkey These functions attempt to determine whether a property already exists on a specific JSObject without modifying the object. By design, this search may not find a property that other property lookup functions, such as JS_LookupProperty, would find. 191 JS_BeginRequest JSAPI Reference, SpiderMonkey 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. 192 JS_BindCallable JSAPI Reference, Reference, Reference(2), SpiderMonkey JS_BindCallable binds the given callable to use the given object as this. 193 JS_BufferIsCompilableUnit JSAPI Reference, SpiderMonkey Given a buffer, return false if the buffer might become a valid JavaScript statement with t...
...e gets the ids of all own properties of the specified object, obj, that have the JSPROP_ENUMERATE attribute. (The term own property refers to a property that is not inherited from the object's prototype.) This is not quite the same behavior as a JavaScript for...in loop, which converts all property ids to strings and also enumerates inherited properties. 257 JS_EnumerateDiagnosticMemoryRegions JSAPI Reference, Reference, Reference(2), SpiderMonkey JS_EnumerateDiagnosticMemoryRegions enumerates memory regions that contain diagnostic information intended to be included in crash report minidumps. 258 JS_EnumerateResolvedStandardClasses JSAPI Reference, Obsolete, Reference, Reference(2), SpiderMonkey JS_EnumerateResolvedStandardClasses enumerates any already...
..., allowing garbage collection to run if another thread has requested it. 505 JS_freeop JSAPI Reference, Reference, Reference(2), SpiderMonkey 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. 506 JS_malloc JSAPI Reference, SpiderMonkey JS_malloc allocates a region of memory nbytes in size. On success, JS_malloc returns a pointer to the beginning of the region. As with the standard C function malloc, memory allocated by JS_malloc is uninitialized. 507 JS_updateMallocCounter JSAPI Reference, Reference, Reference(2), SpiderMonkey JS_updateMallocCounter decrements malloc counter of GC and the zone of the context. 508 OBJECT_TO_J...
...dobe and Mozilla, and a SpiderMonkey-specific high level component called jstracer. The nanojit component is language agnostic, and contains no knowledge about SpiderMonkey or any other part of the Mozilla codebase. The jstracer component consists of a monitor and a recorder. The monitor watches the executing SpiderMonkey interpreter. When the monitor determines that the interpreter has entered a region of code that would benefit from native compilation, the monitor activates the recorder. The recorder records the activity of the interpreter, using nanojit to build an efficient, native representation of the execution called a fragment. The monitor then calls into the native code stored in the fragment. 538 SpiderMonkey compartments Guide, NeedsContent, NeedsExample, SpiderMonkey ...
ARIA Screen Reader Implementors Guide - Accessibility
Live region markup is a complex area which is somewhat open to interpretation. The following is intended to provide implementation guidance that respects screen readers developers' need to try different things. The intention is to strike a balance between providing useful guidance on how to use the markup's intended meaning while supporting live regions as an area for screen readers to innovate and compete. Interpreting WAI-ARIA live region markup Live changes are hints: in general live region markup is provided by the author as hints, and the assistive technology may allow for global, site or even region-specific settings, as well as heuristics to help with live changes on pages that have no WAI-ARIA hints. ...
... as well as heuristics to help with live changes on pages that have no WAI-ARIA hints. Optionally, create a second, additional queue if the user configures a second hardware channel: If there are two channels for presentation (e.g. text to speech and a Braille display), then two queues can be maintained to allow for parallel presentation. The channels could be user configured for presenting live regions based on role or politeness. Busy regions: Any changes in a region marked with aria-busy="true" should not be added to the queue until that attribute is cleared. Politeness (aria-live or from role) takes first precedence,: items should be added to the queue based on their politeness level from the aria-live property or inherited from the role (e.g. role="log" is polite by default). Assertive i...
...ternatively, implementations may choose to have a policy of clearing more polite items, e.g. assertive items clear any polite items from the queue. Time takes second precedence: Prioritize items with the same politeness level according to when the event occurs (earlier events come first). Present items of the same politeness level in the order of what occurred first. Atomic (aria-atomic="true") regions with multiple changes should not be presented twice with the same content. As a new event for an atomic region is added to the queue remove an earlier event for the same region. It is probably desirable to have at least a tiny timeout before presenting atomic region changes, in order to avoid presenting the region twice for two changes that occur quickly one after the other. Include labels when...
...hanges that are caused by the user's own input, as part of the context of that input. Allow global settings to turn off the presentation of live changes, present all live changes, use markup, or be "smart" (use heuristics) Details for Processing via Platform Accessibility APIs We hope browser manufacturers will work to provide consistent implementations. The most complete implementation of live regions currently is in Firefox 3. Here is how WAI-ARIA live regions are exposed in Firefox 3. ...
Web applications and ARIA FAQ - Accessibility
and widgets more accessible to a diverse range of users, including those who use assistive technologies such as screen readers or magnifiers. ARIA provides additional semantics to describe the role, state, and functionality of many familiar user interface controls, such as menus, sliders, trees, and dialogs. It also provides additional structural information, helping authors identify landmarks, regions, and grids on their pages. ARIA enables dynamic, JavaScript-driven applications and widgets to interoperate with a variety of desktop-based assistive technologies. For more information about how to create accessible widgets with ARIA, see the Overview of accessible web applications and widgets. Where is ARIA Supported? ARIA is a relatively new specification, but support for it is growing. A w...
...in order to more gracefully support older browsers and assistive technologies. Browsers ARIA is supported in the following browsers: Browser Minimum Version Notes Firefox 3.0+ Works with NVDA, JAWS 10+, and Orca Chrome Latest Screen reader support still experimental as of Chrome 15 Safari 4+ Safari 5 support is much improved. Live region support requires Safari 5 with VoiceOver on iOS5 or OS X Lion Opera 9.5+ Requires VoiceOver on OS X. TBD: how well does this currently work? Internet Explorer 8+ Works with JAWS 10+ and NVDA. No live region support in NVDA. IE9 support is much improved. In some cases, earlier versions may support only some features of ARIA. More detailed browser compatibil...
...improved. In some cases, earlier versions may support only some features of ARIA. More detailed browser compatibility charts are available from multiple sources: caniuse.com The Paciello Group Assistive Technologies Assistive technologies are increasingly adopting ARIA. ...
...tibility charts are available from multiple sources: caniuse.com The Paciello Group Assistive Technologies Assistive technologies are increasingly adopting ARIA. Some of them include: Assistive Technology Minimum Version for basic ARIA Minimum version for live region and alert support NVDA 2010.2 (NVDA is always a free upgrade) 2011.1 for Firefox, no live region support in IE as of 2011.2. Orca ? (TBD) ? (TBD) VoiceOver OSX 10.5, iOS 4 OS X 10.7 iOS 5 JAWS 8 10 Window-Eyes 7 No live region support currently ZoomText ? No live region support currently Note: Early versions of these tools often had partial or buggy ARIA implementations. For notes on JAWS support for A...
scroll-padding-block-start - CSS: Cascading Style Sheets
The source for this interactive example is stored in a GitHub repository. ...
... The source for this interactive example is stored in a GitHub repository. ...
... The source for this interactive example is stored in a GitHub repository. ...
... The source for this interactive example is stored in a GitHub repository. ...
scroll-padding-inline-end - CSS: Cascading Style Sheets
The source for this interactive example is stored in a GitHub repository. ...
... The source for this interactive example is stored in a GitHub repository. ...
... The source for this interactive example is stored in a GitHub repository. ...
... The source for this interactive example is stored in a GitHub repository. ...
scroll-padding-inline-start - CSS: Cascading Style Sheets
The source for this interactive example is stored in a GitHub repository. ...
... The source for this interactive example is stored in a GitHub repository. ...
... The source for this interactive example is stored in a GitHub repository. ...
... The source for this interactive example is stored in a GitHub repository. ...
Intl.DisplayNames.prototype.of() - JavaScript
d options provided when instantiating Intl.DisplayNames. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
.... The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Syntax displayNames.of(code); Parameters code The code to provide depends on the type: If the type is "region", code should be either an ISO-3166 two letters region code, or a three digits UN M49 Geographic Regions. If the type is "script", code should be an ISO-15924 four letters script code. 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. languageCode is either a two letters ISO 639-1 la...
..."-" variant ) subsequence of the unicode_language_id grammar in UTS 35's Unicode Language and Locale Identifiers grammar. languageCode is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. If the type is "currency", code should be a 3-letter ISO 4217 currency code. Return value A language-specific formatted string. ...
... grammar in UTS 35's Unicode Language and Locale Identifiers grammar. languageCode is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. If the type is "currency", code should be a 3-letter ISO 4217 currency code. Return value A language-specific formatted string. 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.Locale - JavaScript
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. The locale identifier consists of a language identifier and extension tags. Language identifiers are the core of the locale, consisting of language, script, and region subtags. Additional information about the locale is stored in the optional extension tags. Extension tags hold information about locale aspects such as calendar type, clock type, and numbering system type. Traditionally, the Intl API used strings to represent locales, just as Unicode does. This is a simple and lightweight solution that works well. Adding a Locale class, however, adds ease of par...
...e is stored in the optional extension tags. Extension tags hold information about locale aspects such as calendar type, clock type, and numbering system type. Traditionally, the Intl API used strings to represent locales, just as Unicode does. This is a simple and lightweight solution that works well. Adding a Locale class, however, adds ease of parsing and manipulating the language, script, and region, as well as extension tags. Constructor Intl.Locale() Creates a new Locale object. Instance properties Intl.Locale.prototype.baseName Returns basic, core information about the Locale in the form of a substring of the complete data string. Intl.Locale.prototype.calendar Returns the part of the Locale that indicates the Locale's calendar era. Intl.Locale.prototype.caseFirst Returns w...
...tl.Locale.prototype.hourCycle Returns the time keeping format convention used by the locale. Intl.Locale.prototype.language Returns the language associated with the locale. Intl.Locale.prototype.numberingSystem Returns the numeral system used by the locale. Intl.Locale.prototype.numeric Returns whether the locale has special collation handling for numeric characters. Intl.Locale.prototype.region Returns the region of the world (usually a country) associated with the locale. Intl.Locale.prototype.script Returns the script used for writing the particular language used in the locale. Instance methods Intl.Locale.prototype.maximize() Gets the most likely values for the language, script, and region of the locale based on existing values. Intl.Locale.prototype.minimize() Gets the mo...
... Intl.Locale.prototype.toString() Returns the Locale's full locale identifier string. ...
Intl - JavaScript
tion constructors and other language sensitive functions. Constructor properties Intl.Collator() Constructor for collators, which are objects that enable language-sensitive string comparison. Intl.DateTimeFormat() Constructor for objects that enable language-sensitive date and time formatting. Intl.DisplayNames() Constructor for objects that enable the consistent translation of language, region and script display names. Intl.ListFormat() Constructor for objects that enable language-sensitive list formatting. Intl.Locale() Constructor for objects that represents a Unicode locale identifier. Intl.NumberFormat() Constructor for objects that enable language-sensitive number formatting. Intl.PluralRules() Constructor for objects that enable plural-sensitive formatting and language-sp...
...rray-like object, with a length property and corresponding indexed elements) whose elements are either Intl.Locale objects or values that convert to Unicode BCP 47 locale identifier strings. If the locales argument is not provided or is undefined, the runtime's default locale is used. A Unicode BCP 47 locale identifier consists of a language code, (optionally) a script code, (optionally) a region (or country) code, (optionally) one or more variant codes, and (optionally) one or more extension sequences, with all present components separated by hyphens. Locale identifiers are case-insensitive ASCII. However, it's conventional to use title case (first letter capitalized, successive letters lower case) for script code, upper case for region codes, and lower case for everything else. F...
...more extension sequences, with all present components separated by hyphens. Locale identifiers are case-insensitive ASCII. However, it's conventional to use title case (first letter capitalized, successive letters lower case) for script code, upper case for region codes, and lower case for everything else. For example: "hi": Hindi (language) "de-AT": German (language) as used in Austria (region) "zh-Hans-CN": Chinese (language) written in simplified characters (script) as used in China (region) "en-emodeng": English (language) in the "Early modern English" dialect (variant) The subtags identifying languages, scripts, regions (including countries), and (rarely used) variants in Unicode BCP 47 locale identifiers are registered in the IANA Language Subtag Registry. This registry is pe...
...d for all properties. One property is supported by all language sensitive constructors and functions: The localeMatcher property, whose value must be a string "lookup" or "best fit" and which selects one of the locale matching algorithms described above. ...
MMgc - Archive of obsolete content
ed (a GCFinalizedObject base class exists defining a virtual destructor for GC items that need it). Deleted items are stored in a per-block free list which is used if there are any otherwise we get the next free item at the end. If we don't have anything free and we reach the end, we get another block from the GCHeap. GCHeap's reserve/commit strategy GCHeap reserves 16MB of address space per heap region. The goal of reserving so much address space is so that subsequent expansions of the heap are able to obtain contiguous memory blocks. If we can keep the heap contiguous, that reduces fragmentation and the possibility of many small "Balkanized" heap regions. Reserving 16MB of space per heap region should not be a big deal in a 2GB address space... it would take a lot of Player instances running s...
... Reserved memory is just virtual address space. It consumes the address space of the process but isn't really allocated yet; there are no pages committed to it yet. Memory allocation really occurs when reserved pages are committed. Our strategy in GCHeap is to reserve a fairly large chunk of address space, and then commit pages from it as needed. By doing this, we're more likely to get contiguous regions in memory for our heap. GCHeap serves up 4K blocks to the size class allocators or groups of contiguous 4K blocks for requests from the large allocator. It maintains a free list and blocks are coalesced with their neighbors when freed. If we use up the 16MB reserved chunk, we reserve another one, contiguously with the previous if possible. When memory mapping is not available GCHeap can fall bac...
...evious if possible. When memory mapping is not available GCHeap can fall back on a malloc/free approach for obtaining memory if a memory mapping API like VirtualAlloc or mmap is not available. In this case, GCHeap will allocate exactly as much memory as is requested when the heap is expanded and not try to reserve additional memory pages to expand into. GCHeap won't attempt to allocate contiguous regions in this case. We currently use VirtualAlloc for Windows (supported on all flavors of Windows back to 95), mmap on Mach-O and Linux. On Classic and Carbon, we do not currently use a memory mapping strategy... these implementations are calling MPAllocAligned, which can allocate 4096-byte aligned memory. We could potentially bind to the Mach-O Framework dynamically from Carbon, if the user's system...
MenuItems - Archive of obsolete content
'list-style-image' property. #add-bookmark { list-style-image: url('addbookmark.png'); } This technique can also be used to apply an image for the menu element, except you would want to use the "menu-iconic:" class instead. ...
... icon animation In order to animate the menu item icon on hover a -moz-image-region rule can be applied. In this example we use an image that is 16px wide and 32px high. the top 16px square is the icon in normal state the bottom part in hovered state. Note that the image element is on a child level underneath the menu or menuitem, and it will have the class menu-iconic-icon. ...
...mage element is on a child level underneath the menu or menuitem, and it will have the class menu-iconic-icon. Hence, -moz-image-region is not applied to the menu itself, but one level lower: <menuitem id="add-bookmark" class="menuitem-iconic" label="Add Bookmark" image="addbookmark.png"/> #add-bookmark { list-style-image: url('addbookmark.png'); } #add-bookmark .menu-iconic-icon { -moz-image-region: rect(0px, 16px, 16px, 0px) !important; } #add-bookmark:hover .menu-iconic-icon { -moz-image-region: rect(16px, 16px, 32px, 0px) !important; } This behavior is fundamentally different to other HTML elements, such as <li> or <div> where list-style-image and -moz-image-region can be applied at the same element level. Checkbox menu items Sometimes, you will want to have an item on a menu that ...
NPN_InvalidateRect - Archive of obsolete content
Syntax #include <npapi.h> void NPN_InvalidateRect(NPP instance, NPRect *invalidRect); Parameters The function has the following parameters: instance Pointer to the plug-in instance to invalidate a portion of. invalidRect The area to invalidate, specified in a coordinate system that originates at the top left of the plug-in's content area. ...
... parameters: instance Pointer to the plug-in instance to invalidate a portion of. invalidRect The area to invalidate, specified in a coordinate system that originates at the top left of the plug-in's content area. 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. The browser redraws invalid areas of the document and any windowless plug-ins at regularly timed intervals. To immediately send a paint message, the plug-in can call NPN_ForceRedraw() after calling th...
... 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. The browser redraws invalid areas of the document and any windowless plug-ins at regularly timed intervals. To immediately send a paint message, the plug-in can call NPN_ForceRedraw() after calling this method. See also NPN_ForceRedraw() NPN_InvalidateRegion() NPRect NPP ...
Common Firefox theme issues and solutions - Archive of obsolete content
d appropriate padlock icons are used for secure sites but not on insecure sites. ...
...ner > #page-proxy-stack > #page-proxy-favicon { list-style-image: url(chrome://browser/skin/identity-icons-https.png); } .verifiedIdentity > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon { list-style-image: url(chrome://browser/skin/identity-icons-https-ev.png); } #identity-box:hover > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon { -moz-image-region: rect(0, 32px, 16px, 16px); } #identity-box:hover:active > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon, #identity-box[open=true] > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon { -moz-image-region: rect(0, 48px, 16px, 32px); } #page-proxy-favicon[pageproxystate="invalid"] { opacity: 0.5; } For more information about identity boxes please s...
...tools/treepanel-button.png from the default theme into your browser/devetools/ folder. You also need to insert the following style rules into the proper place in the browser/browser.css file in your theme theme: /* Highlighter toolbar - HTML Tree */ #inspector-treepanel-toolbutton { list-style-image: url("chrome://browser/skin/devtools/treepanel-button.png"); -moz-margin-end: 0; -moz-image-region: rect(0px 18px 16px 0px); } /* Highlighter toolbar */ #inspector-inspect-toolbutton { list-style-image: url("chrome://browser/skin/devtools/inspect-button.png"); -moz-image-region: rect(0px 16px 16px 0px); } Style inspector is completely unstyled The style inspector that is part of Firefox 10 and later needs to be styled. Using the default theme in the latest Firefox, please try Tools > W...
Handling common accessibility problems - Learn web development
for items such as complex form controls and updating panels that can be understood by most browsers and screen readers. To deal with complex form widgets, you need to use ARIA attributes like roles to state what role different elements have in a widget (for example, are they a tab, or a tab panel?), aria-disabled to say whether a control is disabled or not, etc. To deal with regularly updating regions of content, you can use the aria-live attribute, which identifies an updating region. Its value indicates how urgently the screen reader should read it out: off: The default. Updates should not be announced. polite: Updates should be announced only if the user is idle. assertive: Updates should be announced to the user as soon as possible. rude: Updates should be announced straight away, e...
...pdating region. Its value indicates how urgently the screen reader should read it out: off: The default. Updates should not be announced. polite: Updates should be announced only if the user is idle. assertive: Updates should be announced to the user as soon as possible. rude: Updates should be announced straight away, even if this interrupts the user. Here's an example: <p><span id="LiveRegion1" aria-live="polite" aria-atomic="false"></span></p> You can see an example in action at Freedom Scientific's ARIA (Accessible Rich Internet Applications) Live Regions example -- the highlighted paragraph should update its content every 10 seconds, and a screenreader should read this out to the user. ARIA Live Regions - Atomic provides another useful example. We don't have space to cover WAI-AR...
... example, and see how the screenreader is able to associate columns and rows of content and read them out all together because we've defined headers properly. In bad-table.html, none of the cells can be associated at all. Note that NVDA seems to behave slightly stragely when you've only got a single table on a page; you could try WebAIM's table test page instead. Have a look at the WAI-ARIA live regions example we saw earlier, and note how the screen reader will keep reading out the constantly updating section as it updates. User testing As mentioned above, you can't rely on automated tools alone for determining accessibility problems on your site. It is recommended that when you draw up your testing plan, you should include some accessibility user groups if at all possible (see our User Tes...
JS_malloc
* JS_realloc(JSContext *cx, void *p, size_t oldBytes, size_t newBytes); char * JS_strdup(JSContext *cx, const char *s); void JS_free(JSContext *cx, void *p); Name Type Description cx JSContext * Pointer to a JS context. 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. nbytes size_t (JS_malloc and JS_realloc only) Amount of space, in bytes, to allocate. s const char * (JS_strdup only) Pointer to a null-terminated string. s must not be NULL. Description JS_malloc allocates a region of memory nbytes in size. On success, JS_malloc returns a pointer to the beginning of the region. As with the st...
...llocate. s const char * (JS_strdup only) Pointer to a null-terminated string. s must not be NULL. Description JS_malloc allocates a region of memory nbytes in size. On success, JS_malloc returns a pointer to the beginning of the region. As with the standard C function malloc, memory allocated by JS_malloc is uninitialized. JS_realloc tries to change the allocation size of the region of memory at p to nbytes. Failing that, JS_realloc allocates a new region of size nbytes and copies as much of the existing data in p as will fit to the new region. Then it frees the region at p and returns a pointer to the new region. Apart from whatever is copied, any newly allocated space is uninitialized. JS_realloc(cx, NULL, nbytes) behaves exactly like JS_malloc(cx, nbytes). When p is not n...
...malloc(cx, nbytes). When p is not null, JS_realloc(cx, p, 0) behaves like JS_free(cx, p) and returns NULL. JS_strdup allocates a copy of the null-terminated string s. On success, it returns a pointer to the copy. If any of these three functions fails to allocate the required amount of memory, it reports an error as though by calling JS_ReportOutOfMemory(cx) and returns NULL. JS_free deallocates a region of memory allocated a previous call to JS_malloc, JS_realloc, or JS_strdup. If p is null, JS_free does nothing. Once the region of memory is freed, the application must not use it again. For JS_realloc and JS_free, if p is non-null, cx must be associated with the same runtime as the context used to allocate p. That is, it is safe to allocate memory in one context and free it in another, as long ...
Web Replay
tion above. The IPC, rewind, and debugger components are all active while recording. These spawn a number of threads which do not participate in the recording: any events they execute are live. See the sections below for details on how these affect the process' behavior. To make it easier to ensure that the non-deterministic components do not have an effect on recorded behavior, certain code regions can be marked as disallowing events -- while executing them no thread, lock, or atomic events should be recorded. This is done in code associated with the non-deterministic components, such as during GC or Ion compilation, to help track down behaviors that should go unrecorded. Replaying A replaying content process behaves in the same way as a recording process, except for the following: T...
...anaging system resources when restoring. Snapshots Late in process initialization the first snapshot is taken, which is simply a copy of the stacks/registers for each thread. Each subsequent snapshot includes copies of thread stacks/registers as well as a diff containing the original contents of all pages of heap and static memory that were modified since the previous snapshot. Certain memory regions are excluded from snapshots; these memory regions are allocated with a special API and are used for state that needs to be preserved when rewinding. Snapshot data may be stored in memory or on disk. Diffs are computed by first setting up an exception handler thread (mac only) very similar to the one used by asm.js. When taking the first snapshot all addressable memory in the process is enumer...
...e memory is known -- anonymous mappings would not otherwise be intercepted or included in the recording, as heap allocation is non-deterministic while replaying. mprotect is intercepted and nop'ed to avoid interference with the dirty memory mechanism, and munmap is intercepted with no actual unmapping performed, so that memory does not need to be remapped when restoring a snapshot (a set of free regions is maintained to allow reusing this memory). All snapshots are taken from the main thread. Before taking the snapshot, all threads participating in the recording must enter an idle state, waiting on a thread-specific condition variable. Threads enter this state whenever they are waiting to acquire a lock or perform an atomic action that is part of the recording. While recording, threads may ...
imgIContainer
It also provides methods for drawing images onto Thebes contexts. Internally, this interface also manages animation of images. 66 Introduced Gecko 1.0 Inherits from: nsISupports Last changed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11) Implemented by: ?????????????????????????????????????. ...
... Missing Exception Missing Description Native code only!extractCurrentFrame Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Create a new imgContainer that contains only a single frame, which itself contains a subregion of the current frame. imgIContainer extractCurrentFrame( [const] in nsIntRect aRect ); Parameters aRect The area of the current frame to be duplicated in the returned imgContainer's frame. Return value Missing Description Exceptions thrown Missing Exception Missing Description Native code only!extractFrame Create a new imgContainer that contains only a single frame, which ...
.... imgIContainer extractCurrentFrame( [const] in nsIntRect aRect ); Parameters aRect The area of the current frame to be duplicated in the returned imgContainer's frame. Return value Missing Description Exceptions thrown Missing Exception Missing Description Native code only!extractFrame Create a new imgContainer that contains only a single frame, which itself contains a subregion of the given frame. imgIContainer extractFrame( in PRUint32 aWhichFrame, [const] in nsIntRect aRect, in PRUint32 aFlags ); Parameters aWhichFrame Frame specifier of the FRAME_* variety. aRect The area of the current frame to be duplicated in the returned imgContainer's frame. aFlags Flags of the FLAG_* variety. Return value Missing Description Exceptions thrown ...
CanvasRenderingContext2D.fill() - Web APIs
Possible values: "nonzero": The non-zero winding rule. Default rule. "evenodd": The even-odd winding rule. path A Path2D path to fill. ...
...ing lines to a Path2D object. The fill() method is then used to render the object to the canvas. A hole is left unfilled in the object's center by using the "evenodd" rule; by default (with the "nonzero" rule), the hole would also be filled. ...
...bject. The fill() method is then used to render the object to the canvas. A hole is left unfilled in the object's center by using the "evenodd" rule; by default (with the "nonzero" rule), the hole would also be filled. 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. ...
Document.execCommand() - Web APIs
Most commands affect the document's selection (bold, italics, etc.), while others insert new elements (adding a link), or affect an entire line (indenting). When using contentEditable, execCommand() affects the currently active editable element. Syntax document.execCommand(aCommandName, aShowDefaultUI, aValueArgument) Return value A Boolean that is false if the command is unsupported or disabled. ...
...the clipboard. When this behavior is enabled varies between browsers, and its conditions have evolved over time. Check the compatibility table for usage details. decreaseFontSize Adds a <small> tag around the selection or at the insertion point. (Not supported by Internet Explorer.) defaultParagraphSeparator Changes the paragraph separator used when new paragraphs are created in editable text regions. See Differences in markup generation for more details. delete Deletes the current selection. enableAbsolutePositionEditor Enables or disables the grabber that allows absolutely-positioned elements to be moved around. The grabber is disabled by default since Firefox 64 (bug 1490641). enableInlineTableEditing Enables or disables the table row/column insertion and deletion controls. The cont...
... the selection or the insertion point. outdent Outdents the line containing the selection or insertion point. paste Pastes the clipboard contents at the insertion point (replaces current selection). Disabled for web content. See [1]. redo Redoes the previous undo command. removeFormat Removes all formatting from the current selection. selectAll Selects all of the content of the editable region. strikeThrough Toggles strikethrough on/off for the selection or at the insertion point. subscript Toggles subscript on/off for the selection or at the insertion point. superscript Toggles superscript on/off for the selection or at the insertion point. underline Toggles underline on/off for the selection or at the insertion point. undo Undoes the last executed command. unlink Removes ...
Using the aria-labelledby attribute - Accessibility
Without an element ID, the assistive technology cannot catalog the object. aria-labelledby is very similar to aria-describedby: A label provides essential information about an object, while a description provides extended information that the user might need. 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. The Examples section below provides more information on how to use the attribute this way. To improve compatibility with user agents that do not support ARIA, you can use aria-labelledby with the <label> element (using the for attribute). This attribute can be used with any typical HTML form element; it is not limited to elements th...
...Note that the region being referenced is the region that contains the header. <div role="main" aria-labelledby="foo"> <h1 id="foo">Wild fires spread across the San Diego Hills</h1> Strong winds expand fires ignited by high temperatures ... </div> Example 3: Radio Groups In the example below, the container...
...BillingId">Billing</div> <div> <div id="myNameId">Name</div> <input type="text" aria-labelledby="myBillingId myNameId"/> </div> <div> <div id="myAddressId">Address</div> <input type="text" aria-labelledby="myBillingId myAddressId"/> </div> Example 2: Associating Headings With Regions In the example below, header elements are associated with the content they head. Note that the region being referenced is the region that contains the header. <div role="main" aria-labelledby="foo"> <h1 id="foo">Wild fires spread across the San Diego Hills</h1> Strong winds expand fires ignited by high temperatures ... </div> Example 3: Radio Groups In the example below, the container of a radiogroup is associated with its label using the aria-labelledby attribute: <div id="radio_label...
Using the group role - Accessibility
Description This technique demonstrates how to use the group role and describes the effect it has on browsers and assistive technology. The group role is used to identify a set of user interface objects which, in contrast with a region, are not intended to be included in a table of contents or a page summary (such as the structures that are dynamically created by a script or assistive technologies); a group should not be considered a major perceivable section on a page. When the role is added to an element, the browser will send out an accessible group event to assistive technology products which can then notify the user about it. 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 ...
...ry. However, when a group is used in the context of list, authors must limit its children to listitem elements. Group elements may be nested. Proper handling of a group by assistive technologies is determined by the context in which it is provided. If an author believes a section is significant enough to warrant inclusion in the page's table of contents, they should assign the section a role of region or a standard landmark role. Possible effects on user agents and assistive technology When the group role is added to an element, or such an element becomes visible, the user agent should do the following: Expose the element as having a group role in the operating system's accessibility API. Fire an accessible group event using the operating system's accessibility API if it supports it. ...
...Folder</li> </ul> </div> Working examples: File Directory Treeview Example Using Computed Properties Navigation Treeview Example Using Declared Properties Notes Group members that are outside of the DOM subtree of the group need to have explicit relationships assigned to them in order to participate in the group. ARIA attributes used group Related ARIA techniques region role Compatibility TBD: Add support information for common UA and AT product combinations Additional resources ARIA Authoring Practices - Accessible Name Guidance by Role - group ...
WebKit CSS extensions - CSS: Cascading Style Sheets
nk, such as Safari and Chrome, support a number of special WebKit extensions to CSS. These extensions are generally prefixed with -webkit-. Most -webkit- prefixed properties also work with an -apple- prefix. A few are prefixed with -epub-. WebKit-only properties Note: Avoid using on websites. These properties will only work in WebKit applications. ...
...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 -webkit-dashboard-region -webkit-font-size-delta -webkit-font-smoothing -webkit-highlight -webkit-hyphenate-character -webkit-hyphenate-limit-after -webkit-hyphenate-limit-before -webkit-hyphenate-limit-lines -webkit-initial-letter L -webkit-line-align -webkit-line-box-contain -webkit-line-clamp -webkit-line-grid -webkit-line-snap -webkit-locale -webkit-logical-height -webkit-logical-width M -web...
...ger supported in evergreen browsers, with or without the -webkit- prefix. -webkit-alt* -webkit-color-correction -webkit-flow-from -webkit-flow-into -webkit-grid-columns (See grid-column) -webkit-grid-rows (See grid-row) -webkit-hyphenate-charset -webkit-image-set (See image-set()) -webkit-mask-attachment -webkit-match-nearest-mail-blockquote-color -webkit-overflow-scrolling -webkit-region-break-after -webkit-region-break-before -webkit-region-break-inside -webkit-region-fragment -webkit-shape-inside -webkit-touch-callout (See touch-action) background-origin-x (unprefixed!) background-origin-y (unprefixed!) * Still supported in the Safari Technology Preview, but not in a generally released browser. Pseudo-classes :-webkit-animating-full-screen-transition :-webkit-an...
border-image-repeat - CSS: Cascading Style Sheets
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...er-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. When one value is specified, it applies the same behavior on all four sides. When two values are specified, the first applies to the top and bottom, the second to the left and right. ...
... be specified using one or two values chosen from the list of values below. When one value is specified, it applies the same behavior on all four sides. When two values are specified, the first applies to the top and bottom, the second to the left and right. Values stretch The source image's edge regions are stretched to fill the gap between each border. repeat The source image's edge regions are tiled (repeated) to fill the gap between each border. Tiles may be clipped to achieve the proper fit. round The source image's edge regions are tiled (repeated) to fill the gap between each border. Tiles may be stretched to achieve the proper fit. space The source image's edge regions are tiled (repeated) to fill the gap between each border. Extra space will be distributed in between til...
border-image-slice - CSS: Cascading Style Sheets
The border-image-slice CSS property divides the image specified by border-image-source into regions. These regions form the components of an element's border image. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. The slicing process creates nine regions in total: four corners, four edges, and a middle region. Four slice lines, set a given distance from their respective sides, control the size of the regions. The above diagram illustrates the location of each region. Zones 1-4 are corner regions. Each one is used a single time to form the corners of the final border image. Zones 5-8 are edge regions. These are r...
...om their respective sides, control the size of the regions. The above diagram illustrates the location of each region. Zones 1-4 are corner regions. Each one is used a single time to form the corners of the final border image. Zones 5-8 are edge regions. These are repeated, scaled, or otherwise modified in the final border image to match the dimensions of the element. Zone 9 is the middle region. It is discarded by default, but is used like a background image if the keyword fill is set. The border-image-repeat, border-image-width, and border-image-outset properties determine how these regions are used to form the final border image. Syntax /* All sides */ border-image-slice: 30%; /* vertical | horizontal */ border-image-slice: 10% 30%; /* top | horizontal | bottom */ border-image-s...
...ter images and coordinates for vector images. 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. <percentage> Represents an edge offset as a percentage of the source image's size: the width of the image for horizontal offsets, the height for vertical offsets. fill Preserves the middle image region and displays it like a background image, but stacked above the actual background. Its width and height are sized to match the top and left image regions, respectively. Formal definition Initial value100%Applies toall elements, except internal table elements when border-collapse is collapse. It also applies to ::first-letter.InheritednoPercentagesrefer to the size of the border imageComputed va...
border-image - CSS: Cascading Style Sheets
The border-image property may be specified with anywhere from one to five of the values listed below. 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. Values <'border-image-source'> The source image. See border-image-source. ...
...Up to two values may be specified. See border-image-repeat. Accessibility concerns Assistive technology cannot parse border images. If the image contains information critical to understanding the page's overall purpose, it is better to describe it semantically in the document. ...
...apply a diamond pattern to an element's borders. The source for the border image is a ".png" file of 81 by 81 pixels, with three diamonds going vertically and horizontally: HTML <div id="bitmap">This element is surrounded by a bitmap-based border image!</div> CSS To match the size of a single diamond, we will use a value of 81 divided by 3, or 27, for slicing the image into corner and edge regions. To center the border image on the edge of the element's background, we will make the outset values equal to half of the width values. Finally, a repeat value of round will make the border slices fit evenly, i.e., without clipping or gaps. #bitmap { width: 200px; background-color: #ffa; border: 36px solid orange; margin: 30px; padding: 10px; border-image: url("https://udn.rea...
mask-border-repeat - CSS: Cascading Style Sheets
The mask-border-repeat CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. 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. When one value is specified, it applies the same behavior on all four sides. ...
...ask-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. When one value is specified, it applies the same behavior on all four sides. When two values are specified, the first applies to the top and bottom, the second to the left and right. ...
... be specified using one or two values chosen from the list of values below. When one value is specified, it applies the same behavior on all four sides. When two values are specified, the first applies to the top and bottom, the second to the left and right. Values stretch The source image's edge regions are stretched to fill the gap between each border. repeat The source image's edge regions are tiled (repeated) to fill the gap between each border. Tiles may be clipped to achieve the proper fit. round The source image's edge regions are tiled (repeated) to fill the gap between each border. Tiles may be stretched to achieve the proper fit. space The source image's edge regions are tiled (repeated) to fill the gap between each border. Extra space will be distributed in between til...
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. ...
...ter images and coordinates for vector images. 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. <percentage> Represents an edge offset as a percentage of the source image's size: the width of the image for horizontal offsets, the height for vertical offsets. fill Preserves the middle image region. Its width and height are sized to match the top and left image regions, respectively. Description The slicing process creates nine regions in total: four corners, four edges, and a middle region. Four slice lines, set a given distance from their respective sides, control the size of the regions. The above diagram illustrates the location of each region. Zones 1-4 are corner regions. Eac...
...iption The slicing process creates nine regions in total: four corners, four edges, and a middle region. Four slice lines, set a given distance from their respective sides, control the size of the regions. The above diagram illustrates the location of each region. Zones 1-4 are corner regions. Each one is used a single time to form the corners of the final border image. Zones 5-8 are edge regions. These are repeated, scaled, or otherwise modified in the final border image to match the dimensions of the element. Zone 9 is the middle region. It is discarded by default, but is used like a background image if the keyword fill is set. The mask-border-repeat, mask-border-width, and mask-border-outset properties determine how these regions are used to form the final mask border. Formal defi...
mask-border - CSS: Cascading Style Sheets
t */ mask-border: url('border-mask.png') 25 space; /* source | slice | width */ mask-border: url('border-mask.png') 25 / 35px; /* source | slice | width | outset | repeat | mode */ mask-border: url('border-mask.png') 25 / 35px / 12px space alpha; Values <'mask-border-source'> The source image. See mask-border-source. ...
...Up to two values may be specified. See mask-border-repeat. <'mask-border-mode'> Defines whether the source image is treated as a luminance mask or alpha mask. See mask-border-mode. ...
...nt's border with a diamond pattern. The source for the mask is a ".png" file of 90 by 90 pixels, with three diamonds going vertically and horizontally: HTML <div id="bitmap">This element is surrounded by a bitmap-based mask border! Pretty neat, isn't it?</div> CSS To match the size of a single diamond, we will use a value of 90 divided by 3, or 30, for slicing the image into corner and edge regions. A repeat value of round will make the mask slices fit evenly, i.e., without clipping or gaps. div { width: 200px; background-color: lavender; border: 18px solid salmon; padding: 10px; /* Prefixed longhand properties currently supported in Chromium -webkit-mask-box-image-source: url(https://udn.realityripple.com/samples/2d/fd08a3134c.png); -webkit-mask-box-image-slice: 30 fil...
Localizations and character encodings - Developer guides
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. Unfortunately, using UTF-8 and declaring that UTF-8 was used was not always the prevalent way of offering Web content. In the 1990s, it was common to leave the encoding undeclared and to use a region-specific encoding that wasn't able to represent all of Unicode. Firefox needs a fallback encoding that it uses for non-conforming legacy content that doesn't declare its encoding. 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 applicatio...
...back encoding at windows-1252 to facilitate reading content cross-locale from the old locales whose fallback encoding is windows-1252. New-authored locale-native UTF-8 content is expected to declare its encoding, in which case the fallback encoding does not participate in the processing of content. Additionally, there is a small number of locales where in the 1990s there wasn't an obvious single region-specific encoding and heuristic detection among multiple legacy encodings was introduced to Web browsers. This has then had the effect that Web authors have depended on heuristic detection being present, so Firefox still has heuristic detection in these locales. Finding canonical encoding names The text below refers to canonical names of encodings. The canonical names are the values to the righ...
...rence intl.charset.detector in intl.properties. The setting must be left blank for all locales other than Russian, Ukrainian and Japanese. Do not under any circumstances specify the "universal" detector. It is not actually universal despite its name! Exception for minority languages If the localization is for minority language and the users are typically literate in the majority language of the region and read Web content written in the majority language very often, it is appropriate to specify the fallback encoding and the heuristic detection mode to be the same as for the localization for the majority language of the region. For example, for a localization for minority language in Russia, it is appropriate to copy the settings from the Russian localization. Setting some encodings to be more...
<area> - HTML: Hypertext Markup Language
Web › HTML › Element › area
This element is used only within a <map> element. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Content categories Flow content, phrasing content. Permitted content None, it is an empty element. Tag omission Must have a start tag and must not have an end tag. Permitted parents Any element that accepts phrasing content. The <area> element must have an ancestor <map>, but it need not be a direct parent. ...
...de the global attributes. alt A text string alternative to display on browsers that do not display images. The text should be phrased so that it presents the user with the same kind of choice as the image would offer when displayed without the alternative text. This attribute is required only if the href attribute is used. coords A set of values specifying the coordinates of the hot-spot region. The number and meaning of the values depend upon the value specified for the shape attribute. rect or rectangle: the value is two x,y pairs: left, top, right, bottom. circle: the value is x,y,r where x,y is a pair specifying the center of the circle and r is a value for the radius. poly or polygon: the value is a set of x,y pairs for each point in the polygon: x1,y1,x2,y2,x3,y3, and so...
...pace-separated list of link types values. The values and their semantics will be registered by some authority that might have meaning to the document author. The default relationship, if no other is given, is void. Use this attribute only if the href attribute is present. shape The shape of the associated hot spot. The specifications for HTML defines the values rect, which defines a rectangular region; circle, which defines a circular region; poly, which defines a polygon; and default, which indicates the entire region beyond any defined shapes. Many browsers, notably Internet Explorer 4 and higher, support circ, polygon, and rectangle as valid values for shape, but these values are non-standard. target A keyword or author-defined name of the browsing context to display the linked resource.
Intl.DisplayNames - JavaScript
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Constructor Intl.DisplayNames() Creates a new Intl.DisplayNames object. 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. ...
...e 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. Examples Region Code Display Names To create an Intl.DisplayNames for a locale and get the display name for a region code. // Get display names of region in English let regionNames = new Intl.DisplayNames(['en'], {type: 'region'}); regionNames.of('419'); // "Latin America" regionNames.of('BZ'); // "Belize" regionNames.of('US'); // "United States" regionNames.of('BA'); // "Bosnia & Herzegovina" regionNames.o...
...a locale and get the display name for a region code. // Get display names of region in English let regionNames = new Intl.DisplayNames(['en'], {type: 'region'}); regionNames.of('419'); // "Latin America" regionNames.of('BZ'); // "Belize" regionNames.of('US'); // "United States" regionNames.of('BA'); // "Bosnia & Herzegovina" regionNames.of('MM'); // "Myanmar (Burma)" // Get display names of region in Traditional Chinese regionNames = new Intl.DisplayNames(['zh-Hant'], {type: 'region'}); regionNames.of('419'; // "????" regionNames.of('BZ'); // "???" regionNames.of('US'); // "??" regionNames.of('BA'); // "??????????" regionNames.of('MM'); // "??" Language Display Names To create an Intl.DisplayNames for a locale and get the display name for a language-script-region sequence. // Get displa...
Intl.Locale.prototype.baseName - JavaScript
ing 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. Specifically, the property returns the substring containing the language, and the script and region if available. baseName returns the language ["-" script] ["-" region] *("-" variant) subsequence of the unicode_language_id grammar. Examples Basic Example let myLoc = new Intl.Locale("fr-Latn-CA"); // Sets locale to Canadian French console.log(myLoc.toString()); // Prints out "fr-Latn-CA-u-ca-gregory" console.log(myLoc.baseName); // Prints out "fr-Latn-CA" Example with options in the input ...
...anguage ["-" script] ["-" region] *("-" variant) subsequence of the unicode_language_id grammar. ...
...ns in the input string // Sets language to Japanese, region to Japan, // calendar to Gregorian, hour cycle to 24 hours let japan = new Intl.Locale("ja-JP-u-ca-gregory-hc-24"); console.log(japan.toString()); // Prints out "ja-JP-u-ca-gregory-hc-h24" console.log(japan.baseName); // Prints out "ja-JP" Example with options that override input string // Input string indicates language as Dutch and region as Belgium, // but options object overrides the region and sets it to the Netherlands let dutch = new Intl.Locale("nl-Latn-BE", {region: "NL"}); console.log(dutch.baseName); // Prints out "nl-Latn-NL" Specifications Specification ECMAScript Internationalization API (ECMA-402) ...
<clipPath> - SVG: Scalable Vector Graphics
Web › SVG › Element › clipPath
html,body,svg { height:100% } <svg viewBox="0 0 100 100"> <clipPath id="myClip"> <!-- Everything outside the circle will be clipped and therefore invisible. ...
... html,body,svg { height:100% } <svg viewBox="0 0 100 100"> <clipPath id="myClip"> <!-- Everything outside the circle will be clipped and therefore invisible. ...
...custom viewport for the referencing element. Thus, it affects the rendering of an element, but not the element's inherent geometry. The bounding box of a clipped element (meaning, an element which references a <clipPath> element via a clip-path property, or a child of the referencing element) must remain the same as if it were not clipped. By default, pointer-events are not dispatched on clipped regions. For example, a circle with a radius of 10 which is clipped to a circle with a radius of 5 will not receive "click" events outside the smaller radius. Attributes clipPathUnits Defines the coordinate system for the contents of the <clipPath> element. Value type: userSpaceOnUse|objectBoundingBox ; Default value: userSpaceOnUse; Animatable: yes Global attributes Core Attributes Most not...
Cross-domain Content Scripts - Archive of obsolete content
unction() { forecast_panel.show(); } }); The "panel.html" just includes a <div> block for the forecast: <!DOCTYPE html> <!-- panel.html --> <html> <head></head> <body> <div id="forecast_summary"></div> </body> </html> The "panel-script.js" uses XMLHttpRequest to fetch the latest forecast: // panel-script.js var url = "http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/json/500?key=YOUR-API-KEY"; self.port.on("show", function () { var request = new XMLHttpRequest(); request.open("GET", url, true); request.onload = function () { var jsonResponse = JSON.parse(request.responseText); var summary = getSummary(jsonResponse); var element = document.getElementById("forecast_summary"); element.textContent = summary; }; request.send()...
...Suppose your content script includes a lin...
CSS3 - Archive of obsolete content
ds and Borders Level 4 Working Draft CSS Device Adaptation Working Draft Adds a new at-rule, @viewport, allowing to specify the size, zoom factor, and orientation of the viewport that is used as the base for the initial containing block. CSS Exclusions Module Level 1 Working Draft Extends the floats mechanism to define exclusion regions in any positioning scheme. Adds the notion of shapes, in which content must flows. Filter Effects Module Level 1 Working Draft CSS Generated Content for Paged Media Module Working Draft Adds the ability to tailor printed version of a document by allowing to control header, footer but also references tables like indexes or tables of content...
...n of a document by allowing to control header, footer but also references tables like indexes or tables of content. CSS Page Floats Working Draft CSS Grid Layout Unknown CSS Line Grid Module Level 1 Working Draft CSS Positioned Layout Module Level 3 Working Draft CSS Regions Module Level 1 Working Draft Defines a new mechanism allowing content to flow across, eventually non-contiguous, multiple areas called regions. CSS Object Model (CSSOM) Working Draft CSS Font Loading Module Level 3 Working Draft CSS Scoping Module Level 1 Working Draft CSS Inline La...
Index of archived content - Archive of obsolete content
Identifier NPN_GetProperty NPN_GetStringIdentifier NPN_GetStringIdentifiers NPN_GetURL NPN_GetURLNotify NPN_GetValue NPN_GetValueForURL NPN_HasMethod NPN_HasProperty NPN_IdentifierIsString NPN_IntFromIdentifier NPN_InvalidateRect NPN_InvalidateRegion NPN_Invoke NPN_InvokeDefault NPN_MemAlloc NPN_MemFlush NPN_MemFree NPN_PluginThreadAsyncCall NPN_PostURL NPN_PostURLNotify NPN_ReleaseObject NPN_ReleaseVariantValue NPN_ReloadPlugins NPN_RemoveProperty NPN_RequestRead NPN_RetainObj...
...estroy NPP_DestroyStream NPP_GetValue NPP_HandleEvent NPP_New NPP_NewStream NPP_Print NPP_SetValue NPP_SetWindow NPP_StreamAsFile NPP_URLNotify NPP_Write NPP_WriteReady NPPrint NPPrintCallbackStruct NPRect NPRegion NPSavedData NPSetWindowCallbackStruct NPStream NPString NPUTF8 NPVariant NPVariantType NPWindow NP_GetMIMEDescription NP_GetValue NP_Initialize NP_Port NP_Shutdown Samples and Test Cases Shipping a pl...
Layout System Overview - Archive of obsolete content
t for aural presentations is undeveloped, though conceptually, it is possible and supported by the architecture. How Layout Does its Job: Frames and Reflow So, layout is concerned with providing a presentation, in galley or paged mode. Given a content model, how does the layout system actually create the presentation? Through the creation and management of frames. Frames are an encapsulation of a region on the screen, a region that contains geometry (size and location, stacking order). Generally frames correspond to the content elements, though there is often a one-to-many correspondence between content elements and frames. Layout creates frames for content based on either the specific HTML rules for an element or based on the CSS display type of the element. In the case of the HTML-specific ele...
...ents of different HTML and XML elements. CSS2 defines several (block, inline, list-item, marker, run-in, compact, and various table types) and the standard HTML form controls require their own special frame types to be formatted as expected. The most essential frame types are Block and Inline, and these correspond to the most important Layout concepts, the Block and Line. A block is a rectangular region that is composed of one or more lines. A line is a single row of text or other presentational elements. All layout happens in the context of a block, and all of the contents of a block are formatted into lines within that block. As the width of a block is changed, the contents of the lines must be reformatted. Consider for example a large paragraph of text sitting in paragraph: <p> We need docum...
Complete - Archive of obsolete content
iles it needs are in a jar, there are changes to chrome.manifest (for Firefox etc.) and to install.js (for SeaMonkey). For example, chrome.manifest originally had: content custombutton chrome/ Now it has: content allcustom jar:chrome/allcustom.jar!/content/allcustom/ You can see the other changes if you unpack the XPI. Languages Extensions can be installed by users who have different language and regional preferences. A combination of language and regional preferences is known as a locale. Locales are named with a two-part code. For example, the code en-US means English language (en) for the United States (US). To make it eaiser to support different locales, developers usually place anything that might depend on the locale in separate files in a separate directory. In the Custom Toolbar Button e...
...propriate language pack installed. But this extension switches between English and French without needing any language pack. Some versions of Firefox etc. have a bug that prevents this from working. To work around the bug, close the application, delete the file XUL.mfl in its profile, then restart it with the command line switch. Firefox etc. support specifying the language alone, without any region--for example, just: -uiLocale fr SeaMonkey does not support this. Themes A theme changes the appearance of the user interface, affecting fonts, colours, graphics, and sometimes layout. A theme consists of a skin for each component. This extension is just one component, allcustom, so it contains a skin for this component in each of the themes that it supports. These themes are: Classic for Fir...
Creating a Skin - Archive of obsolete content
stinguish the buttons on the toolbar from the commands on the menu. We could add some icons to the buttons to make them clearer. Mozilla Composer provides some icons for open and save buttons, which we'll just use here to save time. We can set the image for a button using the list-style-image CSS property. #opensearch { list-style-image: url("chrome://editor/skin/icons/btn1.gif"); -moz-image-region: rect(48px 16px 64px 0); -moz-box-orient: vertical; } #savesearch { list-style-image: url("chrome://editor/skin/icons/btn1.gif"); -moz-image-region: rect(80px 16px 96px 0); -moz-box-orient: vertical; } Mozilla provides a custom style property -moz-image-region which can be used to make an element use part of an image. You can think of it as a clip region for the image. You set the pr...
...oz-box-orient: vertical; } Mozilla provides a custom style property -moz-image-region which can be used to make an element use part of an image. You can think of it as a clip region for the image. You set the property to a position and size within an image and the button will display only that section of the image. This allows you to use the same image for multiple buttons and set a different region for each one. When you have lots of buttons, with states for hover, active and disabled, this saves space that would normally be occupied by mutliple images. In the code above, we use the same image for each button, but set a different image region each one. If you look at this image (btn1.gif), you will notice that it contains a grid of smaller images, each one 16 by 16 pixels. The -moz-box-ori...
Extentsions FAQ - Archive of obsolete content
d would have no problem implementing a third, so yes it's possible. ...
...top) How to get a refenece to the sidebar window Assuming you have chrome privileges, this should work: var Ci = Components.interfaces; var topLevelWindow = window.QueryInterface(Ci.nsIIn...
NPAPI plugin reference - Archive of obsolete content
ect has a particular method. NPN_HasProperty Determines whether or not the specified NPObject has a particular property. NPN_IdentifierIsString Determines whether or not an identifier is a string. NPN_IntFromIdentifier Returns the integer value corresponding to the given integer identifier. NPN_InvalidateRect Invalidates the specified portion of the plugin's drawing area, adding it to the region that needs to be redrawn when the plugin next repaints its contents. NPN_InvalidateRegion Invalidates the specified drawing region prior to repainting or refreshing a windowless plug-in. NPN_Invoke Invokes a method on the given NPObject. NPN_InvokeDefault Invokes the default method, if one exists, on the given NPObject. NPN_MemAlloc Allocates memory from the browser's memory space. NPN_M...
...ber of bytes that the plug-in can consume. NPPrint Contains information the plug-in needs to print itself in full-page or embedded mode. NPPrintCallbackStruct Contains information required by the platformPrint field of the NPEmbedPrint structure during embedded mode printing on Unix systems. NPPVariable See NPN_SetValue. NPRect Represents a rectangular area of a plug-in's content area. NPRegion Represents a platform-defined region of a page. NPSavedData Block of instance information saved after the plug-in instance is deleted; can be returned to the plug-in to restore the data in future instances of the plug-in. NPSetWindowCallbackStruct Contains information about the plug-in's Unix window environment. NPStream Represents a stream of data either produced by the browser and consum...
Making sure your theme works with RTL locales - Archive of obsolete content
troduced the :-moz-locale-dir CSS pseudoclass, which matches based on whether the user interface is being rendered left-to-right or right-to-left: :-moz-locale-dir(ltr) matches if the user interface is being rendered left to right. :-moz-locale-dir(rtl) matches if the user interface is being rendered right to left. Example toolbar[iconsize="large"][mode="icons"] #back-button { -moz-image-region: rect(0px 396px 34px 360px); } toolbar[iconsize="large"][mode="icons"] #back-button:-moz-locale-dir(rtl) { -moz-image-region: rect(0px 516px 34px 480px); } This specifies the default, left-to-right version of the button, then offers an override if the user's interface is being rendered in right-to-left mode. Gecko 1.9.1 (Firefox 3.5) and earlier The chromedir attribute Firefox, Thunderbir...
...r attribute Firefox, Thunderbird and SeaMonkey expose an attribute named chromedir on certain elements. All you have to do is add CSS rules to your theme that test for the value of this attribute, and use that to apply any RTL-specific rules that you may have. That's how the default theme works, so you can use it as an example. toolbar[iconsize="large"][mode="icons"] #back-button { -moz-image-region: rect(0px 398px 34px 360px); } toolbar[iconsize="large"][mode="icons"] #back-button[chromedir="rtl"] { -moz-image-region: rect(0px 516px 34px 478px); } This way, if chromedir is "rtl", the second rule will override the first, and the theme will work in RTL. Note that not all elements will have the chromedir attribute, so you may need to refer to an ancestor element that does. For example: ...
Fragmentainer - MDN Web Docs Glossary: Definitions of Web-related terms
Fragmentainers can be pre-defined, or generated as needed. When breakable content would overflow a fragmentainer in the block dimension, it breaks into the next container in its fragmentation context instead. Fragmented contexts are found in CSS Paged Media, where the fragmentainer would be the box which defines a page. ...
...needed. When breakable content would overflow a fragmentainer in the block dimension, it breaks into the next container in its fragmentation context instead. Fragmented contexts are found in CSS Paged Media, where the fragmentainer would be the box which defines a page. In Multiple-column Layout the fragmentainer is the column box created when columns are defined on a multicol container. In CSS Regions each Region is a fragmentainer. ...
Working with Svelte stores - Learn web development
r Alert component accessible Our Alert component is working fine, but it's not very friendly to assistive technologies. The problem is elements that are dynamically added and removed from the page. While visually evident to users who can see the page, they may not be so obvious to users of assistive technologies, like screen readers. ...
...ded and removed from the page. While visually evident to users who can see the page, they may not be so obvious to users of assistive technologies, like screen readers. To handle those situations, we can take advantage of ARIA live regions, which provide a way to programmatically expose dynamic content changes so that they can be detected and announced by assistive technologies. We can declare a region that contains dynamic content that should be announced by assistive technologies with the aria-live property followed by the politeness setting, which is used to set the priority with which screen readers should handle updates to that regions. The possible settings are off, polite, or assertive. For common situations, you also have several predefined specialized role values that can be used, lik...
Performance best practices for Firefox front-end engineers
Generally speaking, the larger an area that needs to be repainted, the longer it takes. Similarly, the more things that need to be repainted, the longer it takes. Our graphics team has added a handy feature to help you detect when and where paints are occurring. This feature is called "paint flashing," and it can be activated for both web content and the browser chrome. Paint flashing tints each region being painted with a randomly selected color so that it's more easy to see what on the screen is being painted. You can activate paint flashing for browser chrome by setting nglayout.debug.paint_flashing_chrome to true. You can activate paint flashing for web content by setting nglayout.debug.paint_flashing to true. After enabling these, exercise your function and see what's painting. See a...
... occur off of the main thread, and have a much higher probability of running at 60 FPS (see the section below called Use the compositor for animations for further details). Perhaps you're touching some DOM nodes in such a way that unexpected repaints are occurring in an area that don't need it. Best to investigate and try to remove those as best you can. Sometimes, our graphics layer invalidates regions in ways that might not be clear to you, and a section outside of the thing that just repainted will also repaint. Sometimes this can be addressed by ensuring that the thing changing is on its own layer (though this comes at a memory cost). You can put something on its own layer by setting its z-index, or by setting the will-change on the node, though this should be used sparingly. If you're uns...
Localizing with Mozilla Translator
mport it as needed. See the following example. Let's assume you have a Firefox product in MT with the directory layout present in language packs, as you probably would need for a initial localization. The directory structure will look like this: (ab-CD JAR root) locale |-- branding | |-- brand.dtd | `-- brand.properties |-- browser | |-- aboutDialog.dtd . . |-- browser-region | `-- region.properties `-- ab-CD |-- alerts | `-- notificationNames.properties |-- autoconfig | `-- autoconfig.properties |-- cookie | |-- cookieAcceptDialog.dtd | `-- cookieAcceptDialog.properties |-- global | |-- about.dtd | |-- appPicker.dtd . . but in the CVS and mozilla-central repositories the local...
...sible, so you have your own Mozilla repository full copy (there are alternate solutions; read on). A bit of history on MT MT has been evolving from long ago, when L10n were done always on shipped en-US JARs and when Mozilla Suite had five L10n JARs: ab-CD.jar, ab-win.jar, ab-mac.jar, ab-unix.jar, and CD.jar. MT thus referred to ab-CD.jar contents as ''Platform neutral'' platform, CD.jar as '''region''' platform (or regional files), and the other three as ''Windows platform'', ''Mac platform'' and ''Unix platform''. This JAR structure is now used just by SeaMonkey 1.1.x. When Mozilla L10n switched to ''Source L10n'', one of the many problems that MT had to solve was how to fit a directory structure in what had been designed for five JARs, and the ''patch'' consisted of providing a ''read fro...
Bytecode Descriptions
he iter object pushed by this instruction must not be used or removed from the stack except by JSOp::MoreIter and JSOp::EndIter, or by error handling. The script's JSScript::trynotes() must mark the body of the for-in loop, i.e. exactly those instructions that begin executing with iter on the stack, starting with the next instruction (always JSOp::LoopHead). Code must not jump into or out of this region: control can enter only by executing JSOp::Iter and can exit only by executing a JSOp::EndIter or by exception unwinding. (A JSOp::EndIter is always emitted at the end of the loop, and extra copies are emitted on "exit slides", where a break, continue, or return statement exits the loop.) Typically a single try note entry marks the contiguous chunk of bytecode from the instruction after JSOp::Ite...
... apply to JSOp::PushVarEnv and JSOp::{Enter,Leave}With. Each JSOp::PopLexicalEnv instruction matches a particular JSOp::PushLexicalEnv instruction in the same script and must have the same scope and stack depth as the instruction immediately after that PushLexicalEnv. JSOp::PushLexicalEnv enters a scope that extends to some set of instructions in the script. Code must not jump into or out of this region: control can enter only by executing PushLexicalEnv and can exit only by executing a PopLexicalEnv or by exception unwinding. (A JSOp::PopLexicalEnv is always emitted at the end of the block, and extra copies are emitted on "exit slides", where a break, continue, or return statement exits the scope.) The script's JSScript::scopeNotes() must identify exactly which instructions begin executing in t...
Exact Stack Rooting
nteracting with the GC from SpiderMonkey. Since the GC may move GCThings, it very important that SpiderMonkey know about each and every GCPointer in the system. The method you should use to keep the GC up-to-date with this information will vary depending on where the GCPointer is being stored. GCPointers can be stored as a property of a GCThing, on the CHeap, or in the CStack. These three storage regions have different lifetime and overhead characteristics and thus require different management strategies for efficient space and CPU utilization. Since C++ does not reliably distinguish between storage classes, we have to put this burden on the user. Storing a GCPointer in a GCThing Storing your GCPointer inside of a GCThing that is already in the LiveSet is the easiest way to keep a GCThing to t...
...fically SpiderMonkey's method of automatically managing JavaScript program memory. GCThing - Storage allocated by SpiderMonkey's allocator. GCPointer - A raw pointer type or tagged pointer type that may refer to a GCThing (JSObject *, JSString *, Value, jsid, etc.) GCHeap - The graph of GCThings allocated by SpiderMonkey's allocator. The goal of SpiderMonkey's GC is to partition this heap into regions reachable from the RootSet and not. Root - A GCPointer held live because it is a member of the RootSet. RootSet - This is a set of GCPointers that are de-facto alive, regardless of the GCThing's reachability. GCPointers must be explicitly added to and removed from the RootSet. LiveSet - The set of all GCThings that are reachable from Roots. DeadSet - The set of all GCThings that are not reac...
JSAPI reference
JSAPI 23 JS_CALL_DOUBLE_TRACER Added in SpiderMonkey 1.8 Obsolete since JavaScript 1.8.5 JS_PrintTraceThingInfo (DEBUG-only) Added in SpiderMonkey 1.8 Obsolete since JSAPI 16 Miscellaneous GC APIs: JS_updateMallocCounter Added in SpiderMonkey 17 JS::SetLargeAllocationFailureCallback Added in SpiderMonkey 31 JS::SetOutOfMemoryCallback Added in SpiderMonkey 31 JS_EnumerateDiagnosticMemoryRegions Added in SpiderMonkey 17 JSVAL_LOCK Obsolete since JSAPI 18 JSVAL_UNLOCK Obsolete since JSAPI 18 JS_LockGCThing Obsolete since JSAPI 21 JS_LockGCThingRT Obsolete since JSAPI 22 JS_UnlockGCThing Obsolete since JSAPI 21 JS_UnlockGCThingRT Obsolete since JSAPI 22 Numbers JS_NumberValue Added in SpiderMonkey 17 JS_DefineConstDoubles struct JSConstDoubleSpec JS_DefineConstI...
...MemoryCallback - used by JS::OutOfMemoryCallback Added in SpiderMonkey 31 JSCompartmentNameCallback - used by JS_SetCompartmentNameCallback Added in SpiderMonkey 17 JSContextCallback - used by JS_SetContextCallback JSDestroyCompartmentCallback - used by JS_SetDestroyCompartmentCallback Added in SpiderMonkey 17 JSEnumerateDiagnosticMemoryCallback - used by JS_EnumerateDiagnosticMemoryRegions Added in SpiderMonkey 17 JSErrorCallback - used by JS_ReportErrorNumber and friends JSErrorReporter - used by JS_SetErrorReporter JSGCCallback - used by JS_SetGCCallback JSFinalizeCallback Added in SpiderMonkey 17 - used by JS_AddFinalizeCallback Added in SpiderMonkey 38 and JS_SetFinalizeCallback Added in SpiderMonkey 17 Obsolete since JSAPI 32 JSIterateCompartmentCallback - us...
Parser API
d below with the specific string of its type field. You can use this field to determine which interface a node implements. The loc field represents the source location information of the node. ...
...hich interface a node implements. The loc field represents the source location information of the node. If the parser produced no information about the node's source location, the field is null; otherwise it is an object consisting of a start position (the position of the first character of the parsed source region) and an end position (the position of the first character after the parsed source region): interface SourceLocation { source: string | null; start: Position; end: Position; } Each Position object consists of a line number (1-indexed) and a column number (0-indexed): interface Position { line: uint32 >= 1; column: uint32 >= 0; } Programs interface Program <: Node { type: "Program"; body: [ Statement ]; } A complete program source tree. Functions i...
nsISelection2
Read only. Methods GetRangesForInterval() Return array of ranges intersecting with the given DOM interval. void GetRangesForInterval( in nsID...
..., in RangeArray results ); Parameters beginNode beginOffset endNode endOffset These four parameters represent the range to compare against the selection. allowAdjacent Specifies whether the returned ranges are allowed to touch the input range rather than merely overlapping it. results Returns the ranges that overlap (or touch) the input range. scrollIntoView() Scrolls a region of the selection, so that it is visible in the scrolled view. void scrollIntoView( in short aRegion, in boolean aIsSynchronous, in short aVPercent, in short aHPercent ); Parameters aRegion The region inside the selection to scroll into view (see selection region constants defined in nsISelectionController). aIsSynchronous When true, scrolls the selection into view before returnin...
nsISelectionPrivate
void GetRangesForIntervalCOMArray(in nsIDOMNode beginNode, in PRInt32 beginOffset, in nsIDOMNode endNode, in PRInt32 endOffset, in PRBool allowAdjacent, in RangeArray results); Native code only! Obsolete since Gecko 12.0 long getTableSelectionType(in nsIDOMRange range); void removeSelectionListener(in nsISelectionListener listenerToRemove); void scrollIntoView(in short aRegion, in boolean aIsSynchronous, in short aVPercent, in short aHPercent); void setAncestorLimiter(in nsIContent aContent); Native code only! void setPresShell(in nsIPresShell aPresShell); Native code only! void setTextRangeStyle(in nsIDOMRange range, in constTextRangeStyleRef textRangeStyle); Native code only! void startBatchChanges(); wstring toStringWi...
...f supplied range points to a single table element. long getTableSelectionType( in nsIDOMRange range ); Parameters range Return value One of TABLESELECTION_* constants. "None" means a table element is not selected. removeSelectionListener() void removeSelectionListener( in nsISelectionListener listenerToRemove ); Parameters listenerToRemove scrollIntoView() Scrolls a region of the selection, so that it is visible in the scrolled view. void scrollIntoView( in short aRegion, in boolean aIsSynchronous, in short aVPercent, in short aHPercent ); Parameters aRegion The region inside the selection to scroll into view (see selection region constants defined in nsISelectionController). aIsSynchronous When true, scrolls the selection into view before returnin...
Gecko Plugin API Reference - Plugins
contents of the specified URL; gets notification of the result. NPN_GetValue Allows the plug-in to query the browser for information. NPN_GetValueForURL Provides information to a plug-in which is associated with a given URL, for example the cookies or preferred proxy. NPN_InvalidateRect Invalidates specified drawing area prior to repainting or refreshing a windowless plug-in. NPN_InvalidateRegion Invalidates specified drawing region prior to repainting or refreshing a windowless plug-in. NPN_MemAlloc Allocates memory from the browser's memory space. NPN_MemFlush Requests that the browser free a specified amount of memory. NPN_MemFree Deallocates a block of allocated memory. NPN_NewStream Requests the creation of a new data stream produced by the plug-in and consumed by the browse...
...ct NPN_RetainObject NPN_ReleaseObject NPN_Invoke NPN_InvokeDefault NPN_Evaluate NPN_GetProperty NPN_SetProperty NPN_RemoveProperty NPN_HasProperty NPN_HasMethod NPN_SetException NPClass Structures NPAnyCallbackStruct NPByteRange NPEmbedPrint NPEvent NPFullPrint NPP NP_Port NPPrint NPPrintCallbackStruct NPRect NPRegion NPSavedData NPSetWindowCallbackStruct NPStream NPWindow Constants Error Codes Result Codes Plug-in Version Constants Version Feature Constants External resources External projects and articles for plugin creation Original document information Copyright Information: Netscape Communication ...
BasicCardResponse - Web APIs
To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari ? WebV...
...To change preferences in Firefox, visit about:config.Opera Android No support NoSafari iOS ? Samsung Internet Android Full support...
CSSRule - Web APIs
Web › API › CSSRule
Specifications Specification Status Comment CSS Object Model (CSSOM)The definition of 'CSSRule' in ...
... Specifications Specification Status Comment CSS Object Model (CSSOM)The definition of 'CSSRule' in that specification. Working...
CanvasRenderingContext2D - Web APIs
) Saves the current drawing style state using a stack so you can revert any change you make to it using restore(). CanvasRenderingContext2D.restore() Restores the drawing style state to the last element on the 'state stack' saved by save(). CanvasRenderingContext2D.canvas A read-only back-reference to the HTMLCanvasElement. Might be null if it is not associated with a <canvas> element. Hit regions CanvasRenderingContext2D.addHitRegion() Adds a hit region to the canvas. CanvasRenderingContext2D.removeHitRegion() Removes the hit region with the specified id from the canvas. CanvasRenderingContext2D.clearHitRegions() Removes all hit regions from the canvas. Filters CanvasRenderingContext2D.filter Applies a CSS or SVG filter to the canvas, e.g., to change its brightness ...
... Use CanvasRenderingContext2D.measureText() instead. CanvasRenderingContext2D.mozPathText() This method was introduced in Gecko 1.9 and is removed starting with Gecko 7.0. CanvasRenderingContext2D.mozTextAlongPath() This method was introduced in Gecko 1.9 and is removed starting with Gecko 7.0. Internal APIs (chrome-context only) CanvasRenderingContext2D.drawWindow() Renders a region of a window into the canvas. The contents of the window's viewport are rendered, ignoring viewport clipping and scrolling. CanvasRenderingContext2D.demote() This causes a context that is currently using a hardware-accelerated backend to fallback to a software one. All state should be preserved. Internet Explorer CanvasRenderingContext2D.msFillRule The fill rule to use. This must be on...
PaymentAddress.toJSON() - Web APIs
to Enabled). To change preferences in Chrome, visit chrome://flags.Edge Full support 15Firefox Full support 62Notes Disabled Full support 62Notes Disabled Notes Available only in nightly builds. 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). To change preferences in Firefox, visit about:config.IE No support NoOpera No support NoSafari ...
...e is behind the #web-payments preference (needs to be set to Enabled). To change preferences in Chrome, visit chrome://flags.Firefox Android Full support 62Notes Disabled Full support 62Notes Disabled Notes Available only in nightly builds. 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). To change preferences in Firefox, visit about:config.Opera Android No support NoSafari iOS Full support ...
Pointer events - Web APIs
and pointercancel handlers el.onpointerdown = downHandler; el.onpointercancel = cancelHandler; } </script> <body onload="init();"> <div id="target"> Touch me ... </div> </body> </html> touch-action CSS property The touch-action CSS property is used to specify whether or not the browser should apply its default (native) touch behavior (such as zooming or panning) to a region. This property may be applied to all elements except: non-replaced inline elements, table rows, row groups, table columns, and column groups. A value of auto means the browser is free to apply its default touch behavior (to the specified region) and the value of none disables the browser's default touch behavior for the region. The values pan-x and pan-y, mean that touches that begin on the spec...
... property may be applied to all elements except: non-replaced inline elements, table rows, row groups, table columns, and column groups. A value of auto means the browser is free to apply its default touch behavior (to the specified region) and the value of none disables the browser's default touch behavior for the region. The values pan-x and pan-y, mean that touches that begin on the specified region are only for horizontal and vertical scrolling, respectively. The value manipulation means the browser may consider touches that begin on the element are only for scrolling and zooming. In the following example, the browser's default touch behavior is disabled for the div element. <html> <body> <div style="touch-action:none;">Can't touch this ... </div> </body> </html> In the followin...
VTTCue - Web APIs
Web › API › VTTCue
d fractions of a second, that describes the beginning of the range of the media data to which the cue applies. endTime The time, in seconds and fractions of a second, that describes the end of the range of the media data to which the cue applies. text The raw text of the cue, and rules for its interpretation. Properties This interface also inherits properties from TextTrackCue. VTTCue.region A VTTRegion object describing the video's sub-region that the cue will be drawn onto, or null if none is assigned. VTTCue.vertical Returns an enum representing the cue writing direction. VTTCue.snapToLines Returns true if the VTTCue.line attribute is an integer number of lines or a percentage of the video size. VTTCue.line Returns the line positioning of the cue. This can be the string aut...
...size. VTTCue.line Returns the line positioning of the cue. This can be the string auto or a number whose interpretation depends on the value of VTTCue.snapToLines. VTTCue.lineAlign Returns an enum representing the alignment of the VTTCue.line. VTTCue.position Returns the indentation of the cue within the line. 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. VTTCue.positionAlign Returns an enum representing the alignment of the cue. This is used to determine what the VTTCue.position is anchored to. The default is auto. VTTCue.size Returns a double representing the size of the cue, as a percentage of the video size. VTTCue.textAlign Returns an enum representing the alignment of all the lines of text w...
Using the aria-relevant attribute - Accessibility
removals are deletion of nodes in the accessiblity tree; should be considered relevant. ...
... relevant and should be announced. Any change that is not relevant acts in the same manner it would if the aria-live attribute were set to off. aria-relevant is commonly used when a web page contains content that may be updated while viewing the page. Values A space-delimited list of one or more of the following values: additions Element nodes added to the accessibility tree within the live region; should be considered relevant. removals are deletion of nodes in the accessiblity tree; should be considered relevant. text are changes to the textual content of existing nodes; should be considered relevant. all is equivalent to additions removals text. aria-relevant="additions text" is the default value on a live region. Additional resources WAI-ARIA specification for aria-relevant ...
Using ARIA: Roles, states, and properties - Accessibility
(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 alertdialog dialog States and properties Widget attributes aria-autocomplete aria-checked aria-current aria-disabled aria-errormessage aria-expanded aria-haspopup aria-hidden aria-invalid aria-label aria-level aria-modal aria-multiline aria-multiselectable aria-orientation aria-placehol...
...ttributes aria-autocomplete aria-checked aria-current aria-disabled aria-errormessage aria-expanded aria-haspopup aria-hidden aria-invalid aria-label aria-level aria-modal aria-multiline aria-multiselectable aria-orientation aria-placeholder aria-pressed aria-readonly aria-required aria-selected aria-sort aria-valuemax aria-valuemin aria-valuenow aria-valuetext Live region attributes aria-live aria-relevant aria-atomic aria-busy Drag & drop attributes aria-dropeffect aria-dragged Relationship attributes aria-activedescendant aria-colcount aria-colindex aria-colspan aria-controls aria-describedby aria-details aria-errormessage aria-flowto aria-labelledby aria-owns aria-posinset aria-rowcount aria-rowindex aria-rowspan aria-setsiz...
ARIA: timer role - Accessibility
mer 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. <div role="timer" id="eggtimer">0</div> This defines this div element as a timer with no remaining time. Description The timer role indicates to assistive technologies that this part of the web content is a live region containing a timer listing the time remaining or elapsed time. A timer's inner text should be an updating current time measurement. While the value does not necessarily need to be machine parsable, it should continuously update at regular intervals unless the timer is paused or reaches its end-point. Associated WAI-ARIA roles, states, and properties aria-label Used to provide the name of the...
...ecutes, the entirety of the string that is added will be announced. On subsequent calls, only the parts of the content that changed compared to the previous content will be announced. For instance, when the clock changes from "17:33" to "17:34", assistive technologies will only announce "4", which won't be very useful to users. One way around this would be to first clear the contents of the live region, and then inject the new content. However, this can sometimes be unreliable, as it's dependent on the exact timing of these two updates. aria-atomic="true" ensures that each time the live region is updated, the entirety of the content is announced in full (e.g. "Time: 17:34"). <div id="clock" role="timer" aria-live="polite" aria-atomic="true"></div> Accessibility concerns Improperly using the...
ARIA: application role - Accessibility
ce by sentence, or paragraph by paragraph. The AT will read any semantics like links, headings, form controls, tables, lists, or images. In addition, a set of so-called quick navigation keys has been established over the years that allows blind users to skim through a page via a certain element type. Such elements usually include headings, form fields, lists, tables, links, graphics, or landmark regions. For all of this to work, ATs intercept almost all keyboard input and consume it themselves, letting nothing through to the browser or other user agent. To be able to interact with a web page, a standard set of widgets is recognized that, when pressing a certain key (usually the Enter key) this mode is switched off. The screen reader mode, often called forms mode or focus mode, lets all keyboar...
...e role text for screen readers to speak. This should be localized. Keyboard interactions Keyboard interaction is completely under the web author's control and can be anything associated with the particular widget being implemented. In a slides application, for example, a widget could be created that uses the arrow keys to position elements on the slide, and uses audio feedback via an ARIA live region to communicate the position and overlap status with other objects. Focus is being managed via aria-activedescendant. The tab , Space and Enter keys, as well as Escape , must be handled by the application. The one exception is if focus is set to a standard widget inside the application that supports keyboard navigation from the browser, for example an input element. Required JavaScript features ...
ARIA: form role - Accessibility
="Contact information"> <!-- form content --> </div> This is a form that collects and saves a user's contact information. Important: Use an HTML <form> element to contain your form controls, rather than the ARIA form role, unless you have a very good reason. The HTML <form> element is sufficient to tell assistive technologies that there is a form. Description A form landmark identifies a region of content that contains a collection of items and objects that, as a whole, combine to create a form when no other named landmark is appropriate (e.g. main or search). Using the <form> element will automatically communicate a section of content as a form landmark, if it is provided an accessible name. Developers should always prefer using the correct semantic HTML element over using ARIA.
...en it has an accessible name (e.g. aria-labelledby, aria-label or title). Make sure to have a unique label on each form in a document to help users understand the purpose of the form. This label should be visible to all users, not just assistive technology users. Use the search landmark instead of the form landmark when the form is used for search functionality. Use the role="form" to identify a region of the page; do not use it to identify every form field. Even if you are using the form landmark instead of <form>, you are encouraged to use native HTML form controls like button, input, select, and textarea Associated WAI-ARIA Roles, States, and Properties No role specific states or properties. Keyboard Interactions No role specific keyboard interactions Required JavaScript features ons...
WAI-ARIA Roles - Accessibility
RIA: Mark roleThe 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. If possible, you should use this element instead.ARIA: Navigation RoleThe navigation landmark role is used to identify major groups of links used for navigating through a website or page content.ARIA: Region roleThe region landmark role is used to identify an area in the document that the author has identified as significant. It is used to provide a generic landmark for people to be able to navigate to easily when none of the other landmark roles are appropriate.ARIA: row roleAn element with role="row" is a row of cells within a tabular structure. A row contains one or more cells, grid cells or colu...
...d from the below list. ...
orphans - CSS: Cascading Style Sheets
Web › CSS › orphans
/* <integer> values */ orphans: 2; orphans: 3; /* Global values */ orphans: inherit; orphans: initial; orphans: unset; In typography, an orphan is the first line of a paragraph that appears alone at the bottom of a page. (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. The value must be positive. ...
...olor: #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. Recommendation Initial definition. Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. DesktopMobileChromeEdgeFire...
scroll-padding-block-end - CSS: Cascading Style Sheets
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
scroll-padding-bottom - CSS: Cascading Style Sheets
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
<shape> - CSS: Cascading Style Sheets
Web › CSS › shape
rect() rect(top, right, bottom, left) Values top Is a <length> representing the offset for the top of the rectangle relative to the top border of the element's box. ...
... rect() rect(top, right, bottom, left) Values top Is a <length> representing the offset for the top of the rectangle relative to the top border of the element's box. right Is a <length> representing the offset for the right of the rectangle relative to the left border of the element's box. ...
widows - CSS: Cascading Style Sheets
Web › CSS › widows
/* <integer> values */ widows: 2; widows: 3; /* Global values */ widows: inherit; widows: initial; widows: unset; In typography, a widow is the last line of a paragraph that appears alone at the top of a page. (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. The value must be positive. ...
...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. CSS Multi-column Layout ModuleThe definition of 'widows' in that specification. Working Draft Recommendations to consider widows in relation to columns. CSS Level 2 (Revision 1)The definition of 'widows' in that specification. Recommendation Initial definition. ...
Microformats - HTML: Hypertext Markup Language
00-07:00">June 29, 2019 at 9:00am (-0700)</time><br>through <time class="dt-end" datetime="2019-06-30T18:00:00-07:00">June 30, 2019 at 6:00pm (-0700)</time><br> <div class="p-location h-card"> <div> <span class="p-name">Mozilla</span> </div> <div> <span class="p-street-address">1120 NW Couch St</span>, <span class="p-locality">Portland</span>, <span class="p-region">Oregon</span>, <span class="p-country">US</span> </div> <data class="p-latitude" value="45.52345"></data> <data class="p-longitude" value="-122.682677"></data> </div> <div class="e-content">Come join us </div> <div> <span class="p-author h-card"><a class="u-url p-name" href="https://aaronparecki.com">Aaron Parecki</a></span> Published this <a href="htt...
... "content": [ { "html": "Come join us", "value": "Come join us", "lang": "en" } ], "location": [ { "type": [ "h-card" ], "properties": { "name": [ "Mozilla" ], p-street-address: [ "1120 NW Couch St" ] "locality": [ "Portland" ], "region": [ "Oregon" ], "country": [ "US" ], "latitude": [ "45.52345" ], "longitude": [ "-122.682677" ] }, "lang": "en", "value": "Mozilla" } ] }, "lang": "en" } ], ...
Intl.DateTimeFormat.prototype.resolvedOptions() - JavaScript
The values resulting from format matching between the corresponding properties in the options argument and the available combinations and representations for date-time formatting in the selected locale. Some of these properties may not be present, indicating that the corresponding components will not be represented in formatted output. ...
...ons argument and the available combinations and representations for date-time formatting in the selected locale. Some of these properties may not be present, indicating that the corresponding components will not be represented in formatted output. ...
Intl.DisplayNames() constructor - JavaScript
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. 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. The following Unicode extension key is allowed: nu The numbering system to be used. ...
... or all of the following properties: localeMatcher The locale matching algorithm to use. Possible values are "lookup" and "best fit"; the default is "best fit". For information about this option, see the Intl page. style The formatting style to use, the default is "long". "narrow" "short" "long" type The type to use, the default is "language". "language" "region" "script" "currency" fallback The fallback to use, the default is "code". "code" "none" Examples Basic usage In basic use without specifying a locale, a formatted string in the default locale and with default options is returned. console.log((new Intl.DisplayNames()).of('US')); // Expected output: 'us' Specifications Specification Intl.
Intl.DisplayNames.prototype.resolvedOptions() - JavaScript
at were requested and are supported for this locale are included in locale. style The value provided for this property in the options argument of the constructor or the default value ("long"). Its value is either "long", "short", or "narrow". type The value provided for this property in the options argument of the constructor or the default value ("language"). ...
... the options argument of the constructor or the default value ("language"). Its value is either "language", "region", "script", or "currency". fallback The value provided for this property in the options argument of the constructor or the default value ("code"). Its value is either "code" or "none". Examples Using resolvedOptions const displayNames = new Intl.DisplayNames(['de-DE'], {type: 'region'}); const usedOptions = displayNames.resolvedOptions(); console.log(usedOptions.locale); // "de-DE" console.log(usedOptions.style); // "long" console.log(usedOptions.type); // "region" console.log(usedOptions.fallback); // "code" Specifications Specification Intl.DisplayNamesThe definition of 'resolvedOptions()' in that specification. ...
Intl.Locale.prototype.maximize() - JavaScript
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. 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. ...
..."en", the algorithm would return "en-Latn-US", since English can only be written in the Latin script, and is most likely to be used in the United States, as it is the largest English-speaking country in the world. This functionality is provided to JavaScript programmers via the maximize() method. maximize() only affects the main subtags that comprise the language identifier: language, script, and region subtags. Other subtags after the "-u" in the locale indentifier are called extension subtags and are not affected by the maximize() method. Examples of these subtags include Locale.hourCycle, Locale.calendar, and Locale.numeric. Examples Using maximize let myLocale = new Intl.Locale("fr", {hourCycle: "h24", calendar: "gregory"}); console.log(myLocale.baseName); // Prints "fr" console.log(myLoc...
Web video codec guide - Web media technologies
ise, except that while the ringing effect is more or less steady and unchanging, mosquito noise shimmers and moves. RInging is another type of artifact that can make it particularly difficult to read text contained in your images. Posterizing Posterization occurs when the compression results in the loss of color detail in gradients. Instead of smooth transitions through the various colors in a region, the image becomes blocky, with blobs of color that approximate the original appearance of the image. Note the blockiness of the colors in the plumage of the bald eagle in the photo above (and the snowy owl in the background). The details of the feathers is largely lost due to these posterization artifacts. Contouring Contouring or color banding is a specific form of posterization in which t...
...orts of media, including broadcast television, RTP videoconferencing, and as the video codec for Blu-Ray discs. AVC is highly flexible, with a number of profiles with varying capabilities; for example, the Constrained Baseline Profile is designed for use in videoconferencing and mobile scenarios, using less bandwidth than the Main Profile (which is used for standard definition digital TV in some regions) or the High Profile (used for Blu-Ray Disc video). Most of the profiles use 8-bit color components and 4:2:0 chroma subsampling; The High 10 Profile adds support for 10-bit color, and advanced forms of High 10 add 4:2:2 and 4:4:4 chroma subsampling. AVC also has special features such as support for multiple views of the same scene (Multiview Video Coding), which allows, among other things, the...
flood-opacity - SVG: Scalable Vector Graphics
Note: As a presentation attribute, flood-opacity can be used as a CSS property. ...
... 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 Yes <alpha-value> A number or percentage indicating the opacity value to use across the current filter primitive subregion. A number of 0 or a percentage of 0% represents a fully transparent color, 1 or 100% represents a fully opaque color. Specifications Specification Status Comment Filter Effects Module Level 1The definition of 'flood-opacity' in that specification. Working Draft Aligned the value to the CSS <alpha-value> value. Scalable Vector Graphics (SVG) 1.1 (Sec...
Understanding WebAssembly text format - WebAssembly
rupt raw function addresses, which is something that cannot be allowed on the web. The solution was to store function references in a table and pass around table indices instead, which are just i32 values. call_indirect's operand can therefore simply be an i32 index value. Defining a table in wasm So how do we place wasm functions in our table? Just like data sections can be used to initialize regions of linear memory with bytes, elem sections can be used to initialize regions of tables with functions: (module (table 2 funcref) (elem (i32.const 0) $f1 $f2) (func $f1 (result i32) i32.const 42) (func $f2 (result i32) i32.const 13) ... ) In (table 2 funcref), the 2 is the initial size of the table (meaning it will store two references) and funcref declares that the element ...
...r example, in Firefox 79) -- seven new built-in operations are provided for bulk memory operations such as copying and initializing, to allow WebAssembly to model native functions such as memcpy and memmove in a more efficient, performant way. The new operations are: data.drop: Discard the data in an data segment. elem.drop: Discard the data in an element segment. memory.copy: Copy from one region of linear memory to another. memory.fill: Fill a region of linear memory with a given byte value. memory.init: Copy a region from a data segment. table.copy: Copy from one region of a table to another. table.init: Copy a region from an element segment. Note: You can find more information in the Bulk Memory Operations and Conditional Segment Initialization proposal. Reference types The r...
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
ages, I recommend that you always use this declaration to limit access to the parent frame. In certain circumstances, you may want to declare type="content-primary". A browser element with this declaration is treated as a special browser among other XUL documents, such that the window object displaying its web page can be accessed using the window.content property. In Firefox itself, the content region of the active tab is declared as a browser element with type="content-primary". Keyboard shortcuts To implement keyboard shortcuts (pressing a key while holding down modifier keys like Control or Shift.) in a DHTML-based interface, you need a script that will intercept keyboard inputs. In XUL, you can define keyboard shortcuts simply by using the key element, as shown in Listing 19. <key id="...
Drag and Drop - Archive of obsolete content
rvice is responsible for creating drag sessions when a drag starts, and removing the drag session when the drag is complete. The function invokeDragSession should be called to start a drag inside an ondraggesture event handler. Once this function is called, a drag has started. The function invokeDragSession takes four parameters, as described below: invokeDragSession(element, transferableArray, region, actions) element A reference to the element that is being dragged. This can be retrieved by getting the property event.target during the event handler. transferableArray An array of nsITransferable objects, one for each item being dragged. An array is used because you might want to drag several objects at once, such as a set of files. region A region used for feedback indication. This sh...
Menu - Archive of obsolete content
Archive › Mozilla › Jetpack › UI › Menu
platforms, however. xulId string The ID of the menuitem's backing XUL element, exposed for the benefit of advanced developers. Menu bar menus jetpack.menu When you need to expose functionality through a menu but no menu in particular, do The Right Thing by using jetpack.menu, the "Jetpack menu." jetpack.menu is a jetpack.Menu object corresponding to a menu or region within a menu that Jetpack sets aside for features. The actual menu is up to Jetpack, but currently it is the Tools menu. In the future it may be a submenu of the Tools menu, for example. Features meant for wide release should prefer jetpack.menu to the jetpack.menu.* menus because: Firefox's menus are subject to change and in fact will be changing in Firefox 3.7. By exposing functionality thr...
The Joy of XUL - Archive of obsolete content
ogic ("content" consisting of XUL, XBL, and JavaScript), presentation ("skin" consisting of CSS and images), and language-specific text labels ("locale" consisting of DTDs and string bundles in .properties files). The layout and appearance of XUL applications can be altered independently of the application definition and logic. Further, the application can be localized for different languages and regions independently of its logic or presentation. This degree of separation results in applications that are easier to maintain by programmers and readily customized by designers and language translators. The work flow of these interdependent activities is more easily coordinated than with HTML-based web applications, with less impact on the overall stability and quality of the system. ...
Custom toolbar button - Archive of obsolete content
utton uses. The last section specifies details of the button. 7. Create a plain text file named button.css. Copy the following content, making sure that you scroll to get all of it. Paste it into the new file: #custom-button-1, #wrapper-custom-button-1 {list-style-image: url("chrome://custombutton/content/button-1.png");} /* common style for all custom buttons */ .custombutton {-moz-image-region: rect( 0px 24px 24px 0px);} .custombutton:hover {-moz-image-region: rect(24px 24px 48px 0px);} [iconsize="small"] .custombutton {-moz-image-region: rect( 0px 40px 16px 24px);} [iconsize="small"] .custombutton:hover {-moz-image-region: rect(24px 40px 40px 24px);} There is nothing to customize. Save the file. Explanation: This CSS stylesheet specifies how the button is displayed. It ...
Deploying XULRunner - Archive of obsolete content
hrome.manifest to the root directory, and adjust resource paths inside chrome.manifest accordingly. Additionally, your Mac app will not run without a valid Info.plist file. ...
Archived Mozilla and build documentation - Archive of obsolete content
ecifically Block Layout. See the High Level Design document for an overview of the Space Manager, and as an introduction to the classes, structures and algorithms container in this, the Detailed Design Document. Space Manager High Level Design The Space Manager and associated classes and structures are used by Block and Line layout to manage rectangular regions that are occupied and available, for correct handling of floated elements and the elements that flow around them. When elements are floated to the left or right in a layout, they take up space and influence where other elements can be placed. The Space Manager is responsible for keeping track of where space is taken up and where it is available. This information is used by bloc...
2006-12-08 - Archive of obsolete content
Summary: mozilla.dev.l10n - December 8, 2006 Announcements Mozilla sponsored server for l10n The server for Mozilla sponsored server for l10n should be up and running soon. SeaMonkey 1.1b es-ES language and region packs language and region packs for SeaMonkey 1.1b is ready for downloading. New strings in Thunderbird New strings in Thunderbird new bugzilla-staging.mozilla.org a staging server for a new bugzilla upgrade. Discussions None for this week. Meetings None for this week. Authors Paul Yanchun Gu (gpaul) Aditya Nanda Kuswanto(vipers101) ...
2006-10-06 - Archive of obsolete content
leted last night. To help out with testing meet in IRC chat room #qa. Test results will be posted here. Discussions None for this week Meetings Community Test Day - on Friday October 6th, 2006 in IRC chat room #testday there will be a test day focusing on Safe Browsing between 7am to 5pm PDT. Bug Day - in IRC chat room #bugday on Oct 3rd. Reminder from Tracy. Check posting for times in your region. Authors Mark D'Souza (mdsouza) Mohamed Attar (mojo) ...
Browser-side plug-in API - Archive of obsolete content
ract, see the How Plug-ins Work and Overview of Plug-in Structure sections in the introduction. Warning: You must only call these from the main thread; calling them from other threads is not supported and may have unpredictable results. ...
NPEvent - Archive of obsolete content
event passed by NPP_HandleEvent() to a windowless plug-in. This structure is defined as EventRecord, the event type used by Mac OS. On Mac OS, plug-ins receive the same events for both windowed and windowless plug-ins, as follows. Mouse events: Sent if the mouse is within the bounds of the instance. Key events: Sent if the instance has text focus (see below). Update events: Sent if the update region intersects the instance's bounds. Activate events: Sent to all instances in the window being activate or deactivated. Suspend/Resume events: Sent to all instances in all windows. Null events: Sent to all instances in all windows. 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...
NPN_ForceRedraw - Archive of obsolete content
API Summary Asks the plugin host to immediately (synchronously) repaint invalid areas. Note: As of Firefox 4, this function no longer has any effect when running with separate plugin processes. Syntax #include <npapi.h> void NPN_ForceRedraw(NPP instance); Parameters The function has the following parameters: instance Plug-in instance for which the function forces redrawing. 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. Browsers may ignore this request. See also Drawing and event handling NPN_InvalidateRect() NPN_InvalidateRegion() NPP_HandleEvent() NPP ...
NPRect - Archive of obsolete content
top; uint16 left; uint16 bottom; uint16 right; } NPRect; Fields The data structure has the following fields: top, left, bottom, right The top, left, bottom, and right sides of the rectangle. Description NPRect defines the bounding box of the area of the plug-in window to be updated, painted, invalidated, or clipped to. See also NPN_ForceRedraw() NPN_InvalidateRect() NPN_InvalidateRegion() NPRegion NPWindow ...
-ms-flow-from - Archive of obsolete content
The -ms-flow-from CSS property is a Microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source. Initial valuenoneApplies tonon-replaced elementsInheritednoComputed valueas specifiedAnimation typediscrete Syntax Values none Default. No container has been specified. <custom-ident> The name of the region container. Formal syntax [ none | <custom-ident> ]# Specifications Not part of any specification. ...
-ms-flow-into - Archive of obsolete content
The -ms-flow-into CSS property is a Microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source. Initial valuenoneApplies toiframe elementsInheritednoComputed valueas specifiedAnimation typediscrete Syntax Values none Default. No container has been specified. <custom-ident> The name of the region container. Formal syntax [ none | <custom-ident> ]# Specifications Not part of any specification. ...
CSS - Archive of obsolete content
Archive › Web › CSS
d 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 filters applied to an object.-ms-flow-fromThe -ms-flow-from CSS property is a Microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source.-ms-flow-intoThe -ms-flow-into CSS property is a Microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source.-ms-high-contrast-adjustThe -ms-high-contrast-adjust CSS property is a Microsoft extension that gets or sets a value indicating whether to ...
Date.getVarDate() - Archive of obsolete content
required dateObj reference is a Date object. Return Value Returns a VT_DATE value. Remarks The getVarDate() method is used when JavaScript code interacts with COM objects, ActiveX objects, or other objects that accept and return date values in VT_DATE format. These include objects in Visual Basic and Visual Basic Scripting Edition (VBScript). The actual format of the returned value depends on regional settings. Requirements Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, and Internet Explorer 10 standards. Not supported in Windows 8.x Store apps. Applies To: Date Object See Also Date.getDate() Date.parse() ...
Describing microformats in JavaScript - Archive of obsolete content
The type property indicates the type of address represented by the object (work, home, and so forth). Since the plural property is true, multiple types can be specified. This allows an address to be marked as being, for example, a work address for receiving parcels. The street-add...
Efficient animation for web games - Game development
e example, if you start a CSS transition to move something from off-screen so that it is fully visible on-screen, the browser knows that the related content will end up completely visible to the user and can then pre-render that content. When you animate position with JavaScript, the browser cannot easily make that same assumption, and so you might end up causing it to draw only the newly-exposed region of content, which may introduce slow-down. There are signals at the beginning and end of animations that allow you to attach JavaScript callbacks and form a rudimentary form of synchronisation (though there are no guarantees on how promptly these callbacks will happen). Speaking of the assumptions that the browser can make, you should avoid causing it to have to re-layout during animations. In t...
Plug-in Development Overview - Gecko Plugin API Reference
the plug-in must provide information about itself, set the window or other target in which it draws, arrange for redrawing, and handle events. A windowless plug-in can call the following Netscape methods to draw itself: NPN_ForceRedraw: Force a paint message for windowless plug-ins. NPN_InvalidateRect: Invalidate an area in a windowless plug-in before repainting or refreshing. NPN_InvalidateRegion: Invalidate an area in a windowless plug-in before repainting or refreshing. The browser calls these Plug-in methods: NPP_GetValue: Query the plug-in for information. NPP_Print: Request a platform-specific print operation for the instance. NPP_SetValue: Set the browser information. NPP_SetWindow: Set the window in which a plug-in draws. NPP_HandleEvent: Deliver a platform-specific event ...
I18N - MDN Web Docs Glossary: Definitions of Web-related terms
i18n (from "internationalization", a 20-letter word) is the best practice that enables products or services to be readily adapted to any target culture. 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 ...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
many situations: 234 Instance Beginner, CodingScripting, Glossary, JavaScript, NeedsExample, OOP An object created by a constructor is an instance of that constructor. 235 Internationalization Glossary, Internationalization, Reference 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 ...
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 ...
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. The scroll container allows the user to scroll through parts of the overflow region that would otherwise be clipped and hidden from view. The visible part of the scroll container is referred to as the scrollport. ...
What do common web layouts contain? - Learn web development
have over 25 years' experience and we'll give you some common rules of thumb to help you design your site. Even now with the new focus on mobile Web, almost all mainstream webpages are built from these parts: Header Visible at the top of every page on the site. Contains information relevant to all pages (like site name or logo) and an easy-to-use navigation system. Main content The biggest region, containing content unique to the current page. Stuff on the side 1) Information complementing the main content; 2) information shared among a subset of pages; 3) alternative navigation system. In fact, everything not absolutely required by the page's main content. Footer Visible at the bottom of every page on the site. Like the header, contains less prominent global information like legal no...
How do you host your website on Google App Engine? - Learn web development
Drag and drop the sample-app folder into the left pane of the code editor. Run the following in the command line to select your project: gcloud config set project gaesamplesite Then run the following command to go to your app's directory: cd sample-app You are now ready to deploy your application, i.e. upload your app to App Engine: gcloud app deploy Enter a number to choose the region where you want your application located. Enter Y to confirm. Now navigate your browser to your-project-id.appspot.com to see your website online. For example, for the project ID gaesamplesite, go to gaesamplesite.appspot.com. ...
Add a hitmap on top of an image - Learn web development
Here we go over how to set up an image map, and some downsides to consider first. Prerequisites: You should already know how to create a basic HTML document and how to add accessible images to a webpage. Objective: Learn how to make different regions of one image link to different pages. This article discusses client-side image maps only. Do not use server-side image maps, which require the user to have a mouse. Image maps, and their drawbacks When you nest an image inside <a>, the entire image links to one webpage. 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 performan...
Index - Learn web development
se HTML to solve common problems CodingScripting, HTML The following links point to solutions to common everyday problems you'll need to solve with HTML. 253 Add a hitmap on top of an image Graphics, Guide, HTML, Intermediate, Navigation When you nest an image inside <a>, the entire image links to one webpage. An image map, on the other hand, contains several active regions (called "hotspots") that each link to a different resource. 254 Define terms with HTML Beginner, Guide, HTML, Learn When you need a term defined, you probably go straight to a dictionary or glossary. Dictionaries and glossaries formally associate keywords with one or more descriptions, as in this case: 255 Tips for authoring fast-loading HTML pages Advanced, G...
Introduction to client-side frameworks - Learn web development
uts JavaScript first and user experience last. Accessibility on a framework-driven web Let's build on what we said in the previous section, and talk a bit more about accessibility. Making user interfaces accessible always requires some thought and effort, and frameworks can complicate that process. You often have to employ advanced framework APIs to access native browser features like ARIA live regions or focus management. In some cases, framework applications create accessibility barriers that do not exist for traditional websites. The biggest example of this is in client-side routing, as mentioned earlier. With traditional (server-side) routing, navigating the web has predictable results. The browser knows to set focus to the top of the page and assistive technologies will announce the tit...
Accessibility and Mozilla
illa.org/#accessibility. Since this is a worldwide effort, there is always a good chance to find someone to chat with there, day or night.Accessibility information for UI designers and developersWhen you design user interfaces with accessibility in mind, they will work for more people. This page describes a number of design-related aspects to look out for, in no particular order.Accessibility/LiveRegionDevGuideThis page is currently under construction. This developer's guide lays out general guidelines that assistive technology (AT) developers can use in developing live region support. This guide was written from an ATK/AT-SPI point of view as part of the Orca Live Region Support project. However, many of the concepts were also used during the development of FireVox, an AT using IAccessible2.Ac...
MozScrolledAreaChanged
tring The type of event. bubblesRead only Boolean Whether the event normally bubbles or not. cancelableRead only Boolean Whether the event is cancellable or not. viewRead only WindowProxy document.defaultView (window of the document) detailRead only long (float) 0. widthRead only long (int) The width of the visible region of the document. heightRead only long (int) The height of the visible region of the document. xRead only long (int) The X coordinate of the left edge of the visible region of the document. yRead only long (int) The Y coordinate of the top edge of the visible region of the document. Example document.addEventListener("MozScrolledAreaChanged", ...
Script security
ose objects. An example of this scope is web content accessing objects in a chrome-privileged scope. Compartments Compartments are the foundation for Gecko's script security architecture. A compartment is a specific, separate area of memory. In Gecko, there's a separate compartment for every global object. This means that each global object and the objects associated with it live in their own region of memory. Normal content windows are globals, of course, but so are chrome windows, sandboxes, workers, the ContentFrameMessageManager in a frame script, and so on. Gecko guarantees that JavaScript code running in a given compartment is only allowed to access objects in the same compartment. When code from compartment A tries to access an object in compartment B, Gecko gives it a cross-compa...
Mozilla Content Localized in Your Language
d separators (, or .) Date Format What are the date formats for weeks and months are expressed in the following forms: 1)fully spelled out, 2). 2 or 3 letters and 3). single letter. And what is the order of Year, Month and Day? Reference material can be find here Calendar Calendar view: which date is considered the first day of the week, Sunday or Monday? Is Lunar calendar observed? Other regional calendar observed? Time Format How is time expressed in your language? including 0-24 hr expression, hour, minute and second. Percentages How are percentages expressed in your language? Digit groups How are digit groups expressed in your language? Example: 1.23 (decimal separator) or 1,000 (thousand separator) using comma or period. Acronyms Do you translate widely accepted acronyms s...
Translation phase
jects that are localized using the l10n tools above: mozilla.org Every user's first Mozilla experience. addons.mozilla.org (AMO) A portal for all users interested in finding add-ons for their local Mozilla applications. Read the guidelines on localizing AMO, straight from the AMO team. developer.mozilla.org (MDN) Where you are now! Help localize the MDN user interface for everyone in your region. support.mozilla.com (SUMO) A portal for anyone who needs technical support for their Mozilla applications. Help localize the SUMO user interface for everyone in your region. Mozilla Engagement Campaigns Individual campaigns created by Mozilla to attract new contributors. hacks.mozilla.org For everyone interested in the leading-edge stuff that people are doing with Mozilla Firefox and the o...
Localization technical reviews
tors with <em:contributor> tags just after the MOZ_LANGPACK_CONTRIBUTORS section. Make sure that the the text content is wrapped with emptyLines. Leading comments are OK, but watch out for #filter emptyLines #define ... # comment #define ... #unfilter emptyLines In toolkit/defines.inc, the native name of the language is specified, which is used as description for the built language packs. region.properties Though locales might like to specify changes from the beginning, the region.properties files will be reverted to en-US. Changes will be discussed in productization bugs filed for each locale. Search plugins Similar to the region.properties files, the list.txt file should be reverted to en-US and amended accordingly as the search plugin productization bugs are completed. For this i...
Profiling with the Firefox Profiler
e in the "Frames" section of Cleopatra (you may need to a sub-range of samples to make individual composites large enough to be clicked). This will activate the "LayerTree" tab: In this screenshot, Composite #143 has been selected. The layer tree structure can be seen in the left panel. It contains, for each layer, the type of the layer, and various metrics about the layer, such as the visible region and any transforms. In the right panel, a visualization of the layer tree (based entirely on the aforementioned metrics) is shown. Hovering over a layer in the left panel highlights the layer in the right panel. This is useful for identifying what content each layer corresponds to. Here, I'm hovering over the last layer in the layer tree (a PaintedLayerComposite), and a strip at the top of the ri...
Research and prep
e's the basic process: File a bug under Mozilla Localizations>[your_locale] to request updates to your locale's productization preferences. If this is your first localization for a product, the l10n drivers will file this bug as part of the new product localization release process. It is your l10n team's responsibility to perform research and identify the most appropriate web services for your region and present them in your bug as your informed recommendations. If there's no existing collaboration with the site provider and Mozilla, ask for permission from the site provider to include it. Ensure that your suggestions follow these parameters: Search There are typically five search plug-ins listed for Firefox desktop (only four for Firefox mobile): Generic search The default option...
I/O Functions
Memory-mapped I/O functions are currently implemented for Unix, Linux, Mac OS X, and Win32 only. PR_CreateFileMap PR_MemMap PR_MemUnmap PR_CloseFileMap Anonymous Pipe Function PR_CreatePipe Polling Functions This section describes two of the most important polling functions provided by NSPR: ...
Named Shared Memory
The NSPR shared memory API provides a cross-platform named shared-memory interface that is modeled on similar constructs in the Unix and Windows operating systems. Shared Memory Protocol Named Shared Memory Functions Shared Memory Protocol Using Named Shared Memory Functions PR_OpenSharedMemory creates the shared memory segment, if it does not already exist, or opens a connection with the existing shared memory segment if it already exists. ...
PR_CloseFileMap
Closes a file mapping. Syntax #include <prio.h> PRStatus PR_CloseFileMap(PRFileMap *fmap); Parameter The function has the following parameter: fmap The file mapping to be closed. Returns The function returns one of the following values: If the memory region is successfully unmapped, PR_SUCCESS. If the memory region is not successfully unmapped, PR_FAILURE. 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_MemMap
ap *fmap, PRInt64 offset, PRUint32 len); Parameters The function has the following parameters: fmap A pointer to the file-mapping object representing the file to be memory-mapped. offset The starting offset of the section of file to be mapped. The offset must be aligned to whole pages. len Length of the section of the file to be mapped. Returns The starting address of the memory region to which the section of file is mapped. Returns NULL on error. Description PR_MemMap maps a section of the file represented by the file mapping fmap to memory. The section of the file starts at offset and has the length len. When the file-mapping memory region is no longer needed, it should be unmapped with a call to PR_MemUnmap. ...
NSS 3.33 release notes
CertByNicknameOrEmailAddrCX - a variation of existing function CERT_FindCertByNicknameOrEmailAddr that accepts an additional password context parameter. CERT_FindCertByNicknameOrEmailAddrForUsageCX - a variation of existing function CERT_FindCertByNicknameOrEmailAddrForUsage that accepts an additional password context parameter. in secport.h NSS_SecureMemcmpZero - check if a memory region is all zero in constant time. PORT_ZAllocAligned - allocate aligned memory. PORT_ZAllocAlignedOffset - allocate aligned memory for structs. in ssl.h SSL_GetExperimentalAPI - access experimental APIs in libssl. Bugs fixed in NSS 3.33 This Bugzilla query returns all the bugs fixed in NSS 3.33: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Compon...
SpiderMonkey compartments
ample The Firefox browser embeds SpiderMonkey. In Firefox 4 and above, compartments are used and all JavaScript objects that belong to a certain origin (such as "http://mail.google.com/" or "http://www.bank.com/") are placed in a separate compartment. This has some important implications: All objects created by a website reside in the same compartment and hence are located in the same memory region. This improves cache utilization by reducing false sharing of cache lines. False sharing occurs when we are trying to operate on an object and we have to read an entire cache line of data into the CPU cache. In the old model, JavaScript objects could be co-located with arbitrary other JavaScript objects from other origins. Such cross-origin objects are used together very infrequently, which reduc...
Tracing JIT
dobe and Mozilla, and a SpiderMonkey-specific high level component called jstracer. The nanojit component is language agnostic, and contains no knowledge about SpiderMonkey or any other part of the Mozilla codebase. The jstracer component consists of a monitor and a recorder. The monitor watches the executing SpiderMonkey interpreter. When the monitor determines that the interpreter has entered a region of code that would benefit from native compilation, the monitor activates the recorder. The recorder records the activity of the interpreter, using nanojit to build an efficient, native representation of the execution called a fragment. The monitor then calls into the native code stored in the fragment. A schematic diagram of the components of the tracing JIT follows: Generic low level compo...
JS_BeginRequest
Syntax void JS_BeginRequest(JSContext *cx); void JS_EndRequest(JSContext *cx); Name Type Description cx JSContext * The context in which the calling thread intends to call JSAPI functions. 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. This "request model" is necessary to interlock with the global garbage collector. ...
JS_NewUCString
of characters in the text string. Description JS_NewString creates and returns a new string, using the memory starting at buf and ending at buf + length as the character storage. JS_NewUCString is the Unicode version of the function. The character array, buf, must be allocated on the heap using JS_malloc. On success, the JavaScript engine adopts responsibility for memory management of this region. The application must not read, write, or free the buffer. This allows the JavaScript engine to avoid needless data copying. On success, JS_NewString and JS_NewUCString return a pointer to the new string. On error or exception, they return NULL. See Also JS_ConvertValue JS_GetEmptyStringValue JS_GetStringBytes JS_GetStringChars JS_GetStringLength JS_InternString JS_InternUCString JS_Inte...
JS_THREADSAFE
e threads of JavaScript code concurrently as long as no objects or strings are shared between them. We have recently made major changes to this feature. Until recently, sharing objects among threads would mostly work, although scripts could easily make it crash. We have now completely removed that feature. Each thread that uses the JavaScript engine must essentially operate in a totally separate region of memory. 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. A request is a region of code that uses the JSAPI. Requests must be bracketed with calls to JS_BeginRequest() and JS_EndRequest(). JS_BeginRequest(cx); /* ... do JSAPI stuff ... */ JS_EndRequest(cx); A request is always ass...
WebReplayRoadmap
ar in practice have a large effect on how well the associated code can be optimized by JITs. While different JITs optimize code in different ways, for peak performance they all require code to operate on values of consistent types: primitive types, including int32 vs. doubles, or objects that have the same set of properties. If JS performance is a bottleneck, recordings can be analyzed for code regions that are both very hot and have inconsistent types. These are good candidates for optimization, and as with static type integration above, points where unexpected types appear can be seeked to in the debugger for investigation. Memory Analysis (not yet implemented) Analyzing memory usage and leaks in JS can be difficult because there is no (or limited) information about where objects were all...
Gecko Roles
s represent a level of grouping lower than frame windows or documents, but above individual controls. ROLE_CHART Represents a graphical image used to represent data. ROLE_DIALOG Represents a dialog box or message box. ROLE_BORDER Represents a window border. ROLE_GROUPING Logically groups other objects. ROLE_SEPARATOR Used to visually divide a space into two regions, such as a separator menu item or a bar that divides split panes within a window. ROLE_TOOLBAR Represents a toolbar, which is a grouping of controls (push buttons or toggle buttons) that provides easy access to frequently used features. ROLE_STATUSBAR Represents a status bar, which is an area at the bottom of a window that displays information about the current operation, state o...
Gecko states
nsIAccessibleText EXT_STATE_EDITABLE Implements nsIAccessibleEditableText EXT_STATE_ACTIVE This window is currently the active window EXT_STATE_MODAL Must do something with control before leaving it EXT_STATE_MULTI_LINE Edit control that can take multiple lines EXT_STATE_HORIZONTAL Uses horizontal layout EXT_STATE_OPAQUE Indicates this object paints every pixel within its rectangular region EXT_STATE_SINGLE_LINE This text object can only contain 1 line of text EXT_STATE_TRANSIENT EXT_STATE_VERTICAL Especially used for sliders and scrollbars EXT_STATE_STALE Object not dead, but not up-to-date either EXT_STATE_ENABLED A widget that is not unavailable EXT_STATE_SENSITIVE Same as ENABLED for now EXT_STATE_EXPANDABLE If COLLAPSED or EXPANDED ...
Components.utils.Sandbox
You can create a null principal using code like: Cc["@mozilla.org/nullprincipal;1"].createInstance(Ci.nsIPrincipal); From Firefox 37 onwards, you can also specify the null principal by simply passing null as the principal argument. options The constructor accepts an optional parameter. This parameter is an object with the following optional properties: freshZone If true creates a new GC region separate from both the calling context's and the sandbox prototype's region. Addons creating sandboxes whose expected lifetime is tied to that of a content window object will want to use sameZoneAs instead. sameZoneAs A JavaScript object in whose garbage collection region the sandbox should be created in. This helps to improve memory usage by allowing sandboxes to be discarded when that zone...
nsIAccessibleRole
resents a dialog box or message box. It is used for xul:dialog, role="dialog". ROLE_BORDER 19 Represents a window border. ROLE_GROUPING 20 Logically groups other objects. There is not always a parent-child relationship between the grouping object and the objects it contains. It is used for html:textfield, xul:groupbox, role="group". ROLE_SEPARATOR 21 Used to visually divide a space into two regions, such as a separator menu item or a bar that divides split panes within a window. It is used for xul:separator, html:hr, role="separator". ROLE_TOOLBAR 22 Represents a toolbar, which is a grouping of controls (push buttons or toggle buttons) that provides easy access to frequently used features. It is used for xul:toolbar, role="toolbar". ROLE_STATUSBAR 23 Represents a status bar, which is a...
nsIAccessibleStates
ibleEditableText. EXT_STATE_ACTIVE 0x00000010 This window is currently the active window. EXT_STATE_MODAL 0x00000020 Must do something with control before leaving it. EXT_STATE_MULTI_LINE 0x00000040 Edit control that can take multiple lines. EXT_STATE_HORIZONTAL 0x00000080 Uses horizontal layout. EXT_STATE_OPAQUE 0x00000100 Indicates this object paints every pixel within its rectangular region. EXT_STATE_SINGLE_LINE 0x00000200 This text object can only contain 1 line of text. EXT_STATE_TRANSIENT 0x00000400 EXT_STATE_VERTICAL 0x00000800 Especially used for sliders and scrollbars. EXT_STATE_STALE 0x00001000 Object not dead, but not up-to-date either. EXT_STATE_ENABLED 0x00002000 A widget that is not unavailable. EXT_STATE_SENSITIVE 0x00004000 Same as EXT_STATE_ENABLED for n...
nsIContentView
ls. 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. Read only. scrollX float Horizontal scroll offset in chrome-document CSS pixels. 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. Note: When this view becomes inactive, the new content view will have scroll values that are reset to the default. Read only. scrollY float Horizontal scroll offset in chrome-document CSS pixels. Read only. viewportHeight float Height of the viewport in chrome-document CSS ...
nsIDOMGeoPositionAddress
es Attribute Type Description city DOMString The city. Read only. country DOMString The country. Read only. countryCode Obsolete since Gecko 11 DOMString Removed in Firefox 11, since it isn't defined in the specification; use country instead. county DOMString The county. Read only. postalCode DOMString The postal or ZIP code. Read only. premises DOMString The premises. Read only. region DOMString The region. Read only. street DOMString The street of the address. Read only. streetNumber DOMString The street number of the address. Read only. Historical note, which is likely of no interest to most readers: the types of the attributes below all changed from string to DOMString in Gecko 1.9.2 beta 5. See also Using geolocation ...
nsIDOMWindowUtils
els. setDisplayPort() Set the "displayport" to be <xPx, yPx, widthPx, heightPx> in units of CSS pixels, regardless of the size of the enclosing widget/view. This will *not* trigger reflow. <x, y> is relative to the top-left of the CSS viewport. This means that the pixels rendered to the displayport take scrolling into account, for example. The displayport will be used as the window's visible region for the purposes of invalidation and painting. The displayport can approximately be thought of as a "persistent" drawWindow() (albeit with coordinates relative to the CSS viewport): the bounds are remembered by the platform, and layer pixels are retained and updated inside the viewport bounds. It's legal to set a displayport that extends beyond the CSS viewport in any direction (left/right/top/b...
nsILocale
gs are sorted. NSILOCALE_CTYPE - Character classification and case conversion. NSILOCALE_MONETARY - Monetary formatting. NSILOCALE_NUMERIC - Numeric, non-monetary formatting. NSILOCALE_TIME - Date and time formats. NSILOCALE_MESSAGES - Related to fonts, character encodings and so on. Return value The locale code to be used for the given category. A locale code is of the form language[-COUNTRY[-region]], where "language" is an ISO 639 language code (two letter codes preferred over three letter codes when available), "COUNTRY" is an ISO 3166 two letter country code, and "region" is a string of up to 5 letters. See also stringbundle ...
nsIScreen
OTATION_0_DEG 0 0? of rotation (that is, no rotation, or default orientation). ROTATION_90_DEG 1 90? of rotation. ROTATION_180_DEG 2 180? of rotation. ROTATION_270_DEG 3 270? of rotation. 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. For example, this would exclude the area occupied by the menu bar and Dock on Mac OS X. void GetAvailRect( out long left, out long top, out long width, out long height ); Parameters left The left edge of the available screen rectangle. top The top edge of the available screen rectangle. width The width of the a...
nsITreeBoxObject
cused. treeBody nsIDOMElement Readonly: Obtain the treebody content node. This is a node that corresponds to the treechildren tag. rowHeight long Readonly: Obtain the height of a row. rowWidth long Readonly: Obtain the width of a row. horizontalPosition long Readonly: Get the pixel position of the horizontal scrollbar. selectionRegion nsIScriptableRegion Readonly: Return the region for the visible parts of the selection, in device pixels. Methods getFirstVisibleRow() Get the index of the first visible row. long getFirstVisibleRow(); getLastVisibleRow() Get the index of the last visible row. long getLastVisibleRow(); getPageLength() Gets the number of possible visible rows. long getPageLength(); ensureRowIsVis...
LDAP Support
fax FaxNumber facsimiletelephonenumber PagerNumber pager PagerNumber pagerphone CellularNumber mobile CellularNumber cellphone CellularNumber carphone WorkAddress postofficebox WorkAddress streetaddress WorkCity l WorkCity locality WorkState st WorkState region WorkZipCode postalcode WorkZipCode zip WorkCountry countryname JobTitle title Department ou Department orgunit Department department Department departmentnumber Company o Company company WorkCountry countryname _AimScreenName nscpaimscreenname We...
Browser Side Plug-in API - Plugins
ontents of the specified URL; gets notification of the result. NPN_GetValue Allows the plug-in to query the browser for information. NPN_GetValueForURL Provides information to a plug-in which is associated with a given URL, for example the cookies or preferred proxy. NPN_InvalidateRect Invalidates specified drawing area prior to repainting or refreshing a windowless plug-in. NPN_InvalidateRegion Invalidates specified drawing region prior to repainting or refreshing a windowless plug-in. NPN_MemAlloc Allocates memory from the browser's memory space. NPN_MemFlush Requests that the browser free a specified amount of memory. NPN_MemFree Deallocates a block of allocated memory. NPN_NewStream Requests the creation of a new data stream produced by the plug-in and consumed by the browse...
Plug-in Development Overview - Plugins
the plug-in must provide information about itself, set the window or other target in which it draws, arrange for redrawing, and handle events. A windowless plug-in can call the following Netscape methods to draw itself: NPN_ForceRedraw: Force a paint message for windowless plug-ins. NPN_InvalidateRect: Invalidate an area in a windowless plug-in before repainting or refreshing. NPN_InvalidateRegion: Invalidate an area in a windowless plug-in before repainting or refreshing. The browser calls these Plug-in methods: NPP_GetValue: Query the plug-in for information. NPP_Print: Request a platform-specific print operation for the instance. NPP_SetValue: Set the browser information. NPP_SetWindow: Set the window in which a plug-in draws. NPP_HandleEvent: Deliver a platform-specific event ...
Structures - Plugins
t Contains information required by the window field of an NPWindow structure. NPPrint Contains information the plug-in needs to print itself in full-page or embedded mode. NPPrintCallbackStruct Contains information required by the platformPrint field of the NPEmbedPrint during embedded mode printing. NPRect Represents a rectangular area of a page. NPRegion Represents a platform-defined region of a page. NPSavedData Block of instance information saved after the plug-in is deleted; can be returned to the plug-in. NPSetWindowCallbackStruct Contains information about the plug-in's Unix window environment. NPStream Represents a stream of data either produced by the browser and consumed by the plug-in, or produced b...
Allocations - Firefox Developer Tools
mory at a high rate - makes SpiderMonkey more likely to run garbage collection, and more likely to run full, non-incremental garbage collection. If a GC event was caused by allocation pressure, then the sidebar on the right of the marker in the Waterfall view contains a link labeled "Show allocation triggers". If you click this link, the devtools switches to the allocations view, and selects the region of time from the end of the last GC cycle to the start of the one you clicked on. This shows you all the allocations that collectively triggered this GC event: If you're seeing these problems, consider whether you can reduce the number or size of the allocations you're making here. For example: can you allocate memory lazily, when it is actually needed, instead of up front? if allocating m...
AddressErrors - Web APIs
ntents of the string provide a human-readable explanation of the validation failure, and ideally suggestions to correct the problem. recipient A DOMString which, if present, indicates that the recipient property of the PaymentAddress could not be validated. The contents of the string provide a human-readable explanation of the validation failure, and ideally suggestions to correct the problem. region A DOMString which, if present, indicates that the region property of the PaymentAddress could not be validated. The contents of the string provide a human-readable explanation of the validation failure, and ideally suggestions to correct the problem. regionCode A DOMString which, if present, indicates that the regionCode property of the PaymentAddress could not be validated. The contents of th...
CanvasRenderingContext2D.drawImage() - Web APIs
4, 21, 20, 87, 104); }); Result Understanding source element size The drawImage() method uses the source element's intrinsic size in CSS pixels when drawing. For example, if you load an Image and specify the optional size parameters in its constructor, you will have to use the naturalWidth and naturalHeight properties of the created instance to properly calculate things like crop and scale regions, rather than element.width and element.height. The same goes for videoWidth and videoHeight if the element is a <video> element, and so on. HTML <canvas id="canvas"></canvas> JavaScript const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); const image = new Image(60, 45); // Using optional size for image image.onload = drawImageActualSize; // Draw when image...
CanvasRenderingContext2D.drawWindow() - Web APIs
The contents of the window's viewport are rendered, ignoring viewport clipping and scrolling. This API cannot be used by Web content. It is synchronous, and as such can't be compatible with Fission. If you're using it from an extension, you should switch to tabs.captureTab. If you're writing chrome code, you probably want WindowGlobalParent.drawSnapshot from the parent process. Syntax void ctx.drawWindow(window, x, y, w, h, bgColor [, flags]); Parameters window The Window to render. ...
CanvasRenderingContext2D.save() - Web APIs
The current dash list. ...
Compositing and clipping - Web APIs
You use clip() instead of closePath() to close a path and turn it into a clipping path instead of stroking or filling the path. By default the <canvas> element has a clipping path that's the exact same size as the canvas itself. In other words, no clipping occurs. A clip example In this example, we'll use a circular clipping path to restrict the drawing of a set of random stars to a particular region. function draw() { var ctx = document.getElementById('canvas').getContext('2d'); ctx.fillRect(0, 0, 150, 150); ctx.translate(75, 75); // Create a circular clipping path ctx.beginPath(); ctx.arc(0, 0, 60, 0, Math.PI * 2, true); ctx.clip(); // draw background var lingrad = ctx.createLinearGradient(0, -75, 0, 75); lingrad.addColorStop(0, '#232256'); lingrad.addColorStop(1, '...
Canvas tutorial - Web APIs
). ...
HTMLAreaElement - Web APIs
ments those from HTMLHyperlinkElementUtils. Element.accessKey Is a DOMString containing a single character that switches input focus to the control. HTMLAreaElement.alt Is a DOMString that reflects the alt HTML attribute, containing alternative text for the element. HTMLAreaElement.coords Is a DOMString that reflects the coords HTML attribute, containing coordinates to define the hot-spot region. HTMLAreaElement.download Is a DOMString indicating that the linked resource is intended to be downloaded rather than displayed in the browser. The value represent the proposed name of the file. If the name is not a valid filename of the underlying OS, browser will adapt it. HTMLHyperlinkElementUtils.hash Is a USVString containing the fragment identifier (including the leading hash mark (#)...
Timing element visibility with the Intersection Observer API - Web APIs
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. At the top is the site's header region, contained within a <header> block. Below that, we define the site's sidebar as a list of links within an <aside> block. Finally comes the main body. We start with an empty <main> element here. This box will be populated using script later. Styling the site with CSS With the structure of the site defined, we turn to the styling for the site. Let's look at the style for each component of the pa...
Key Values - Web APIs
ic keys from 0 to 9 (encoded as "0" through "9"), some multimedia keyboards include additional number keys for higher numbers. The 10 key, if present, generates events with the key value of "0". KeyboardEvent.key Value Description Virtual Keycode Windows Mac Linux Android "Decimal" [1] The decimal point key (typically . or , depending on the region). In newer browsers, this value to simply be the character generated by the decimal key (one of those two characters). [1] VK_DECIMAL (0x6E) kVK_ANSI_KeypadDecimal (0x41) GDK_KEY_KP_Decimal (0xFFAE) KEYCODE_NUMPAD_DOT (158) "Key11" The 11 key found on certain media numeric keypads. "Key12" The 12 key found on certain media numeric...
MouseEvent() - Web APIs
usually the left button) 2 Secondary button pressed (usually the right button) 4 Auxiliary button pressed (usually the middle button) "relatedTarget", optional and defaulting to null, of type EventTarget, that is the element just left (in case of a mouseenter or mouseover) or is entering (in case of a mouseout or mouseleave). "region", optional and defaulting to null, of type DOMString, is the id of the hit region affected by the event. The absence of any hit region is affected, is represented by the null value. In some implementations, passing anything other than a number for the screen and client fields will throw a TypeError. The MouseEventInit dictionary also accepts fields from UIEventInit and from EventInit dict...
MouseEvent - Web APIs
position of the padding edge of the target node. MouseEvent.offsetY Read only The Y coordinate of the mouse pointer relative to the position of the padding edge of the target node. MouseEvent.pageX Read only The X coordinate of the mouse pointer relative to the whole document. MouseEvent.pageY Read only The Y coordinate of the mouse pointer relative to the whole document. MouseEvent.region Read only Returns the id of the hit region affected by the event. If no hit region is affected, null is returned. MouseEvent.relatedTarget Read only The secondary target for the event, if there is one. MouseEvent.screenX Read only The X coordinate of the mouse pointer in global (screen) coordinates. MouseEvent.screenY Read only The Y coordinate of the mouse pointer in global (scree...
PaymentAddress - Web APIs
ifying the telephone number of the recipient or contact person. PaymentAddress.postalCode Read only A DOMString specifying a code used by a jurisdiction for mail routing, for example, the ZIP code in the United States or the PIN code in India. PaymentAddress.recipient Read only A DOMString giving the name of the recipient, purchaser, or contact person at the payment address. PaymentAddress.region Read only A DOMString containing the top level administrative subdivision of the country, for example a state, province, oblast, or prefecture. PaymentAddress.regionCode Read only A DOMString specifying the region of the address, represented as a "code element" of an ISO3166-2 country subdivision name (e.g. "QLD" for Queensland, Australia, "CA" for California, and so on). PaymentAddress.sor...
PaymentDetailsUpdate.error - Web APIs
ng are true: The PaymentRequest specifies using its requestShipping property that shipping information is required. The PaymentDetailsUpdate object specifies no valid shipping options in its shippingOptions list. 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. ...
PaymentRequest.shippingAddress - Web APIs
ing of paymentResponse exerpted for brevity. ...
PaymentResponse.shippingAddress - Web APIs
mentResponse exerpted for the same of brevity. ...
RTCPeerConnection.setConfiguration() - Web APIs
onnection was instantiated without specifying any ICE servers. 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. Renegotiation of the connection is needed, and a different set of ICE servers needs to be used for some reason. Perhaps the user has moved into a new region, so using new regional ICE servers is necessary, for example. In this situation, one might call setConfiguration() to switch to new regional ICE servers, then initiate an ICE restart. You cannot change the identity information for a connection once it's already been set. Syntax RTCPeerConnection.setConfiguration(configuration); Parameters configuration An RTCConfiguration object which ...
ReadableStreamBYOBRequest.view - Web APIs
The view getter property of the ReadableStreamBYOBRequest interface returns the current view. Syntax var view = readableStreamBYOBRequestInstance.view; Value A typed array representing the destination region to which the controller can write generated data. Examples TBD. Specifications Specification Status Comment StreamsThe definition of 'view' in that specification. Living Standard Initial definition. ...
ReadableStreamBYOBRequest - Web APIs
Constructor None. ReadableStreamBYOBRequest instance is created automatically by ReadableByteStreamController as needed. Properties ReadableStreamBYOBRequest.view Read only Returns the current view. ...
SVGSVGElement - Web APIs
s suspendRedraw() call. SVGSVGElement.unsuspendRedrawAll() Cancels all currently active suspendRedraw() method calls. This method is most useful at the very end of a set of SVG DOM calls to ensure that all pending suspendRedraw() method calls have been cancelled. SVGSVGElement.forceRedraw() In rendering environments supporting interactivity, forces the user agent to immediately redraw all regions of the viewport that require updating. SVGSVGElement.pauseAnimations() Suspends (i.e., pauses) all currently running animations that are defined within the SVG document fragment corresponding to this <svg> element, causing the animation clock corresponding to this document fragment to stand still until it is unpaused. SVGSVGElement.unpauseAnimations() Unsuspends (i.e., unpauses) currently ru...
Using the Screen Capture API - Web APIs
over text from the previous attempt to connect, startCapture() calls getDisplayMedia(), passing into it the constraints object defined by displayMediaOptions. Using await, the following line of code does not get executed until after the promise returned by getDisplayMedia() resolves. Upon resolution, the promise returns a MediaStream, which will stream the contents of the screen, window, or other region selected by the user. The stream is connected to the <video> element by storing the returned MediaStream into the element's srcObject. The dumpOptionsInfo() function--which we will look at in a moment--dumps information about the stream to the log box for educational purposes. If any of that fails, the catch() clause outputs an error message to the log box. Stopping display capture The stopC...
WebGLRenderingContext.texSubImage2D() - Web APIs
ture. gl.TEXTURE_CUBE_MAP_POSITIVE_Z: Positive Z face for a cube-mapped texture. gl.TEXTURE_CUBE_MAP_NEGATIVE_Z: Negative Z face for a cube-mapped texture. level A GLint specifying the level of detail. Level 0 is the base image level and level n is the nth mipmap reduction level. xoffset A GLint specifying the lower left texel x coordinate of a width-wide by height-wide rectangular subregion of the texture array. yoffset A GLint specifying the lower left texel y coordinate of a width-wide by height-wide rectangular subregion of the texture array.. width A GLsizei specifying the width of the texture in texels. height A GLsizei specifying the height of the texture in texels. format A GLenum specifying the format of the texel data. Possible values: gl.ALPHA: Discards the red...
Basic scissoring - Web APIs
Clearing the drawing buffer when scissoring applies This is a simple demonstration of a rendering with scissor(). Although the clear() drawing command writes the clear color (set by clearColor()) to all pixels in the drawing buffer, scissor() defines a mask that only allows pixels inside the specified rectangular area to be updated. This is a good opportunity to talk about the difference between pixels and fragments. ...
WebGL model view projection - Web APIs
s) projects 3D points onto a 2D drawing surface: // Make sure to read the transformations in reverse order gl_Position = projection * model * vec4(position, 1.0); The results View on JSFiddle The viewing frustum Before we move on to covering how to compute a perspective projection matrix, we need to introduce the concept of the viewing frustum (also known as the view frustum). This is the region of space whose contents are visible to the user at the current time. It's the 3D region of space defined by the field of view and the distances specified as the nearest and farthest content that should be rendered. While rendering, we need to determine which polygons need to be rendered in order to represent the scene. This is what the viewing frustum defines. But what's a frustum in the first p...
XRSpace - Web APIs
Web › API › XRSpace
to that space's origin. Note: The XRSpace interface is never used directly; instead, all spaces are created using one of the interfaces based on XRSpace. At this time, those are XRReferenceSpace and XRBoundedReferenceSpace. Interfaces based on XRSpace Below is a list of interfaces based on the XRSpace interface. XRBoundedReferenceSpace Represents a reference space which may move within a region of space whose borders are defined by an array of points laid out in clockwise order along the floor to define the passable region of the space. 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 th...
XRView - Web APIs
Web › API › XRView
urrent frame are obtained by calling the XRFrame object's getViewerPose() method to get the XRViewerPose representing (in essence) the position of the viewer's head. That object's views property is a list of all of the XRView objects representing the viewpoints which can be used to construct the scene for presentation to the user. It's possible to have XRView objects which represent overlapping regions as well as entirely disparate regions; in a game, you might have views that can be presented to observe a remote site using a security camera or other device, for example. In other words, don't assume there are exactly two views on a given viewer; there can be as few as one (such as when rendering the scene in inline mode, and potentially many (especially if the field of view is very large). The...
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. ...
Web APIs
Web › API
lker TypeInfo U UIEvent ULongRange URL URLSearchParams URLUtilsReadOnly USB USBAlternateInterface USBConfiguration USBDevice USBEndpoint USBInTransferResult USBInterface USBIsochronousInTransferPacket USBIsochronousInTransferResult USBIsochronousOutTransferPacket USBIsochronousOutTransferResult USBOutTransferResult USVString UserDataHandler UserProximityEvent V VTTCue VTTRegion ValidityState VideoConfiguration VideoPlaybackQuality VideoTrack VideoTrackList VisualViewport W 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_dept...
ARIA guides - Accessibility
Accessible Rich Internet Applications (ARIA) defines ways to make the Web more accessible to people with disabilities. A few guidelines to follow that ensure better accessibility, like using drag and drop for placement of the widgets. Error Handling in Forms Labeling widgets Labeling Composite Widgets and Regions Managing Focus in Composite Widgets (aria-activedescendant vs roving tabindex) Using Landmark Roles Handling Dynamic Updates & Live Regions Virtual vs. Non Virtual Mode in AT Products Using Drag & Drop Notifying users of Non-ARIA Screen Readers Fixing structure with presentation role Hiding Layout tables Managing Modal and Non Modal Dialogs Using ARIA with HTML5 How to test ARIA ARIA on Mobile Devices ...
Using the alert role - Accessibility
ed 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. Dynamic changes that are less urgent should use a less aggressive method, such as aria-live="polite" or other live region roles. Possible effects on user agents and assistive technology When the alert role is added to an element, or such an element becomes visible, the user agent should do the following: Expose the element as having an alert role in the operating system's accessibility API. Fire an accessible alert event using the operating system's accessibility API if it supports it. Assistive technology ...
Using the aria-describedby attribute - Accessibility
is used to establish a relationship between widgets or groups and text that described them. This is very similar to aria-labelledby: a label describes the essence of an object, while a description provides more information that the user might need. The aria-describedby attribute is not used only for form elements; it is also used to associate static text with widgets, groups of elements, panes, regions that have a heading, definitions, and more. 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. Value a space-separated list of element IDs Possible effects on user agents and assistive technology Note: Opinions may ...
Using the progressbar role - Accessibility
indicate this progress using the aria-valuenow, aria-valuemin, and aria-valuemax attributes. If the progress value is indeterminate, the developer should omit the aria-valuenow attribute. As the task progresses, the aria-valuenow value has to be updated dynamically to indicate this progress to assistive technology products. If the progressbar is describing the loading progress of a particular region of a page, the author SHOULD use aria-describedby to point to the status, and set the aria-busy attribute to true on the region until it is finished loading. It is not possible for the user to alter the value of a progressbar because it is always readonly. Note: Assistive technologies generally will render the value of aria-valuenow as a percent of the range between the value of aria-valuemin an...
ARIA: alert role - Accessibility
The alert role can be used to tell the user an element has been dynamically updated. Screen readers will instantly start reading out the updated content when the role is added. If the user is expected to close the alert, then the alertdialog role should be used instead. 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. Alerts are assertive live regions. Setting role="alert" is equivalent to setting aria-live="assertive" and aria-atomic="true". They don't receive focus, and therefore focus does not need to be managed...
ARIA: Main role - Accessibility
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. Subsections of this document could discuss their history, the different types, regions where they grow, etc. Description The main role is a navigational landmark role identifying the main content of a document. Landmarks can be used by assistive technology to quickly identify and navigate to large sections of the document. By classifying and labeling sections of a page, structural information conveyed visually through layout can be represented programmatically. Screen readers us...
ARIA - Accessibility
accessibility ARIA is not just for dynamic content! Learn how to improve accessibility of HTML forms using additional ARIA attributes. ARIA for Scripted Widgets Writing keyboard-navigable JavaScript widgets Built-in elements like <input>, <button> etc have built-in keyboard accessibility. If you 'fake' these with <div>s and ARIA, you must ensure your widgets are keyboard accessible. Live regions Live regions provide suggestions to screen readers about how to handle changes to the contents of a page. Using ARIA Live Regions to announce content changes A quick summary of live regions, by the makers of JAWS screen reader software. Live regions are also supported by NVDA with Firefox, and VoiceOver with Safari. References ARIA Roles Reference pages covering all the WAI-ARIA roles...
An overview of accessible web applications and widgets - Accessibility
" mode by making the element writable and removing the role attribute in "edit" mode (since <input> elements have their own role semantics). Do not do this. Instead, implement the "view" mode using a different element altogether, such as a <div> or <span> with a role of button, and the << edit >> mode using a text <input> element. Asynchronous content changes Under construction. See also Live Regions Keyboard navigation Often times developers overlook support for the keyboard when they create custom widgets. To be accessible to a variety of users, all features of a web application or widget should also be controllable with the keyboard, without requiring a mouse. In practice, this usually involves following the conventions supported by similar widgets on the desktop, taking full advantage ...
Perceivable - Accessibility
ential. Understanding Orientation 1.3.5 Identify Input Purpose (AA) added in 2.1 Follow the list of 53 input fields to programmatically identify the purpose of a field. Understanding Identify Input Purpose 1.3.6 Identify Purpose (AAA) added in 2.1 In content implemented using markup languages, the purpose of user interface components, icons, and regions can be programmatically determined. Understanding Identify Purpose Note: Also see the WCAG description for Guideline 1.3: Adaptable: Create content that can be presented in different ways without losing information or structure. Guideline 1.4: Make it easier for users to see and hear content including separating foreground from background This guideline relates to making sure core ...
Understandable - Accessibility
m control that the error relates to. It is advisable to implement client-side error detection and handling, via HTML5 form validation features, and/or JavaScript, whatever is best for your situation. When an error is detected, an intuitive error message should be shown next to the form input that is at fault to help the user correct their inputs. For screenreader users, you can use aria live regions to alert the user to a change on the page. Note: Server-side validation should *always* be used alongside client-side validation. Client-side validation is too easy to turn off or otherwise get around, so it can't be relied on alone. See Form data validation for comprehensive validation information, and WAI-ARIA: Dynamic content updates for information on live regions. ...
-moz-image-rect - CSS: Cascading Style Sheets
om edge, specified as an <integer> or <percentage>, of the sub-image within the specified image. left The left edge, specified as an <integer> or <percentage>, of the sub-image within the specified image. Description This property allows you to, for example, use different parts of one larger image as backgrounds in different parts of your content. This works very similarly to the -moz-image-region property, which is used with the list-style-image property to use parts of an image as the bullets in lists. However, this can be used for any CSS background. The syntax for the rectangle is similar to the rect() function generating a <<shape>()> CSS type. All four values are relative to the upper left corner of the image. Examples This example loads an image and uses it in four segments to dr...
Handling content breaks in multicol - CSS: Cascading Style Sheets
ver this. There are various places we might want to control our breaks: Breaks inside boxes, for example inside a figure element. Breaks before and after boxes, which would include our heading example above. Breaks between lines. Breaks inside boxes To control breaks inside boxes use the break-inside property. This property takes values of: auto avoid avoid-page avoid-column avoid-region In the example below, we have applied break-inside to the figure element to prevent the caption from becoming separated from the image. Breaks before and after boxes The break-before and break-after properties are used to control breaks before and after elements. They take the following values when in a multicol context: auto avoid avoid-column column In this next example, we are fo...
CSS Fragmentation - CSS: Cascading Style Sheets
Fragmentation occurs when an inline box wraps onto multiple lines. It also occurs when a block spans more than one column inside a column layout container, or spans a page break when printed. Each piece of the rendering for the element is called a fragment. ...
CSS Grid Layout - CSS: Cascading Style Sheets
Like tables, grid layout enables an author to align elements into columns and rows. However, many more layouts are either possible or easier with CSS grid than they were with tables. For example, a grid container's child elements could position themselves so they actually overlap and layer, similar to CSS positioned elements. Basic example The example below shows a three-column track grid with new rows created at a minimum of 100 pixels and a maximum of auto. Items have been placed onto the grid using line-based placement. ...
CSS Overflow - CSS: Cascading Style Sheets
to scrollable overflow handling in visual media. In CSS overflow happens when the content of a box extends past one or more of the box's edges. Ink overflow and scrollable overflow There are two types of overflow that you might encounter in CSS. The first is described as ink overflow. This is the overflow of painting effects which do not affect layout or otherwise extend the scrollable overflow region, such as box shadows, border images, text decoration, overhanging glyphs, outlines, etc. The overflow that we sometimes need to manage in CSS is described as scrollable overflow. This is the content appearing outside of the box for which scrolling mechanisms need to be provided. The overflow properties are how we can control what happens when content overflows a box. Basic example The followi...
Microsoft CSS extensions - CSS: Cascading Style Sheets
s-wrap-flow -ms-wrap-margin -ms-wrap-through zoom Pseudo-elements ::-ms-browse ::-ms-check ::-ms-clear ::-ms-expand ::-ms-fill ::-ms-fill-lower ::-ms-fill-upper ::-ms-reveal ::-ms-thumb ::-ms-ticks-after ::-ms-ticks-before ::-ms-tooltip ::-ms-track ::-ms-value Media features -ms-high-contrast CSS-related DOM APIs msContentZoomFactor msGetPropertyEnabled msGetRegionContent MSRangeCollection msRegionOverflow ...
Mozilla CSS extensions - CSS: Cascading Style Sheets
not on a standards track. Some of them apply only to XUL elements. ...
Pseudo-elements - CSS: Cascading Style Sheets
. Note: As a rule, double colons (::) should be used instead of a single colon (:). This distinguishes pseudo-classes from pseudo-elements. However, since this distinction was not present in older versions of the W3C spec, most browsers support both syntaxes for the original pseudo-elements. ...
CSS reference - CSS: Cascading Style Sheets
Web › CSS › Reference
aret-colorch@character-variantcharacter-variant()@charset:checkedcircle()clamp()clearclipclip-pathcm<color>colorcolor-adjustcolumn-countcolumn-fillcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-spancolumn-widthcolumnsconic-gradient()containcontentcontrast()<counter>counter-incrementcounter-resetcounter-set@counter-stylecounters()cross-fade()cubic-bezier()::cue::cue-regioncursor<custom-ident>D:defaultdeg<dimension>:dirdirection:disableddisplay<display-box><display-inside><display-internal><display-legacy><display-listitem><display-outside>dpcmdpidppxdrop-shadow()Eelement()ellipse()em:emptyempty-cells:enabledenv()exFfallback (@counter-style)filter<filter-function>:first:first-child::first-letter (:first-letter)::first-line (:first-line):first-of-typefit-content()<fl...
background-clip - CSS: Cascading Style Sheets
box, padding box, or content box. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. If the element has no background-image or background-color, this property will only have a visual effect when the border has transparent regions or partially opaque regions (due to border-style or border-image); otherwise, the border masks the difference. Note: Because the root element has a different background painting area, the background-clip property has no effect when specified on it. See "The backgrounds of special elements." Note: For documents whose root element is an HTML element: if the computed value of background-image ...
border-image-source - CSS: Cascading Style Sheets
he border-image-source CSS property sets the source image used to create an element's border image. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. The border-image-slice property is used to divide the source image into regions, which are then dynamically applied to the final border image. Syntax /* Keyword value */ border-image-source: none; /* <image> values */ border-image-source: url(image.jpg); border-image-source: linear-gradient(to top, red, yellow); /* Global values */ border-image-source: inherit; border-image-source: initial; border-image-source: unset; Values none No border image is used. The appea...
clip-path - CSS: Cascading Style Sheets
Web › CSS › clip-path
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
mask-border-source - CSS: Cascading Style Sheets
Syntax /* Keyword value */ mask-border-source: none; /* <image> values */ mask-border-source: url(image.jpg); mask-border-source: linear-gradient(to top, red, yellow); /* Global values */ mask-border-source: inherit; mask-border-source: initial; mask-border-source: unset; Values none No mask border is used. <image> Image reference to use for the mask border. ...
mask-composite - CSS: Cascading Style Sheets
eparated by commas. Values For the composition the current mask layer is referred to as source, while all layers below it are referred to as destination. add The source is placed over the destination. subtract The source is placed, where it falls outside of the destination. intersect The parts of source that overlap the destination, replace the destination. exclude The non-overlapping regions of source and destination are combined. Formal definition Initial valueaddApplies toall elements; In SVG, it applies to container elements excluding the defs element and all graphics elementsInheritednoComputed valueas specifiedAnimation typediscrete Formal syntax <compositing-operator>#where <compositing-operator> = add | subtract | intersect | exclude Examples Compositing mask layers wi...
scroll-padding-block - CSS: Cascading Style Sheets
scroll-padding-block shorthand property sets the scroll padding of an element in the block dimension. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport. Constituent properties This property is a shorthand for the f...
scroll-padding-inline - CSS: Cascading Style Sheets
croll-padding-inline shorthand property sets the scroll padding of an element in the inline dimension. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. Constituent properties This property is a shorthand for the ...
scroll-padding-left - CSS: Cascading Style Sheets
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
scroll-padding-right - CSS: Cascading Style Sheets
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
scroll-padding-top - CSS: Cascading Style Sheets
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
scroll-padding - CSS: Cascading Style Sheets
g on all sides of an element at once, much like the padding property does for padding on an element. The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. The scroll-padding-* properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars), or simply to put more breathing room between a targeted element and the edges of the scrollport. Constituent properties This property is a shorthand for the ...
touch-action - CSS: Cascading Style Sheets
/* Keyword values */ touch-action: auto; touch-action: none; touch-action: pan-x; touch-action: pan-left; touch-action: pan-right; touch-action: pan-y; touch-action: pan-up; touch-action: pan-down; touch-action: pinch-zoom; touch-action: manipulation; /* Global values */ touch-action: inherit; touch-action: initial; touch-action: unset; By default, panning (scrolling) and pinching gestures are handled exclusively by the browser. An application using Pointer events will receive a pointercancel event when the browser starts handling a touch gesture. ...
Block formatting context - Developer guides
A block formatting context is created by at least one of the following: The root element of the document (<html>). Floats (elements where float isn't none). Absolutely positioned elements (elements where position is absolute or fixed). Inline-blocks (elements with display: inline-block). Table cells (elements with display: table-cell, which is the default for HTML table cells). Table captions (elements with display: table-caption, which is the default for HTML table captions). ...
Rich-Text Editing in Mozilla - Developer guides
opy and paste are available, all others need to be implemented by the website. Similarly, setting contentEditable to "true" allows you to make individual elements of a document editable. Executing Commands When an HTML document has been switched to designMode, the document object exposes the document.execCommand method which allows one to run commands to manipulate the contents of the editable region. Most commands affect the document's selection (bold, italics, etc), while others insert new elements (adding a link) or affect an entire line (indenting). When using contentEditable, calling execCommand will affect the currently active editable element. Internet Explorer Differences One major difference between Mozilla and Internet Explorer that affects designMode is the generated code in the ...
Making content editable - Developer guides
Here's a simple example which creates a <div> element whose contents the user can edit. <div contenteditable="true"> This text can be edited by the user. </div> Here's the above HTML in action: Executing commands When an HTML element has contenteditable set to true, the document.execCommand() method is made available. This lets you run commands to manipulate the contents of the editable region. Most commands affect the document's selection by, for example, applying a style to the text (bold, italics, etc), while others insert new elements (like adding a link) or affect an entire line (indenting). When using contentEditable, calling execCommand() will affect the currently active editable element. Differences in markup generation Use of contenteditable across different browsers has bee...
Index - Developer guides
Web › Guide › Index
3 Community AJAX If you know of useful mailing lists, newsgroups, forums, or other communities related to AJAX, please link to them here. 4 Getting Started AJAX, API, Advanced, JavaScript, WebMechanics, XMLHttpRequest This article guides you through the AJAX basics and gives you some simple hands-on examples to get you started. 5 WAI ARIA Live Regions/API Support AJAX, Accessibility Firefox 3 contains important improvements to the way the Mozilla engine exposes live changes in a document. 6 Audio and Video Delivery Audio, Guide, HTML, HTML5, Media, Video Whether we are dealing with pre-recorded audio files or live streams, the mechanism for making them available through the browser's <audio> and <video> elements...
HTML attribute reference - HTML: Hypertext Markup Language
obal attribute Indicates whether the element's content is editable. contextmenu Global attribute Defines the ID of a <menu> element which will serve as the element's context menu. controls <audio>, <video> Indicates whether the browser should show playback controls to the user. coords <area> A set of values specifying the coordinates of the hot-spot region. crossorigin <audio>, <img>, <link>, <script>, <video> How the element handles cross-origin requests csp <iframe> Specifies the Content Security Policy that an embedded document must agree to enforce upon itself. data <object> Specifies the URL of the resource. data-* Global attribute Lets you attach custom attributes to an HTML elemen...
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
vigation items --> </nav> </footer> In this example, screen reading technology would announce that there are two <nav> sections, one called "Primary navigation" and one called "Footer navigation". If labels were not provided, the person using screen reading software may have to investigate each nav element's contents to determine their purpose. Using the aria-labelledby attribute Labeling Regions o Page Structure o W3C WAI Web Accessibility Tutorials Specifications Specification Status Comment HTML Living StandardThe definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification. Living Standard HTML5The definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification. Recommendation HTML 4.01 Specif...
<a>: The Anchor element - HTML: Hypertext Markup Language
Web › HTML › Element › a
ete since HTML5 Was required to define a possible target location in a page. In HTML 4.01, id and name could both be used on <a>, as long as they had identical values. Note: Use the global attribute id instead. revObsolete since HTML5 Specified a reverse link; the opposite of the rel attribute. Deprecated for being very confusing. shapeObsolete since HTML5 The shape of the hyperlink's region in an image map. Note: Use the <area> element for image maps instead. Properties Content categories Flow content, phrasing content, interactive content, palpable content. Permitted content Transparent, containing either flow content (excluding interactive content) or phrasing content. Tag omission None, both the starting and ending tag are mandatory. ...
<article>: The Article Contents element - HTML: Hypertext Markup Language
Web › HTML › Element › article
Permitted content Flow content. Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts flow content. Note that an <article> element must not be a descendant of an <address> element. Implicit ARIA role article Permitted ARIA roles application, document, feed, main, none, presentation, region DOM interface HTMLElement Attributes This element only includes the global attributes. Usage notes Each <article> should be identified, typically by including a heading (<h1>-<h6> element) as a child of the <article> element. When an <article> element is nested, the inner element represents an article related to the outer element. For example, the comments of a blog post ...
<aside>: The Aside element - HTML: Hypertext Markup Language
Web › HTML › Element › aside
palpable content. Permitted content Flow content. Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts flow content. Note that an <aside> element must not be a descendant of an <address> element. Implicit ARIA role complementary Permitted ARIA roles feed, none, note, presentation, region, search DOM interface HTMLElement Attributes This element only includes the global attributes. Usage notes Do not use the <aside> element to tag parenthesized text, as this kind of text is considered part of the main flow. Examples Using <aside> This example uses <aside> to mark up a paragraph in an article. The paragraph is only indirectly related to the main article ...
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
Web › HTML › Element › canvas
10, 10, 100, 100); Result Accessibility concerns Alternative content 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 as semantic HTML is. In general, you should avoid using canvas in an accessible website or app. The following guides can help to make it more accessible. MDN Hit regions and accessability Canvas accessibility use cases Canvas element accessibility issues HTML5 Canvas Accessibility in Firefox 13 - by Steve Faulkner Best practices for interactive canvas elements Specifications Specification Status Comment HTML Living StandardThe definition of '<canvas>' in that specification. Living Standard HTML5The definition of...
<footer> - HTML: Hypertext Markup Language
Web › HTML › Element › footer
g are mandatory. Permitted parents Any element that accepts flow content. Note that a <footer> element must not be a descendant of an <address>, <header> or another <footer> element. Implicit ARIA role contentinfo, or no corresponding role if a descendant of an article, aside, main, nav or section element, or an element with role=article, complementary, main, navigation or region Permitted ARIA roles group, presentation or none DOM interface HTMLElement Attributes This element only includes the global attributes. Usage notes Enclose information about the author in an <address> element that can be included into the <footer> element. The <footer> element is not sectioning content and therefore doesn't introduce a new section in the outli...
<header> - HTML: Hypertext Markup Language
Web › HTML › Element › header
ng tag are mandatory. Permitted parents Any element that accepts flow content. Note that a <header> element must not be a descendant of an <address>, <footer> or another <header> element. Implicit ARIA role banner, or no corresponding role if a descendant of an article, aside, main, nav or section element, or an element with role=article, complementary, main, navigation or region Permitted ARIA roles group, presentation or none DOM interface HTMLElement Usage notes The <header> element is not sectioning content and therefore does not introduce a new section in the outline. That said, a <header> element is intended to usually contain the surrounding section's heading (an h1-h6 element), but this is not required. Historical Usage Although t...
<output>: The Output element - HTML: Hypertext Markup Language
Web › HTML › Element › output
is displayed in the <output> element each time the value of any of the controls changes. <form oninput="result.value=parseInt(a.value)+parseInt(b.value)"> <input type="range" id="b" name="b" value="50" /> + <input type="number" id="a" name="a" value="10" /> = <output name="result" for="a b">60</output> </form> Accessibility Concerns Many browsers implement this element as an aria-live region. Assistive technology will thereby announce the results of UI interactions posted inside it without requiring that focus is switched away from the controls that produce those results. Specifications Specification Status Comment HTML Living StandardThe definition of '<output>' in that specification. Living Standard HTML5The definition of '<output>' in ...
<section>: The Generic Section element - HTML: Hypertext Markup Language
Web › HTML › Element › section
ter choice. Content categories Flow content, Sectioning content, palpable content. Permitted content Flow content. Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts flow content. Note that a <section> element must not be a descendant of an <address> element. Implicit ARIA role region if the element has an accessible name, otherwise no corresponding role Permitted ARIA roles alert, alertdialog, application, banner, complementary, contentinfo, dialog, document, feed, log, main, marquee, navigation, none, note, presentation, search, status, tabpanel DOM interface HTMLElement Attributes This element only includes the global attributes. Usage notes...
<video>: The Video Embed element - HTML: Hypertext Markup Language
Web › HTML › Element › video
ns allow people who are experiencing hearing loss to understand a video's audio content as the video is being played, while transcripts allow people who need additional time to be able to review audio content at a pace and format that is comfortable for them. It's worth noting that while you can caption audio-only media, you can only do so when playing audio in a <video> element, since the video region of the element is used to present the captions. This is one of the special scenarios in which it's useful to play audio in a video element. If automatic captioning services are used, it is important to review the generated content to ensure it accurately represents the source video. In addition to spoken dialog, subtitles and transcripts should also identify music and sound effects that communi...
HTML elements reference - HTML: Hypertext Markup Language
Web › HTML › 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. Image and multimedia HTML supports various multimedia resources such as images, audio, and video. Element Description <area> The HTML <area> element defines a hot-spot region on an image, and optionally associates it with a hypertext link. This element is used only within a <map> element. <audio> The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streame...
lang - HTML: Hypertext Markup Language
Badeshi is bdz. Script subtag Optional. This subtag defines the writing system used for the language, and is always 4 characters long, with the first letter capitalized. For example, French-in-Braille is fr-Brai and ja-Kana is Japanese written with the Katakana alphabet. If the language is written in a highly typical way, like English in the Latin alphabet, there is no need to use this subtag. Region subtag Optional. This subtag defines a dialect of the base language from a particular location, and is either 2 letters in ALLCAPS matching a country code, or 3 numbers matching a non-country area. For example, es-ES is for Spanish as spoken in Spain, and es-013 is Spanish as spoken in Central America. "International Spanish" would just be es. The script subtag precedes the region subtag if bo...
HTML documentation index - HTML: Hypertext Markup Language
Web › HTML › Index
The Embed Java Applet element Element, HTML, Java, Obsolete, Reference, Web, applet The obsolete HTML Applet Element (<applet>) embeds a Java applet into the document; this element has been deprecated in favor of <object>. 60 <area> Content, Element, HTML, HTML:Flow content, HTML:Phrasing content, Multimedia, Reference, Web The HTML <area> element defines a hot-spot region on an image, and optionally associates it with a hypertext link. This element is used only within a <map> element. 61 <article>: The Article Contents element Element, HTML, HTML sections, Reference, Web 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 (...
Microdata - HTML: Hypertext Markup Language
jor search engine operators like Google, Microsoft, and Yahoo! rely on the schema.org vocabulary to improve search results. For some purposes, an ad-hoc vocabulary is adequate. For others, a vocabulary will need to be designed. Where possible, authors are encouraged to re-use existing vocabularies, as this makes content re-use easier. Localization In some cases, search engines covering specific regions may provide locally-specific extensions of microdata. For example, Yandex, a major search engine in Russia, supports microformats such as hCard (company contact information), hRecipe (food recipe), hReview (market reviews) and hProduct (product data) and provides its own format for the definition of the terms and encyclopedic articles. This extension was made to solve transliteration problems be...
Configuring servers for Ogg media - HTTP
on/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. In particular, the article on media container formats will be especially helpful when configuring serers to host media properly. Handle HTTP 1.1 byte range requests correctly In order to support seeking and playing back regions of the media that aren't yet downloaded, Gecko uses HTTP 1.1 byte-range requests to retrieve the media from the seek target position. In addition, Gecko uses byte-range requests to seek to the end of the media (assuming you serve the Content-Length header) in order to determine the duration of the media. Your server should accept the Accept-Ranges: bytes HTTP header if it can accept byte-range ...
Accept-Language - HTTP
types, weighted with the quality value syntax: Accept-Language: fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5 Directives <language> A language tag (which is sometimes referred to as a "locale identifier"). This consists of a 2-3 letter base language tag representing the language, optionally followed by additional subtags separated by '-'. The most common extra information is the country or region variant (like 'en-US' or 'fr-CA') or the type of alphabet to use (like 'sr-Latn'). Other variants like the type of orthography ('de-DE-1996') are usually not used in the context of this header. * Any language; '*' is used as a wildcard. ;q= (q-factor weighting) Any value placed in an order of preference expressed using a relative quality value called weight. Examples Accept-Language: de ...
CSS Houdini
include the name of the worklet, along with optional parameters. The worklet also has access to the element's custom properties: they don't need to be passed as function arguments. li { background-image: paint(myComponent, stroke, 10px); --highlights: blue; --lowlights: green; } Note: With great power comes great responsibility! With Houdini you could invent your own masonry, grid, or regions implementation, but doing so is not necessarily the best idea. 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. As you extend CSS with Houdini, make sure to keep these considerations in mind, and start small before moving on to more ambitious projects. The Houdini APIs Below you can find...
Concurrency model and the event loop - JavaScript
s arguments and local variables. When bar calls foo, a second frame is created and pushed on top of the first one containing foo's arguments and local variables. When foo returns, the top frame element is popped out of the stack (leaving only bar's call frame). When bar returns, the stack is empty. Heap Objects are allocated in a heap which is just a name to denote a large (mostly unstructured) region of memory. Queue A JavaScript runtime uses a message queue, which is a list of messages to be processed. Each message has an associated function which gets called in order to handle the message. At some point during the event loop, the runtime starts handling the messages on the queue, starting with the oldest one. To do so, the message is removed from the queue and its corresponding function ...
Array.prototype.copyWithin() - JavaScript
until the last index (default to arr.length). Return value The modified array. Description The copyWithin works like C and C++'s memmove, and is a high-performance method to shift the data of an Array. This especially applies to the TypedArray method of the same name. The sequence is copied and pasted as one operation; pasted sequence will have the copied values even when the copy and paste region overlap. The copyWithin function is intentionally generic, it does not require that its this value be an Array object. The copyWithin method is a mutable method. It does not alter the length of this, but it will change its content and create new properties, if necessary. Polyfill if (!Array.prototype.copyWithin) { Object.defineProperty(Array.prototype, 'copyWithin', { value: function(ta...
Intl.Locale.prototype.calendar - JavaScript
The following table shows all the valid Unicode calendar key strings, along with a description of the calendar era they represent. ...
Intl.Locale.prototype.collation - JavaScript
ollation type for the Locale, which is used to order strings according to the locale's rules. Description Collation is the process of ordering strings of characters. It is used whenever strings must be sorted and placed into a certain order, from search query results to ordering records in a database. 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. Below is a table with the available collation types, taken from the Unicode collation specification. Valid collation types Collation Type Description big5han Pinyin ordering for Latin, big5 charset or...
Intl.Locale.prototype.language - JavaScript
British English vs. American English). The language property of a Locale returns strictly the locale's language subtag. ...
Intl.Locale.prototype.minimize() - JavaScript
e to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. 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). This is useful when there are superfluous subtags in the language identifier; for instance, "en-Latn" can be simplified to "en", since "Latn" is the only script used to write English. minimize() only affects the main subtags that comprise the language identifier: language, script, and region subtags. Other subtags...
Intl.Locale.prototype.numberingSystem - JavaScript
As with most internationalization schemas, the numeral systems that can be represented in a Locale object by numberingSystem are standardized by Unicode. ...
Number.prototype.toLocaleString() - JavaScript
number.toLocaleString('i'); } catch (e) { return e.name === 'RangeError'; } return false; } Prior to ES5.1, implementations were not required to throw a range error exception if toLocaleString is called with arguments. A check that works in all hosts, including those supporting ECMA-262 prior to ed 5.1, is to test for the features specified in ECMA-402 that are required to support regional options for Number.prototype.toLocaleString directly: function toLocaleStringSupportsOptions() { return !!(typeof Intl == 'object' && Intl && typeof Intl.NumberFormat == 'function'); } This tests for a global Intl object, checks that it's not null and that it has a NumberFormat property that is a function. Using locales This example shows some of the variations in localized number format...
The "codecs" parameter in common media types - Web media technologies
nds upon Hi10P by adding support for 4:2:2 chroma subsampling along with up to10 bits per color component. 7A 00 High 4:4:4 Predictive Profile (Hi444PP) In addition to the capabilities included in Hi422P, Hi444PP adds support for 4:4:4 chroma subsampling (in which no color information is discarded). Also includes support for up to 14 bits per color sample and efficient lossless region coding. The option to encode each frame as three separate color planes (that is, each color's data is stored as if it were a single monochrome frame). F4 00 High 10 Intra Profile High 10 constrained to all-intra-frame use. Primarily used for professional apps. 6E 10 High 4:2:2 Intra Profile The Hi422 Profile with all-intra-frame use. 7A 10 High...
SVG Presentation Attributes - SVG: Scalable Vector Graphics
rcentage>; Animatable: Yes fill-rule It indicates how to determine what side of a path is inside a shape. Value: nonzero|evenodd|inherit; Animatable: Yes filter It defines the filter effects defined by the <filter> element that shall be applied to its element. Value: <FuncIRI>|none|inherit; Animatable: Yes flood-color It indicates what color to use to flood the current filter primitive subregion defined through the <feFlood> or <feDropShadow> element. Value: <color>; Animatable: Yes flood-opacity It indicates the opacity value to use across the current filter primitive subregion defined through the <feFlood> or <feDropShadow> element. Value: <number>|<percentage>; Animatable: Yes font-family It indicates which font family will be used to render the text of the element. Value: see ...
clip - SVG: Scalable Vector Graphics
Web › SVG › Attribute › clip
This attribute has the same parameter values as defined for the css clip property. Unitless values, which indicate current user coordinates, are permitted on the coordinate values on the rect(). The value of auto defines a clipping path along the bounds of the viewport created by the given element. ...
enable-background - SVG: Scalable Vector Graphics
he background image. It also indicates that a new (i.e., initially transparent black) background image canvas is established and that in effect all children of the current container element shall be rendered into the new background image canvas in addition to being rendered onto the target device. The optional <x>, <y>, <width>, and <height> parameters are <number> values that indicate the subregion of the container element's user space where access to the background image is allowed to happen. Those values act as a clipping rectangle on the background image canvas. Negative values for <width> or <height> are forbidden. If one, two, or three values are specified or if neither <width> nor <height> are specified, the BackgroundImage and BackgroundAlpha of a filter primitive are processed as ...
flood-color - SVG: Scalable Vector Graphics
Note: As a presentation attribute, flood-color can be used as a CSS property. ...
in - SVG: Scalable Vector Graphics
Web › SVG › Attribute › in
epresents the graphics elements that were the original input into the <filter> element. SourceAlpha This keyword represents the graphics elements that were the original input into the <filter> element. SourceAlpha has all of the same rules as SourceGraphic except that only the alpha channel is used. BackgroundImage This keyword represents an image snapshot of the SVG document under the filter region at the time that the <filter> element was invoked. BackgroundAlpha Same as BackgroundImage except only the alpha channel is used. FillPaint This keyword represents the value of the fill property on the target element for the filter effect. 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 tr...
lang - SVG: Scalable Vector Graphics
Web › SVG › Attribute › lang
> </svg> Usage notes Value <language-tag> Default value None Animatable No <language-tag> This value specifies the language used for the element. The syntax of this value is defined in the BCP 47 specification. 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. en-US for US English or de-AT for Austrian German. Specifications Specification Status Comment Scalable Vector Graphics (SVG) 2The definition of 'lang' in that specification. Candidate Recommendation Made the lang attribute (without namespace) available on all elements and defined the interaction between both. ...
limitingConeAngle - SVG: Scalable Vector Graphics
No light is projected outside the cone. ...
operator - SVG: Scalable Vector Graphics
raphic defined in the in2 attribute, are displayed. atop This value indicates that the parts of the source graphic defined in the in attribute, which overlap the destination graphic defined in the in2 attribute, replace the destination graphic. The parts of the destination graphic that do not overlap with the source graphic stay untouched. xor This value indicates that the non-overlapping regions of the source graphic defined in the in attribute and the destination graphic defined in the in2 attribute are combined. lighter This value indicates that the sum of the source graphic defined in the in attribute and the destination graphic defined in the in2 attribute is displayed. arithmetic This value indicates that the source graphic defined in the in attribute and the destination grap...
primitiveUnits - SVG: Scalable Vector Graphics
The primitiveUnits attribute specifies the coordinate system for the various length values within the filter primitives and for the attributes that define the filter primitive subregion. 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 fra...
refX - SVG: Scalable Vector Graphics
Web › SVG › Attribute › refX
ect of the x attribute and any transformations on the <symbol> and its host <use> element. 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. If the attribute is not specified, no horizontal adjustment is made, and the left side of the symbol's rectangular viewport region (regardless of the viewBox coordinate) is positioned at the x coordinate. For backwards compatibility, the behavior when refX is not specified on a <symbol> element is different from when it is specified with a value of 0, and therefore different from the behavior when an equivalent attribute is not specified on a <marker> element. Value <length> | left | center | right Def...
refY - SVG: Scalable Vector Graphics
Web › SVG › Attribute › refY
effect of the y attribute and any transformations on the <symbol> and its host <use> element. Unlike other positioning attributes, refY is interpreted as being in the coordinate system of the symbol contents, after application of the viewBox and preserveAspectRatio attributes. If the attribute is not specified, no vertical adjustment is made, and the top side of the symbol's rectangular viewport region (regardless of the viewBox coordinate) is positioned at the y coordinate. For backwards compatibility, the behavior when refY is not specified on a <symbol> element is different from when it is specified with a value of 0, and therefore different from the behavior when an equivalent attribute is not specified on a <marker> element. Value <length> | top | center | bottom Def...
stitchTiles - SVG: Scalable Vector Graphics
no attempt is made to achieve smooth transitions at the border of tiles which contain a turbulence function. Sometimes the result will show clear discontinuities at the tile borders. 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. Recommendatio...
xml:lang - SVG: Scalable Vector Graphics
> </svg> Usage notes Value <language-tag> Default value None Animatable No <language-tag> This value specifies the language used for the element. The syntax of this value is defined in the BCP 47 specification. 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. en-US for US English or de-AT for Austrian German. Specifications Specification Status Comment Scalable Vector Graphics (SVG) 2The definition of 'xml:lang' in that specification. Candidate Recommendation Made the lang attribute (without namespace) available on all elements and defined the interaction between both. ...
<feFlood> - SVG: Scalable Vector Graphics
Web › SVG › Element › feFlood
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. ...
<feTurbulence> - SVG: Scalable Vector Graphics
The <feTurbulence> SVG filter primitive creates an image using the Perlin turbulence function. It allows the synthesis of artificial textures like clouds or marble. The resulting image will fill the entire filter primitive subregion. 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="t...
SVG Filters Tutorial - SVG: Scalable Vector Graphics
s the bitmap description language such as the use of shadow, blur effects or even merging the results of different filters. With the filter element <filter> it is possible to add these effects and later on attach them to an object. Filters act like layers. When creating them, try applying and testing the effect step by step. This element has different attributes that help us create the clipping region. Between the filter tags, we can define the primitives that allow us to implement the desired effect. One of these primitives is the feGaussianBlur. The keyword SourceAlpha identifies the input for this primitive, is in this case input 'in'. The amount of blur to be applied is done using the stdDeviation attribute. SVG filter example <defs> <filter id="drop-shadow"> <feGaussianBlur in="Sour...