Search completed in 1.10 seconds.
::first-letter (:first-letter) - CSS: Cascading Style Sheets
the ::first
-letter css pseudo-element applies styles to the first letter of the first line of a block
-level element, but only when not preceded by other content (such as images or inline tables).
... /* selects the first letter of a <p> */ p::first
-letter { font-size: 130%; } the first letter of an element is not always trivial to identify: punctuation that precedes or immediately follows the first letter is included in the match.
...in these cases, both letters of the digraph should be matched by the ::first
-letter pseudo-element.
...And 12 more matches
::first-line (:first-line) - CSS: Cascading Style Sheets
the ::first
-line css pseudo-element applies styles to the first line of a block
-level element.
... /* selects the first line of a <p> */ p::first
-line { color: red; } css3 introduced the ::first
-line notation (with two colons) to distinguish pseudo-classes from pseudo-elements.
... browsers also accept :first
-line, introduced in css2.
...And 11 more matches
-ms-hyphenate-limit-lines - Archive of obsolete content
the -ms-hyphenate
-limit
-lines css property is a microsoft extension specifying the maximum number of consecutive lines in an element that may be ended with a hyphenated word.
... initial valueno
-limitapplies toblock container elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values no
-limit indicates that hyphenation is not limited based on the number of consecutive hyphenated lines.
... formal syntax no
-limit | <integer> specifications not part of any specification.
<input type="datetime-local"> - HTML: Hypertext Markup Language
<input> elements of type datetime
-local create input controls that let the user easily enter both a date and a time, including the year, month, and day as well as the time in hours and minutes.
... because of the limited browser support for datetime
-local, and the variations in how the inputs work, it may currently still be best to use a framework or library to present these, or to use a custom input of your own.
... another option is to use separate date and time inputs, each of which is more widely supported than datetime
-local.
...And 31 more matches
:nth-last-child() - CSS: Cascading Style Sheets
the :nth
-last-child() css pseudo-class matches elements based on their position among a group of siblings, counting from the end.
... /* selects every fourth element among any group of siblings, counting backwards from the last one */ :nth
-last-child(4n) { color: lime; } note: this pseudo-class is essentially the same as :nth-child, except it counts items backwards from the end, not forwards from the beginning.
... syntax the nth
-last-child pseudo-class is specified with a single argument, which represents the pattern for matching elements, counting from the end.
...And 14 more matches
border-left - CSS: Cascading Style Sheets
the border
-left shorthand css property set an element's left border.
... as with all shorthand properties, border
-left always sets the values of all of the properties that it can set, even if they are not specified.
... border
-left-style: dotted; border
-left: thick green; ...
...And 14 more matches
font-variant-ligatures - CSS: Cascading Style Sheets
the font-variant
-ligatures css property controls which ligatures and contextual forms are used in textual content of the elements it applies to.
... syntax /* keyword values */ font-variant
-ligatures: normal; font-variant
-ligatures: none; font-variant
-ligatures: common
-ligatures; /* <common
-lig-values> */ font-variant
-ligatures: no-common
-ligatures; /* <common
-lig-values> */ font-variant
-ligatures: discretionary
-ligatures; /* <discretionary
-lig-values> */ font-variant
-ligatures: no-discretionary
-ligatures; /* <discretionary
-lig-values> */ font-variant
-ligatures: historical
-ligatures; /* <historical
-lig-values> */ font-variant
-li...
...gatures: no-historical
-ligatures; /* <historical
-lig-values> */ font-variant
-ligatures: contextual; /* <contextual-alt-values> */ font-variant
-ligatures: no-contextual; /* <contextual-alt-values> */ /* global values */ font-variant
-ligatures: inherit; font-variant
-ligatures: initial; font-variant
-ligatures: unset; the font-variant
-ligatures property is specified as one of the keyword values listed below.
...And 13 more matches
margin-left - CSS: Cascading Style Sheets
the margin
-left css property sets the margin area on the left side of an element.
... in the rare cases where width is overconstrained (i.e., when all of width, margin
-left, border, padding, the content area, and margin-right are defined), margin
-left is ignored, and will have the same calculated value as if the auto value was specified.
... syntax /* <length> values */ margin
-left: 10px; /* an absolute length */ margin
-left: 1em; /* relative to the text size */ margin
-left: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin
-left: auto; /* global values */ margin
-left: inherit; margin
-left: initial; margin
-left: unset; the margin
-left property is specified as the keyword auto, or a <length>, or a <percentage>.
...And 9 more matches
stroke-linejoin - SVG: Scalable Vector Graphics
the stroke
-linejoin attribute is a presentation attribute defining the shape to be used at the corners of paths when they are stroked.
... note: as a presentation attribute stroke
-linejoin can be used as a css property.
...nt but it has effect only on the following nine elements: <altglyph>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 18 12" xmlns="http://www.w3.org/2000/svg"> <!-- upper left path: effect of the "miter" value --> <path d="m1,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5" stroke="black" fill="none" stroke
-linejoin="miter" /> <!-- center path: effect of the "round" value --> <path d="m7,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5" stroke="black" fill="none" stroke
-linejoin="round" /> <!-- upper right path: effect of the "bevel" value --> <path d="m13,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5" stroke="black" fill="none" stroke
-linejoin="bevel" /> <!-- bottom left path: ...
...And 9 more matches
Using the aria-labelledby attribute - Accessibility
description the aria
-labelledby attribute establishes relationships between objects and their label(s), and its value should be one or more element ids, which refer to elements that have the text needed for labeling.
... 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.
...And 8 more matches
Block-level elements - HTML: Hypertext Markup Language
html (hypertext markup language) elements historically were categorized as either "block
-level" elements or "inline
-level" elements.
... by default, a block
-level element occupies the entire space of its parent element (container), thereby creating a "block." this article helps to explain what this means.
... browsers typically display the block
-level element with a newline both before and after the element.
...And 8 more matches
repeating-linear-gradient() - CSS: Cascading Style Sheets
the repeating
-linear-gradient() css function creates an image consisting of repeating linear gradients.
...if the first color does not have a color-stop
-length, the color-stop
-length defaults to 0.
...for this reason, repeating
-linear-gradient() won't work on background-color and other properties that use the <color> data type.
...And 7 more matches
Content-Location - HTTP
the content
-location header indicates an alternate location for the returned data.
... location and content
-location are different.
... location indicates the url of a redirect, while content
-location indicates the direct url to use to access the resource, without further content negotiation in the future.
...And 7 more matches
border-bottom-left-radius - CSS: Cascading Style Sheets
the border-bottom
-left-radius css property rounds the bottom
-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner.
... note: if the value of this property is not set in a border-radius shorthand property that is applied to the element after the border-bottom
-left-radius css property, the value of this property is then reset to its initial value by the shorthand property.
... syntax /* the corner is a circle */ /* border-bottom
-left-radius: radius */ border-bottom
-left-radius: 3px; /* percentage values */ /* circle if box is a square or ellipse if box is a rectangle */ border-bottom
-left-radius: 20%; /* same as above: 20% of horizontal(width) and vertical(height) */ border-bottom
-left-radius: 20% 20%; /* 20% of horizontal(width) and 10% of vertical(height) */ border-bottom
-left-radius: 20% 10%; /* the corner is an ellipse */ /* border-bottom
-left-radius: horizontal vertical */ border-bottom
-left-radius: 0.5em 1em; border-bottom
-left-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...And 6 more matches
Feature-Policy: screen-wake-lock - HTTP
the http feature-policy header screen-wake
-lock directive controls whether the current document is allowed to use screen wake lock api to indicate that device should not dim or turn off the screen.
... note: in earlier specification drafts this directive was called wake
-lock.
... syntax feature-policy: screen-wake
-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
...And 6 more matches
Feature-Policy: wake-lock - HTTP
the http feature-policy header wake
-lock directive controls whether the current document is allowed to use wake lock api to indicate that device should not enter power-saving mode.
... note: latest drafts of screen wake lock api defines screen-wake
-lock directive.
... syntax feature-policy: wake
-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
...And 6 more matches
stroke-linecap - SVG: Scalable Vector Graphics
the stroke
-linecap attribute is a presentation attribute defining the shape to be used at the end of open subpaths when they are stroked.
... note: as a presentation attribute stroke
-linecap can be used as a css property.
...resentation attribute, it can be applied to any element but it has effect only on the following eight elements: <altglyph>, <path>, <polyline>, <line>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the (default) "butt" value --> <line x1="1" y1="1" x2="5" y2="1" stroke="black" stroke
-linecap="butt" /> <!-- effect of the "round" value --> <line x1="1" y1="3" x2="5" y2="3" stroke="black" stroke
-linecap="round" /> <!-- effect of the "square" value --> <line x1="1" y1="5" x2="5" y2="5" stroke="black" stroke
-linecap="square" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path d="m1,1 h4 m1,3 h4 m1,5 h4...
...And 6 more matches
-ms-scroll-limit - Archive of obsolete content
the -ms-scroll
-limit css property is a microsoft extension that specifies values for the -ms-scroll
-limit-x-min, -ms-scroll
-limit-y-min, -ms-scroll
-limit-x-max, and -ms-scroll
-limit-y-max properties.
... initial valueas each of the properties of the shorthand:-ms-scroll
-limit-x-min: 0-ms-scroll
-limit-y-min: 0-ms-scroll
-limit-x-max: auto-ms-scroll
-limit-y-max: autoapplies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas each of the properties of the shorthand:-ms-scroll
-limit-x-min: as specified-ms-scroll
-limit-y-min: as specified-ms-scroll
-limit-x-max: as specified-ms-scroll
-limit-y-max: as specifiedanimation typediscrete syntax the -ms-scroll
-limit property is specified as one or more of the following scroll limit values, in the order listed, separated by spaces.
... values -ms-scroll
-limit-x-min the value of the -ms-scroll
-limit-x-min property.
...And 5 more matches
compare-locales
compare
-locales is a python script that helps localizers to check their work without running firefox or another application.
... if you want to run compare
-locales on windows, be sure to first install mozillabuild.
... installation compare
-locales needs to be installed, and it requires that you have python 2.7 or 3.5+ installed on your machine.
...And 5 more matches
-ms-content-zoom-limit - Archive of obsolete content
the -ms-content-zoom
-limit css shorthand property is a microsoft extension that specifies values for the -ms-content-zoom
-limit-min and -ms-content-zoom
-limit-max properties.
... initial valueas each of the properties of the shorthand:-ms-content-zoom
-limit-max: 400%-ms-content-zoom
-limit-min: 100%applies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednopercentagesas each of the properties of the shorthand:-ms-content-zoom
-limit-max: the largest allowed zoom factor.
...smaller values zoom out.-ms-content-zoom
-limit-min: the smallest allowed zoom factor.
...And 4 more matches
Scroll-linked effects
the definition of a scroll
-linked effect is an effect implemented on a webpage where something changes based on the scroll position, for example updating a positioning property with the aim of producing a parallax scrolling effect.
... this article discusses scroll
-linked effects, their effect on performance, related tools, and possible mitigation techniques.
... other effects in many cases, scroll
-linked effects can be reimplemented using css and made to run on the compositor thread.
...And 4 more matches
border-left-style - CSS: Cascading Style Sheets
the border
-left-style css property sets the line style of an element's left border.
... syntax /* keyword values */ border
-left-style: none; border
-left-style: hidden; border
-left-style: dotted; border
-left-style: dashed; border
-left-style: solid; border
-left-style: double; border
-left-style: groove; border
-left-style: ridge; border
-left-style: inset; border
-left-style: outset; /* global values */ border
-left-style: inherit; border
-left-style: initial; border
-left-style: unset; the border
-left-style property is specified as a single keyword chosen from th...
...it also applies to ::first
-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset examples html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5">solid</td> <td class="b6">double</td> <td class="b7">groove</td> <td class="b8">ridge</td> </tr> <tr> <td class="b9">inset</td> <td class="b10">outset</td> </tr> </table> css /* define look of the table */ table { border-width: 2px; background-color:...
...And 4 more matches
Accept-Language - HTTP
the accept
-language request http header advertises which languages the client is able to understand, and which locale variant is preferred.
... (by languages, we mean natural languages, such as english, and not programming languages.) using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the content
-language response header.
...the content of the accept
-language is often out of the control of the user (like when traveling and using an internet cafe in a different country); the user may also want to visit a page in another language than the locale of their user interface.
...And 4 more matches
Content-Language - HTTP
the content
-language entity header is used to describe the language(s) intended for the audience, so that it allows a user to differentiate according to the users' own preferred language.
... for example, if "content
-language: de-de" is set, it says that the document is intended for german language speakers (however, it doesn't indicate the document is written in german.
... if no content
-language is specified, the default is that the content is intended for all language audiences.
...And 4 more matches
Using the aria-label attribute - Accessibility
the aria
-label attribute is used to define a string that labels the current element.
...if there is visible text labeling the element, use aria
-labelledby instead.
...since there is nothing indicating that the purpose of the button is to close the dialog, the aria
-label attribute is used to provide the label to any assistive technologies.
...And 3 more matches
:nth-last-of-type() - CSS: Cascading Style Sheets
the :nth
-last-of-type() css pseudo-class matches elements of a given type, based on their position among a group of siblings, counting from the end.
... /* selects every fourth <p> element among any group of siblings, counting backwards from the last one */ p:nth
-last-of-type(4n) { color: lime; } note: this pseudo-class is essentially the same as :nth-of-type, except it counts items backwards from the end, not forwards from the beginning.
... syntax the nth
-last-of-type pseudo-class is specified with a single argument, which represents the pattern for matching elements, counting from the end.
...And 3 more matches
border-left-color - CSS: Cascading Style Sheets
the border
-left-color css property sets the color of an element's left border.
... it can also be set with the shorthand css properties border-color or border
-left.
... syntax /* <color> values */ border
-left-color: red; border
-left-color: #ffbb00; border
-left-color: rgb(255, 0, 0); border
-left-color: hsla(100%, 50%, 25%, 0.75); border
-left-color: currentcolor; border
-left-color: transparent; /* global values */ border
-left-color: inherit; border
-left-color: initial; border
-left-color: unset; the border
-left-color property is specified as a single value.
...And 3 more matches
border-left-width - CSS: Cascading Style Sheets
the border
-left-width css property sets the width of the left border of an element.
... syntax /* keyword values */ border
-left-width: thin; border
-left-width: medium; border
-left-width: thick; /* <length> values */ border
-left-width: 10em; border
-left-width: 3vmax; border
-left-width: 6px; /* global keywords */ border
-left-width: inherit; border
-left-width: initial; border
-left-width: unset; values <line-width> defines the width of the border, either as an explicit nonnegative <length> or a keyword.
...it also applies to ::first
-letter.inheritednocomputed valuethe absolute length or 0 if border
-left-style is none or hiddenanimation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples comparing border widths html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border
-left-width: thick; } div:nth-chi...
...And 3 more matches
box-lines - CSS: Cascading Style Sheets
the box
-lines css property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes).
... /* keyword values */ box
-lines: single; box
-lines: multiple; /* global values */ box
-lines: inherit; box
-lines: initial; box
-lines: unset; by default a horizontal box will lay out its children in a single row, and a vertical box will lay out its children in a single column.
... this behavior can be changed using the box
-lines property.
...And 3 more matches
font-language-override - CSS: Cascading Style Sheets
the font
-language-override css property controls the use of language-specific glyphs in a typeface.
... /* keyword value */ font
-language-override: normal; /* <string> values */ font
-language-override: "eng"; /* use english glyphs */ font
-language-override: "trk"; /* use turkish glyphs */ /* global values */ font
-language-override: initial; font
-language-override: inherit; font
-language-override: unset; by default, html's lang attribute tells browsers to display glyphs designed specifically for that language.
... for example, a lot of fonts have a special character for the digraph fi that merge the dot on the "i" with the "f." however, if the language is set to turkish the typeface will likely know not to use the merged glyph; turkish has two versions of the "i," one with a dot (i) and one without (ı), and using the ligature would incorrectly transform a dotted "i" into a dotless "i." the font
-language-override property lets you override the typeface behavior for a specific language.
...And 3 more matches
padding-left - CSS: Cascading Style Sheets
the padding
-left css property sets the width of the padding area to the left of an element.
... syntax /* <length> values */ padding
-left: 0.5em; padding
-left: 0; padding
-left: 2cm; /* <percentage> value */ padding
-left: 10%; /* global values */ padding
-left: inherit; padding
-left: initial; padding
-left: unset; the padding
-left property is specified as a single value chosen from the list below.
...it also applies to ::first
-letter and ::first
-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting left padding using pixels and percentages .content { padding
-left: 5%; } .sidebox { padding
-left: 10px; } specifications specification status commen...
...And 3 more matches
Feature-Policy: ambient-light-sensor - HTTP
the http feature-policy header ambient
-light-sensor directive controls whether the current document is allowed to gather information about the amount of light in the environment around the device through the ambientlightsensor interface.
... syntax feature-policy: ambient
-light-sensor <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
...And 3 more matches
Low-Level APIs - Archive of obsolete content
modules in this section implement low
-level apis.
... privileged modules that expose powerful low
-level capabilities such as window/utils and net/xhr.
...in many cases these modules have simpler, more restricted analogs among the "high
-level apis" (for example, windows or request).
...And 2 more matches
:-moz-locale-dir(ltr) - CSS: Cascading Style Sheets
the :-moz
-locale-dir(ltr) css pseudo-class is a mozilla extension that matches an element if the user interface is being displayed left-to-right.
...(this can vary from window to window, and even from tab to tab.) it also allows extensions to work even when they don't support the user's default locale, since they can support both left-to-right and right-to
-left layouts regardless of locale specifics.
... this selector does not work properly from html; it always matches, regardless of whether the ui locale is left-to-right or right-to
-left.
...And 2 more matches
:-moz-locale-dir(rtl) - CSS: Cascading Style Sheets
the :-moz
-locale-dir(rtl) css pseudo-class is a mozilla extension that matches an element if the user interface is being displayed right-to
-left.
...(this can vary from window to window, and even from tab to tab.) it also allows extensions to work even when they don't support the user's default locale, since they can support both left-to-right and right-to
-left layouts regardless of locale specifics.
... this selector does not work properly from html; it never matches, no matter whether the ui locale is left-to-right or right-to
-left.
...And 2 more matches
border-top-left-radius - CSS: Cascading Style Sheets
the border-top
-left-radius css property rounds the top
-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner.
... note: if the value of this property is not set in a border-radius shorthand property that is applied to the element after the border-top
-left-radius css property, the value of this property is then reset to its initial value by the shorthand property.
... syntax /* the corner is a circle */ /* border-top
-left-radius: radius */ border-top
-left-radius: 3px; /* the corner is an ellipse */ /* border-top
-left-radius: horizontal vertical */ border-top
-left-radius: 0.5em 1em; border-top
-left-radius: inherit; with one value: the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.
...And 2 more matches
<display-legacy> - CSS: Cascading Style Sheets
css 2 used a single-keyword syntax for the display property, requiring separate keywords for block
-level and inline
-level variants of the same layout mode.
... syntax valid <display
-legacy> values: inline-block the element generates a block element box that will be flowed with surrounding content as if it were a single inline box (behaving much like a replaced element would).
...it behaves like an html <table> element, but as an inline box, rather than a block
-level box.
...And 2 more matches
initial-letter-align - CSS: Cascading Style Sheets
the initial
-letter-align css property specifies the alignment of initial letters within a paragraph.
... /* keyword values */ initial
-letter-align: auto; initial
-letter-align: alphabetic; initial
-letter-align: hanging; initial
-letter-align: ideographic; /* global values */ initial
-letter-align: inherit; initial
-letter-align: initial; initial
-letter-align: unset; syntax one of the keyword values listed below.
... ideographic the initial letter is centered in the n
-line area.
...And 2 more matches
initial-letter - CSS: Cascading Style Sheets
the initial
-letter css property sets styling for dropped, raised, and sunken initial letters.
... /* keyword values */ initial
-letter: normal; /* numeric values */ initial
-letter: 1.5; /* initial letter occupies 1.5 lines */ initial
-letter: 3.0; /* initial letter occupies 3 lines */ initial
-letter: 3.0 2; /* initial letter occupies 3 lines and sinks 2 lines */ /* global values */ initial
-letter: inherit; initial
-letter: initial; initial
-letter: unset; syntax the keyword value normal, or a <number> optionally followed by an <integer>.
... values normal no special initial
-letter effect.
...And 2 more matches
text-align-last - CSS: Cascading Style Sheets
the text-align
-last css property sets how the last line of a block or a line, right before a forced line break, is aligned.
... syntax /* keyword values */ text-align
-last: auto; text-align
-last: start; text-align
-last: end; text-align
-last: left; text-align
-last: right; text-align
-last: center; text-align
-last: justify; /* global values */ text-align
-last: inherit; text-align
-last: initial; text-align
-last: unset; values auto the affected line is aligned per the value of text-align, unless text-align is justify, in which case the effect is the same as setting text-align
-last to start.
... start the same as left if direction is left-to-right and right if direction is right-to
-left.
...And 2 more matches
text-decoration-line - CSS: Cascading Style Sheets
the text-decoration
-line css property sets the kind of decoration that is used on text in an element, such as an underline or overline.
... syntax /* single keyword */ text-decoration
-line: none; text-decoration
-line: underline; text-decoration
-line: overline; text-decoration
-line: line-through; text-decoration
-line: blink; /* multiple keywords */ text-decoration
-line: underline overline; /* two decoration lines */ text-decoration
-line: overline underline line-through; /* multiple decoration lines */ /* global values */ text-decoration
-line: inherit; text-decora...
...tion
-line: initial; text-decoration
-line: unset; the text-decoration
-line property is specified as none, or one or more space-separated values from the list below.
...And 2 more matches
::-ms-fill-lower - Archive of obsolete content
the ::-ms-fill
-lower css pseudo-element represents the lower portion of the track of a slider control; that is, the portion corresponding to values less than the value currently selected by the thumb.
... allowable properties only the following css properties can be used in a rule with ::-ms-fill
-lower in its selector.
... background-clip background-color background-image background-origin background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin
-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-...
...width padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width specifications not part of any specification.
High-level programming language - MDN Web Docs Glossary: Definitions of Web-related terms
a high
-level programming language has a significant abstraction from the details of computer operation.
...unlike low
-level programming languages, it may use natural language elements, or may automate (or even entirely hide) significant areas of computing systems, making the process of developing simpler and more understandable relative to a lower
-level language.
... the amount of abstraction provided defines how "high
-level" a programming language is.
... the idea of a language automatically translatable into machine code, but nearer to human logic, was introduced in computer science in the 1950s, especially thanks to the work of john backus (ibm), to whom it owes the first high
-level language to have been widely circulated: fortran.
Tips for authoring fast-loading HTML pages - Learn web development
tips reduce page weight page weight is by far the most important factor in page
-load performance.
...however, the fewer http requests and single image caching can help reduce page
-load time.
... tables should use the css selector: property combination: table
-layout: fixed; and should specify widths of columns using the <col> and the <colgroup> elements.
... <img href="./images/footerlogo.jpg" loading="lazy"> note that lazily
-loaded images may not be available when the load event is fired.
-webkit-line-clamp - CSS: Cascading Style Sheets
the -webkit
-line-clamp css property allows limiting of the contents of a block container to the specified number of lines.
... syntax /* keyword value */ -webkit
-line-clamp: none; /* <integer> values */ -webkit
-line-clamp: 3; -webkit
-line-clamp: 10; /* global values */ -webkit
-line-clamp: inherit; -webkit
-line-clamp: initial; -webkit
-line-clamp: unset; none this value specifies that the content wonʼt be clamped.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax none | <integer> examples truncating a paragraph html <p> in this example the <code>-webkit
-line-clamp</code> property is set to <code>3</code>, which means the text is clamped after three lines.
...</p> css p { width: 300px; display: -webkit-box; -webkit-box-orient: vertical; -webkit
-line-clamp: 3; overflow: hidden; } result specifications specification status comment css overflow module level 3the definition of '-webkit
-line-clamp' in that specification.
Providing Command-Line Options - Archive of obsolete content
using the example to use this sample code, save the commandline.js file into the components directory and add the following lines to your chrome.manifest file: component {2991c315-b871-42cd-b33f-bfee4fcbf682} components/commandline.js contract @mozilla.org/commandlinehandler/general-startup;1?type=myapp {2991c315-b871-42cd-b33f-bfee4fcbf682} category command
-line-handler m-myapp @mozilla.org/commandlinehandler/general-startup;1?type=myapp the javascript code const cc = components.classes; const ci = components.interfaces; components.utils.import("resource://gre/modules/xpcomutils.jsm"); components.utils.import("resource://gre/modules/services.jsm"); // changeme: to the chrome uri of your extension or application const chrome_uri = "chrome://myapp/...
...dlinehandler() { }; commandlinehandler.prototype = { classdescription: "myapphandler", // changeme: generate a unique id classid: components.id('{2991c315-b871-42cd-b33f-bfee4fcbf682}'), // changeme: change the type in the contractid to be unique to your application contractid: "@mozilla.org/commandlinehandler/general-startup;1?type=myapp", _xpcom_categories: [{ category: "command
-line-handler", // changeme: // category names are sorted alphabetically.
... typical command
-line handlers use a // category that begins with the letter "m".
-moz-border-left-colors - Archive of obsolete content
in mozilla applications like firefox, the -moz-border
-left-colors css property sets a list of colors for the left border.
... /* single <color> value */ -moz-border
-left-colors: #f0f0f0; /* multiple <color> values */ -moz-border
-left-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* global values */ -moz-border
-left-colors: inherit; -moz-border
-left-colors: initial; -moz-border
-left-colors: unset; when an element has a border that is larger than a single css pixel, each line of pixels uses the next color specified in this property, from the outside in.
...<hue> = <number> | <angle> example <div id="example">example</div> #example { padding: 20px; background-color: gray; border: 10px solid black; -moz-border-top-colors: #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0; -moz-border-right-colors: red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0; -moz-border-bottom-colors: red #f60 #f80 #f90 #fa0 #fb0 #fc0 #fd0 #fe0 #ff0; -moz-border
-left-colors: #e00 #c30 #c50 #c60 #c70 #c80 #c90 #ca0 #cb0 #cc0; } specifications this property is not part of any specification.
-ms-scroll-limit-x-max - Archive of obsolete content
the -ms-scroll
-limit-x-max css property is a microsoft extension that specifies the maximum value for the element.scrollleft property.
... initial valueautoapplies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values auto the maximum value for the scrollleft property is equal to element.scrollwidth.
... the specified behavior of the -ms-scroll
-limit-x-max property is only applicable at a mscontentzoomfactor of 1; the behavior of this property is undefined at other zoom factors.
-ms-scroll-limit-x-min - Archive of obsolete content
the -ms-scroll
-limit-x-min css property is a microsoft extension that specifies the minimum value for the element.scrollleft property.
... initial value0applies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values <length> the minimum value for the scrollleft property.
... the specified behavior of the -ms-scroll
-limit-x-min property is only applicable at a mscontentzoomfactor of 1; the behavior of this property is undefined at other zoom factors.
-ms-scroll-limit-y-max - Archive of obsolete content
the -ms-scroll
-limit-y-max css property is a microsoft extension that specifies the maximum value for the element.scrolltop property.
... initial valueautoapplies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values auto the maximum value for the scrolltop property is equal to element.scrollheight.
... the specified behavior of the -ms-scroll
-limit-y-max property is only applicable at a mscontentzoomfactor of 1; the behavior of this property is undefined at other zoom factors.
-ms-scroll-limit-y-min - Archive of obsolete content
the -ms-scroll
-limit-y-min css property is a microsoft extension that specifies the minimum value for the element.scrolltop property.
... initial value0applies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values <length> the minimum value for the scrolltop property.
... the specified behavior of the -ms-scroll
-limit-y-min property is only applicable at a mscontentzoomfactor of 1; the behavior of this property is undefined at other zoom factors.
:-moz-last-node - CSS: Cascading Style Sheets
the :-moz
-last-node css pseudo-class is a mozilla extension that represents any element that is the last child node of some other element.
... note: any whitespace at the end of an element is ignored for the determination of :-moz
-last-node.
... syntax :-moz
-last-node examples css span:-moz
-last-node { background-color: lime; } html <p> <span>this does not match.</span> <span>this matches!</span> </p> <p> <span>this doesn't match because it's followed by text.</span> blahblah.
::-webkit-meter-even-less-good-value - CSS: Cascading Style Sheets
the ::-webkit-meter-even
-less-good-value gives a red color to a <meter> element when the value and the optimum attributes fall outside the low-high range, but in opposite zones.
... syntax ::-webkit-meter-even
-less-good-value specifications not part of any standard.
... examples html <meter min="0" max="10" value="6">score out of 10</meter> css meter::-webkit-meter-even
-less-good-value { background: linear-gradient(to bottom, #f77, #d44 45%, #d44 55%, #f77); height: 100%; box-sizing: border-box; } result ...
scroll-margin-left - CSS: Cascading Style Sheets
the scroll-margin
-left property defines the left margin of the scroll snap area that is used for snapping this box to the snapport.
... syntax /* <length> values */ scroll-margin
-left: 10px; scroll-margin
-left: 1em; /* global values */ scroll-margin
-left: inherit; scroll-margin
-left: initial; scroll-margin
-left: unset; values <length> an outset from the left edge of the scroll container.
... formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin
-left' in that specification.
scroll-padding-left - CSS: Cascading Style Sheets
the scroll-padding
-left property defines offsets for the left of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
... syntax /* keyword values */ scroll-padding
-left: auto; /* <length> values */ scroll-padding
-left: 10px; scroll-padding
-left: 1em; scroll-padding
-left: 10%; /* global values */ scroll-padding
-left: inherit; scroll-padding
-left: initial; scroll-padding
-left: unset; values <length-percentage> an inwards offset from the left edge of the scrollport, as a valid length or a percentage.
...al valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding
-left' in that specification.
table-layout - CSS: Cascading Style Sheets
the table
-layout css property sets the algorithm used to lay out <table> cells, rows, and columns.
... syntax /* keyword values */ table
-layout: auto; table
-layout: fixed; /* global values */ table
-layout: inherit; table
-layout: initial; table
-layout: unset; values auto by default, most browsers use an automatic table layout algorithm.
... html <table> <tr><td>ed</td><td>wood</td></tr> <tr><td>albert</td><td>schweitzer</td></tr> <tr><td>jane</td><td>fonda</td></tr> <tr><td>william</td><td>shakespeare</td></tr> </table> css table { table
-layout: fixed; width: 120px; border: 1px solid red; } td { border: 1px solid blue; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } result specifications specification status comment css level 2 (revision 1)the definition of 'table
-layout' in that specification.
Accept-CH-Lifetime - HTTP
the accept-ch
-lifetime header is set by the server to specify the persistence of accept-ch header value that specifies for which client hints headers client should include in subsequent requests.
...accept-ch and accept-ch
-lifetime headers should be persisted for all secure requests to ensure client hints are sent reliably.
... syntax accept-ch
-lifetime: <age> examples accept-ch: viewport-width, dpr accept-ch
-lifetime: 86400 ...
Content-Length - HTTP
the content
-length entity header indicates the size of the entity-body, in bytes, sent to the recipient.
... header type entity header forbidden header name yes syntax content
-length: <length> directives <length> the length in decimal number of octets.
... specifications specification title rfc 7230, section 3.3.2: content
-length hypertext transfer protocol (http/1.1): message syntax and routing ...
-ms-content-zoom-limit-max - Archive of obsolete content
the -ms-content-zoom
-limit-max css property is a microsoft extension that specifies the selected elements' maximum zoom factor.
... initial value400%applies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednopercentagesthe largest allowed zoom factor.
-ms-content-zoom-limit-min - Archive of obsolete content
the -ms-content-zoom
-limit-min css property is a microsoft extension that specifies the minimum zoom factor.
... initial value100%applies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednopercentagesthe smallest allowed zoom factor.
reader.parse-on-load.force-enabled
the preference reader.parse-on
-load.force-enabled controls if the reader mode used in firefox mobile should be enabled independent of the memory available in the device.
<display-listitem> - CSS: Cascading Style Sheets
examples html <div class="fake
-list">i will display as a list item</div> css .fake
-list { display: list-item; list-style-position: inside; } result specifications specification status css display module level 3the definition of 'display
-listitem' in that specification.
Index
2 an overview of nss internals api, intermediate, intro, nss, tools a high
-level overview to the internals of network security services (nss) software developed by the mozilla.org projects traditionally used its own implementation of security protocols and cryptographic algorithms, originally called netscape security services, nowadays called network security services (nss).
... 199 nss tools nss newsgroup: mozilla.dev.tech.crypto 200 nss tools certutil certificates, x509v3 the certificate database tool is a command
-line utility that can create and modify the netscape communicator cert8.db and key3.db database files.
... 201 nss tools certutil-tasks newsgroup: mozilla.dev.tech.crypto 202 nss tools cmsutil the cmsutil command
-line utility uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
...And 64 more matches
HTML documentation index - HTML: Hypertext Markup Language
4 block
-level elements beginner, development, guide, html, html5, web html (hypertext markup language) elements historically were categorized as either "block
-level" elements or "inline
-level" elements.
... by default, a block
-level element occupies the entire space of its parent element (container), thereby creating a "block." this article helps to explain what this means.
... 6 date and time formats used in html date, element, format, html, iso 8601, input, reference, string, time, week, datetime, datetime
-local, del, ins, month, month-year, week-year certain html elements use date and/or time values.
...And 40 more matches
Index - Web APIs
user-supplied code is run in the audioworkletglobalscope global execution context in a separate web audio rendering thread along with other nodes, allowing for zero
-latency audio processing.
... 208 audioworkletnode.parameters api, audio, audioparam, audioworkletnode, experimental, property, reference, web audio api the read-only parameters property of the audioworkletnode interface returns the associated audioparammap — that is, a map
-like collection of audioparam objects.
... 286 blob api, blob, file, file api, interface, raw, reference, data a blob object represents a file
-like object of immutable, raw data; they can be read as text or binary data, or converted into a readablestream so its methods can be used for processing the data.
...And 39 more matches
Index - Archive of obsolete content
40 high
-level apis add-on sdk no summary!
... 68 low
-level apis no summary!
... 70 chrome the chrome module gives an add-on sdk add-on access to the components object, which in turn gives it access to a large set of privileged low
-level firefox apis.
...And 33 more matches
Index
5 bundling multiple binary components binary xpcom components are sometimes required to implement low
-level features for extensions.
... 61 xpconnect wrappers guide, needscontent, xpcom, xpcom:language bindings, xpconnect this document is a high
-level overview of xpconnect wrapper objects (for the more technical description see xpconnect security membranes).
... 68 withjsmodulesandchrome moved to howto 69 xpcshell reference automated testing, developing mozilla, javascript, javascript:tools, tools, xpcom:language bindings, xpconnect the command
-line syntax for xpcshell is: 70 xpcshell test manifest expressions qa, testing xpcshell unit tests are run by specifying them in a manifest file.
...And 25 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
4 alpn alpn, draft, glossary, needscontent, tls application
-layer protocol negotiation (alpn) is a tls extension which indicates what application layer protocol is negotiating the encryped connection without requiring additional round trips.
... 7 arpa glossary, infrastructure .arpa (address and routing parameter area) is a top
-level domain used for internet infrastructure purposes, especially reverse dns lookup (i.e., find the domain name for a given ip address).
... 20 application context codingscripting, glossary an application context is a top
-level browsing context that has a manifest applied to it.
...And 19 more matches
ARIA Test Cases - Accessibility
markup used: role="alert" aria
-labeledby notes: in the uiuc test example, the 'close' button cannot recieve focus.
...opera safari jaws 9 - - n/a n/a jaws 10 - - - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - slider single slider slider using in
-line images for thumb dojo nightly build simple slider pretty slider mindtrove rating widget paciello group slider expected at behavior: the user can navigate to the slider control in all modes.
... window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - tree dojo nightly build simple tree -- uses document structure to create hierarchy tree - subtrees are encapsulated in treeitems ms ie8 tree example we need an example that uses aria
-level, aria-setsize and aria-posinset to create the hierarchy we also need one that uses aria-owns to create the hierarchy / structure we need one that uses the document to create structure, but uses nested uls with links inside, and role="presentation" expected at behavior: if navigated to in a screen reader's virtual buffer, the label, role and previously active item of the tree should be ...
...And 18 more matches
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
one of the first things we learn about css is that some elements are block
-level and some are inline
-level.
... for example, an <h1> or a <p> are block
-level by default, and a <span> is inline
-level.
...the outer display type describes whether the element is block
-level or inline
-level.
...And 18 more matches
Border-radius generator - CSS: Cascading Style Sheets
border-radius html content <div id="container"> <div class="group section"> <div id="preview" class="col span_12"> <div id="subject"> <div id="top
-left" class="radius-container" data-x="left" data-y="top"> </div> <div id="top-right" class="radius-container" data-x="right" data-y="top"> </div> <div id="bottom-right" class="radius-container" data-x="right" data-y="bottom"> </div> <div id="bottom
-left" class="radius-container" data-x="left" data-y="bottom"> </div> <div id="radi...
...us-ui-sliders"> <div id="tlr" class="ui-input-slider" data-topic="top
-left" data-unit=" px" data-sensivity="2"></div> <div id="tlw" class="ui-input-slider" data-topic="top
-left-w" data-unit=" px" data-sensivity="2"></div> <div id="tlh" class="ui-input-slider" data-topic="top
-left-h" data-unit=" px" data-sensivity="2"></div> <div id="trr" class="ui-input-slider" data-topic="top-right" data-unit=" px" data-sensivity="2"></div> <div id="trw" class="ui-input-slider" data-topic="top-right-w" data-unit=" px" data-sensivity="2"></div> <div id="trh" class...
...vity="2"></div> <div id="brw" class="ui-input-slider" data-topic="bottom-right-w" data-unit=" px" data-sensivity="2"></div> <div id="brh" class="ui-input-slider" data-topic="bottom-right-h" data-unit=" px" data-sensivity="2"></div> <div id="blr" class="ui-input-slider" data-topic="bottom
-left" data-unit=" px" data-sensivity="2"></div> <div id="blw" class="ui-input-slider" data-topic="bottom
-left-w" data-unit=" px" data-sensivity="2"></div> <div id="blh" class="ui-input-slider" data-topic="bottom
-left-h" data-unit=" px" data-sensivity="2"></div> </div> ...
...And 15 more matches
The HTML autocomplete attribute - HTML: Hypertext Markup Language
"address
-line1", "address
-line2", "address
-line3" each individual line of the street address.
... "address
-level4" the finest-grained administrative level, in addresses which have four levels.
... "address
-level3" the third administrative level, in addresses with at least three administrative levels.
...And 15 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
<input type="date" name="date"/> html5 datetime
-local a control for entering a date and time, with no time zone.
... <input type="datetime
-local" name="datetime
-local"/> html5 email a field for editing an email address.
... <input type="number" name="number"/> html5 password a single
-line text field whose value is obscured.
...And 14 more matches
Getting started with HTML - Learn web development
playable code <h2>live output</h2> <div class="output" style="min-height: 50px;"> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="playable-code" style="min-height: 100px;width: 95%"> this is my text.
... </textarea> <div class="controls"> <input id="reset" type="button" value="reset" /> <input id="solution" type="button" value="show solution" /> </div> html { font-family: 'open sans light',helvetica,arial,sans-serif; } h2 { font-size: 16px; } .a11y
-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } var textarea = document.getelementbyid('code'); var reset = document.getelementbyid('reset'); var solution = document.getelementbyid('solution'); var output = document.queryselector('.output'); var code = textarea.value; var userentry = textarea.value; function updatecode() { output.innerhtml = textarea.value; } reset.addeventlistener('click', function() { textarea.value = code; userentry = textare...
... block versus inline elements there are two important categories of elements to know in html: block
-level elements and inline elements.
...And 13 more matches
NSS tools : signtool
synopsis signtool [-k keyname] -h -h
-l -l -m -v -w -g nickname -s size -b basename [[-c compression level] ] [[-d cert-dir] ] [[-i installer script] ] [[-m metafile] ] [[-x name] ] [[-f filename] ] [[-t|--token tokenname] ] [[-e extension] ] [[-o] ] [[-z] ] [[-x] ] [[--outfile] ] [[--verbose value] ] [[--norecurse] ] [[-
-leavearc] ] [[-j directory] ] [[-z jarfile] ] [[-o] ] [[-p password] ] [directory-tree] [archive] description the signing tool, signtool, creates digital signatures and uses a java archive (jar) file to associate the signatures with files in a directory.
...the directory to sign is always specified as the last command
-line argument.
...for example, you can use it with the
-l option to get detailed information about a particular signing certificate.
...And 13 more matches
XPCOM string functions
xpcom provides these low
-level string functions to let you work with strings; however, it's often better to use one of the string classes rather than directly using these functions.
...this is a low
-level api.ns_cstringclonedatathe ns_cstringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.ns_cstringcontainerfinishthe ns_cstringcontainerfinish function releases any memory allocated by a nscstringcontainer instance.ns_cstringcontainerinitthe ns_cstringcontainerinit function initializes a nscstringcontainer instance for use as a nsacstring.ns_cstringcontainerinit2the ns_cstringcontainerinit2 function initializes a nscstringcontainer instance for use as a nsacstring.ns_cstringcopythe ns_cstringcopy function copies the value from one nsacstring instance to another.
... this is a low
-level api.ns_cstringcutdatathe ns_cstringcutdata function removes a section of the string's internal buffer.
...And 13 more matches
Border-image generator - CSS: Cascading Style Sheets
id="preview_section" class="group section"> <div id="subject"> <div class="guideline" data-axis="y" data-topic="slice-top"></div> <div class="guideline" data-axis="x" data-topic="slice-right"></div> <div class="guideline" data-axis="y" data-topic="slice-bottom"></div> <div class="guideline" data-axis="x" data-topic="slice
-left"></div> </div> <div id="preview"> </div> </div> <!-- controls --> <div id="controls" class="group section"> <!-- border-image-slice --> <div id="border-slice-control" class="category"> <div class="title"> border-image-slice </div> <div class="property"> <div class="name...
...=================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-child { margin
-left: 0; } /* all browsers except ie6 and lower */ /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider * { float: left; height: 100%; line-height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px; text-align: center; -mo...
...z-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; text-transform: lowercase; } .ui-input-slider
-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right { background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center right no-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-input-slider-bt...
...And 13 more matches
WAI-ARIA basics - Learn web development
as an example, aria-required="true" specifies that a form input needs to be filled in to be valid, whereas aria
-labelledby="label" allows you to put an id on an element, then reference it as being the label for anything else on the page, including multiple elements, which is not possible using <label for="input">.
... as an example, you could use aria
-labelledby to specify that a key description contained in a <div> is the label for multiple table cells, or you could use it as an alternative to image alt text — specify existing information on the page as an image's alt text, rather than having to repeat it inside the alt attribute.
... dynamic content updates: screenreaders tend to have difficulty with reporting constantly changing content; with aria we can use aria
-live to inform screenreader users when an area of content is updated, e.g.
...And 12 more matches
L10n Checks
l10n checks is a python script and library similar to compare
-locales.
...if you want to test the localization for de, run: check
-l10n-completeness browser/locales/l10n.ini ../l10n/ de add-ons (xpi) mode l10n checks gathers the locales to compare from the chrome.manifest file inside the xpi file.
...if you want to test the localization for de, run: check
-l10n-completeness -i xpi my-extension.xpi de to check all locales in an extension: check
-l10n-completeness -i xpi my-extension.xpi language packs (xpis) mode l10n checks can compare two locales found in different xpi files.
...And 12 more matches
NSS tools : modutil
please contribute to the initial review in mozilla nss bug 836477[1] description the security module database tool, modutil, is a command
-line utility for managing pkcs #11 module information both within secmod.db files and within hardware tokens.
...use this option with the
-libfile, -ciphers, and -mechanisms arguments.
...
-list [modulename] display basic information about the contents of the secmod.db file.
...And 12 more matches
NSS tools : modutil
synopsis modutil [options] arguments description the security module database tool, modutil, is a command
-line utility for managing pkcs #11 module information both within secmod.db files and within hardware tokens.
...use this option with the
-libfile, -ciphers, and -mechanisms arguments.
...
-list [modulename] display basic information about the contents of the secmod.db file.
...And 12 more matches
ARIA live regions - Accessibility
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.
... 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.
... normally, only aria
-live="polite" is used.
...And 12 more matches
Using CSS gradients - CSS: Cascading Style Sheets
you can also create repeating gradients with the repeating
-linear-gradient(), repeating-radial-gradient(), and repeating-conic-gradient() functions.
... <div class="simple
-linear"></div> div { width: 120px; height: 120px; } .simple
-linear { background: linear-gradient(blue, pink); } changing the direction by default, linear gradients run from top to bottom.
... <div class="auto-spaced
-linear-gradient"></div> div { width: 120px; height: 120px; } .auto-spaced
-linear-gradient { background: linear-gradient(red, yellow, blue, orange); } positioning color stops you don't have to leave your color stops at their default positions.
...And 12 more matches
context-menu - Archive of obsolete content
when a top
-level item does not specify a context, the page context applies.
...each menu item you create in the top
-level context menu can have a content script.
... context value if the item is contained in the top
-level context menu, this declaratively specifies the context under which the item will appear; see specifying contexts above.
...And 11 more matches
NSS Tools modutil
using the security module database (modutil) newsgroup: mozilla.dev.tech.crypto the security module database tool is a command
-line utility for managing pkcs #11 module information within secmod.db files or within hardware tokens.
...
-list [modulename] display basic information about the contents of the secmod.db file.
...use this option with the
-libfile, -ciphers, and -mechanisms arguments.
...And 11 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
lect: none; user-select: none; } .ui-color-picker .picking-area { width: 198px; height: 198px; margin: 5px; border: 1px solid #ddd; position: relative; float: left; display: table; } .ui-color-picker .picking-area:hover { cursor: default; } /* hsv format - hue-saturation-value(brightness) */ .ui-color-picker .picking-area { background: url("images/picker_mask.png"); background: -moz
-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -moz
-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background: -webkit
-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -webkit
-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background: -ms
-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -ms
-linear-gradient(left, #fff 0%, rgba(255, ...
...255, 255, 0) 100%); background: -o
-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -o
-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background-color: #f00; } /* hsl format - hue-saturation
-lightness */ .ui-color-picker[data-mode='hsl'] .picking-area { background: -moz
-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -moz
-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background: -webkit
-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -webkit
-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background: -ms
-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100...
...%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -ms
-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background: -o
-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -o
-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background-color: #f00; } .ui-color-picker .picker { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 1px solid #fff; position: absolute; top: 45%; left: 45%; } .ui-color-picker .picker:before { width: 8px; height: 8px; content: ""; position: absolute; border: 1px solid #999; border-radius: 50%; } .ui-color-picker .hue, .ui-color-picker .alpha { width: 198px; height: 28px; margin: 5px; bord...
...And 11 more matches
writing-mode - CSS: Cascading Style Sheets
this property specifies the block flow direction, which is the direction in which block
-level containers are stacked, and the direction in which inline
-level content flows within a block container.
... thus, it also determines the ordering of block
-level content.
... syntax /* keyword values */ writing-mode: horizontal-tb; writing-mode: vertical-rl; writing-mode: vertical
-lr; /* global values */ writing-mode: inherit; writing-mode: initial; writing-mode: unset; the writing-mode property is specified as one of the values listed below.
...And 11 more matches
HTML text fundamentals - Learn web development
playable code <h2>live output</h2> <div class="output" style="min-height: 50px;"> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="input" style="min-height: 100px; width: 95%">my short story i am a statistician and my name is trish.
... my legs are made of cardboard and i am married to a fish.</textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y
-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } var textarea = document.getelementbyid('code'); var reset = document.getelementbyid('reset'); var solution = document.getelementbyid('solution'); var output = document.queryselector('.output'); var code = textarea.value; var userentry = textarea.value; function updatecode() { output.innerhtml = textarea.value; } reset.addeventlistener('click', function() { textarea.value = c...
... playable code <h2>live output</h2> <div class="output" style="min-height: 50px;"> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="input" style="min-height: 100px; width: 95%">milk eggs bread hummus</textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: ...
...And 10 more matches
The JavaScript input interpreter - Firefox Developer Tools
it has two modes: single
-line entry and multi
-line entry.
... single
-line mode for single
-line entry, you can type javascript expressions in the field at the bottom of the console log, at the >> prompt.
... to enter expressions in single
-line mode, type at the prompt and press enter.
...And 10 more matches
Box-shadow generator - CSS: Cascading Style Sheets
efore"> :before <span class="delete" data-type="disable"></span> </div> <div class="button" id="after" data-type="subject" data-title=":after"> :after <span class="delete" data-type="disable"></span> </div> <div class="ui-checkbox" data-topic='before' data
-label=":before"></div> <div class="ui-checkbox" data-topic='after' data
-label=":after"></div> </div> <div id="preview"> <div id="obj-element"> <div class="content"> </div> <div id="obj-before"> </div> <div id="obj-after"> </div> </div> </div> </div...
...> </div> <div id="controls" class="group section"> <div class="wrap
-left"> <div class="colorpicker category"> <div class="title"> </div> <div id="colorpicker" class="group"> <div id="gradient" class="gradient"> <div id="gradient_picker"> </div> </div> <div id="hue" data-topic="hue" class="hue"> <div id="hue_selector"> </div> </div> <div class="info"> <div class="input" data-topic="hue" data-title='h:' data-action="hsv"></div> <div class="input" data-topic="saturation" data-title='s:' data-action="hsv"></div> <div cl...
...eight" data-type="add"></div> <div class="ui-slider-input" data-topic="height" data-unit="px"></div> </div> </div> </div> <div id="output" class="category"> <div id="menu" class="menu"></div> <div class="title"> css code </div> <div class="group" style="border-top
-left-radius: 0;"> <div class="output" data-topic="element" data-name="element" data-prop="width height background-color position=[relative] box-shadow"> </div> <div class="output" data-topic="before" data-name="element:before" data-prop="content=[""] position=[absolute] width height...
...And 10 more matches
CSS reference - CSS: Cascading Style Sheets
basic rule syntax style rule syntax style-rule ::= selectors
-list { properties
-list } ...
... where : selectors
-list ::= selector[:pseudo-class] [::pseudo-element] [, selectors
-list] properties
-list ::= [property : value] [; properties
-list] see the index of selectors, pseudo-classes, and pseudo-elements below.
... style rule examples strong { color: red; } div.menu-bar li:hover > ul { display: block; } for a beginner
-level introduction to the syntax of selectors, see our guide on css selectors.
...And 10 more matches
content - CSS: Cascading Style Sheets
non
-latin characters must be encoded using their unicode escape sequences: for example, \000a9 represents the copyright symbol.
...otherwise, for uri values, the absolute uri; for attr() values, the resulting string; for other keywords, as specified.animation typediscrete formal syntax normal | none | [ <content-replacement> | <content
-list> ] [/ <string> ]?where <content-replacement> = <image><content
-list> = [ <string> | contents | <image> | <quote> | <target> | <leader()> ]+where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient><quote> = open-quote | close-quote | no-open-quote | no-close-quote<target> = <target-counter()> | <target-counters()> | <target-text()><leader()> = lea...
...)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()><target-counter()> = target-counter( [ <string> | <url> ] , <custom-ident> , <counter-style>?
...And 10 more matches
HTTP Index - HTTP
found 277 pages: # page tags and summary 1 http http, hypertext, reference, tcp/ip, web, web development, l10n:priority hypertext transfer protocol (http) is an application
-layer protocol for transmitting hypermedia documents, such as html.
...in http/1.x, there are several models: short
-lived connections, persistent connections, and http pipelining.
... 38 using feature policy feature policy, feature-policy, http, reference, security, header feature policy allows you to control which origins can use which features, both in the top
-level page and in embedded frames.
...And 10 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
please see //(german) http://interop.blog.de/2010/02/13/kapitel-1
-ldap-anfragen
-linux-ad-8001564/ //or search the net how to do it.
...nt1" ); defaultpref("mail.smtp.defaultserver", "smtp1" ); defaultpref("mail.smtpservers", "smtp1" ); // close the try, and call the catch() } catch(e) { displayerror("lockedpref", e); } test autoconfig debug to check that our autoconfig works fine, we just set to env variable to check the read of thunderbird.cfg file: $ export nspr_log_modules=mcd:5 $ export nspr_log_file=/tmp/thunderbird
-log.txt when thunderbird has started, you should read: $ cat /tmp/thunderbird
-log.txt -1209403040[808a788]: general.config.filename = thunderbird.cfg -1209403040[808a788]: evaluating .cfg file thunderbird.cfg with obscurevalue 0 clean then, to be sure to start with a fresh thunderbird account, don't do this if you already have one and want to preserve your emails and preferences!
... firefox 22 omni.jar archive file became omni.ja since http://blog.ffextensionguru.com/2011/11/16/omni-jar-to-become-omni-ja/ [root@localhost firefox]# unzip
-l /usr/lib/firefox/browser/omni.ja | grep defaults/pr warning [/usr/lib/firefox/browser/omni.ja]: 3598815 extra bytes at beginning or within zipfile (attempting to process anyway) error [/usr/lib/firefox/browser/omni.ja]: reported length of central directory is -3598815 bytes too long (atari stzip zipfile?
...And 9 more matches
Localization content best practices
the string 'privacy
-link' will be used as text for this link.
...the string 'privacy
-link' will be used as text for this link.
...privacy
-link = privacy terms file-wide comments should use the same format, they should be at the top of the file (after the license header) and just drop the (entity name/key) reference.
...And 9 more matches
NSS tools : certutil
name certutil — manage keys and certificate in both nss databases and other nss tokens synopsis certutil [options] [[arguments]] description the certificate database tool, certutil, is a command
-line utility that can create and modify certificate and key databases.
...
-l list all the certificates, or display information about a named certificate, in a certificate database.
...used with the
-l command option.
...And 9 more matches
Recommended Drag Types - Web APIs
dragging links dragged hyperlinks should include data of two types: text/uri
-list, and text/plain.
...for example: var dt = event.datatransfer; dt.setdata("text/uri
-list", "https://www.mozilla.org"); dt.setdata("text/plain", "https://www.mozilla.org"); as usual, set the text/plain type last, as a fallback for the text/uri
-list type.
... note: the url type is uri
-list with an i, not an l.
...And 9 more matches
background - CSS: Cascading Style Sheets
it also applies to ::first
-letter and ::first
-line.inheritednopercentagesas each of the properties of the shorthand:background-position: refer to the size of the background positioning area minus size of background image; size refers to the width for horizontal offsets and to the height for vertical offsetsbackground-size: relative to the background positioning areacomputed valueas each of the properties of the shorthand:bac...
...round-color: computed coloranimation typeas each of the properties of the shorthand:background-color: a colorbackground-image: discretebackground-clip: discretebackground-position: repeatable list of simple list of length, percentage, or calcbackground-size: repeatable list of simple list of length, percentage, or calcbackground-repeat: discretebackground-attachment: discrete formal syntax [ <bg
-layer> , ]* <final-bg
-layer>where <bg
-layer> = <bg-image> | <bg-position> [ / <bg-size> ]?
... | <repeat-style> | <attachment> | <box> | <box><final-bg
-layer> = <'background-color'> | <bg-image> | <bg-position> [ / <bg-size> ]?
...And 9 more matches
StringView - Archive of obsolete content
the aims of this library are: to create a c
-like interface for strings (i.e., an array of character codes — an arraybufferview in javascript) based upon the javascript arraybuffer interface to create a highly extensible library that anyone can extend by adding methods to the object stringview.prototype to create a collection of methods for such string
-like objects (since now: stringviews) which work strictly on arrays of numbers rather than on creating new immutable javascript strings to work with unicode encodings other than javascript's default utf-16 domstrings introduction as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times wh...
...*/ ntranscrtype = 7; } conversionswitch: switch (ntranscrtype) { case 0: /* both the source and the new stringview have a fixed
-length encoding...
... */ awhole = new ftaview(noutptlen); for (var noutptidx = 0; noutptidx < noutptlen; awhole[noutptidx] = vsource[nstartidx + noutptidx++]); break conversionswitch; case 1: /* the source has a fixed
-length encoding but the new stringview has a variable
-length encoding...
...And 8 more matches
CSS3 - Archive of obsolete content
new pseudo-classes: :target, :enabled and :disabled, :checked, :indeterminate, :root, :nth-child and :nth
-last-child, :nth-of-type and :nth
-last-of-type, :last-child, :first-of-type and :last-of-type, :only-child and :only-of-type,:empty, and :not.
... pseudo-elements are now characterized by two colons rather than one: :after becomes ::after, :before becomes ::before, :first
-letter becomes ::first
-letter, and :first
-line becomes ::first
-line.
... the choice of language-specific glyphs via the css font
-language-override property.
...And 8 more matches
Getting started with React - Learn web development
jsx extends javascript's syntax so that html
-like code can live alongside it.
... setting up your first react app there are many ways to use react, but we're going to use the command
-line interface (cli) tool create-react-app, as mentioned earlier, which expedites the process of developing a react application by installing some packages and creating some files for you, handling the tooling described above.
...its initial file structure looks like this: moz-todo-react ├── readme.md ├── node_modules ├── package.json ├── package
-lock.json ├── .gitignore ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json └── src ├── app.css ├── app.js ├── app.test.js ├── index.css ├── index.js ├── logo.svg └── serviceworker.js the src directory is where we'll spend most of our time, as it's where the source c...
...And 8 more matches
Command line crash course - Learn web development
it provides direct access to the computer’s underlying file system and low
-level features, and is therefore incredibly useful for performing complex tasks rapidly, if you know what you are doing.
...darwin is the unix
-like system, which provides the terminal, and access to the low
-level tools.
... windows has traditionally had its own terminal
-like program called cmd (“the command prompt”) for a long time, but this definitely doesn’t have parity with unix commands, and is equivalent to the old-style windows dos prompt.
...And 8 more matches
Creating localizable web applications
don't forget about right-to
-left locales.
...you can use one or more of the following techniques: http accept
-language headers, the ua string, ip geolocation.
...good: body.de foo, body.fr foo, body.pl foo { /* locale-specific rules for the foo element */ width: 10em; /* originally 8em */ } adapt the interaction to rtl locales right-to
-left locales not only require good images handling (see images), but also should be taken into account when designing the interaction on the website.
...And 8 more matches
Coordinate systems - CSS: Cascading Style Sheets
on the web, the default origin is the top
-left corner of a given context (with positive y-coordinate values being below the origin).
... note that this is unlike most mathematical models, where the origin is at the bottom
-left corner, with positive y-coordinate values being above the origin.
... offset coordinates specified using the "offset" model use the top
-left corner of the element being examined, or on which an event has occurred.
...And 8 more matches
Stacking context example 3 - CSS: Cascading Style Sheets
« css « understanding css z-index stacking context example 3 this last example shows problems that arise when mixing several positioned elements in a multi
-level html hierarchy and when z-indexes are assigned using class selectors.
... let's take as an example a three
-level hierarchical menu made from several positioned divs.
... second
-level and third
-level divs appear when hovering or clicking on their parents.
...And 8 more matches
Mozilla CSS extensions - CSS: Cascading Style Sheets
b -moz-binding -moz-border-bottom-colors -moz-border
-left-colors -moz-border-right-colors -moz-border-top-colors -moz-box-align -moz-box-direction -moz-box-flex -moz-box-ordinal-group -moz-box-orient -moz-box-pack c–i -moz-context-properties -moz-float-edge -moz-force-broken-image-icon -moz-image-region o -moz-orient -moz-osx-font-smoothing -moz-outline-radius -moz-outline-radius-bottomleft -moz-outline-radius-bottomr...
...till accepted] -moz-column-rule [prefixed version still accepted] -moz-column-rule-width [prefixed version still accepted] -moz-column-rule-style [prefixed version still accepted] -moz-column-rule-color [prefixed version still accepted] -moz-context-properties f–m filter [applying to more than svg] -moz-font-feature-settings [prefixed version still accepted] -moz-font
-language-override [prefixed version still accepted] -moz-hyphens [prefixed version still accepted] -moz-margin-end [superseded by the standard version margin-inline-end] -moz-margin-start [superseded by the standard version margin-inline-start] mask [applying to more than svg] o -moz-opacityobsolete since gecko 1.9.1 -moz-outlineobsolete since gecko 1.9.2 -moz-outline-colorob...
...dthobsolete since gecko 1.9.2 p -moz-padding-end [superseded by the standard version padding-inline-start] -moz-padding-start [superseded by the standard version padding-inline-end] -moz-perspective [prefixed version still accepted] -moz-perspective-origin [prefixed version still accepted] pointer-events [applying to more than svg] t–u -moz-tab-size -moz-text-align
-lastobsolete since gecko 53 -moz-text-decoration-colorobsolete since gecko 39 -moz-text-decoration
-lineobsolete since gecko 39 -moz-text-decoration-styleobsolete since gecko 39 -moz-text-size-adjust -moz-transform [prefixed version still accepted] -moz-transform-origin [prefixed version still accepted] -moz-transform-style [prefixed version still accepted] -moz-transition [prefixe...
...And 8 more matches
XUL Migration Guide - Archive of obsolete content
next, we'll look at some of the main tasks involved in migrating: working with content scripts using the sdk's supported apis how to go beyond the supported apis when necessary, by: using third party modules using the sdk's low
-level apis getting direct access to xpcom finally, we'll walk through a simple example.
... if your add-on needs a lot of help from third party packages, low
-level apis, or xpcom, then the cost of migrating is high, and may not be worth it at this point.
... by using the sdk's low
-level apis you can directly modify the browser chrome.
...And 7 more matches
Appendix: What you should know about open-source software licenses - Archive of obsolete content
the table below shows a few well-known software titles and their licenses license representative software titles modified bsd freebsd, netbsd, openbsd mpl firefox, thunderbird (also triple
-licensed mpl/lgpl/gpl) gpl linux kernel, gimp lgpl gtk+, openoffice.org modified bsd license this license permits free duplication, distribution, and modification provided that a copyright statement and liability disclaimer are included.
... modifications to bsd
-licensed software can be published under commercial licenses or other different licenses.
... pros and cons the modified bsd license was originally created by the university of california at berkeley for distributing a unix
-like operating system.
...And 7 more matches
Advanced form styling - Learn web development
<input type="color"> date-related controls such as <input type="datetime
-local"> <input type="range"> <input type="file"> <progress> and <meter> let's first talk about the appearance property, which is pretty useful for making all of the above more stylable.
... appearance: controlling os
-level styling in the previous article we said that historically, styling of web form controls was largely taken from the underlying operating system, which is part of the problem with customizing the look of these controls.
... the appearance property was created as a way to control what os- or system
-level styling was applied to web form controls.
...And 7 more matches
Beginning our React todo list - Learn web development
the jsx copy the following snippet to your clipboard, then paste it into app.js so that it replaces the existing app() function: function app(props) { return ( <div classname="todoapp stack
-large"> <h1>todomatic</h1> <form> <h2 classname="label-wrapper"> <label htmlfor="new-todo-input" classname="label__lg"> what needs to be done?
...an> </button> <button type="button" classname="btn toggle-btn" aria-pressed="false"> <span classname="visually-hidden">show </span> <span>completed</span> <span classname="visually-hidden"> tasks</span> </button> </div> <h2 id="list-heading"> 3 tasks remaining </h2> <ul role="list" classname="todo
-list stack
-large stack-exception" aria
-labelledby="list-heading" > <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-0" type="checkbox" defaultchecked={true} /> <label classname="todo
-label" htmlfor="todo-0"> eat </label> </div> <div classname="btn-group"> <button...
...assname="visually-hidden">eat</span> </button> <button type="button" classname="btn btn__danger"> delete <span classname="visually-hidden">eat</span> </button> </div> </li> <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-1" type="checkbox" /> <label classname="todo
-label" htmlfor="todo-1"> sleep </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edit <span classname="visually-hidden">sleep</span> </button> <button type="button" classname="btn btn__danger"> delete <span classname="visually-hidden">sleep</span> ...
...And 7 more matches
Storage access policy: Block cookies from trackers
second, firefox uses an additional "entity list", which prevents domains from being classified as trackers when they are loaded on a top
-level site owned by the same organization.
... browser caches: the http cache, the image cache, and the alternative services (alt-svc) cache are all partitioned for tracking resources, such that each top
-level origin will have a separate partition and tracking resources on different top
-level origins will be cached separate from each other.
... http connection reuse by domains classified as trackers is limited to requests that occur under the same top
-level origin.
...And 7 more matches
certutil
synopsis certutil [options] arguments description the certificate database tool, certutil, is a command
-line utility that can create and modify certificate and key database files.
...
-l list all the certificates, or display information about a named certificate, in a certificate database.
...
-l display detailed information when validating a certificate with the -v option.
...And 7 more matches
Rhino scopes and contexts
execution of scripts requires a scope for top
-level script variable storage as well as a place to find standard objects like function and object.
... a top
-level scope is created by calling context.initstandardobjects to create all the standard objects: scriptableobject scope = cx.initstandardobjects(); the easiest way to embed rhino is just to create a new scope this way whenever you need one.
... for a more concrete example, let's consider the following script: var g = 7; function f(a) { var v = 8; x = v + a; } f(6); we have a top
-level variable g, and the call to f will create a new top
-level variable x.
...And 7 more matches
prefix - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
... , <color-stop
-list> )<radial-gradient()> = radial-gradient( [ <ending-shape> | <size> ]?
...And 7 more matches
background-image - CSS: Cascading Style Sheets
it also applies to ::first
-letter and ::first
-line.inheritednocomputed valueas specified, but with <url> values made absoluteanimation typediscrete formal syntax <bg-image>#where <bg-image> = none | <image>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
...And 7 more matches
border-image-source - CSS: Cascading Style Sheets
it also applies to ::first
-letter.inheritednocomputed valuenone or the image with its uri made absoluteanimation typediscrete formal syntax none | <image>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
...)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
...And 7 more matches
display - CSS: Cascading Style Sheets
keyword values are grouped into six value categories: .container { display: [ <display-outside> || <display-inside> ] | <display
-listitem> | <display-internal> | <display-box> | <display
-legacy> ; } outside <display-outside> these keywords specify the element’s outer display type, which is essentially its role in flow layout.
...it defines a block
-level box.
... list item <display
-listitem> the element generates a block box for the content and a separate list-item inline box.
...And 7 more matches
mask - CSS: Cascading Style Sheets
omposite: as specifiedanimation typeas each of the properties of the shorthand:mask-image: discretemask-mode: discretemask-repeat: discretemask-position: repeatable list of simple list of length, percentage, or calcmask-clip: discretemask-origin: discretemask-size: repeatable list of simple list of length, percentage, or calcmask-composite: discretecreates stacking contextyes formal syntax <mask
-layer>#where <mask
-layer> = <mask-reference> | <position> [ / <bg-size> ]?
...)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()><box> = border-box | padding-box | content-boxwhere <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-to...
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
...And 7 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
one of the allowed methods: get head post apart from the headers automatically set by the user agent (for example, connection, user-agent, or the other headers defined in the fetch spec as a “forbidden header name”), the only headers which are allowed to be manually set are those which the fetch spec defines as a “cors-safelisted request-header”, which are: accept accept
-language content
-language content-type (but note the additional requirements below) dpr downlink save-data viewport-width width the only allowed values for the content-type header are: application/x-www-form-urlencoded multipart/form-data text/plain no event listeners are registered on any xmlhttprequestupload object used in the request; these are accessed using the ...
... note: webkit nightly and safari technology preview place additional restrictions on the values allowed in the accept, accept
-language, and content
-language headers.
...what values webkit/safari consider “nonstandard” is not documented, except in the following webkit bugs: require preflight for non-standard cors-safelisted request headers accept, accept
-language, and content
-language allow commas in accept, accept
-language, and content
-language request headers for simple cors switch to a blacklist model for restricted accept headers in simple cors requests no other browsers implement these extra restrictions, because they’re not part of the spec.
...And 7 more matches
HTTP Messages - HTTP
http requests, and responses, share similar structure and are composed of: a start
-line describing the requests to be implemented, or its status of whether successful or a failure.
... this start
-line is always a single line.
...the presence of the body and its size is specified by the start
-line and http headers.
...And 7 more matches
Images, Tables, and Mysterious Gaps - Archive of obsolete content
cuments authored in xhtml strict or html strict will trigger the "standards" rendering mode, so we're going to go through two basic ways to address the problem in strict documents, and a number of ways to call on these "fixes." setting images to be blocks the first choice, and one that will work for most graphically-intense designs, is to convert the image from being an inline element to a block
-level element.
...unfortunately, the buttons in the top cell are all now block
-level and so end up stacked on top of one another instead of being shown side-by-side.
... one potential solution is to add a class to any image that needs to be block
-level and then write the rule to match.
...And 6 more matches
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
mk_add_options moz_build_projects="xulrunner mccoy" mk_add_options moz_objdir=@topsrcdir@/../mccoybase # global options ac_add_options --enable-debug ac_add_options --disable-optimize # xulrunner options ac_add_app_options xulrunner --enable-application=xulrunner # mccoy options ac_add_app_options mccoy --enable-application=mccoy ac_add_app_options mccoy --with
-libxul-sdk=../xulrunner/dist the first section tells mozilla what to build and where to put the resulting object files.
...you shouldn't have to change the value of --with
-libxul-sdk if you are building your own xulrunner.
...mk_add_options moz_co_projects=browser mk_add_options moz_objdir=@topsrcdir@/../mccoybase # options for 'configure' (same as command
-line options).
...And 6 more matches
TLD - MDN Web Docs Glossary: Definitions of Web-related terms
a tld (top
-level domain) is the most generic domain in the internet's hierarchical dns (domain name system).
... consider an example internet address: https://developer.mozilla.org here org is the tld; mozilla.org is the second
-level domain name; and developer is a subdomain name.
... iana today distinguishes the following groups of top
-level domains: country-code top
-level domains (cctld) two-character domains established for countries or territories.
...And 6 more matches
Handling different text directions - Learn web development
english or french) better than right-to
-left languages (such as arabic).
... in recent years however, css has evolved in order to better support different directionality of content, including right-to
-left but also top-to-bottom content (such as japanese) — these different directionalities are called writing modes.
... vertical-rl: right-to
-left block flow direction.
...And 6 more matches
Pseudo-classes and pseudo-elements - Learn web development
the ::first
-line pseudo-element selector will do this for you reliably — if the number of words increases and decreases it will still only select the first line.
... combining pseudo-classes and pseudo-elements if you wanted to make the first line of the first paragraph bold you could chain the :first-child and ::first
-line selectors together.
... article p:first-child::first
-line { font-size: 120%; font-weight: bold; } generating content with ::before and ::after there are a couple of special pseudo-elements, which are used along with the content property to insert content into your document using css.
...And 6 more matches
Starting our Svelte Todo list app - Learn web development
copy and paste the following into our todos.svelte component file, replacing the existing content: <!-- todos.svelte --> <div class="todoapp stack
-large"> <!-- newtodo --> <form> <h2 class="label-wrapper"> <label for="todo-0" class="label__lg"> what needs to be done?
...an> <span class="visually-hidden">tasks</span> </button> <button class="btn toggle-btn" aria-pressed="false"> <span class="visually-hidden">show</span> <span>completed</span> <span class="visually-hidden">tasks</span> </button> </div> <!-- todosstatus --> <h2 id="list-heading">2 out of 3 items completed</h2> <!-- todos --> <ul role="list" class="todo
-list stack
-large" aria
-labelledby="list-heading"> <!-- todo-1 (editing mode) --> <li class="todo"> <div class="stack-small"> <form class="stack-small"> <div class="form-group"> <label for="todo-1" class="todo
-label"> new name for 'create a svelte starter app' </label> <input type="text" id="todo-1" autocomplete="off"...
...pe="submit"> save <span class="visually-hidden">new name for create a svelte starter app</span> </button> </div> </form> </div> </li> <!-- todo-2 --> <li class="todo"> <div class="stack-small"> <div class="c-cb"> <input type="checkbox" id="todo-2" checked/> <label for="todo-2" class="todo
-label"> create your first component </label> </div> <div class="btn-group"> <button type="button" class="btn"> edit <span class="visually-hidden">create your first component</span> </button> <button type="button" class="btn btn__danger"> delete <span class="visually-hidden">create you...
...And 6 more matches
Localizing without a specialized tool
getting started with compare
-locales you are going to need to create the structure of your localization, where, one-by-one, each of the files needing localization will be copied.
...you will use a tool called compare
-locales to do the comparison between your locale's files and the en-us reference.
... first, install compare
-locales.
...And 6 more matches
NSS Tools certutil
using the certificate database tool the certificate database tool is a command
-line utility that can create and modify the netscape communicator cert8.db and key3.db database files.
...
-l list all the certificates, or display information about a named certificate, in a certificate database.
...
-l display detailed information when validating a certificate with the -v option.
...And 6 more matches
Detailed XPCOM hashtable guide
in these situations, an array, a linked
-list, or various tree data structures are more efficient.
... mozilla's hashtable implementations mozilla has several hashtable implementations, which have been tested and, tuned, and hide the inner complexities of hashtable implementations: pldhash - low
-level c api; stores keys and data in one large memory structure; uses the heap efficiently; client must declare an "entry class" and may not hold onto entry pointers.
... plhashtable - low
-level c api; entry class pointers are constant; more efficient for large entry structures; often wastes memory making many small heap allocations.
...And 6 more matches
nsIBidiKeyboard
a user is a bidirectional writer if they have keyboard layouts in both left-to-right and right-to
-left directions (that is users who use arabic, iranian (persian), or israel (hebrew) keyboard layout, beside an us (english) layout.) inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) method overview boolean islangrtl(); void setlangfrombidilevel(in pruint8 alevel); attributes attribute type description havebidikeyboards boolean indicates whether or not the system has at least one keyboard for each direction (left-to-right and right...
...-to
-left) installed.
... methods islangrtl() determines if the current keyboard language is right-to
-left.
...And 6 more matches
Drag Operations - Web APIs
for instance, a drop target that accepts links would check for the type text/uri
-list.
... const dt = event.datatransfer; dt.setdata("application/x.bookmark", bookmarkstring); dt.setdata("text/uri
-list", "https://www.mozilla.org"); dt.setdata("text/plain", "https://www.mozilla.org"); here, data is added in three different types.
... note that both the text/uri
-list and text/plain contain the same data in this example.
...And 6 more matches
ARIA: Region role - Accessibility
<div role="region" aria
-label="example"> <!-- region content --> </div> description the region role is an aria landmark role.
... every element with a region role should include a label that describes the purpose of the content in the region, preferably with an aria
-labelledby referencing a visible header.
... if no visible appropriate header is present, aria
-label should be used..
...And 6 more matches
-webkit-box-reflect - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
... , <color-stop
-list> )<radial-gradient()> = radial-gradient( [ <ending-shape> | <size> ]?
...And 6 more matches
additive-symbols - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
... , <color-stop
-list> )<radial-gradient()> = radial-gradient( [ <ending-shape> | <size> ]?
...And 6 more matches
negative - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
... , <color-stop
-list> )<radial-gradient()> = radial-gradient( [ <ending-shape> | <size> ]?
...And 6 more matches
pad - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
... , <color-stop
-list> )<radial-gradient()> = radial-gradient( [ <ending-shape> | <size> ]?
...And 6 more matches
suffix - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
... , <color-stop
-list> )<radial-gradient()> = radial-gradient( [ <ending-shape> | <size> ]?
...And 6 more matches
symbols - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
... , <color-stop
-list> )<radial-gradient()> = radial-gradient( [ <ending-shape> | <size> ]?
...And 6 more matches
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
we add margins, padding, and borders using these physical properties of margin
-left, padding
-left, and so on.
...the writing-mode property can have values of: horizontal-tb vertical-rl vertical
-lr sideways-rl sideways
-lr the value horizontal-tb is the default for text on the web.
... 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 100px); grid-template-rows: repeat(2, 100px); grid-gap: 10px; } <div class="wrapper"> <div class="item1">item 1</div> <div class="item2">item 2</div> <div class="item3">item 3</div> <div class="item4">item 4</div> <div class="item5">item 5</div> </div> if we add writing-mode: vertical
-lr to the grid container, we can see that the block and inline axis are now running in a different direction.
...And 6 more matches
Visual formatting model - CSS: Cascading Style Sheets
note however that block boxes, block
-level boxes and box containers are all subtly different; see the block boxes section below for more details.
... normal flow in css, the normal flow includes block
-level formatting of block boxes, inline
-level formatting of inline boxes, and also includes relative and sticky positioning of block
-level and inline
-level boxes.
... the interactions between block
-level and inline
-level boxes are described in the mdn documentation for display.
...And 6 more matches
WebKit CSS extensions - CSS: Cascading Style Sheets
der-end** -webkit-border-end-color** -webkit-border-end-style** -webkit-border-end-width** -webkit-border-fit -webkit-border-horizontal-spacing -webkit-border-start** -webkit-border-start-color** -webkit-border-start-style** -webkit-border-start-width** -webkit-border-vertical-spacing -webkit-box-align** -webkit-box-direction** -webkit-box-flex-group** -webkit-box-flex** -webkit-box
-lines** -webkit-box-ordinal-group** -webkit-box-orient** -webkit-box-pack** -webkit-box-reflect** c -webkit-column-axis -webkit-column-break-after -webkit-column-break-before -webkit-column-break-inside -webkit-column-progression -webkit-cursor-visibility d-i -webkit-dashboard-region -webkit-font-size-delta -webkit-font-smoothing -webkit-highlight -webkit-hyphenate-character ...
... -webkit-hyphenate
-limit-after -webkit-hyphenate
-limit-before -webkit-hyphenate
-limit
-lines -webkit-initial
-letter l -webkit
-line-align -webkit
-line-box-contain -webkit
-line-clamp -webkit
-line-grid -webkit
-line-snap -webkit
-locale -webkit
-logical-height -webkit
-logical-width m -webkit-margin-after-collapse -webkit-margin-after -webkit-margin-before-collapse -webkit-margin-before -webkit-margin-bottom-collapse -webkit-margin-collapse -webkit-margin-end** -webkit-margin-start** -webkit-margin-top-collapse -webkit-marquee-direction -webkit-marquee-increment -webkit-marquee-repetition -webkit-marquee-speed -webkit-marquee-style -webkit-marquee -webkit-mask-box-image-outset -webkit-mask-box-image-repeat -webkit-mask-box-image-slice -webkit-mask-box-image-sour...
...ce -webkit-mask-box-image-width -webkit-mask-box-image -webkit-mask-repeat-x -webkit-mask-repeat-y -webkit-mask-source-type -webkit-max
-logical-height -webkit-max
-logical-width -webkit-min
-logical-height -webkit-min
-logical-width n -webkit-nbsp-mode p -webkit-padding-after** -webkit-padding-before** -webkit-padding-end** -webkit-padding-start** -webkit-perspective-origin-x -webkit-perspective-origin-y -webkit-print-color-adjust r-s -webkit-rtl-ordering -webkit-svg-shadow t -webkit-tap-highlight-color -webkit-text-combine -webkit-text-decoration-skip -webkit-text-decorations-in-effect -webkit-text-fill-color -webkit-text-security -webkit-text-stroke-color -webkit-text-stroke-width -webkit-text-stroke -webkit-text-zoom -webkit-transform-origin-x -...
...And 6 more matches
border-radius - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-bottom
-left-radius border-bottom-right-radius border-top
-left-radius border-top-right-radius syntax /* the syntax of the first radius allows one to four values */ /* radius is set for all 4 sides */ border-radius: 10px; /* top
-left-and-bottom-right | top-right-and-bottom
-left */ border-radius: 10px 5%; /* top
-left | top-right-and-bottom
-left | bottom-right */ border-radius: 2px 4px 2px; /* top
-le...
...ft | top-right | bottom-right | bottom
-left */ border-radius: 1px 0 3px 4px; /* the syntax of the second radius allows one to four values */ /* (first radius values) / radius */ border-radius: 10px / 20px; /* (first radius values) / top
-left-and-bottom-right | top-right-and-bottom
-left */ border-radius: 10px 5% / 20px 30px; /* (first radius values) / top
-left | top-right-and-bottom
-left | bottom-right */ border-radius: 10px 5px 2em / 20px 25px 30%; /* (first radius values) / top
-left | top-right | bottom-right | bottom
-left */ border-radius: 10px 5% / 20px 25em 30px 35em; /* global values */ border-radius: inherit; border-radius: initial; border-radius: unset; the border-radius property is specified as: one, two, three, or four <length> or <percentage> values.
... top
-left-and-bottom-right is a <length> or a <percentage> denoting a radius to use for the border in the top
-left and bottom-right corners of the element's box.
...And 6 more matches
mask-border-source - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
... , <color-stop
-list> )<radial-gradient()> = radial-gradient( [ <ending-shape> | <size> ]?
...And 6 more matches
mask-image - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <image-tags> = ltr | rtl<image-src> = <url> | <string><color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color><image-set-option> = [ <image> | <string> ] <resolution><id-selector> = <hash-token><cf-mixing-image> = <percentage>?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
... , <color-stop
-list> )<radial-gradient()> = radial-gradient( [ <ending-shape> | <size> ]?
...And 6 more matches
shape-outside - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>where <length-percentage> = <length> | <percentage><shape-radius> = <length-percentage> | closest-side | farthest-side<position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
... , <color-stop
-list> )<radial-gradient()> = radial-gradient( [ <ending-shape> | <size> ]?
...And 6 more matches
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.
...this means that in practice, touch-action is typically applied only to top
-level elements which have some custom behavior, without needing to specify touch-action explicitly on any of that element's descendants.
... syntax the touch-action property may be specified as either: one of the keywords auto, none, manipulation, or one of the keywords pan-x, pan
-left, pan-right, and/or one of the keywords pan-y, pan-up, pan-down, plus optionally the keyword pinch-zoom.
...And 6 more matches
Source code directories overview - Archive of obsolete content
xpidl files have their own mini
-language and processing tools.
... db contains c code for the mdb/mork database which is a low
-level, general-purpose and cross-platform file library.
... embedding contains c interfaces and code for generic high
-level browser functions (e.g.
...And 5 more matches
Theme changes in Firefox 2 - Archive of obsolete content
global/inactivetab
-left.png removed file.
... global/tab
-left.png new file; the left edge of a tab.
...o-button #search-container[chromedir="rtl"] .searchbar-engine-button .search-go-button .search-go-button:hover .search-go-button:hover:active .search-go-button[disabled="true"] .searchbar-engine-button .searchbar-engine-button:hover .searchbar-engine-button[addengines="true"] .searchbar-engine-button[open="true"] .searchbar-engine-menuitem[selected="true"] > .menu-iconic-text .searchbar
-left you may of course wish to make changes to other styles as well.
...And 5 more matches
CSS - Archive of obsolete content
obsolete css features -moz-bindingthe -moz-binding css property is used by mozilla-based applications to attach an xbl binding to a dom element.-moz-border-bottom-colorsin mozilla applications like firefox, the -moz-border-bottom-colors css property sets a list of colors for the bottom border.-moz-border
-left-colorsin mozilla applications like firefox, the -moz-border
-left-colors css property sets a list of colors for the left border.-moz-border-right-colorsin mozilla applications like firefox, the -moz-border-right-colors css property sets a list of colors for the right border.-moz-border-top-colorsin mozilla applications like firefox, the -moz-border-top-colors css property sets a list of colors for the top border.-moz-stack-sizing-moz-stack-sizing is an extended css property.
...ether the object represents a keyboard shortcut.-ms-block-progressionthe -ms-block-progression css property is a microsoft extension that specifies the block progression and layout orientation.-ms-content-zoom-chainingthe -ms-content-zoom-chaining css property is a microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit during page manipulation.-ms-content-zoom
-limitthe -ms-content-zoom
-limit css shorthand property is a microsoft extension that specifies values for the -ms-content-zoom
-limit-min and -ms-content-zoom
-limit-max properties.-ms-content-zoom
-limit-maxthe -ms-content-zoom
-limit-max css property is a microsoft extension that specifies the selected elements' maximum zoom factor.-ms-content-zoom
-limit-minthe -ms-content-zoom
-limit-min css property...
...ntothe -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 override any css properties that would have been set in high contrast mode.-ms-hyphenate
-limit-charsthe -ms-hyphenate
-limit-chars css property is a microsoft extension that specifies one to three values indicating the minimum number of characters in a hyphenated word.
...And 5 more matches
HTML: A good basis for accessibility - Learn web development
try our example table
-layout.html example, which looks something like this: <table width="1200"> <!-- main heading row --> <tr id="heading"> <td colspan="6"> <h1 align="center">header</h1> </td> </tr> <!-- nav menu row --> <tr id="nav" bgcolor="#ffffff"> <td width="200"> <a href="#" align="center">home</a> </td> <td width="200"...
...you can also see some good and bad examples at good
-links.html and bad
-links.html.
...r.png" alt="a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth."> <img src="dinosaur.png" alt="a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth." title="the mozilla red dinosaur"> <img src="dinosaur.png" aria
-labelledby="dino
-label"> <p id="dino
-label">the mozilla red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth.</p> the first image, when viewed by a screen reader, doesn't really offer the user much help — voiceover for example reads out "/dinosaur.png, image".
...And 5 more matches
HTML: A good basis for accessibility - Learn web development
try our example table
-layout.html example, which looks something like this: <table width="1200"> <!-- main heading row --> <tr id="heading"> <td colspan="6"> <h1 align="center">header</h1> </td> </tr> <!-- nav menu row --> <tr id="nav" bgcolor="#ffffff"> <td width="200"> <a href="#" align="center">home</a> </td> <td width="200"...
...you can also see some good and bad examples at good
-links.html and bad
-links.html.
...r.png" alt="a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth."> <img src="dinosaur.png" alt="a red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth." title="the mozilla red dinosaur"> <img src="dinosaur.png" aria
-labelledby="dino
-label"> <p id="dino
-label">the mozilla red tyrannosaurus rex: a two legged dinosaur standing upright like a human, with small arms, and a large head with lots of sharp teeth.</p> the first image, when viewed by a screen reader, doesn't really offer the user much help — voiceover for example reads out "/dinosaur.png, image".
...And 5 more matches
Legacy layout methods - Learn web development
layout and grid systems before css grid layout it may seem surprising to anyone coming from a design background that css didn’t have an inbuilt grid system until very recently, and instead we seemed to be using a variety of sub-optimal methods to create grid
-like designs.
... note: you can see this example running at 0_two-column
-layout.html (see also the source code).
... our next step is to create a rule for the class .col, floating it left, giving it a margin
-left of 20 pixels to form the gutter, and a width of 60 pixels.
...And 5 more matches
Fundamental text and font styling - Learn web development
you can't select and style subsections of text unless you wrap them in an appropriate element (such as a <span> or <strong>), or use a text-specific pseudo-element like ::first
-letter (selects the first letter of an element's text), ::first
-line (selects the first line of an element's text), or ::selection (selects the text currently highlighted by the cursor.) fonts let's move straight on to look at properties for styling fonts.
...this has many values available in case you have many font variants available (such as
-light, -normal, -bold, -extrabold, -black, etc.), but realistically you'll rarely use any of them except for normal and bold: normal, bold: normal and bold font weight lighter, bolder: sets the current element's boldness to be one step lighter or heavier than its parent element's boldness.
...also note that text-decoration is a shorthand property for text-decoration
-line, text-decoration-style, and text-decoration-color.
...And 5 more matches
Useful string methods - Learn web development
playable code <h2>live output</h2> <div class="output" style="min-height: 125px;"> <ul> </ul> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="playable-code" style="height: 290px; width: 95%"> const list = document.queryselector('.output ul'); list.innerhtml = ''; let greetings = ['happy birthday!', 'merry christmas my love', 'a happy christmas to all the family', 'you\'re...
...ng what's currently there if (greetings[i]) { let listitem = document.createelement('li'); listitem.textcontent = input; list.appendchild(listitem); } } </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y
-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = document.getelementbyid('code'); const reset = document.getelementbyid('reset'); const solution = document.getelementbyid('solution'); let code = textarea.value; let userentry = textarea.value; function updatecode() { eval(textarea.value); } reset.add...
... playable code 2 <h2>live output</h2> <div class="output" style="min-height: 125px;"> <ul> </ul> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="playable-code" style="height: 250px; width: 95%"> const list = document.queryselector('.output ul'); list.innerhtml = ''; let cities = ['london', 'manchester', 'birmingham', 'liverpool']; for (let i = 0; i < cities.length; i++) { let input = cities[i]; // write your code just b...
...And 5 more matches
Redis Tips
if you have not, here is a fantastic on
-line, interactive redis tutorial: http://try.redis.io/ for reference later on, you'll want the source of all things redis: https://redis.io you'll want to run a redis-server on your machine, and use the redis-cli at the command
-line for hacking.
... > var r = require('redis').createclient(); // and i'll define these utility functions just for this example > function now() { return (new date()).gettime() / 1000 } > function print(err, results) { console.log(json.stringify(results, null, 2)) } whenever someone logs into my site, i record them in my 'last
-login' zset.
... i'll simulate some logins like so: > r.zadd('last
-login', now(), 'lloyd'); > r.zadd('last
-login', now(), 'jparsons'); > r.zadd('last
-login', now(), 'zarter'); > r.zadd('last
-login', now(), 'lloyd'); // he logged in again!
...And 5 more matches
Drawing and Event Handling - Plugins
//the npwindow structure typedef enum { npwindowtypewindow = 1, npwindowtypedrawable } npwindowtype; typedef struct _npwindow { void* window; /* platform-specific handle */ uint32 x; /* position of top
-left corner */ uint32 y; /* relative to a netscape page */ uint32 width; /* maximum window size */ uint32 height; nprect cliprect; /* clipping rectangle in port coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* whether this is a window or a drawable */ } npwindow; the window para...
... the x and y fields specify the top
-left corner of the plug-in relative to the page.
... the cliprect field defines the clipping rectangle of the plug-in in a coordinate system where the origin is the top
-left corner of the drawable or window.
...And 5 more matches
ARIA: figure role - Accessibility
<div role="figure" aria
-labelledby="caption"> <img src="image.png" alt="full alternative image description"> <p id="caption">figure 1: the caption</p> </div> in the above example, we have a figure that consists of two separate content items — an image and a caption.
...you could add an id to an element containing content that describes the figure, and then reference that id inside an appropriate attribute on the figure to associate the figure with the label: <div role="figure" aria
-labelledby="figure-1"> ...
... <p id="figure-1">text that describes the figure.</p> </div> use aria
-labelledby when the text is a concise label.
...And 5 more matches
ARIA: Navigation Role - Accessibility
<div role="navigation" aria
-label="main"> <!-- list of links to main website locations --> </div> this is a website's main navigation.
... associated wai-aria roles, states, and properties aria
-label a brief description of the purpose of the navigation, omitting the term "navigation", as the screen reader will read both the role and the contents of the label.
... examples <div role="navigation" aria
-label="customer service"> <ul> <li><a href="#">help</a></li> <li><a href="#">order tracking</li> <li><a href="#">shipping & delivery</a></li> <li><a href="#">returns</a></li> <li><a href="#">contact us</a></li> <li><a href="#">find a store</a></li> </ul> </div> accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document.
...And 5 more matches
ARIA: textbox role - Accessibility
whenever possible, rather than using this role, use an <input> element with type="text", for single
-line input, or a <textarea> element for multi
-line input.
...to create a multi
-line text box which supports line breaks, as in an html <textarea>, set aria-multiline="true".
... <!-- simple text input field --> <div id="txtboxlabel">enter your five-digit zipcode</div> <div role="textbox" contenteditable="true" aria-placeholder="5-digit zipcode" aria
-labelledby="txtboxlabel"></div> <!-- multi
-line text area --> <div id="txtboxmultilinelabel">enter the tags for the article</div> <div role="textbox" contenteditable="true" aria-multiline="true" aria
-labelledby="txtboxmultilinelabel" aria-required="true"></div> semantic elements are more concise and require no javascript to support textbox features.
...And 5 more matches
Accessibility documentation index - Accessibility
11 multipart labels: using aria for labels with embedded fields inside them aria, accessibility, ben millard, firefox, guide, help, html, html 4, jaws, needscontent, aria
-labelledby, label, solution, trouble shoot, troubleshoot the solution is in an aria attribute called aria
-labelledby.
...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.
... 21 using the aria
-label attribute aria, accessibility, codingscripting, html, needscontent, reference, référence(2), agent, aria
-label, user, useragent the aria
-label attribute is used to define a string that labels the current element.
...And 5 more matches
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
the inline direction therefore runs horizontally — left to right — and margin-inline-start would be equivalent to margin
-left.
... if you were using a horizontal-tb writing mode with a right-to
-left text direction then margin-inline-start would be the same as margin-right, and in a vertical writing mode it would be the same as using margin-top.
... border-block-start-color border-top-color border-block-start-style border-top-style border-block-start-width border-top-width border-inline-end border-right border-inline-end-color border-right-color border-inline-end-style border-right-style border-inline-end-width border-right-width border-inline-start border
-left border-inline-start-color border
-left-color border-inline-start-style border
-left-style border-inline-start-width border
-left-width border-start-start-radius border-top
-left-radius border-start-end-radius border-bottom
-left-radius border-end-start-radius border-top-right-radius border-end-end-radius border-bott...
...And 5 more matches
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
borderless-attachment div{ color: black; -moz-appearance: borderless-attachment; -webkit-appearance: borderless-attachment; } <div>lorem</div> safari button-bevel div { color: black; -moz-appearance: button-bevel; -webkit-appearance: button-bevel; } <div>lorem</div> firefox chrome safari edge caps
-lock-indicator div{ color: black; -moz-appearance: caps
-lock-indicator; -webkit-appearance: caps
-lock-indicator; } <div>lorem</div> safari edge caret div { color: black; -moz-appearance: caret; -webkit-appearance: caret; } <div>lorem</div> firefox chrome safari edge checkbox-container div { col...
... checkbox
-label div { color: black; -moz-appearance: checkbox
-label; -webkit-appearance: checkbox
-label; } <div>lorem</div> firefox checkmenuitem div { color: black; height: 20px; -moz-appearance: checkmenuitem; -webkit-appearance: checkmenuitem; } <div>lorem</div> firefox color-well div{ color: black; -moz-appearance: color-well; -webkit-appearance: color-well; } ...
... <div>lorem</div> safari input type=color continuous-capacity
-level-indicator div{ color: black; -moz-appearance: continuous-capacity
-level-indicator; -webkit-appearance: continuous-capacity
-level-indicator; } <div>lorem</div> safari default-button div{ color: black; -moz-appearance: default-button; -webkit-appearance: default-button; } <div>lorem</div> safari edge discrete-capacity
-level-indicator div{ color: black; -moz-appearance: discrete-capacity
-level-indicator; -webkit-appearance: discrete-capacity
-level-indicator; } <div>lorem</div> safari inner-spin-button div{ color: black; -webkit-appearance: inner-spin-but...
...And 5 more matches
cross-fade() - CSS: Cascading Style Sheets
)<gradient> = <linear-gradient()> | <repeating
-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()><rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
..., <color-stop
-list> )<repeating
-linear-gradient()> = repeating
-linear-gradient( [ <angle> | to <side-or-corner> ]?
... , <color-stop
-list> )<radial-gradient()> = radial-gradient( [ <ending-shape> | <size> ]?
...And 5 more matches
<input type="tel"> - HTML: Hypertext Markup Language
y"></span> </div> <div> <button>submit</button> </div> </form> and let's include the following css to highlight valid entries with a checkmark and invalid entries with a cross: div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; color: #8b0000; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; color: #009000; } the output looks like this: pattern validation if you want to further restrict entered numbers so they also have to conform to a specific pattern, you can use the pattern attribute, which takes as its value a regular expression that entered values have to ma...
..."telno" name="telno" type="tel" required pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}"> <span class="validity"></span> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; color: #8b0000; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; color: #009000; } notice how the entered value is reported as invalid unless the pattern xxx-xxx-xxxx is matched; for instance, 41-323-421 won't be accepted.
... each input has a placeholder attribute to show a hint to sighted users about what to enter into it, a pattern to enforce a specific number of characters for the desired section, and an aria
-label attribute to contain a hint to be read out to screenreader users about what to enter into it.
...And 5 more matches
Evolution of HTTP - HTTP
developed by tim berners
-lee and his team between 1989-1991, http has seen many changes, keeping most of the simplicity and further shaping its flexibility.
... invention of the world wide web in 1989, while he was working at cern, tim berners
-lee wrote a proposal to build a hypertext system over the internet.
...on august 6th 1991, tim berners
-lee's post on the public alt.hypertext newsgroup is now considered as the official start of the world wide web as a public project.
...And 5 more matches
cfx - Archive of obsolete content
-
-logfile=logfile log console output to the file specified by logfile.
... -
-logfile=logfile log console output to the file specified by logfile.
... the --update
-link and --update-url options simplify this process.
...And 4 more matches
Signing an XPI - Archive of obsolete content
you can either set this permanently via control panel->system properties->advanced->environment variables->system variables or do it each time you run the tools from the command
-line (preferably using a batch file).
...
-l mytestcert u,u,cu prepare xpi file for signing create a new folder just for signing, copy your existing xpi into it, unzip* it (maintaining paths), delete the xpi and return to the certificate-database folder.
...-i "certum level iii ca.cer" c:\projects\codesigning> certutil
-l -d .
...And 4 more matches
The box model - Learn web development
below this, we have a block
-level paragraph, inside which are two <span> elements.
...the inline flex container and paragraphs all run together on one line rather than breaking onto new lines as they would do if they were displaying as block
-level elements.
... we can control all margins of an element at once using the margin property, or each side individually using the equivalent longhand properties: margin-top margin-right margin-bottom margin
-left in the example below, try changing the margin values to see how the box is pushed around due to the margin creating or removing space (if it is a negative margin) between this element and the containing element.
...And 4 more matches
Client-Server Overview - Learn web development
-cache cache-control: no-cache upgrade-insecure-requests: 1 user-agent: mozilla/5.0 (windows nt 10.0; wow64) applewebkit/537.36 (khtml, like gecko) chrome/52.0.2743.116 safari/537.36 accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 referer: https://developer.mozilla.org/ accept-encoding: gzip, deflate, sdch, br accept-charset: iso-8859-1,utf-8;q=0.7,*;q=0.7 accept
-language: en-us,en;q=0.8,es;q=0.6 cookie: sessionid=6ynxs23n521lu21b1t136rhbv7ezngie; csrftoken=zipujsazv6pcgcbjscj1zu6pqzbfmuat; dwf_section_edit=false; dwf_sg_task_completion=false; _gat=1; _ga=ga1.2.1688886003.1471911953; ffo=true the first and second lines contain most of the information we talked about above: the type of request (get).
... it can accept the specified set of characters (accept-charset: iso-8859-1,utf-8;q=0.7,*;q=0.7) and languages (accept
-language: de,en;q=0.7,en-us;q=0.3).
... the head also tells us how big it is (content
-length: 41823).
...And 4 more matches
Ember interactivity: Events, classes and state - Learn web development
add the new line shown below to your header.hbs file: <input class='new-todo' aria
-label='what needs to be done?' placeholder='what needs to be done?' autofocus {{on 'keydown' this.onkeydown}} > this new attribute is inside double curly braces, which tells you it is part of ember's dynamic templating syntax.
... storing todos with a service ember has built-in application
-level state management that we can use to manage the storage of our todos and allow each of our components to access data from that application
-level state.
... run this terminal command to generate a service for us to store our todo
-list data in: ember generate service todo-data this should give you a terminal output like so: installing service create app/services/todo-data.js installing service-test create tests/unit/services/todo-data-test.js this creates a todo-data.js file inside the todomvc/app/services directory to contain our service, which initially contains an import statement and an empty class: import service from '@ember/service'; export default class tododataservice extends service { } first of all, we want to define what a todo is.
...And 4 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
the state of our component will be represented by these three top
-level variables.
...replace your existing <ul> block with the following: <!-- todos --> <ul role="list" class="todo
-list stack
-large" aria
-labelledby="list-heading"> {#each todos as todo (todo.id)} <li class="todo"> <div class="stack-small"> <div class="c-cb"> <input type="checkbox" id="todo-{todo.id}" checked={todo.completed}/> <label for="todo-{todo.id}" class="todo
-label"> {todo.name} </label> </div> <div class="btn-group"> ...
... reactive todos as we've already seen, every time the value of a component top
-level variable is modified svelte knows how to update the ui.
...And 4 more matches
Styling Vue components with CSS - Learn web development
text-transform: capitalize; } .btn__danger { color: #fff; background-color: #ca3c3c; border-color: #bd2130; } .btn__filter { border-color: lightgrey; } .btn__danger:focus { outline-color: #c82333; } .btn__primary { color: #fff; background-color: #000; } .btn-group { display: flex; justify-content: space-between; } .btn-group > * { flex: 1 1 auto; } .btn-group > * + * { margin
-left: 0.8rem; } .label-wrapper { margin: 0; flex: 0 0 100%; text-align: center; } [class*="__lg"] { display: inline-block; width: 100%; font-size: 1.9rem; } [class*="__lg"]:not(:last-child) { margin-bottom: 1rem; } @media screen and (min-width: 620px) { [class*="__lg"] { font-size: 2.4rem; } } .visually-hidden { position: absolute; height: 1px; width: 1px; overflow: hi...
...dden; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); clip-path: rect(1px, 1px, 1px, 1px); white-space: nowrap; } [class*="stack"] > * { margin-top: 0; margin-bottom: 0; } .stack-small > * + * { margin-top: 1.25rem; } .stack
-large > * + * { margin-top: 2.5rem; } @media screen and (min-width: 550px) { .stack-small > * + * { margin-top: 1.4rem; } .stack
-large > * + * { margin-top: 2.8rem; } } /* end global styles */ #app { background: #fff; margin: 2rem 0 4rem 0; padding: 1rem; padding-top: 0; position: relative; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 2.5rem 5rem 0 rgba(0, 0, 0, 0.1); } @media screen and (min-width: 550px) { #app { padding: 4rem; } } #app > * { max-width: 50rem; margin
-left: auto; margin-right: auto;...
... </label> </h2> <input type="text" id="new-todo-input" name="new-todo" autocomplete="off" v-model.lazy.trim="label" class="input__lg" /> <button type="submit" class="btn btn__primary btn__lg"> add </button> </form> </template> let's also add the stack
-large class to the <ul> tag in our app.vue file.
...And 4 more matches
Performance
scroll
-linked effects information on scroll
-linked effects, their effect on performance, related tools, and possible mitigation techniques.
... profiling and performance tools profiling with the developer tools profiler the profiler built into the developer tools has a high
-level waterfall, detailed call tree, allocations and gc profiling, and flame graphs.
... tools/power/rapl (mac, linux) tools/power/rapl is a command
-line utility in the mozilla codebase that uses the intel rapl interface to gather direct power estimates for the package, cores, gpu and memory.
...And 4 more matches
NSS API Guidelines
some of the guidelines in this document, are more forward
-looking than documentary.
...the layering section explains how the nss code is layered, and how higher
-level functions wrap low
-level functions.
...in addition, some low
-level apis may be completely opaque to higher level layers.
...And 4 more matches
gtstd.html
ssl is built on top of nspr, which handles sockets, threads, and related low
-level os operations.
... you can use the security module database tool, a command
-line utility that comes with nss, to manage pkcs #11 module information within secmod.db files.
... for complete information about the command
-line options used in the examples that follow, see using the certificate database tool.
...And 4 more matches
NSS Tools crlutil
using the certificate revocation list management tool newsgroup: mozilla.dev.tech.crypto the certificate revocation list (crl) management tool is a command
-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... -i import a crl to the cert database -e erase all crls of specified type from the cert database
-l list existing crl located in cert database file.
...
-l algorithm-name specify a specific signature algorithm.
...And 4 more matches
SpiderMonkey Build Documentation
if --enable-nspr-build does not work, explicitly tell configure where to find nspr using the --with-nspr-cflags and --with-nspr
-libs configure options.
... for example, assuming your local nspr has been installed to c:/mozilla-build/msys/local: /bin/sh ../configure.in --with-nspr-cflags="-ic:/mozilla-build/msys/local/include" \ --with-nspr
-libs="c:/mozilla-build/msys/local/lib/libnspr4.a \ c:/mozilla-build/msys/local/lib/libplds4.a \ c:/mozilla-build/msys/local/lib/libplc4.a" if you get symbol loading or dynamic library errors, you can force the correct nspr to load with: path="$path;c:/mozilla-build/msys/local/lib/" ./js specifying installation directories make install puts files in the following directories by default.
... you can override this by passing options to the configure script: what it is where it gets put configure option executables, shell scripts /usr/local/bin --bindir libraries, data /usr/local/lib -
-libdir architecture-independent data /usr/local/share --sharedir c header files /usr/local/include --includedir for convenience, you can pass the configure script an option of the form --prefix=<prefixdir>, which substitutes <prefixdir> for /usr/local in all the settings above, in one step.
...And 4 more matches
ARIA: form role - Accessibility
<div role="form" id="contact-info" aria
-label="contact information"> <!-- form content --> </div> this is a form that collects and saves a user's contact information.
...aria
-labelledby, aria
-label or title).
... examples <div role="form" id="send-comment" aria
-label="add a comment"> <label for="username">username</label> <input id="username" name="username" autocomplete="nickname" autocorrect="off" type="text"> <label for="email">email</label> <input id="email" name="email" autocomplete="email" autocapitalize="off" autocorrect="off" spellcheck="false" type="text"> <label for="comment">comment</label> <textarea id="comment" name="comment"></...
...And 4 more matches
ARIA: img role - Accessibility
<div role="img" aria
-label="description of the overall image"> <img src="graphic1.png" alt=""> <img src="graphic2.png"> </div> description any set of content that should be consumed as a single image (which could include images, video, audio, code snippets, emojis, or other content) can be identified using role="img".
... therefore, provide a comprehensive overall descriptive alt text for image, either in the surrounding text, or by using an aria
-label attribute, with optional alt attributes for search engines or sighted users to be written to the page should an image fail: <div role="img" aria
-label="description of the overall image"> <img src="graphic1.png" alt=""> <img src="graphic2.png"> </div> if you wish to add a caption or label to your image that is visible on the page, you can do using: aria
-labelledby when the text is a concis...
... for example: <div role="img" aria
-labelledby="image-1"> ...
...And 4 more matches
ARIA: dialog role - Accessibility
<div role="dialog" aria
-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user account section.</p> <button>close</button> </div> description marking up a dialog element with the dialog role helps assistive technology identify the dialog's content as being grouped an...
...the best way to achieve this is by using the aria
-labelledby attribute to the role="dialog" element.
...this approach is shown in the code snippet below: <div role="dialog" aria
-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user account section.</p> <button>close</button> </div> keep in mind that a dialog's title and description text do not have to be focusable in order to be perceived by screen readers operating in a non-virtual mode.
...And 4 more matches
ARIA: heading role - Accessibility
<div role="heading" aria
-level="1">this is a main page heading</div> this defines the text in the div to be the main heading of the page, indicated by being level 1 via the aria
-level attribute.
... associated wai-aria roles, states, and properties aria
-level the aria
-level attribute specifies the heading level in the document structure.
...in that case, the newly-added headings need aria
-level attributes whose values are consistent with the rest of the document structure.
...And 4 more matches
Text labels and names - Accessibility
a dialog box is generally denoted by an aria role="dialog" or role="alertdialog"; you can use the aria
-label or aria
-labelledby attributes to provide a label.
... examples the following example shows a simple dialog box, defined as such using role="dialog" and labelled using aria
-labelledby.
... <div role="dialog" aria
-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user account section.</p> <button>close</button> </div> if the dialog box doesn't have a heading, you can instead use aria
-label to contain the label text: <div role="dialog" aria
-label="personal details updated confirmation"> <p>your personal details were successfully updated.
...And 4 more matches
Color picker tool - CSS: Cascading Style Sheets
.picking-area { width: 198px; height: 198px; margin: 5px; border: 1px solid #ddd; position: relative; float: left; display: table; } .ui-color-picker .picking-area:hover { cursor: default; } /* hsv format - hue-saturation-value(brightness) */ .ui-color-picker .picking-area { background: url('https://mdn.mozillademos.org/files/5707/picker_mask_200.png') center center; background: -moz
-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -moz
-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background: -webkit
-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -webkit
-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background: -ms
-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -ms
-linear-gradient(left, #fff 0%, rgba(255, ...
...255, 255, 0) 100%); background: -o
-linear-gradient(bottom, #000 0%, rgba(0, 0, 0, 0) 100%), -o
-linear-gradient(left, #fff 0%, rgba(255, 255, 255, 0) 100%); background-color: #f00; } /* hsl format - hue-saturation
-lightness */ .ui-color-picker[data-mode='hsl'] .picking-area { background: -moz
-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -moz
-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background: -webkit
-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -webkit
-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background: -ms
-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100...
...%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -ms
-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background: -o
-linear-gradient(top, hsl(0, 0%, 100%) 0%, hsla(0, 0%, 100%, 0) 50%, hsla(0, 0%, 0%, 0) 50%, hsl(0, 0%, 0%) 100%), -o
-linear-gradient(left, hsl(0, 0%, 50%) 0%, hsla(0, 0%, 50%, 0) 100%); background-color: #f00; } .ui-color-picker .picker { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #fff; position: absolute; top: 45%; left: 45%; } .ui-color-picker .picker:before { width: 8px; height: 8px; content: ""; position: absolute; border: 1px solid #999; border-radius: 50%; } .ui-color-picker .hue, .ui-color-picker .alpha { width: 198px; height: 28px; margin: 5px; border: 1px solid #fff; flo...
...And 4 more matches
font-variant - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: font-variant-alternates font-variant-caps font-variant-east-asian font-variant
-ligatures font-variant-numeric syntax font-variant: small-caps; font-variant: common
-ligatures small-caps; /* global values */ font-variant: inherit; font-variant: initial; font-variant: unset; values normal specifies a normal font face; each of the longhand properties has an initial value of normal.
... longhand properties of font-variant are: font-variant-caps, font-variant-numeric, font-variant-alternates, font-variant
-ligatures, and font-variant-east-asian.
... none sets the value of the font-variant
-ligatures to none and the values of the other longhand property as normal, their initial value.
...And 4 more matches
mix-blend-mode - CSS: Cascading Style Sheets
syntax /* keyword values */ mix-blend-mode: normal; mix-blend-mode: multiply; mix-blend-mode: screen; mix-blend-mode: overlay; mix-blend-mode: darken; mix-blend-mode: lighten; mix-blend-mode: color-dodge; mix-blend-mode: color-burn; mix-blend-mode: hard
-light; mix-blend-mode: soft
-light; mix-blend-mode: difference; mix-blend-mode: exclusion; mix-blend-mode: hue; mix-blend-mode: saturation; mix-blend-mode: color; mix-blend-mode: luminosity; /* global values */ mix-blend-mode: initial; mix-blend-mode: inherit; mix-blend-mode: unset; values <blend-mode> the blending mode that should be applied.
... formal definition initial valuenormalapplies toall elementsinheritednocomputed valueas specifiedanimation typediscretecreates stacking contextyes formal syntax <blend-mode>where <blend-mode> = normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard
-light | soft
-light | difference | exclusion | hue | saturation | color | luminosity examples effect of different mix-blend-mode values <div class="grid"> <div class="col"> <div class="note">blending in isolation (no blending with the background)</div> <div class="row isolate"> <div class="cell"> normal <div class="container normal"> <div class="group"> <div class="item firefox"></div> <svg viewbox="0 0 150 150"> <defs> ...
...s="item firefox"></div> <svg viewbox="0 0 150 150"> <ellipse class="item r" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item g" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item b" cx="75" cy="75" rx="25" ry="70"></ellipse> </svg> </div> </div> </div> <div class="cell"> hard
-light <div class="container hard
-light"> <div class="group"> <div class="item firefox"></div> <svg viewbox="0 0 150 150"> <ellipse class="item r" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item g" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item b" cx="75" cy="75" rx="25" ry="70"></ell...
...And 4 more matches
<input type="search"> - HTML: Hypertext Markup Language
the search event is rate
-limited so that it is not sent more more frequently than an implementation-defined interval.
... if that isn't enough, you can use an aria
-label attribute on the <input> itself.
... let's have a look at an example: <form role="search"> <div> <input type="search" id="mysearch" name="q" placeholder="search the site..." aria
-label="search through site content"> <button>search</button> </div> </form> you can see how this is rendered below: there is no visual difference from the previous example, but screenreader users have way more information available to them.
...And 4 more matches
<input type="text"> - HTML: Hypertext Markup Language
<input> elements of type text create basic single
-line text fields.
... using text inputs <input> elements of type text create basic, single
-line inputs.
... you should use them anywhere you want the user to enter a single
-line value and there isn't a more specific input type available for collecting that value (for example, if it's a date, url, email, or search term, you've got better options available).
...And 4 more matches
Inline elements - HTML: Hypertext Markup Language
html (hypertext markup language) elements historically were categorized as either "block
-level" elements or "inline
-level" elements.
...in this article, we'll examine html inline
-level elements and how they differ from block
-level elements.
...block
-level elements: a demonstration this is most easily demonstrated with a simple example.
...And 4 more matches
Feature-Policy - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
...And 4 more matches
Function.prototype.apply() - JavaScript
the apply() method calls a function with a given this value, and arguments provided as an array (or an array
-like object).
... argsarray optional an array
-like object, specifying the arguments with which func should be called, or null or undefined if no arguments should be provided to the function.
... starting with ecmascript 5 these arguments can be a generic array
-like object instead of an array.
...And 4 more matches
Performance fundamentals - Web Performance
high
-level declarative languages), or use low
-level imperative interfaces offered by the <canvas> element (which includes webgl).
... html and css greatly increase productivity, sometimes at the expense of framerate or pixel
-level control over rendering.
... text and images reflow automatically, ui elements automatically receive the system theme, and the system provides "built-in" support for some use cases developers may not think of initially, like different-resolution displays or right-to
-left languages.
...And 4 more matches
SVG Presentation Attributes - SVG: Scalable Vector Graphics
font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering solid-color solid-opacity stop-color stop-opacity stroke stroke-dasharray stroke-dashoffset stroke
-linecap stroke
-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering transform unicode-bidi vector-effect visibility word-spacing writing-mode attributes alignment-baseline it specifies how an object is aligned along the font baseline with respect to its parent.
... value: see css display; animatable: yes dominant-baseline it defines the baseline used to align the box’s text and inline
-level contents.
... value: <opacity-value>; animatable: yes overflow specifies whether the content of a block
-level element is clipped when it overflows the element's box.
...And 4 more matches
Fills and Strokes - SVG: Scalable Vector Graphics
<?xml version="1.0" standalone="no"?> <svg width="160" height="140" xmlns="http://www.w3.org/2000/svg" version="1.1"> <line x1="40" x2="120" y1="20" y2="20" stroke="black" stroke-width="20" stroke
-linecap="butt"/> <line x1="40" x2="120" y1="60" y2="60" stroke="black" stroke-width="20" stroke
-linecap="square"/> <line x1="40" x2="120" y1="100" y2="100" stroke="black" stroke-width="20" stroke
-linecap="round"/> </svg> the stroke-width property defines the width of this stroke.
... the second attribute affecting strokes is the stroke
-linecap property, demonstrated above.
... there are three possible values for stroke
-linecap: butt closes the line off with a straight edge that's normal (at 90 degrees) to the direction of the stroke and crosses its end.
...And 4 more matches
Anonymous Content - Archive of obsolete content
explicit content is said to be at the document
-level scope.
... anonymous content nodes are in their own binding
-level scopes.
...if invoked on an element at the document
-level scope, it returns null.
...And 3 more matches
How CSS is structured - Learn web development
there are also other shorthand types, for example 2-value shorthands, which set padding/margin for top/bottom, then left/right */ padding: 10px 15px 15px 5px; is equivalent to these four lines of code: padding-top: 10px; padding-right: 15px; padding-bottom: 15px; padding
-left: 5px; this one line: background: red url(bg-graphic.png) 10px 10px repeat-x fixed; is equivalent to these five lines: background-color: red; background-image: url(bg-graphic.png); background-position: 10px 10px; background-repeat: repeat-x; background-attachment: fixed; later in the course, you will encounter many other examples of shorthand properties.
...on large screen or window, we increase the font size for better readability */ body { font-size: 130%; } } h1 {font-size: 1.5em;} /* handle specific elements nested in the dom */ /* -------------------------------------------------------------------------------------------- */ div p, #id:first
-line { background-color: red; border-radius: 3px; } div p { margin: 0; padding: 1em; } div p + p { padding-top: 0; } "commenting out" code is also useful for temporarily disabling sections of code for testing.
... body { font: 1em/150% helvetica, arial, sans-serif; padding: 1em; margin: 0 auto; max-width: 33em; } @media (min-width: 70em) { body { font-size: 130%; } } h1 { font-size: 1.5em; } div p, #id:first
-line { background-color: red; border-radius: 3px; } div p { margin: 0; padding: 1em; } div p + p { padding-top: 0; } the next example shows the equivalent css in a more compressed format.
...And 3 more matches
Client-side form validation - Learn web development
input:invalid { border: 2px dashed red; } input:valid { border: 2px solid black; } div { margin-bottom: 10px; } here is the example running live: note: you can find this example live on github as fruit
-length.html (see also the source code.) note: <input type="number"> (and other types, such as range and date) can also take a step attribute, which specifies what increment the value will go up or down by when the input controls are used (such as the up and down number buttons).
...first, some html: <form> <p> <fieldset> <legend>do you have a driver's license?<abbr title="this field is mandatory" aria
-label="required">*</abbr></legend> <!-- while only one radio button in a same-named group can be selected at a time, and therefore only one radio button in a same-named group having the "required" attribute suffices in making a selection a requirement --> <input type="radio" required name="driver" id="r1" value="yes"><label for="r1">yes</label> <input type="radio" required name="driv...
... its usage here acts only as a fallback --> <input type="number" min="12" max="120" step="1" id="n1" name="age" pattern="\d+"> </p> <p> <label for="t1">what's your favorite fruit?<abbr title="this field is mandatory" aria
-label="required">*</abbr></label> <input type="text" id="t1" name="fruit" list="l1" required pattern="[bb]anana|[cc]herry|[aa]pple|[ss]trawberry|[ll]emon|[oo]range"> <datalist id="l1"> <option>banana</option> <option>cherry</option> <option>apple</option> <option>strawberry</option> <option>lemon</option> <option>orange</option> </datalist>...
...And 3 more matches
Your first form - Learn web development
the controls can be single or multi
-line text fields, dropdown boxes, buttons, checkboxes, or radio buttons, and are mostly created using the <input> element, although there are some other elements to learn about too.
... the <label>, <input>, and <textarea> elements our contact form is not complex: the data entry portion contains three text fields, each with a corresponding <label>: the input field for the name is a single
-line text field.
... the input field for the e-mail is an input of type email: a single
-line text field that accepts only e-mail addresses.
...And 3 more matches
Advanced text formatting - Learn web development
playable code <h2>live output</h2> <div class="output" style="min-height: 50px;"> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="input" style="min-height: 100px; width: 95%"> bacon the glue that binds the world together.
...a light brown color.</textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y
-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = document.getelementbyid('code'); const reset = document.getelementbyid('reset'); const solution = document.getelementbyid('solution'); const output = document.queryselector('.output'); const code = textarea.value; const userentry = textarea.value; function updatecode() { output.innerhtml = texta...
... playable code 2 <h2>live output</h2> <div class="output" style="min-height: 50px;"> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="input" style="min-height: 150px; width: 95%"> <p>hello and welcome to my motivation page.
...And 3 more matches
Index - Learn web development
at, accessibility, article, beginner, css, codingscripting, html, javascript, learn, tools, users, assistive technology, keyboard, screan reader, screenreader this article should have given you a useful high
-level overview of accessibility, shown you why it's important, and looked at how you can fit it into your workflow.
... 104 a cool
-looking box assessment, beginner, css, learn, backgrounds, borders, box, box model, effects in this assessment, you'll get some more practice in creating cool
-looking boxes by trying to create an eye-catching box.
... beginner, css, introduction to css, learn, modules, specifications, syntax css (cascading style sheets) allows you to create great
-looking web pages, but how does it work under the hood?
...And 3 more matches
Drawing graphics - Learn web development
parameters 2 and 3 define the coordinates of the top left corner of the area you want to cut out of the loaded image, relative to the top
-left corner of the image itself.
... parameters 6 and 7 define the coordinates at which you want to draw the top
-left corner of the cut-out portion of the image, relative to the top
-left corner of the canvas.
...add the following code inside your for loop: ctx.fillstyle = 'rgba(' + (255
-length) + ', 0, ' + (255
-length) + ', 0.9)'; ctx.beginpath(); ctx.moveto(moveoffset, moveoffset); ctx.lineto(moveoffset+length, moveoffset); let triheight = length/2 * math.tan(degtorad(60)); ctx.lineto(moveoffset+(length/2), moveoffset+triheight); ctx.lineto(moveoffset, moveoffset); ctx.fill(); length--; moveoffset += 0.7; ctx.rotate(degtorad(5)); so on each iteration, we: set the fills...
...And 3 more matches
Ember app structure and componentization - Learn web development
to start with, delete the contents of application.hbs and replace them with the following: <section class="todoapp"> <h1>todos</h1> <input class="new-todo" aria
-label="what needs to be done?" placeholder="what needs to be done?" autofocus > </section> note: aria
-label provides a label for assistive technology to make use of — for example, for a screenreader to read out.
...update the application.hbs file again so its content looks like this: <section class="todoapp"> <h1>todos</h1> <input class="new-todo" aria
-label="what needs to be done?" placeholder="what needs to be done?" autofocus > <section class="main"> <input id="mark-all-complete" class="toggle-all" type="checkbox"> <label for="mark-all-complete">mark all as complete</label> <ul class="todo
-list"> <li> <div class="view"> <input aria
-label="toggle the completion of this todo" ...
... class="toggle" type="checkbox" > <label>buy movie tickets</label> <button type="button" class="destroy" title="remove this todo" ></button> </div> <input autofocus class="edit" value="todo text"> </li> <li> <div class="view"> <input aria
-label="toggle the completion of this todo" class="toggle" type="checkbox" > <label>go to movie</label> <button type="button" class="destroy" title="remove this todo" ></button> </div> <input autofocus class="edit" value="todo text"> </li> </ul> </section> <footer class="footer">...
...And 3 more matches
Componentizing our React app - Learn web development
go back to src/app.js, copy the first <li> from inside the unordered list, and paste it into todo.js so that it reads like this: export default function todo() { return ( <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-0" type="checkbox" defaultchecked={true} /> <label classname="todo
-label" htmlfor="todo-0"> eat </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edit <span classname="visually-hidden">eat</span> </button> <button type="button" classname="btn btn__danger"> delete <span classname="visually-hidden">eat</span> </button> </div> </li> ); } no...
...your <ul> should read like this: <ul role="list" classname="todo
-list stack
-large stack-exception" aria
-labelledby="list-heading" > <todo /> <todo /> <todo /> </ul> when you look back at your browser, you'll notice something unfortunate: your list now repeats the first task three times!
... putting all that together, your todo() function should read like this: export default function todo(props) { return ( <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-0" type="checkbox" defaultchecked={true} /> <label classname="todo
-label" htmlfor="todo-0"> {props.name} </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edit <span classname="visually-hidden">{props.name}</span> </button> <button type="button" classname="btn btn__danger"> delete <span classname="visually-hidden">{props.name}</span> </button> <...
...And 3 more matches
Componentizing our Svelte app - Learn web development
put the following contents inside this file: <script> export let todo </script> <div class="stack-small"> <div class="c-cb"> <input type="checkbox" id="todo-{todo.id}" on:click={() => todo.completed = !todo.completed} checked={todo.completed} /> <label for="todo-{todo.id}" class="todo
-label">{todo.name}</label> </div> <div class="btn-group"> <button type="button" class="btn"> edit <span class="visually-hidden">{todo.name}</span> </button> <button type="button" class="btn btn__danger" on:click={() => alert('not implemented')}> delete <span class="visually-hidden">{todo.name}</span> </button> </div> </div> now we need to import our todo comp...
... update the {#each} block inside todos.svelte like so: <ul role="list" class="todo
-list stack
-large" aria
-labelledby="list-heading"> {#each filtertodos(filter, todos) as todo (todo.id)} <li class="todo"> <todo {todo} /> </li> {:else} <li>nothing to do here!</li> {/each} </ul> the list of todos is displayed on the page, and the checkboxes should work (try checking/unchecking a couple, and then observing that the filters still work as expected), but our ...
... {:else} <div class="c-cb"> <input type="checkbox" id="todo-{todo.id}" on:click={ontoggle} checked={todo.completed} > <label for="todo-{todo.id}" class="todo
-label">{todo.name}</label> </div> <div class="btn-group"> <button type="button" class="btn" on:click={onedit}> edit<span class="visually-hidden"> {todo.name}</span> </button> <button type="button" class="btn btn__danger" on:click={onremove}> delete<span class="visually-hidden"> {todo.name}</span> </button> </div> {/if} </div> it is worth noting that: when the u...
...And 3 more matches
Bootstrapping a new locale
l10n documentation has moved to https://mozilla
-l10n.github.io/localizer-documentation/ .
... install the compare
-locales utility the next step is to install compare
-locales.
... $ sudo easy_install compare
-locales this will download and install the utility.
...And 3 more matches
NSS tools : pk12util
nss tools : pk12util name pk12util — export and import keys and certificate to or from a pkcs #12 file and the nss database synopsis pk12util [-i p12file|
-l p12file|-o p12file] [-d [sql:]directory] [-h tokenname] [-p dbprefix] [-r] [-v] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] description the pkcs #12 utility, pk12util, enables sharing certificates among any server that supports pkcs#12.
...
-l p12file list the keys and certificates in pkcs#12 file.
... -m | --key
-len keylength specify the desired length of the symmetric key to be used to encrypt the private key.
...And 3 more matches
NSS tools : ssltab
name ssltap — tap into ssl connections and display the data going by synopsis libssltap [-vhfsxl] [-p port] [hostname:port] description the ssl debugging tool ssltap is an ssl-aware command
-line proxy.
...
-l prefix turn on looping; that is, continue to accept connections rather than stopping after the first connection is complete.
...to make the tool continue to accept connections, switch on looping mode with the
-l option.
...And 3 more matches
NSS tools : ssltap
name ssltap — tap into ssl connections and display the data going by synopsis libssltap [-vhfsxl] [-p port] [hostname:port] description the ssl debugging tool ssltap is an ssl-aware command
-line proxy.
...
-l prefix turn on looping; that is, continue to accept connections rather than stopping after the first connection is complete.
...to make the tool continue to accept connections, switch on looping mode with the
-l option.
...And 3 more matches
NSS Tools ssltap
using the ssl debugging tool (ssltap) newsgroup: mozilla.dev.tech.crypto the ssl debugging tool is an ssl-aware command
-line proxy.
...
-l turn on looping; that is, continue to accept connections rather than stopping after the first connection is complete.
...to make the tool continue to accept connections, switch on looping mode with the
-l option.
...And 3 more matches
NSS tools : pk12util
name pk12util — export and import keys and certificate to or from a pkcs #12 file and the nss database synopsis pk12util [-i p12file [-h tokenname] [-v] [common-options] ] [
-l p12file [-h tokenname] [-r] [common-options] ] [ -o p12file -n certname [-c keycipher] [-c certcipher] [-m|--key_len keylen] [-n|--cert_key_len certkeylen] [common-options] ] [ common-options are: [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] ] description the pkcs #12 utility, pk12util, enables sharing certificates among any server that supports pkcs#12.
...
-l p12file list the keys and certificates in pkcs#12 file.
... -m | --key
-len keylength specify the desired length of the symmetric key to be used to encrypt the private key.
...And 3 more matches
NSS tools : ssltap
name ssltap — tap into ssl connections and display the data going by synopsis libssltap [-vhfsxl] [-p port] [hostname:port] description the ssl debugging tool ssltap is an ssl-aware command
-line proxy.
...
-l prefix turn on looping; that is, continue to accept connections rather than stopping after the first connection is complete.
...to make the tool continue to accept connections, switch on looping mode with the
-l option.
...And 3 more matches
Index
111 jsgetobjectops jsapi reference, obsolete, spidermonkey jsobjectops is used by js_newobject's internals to discover the set of high
-level object operations to use for new objects of the given class.
... 152 jsruntime jsapi reference, needscontent, needsupdate, spidermonkey in the jsapi, jsruntime is the top
-level object that represents an instance of the javascript engine.
... 194 js_cstringsareutf8 jsapi reference, obsolete, spidermonkey by default, all c/c++ strings passed into the jsapi are treated as iso/iec 8859-1, also known as iso
-latin-1.
...And 3 more matches
XPCOM glue
components using internal linkage will have shared
-library dependencies against non-frozen symbols in the xpcom libraries, and will not work with any other versions of xpcom other than the one it was compiled against.
... linking strategy: dependent glue standalone glue compiler flags: cross-platform #include "xpcom-config.h" #include "xpcom-config.h" #define xpcom_glue windows /fi "xpcom-config.h" linux -include "xpcom-config.h" linker flags: windows for older versions of the firefox sdk:
-libpath:c:/path/to/sdk/lib xpcomglue_s.lib xpcom.lib nspr4.lib for recent versions of the firefox sdk (at least version 42, but possibly earlier versions as well):
-libpath:c/path/to/sdk/lib xpcomglue_s.lib xul.lib nss3.lib mozcrt.lib
-libpath:c:/path/to/sdk/lib xpcomglue.lib mac
-l/path/to/sdk/lib
-l/path/to/sdk/bin -wl,-executable-path,/path/to/sdk/bin
-lxpcomglu...
...e_s
-lxpcom
-lnspr4 when building against a xulrunner derived sdk, use:
-l/path/to/sdk/lib
-l/path/to/xulrunner-bin -wl,-executable_path,/path/to/xulrunner-bin
-lxpcomglue_s
-lxpcom
-lnspr4 where 'xulrunner-bin' is either /library/frameworks/xul.framework/versions/current/ or /path/to/xulrunner-build/[platform]/dist/bin
-l/path/to/sdk/lib
-lxpcomglue linux
-l/path/to/sdk/lib
-l/path/to/sdk/bin -wl,-rpath
-link,/path/to/sdk/bin
-lxpcomglue_s
-lxpcom
-lnspr4 write it exactly as stated, see notes.
...And 3 more matches
nsICommandLine
preventdefault boolean there may be a command
-line handler which performs a default action if there was no explicit action on the command line (open a default browser window, for example).
... methods findflag() finds a command
-line flag, returning its position on the command line.
... return value the position of the flag in the command line, or -1 if the flag is not found.getargument() gets the value an argument from the array of command
-line arguments, given the index into the argument list.
...And 3 more matches
WebGL best practices - Web APIs
take advantage of universally supported webgl 1 extensions these webgl 1 extensions are universally supported: angle_instanced_arrays ext_blend_minmax oes_element_index_uint oes_standard_derivatives oes_vertex_array_object webgl_debug_renderer_info webgl_lose_context (see also: https://jdashg.github.io/misc/webgl/webgl-feature
-levels.html) consider polyfilling these into webglrenderingcontext, like: https://github.com/jdashg/misc/blob/master/webgl/webgl-v1.1.js universally supported limits the minimum requirements for webgl are quite low.
... batch draw calls (prefer fewer-but
-larger draw calls) fewer, larger draw operations will generally improve performance.
... instead of: function compileonce(gl, shader) { if (shader.compiled) return; gl.compileshader(shader); shader.compiled = true; } for (const [vs, fs, prog] of programs) { compileonce(gl, vs); compileonce(gl, fs); gl.linkprogram(prog); if (!gl.getprogramparameter(prog, gl.link_status)) { console.error('link failed: ' + gl.getprograminfolog(prog)); console.error('vs info
-log: ' + gl.getshaderinfolog(vs)); console.error('fs info
-log: ' + gl.getshaderinfolog(fs)); } } consider: function compileonce(gl, shader) { if (shader.compiled) return; gl.compileshader(shader); shader.compiled = true; } for (const [vs, fs, prog] of programs) { compileonce(gl, vs); compileonce(gl, fs); } for (const [vs, fs, prog] of programs) { gl.linkprogram(prog); } for (co...
...And 3 more matches
ARIA: feed role - Accessibility
another feature of the feed pattern is skim reading: articles within a feed can contain both an accessible name with the aria
-label and a description with an aria-describedby, suggesting to screen readers which elements to speak after the label when navigating by article.
... wai-aria roles, states, and properties aria
-labelled if the feed has no visible title, the feed element has a label specified with aria
-label.
... if it does, see aria
-labelledby.
...And 3 more matches
ARIA: grid role - Accessibility
<table role="grid" aria
-labelledby="id-select-your-seat"> <caption id="id-select-your-seat">select your seat</caption> <tbody role="presentation"> <tr role="presentation"> <td></td> <th>row a</th> <th>row b</th> </tr> <tr> <th scope="row">aisle 1</th> <td tabindex="0"> <button id="1a" tabindex="-1">1a</button> </td> <td tabindex="-1"> <button id="1b" tabindex="-1">1b</button> </td> <!-- more columns --> </tr> <tr> <th scope="row">aisle 2</th> <td tabindex="-1"> <button id="2a" tabindex="-1">2a</button> </td> <td tab...
... states and properties aria
-level indicates the hierarchical level of the grid within other structures.
... examples calendar example html <table role="grid" aria
-labelledby="calendarheader" aria-readonly=true> <caption id="calendarheader">september 2018</caption> <thead role="rowgroup"> <tr role="row"> <td></td> <th role="columnheader" aria
-label="sunday">s</th> <th role="columnheader" aria
-label="monday">m</th> <th role="columnheader" aria
-label="tuesday">t</th> <th role="columnheader" aria
-label="wednesday">w</th> ...
...And 3 more matches
ARIA: listbox role - Accessibility
aria
-label a human-readable string value which identifies the listbox.
... if there's a visible label, then aria
-labelledby should be used instead to refer to that label.
... aria
-labelledby identifies the visible element or elements in a space-separated list of element ids which identify the listbox.
...And 3 more matches
Using CSS animations - CSS: Cascading Style Sheets
p { animation-duration: 3s; animation-name: slidein; } @keyframes slidein { from { margin
-left: 100%; width: 300%; } to { margin
-left: 0%; width: 100%; } } in this example the style for the <p> element specifies that the animation should take 3 seconds to execute from start to finish, using the animation-duration property, and that the name of the @keyframes at-rule defining the keyframes for the animation sequence is named “slidein”.
...that’s as simple as adding this keyframe: 75% { font-size: 300%; margin
-left: 25%; width: 150%; } the full code now looks like this: p { animation-duration: 3s; animation-name: slidein; } @keyframes slidein { from { margin
-left: 100%; width: 300%; } 75% { font-size: 300%; margin
-left: 25%; width: 150%; } to { margin
-left: 0%; width: 100%; } } <p>the caterpillar and alice looked at each other for some time in silence...
...in this case, let’s use infinite to have the animation repeat indefinitely: p { animation-duration: 3s; animation-name: slidein; animation-iteration-count: infinite; } adding it to the existing code: @keyframes slidein { from { margin
-left: 100%; width: 300%; } to { margin
-left: 0%; width: 100%; } } <p>the caterpillar and alice looked at each other for some time in silence: at last the caterpillar took the hookah out of its mouth, and addressed her in a languid, sleepy voice.</p> making it move back and forth that made it repeat, but it’s very odd having it jump back to the start each time it begins a...
...And 3 more matches
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
if you want to change your page, or part of your page, to vertical
-lr then you can set writing-mode: vertical
-lr on the element and this will change the direction of the blocks and therefore the inline direction as well.
... the writing-mode property and block flow the writing-mode property accepts the values horizontal-tb, vertical-rl and vertical
-lr.
... the value vertical-rl gives you a right-to
-left block flow direction with a vertical inline direction, as shown in the next example.
...And 3 more matches
OpenType font features guide - CSS: Cascading Style Sheets
these are all referred to as opentype features, and are made available to use on the web via specific properties and a low
-level control property — font-feature-settings.
...they are all defined and shown here, but many will only work using the lower
-level font-feature-settings property.
... note: the examples below show the properties and some example combinations, along with the lower
-level syntax equivalents.
...And 3 more matches
Variable fonts guide - CSS: Cascading Style Sheets
custom axes are in fact limitless: the typeface designer can define and scope any axis they like, and are just required to give it a four
-letter tag to identify it within the font file format itself.
... you can use these four
-letter tags in css to specify a point along that axis of variation, as will be show in the code examples below.
...where possible, both the standard and lower
-level syntax are included.
...And 3 more matches
<blend-mode> - CSS: Cascading Style Sheets
this blend mode is equivalent to hard
-light but with the layers swapped.
... <div id="div"></div> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: color-burn; } hard
-light the final color is the result of multiply if the top color is darker, or screen if the top color is lighter.
... <div id="div"></div> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: hard
-light; } soft
-light the final color is similar to hard
-light, but softer.
...And 3 more matches
border-color - CSS: Cascading Style Sheets
each side can be set individually using border-top-color, border-right-color, border-bottom-color, and border
-left-color; or using the writing mode-aware border-block-start-color, border-block-end-color, border-inline-start-color, and border-inline-end-color.
... constituent properties this property is a shorthand for the following css properties: border-bottom-color border
-left-color border-right-color border-top-color syntax /* <color> values */ border-color: red; /* horizontal | vertical */ border-color: red #f015ca; /* top | vertical | bottom */ border-color: red rgb(240,30,50,.7) green; /* top | right | bottom | left */ border-color: red yellow green blue; /* global values */ border-color: inherit; border-color: initial; border-color: unset; the border-color property may be specified using one, two, three, or four values.
... formal definition initial valueas each of the properties of the shorthand:border-top-color: currentcolorborder-right-color: currentcolorborder-bottom-color: currentcolorborder
-left-color: currentcolorapplies toall elements.
...And 3 more matches
grid-template-rows - CSS: Cascading Style Sheets
syntax /* keyword value */ grid-template-rows: none; /* <track
-list> values */ grid-template-rows: 100px 1fr; grid-template-rows: [linename] 100px; grid-template-rows: [linename1] 100px [linename2 linename3]; grid-template-rows: minmax(100px, 1fr); grid-template-rows: fit-content(40%); grid-template-rows: repeat(3, 200px); grid-template-rows: subgrid; /* <auto-track
-list> values */ grid-template-rows: 200px repeat(auto-fill, 100px) 300px; grid-template-rows: ...
... repeat(auto-fit, [linename3 linename4] 300px) 100px; grid-template-rows: [linename1 linename2] 100px repeat(auto-fit, [linename1] 300px) [linename3]; /* global values */ grid-template-rows: inherit; grid-template-rows: initial; grid-template-rows: unset; this property may be specified as: either the keyword value none or a <track
-list> value or an <auto-track
-list> value.
... repeat( [ <positive-integer> | auto-fill | auto-fit ] , <track
-list> ) represents a repeated fragment of the track list, allowing a large number of rows that exhibit a recurring pattern to be written in a more compact form.
...And 3 more matches
list-style-type - CSS: Cascading Style Sheets
一, 二, 三, ..., 九八, 九九, 一〇〇 decimal
-leading-zero decimal numbers padded by initial zeros e.g.
...α, β, γ… lower-alpha lower
-latin lowercase ascii letters e.g.
... a, b, c, … z lower
-latin is unsupported in ie7 and earlier see browser compatibility section.
...And 3 more matches
Microformats - HTML: Hypertext Markup Language
these top
-level root classes usually indicate a type and corresponding expected vocabulary of properties.
..."u-url", "u-photo", "u
-logo" special parsing: element attributes a/href, img/src, object/data etc.
...erty is defined in html using the class property any element can carry example h-card <p class="h-card"> <img class="u-photo" src="http://example.org/photo.png" alt="" /> <a class="p-name u-url" href="http://example.org">joe bloggs</a> <a class="u-email" href="mailto:joebloggs@example.com">joebloggs@example.com</a>, <span class="p-street-address">17 austerstræti</span> <span class="p
-locality">reykjavík</span> <span class="p-country-name">iceland</span> </p> property description p-name the full/formatted name of the person or organization.
...And 3 more matches
Using Feature Policy - HTTP
feature policy allows you to control which origins can use which features, both in the top
-level page and in embedded frames.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
...And 3 more matches
HTTP headers - HTTP
hop-by-hop headers these headers are meaningful only for a single transport
-level connection, and must not be retransmitted by proxies or cached.
... accept-ch
-lifetime servers can ask the client to remember the set of client hints that the server supports for a specified period of time, to enable delivery of client hints on subsequent requests to the server’s origin ([rfc6454]).
... accept
-language informs the server about the human language the server is expected to send back.
...And 3 more matches
A typical HTTP session - HTTP
http://developer.mozilla.org/, and telling the server that the user-agent would prefer the page in french, if possible: get / http/1.1 host: developer.mozilla.org accept
-language: fr observe that final empty line, this separates the data block from the header block.
... as there is no content
-length provided in an http header, this data block is presented empty, marking the end of the headers, allowing the server to process the request the moment it receives this empty line.
... for example, sending the result of a form: post /contact_form.php http/1.1 host: developer.mozilla.org content
-length: 64 content-type: application/x-www-form-urlencoded name=joe%20user&request=send%20me%20one%20of%20your%20catalogue request methods http defines a set of request methods indicating the desired action to be performed upon a resource.
...And 3 more matches
Web audio codec guide - Web media technologies
the audio is encoded using pulse code modulation (pcm) with either µ
-law or a
-law encoding.
... the primary benefit to µ
-law encoding is that the byte 0x00 never appears in the encoded audio, which may be beneficial in certain applications or networking environments.
... µ
-law is primarily used in north america and japan, with a
-law being predominant elsewhere.
...And 3 more matches
Content type - SVG: Scalable Vector Graphics
for compatibility, the all
-lowercase form "rgb(" is preferred.
... non
-local iri references, where the iri reference does contain an <absoluteiri> or <relativeiri>.
...for example, a <list-of
-lengths> is represented in the svg dom using an svglengthlist or svganimatedlengthlist object.
...And 3 more matches
WebAssembly Concepts - WebAssembly
it is not primarily intended to be written by hand, rather it is designed to be an effective compilation target for low
-level source languages like c, c++, rust, etc.
... be readable and debuggable — webassembly is a low
-level assembly language, but it does have a human-readable text format (the specification for which is still being finalized) that allows code to be written, viewed, and debugged by hand.
...instead, it is designed to complement and work alongside javascript, allowing web developers to take advantage of both languages' strong points: javascript is a high
-level language, flexible and expressive enough to write web applications.
...And 3 more matches
tabs - Archive of obsolete content
you can't attach style sheets to a tab using tab.attach(), but from firefox 34 onwards you can attach and detach them using the low
-level stylesheet/style and content/mod apis.
... converting to xul tabs to convert from the high
-level tab objects used in this api to the low
-level xul tab objects used in the tabs/utils api and by traditional add-ons, use the viewfor() function exported by the viewfor module.
... to convert back the other way, from a xul tab to a high
-level tab object, use the modelfor() function, exported by the modelfor module.
...And 2 more matches
Storing annotations - Archive of obsolete content
annotation list content script here's the annotation list's content script: self.on("message", function onmessage(storedannotations) { var annotationlist = $('#annotation
-list'); annotationlist.empty(); storedannotations.foreach( function(storedannotation) { var annotationhtml = $('#template .annotation-details').clone(); annotationhtml.find('.url').text(storedannotation.url) .attr('href', storedannotation.url); annotationhtml.find('.url').bind('click', function(event) { event.stoppropagation(); ...
... save this file in data/list as annotation
-list.js.
... annotation list html and css here's the html for the annotation list: <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>saved annotations</title> <link rel="stylesheet" type="text/css" href="annotation
-list.css" /> </head> <body> <div id="annotation
-list"> </div> <div id="template"> <div class="annotation-details"> <a class="url"></a> <div class="selection-text"></div> <div class="annotation-text"></div> </div> </div> </body> </html> here's the corresponding css: #annotation
-list .annotation-details { padding: 10px; margin: 10px; border: solid 3px #eee; background-color: white; } #annotation
-list .url, .selection-text, .annotation-text { padding: 5px; margin: 5px; } #annotation
-list .selection-te...
...And 2 more matches
Getting Started (jpm) - Archive of obsolete content
the add-on sdk includes a command
-line tool that you use to initialize, run, test, and package add-ons.
... the command
-line jpm tool.
...open it and add the following code: var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.actionbutton({ id: "mozilla
-link", label: "visit mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onclick: handleclick }); function handleclick(state) { tabs.open("http://www.mozilla.org/"); } note that "entry point" defaults to "index.js" in jpm, meaning that your main file is "index.js", and it is found directly in your add-on's root.
...And 2 more matches
Positioning - Archive of obsolete content
valid values for the anchor alignment (ie, the first word) are shown below anchor alignment values topleft the popup will be aligned with the upper
-left corner of the anchor.
... bottomleft the popup will be aligned with the lower
-left corner of the anchor.
... valid values for the popup alignment (ie, the second word) are shown below popup alignment values topleft the top
-left corner of the popup will be aligned with the specified corner or edge of the anchor element.
...And 2 more matches
Accessibility/XUL Accessibility Reference - Archive of obsolete content
element enabled usage comments description <description value="<!-- text -->" /> <description><!-
-label text--></description> use for non
-label text.
... label <label control="controlid" value="<!-
-label text-->" /> <label control="controlid"><!-
-label text--></label> either syntax is fine.
... caption see groupbox checkbox <checkbox label='<!-
-label text-->' /> colorpicker <colorpicker type="button" palettename="standard" /> colorpicker appears to read color values out if the colorpicker can get focus in the first place.
...And 2 more matches
label - Archive of obsolete content
attributes accesskey, control, crop, disabled, href, value properties accesskey, accessibletype, control, crop, disabled, value style classes header, indent, monospace, plain, small-margin, text
-link examples <label value="email address" control="email"/> <textbox id="email"/> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to
-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to
-left locales.
...And 2 more matches
MacFAQ - Archive of obsolete content
in your .mozconfig for custom builds of xulrunner, add --enable
-libxul.
...note that in order to copy the framework while keeping the relative soft
-links in the framework, do something like: % ( cd dist ; gnutar cf - xul.framework | ( cd /library/frameworks ; gnutar xf - )) installing your application your application must be installed as a xulrunner app before you can open it.
...for command
-line work, you would call on: /applications/(vendor)/(name).app/contents/macos/xulrunner ui notes menus to enable your application quit command to work with the application menu (the one to the right of the blue apple), you need to give your quit menu item an id of "menu_filequititem".
...And 2 more matches
azimuth - Archive of obsolete content
initial valuecenterapplies toall elementsinheritedyescomputed valuenormalized angleanimation typediscrete syntax <angle> | [ [ left-side | far
-left | left | center
-left | center | center-right | right | far-right | right-side ] | behind ] | leftwards | rightwards values angle audible source position is described as an angle within the range -360deg to 360deg.
... far
-left: same as 300deg.
... far
-left behind: same as 240deg.
...And 2 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
towards the bottom of the code are two div tags with ids form-comments and out
-logger.
... the form-comments div is used to render the form and the out
-logger will be used as a log display as each comment is added.
... listing 7 - manipulating the dom server-side <script runat="server"> window.onserverload = function() { document.getelementbyid( "out
-logger" ).innerhtml = jaxer.file.read( "dump.txt" ); } </script> the code in listing 7 is executed server-side and takes advantage of the onserverload event which ensures that we have a complete dom before trying to access it.
...And 2 more matches
Implementation Status - Archive of obsolete content
4.4.14 domfocusout supported 4.4.15 xforms-select xforms-deselect supported 4.4.16 xforms-in-range supported 4.4.17 xforms-out-of-range supported 4.4.18 xforms-scroll-first xforms-scroll
-last supported 4.4.19 xforms-submit-done supported 4.5 error indications partial we don't support the xforms-version-exception event, yet 4.5.1 xforms-binding-exception supported 4.5.2 xforms-compute-exception supported ...
... 4.5.3 xforms
-link-error partial not yet generated by load.
... 333782; 4.5.4 xforms
-link-exception supported 4.5.5 xforms-output-exception unsupported 4.5.6 xforms-submit-error supported 4.5.7 xforms-version-exception unsupported 4.6 event sequencing supported 4.6.1 for input, secret, textarea, range, or upload controls supported 4.6.2 for output controls supported 4.6.3 for select or select1 controls partial 4.6.4 for trigger controls supported ...
...And 2 more matches
What is accessibility? - Learn web development
note: the world health organization's disability and health fact sheet states that "over a billion people, about 15% of the world's population, have some form of disability", and "between 110 million and 190 million adults have significant difficulties in functioning." people with visual impairments people with visual impairments include people with blindness, low
-level vision, and color blindness.
... people with cognitive impairments cognitive impairment refers to a broad range of disabilities, from people with intellectual disabilities who have the most
-limited capabilities, to all of us as we age and have difficulty thinking and remembering.
... a good foundation of accessibility for people with cognitive impairments includes: delivering content in more than one way, such as by text-to-speech or by video; easily-understood content, such as text written using plain
-language standards; focusing attention on important content; minimizing distractions, such as unnecessary content or advertisements; consistent webpage layout and navigation; familiar elements, such as underlined links blue when not visited and purple when visited; dividing processes into logical, essential steps with progress indicators; website authentication as easy as possible without com...
...And 2 more matches
How to structure a web form - Learn web development
ame="size" id="size_1" value="small"> <label for="size_1">small</label> </p> <p> <input type="radio" name="size" id="size_2" value="medium"> <label for="size_2">medium</label> </p> <p> <input type="radio" name="size" id="size_3" value="large"> <label for="size_3">large</label> </p> </fieldset> </form> note: you can find this example in fieldset
-legend.html (see it live also).
...below will toggle the selected state of the taste_cherry checkbox: <form> <p> <input type="checkbox" id="taste_1" name="taste_cherry" value="cherry"> <label for="taste_1">i like cherry</label> </p> <p> <input type="checkbox" id="taste_2" name="taste_banana" value="banana"> <label for="taste_2">i like banana</label> </p> </form> note: you can find this example in checkbox
-label.html (see it live also).
... let's consider this example: <p>required fields are followed by <abbr title="required">*</abbr>.</p> <!-- so this: --> <div> <label for="username">name:</label> <input id="username" type="text" name="username"> <label for="username"><abbr title="required" aria
-label="required">*</abbr></label> </div> <!-- would be better done like this: --> <div> <label for="username"> <span>name:</span> <input id="username" type="text" name="username"> <abbr title="required" aria
-label="required">*</abbr> </label> </div> <!-- but this is probably best: --> <div> <label for="username">name: <abbr title="required" aria
-label="required">*</abbr></label>...
...And 2 more matches
Styling web forms - Learn web development
these include the following elements: <form> <fieldset> and <legend> single
-line text <input>s (e.g.
... multi
-line <textarea>s buttons (both <input> and <button>s) <label> <output> the bad some elements are more difficult to style, requiring more complex css or some more specific tricks: checkboxes and radio buttons <input type="search"> we describe how to handle these more specific features in the article advanced form styling.
...these include: <input type="color"> date-related controls such as <input type="datetime
-local"> <input type="range"> <input type="file"> elements involved in creating dropdown widgets, including <select>, <option>, <optgroup> and <datalist>.
...And 2 more matches
Looping code - Learn web development
at this point, you probably understand the high
-level concepts behind loops, but you are probably thinking "ok, great, but how does this help me write better javascript code?" as we said earlier, loops are all to do with doing the same thing over and over again, which is great for rapidly completing repetitive tasks.
... active learning <h2>live output</h2> <div class="output" style="height: 410px;overflow: auto;"> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="playable-code" style="height: 300px;width: 95%"> let output = document.queryselector('.output'); output.innerhtml = ''; // let i = 10; // const para = document.createelement('p'); // para.textcontent = ; // output.appendchild(para); </textarea> <div class="playable-buttons"> <in...
...put id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y
-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = document.getelementbyid('code'); const reset = document.getelementbyid('reset'); const solution = document.getelementbyid('solution'); let code = textarea.value; let userentry = textarea.value; function updatecode() { eval(textarea.value); } reset.addeventlistener('click', function() { textarea.value = code; userentry = textarea.value; solutionentry = jssolution; solution.value = 'show solution'; updatecode(); }); solution.addeventlistener('click', f...
...And 2 more matches
Arrays - Learn web development
arrays are generally described as "list
-like objects"; they are basically single objects that contain multiple values stored in a list.
... playable code <h2>live output</h2> <div class="output" style="min-height: 150px;"> <ul> </ul> <p></p> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="playable-code" style="height: 410px;width: 95%"> const list = document.queryselector('.output ul'); const totalbox = document.queryselector('.output p'); let total = 0; list.innerhtml = ''; totalbox.textcontent = ''; // number 1 'underpants:6.99' 'soc...
...rea code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not the solution, so that solution is not saved over the user code if(solution.value === 'show solution') { userentry = textarea.value; } else { solutionentry = textarea.value; } updatecode(); }; html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y
-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background-color: #f5f9fa; } active learning: top 5 searches a good use for array methods like push() and pop() is when you are maintaining a record of currently active items in a web app.
...And 2 more matches
Aprender y obtener ayuda - Learn web development
you concentrate deeply on a low
-level topic and solving the specific problems that it brings.
... diffuse learning is more to do with high
-level thinking around a wider area.
... this is why it is usually good to read some introductory material first to get a high
-level understanding of an area before you leap into the specific details.
...And 2 more matches
Getting started with Svelte - Learn web development
your browser will display something like this: application structure the starter template comes with the following structure: moz-todo-svelte ├── readme.md ├── package.json ├── package
-lock.json ├── rollup.config.js ├── .gitignore ├── node_modules ├── public │ ├── favicon.ico │ ├── index.html │ ├── global.css │ └── build │ ├── bundle.css │ ├── bundle.css.map │ ├── bundle.js │ └── bundle.js.map └── src ├── app.svelte └── main.js the con...
...tents are as follows: package.json and package
-lock.json: contains information about the project that node.js/npm uses to keep it organized.
... app.svelte: this is the top
-level component of your app.
...And 2 more matches
How Mozilla's build system works
phases when you type mach build to build the tree, three high
-level phases occur within the build system: system detection and validation preparation of the build backend invocation of the build backend phase 1: configure phase 1 centers around the configure script.
... config.status contains 2 parts: data structures representing the output of configure and a command
-line interface for preparing, configuring, or generating an appropriate build backend.
...the role of treemetadataemitter is to convert the low
-level mozbuildsandbox dictionaries into higher
-level function-specific data structures.
...And 2 more matches
Gecko Keypress Event
if gecko doesn't replace the charcode with an ascii character, the web application developers would need to consider all non
-latin keyboard layouts (arabic, greek, hebrew, russian, etc.).
... note that replacing the original (non-ascii) characters on these keys means that there are some accessibility issues for non
-latin keyboard layout users as many non-ascii characters will not be available for shortcuts.
... if the current keyboard layout is dvorak-qwerty layout or a non
-latin layout, the command key switches the keyboard layout to the us qwerty keyboard layout temporary.
...And 2 more matches
QA phase
preliminary instructions we will be using the following file directories for this example: your working directory (root)/ mozilla-aurora (en-us source, pulled from http://hg.mozilla.org/releases/mozilla-aurora )/ l10n-central (directory for l10n directories, one per l10n; often referred to as "l10n base")/ your
-locale-code (a directory with your l10n files, in this example we'll use x-testing) example: root/mozilla-aurora & root/l10n-central/x-testing additionally, you will need to copy and translate the toolkit/defines.inc file directly from en-us before you can build.
... to copy this file to the appropriate directory, do the following: navigate to your working directory from your command
-line terminal (i.e., where you created the folder structure described above).
...om .mozconfig in step 3 use ./mach build config after step 4 update the mozilla source code: $ cd mozilla-aurora $ hg pull -u enter the following command to create the .mozconfig file: $ nano -w .mozconfig enter the following lines in your .mozconfig file: mk_add_options moz_objdir=@topsrcdir@/../firefox-build ac_add_options --disable-compile-environment ac_add_options --with
-l10n-base=../l10n-central # path relative to moz_objdir ac_add_options --enable-application=[browser or mail] you will need to specify which application you're localizing in the fourth line (e.g., for firefox, that's browser, thunderbird would be mail).
...And 2 more matches
SVN for Localizers
here's the layout you will find within the projects/mozilla.com directory: navigating from the command
-line with your svn client, you'll find three directories within projects/mozilla.com.
... enter the following command in your command
-line tool: svn checkout https://svn.mozilla.org/projects/mozilla.com/trunk/locales/[your locale code] mozilla
-l10n-[your
-localecode] this command creates the mozilla
-l10n-[your
-localecode] directory on your computer and copies into it all of the files from https://svn.mozilla.org/projects/moz...om/trunk/locales/[your locale code].
... translate the content in those files, save them and check for differences by entering this command from the command
-line: svn diff this command produces output with every change made to each file.
...And 2 more matches
Refcount tracing and balancing
how to build for refcount tracing build with --enable-debug or --enable
-logrefcnt.
... post-processing step 2: filtering the log once you've picked an object that leaked, you can use tools/rb/filter
-log.pl to filter the log file to drop the call stack for other objects; this process reduces the size of the log file and also improves the performance.
... perl -w tools/rb/filter
-log.pl --object 0x00253ab0 < ./refcounts.log > my
-leak.log linux users the log file generated on linux system often lack function names, file names and line numbers.
...And 2 more matches
TraceMalloc
the built mozilla application will support the following additional command
-line options: --trace-malloc filename the application will log allocation and deallocation events with stack traces in a binary format to the given file.
... --shutdown
-leaks=filename on shutdown, the application will save live allocations (with stack traces) to the given file.
...# run application with shutdown logging # note: tinderbox leak tests use: python leaktest.py -- --trace-malloc malloc.log --shutdown
-leaks=sdleak.log # note 2: it appears that the shutdown log is not recorded if --trace-malloc is given the - argument.
...And 2 more matches
AsyncTestUtils extended framework
in order to give these events a chance to run we either need to make sure we yield control to the top
-level event loop or spin our own nested event loop.
... asynctestutils is currently implemented by the first method (yielding control to the top
-level event loop).
...returning false tells the asynchronous driver that it should yield control up to the top
-level.
...And 2 more matches
NSS tools : crlutil
please contribute to the initial review in mozilla nss bug 836477[1] description the certificate revocation list (crl) management tool, crlutil, is a command
-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... -i import a crl to the cert database -e erase all crls of specified type from the cert database
-l list existing crl located in cert database file.
...
-l algorithm-name specify a specific signature algorithm.
...And 2 more matches
NSS tools : crlutil
synopsis crlutil [options] arguments description the certificate revocation list (crl) management tool, crlutil, is a command
-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... -i import a crl to the cert database -e erase all crls of specified type from the cert database
-l list existing crl located in cert database file.
...
-l algorithm-name specify a specific signature algorithm.
...And 2 more matches
Scripting Java
rhino defines a top
-level variable named packages.
... the properties of the packages variable are all the top
-level java packages, such as java and com.
... for example, we can access the value of the java package: js> packages.java [javapackage java] as a handy shortcut, rhino defines a top
-level variable java that is equivalent to packages.java.
...And 2 more matches
Functions
a nested function is algol
-like if it is only ever defined and called, and it isn't accessed in any other way (and it is not a generator-function).
...an algol
-like function may read the local variables and arguments of its immediate enclosing function from the stack, as if by magic.
... (jscontext::display caches the enclosing function's stack frame.) if that function is also algol
-like, its child can read locals and variables from the next enclosing function, and so on.
...And 2 more matches
JIT Optimization Strategies
it applies to property accesses on objects which are global
-like in that there is only one instance of them per program.
... this includes global objects, object literals defined at the top
-level of a script, and top
-level function objects.
...unique (or "singleton") types are assigned to certain kinds of objects, like global objects, top
-level functions, and object literals declared at the top
-level of a script.
...And 2 more matches
Gecko object attributes
applied to: grid, heading, listitem, row, tablist exposed in aria: aria
-level posinset if this item is in a group, what is the item number within the group, where the size is defined by the setsize attribute.
... applied to: any role exposed in aria: aria
-live relevant space delimited string with keywords describing what kinds of changes in the subtree are informational, as opposed to presentational.
... container
-live interruption policy.
...And 2 more matches
Observer Notifications
browser
-lastwindow-close-requested sent when the browser wishes to close the last open browser window.
... browser
-lastwindow-close-granted sent when all interested parties have responded to the browser
-lastwindow-close-requested notification and none of them requested that the close be aborted.
... places-database
-locked the places database is currently locked by a third-party process and cannot be opened.
...And 2 more matches
Basic concepts - Web APIs
if the object store has a key path, it is using in
-line keys; otherwise, it is using out-of
-line keys.
... transactions are expected to be short
-lived, so the browser can terminate a transaction that takes too long, in order to free up storage resources that the long-running transaction has locked.
... in
-line key a key that is stored as part of the stored value.
...And 2 more matches
Using IndexedDB - Web APIs
</tr> </tbody> </table> <div class="button-pane"> <input type="button" id="delete-button" value="delete publication" /> <input type="button" id="clear-store-button" value="clear the whole store" class="destructive" /> </div> </form> <form id="search-form"> <div class="button-pane"> <input type="button" id="search
-list-button" value="list database content" /> </div> </form> <div> <div id="pub-msg"> </div> <div id="pub-viewer"> </div> <ul id="pub
-list"> </ul> </div> css content body { font-size: 0.8em; font-family: sans-serif; } form { background-color: #cccccc; border-radius: 0.3em; display: inline-block; margin-bottom: 0.5...
...em; padding: 1em; } table { border-collapse: collapse; } input { padding: 0.3em; border-color: #cccccc; border-radius: 0.3em; } .required:after { content: "*"; color: red; } .button-pane { margin-top: 1em; } #pub-viewer { float: right; width: 48%; height: 20em; border: solid #d092ff 0.1em; } #pub-viewer iframe { width: 100%; height: 100%; } #pub
-list { width: 46%; background-color: #eeeeee; border-radius: 0.3em; } #pub
-list li { padding-top: 0.5em; padding-bottom: 0.5em; padding-right: 0.5em; } #msg { margin-bottom: 1em; } .action-success { padding: 0.5em; color: #00d21e; background-color: #eeeeee; border-radius: 0.2em; } .action-failure { padding: 0.5em; color: #ff1408; background-color: #eeeeee; border-radius: 0.2em; } .no...
...round-color: orange; } .destructive:hover { background-color: #ff8000; } .destructive:active { background-color: red; } javascript content (function () { var compat_envs = [ ['firefox', ">= 16.0"], ['google chrome', ">= 24.0 (you may need to get google chrome canary), no blob storage support"] ]; var compat = $('#compat'); compat.empty(); compat.append('<ul id="compat
-list"></ul>'); compat_envs.foreach(function(val, idx, array) { $('#compat
-list').append('<li>' + val[0] + ': ' + val[1] + '</li>'); }); const db_name = 'mdn-demo-indexeddb-epublications'; const db_version = 1; // use a long long for this value (don't use a float) const db_store_name = 'publications'; var db; // used to keep track of which view is displayed to avoid uselessly re...
...And 2 more matches
Web Video Text Tracks Format (WebVTT) - Web APIs
example 4 - common webvtt example note this is a comment example 5 - multi
-line comment note one comment that is spanning more than one line.
... crédit de transcription 00:04.000 --> 00:05.000 transcrit par célestes™ ::cue(#\31) { color: lime; } ::cue(#crédit\ de\ transcription) { color: red; } positioning of text tracks is also supported, by including positioning information after the timings in a cue, as seen below (see cue settings for more information): webvtt 00:00:00.000 --> 00:00:04.000 position:10%,line
-left align:left size:35% where did he go?
... table 6 - escape sequences name character escape sequence ampersand & & less-than < < greater-than > > left-to-right mark ‎ right-to
-left mark ‏ non-breaking space cue payload text tags there are a number of tags, such as <bold>, that can be used.
...And 2 more matches
Lighting a WebXR setting - Web APIs
and while this article provides brief reminders as to how lighting works in general, it is not by any means a tutorial in lighting or a guide to how to create a properly
-lit 3d scene.
...however, glossy, mirror
-like surfaces reflect most of the light in a direction whose angle of reflection, Θr, is equal to the angle of incidence, except it's on the opposite side of the normal vector.
... saturn's fifth
-largest moon, tethys, bathed in sunlight, coming from the lower left.
...And 2 more matches
ARIA annotations - Accessibility
aria annotations features the aria attributes providing these new abilities are as follows: aria-description="" — provides a detailed description of an html element, as opposed to the brief label provided by aria
-label.
...you’ll see examples of most of these later on in the article, but briefly: aria
-label="" can be set on an element to provide a brief descriptive label when it isn't appropriate to have the label actually appearing in the ui, for example a search input in a horizontal nav bar.
... aria
-labelledby="" can be set on an element and given a value the same as the id of an element that contains a label for the element.
...And 2 more matches
ARIA: contentinfo role - Accessibility
pages should only include one top
-level contentinfo landmark role per page.
... labeling landmarks multiple landmarks if there is more than one contentinfo landmark role or <footer> element in a document, provide a label with the aria
-label attribute for each landmark.
... <article> <h2>everyday pad thai</h2> <!-- article content --> <footer aria
-label="everyday pad thai metadata"> <p>posted on <time datetime="2018-09-23 12:17">may 16</time> by <a href="#">lisa</a>.</p> </footer> </article> ...
...And 2 more matches
ARIA: search role - Accessibility
<form id="site-search" role="search" aria
-label="sitewide"> <!-- search input --> </form> ...
... <form id="page-search" role="search" aria
-label="on this page"> <!-- search input --> </form> repeated landmarks if a search landmark role in a document is repeated in a document, and both landmarks have identical content, use the same label for each landmark.
... <header> <form id="site-search-top" role="search" aria
-label="sitewide"> <!-- search input --> </form> </header> ...
...And 2 more matches
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
the solution is in an aria attribute called aria
-labelledby.
... both aria
-labelledby and aria-describedby are specified on the form element that is to be labelled, for example an <input> in both cases, the label for/label control bindings that may also exist are overridden by aria
-labelledby.
... if on an html page you provide aria
-labelledby, you should also provide a label for construct to also support older browsers that do not have aria support yet.
...And 2 more matches
Web accessibility for seizures and physical reactions - Accessibility
this is "1" if the user has requested not to be tracked by web sites, content, or advertising" media queries level 5 environmentmq (planned in media queries level 5) light
-level has three valid values: dim, normal, and washed.
... light
-level from w3c's draft document, media queries level 5 section on light
-level: "the light
-level media feature is used to query about the ambient light
-level in which the device is used, to allow the author to adjust style of the document in response." this will be a godsend to those who have motor-skills problems, or for some with cognitive difficulties, who cannot find the right "button" to chang...
... personalization help and support the requirement for the literal property is taken from section 23 non
-literal text and images requirement: some users cannot understand non
-literal text and icons such as metaphors, idioms etc.
...And 2 more matches
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
if you have a wrapped multiple
-line flex container then you might also want to use the align-content property to control the distribution of space between the rows.
... however if the writing mode is right-to
-left as in arabic, the items will line up starting at the right side of the container.
... the live example below has the direction property set to rtl to force a right-to
-left flow for our items.
...And 2 more matches
CSS Fonts - CSS: Cascading Style Sheets
p { width: 600px; margin: 0 auto; font-family: "helvetica neue", "arial", sans-serif; font-style: italic; font-weight: 100; font-variant
-ligatures: normal; font-size: 2rem; letter-spacing: 1px; } <p>three hundred years ago<br> i thought i might get some sleep<br> i stretched myself out onna antique bed<br> an' my spirit did a midnite creep</p> the result is as follows: variable fonts examples you can find a number of variable fonts examples at v-fonts.com and axis-praxis.org; see also our variable fonts guide for mor...
... reference properties font font-family font-feature-settings font-kerning font
-language-override font-optical-sizing font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant
-ligatures font-variant-numeric font-variant-position font-variation-settings font-weight line-height at-rules @font-face font-family font-feature-settings font-style font-variant font-weight font-stretch src unicode-range @font-feature-values guides fundamental text and font styling in this beginner's learning article we go through all the basic fundamentals of text/font styling in detail, including setting font weight, ...
...these are all referred to as opentype features, and are made available to use on the web via specific properties and a low
-level control property — font-feature-settings.
...And 2 more matches
Animatable CSS properties - CSS: Cascading Style Sheets
the animatable properties are: -moz-outline-radius -moz-outline-radius-bottomleft -moz-outline-radius-bottomright -moz-outline-radius-topleft -moz-outline-radius-topright -webkit
-line-clamp -webkit-text-fill-color -webkit-text-stroke -webkit-text-stroke-color all backdrop-filter background background-color background-position background-size block-size border border-block-end border-block-end-color border-block-end-width border-block-start border-block-start-color border-block-start-width border...
...-bottom border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-width border-color border-end-end-radius border-end-start-radius border-image-outset border-image-slice border-image-width border-inline-end border-inline-end-color border-inline-end-width border-inline-start border-inline-start-color border-inline-start-width border
-left border
-left-color border
-left-width border-radius border-right border-right-color border-right-width border-start-end-radius border-start-start-radius border-top border-top-color border-top
-left-radius border-top-right-radius border-top-width border-width bottom box-sh...
...ate-columns grid-template-rows height inline-size inset inset-block inset-block-end inset-block-start inset-inline inset-inline-end inset-inline-start left letter-spacing line-clamp line-height margin margin-block-end margin-block-start margin-bottom margin-inline-end margin-inline-start margin
-left margin-right margin-top mask mask-border mask-position mask-size max-block-size max-height max-inline-size max
-lines max-width min-block-size min-height min-inline-size min-width object-position offset offset-anchor offset-distance offset-path offset-position offset-rotate opacity...
...And 2 more matches
border-inline-end - CSS: Cascading Style Sheets
it corresponds to the border-top, border-right, border-bottom, or border
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder
-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder
-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder
-left-width: the abs...
...olute length or 0 if border
-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder
-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedborder-inline-end-color: computed coloranimation typeas each of the properties of the shorthand:border-inline-end-color: a colorborder-inline-end-style: discreteborder-inline-end-width: a length values the border-inline-end is specified with one or more of the following, in any order: <'border-width'> the width of the border.
...And 2 more matches
grid-template-columns - CSS: Cascading Style Sheets
syntax /* keyword value */ grid-template-columns: none; /* <track
-list> values */ grid-template-columns: 100px 1fr; grid-template-columns: [linename] 100px; grid-template-columns: [linename1] 100px [linename2 linename3]; grid-template-columns: minmax(100px, 1fr); grid-template-columns: fit-content(40%); grid-template-columns: repeat(3, 200px); grid-template-columns: subgrid; /* <auto-track
-list> values */ grid-template-columns: 200px repeat(auto-fill, 100px) 300...
... repeat( [ <positive-integer> | auto-fill | auto-fit ] , <track
-list> ) represents a repeated fragment of the track list, allowing a large number of columns that exhibit a recurring pattern to be written in a more compact form.
...tion initial valuenoneapplies togrid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typesimple list of length, percentage, or calc, provided the only differences are in the values of the length, percentage, or calc components in the list formal syntax none | <track
-list> | <auto-track
-list> | subgrid <line-name
-list>?where <track
-list> = [ <line-names>?
...And 2 more matches
text-decoration - CSS: Cascading Style Sheets
it is a shorthand for text-decoration
-line, text-decoration-color, text-decoration-style, and the newer text-decoration-thickness property.
... constituent properties this property is a shorthand for the following css properties: text-decoration-color text-decoration
-line text-decoration-style text-decoration-thickness syntax the text-decoration property is specified as one or more space-separated values representing the various longhand text-decoration properties.
... values text-decoration
-line sets the kind of decoration used, such as underline or line-through.
...And 2 more matches
text-indent - CSS: Cascading Style Sheets
horizontal spacing is with respect to the left (or right, for right-to
-left layout) edge of the containing block
-level element's content box.
... syntax /* <length> values */ text-indent: 3mm; text-indent: 40px; /* <percentage> value relative to the containing block width */ text-indent: 15%; /* keyword values */ text-indent: 5em each
-line; text-indent: 5em hanging; text-indent: 5em hanging each
-line; /* global values */ text-indent: inherit; text-indent: initial; text-indent: unset; values <length> indentation is specified as an absolute <length>.
... each
-line indentation affects the first line of the block container as well as each line after a forced line break, but does not affect lines after a soft wrap break.
...And 2 more matches
HTML attribute: rel - HTML: Hypertext Markup Language
not allowed annotation annotation noopener creates a top
-level browsing context that is not an auxiliary browsing context if the hyperlink would create either of those to begin with (i.e., has an appropriate target attribute value).
... not allowed annotation annotation opener creates an auxiliary browsing context if the hyperlink would otherwise create a top
-level browsing context that is not anauxiliary browsing context (i.e., has "_blank" as target attribute value).
... noopener relevant to <form>, <a>, and <area>, creates a top
-level browsing context that is not an auxiliary browsing context if the hyperlink would create either of those to begin with (i.e., has an appropriate target attribute value).
...And 2 more matches
HTML elements reference - HTML: Hypertext Markup Language
main root element description <html> the html <html> element represents the root (top
-level element) of an html document, so it is also referred to as the root element.
... <hgroup> the html <hgroup> element represents a multi
-level heading for a section of a document.
... <hr> the html <hr> element represents a thematic break between paragraph
-level elements: for example, a change of scene in a story, or a shift of topic within a section.
...And 2 more matches
Connection management in HTTP/1.x - HTTP
in http/1.x, there are several models: short
-lived connections, persistent connections, and http pipelining.
...these connections were short
-lived: a new one created each time a request needed sending, and closed once the answer had been received.
... short
-lived connections the original model of http, and the default one in http/1.0, is short
-lived connections.
...And 2 more matches
Content negotiation - HTTP
the http/1.1 standard defines list of the standard headers that start server-driven negotiation (accept, accept-charset, accept-encoding, accept
-language).
... the accept-ch
-lifetime header this is part of an experimental technology called client hints and is only available in chrome 61 or later.
... the accept-ch
-lifetime header is used with the device-memory value of the accept-ch header and indicates the amount of time the device should opt-in to sharing the amount of device memory with the server.
...And 2 more matches
Feature-Policy: fullscreen - HTTP
by default, top
-level documents and their same-origin child frames can request and enter fullscreen mode.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
...And 2 more matches
Feature-Policy: geolocation - HTTP
by default, the geolocation api can be used within top
-level documents and their same-origin child frames.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
...And 2 more matches
Index - HTTP
5 accept
-language content negotiation, http, http header, reference, request header the accept
-language request http header advertises which languages the client is able to understand, and which locale variant is preferred.
... (by languages, we mean natural languages, such as english, and not programming languages.) using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the content
-language response header.
... 24 content
-language http, headers, reference the content
-language entity header is used to describe the language(s) intended for the audience, so that it allows a user to differentiate according to the users' own preferred language.
...And 2 more matches
HTTP range requests - HTTP
accept-ranges: bytes content
-length: 146515 in this response, accept-ranges: bytes indicates that bytes can be used as unit to define a range.
... here the content
-length header is also useful as it indicates the full size of the image to retrieve.
... curl http://i.imgur.com/z4d4kwk.jpg -i -h "range: bytes=0-1023" the issued request looks like this: get /z4d4kwk.jpg http/1.1 host: i.imgur.com range: bytes=0-1023 the server responses with the 206 partial content status: http/1.1 206 partial content content-range: bytes 0-1023/146515 content
-length: 1024 ...
...And 2 more matches
Functions - JavaScript
the stack
-like behavior can be seen in the following example: function foo(i) { if (i < 0) return; console.log('begin: ' + i); foo(i - 1); console.log('end: ' + i); } foo(3); // output: // begin: 3 // begin: 2 // begin: 1 // begin: 0 // end: 0 // end: 1 // end: 2 // end: 3 nested functions and closures you may nest a function within another function.
... } } } using the arguments object the arguments of a function are maintained in an array
-like object.
...', 'sage', 'basil', 'oregano', 'pepper', 'parsley'); note: the arguments variable is "array
-like", but not an array.
...And 2 more matches
Grammar and types - JavaScript
(spaces, tabs, and newline characters are considered whitespace.) comments the syntax of comments is the same as in c++ and in many other languages: // a one line comment /* this is a longer, * multi
-line comment */ /* you can't, however, /* nest comments */ syntaxerror */ comments behave like whitespace, and are discarded during script execution.
...a top
-level property whose value is not defined.
... if an array is created using a literal in a top
-level script, javascript interprets the array each time it evaluates the expression containing the array literal.
...And 2 more matches
Indexed collections - JavaScript
this includes arrays and array
-like constructs such as array objects and typedarray objects.
... working with array
-like objects some javascript objects, such as the nodelist returned by document.getelementsbytagname() or the arguments object made available within the body of a function, look and behave like arrays on the surface but do not share all of their methods.
... array methods cannot be called directly on array
-like objects.
...And 2 more matches
Introduction - JavaScript
the web console tool built into firefox is useful for experimenting with javascript; you can use it into two modes: single
-line input mode, and multi
-line input mode.
... single
-line input in the web console the web console shows you information about the currently loaded web page, and also includes a javascript interpreter that you can use to execute javascript expressions in the current page.
...for the sake of simplicity, it can be imagined that every time something is entered into the console, it is actually surrounded by console.log around eval, like so: function greetme(yourname) { alert("hello " + yourname) } console.log(eval('3 + 5')) multi
-line input in the web console the single
-line input mode of the web console is great for quick testing of javascript expressions, but although you can execute multiple lines, it's not very convenient for that.
...And 2 more matches
Text formatting - JavaScript
you can't change individual characters because strings are immutable array
-like objects: const hello = 'hello, world!'; const hellolength = hello.length; hello[0] = 'l'; // this has no effect, because strings are immutable hello[0]; // this returns "h" characters whose unicode scalar values are greater than u+ffff (such as some rare chinese/japanese/korean/vietnamese characters and some emoji) are stored in utf-16 with two surrogate code units each.
... multi
-line template literals template literals are string literals allowing embedded expressions.
... you can use multi
-line strings and string interpolation features with them.
...And 2 more matches
Memory Management - JavaScript
low
-level languages like c, have manual memory management primitives such as malloc() and free().
...the first and last parts are explicit in low
-level languages but are mostly implicit in high
-level languages like javascript.
... low
-level languages require the developer to manually determine at which point in the program the allocated memory is no longer needed and to release it.
...And 2 more matches
Array.from() - JavaScript
the array.from() static method creates a new, shallow-copied array instance from an array
-like or iterable object.
... syntax array.from(arraylike [, mapfn [, thisarg]]) parameters arraylike an array
-like or iterable object to convert to an array.
... description array.from() lets you create arrays from: array
-like objects (objects with a length property and indexed elements); or iterable objects (objects such as map and set).
...And 2 more matches
Operator precedence - JavaScript
console.log(3 + 10 * 2); // logs 23 console.log(3 + (10 * 2)); // logs 23 because parentheses here are superfluous console.log((3 + 10) * 2); // logs 26 because the parentheses change the order left-associativity (left-to-right) means that it is processed as (a op1 b) op2 c, while right-associativity (right-to
-left) means it is interpreted as a op1 (b op2 c).
... 19 new (without argument list) right-to
-left new … 18 postfix increment n/a … ++ postfix decrement … -- 17 logical not right-to
-left !
... … bitwise not ~ … unary plus + … unary negation - … prefix increment ++ … prefix decrement -- … typeof typeof … void void … delete delete … await await … 16 exponentiation right-to
-left … ** … 15 multiplication left-to-right … * … division … / … remainder … % … 14 addition left-to-right … + … subtraction … - … 13 bitwise left shift left-to-right … << … bitwise right shift … >> … bitwise unsigned right shift … >>> … 12 less than left-to-right … < … less than or equal ...
...And 2 more matches
SVG documentation index - SVG: Scalable Vector Graphics
combined, we get this very natural
-looking behavior.
... 61 dominant-baseline reference, svg, svg attribute the dominant-baseline attribute specifies the dominant baseline, which is the baseline used to align the box’s text and inline
-level contents.
... 205 stroke
-linecap svg, svg attribute the stroke
-linecap attribute is a presentation attribute defining the shape to be used at the end of open subpaths when they are stroked.
...And 2 more matches
Using templates and slots - Web Components
note: an unnamed <slot> will be filled with all of the custom element's top
-level child nodes that do not have the slot attribute.
...ntaining some named slots: <template id="element-details-template"> <style> details {font-family: "open sans light",helvetica,arial} .name {font-weight: bold; color: #217ac0; font-size: 120%} h4 { margin: 10px 0 -8px 0; } h4 span { background: #217ac0; padding: 2px 6px 2px 6px } h4 span { border: 1px solid #cee9f9; border-radius: 4px } h4 span { color: white } .attributes { margin
-left: 22px; font-size: 90% } .attributes p { margin
-left: 16px; font-style: italic } </style> <details> <summary> <span> <code class="name"><<slot name="element-name">need name</slot>></code> <i class="desc"><slot name="description">need description</slot></i> </span> </summary> <div class="attributes"> <h4><span>attributes</span></h4> ...
... adding a final bit of style as a finishing touch, we'll add a tiny bit more css for the <dl>, <dt>, and <dd> elements in our doc: dl { margin
-left: 6px; } dt { font-weight: bold; color: #217ac0; font-size: 110% } dt { font-family: consolas, "liberation mono", courier } dd { margin
-left: 16px } body { margin-top: 47px } result finally let’s put all the snippets together and see what the rendered result looks like.
...And 2 more matches
SDK and XUL Comparison - Archive of obsolete content
advantages of the sdk simplicity the sdk provides high
-level javascript apis to simplify many common tasks in add-on development, and tool support which greatly simplifies the process of developing, testing, and packaging an add-on.
... compatibility although we can't promise we'll never break a high
-level api, maintaining compatibility across firefox versions is a top priority for us.
... low
-level apis and third-party modules that's not the whole story.
... if you need more flexibility than the sdk's high
-level apis provide, you can use its low
-level apis to load xpcom objects directly or to manipulate the dom directly as in a traditional bootstrapped extension.
Getting started (cfx) - Archive of obsolete content
this tutorial walks through creating a simple add-on using the cfx command
-line tool.
...open it and add the following code: var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.actionbutton({ id: "mozilla
-link", label: "visit mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onclick: handleclick }); function handleclick(state) { tabs.open("https://www.mozilla.org/"); } save the file.
...for example, we could change the page that gets loaded: var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.actionbutton({ id: "mozilla
-link", label: "visit mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onclick: handleclick }); function handleclick(state) { tabs.open("https://developer.mozilla.org/"); } at the command prompt, execute cfx run again.
...there's reference documentation for all the high
-level and low
-level apis in the sdk.
Index of archived content - Archive of obsolete content
firefox compatibility module structure of the sdk porting the library detector program id sdk api lifecycle sdk and xul comparison testing the add-on sdk two types of scripts working with events xul migration guide high
-level apis addon-page base64 clipboard context-menu hotkeys indexed-db l10n notifications page-mod page-worker panel passwords private-browsing querystring request ...
... selection self simple-prefs simple-storage system tabs timers ui url widget windows low
-level apis /loader chrome console/plain-text console/traceback content/content content/loader content/mod content/symbiont content/worker core/heritage core/namespace core/promise dev/panel event/core event/target frame/hidden-frame frame/utils fs/path ...
... 2006-10-06 2006-10-13 2006-10-20 2006-10-27 2006-11-03 2006-11-10 2006-11-17 2006-11-24 2006-12-01 2006-12-08 extentsions faq mozilla-dev-i18n 2006-09-22 mozilla-dev
-l10n 2006-10-06 2006-10-13 2006-10-20 2006-10-27 2006-11-10 2006-11-17 2006-11-24 2006-11-3 2006-12-01 2006-12-08 mozilla-dev-planning 2006-07-17 2006-09-22 2006-10-06 ...
... 2006-12-01 mozilla-dev-tech-js-engine 2006-09-22 2006-09-29 2006-10-06 2006-10-13 2006-11-03 2006-11-10 2006-11-17 2006-11-24 2006-12-01 js-engine faq mozilla-dev-tech
-layout 2006-09-29 2006-10-27 2006-11-03 2006-11-10 2006-11-17 2006-11-24 2006-12- 02 2006-12- 08 2006-12-24 mozilla-dev-tech-xpcom 2006-09-06 2006-09-22 2006-09-30 2006-10-13 ...
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
many of the new web technologies in the html 4.0 specification, xml 1.0, dom level 3 were explicitly created with application
-like behavior and more sophisticated navigational models in mind.
...inkk+"'>"+valuee+"</a></h3><p>"+paraa+"</p></div>"; document.getelementbyid("container").innerhtml+=strvalue; } } if(previousele) { previousele.style.backgroundcolor="white"; } ele.style.backgroundcolor="#ddeeff"; previousele=ele; } var previousele=null; </script> <style> .tab { position:relative;top:1px; border: 1px solid #dddddd; color:white; background-color:white; padding
-left: 5px; border-bottom:white;padding-right: 5px; padding-top:3px; text-decoration:none;} .tab:hover { background-color:#ddeeff; } </style> </head> <body > <h2>latest headlines - inner-browsing example </h2> <p>click the tabbed menu to dynamically load the headlines into this web page.</p> <br /> <!-- ***** this code dynamically creates the tabbed menu if the browser has support to xmlhttpreq...
.../// /// object detection // var xcomp=null; var testxmlhttprequest=false; try { xcomp = new xmlhttprequest(); if(xcomp) testxmlhttprequest=true; } catch (e) { try { xcomp = new activexobject("microsoft.xmlhttp"); if(xcomp) testxmlhttprequest=true; } catch (e) { } } if(testxmlhttprequest&&document.getelementsbytagname) { document.write("<span style=\"margin
-left:1em;\"> <a href=\"javascript:\" class=\"tab \" onclick=\"calldevedge('/viewsource/catalog-new_en.xml',this);return false;\">devedge news</a> <a href=\"javascript:\" class=\"tab\" onclick=\"calldevedge('/central/css/catalog-new_en.xml',this);return false;\" title=\"css articles\">css</a> <a href=\"javascript:\" class=\"tab\" onclick=\"calldevedge('/central/xml/catalog-new_en.xml',this);return f...
...alse;\" title=\"xml articles\">xml</a> <a href=\"javascript:\" class=\"tab\" onclick=\"calldevedge('/central/dom/catalog-new_en.xml ',this);return false;\" title=\"dom articles\">dom</a></span>"); } </script> <!-- ***** this represents the container ***** --> <div style="margin
-left:0px;border:1px solid #dddddd;" > <div style="padding:10px;" id="container"> </div> </div> </body> </html> original document information author(s): marcio galli, netscape communications; roger soares, intelinet.com.br; ian oeschger, netscape communications last updated date: published 16 may 2003 copyright information: copyright © 2001-2003 netscape.
In-Depth - Archive of obsolete content
dialog, dualbutton, dualbutton-dropdown, listbox, menu, menulist-textfield, menulist-button, menulist, menulist-text, progressbar, progresschunk, radio-container, radio, resizer, resizerpanel, separator, scrollbar, statusbar, statusbarpanel, toolbarbutton, toolbox, toolbar, treeheadercell, treeheadersortarrow, treeview, treeitem, treetwisty, treetwistyopen, tooltip, textfield, tabpanels, tab, tab
-left-edge, tab-right-edge, scrollbartrack-horizontal, scrollbartrack-vertical, scrollbarthumb-vertical, scrollbarthumb-horizontal, scrollbarbutton-right, scrollbarbutton-down, scrollbarbutton
-left, scrollbarbutton-up, scrollbargripper-vertical, scrollbargripper-horizontal -moz-border-bottom-colors defines a series of colours.
...example: -moz-border-top-colors: threeddarkshadow threedshadow transparent; -moz-border-right-colors: threeddarkshadow threedshadow transparent; -moz-border-bottom-colors: threeddarkshadow threedshadow transparent; -moz-border
-left-colors: threeddarkshadow threedshadow transparent; -moz-border-top-colors see -moz-border-bottom-colors above.
... -moz-border
-left-colors see -moz-border-bottom-colors above.
...select that one and it lists a bunch of -x-image-region
-left type styles in chrome://navigator/skin/.
Creating a Help Content Pack - Archive of obsolete content
the index file one important note on the index file is that there is no automatically generated set of top
-level letters (e.g., a for accessibility and automation or b for book and border).
...a single
-level index may be accomplished in exactly the same way as a glossary file, but multiple levels can make it easier to navigate to specific information.
.../rdf:li> next, add the following to your file just after the existing rdf:description element: <rdf:description rdf:about="#foo"> <nc:subheadings> <rdf:seq> <rdf:li><rdf:description rdf:id="bar" nc:link="bar.html" nc:title="bar"/></rdf:li> </rdf:seq> </nc:subheadings> </rdf:description> except for the different value for rdf:about, this looks exactly like a top
-level entry definition.
...top
-level entries describe the root node, urn:root; nested entries describe other entries.
execute - Archive of obsolete content
passing arguments to the executable the args parameter, when present, passes a string to the executable as command
-line parameters.
... the following line, for example, passes the "-c" command
-line parameter to the executable: err = file.execute(myfile, "-c", true); when you want to pass more than one parameter to the executable itself, however, you must format the args string in a particular way so that the parameters can be broken up and passed separately as required.
... in general, you should use single quotes for the args string and double quotes to delimit the command
-line arguments within args.
... this means that in order to pass three command
-line arguments (-c, -d, and -s) to the executable, you should format the args string as follows: err = file.execute(myfile, '"-c""-d""-s"', true); //technically, given the rules above, you could also pass the same //arguments with the following line, but the result is much less //readable: err = file.execute(myfile, "\"-c\"\"-d\"\"-s\"", true); also see the note about binaries on the macintosh pl...
Making sure your theme works with RTL locales - Archive of obsolete content
the important thing to understand about these locales, is that the entire interface is mirrored right-to
-left.
... gecko 1.9.2 and later gecko 1.9.2 introduced the :-moz
-locale-dir css pseudoclass, which matches based on whether the user interface is being rendered left-to-right or right-to
-left: :-moz
-locale-dir(ltr) matches if the user interface is being rendered left to right.
... :-moz
-locale-dir(rtl) matches if the user interface is being rendered right to left.
... 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.
-ms-scroll-snap-points-x - Archive of obsolete content
initial valuesnapinterval(0px, 100%)applies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values note: a <length-percentage> is a value that can be either a <length> or a <percentaqe>.
... if any value is less than -ms-scroll
-limit-x-min , then -ms-scroll
-limit-x-min is used.
... if any value is greater than -ms-scroll
-limit-x-max, then -ms-scroll
-limit-x-max is used.
...dentically to the -ms-scroll-snap-points-y property, but along the x-axis.) .container { overflow-x: auto; overflow-y: hidden; -ms-scroll-snap-type: mandatory; -ms-scroll-snap-points-x: snapinterval(0%, 100%); width: 480px; height: 270px; } .imagecontainer { -ms-scroll-chaining: chained; -ms-overflow-style: none; -ms-content-zooming: zoom; -ms-scroll-rails: none; -ms-scroll
-limit-x-min: 100%; -ms-scroll
-limit-x-max: 500%; -ms-scroll-snap-type: proximity; -ms-scroll-snap-points-x: snaplist(100%, 200%, 300%, 400%, 500%); -ms-overflow-style: none; width: 480px; height: 270px; overflow: auto; } specifications not part of any specification.
-ms-scroll-snap-points-y - Archive of obsolete content
initial valuesnapinterval(0px, 100%)applies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values note: a <length-percentage> is a value that can be either a <length> or a <percentaqe>.
... if any value is less than -ms-scroll
-limit-y-min , then -ms-scroll
-limit-y-min is used.
... if any value is greater than -ms-scroll
-limit-y-max, then -ms-scroll
-limit-y-max is used.
...dentically to the -ms-scroll-snap-points-x property, but along the y-axis.) .container { overflow-x: auto; overflow-y: hidden; -ms-scroll-snap-type: mandatory; -ms-scroll-snap-points-y: snapinterval(0%, 100%); width: 480px; height: 270px; } .imagecontainer { -ms-scroll-chaining: chained; -ms-overflow-style: none; -ms-content-zooming: zoom; -ms-scroll-rails: none; -ms-scroll
-limit-y-min: 100%; -ms-scroll
-limit-y-max: 500%; -ms-scroll-snap-type: proximity; -ms-scroll-snap-points-y: snaplist(100%, 200%, 300%, 400%, 500%); -ms-overflow-style: none; width: 480px; height: 270px; overflow: auto; } specifications not part of any specification.
::-ms-clear - Archive of obsolete content
this includes inputs that appear text
-like or fall back to type="text".
... such inputs include: <input type="color"> <input type="date"> <input type="datetime"> <input type="datetime
-local"> <input type="email"> <input type="month"> <input type="number"> <input type="search"> <input type="tel"> <input type="time"> <input type="url"> <input type="week"> allowable properties only the following css properties can be used in a rule with ::-ms-clear in its selector.
... -ms-high-contrast-adjust background-clip background-color background-image background-origin background-position-x background-position-y background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin
-left margin-right margin-top opacity outline-color outline-style outline-width ...
...padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-clear example html <form> <label for="firstname">first name:</label> <input type="text" id="firstname" name="firstname" placeholder="first name"> <br> <label for="lastname">last name:</label> <input type="text" id="lastname" name="lastname" placeholder="second name"> </form> css input, label { display: block; } input[type=text]::-ms-clear { color: red; /* this sets the cross color as red.
display-outside - Archive of obsolete content
/* keyword values */ display-outside: block
-level; display-outside: inline
-level; display-outside: run-in; display-outside: contents; display-outside: none; display-outside: table-row-group; display-outside: table-header-group; display-outside: table-footer-group; display-outside: table-row; display-outside: table-cell; display-outside: table-column-group; display-outside: table-column; display-outside: table-caption; display-outside: ruby-base; display-outside: ruby-text; display-outside: ruby-base-container; display-outside: ruby-text-container; /* global values */ display-outside: inherit; display-outsid...
... values block
-level the element generates a block
-level box, and participates in a block formatting context.
... other formatting contexts, such as flex formatting contexts, may also work with block
-level elements.
... inline
-level the element generates an inline
-level box, and participates in an inline formatting context.
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
it's also a weird feeling when someone asks you to work on something that has near
-legendary status in your mind.
...thus: div.card {float: left; width: 45%; margin: 1em 2% 0 2%;} div.card img {float: left; margin: 4px 0 0 0; border: 1px solid #339;} div.card h3 {border: 1px solid #339; border
-left: 5px double #339; background: #eec url(body-bg-tan.jpg) bottom left no-repeat fixed; color: #339;} finishing the style adding the background to the heading containing the name of the fish created three problems: the double border was completely covered up by the image.
... div.card {float: left; width: 45%; margin: 1em 2% 0 2%;} div.card img {float: left; position: relative; z-index: 10; margin: 4px 0 0 0; border: 1px solid #339;} div.card h3 {margin: 0 0 0 4px; padding: 0.2em 0 1px 150px; border: 1px solid #339; border
-left: 5px double #339; background: #eec url(body-bg-tan.jpg) bottom left no-repeat fixed; color: #339;} note how the image is pushed downward four pixels, while the h3 is pushed rightward four pixels.
... div.card {float: left; width: 45%; margin: 1em 2% 0 2%;} div.card img {float: left; position: relative; z-index: 10; margin: 4px 0 0 0; border: 1px solid #339;} div.card h3 {margin: 0 0 0 4px; padding: 0.2em 0 1px 150px; border: 1px solid #339; border
-left: 5px double #339; background: #eec url(body-bg-tan.jpg) bottom left no-repeat fixed; color: #339;} div.card p {margin: 0.5em 0.5em 0.5em 160px;} and voila!
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
the solution fortunately, there are mozilla-specific css
-like rules that can be used to correct both problems.
... the following rule is derived from mozilla's html.css file: *|*:-moz
-list-bullet, *|*:-moz
-list-number {font-size: 1em;} this rule tells gecko-based browsers to use the computed value of font-size for the marker's parent, which is the list item itself.
...this might also be a place to put any explorer-specific css
-like rules (such as scrollbar styling rules), which also will not validate.
... authors who are not concerned with making sure the rule applies across all namespaces can use a slightly more simplified rule: *:-moz
-list-bullet, *:-moz
-list-number {font-size: 1em;} recommendations if it is important to make list item markers match the font size of the content, use one of the suggested rules.
RDF in Mozilla FAQ - Archive of obsolete content
rdf in fifty words or less is a quick, high
-level description of what rdf does in mozilla.
...these methods return an nsirdfcontainer which allows you to do container
-like operations without getting your hands too dirty.
...-- danbri) another possible problem: for remotely
-loaded xul and rdf, you might need to adjust mozilla's security restrictions (see belowfor example code).
...it also accepts an optional poll interval, where it will re
-load the url.
Practical positioning examples - Learn web development
you might be thinking "why not just create the separate tabs as separate webpages, and just have the tabs clicking through to the separate pages to create the effect?" this code would be simpler, yes, but then each separate "page" view would actually be a newly
-loaded webpage, which would make it harder to save information across views, and integrate this feature into a larger ui design.
...first, add the following rule at the bottom of your css to remove the default padding
-left and margin-top from the unordered list: .info-box ul { padding
-left: 0; margin-top: 0; } note: we are using descendant selectors with .info-box at the start of the chain throughout this example — this is so that we can insert this feature into a page with other content already on it, without fear of interfering with the styles applied to other parts of the page.
...add the following rule underneath the rest of your css: .fake-content { background-color: #a60000; color: white; padding: 10px; height: 2000px; margin
-left: 470px; } to start with, we give the content the same background-color, color, and padding as the info-box panels.
... we then give it a large margin
-left to move it over to the right, making space for the info-box to sit in, so it is not overlapping anything else.
What is a Domain Name? - Learn web development
tld (top
-level domain).
... alternatively, if you use a system with a built-in shell, type a whois command into it, as shown here for mozilla.org: $ whois mozilla.org domain name:mozilla.org domain id: d1409563
-lror creation date: 1998-01-24t05:00:00z updated date: 2013-12-08t01:16:57z registry expiry date: 2015-01-23t05:00:00z sponsoring registrar:markmonitor inc.
... (r37
-lror) sponsoring registrar iana id: 292 whois server: referral url: domain status: clientdeleteprohibited domain status: clienttransferprohibited domain status: clientupdateprohibited registrant id:mmr-33684 registrant name:dns admin registrant organization:mozilla foundation registrant street: 650 castro st ste 300 registrant city:mountain view registrant state/province:ca registrant postal code:94041 registrant country:us registrant phone:+1.6509030800 as you can see, i can't register mozilla.org because the mozilla foundation has already registered it.
... dns refreshing dns databases are stored on every dns server worldwide, and all these servers refer to a few special servers called “authoritative name servers” or “top
-level dns servers.” — these are like the boss servers that manage the system.
UI pseudo-classes - Learn web development
note: numeric input types are date, month, week, time, datetime
-local, number, and range.
... <label for="pcode1">zip/postal code: </label> <input id="pcode1" name="pcode1" type="text" required> </div> </fieldset> <fieldset id="billing"> <legend>billing address</legend> <div> <label for="billing-checkbox">same as shipping address:</label> <input type="checkbox" id="billing-checkbox" checked> </div> <div> <label for="name" class="billing
-label disabled
-label">name: </label> <input id="name" name="name" type="text" disabled required> </div> <div> <label for="address2" class="billing
-label disabled
-label">address: </label> <input id="address2" name="address2" type="text" disabled required> </div> <div> <label for="pcode2" class="billing
-label disabled
-label">zip/postal code: </label> <inp...
...the most relevant parts of this example are as follows: input[type="text"]:disabled { background: #eee; border: 1px solid #ccc; } .disabled
-label { color: #aaa; } we've directly selected the inputs we want to disable using input[type="text"]:disabled, but we also wanted to gray out the corresponding text labels.
... function () { // attach `change` event listener to checkbox document.getelementbyid('billing-checkbox').addeventlistener('change', togglebilling); }, false); function togglebilling() { // select the billing text fields let billingitems = document.queryselectorall('#billing input[type="text"]'); // select the billing text labels let billinglabels = document.queryselectorall('.billing
-label'); // toggle the billing text fields and labels for (let i = 0; i < billingitems.length; i++) { billingitems[i].disabled = !billingitems[i].disabled; if(billinglabels[i].getattribute('class') === 'billing
-label disabled
-label') { billinglabels[i].setattribute('class', 'billing
-label'); } else { billinglabels[i].setattribute('class', 'billing
-label disabled
-label'...
Making decisions in your code — conditionals - Learn web development
option> <option value="june">june</option> <option value="july">july</option> <option value="august">august</option> <option value="september">september</option> <option value="october">october</option> <option value="november">november</option> <option value="december">december</option> </select> <h1></h1> <ul></ul> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="playable-code" style="height: 400px;width: 95%"> const select = document.queryselector('select'); const list = document.queryselector('ul'); const h1 = document.queryselector('h1'); select.onchange = function() { const choice = select.value; // add conditional here createca...
...i = 1; i <= days; i++) { const listitem = document.createelement('li'); listitem.textcontent = i; list.appendchild(listitem); } } createcalendar(31,'january'); </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> .output * { box-sizing: border-box; } .output ul { padding
-left: 0; } .output li { display: block; float: left; width: 25%; border: 2px solid white; padding: 5px; height: 40px; background-color: #4a2db6; color: white; } html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y
-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = docume...
... style="height: 300px;"> <label for="theme">select theme: </label> <select id="theme"> <option value="white">white</option> <option value="black">black</option> <option value="purple">purple</option> <option value="yellow">yellow</option> <option value="psychedelic">psychedelic</option> </select> <h1>this is my website</h1> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="playable-code" style="height: 450px;width: 95%"> const select = document.queryselector('select'); const html = document.queryselector('.output'); select.onchange = function() { const choice = select.value; // add switch statement } function update(bgcolor, textcolor) { html...
....style.backgroundcolor = bgcolor; html.style.color = textcolor; }</textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y
-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = document.getelementbyid('code'); const reset = document.getelementbyid('reset'); const solution = document.getelementbyid('solution'); let code = textarea.value; let userentry = textarea.value; function updatecode() { eval(textarea.value); } reset.addeventlistener('click', function() { textarea.value = code; userentry = textarea.value; solutione...
Manipulating documents - Learn web development
if you wanted to match and do things to multiple elements, you could use document.queryselectorall(), which matches every element in the document that matches the selector, and stores references to them in an array
-like object called a nodelist.
... document.getelementsbytagname(), which returns an array
-like object containing all the elements on the page of a given type, for example <p>s, <a>s, etc.
... to start with, you can get a list of all the stylesheets attached to a document using document.stylesheets, which returns an array
-like object with cssstylesheet objects.
... to start with, download a copy of our shopping
-list.html starting file and make a copy of it somewhere.
Video and Audio APIs - Learn web development
you'll see a number of features; the html is dominated by the video player and its controls: <div class="player"> <video controls> <source src="video/sintel-short.mp4" type="video/mp4"> <source src="video/sintel-short.webm" type="video/webm"> <!-- fallback content here --> </video> <div class="controls"> <button class="play" data-icon="p" aria
-label="play pause toggle"></button> <button class="stop" data-icon="s" aria
-label="stop"></button> <div class="timer"> <div></div> <span aria
-label="timer">00:00</span> </div> <button class="rwd" data-icon="b" aria
-label="rewind"></button> <button class="fwd" data-icon="f" aria
-label="fast forward"></button> </div> </div> the whole player is wrapped in a <div> ...
... each <button> has a class name, a data-icon attribute for defining what icon should be shown on each button (we'll show how this works in the below section), and an aria
-label attribute to provide an understandable description of each button, since we're not providing a human-readable label inside the tags.
... the contents of aria
-label attributes are read out by screenreaders when their users focus on the elements that contain them.
...first of all, notice the .controls styling: .controls { visibility: hidden; opacity: 0.5; width: 400px; border-radius: 10px; position: absolute; bottom: 20px; left: 50%; margin
-left: -200px; background-color: black; box-shadow: 3px 3px 5px black; transition: 1s all; display: flex; } .player:hover .controls, player:focus .controls { opacity: 1; } we start off with the visibility of the custom controls set to hidden.
Server-side web frameworks - Learn web development
this means that you will have an easier job, interacting with easier, higher
-level code rather than lower level networking primitives.
... web frameworks provide programming
-language-appropriate mechanisms to access this information.
...the model specifies the field types to be stored, which may provide field
-level validation on what information can be stored (e.g.
... django (python) django is a high
-level python web framework that encourages rapid development and clean, pragmatic design.
Getting started with Ember - Learn web development
the service side provides long
-lived shared state, behavior, and an interface to integrating with other libraries or systems.
... use cases generally, emberjs works well for building apps that desire either or both of the following traits: single page applications, including native
-like web apps, and progressive web apps (pwas) ember works best when it is the entire front end of your application.
... installing the ember tooling ember uses a command
-line interface (cli) tool for building and scaffolding parts of your application.
... finally, find app.css, located at app/styles/app.css, and paste in the following: :focus, .view label:focus, .todo
-list li .toggle:focus + label, .toggle-all:focus + label { /* !important needed because todomvc styles deliberately disable the outline */ outline: #d86f95 solid !important; } this css overrides some of the styles provided by the todomvc-app-css npm package, therefore allowing keyboard focus to be visible.
Handling common accessibility problems - Learn web development
to deal with regularly updating regions of content, you can use the aria
-live attribute, which identifies an updating region.
... 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.
... look at good
-links.html, and note how they make sense when viewed out of context.
... this is not the case with bad
-links.html — they are all just "click here".
Implementing feature detection - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high
-level principles of cross-browser testing.
...for browsers that don't, we could use a floated layout that works ok, although it is slightly more brittle and hacky, and not as cool
-looking.
... start by making local copies of our css-feature-detect.html, flex
-layout.css, float
-layout.css, and basic-styling.css files.
... give it the following contents: const conditional = document.queryselector('.conditional'); const testelem = document.createelement('div'); if (testelem.style.flex !== undefined && testelem.style.flexflow !== undefined) { conditional.setattribute('href', 'flex
-layout.css'); } else { conditional.setattribute('href', 'float
-layout.css'); } here we are grabbing a reference to the second <link> element, and creating a <div> element as part of our test.
Accessibility/LiveRegionDevGuide
these "non
-live" events may be events originating from the chrome, user interaction in the chrome or document, document loading events, or real live region events from hidden tabs.
... with the goal of eliminating the "non
-live" events, some sort of event filtering logic must be employed.
... an event containing an object that has the attribute "container
-live" is a live region.
...the following are guidelines on how to implement each container
-live this property determines the interruption policy or politeness level for the event and can have values of "off", "polite", "assertive" and "rude".
Android-specific test suites
android
-lint ensures that the code avoids common android coding errors.
... android
-lint ensure that the code avoids common android coding errors.
... running android
-lint to run android
-lint, first build firefox for android with your changes; then run ./mach android lint this will lint the code and report the results to stdout, as well as produce an html report.
... contact information android
-lint is currently owned by :sebastian and :nalexander.
Debugging on Windows
debug and optimized) simultaneously by setting the environment variable moz_no_remote: set moz_no_remote=1 or, starting with firefox 2 and other gecko 1.8.1-based applications, you can use the -no-remote command
-line switch instead (implemented in bug 325509).
... you can also specify the profile to use with the -p profile_name command
-line argument.
... debugging tinderbox builds see running windows debug builds problems loading debug symbols if both your application and visual c++ hang shortly after launching the application under the debugger, you may be hitting a known deadlock in the way visual studio downloads debug symbols for the system libraries; see https://connect.microsoft.com/visualstudio/feedback/details/422970/hang
-loading-rasapi32-pdb-when-using-symbol-server.
... pre
-load all the windows debug symbols.
Configuring Build Options
build options, including options not usable from the command
-line, may appear in "confvars.sh" files in the source tree.
...(it is possible to manually call configure with command
-line options, but this is not recommended).
... ac_add_options --enable-ui
-locale=isocode tbd.
... ac_add_options --with
-l10n-base=/path/to/base/dir tbd.
The Firefox codebase: CSS Guidelines
example: use margin-inline-start: 3px; instead of margin
-left: 3px.
... the rtl-aware equivalents of border-{top/bottom}-{left/right}-radius are border-{start/end}-{start/end}-radius when there is no special rtl-aware property available, use the pseudo :-moz
-locale-dir(ltr|rtl) (for xul files) or :dir(ltr|rtl) (for html files).
... these selectors can be used to target dark areas: :-moz
-lwtheme-brighttext: dark window frame.
... variables for clarity, css variables that are only used when a theme is enabled have the -
-lwt- prefix.
Embedding the editor
as is the case for composer embedded in a native application, there is a requirement here that the composer ui be configurable, such that it can be displayed either as a toolbar at the top of the <htmlarea>, a floating palette, or a top
-level toolbar.
...(this would be analogous to the nsiwebnavigation interface used for a browser.) when we have one editor per docshell, loading a frameset document, or a page with an <iframe> in composer, will instantiate more than one low
-level editor.
... we need a concept of an "editing session" - a single top
-level document which is editable, and which may embody more than one editor.
...high
-level ui and emebedding code should deal with this editing session interface, without knowledge of the underlying editors.
Localization technical reviews
make sure the top
-level directory doesn't contain garbage.
... compare
-locale we run the compare
-locales tool on the new locale to get the statistics on translation of strings and report basic errors.
... more intl.properties checkpoints, cont we also check the plural rule for the locale, that the general.useragent.locale is set to the locale code, that accept
-lang shows the locale code(s) (like ab, ab-cd,...) and is followed by en and en-us, and finally that intl.menuitems.insertseparatorbeforeaccesskeys = true, where "true" should be left untranslated.
... inspect firefox
-l10n.js we ensure that there are no odd preferences, or #filter substitutions for general.useragent.locale.
Localization formats
can be hard to tell what has changed .lang files historically, mozilla has used a gettext
-like file to present content for localization.
..." "allez-y et montrez
-le en téléchargeant et en imprimant votre " "certificat personnalisé firefox 3 download day." advantages of gettext gettext has very powerful tools to update this site (if you use the actual english strings in msgids, not unique identifier strings like certificate_intro) very established with a large set of powerful tools harder to screw things up because existing tools will not allow lo...
... in the case of download day, someone created entity
-like identifiers in the msgid, which we have shown above with the "certificate_intro" key.
... then, an en-us repository was created holding the translations to all the entity
-like values of msgid.
JS::PerfMeasurement
the current implementation can measure eleven different types of low
-level hardware and software events: events that can be measured bitmask passed to constructor counter variable what it measures perfmeasurement::cpu_cycles .cpu_cycles raw cpu clock cycles ::instructions .instructions total instructions executed ::cache_references .cache_references total number of memory accesses ::cache_misses .cache...
...here is the complete c++
-level api: perfmeasurement::eventmask this is an enumeration defining all of the bit mask values in the above table.
...perfmeasurement::~perfmeasurement() take care not to leak profiling objects, as they may be holding down expensive os
-level state.
... to extract the c++
-level perfmeasurement object, call this function.
powermetrics
powermetrics is a mac-only command
-line utility that provides many high-quality power-related measurements.
...the first column counts interrupt
-level wakeups that resulted in a thread being dispatched in the process.
... by default, the coalitions/processes are sorted by a composite value computed from several factors, though this can be changed via command
-line options.
... also note that powermetrics -h is a better guide to the the command
-line options than man powermetrics.
L20n HTML Bindings
<link rel="localization" href="../locales/manifest.json"> an example of the manifest file (all keys are required): { "locales": [ "en-us", "pl"], "default_locale": "en-us", "resources": [ "../locales/{{locale}}/strings.l20n", "/shared/{{locale}}/date.l20n"¨ ] } make html elements localizable use the data
-l10n-id attribute on an html element to mark it as localizable.
... <p data
-l10n-id="about"></p> notice that you don't have to put the text content in the html anymore (you still can if you want to).
...consider the following source html: <p data
-l10n-id="save"> <input type="submit"> <a href="/main" class="btn-cancel"></a> </p> assume the following malicious translation: <save """ <input value="save" type="text"> or <a href="http://myevilwebsite.com" onclick="alert('pwnd!')" title="back to the homepage">cancel</a>.
... """> the result will be: <p data
-l10n-id="back"> <input value="save" type="submit"> or <a href="/main" class="btn-cancel" title="back to the homepage">cancel</a>.
Creating a Cookie Log
change to your firefox directory (usually c:\program files\mozilla firefox) type "set nspr_log_file=c:\temp\cookie
-log.txt", enter type "set nspr_log_modules=cookie:4" and press enter run firefox by typing "firefox.exe" and pressing enter.
... type "export nspr_log_file=~/cookie
-log.txt" and press enter.
... type "export nspr_log_file=~/desktop/cookie
-log.txt" and press return.
...finally, attach the cookie
-log.txt file to the bug where it was requested (by clicking on create new attachment).
Rhino Debugger
current limitations: no breakpoint menu using the rhino javascript debugger the mozilla rhino javascript engine includes a source
-level debugger for debugging javascript scripts.
... step over to single step to the next line in the current function, you may do any of the following: select the debug->step over menu item on the menu bar press the step over button on the toolbar press the f7 key on the keyboard execution will resume but control will return to the debugger at the next line in the current function or top
-level script.
... moving up and down the stack the lower
-left (dockable) pane in the debugger main window contains a combo-box labeled "context:" which displays the current stack of the executing script.
... viewing variables the lower
-left (dockable) pane in the debugger main window contains a tab-pane with two tabs, labeled "this" and "locals".
Hacking Tips
(gdb) r starting program: /home/code/mozilla-central/js/src/32-release/js -f /home/code/jaeger.js [thread debugging using libthread_db enabled] using host libthread_db library "/lib/x86_64
-linux-gnu/libthread_db.so.1".
... gdb has the ability to set breakpoints with commands, but a simpler / friendlier version is to use dprintf, with a location, and followed by printf
-like arguments.
...for instance, on a 64-bit linux host you can use the following configure command to get an arm simulator build: ar=ar cc="gcc -m32" cxx="g++ -m32" ../configure --target=i686-pc
-linux --enable-debug --disable-optimize --enable-threadsafe --enable-simulator=arm or on os x: $ ar=ar cc="clang -m32" cxx="clang++ -m32" ../configure --target=i686-apple-darwin10.0.0 --enable-debug --disable-optimize --enable-threadsafe --enable-arm-simulator an --enable-debug --enable-optimize build is recommended if you want to run jit-tests or jstests.
...the top
-level control group is just to group the mask and the negate-mask.
Bytecode Descriptions
every stack frame has a returnvalue slot, used by top
-level scripts, generators, async functions, and derived class constructors.
...note: there is no even
-less-optimized initname instruction because js doesn't need it.
...implements: annex b.3.3.1, changes to functiondeclarationinstantiation for block
-level functions, step 1.a.ii.3.a, and similar steps in other annex b.3.3 algorithms, when setting the function's second binding can't be optimized.
... lineno operands: (uint32_t lineno) no-op instruction emitted immediately after jsop::*eval so that direct eval does not have to do slow pc-to
-line mapping.
JSAPI reference
obsolete since jsapi 32 jsval_is_void obsolete since jsapi 32 jsval_is_boolean obsolete since jsapi 32 jsval_is_number obsolete since jsapi 32 jsval_is_int obsolete since jsapi 32 jsval_is_double obsolete since jsapi 32 jsval_is_string obsolete since jsapi 32 jsval_is_object obsolete since jsapi 15 jsval_is_primitive obsolete since jsapi 32 jsval_is_gcthing obsolete since jsapi 32 high
-level type-conversion routines for packing and unpacking function arguments.
... js_haspropertybyid added in spidermonkey 1.8.1 js_hasownproperty added in jsapi 45 js_hasownpropertybyid added in jsapi 45 js_deleteproperty js_deletepropertybyid added in spidermonkey 1.8.1 js_deleteproperty2 obsolete since jsapi 39 js_deleteucproperty2 obsolete since jsapi 39 js_deletepropertybyid2 added in spidermonkey 1.8.1 obsolete since jsapi 39 the following functions are lower
-level, allowing the jsapi application more access to details of how properties are implemented.
... "define" is a lower
-level version of "set" that provides access to extra settings and does not call setters.
... similarly, "lookup" is a lower
-level version of "get" that offers extra options and does not call getters.
IAccessibleAction
other
-licenses/ia2/accessibleaction.idlnot scriptable this interface gives access to actions that can be executed for accessible objects.
...name() returns the non
-localized name of the specified action.
... [propget] hresult name( [in] long actionindex, [out] bstr name ); parameters actionindex 0 based index specifying which action's non
-localized name should be returned.
... name the non
-localized name of the specified action.
nsIWinTaskbar
createtaskbartabpreview() creates a taskbar tab preview, given an nsidocshell reference to a top
-level window.
... nsitaskbartabpreview createtaskbartabpreview( in nsidocshell shell, in nsitaskbarpreviewcontroller controller ); parameters shell an nsidocshell object representing the top
-level window from which to create the preview.
...r = components.classes["@mozilla.org/windows-taskbar;1"].getservice(components.interfaces.nsiwintaskbar); // get the docshell for the browser var navigator2 = top.queryinterface(components.interfaces.nsiinterfacerequestor).getinterface(components.interfaces.nsiwebnavigation); var docshell = navigator2.queryinterface(components.interfaces.nsidocshell); // get the parent docshell; this is the top
-level docshell var docshelltreeitem = docshell.queryinterface(components.interfaces.nsidocshelltreeitem); var parent = docshelltreeitem.parent; var ds = parent.queryinterface(components.interfaces.nsidocshell); // create the preview taskbar.createtaskbartabpreview(ds, {}); gettaskbarprogress() gets the taskbar progress for a window.
...nsitaskbarwindowpreview gettaskbarwindowpreview( in nsidocshell shell ); parameters shell an nsidocshell object to use to find the top
-level window.
DOM Inspector internals - Firefox Developer Tools
besides the dom inspector's primary ui, there are a couple other top
-level inspectors which differ slightly (the object inspector and dom inspector sidebar used in seamonkey).
... dom inspector from a high
-level perspective the dom inspector primary ui consists of some toolbars and a panelset.
... source code organization the contents of the top
-level directory for the dom inspector repository should look like base/ js/ inspector-cmdline.js makefile.in build/ install.js makefile.in resources/ content/ … locale/ … skin/ … makefile.in install.rdf jar.mn makefile.in makefiles.sh almost all the interest...
...erlay.xul chrome://global/content/globaloverlay.xul (note that the overlays from the viewer subdirectories—viewers/dom and viewers/stylerules—are loaded as a result of overlay directives in dom inspector's chrome manifest, rather than being explicitly imported using a xul-overlay processing instruction in the overlaid file.) inspectoroverlay.xul this imports the scripts the top
-level inspector needs, including dependencies.
Using Fetch - Web APIs
.stringify(data) // body data type must match "content-type" header }); return response.json(); // parses json response into native javascript objects } postdata('https://example.com/answer', { answer: 42 }) .then(data => { console.log(data); // json data parsed by `data.json()` call }); note that mode: "no-cors" only allows a limited set of headers in the request: accept accept
-language content
-language content-type with a value of application/x-www-form-urlencoded, multipart/form-data, or text/plain sending a request with credentials included to cause browsers to send a request with credentials included, even for a cross-origin call, add credentials: 'include' to the init object you pass to the fetch() method.
...a headers object is a simple multi-map of names to values: const content = 'hello world'; const myheaders = new headers(); myheaders.append('content-type', 'text/plain'); myheaders.append('content
-length', content.length.tostring()); myheaders.append('x-custom-header', 'processthisimmediately'); the same can be achieved by passing an array of arrays or an object literal to the constructor: const myheaders = new headers({ 'content-type': 'text/plain', 'content
-length': content.length.tostring(), 'x-custom-header': 'processthisimmediately' }); the contents can be queried and retriev...
...ed: console.log(myheaders.has('content-type')); // true console.log(myheaders.has('set-cookie')); // false myheaders.set('content-type', 'text/html'); myheaders.append('x-custom-header', 'anothervalue'); console.log(myheaders.get('content
-length')); // 11 console.log(myheaders.get('x-custom-header')); // ['processthisimmediately', 'anothervalue'] myheaders.delete('x-custom-header'); console.log(myheaders.get('x-custom-header')); // [ ] some of these operations are only useful in serviceworkers, but they provide a much nicer api for manipulating headers.
... note: you may not append or set a request guarded headers’ content
-length header.
Intersection Observer API - Web APIs
the intersection observer api provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top
-level document's viewport.
...intersection information is needed for many reasons, such as: lazy
-loading of images or other content as a page is scrolled.
...this rectangle is determined like this: if the intersection root is the implicit root (that is, the top
-level document), the root intersection rectangle is the viewport's rectangle.
...each observer can asynchronously observe changes in the intersection between one or more target elements and a shared ancestor element or with their top
-level document's viewport.
Microdata DOM API - Web APIs
the document.getitems(typenames) method provides access to the top
-level microdata items.
...when called, the method must return a live nodelist object containing all the elements in the document, in tree order, that are each top
-level microdata items whose types include all the types specified in the method's argument, having obtained the types by splitting the string on spaces.
... if there are no tokens specified in the argument, then the method must return a nodelist containing all the top
-level microdata items in the document.
... code example this sample shows how the getitems() method can be used to obtain a list of all the top
-level microdata items of a particular type given in the document: var cats = document.getitems("http://example.com/feline"); once an element representing an item has been obtained, its properties can be extracted using the properties idl attribute.
RTCRtpTransceiver - Web APIs
a transceiver is uniquely identified using its mid property, which is the same as the media id (mid) of its corresponding m
-line.
... an rtcrtptransceiver is associated with an m
-line if its mid is non-null; otherwise it's considered disassociated.
... mid read only the media id of the m
-line associated with this transceiver.
...this field is null if neither a local or remote description has been applied, or if its associated m
-line is rejected by either a remote offer or any answer.
Storage Access API - Web APIs
these restrictions range from giving embedded resources under each top
-level origin a unique storage space to outright blocking of storage access when resources are loaded in a third-party context.
...design properties unique to firefox are summarized here: if the embedded origin tracker.example has already obtained first-party storage access on the top
-level origin foo.example, and the user visits a page from foo.example embedding a page from tracker.example again in less than 30 days, the embedded origin will have storage access immediately when loading.
... if a page from top
-level origin foo.example embeds more than one <iframe> from tracker.example, and one of those <iframe>s uses the storage access api in order to obtain storage access successfully, all other iframes from tracker.example on foo.example top
-level origins will immediately gain storage access as well, without needing to call requeststorageaccess() separately.
... if an embedded page from tracker.example has previously successfully obtained storage access on top
-level origin foo.example, all embedded subresources from tracker.example on foo.example (e.g.
Using the aria-describedby attribute - Accessibility
this is very similar to aria
-labelledby: a label describes the essence of an object, while a description provides more information that the user might need.
... <div role="application" aria
-labelledby="calendar" aria-describedby="info"> <h1 id="calendar">calendar</h1> <p id="info"> this calendar shows the game schedule for the boston red sox.
... <button aria
-label="close" aria-describedby="descriptionclose" onclick="mydialog.close()">x</button> ...
... used by aria roles all elements of the base markup related aria techniques using the aria
-labelledby attribute compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for aria-describedby ...
ARIA: timer role - Accessibility
associated wai-aria roles, states, and properties aria
-label used to provide the name of the timer.
... aria
-live elements with the role timer have an implicit aria
-live value of off.
... <div id="clock" role="timer" aria
-live="off">20</div> <button onclick="starttimer('clock')">start</button> /* basic javascript to update a timer */ function starttimer(timername) { // get the number of seconds let timer = document.getelementbyid(timername), seconds = parseint(timer.innertext); // remove a second // updated the content of timer timer.innertext = --seconds // if timer != 0, settimeout if (sec...
... <div id="clock" role="timer" aria
-live="polite" aria-atomic="true"></div> accessibility concerns improperly using the timer role can unintentionally xxx specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'timer' in that specification.
ARIA: Complementary role - Accessibility
labeling landmarks multiple landmarks if there is more than one complementary landmark role or <aside> element in a document, provide a label for each landmark using the aria
-label attribute, or, if the aside has an appropriately descriptive title, point to it with the aria
-labelledby attribute.
... <aside aria
-label="note about usage"> <!-- content --> </aside> ...
... <aside id="sidebar" aria
-label="sponsors"> <!-- content --> </aside> redundant descriptions screen readers will announce the type of role the landmark is.
...for example, a declaration of role="complementary" with an of aria
-label="sidebar" may be announced redundantly as, "complementary sidebar".
ARIA: row role - Accessibility
<div role="table" aria
-label="populations" aria-describedby="country_population_desc"> <div id="country_population_desc">world populations by country</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="descending">country</span> <span role="columnheader"aria-sort="none">population</span> </div> </div> <div role="rowgroup"> <div role="row"> <span role="cell">finland</span> <span role="cell">5.5 million</span> </div> <div role="row"> <span role="cell...
... a row can contain a number of attributes clarifying the row's role, including aria-colindex, aria
-level, aria-rowindex, and aria-selected.
... examples <div role="table" aria
-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-rowcount="81"> <div id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none">aria role</span> <span role="columnheader" aria-sort="none">semantic element</span> </div> </div> ...
... <table role="table" aria
-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-rowcount="81"> <caption id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</caption> <thead role="rowgroup"> <tr role="row"> <th role="columnheader" aria-sort="none">aria role</th> <th role="columnheader" aria-sort="none">semantic element</th> ...
ARIA: tab role - Accessibility
required javascript features while there are ways to build tab
-like functionality without javascript, there are no substitute combination of html and css only that will provide the same set of functionality that's required above for accessible tabs with content.
...here we are enclosing our group of content in a div, with our tablist having an aria
-label to label it for assistive technology.
... <div class="tabs"> <div role="tablist" aria
-label="sample tabs"> <button role="tab" aria-selected="true" aria-controls="panel-1" id="tab-1" tabindex="0"> first tab </button> <button role="tab" aria-selected="false" aria-controls="panel-2" id="tab-2" tabindex="-1"> second tab </button> <button role="tab" aria-selected="false" aria-controls="panel-3" id="tab-3" tabindex="-1"> third tab ...
... </button> </div> <div id="panel-1" role="tabpanel" tabindex="0" aria
-labelledby="tab-1"> <p>content for the first panel</p> </div> <div id="panel-2" role="tabpanel" tabindex="0" aria
-labelledby="tab-2" hidden> <p>content for the second panel</p> </div> <div id="panel-3" role="tabpanel" tabindex="0" aria
-labelledby="tab-3" hidden> <p>content for the third panel</p> </div> </div> .tabs { padding: 1em; } [role="tablist"] { margin-bottom: -1px; } [role="tab"] { position: relative; z-index: 1; background: white; border-radius: 5px 5px 0 0; border: 1px solid grey; border-bottom: 0; padding: 0.2em; } [role="tab"][aria-selected="true"] { z-index: 3; } [role="tabpanel"] { position: relative; padding: 0 0.5em 0.5em 0.7em; border: 1px so...
ARIA: table role - Accessibility
<div role="table" aria
-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-rowcount="81"> <div id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none">aria role</span> <span role="columnheader" aria-sort="none">semantic element</span> </div> </div> <div role="rowgroup"> <div role="row" aria-rowindex="11"> <span role="cell">header</span> <span role="cell">h1</span> </div> <div role="r...
... the table caption can be defined via aria
-labelledby or aria
-label.
... aria
-label attribute the aria
-label provides an accessible name for the table.
... examples <div role="table" aria
-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-rowcount="81"> <div id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none">aria role</span> <span role="columnheader" aria-sort="none">semantic element</span> </div> </div> ...
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
flexbox containers using the display property's flex value causes an element to generate a block
-level flex container box.
... the inline-flex value causes an element to generate an inline
-level flex container box.
... -webkit-box-direction: normal; -webkit-box-orient: horizontal; -moz-box-direction: normal; -moz-box-orient: horizontal; } -webkit-flex-direction: $value; -ms-flex-direction: $value; flex-direction: $value; } // shorter version: @mixin flex-dir($args...) { @include flex-direction($args...); } flexbox wrap the flex-wrap property controls whether the flex container is single
-lined or multi
-lined and the direction of the cross-axis, which determines the direction in which the new lines are stacked in.
... -webkit-align-content: $value; @if $value == flex-start { -ms-flex
-line-pack: start; } @else if $value == flex-end { -ms-flex
-line-pack: end; } @else { -ms-flex
-line-pack: $value; } align-content: $value; } ...
Block and inline layout in normal flow - CSS: Cascading Style Sheets
we describe block
-level boxes as participating in a block formatting context, and inline
-level boxes as participating in an inline formatting context.
...vertical margins between adjacent block
-level boxes in a block formatting context collapse.
... in a block formatting context, each box's left outer edge touches the left edge of the containing block (for right-to
-left formatting, right edges touch).” - 9.4.1 for elements with an inline formatting context: “in an inline formatting context, boxes are laid out horizontally, one after the other, beginning at the top of a containing block.
... see also css basic box model normal flow - learn layout inline elements block
-level elements ...
Pseudo-classes - CSS: Cascading Style Sheets
index of standard pseudo-classes :active :any
-link :blank :checked :current :default :defined :dir() :disabled :drop :empty :enabled :first :first-child :first-of-type :fullscreen :future :focus :focus-visible :focus-within :has() :host :host() :host-context() :hover :indeterminate :in-range :invalid :is() :lang() :last-child :last-of-type :left :link :local
-link :not() :nth-child() :...
...nth-col() :nth
-last-child() :nth
-last-col() :nth
-last-of-type() :nth-of-type() :only-child :only-of-type :optional :out-of-range :past :placeholder-shown :read-only :read-write :required :right :root :scope :state() :target :target-within :user-invalid :valid :visited :where() specifications specification status comment fullscreen api living standard defined :fullscreen.
... selectors level 4 working draft defined :any
-link, :blank, :local
-link, :scope, :drop, :current, :past, :future, :placeholder-shown, :user-invalid, :nth-col(), :nth
-last-col(), :is() and :where().
... selectors level 3 recommendation defined :target, :root, :nth-child(), :nth
-last-of-child(), :nth-of-type(), :nth
-last-of-type(), :last-child, :first-of-type, :last-of-type, :only-child, :only-of-type, :empty and :not().
direction - CSS: Cascading Style Sheets
the property sets the base text direction of block
-level elements and the direction of embeddings created by the unicode-bidi property.
... it also sets the default alignment of text, block
-level elements, and the direction that cells flow within a table row.
... for the direction property to have any effect on inline
-level elements, the unicode-bidi property's value must be embed or override.
... formal definition initial valueltrapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax ltr | rtl examples setting right-to
-left direction blockquote { direction: rtl; } specifications specification status comment css writing modes module level 3the definition of 'direction' in that specification.
font-size - CSS: Cascading Style Sheets
syntax /* <absolute-size> values */ font-size: xx-small; font-size: x-small; font-size: small; font-size: medium; font-size: large; font-size: x
-large; font-size: xx
-large; font-size: xxx
-large; /* <relative-size> values */ font-size: smaller; font-size: larger; /* <length> values */ font-size: 12px; font-size: 0.8em; /* <percentage> values */ font-size: 80%; /* global values */ font-size: inherit; font-size: initial; font-size: unset; the font-size property is specified in one of the following ways: as one of the absolute-size or ...
...relative-size keywords as a <length> or a <percentage>, relative to the parent element's font size values xx-small, x-small, small, medium, large, x
-large, xx
-large, xxx
-large absolute-size keywords, based on the user's default font size (which is medium).
...it also applies to ::first
-letter and ::first
-line.inheritedyespercentagesrefer to the parent element's font sizecomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea length formal syntax <absolute-size> | <relative-size> | <length-percentage>where <absolute-size> = xx-small | x-small | small | medium | large | x
-large | xx
-large | xxx
-large<relative-size> = larger | smaller<l...
... working draft adds xxx
-large keyword.
grid-column - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: grid-column-end grid-column-start syntax this property is specified as one or two <grid
-line> values.
... if two <grid
-line> values are given they are separated by "/".
... each <grid
-line> value can be specified as: either the auto keyword or a <custom-ident> value or an <integer> value or both <custom-ident> and <integer>, separated by a space or the keyword span together with either a <custom-ident> or an <integer> or both.
... formal definition initial valueas each of the properties of the shorthand:grid-column-start: autogrid-column-end: autoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas each of the properties of the shorthand:grid-column-start: as specifiedgrid-column-end: as specifiedanimation typediscrete formal syntax <grid
-line> [ / <grid
-line> ]?where <grid
-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
margin-right - CSS: Cascading Style Sheets
if the values of margin
-left and margin-right are both auto, the calculated space is evenly distributed.
...es the different cases: value of display value of float value of position computed value of auto comment inline, inline-block, inline-table any static or relative 0 inline layout mode block, inline, inline-block, block, table, inline-table, list-item, table-caption any static or relative 0, except if both margin
-left and margin-right are set to auto.
..., block, table, inline-table, list-item, table-caption left or right static or relative 0 block layout mode (floating element) any table-*, except table-caption any any 0 internal table-* elements don't have margins, use border-spacing instead any, except flex, inline-flex, or table-* any fixed or absolute 0, except if both margin
-left and margin-right are set to auto.
...it also applies to ::first
-letter and ::first
-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting right margin using pixels and percentages .content { margin-right: 5%; } .sidebox { margin-right: 10px; } .logo { margin-right: -5px; } specifications ...
repeating-radial-gradient() - CSS: Cascading Style Sheets
it is similar to radial-gradient() and takes the same arguments, but it repeats the color stops infinitely in all directions so as to cover its entire container, similar to repeating
-linear-gradient() .
..., | at <position> , <color-stop
-list> ) \---------------------------------------------------------------/\-----------------/ contour, size and position of the ending shape list of color stops where <extent-keyword> = closest-corner | closest-side | farthest-corner | farthest-side and <color-stop
-list> = [ <linear-color-stop> [, <color-hint>?
...]#, <linear-color-stop> and <linear-color-stop> = <color> [ <color-stop
-length> ]?
... and <color-stop
-length> = [ <percentage> | <length> ]{1,2} and <color-hint> = [ <percentage> | <length> ] examples black and white gradient <div class="radial-gradient"></div> .radial-gradient { width: 120px; height: 120px; } .radial-gradient { background: repeating-radial-gradient(black, black 5px, white 5px, white 10px); } farthest-corner <div class="radial-gradient"></div> .radial-gradient { width: 240px; height: 120px; } .radial-gradient { background: repeating-radial-gradient(ellipse farthest-corner at 20% 20%, red, black 5%, blue 5%, green 10%); background: repeating-radial-gradient(ellipse farthest-corner at 20% 20%, red 0 5%, green 5% 10%); } the elliptical gradient will be centered 20% from the top left, and will repeat 10 times...
text-decoration-color - CSS: Cascading Style Sheets
the text-decoration-color css property sets the color of decorations added to text by text-decoration
-line.
...this effect can nevertheless be achieved by nesting elements, applying a different line type to each element (with the text-decoration
-line property), and specifying the line color (with text-decoration-color) on a per-element basis.
...it also applies to ::first
-letter and ::first
-line.inheritednocomputed valuecomputed coloranimation typea color formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples <p>this paragraph has <s>some erroneous text</s> inside it that i want to call attention to.</p> p { text-decoration
-line: underline; text-decoration-color: cyan; } s { text-decoration
-line: line-through; text-decoration-color: red; text-decoration-style: wavy; } specifications specification status comment css text decoration module level 3the definition of 'text-decoration-color' in that specification.
text-decoration-style - CSS: Cascading Style Sheets
the text-decoration-style css property sets the style of the lines specified by text-decoration
-line.
... the style applies to all lines that are set with text-decoration
-line.
...use text-decoration
-line: none instead.
...it also applies to ::first
-letter and ::first
-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax solid | double | dotted | dashed | wavy examples setting a wavy underline .example { -moz-text-decoration
-line: underline; -moz-text-decoration-style: wavy; -moz-text-decoration-color: red; -webkit-text-decoration
-line: underline; -webkit-text-decoration-style: wavy; -webkit-text-decoration-color: red; } css .wavy { text-decoration
-line: underline; text-decoration-style: wavy; text-decoration-color: red; } html <p class="wavy">this text has a wavy red line beneath it.</p> results specifications specification status comment c...
vertical-align - CSS: Cascading Style Sheets
b6.png"/> 20%:<img style="vertical-align:20%" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> -100%:<img style="vertical-align:-100%" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> </p> #* { box-sizing: border-box; } img { margin-right: 0.5em; } p { height: 3em; padding: 0 .5em; font-family: monospace; text-decoration: underline overline; margin
-left: auto; margin-right: auto; width: 80%; } to vertically align the content of a cell in a table: <table> <tr> <td style="vertical-align: baseline">baseline</td> <td style="vertical-align: top">top</td> <td style="vertical-align: middle">middle</td> <td style="vertical-align: bottom">bottom</td> <td> <p>there is a theory which states that if ever anyone d...
...iscovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.</p> <p>there is another theory which states that this has already happened.</p> </td> </tr> </table> table { margin
-left: auto; margin-right: auto; width: 80%; } table, th, td { border: 1px solid black; } td { padding: 0.5em; font-family: monospace; } note that vertical-align only applies to inline, inline-block and table-cell elements: you can't use it to vertically align block
-level elements.
... formal definition initial valuebaselineapplies toinline
-level and table-cell elements.
... it also applies to ::first
-letter and ::first
-line.inheritednopercentagesrefer to the line-height of the element itselfcomputed valuefor percentage and length values, the absolute length, otherwise the keyword as specifiedanimation typea length formal syntax baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length> examples basic example html <div>an <img src="https://udn.realityripple.com/samples/b4/e1f0faff5b.svg" alt="link" width="32" height="32" /> image with a default alignment.</div> <div>an <img class="top" src="https://udn.realityripple.com/samples/b4/e1f0faff5b.svg" alt="link" width="32" height="32" /> image with a text-top alignment.</div> <div>an <img class="bottom" src="https://udn.realityripple.com/samples/b4/e1f0faff5b.svg" alt="li...
white-space - CSS: Cascading Style Sheets
syntax /* keyword values */ white-space: normal; white-space: nowrap; white-space: pre; white-space: pre-wrap; white-space: pre
-line; white-space: break-spaces; /* global values */ white-space: inherit; white-space: initial; white-space: unset; the white-space property is specified as a single keyword chosen from the list of values below.
... pre
-line sequences of white space are collapsed.
... the following table summarizes the behavior of the various white-space values: new lines spaces and tabs text wrapping end-of
-line spaces normal collapse collapse wrap remove nowrap collapse collapse no wrap remove pre preserve preserve no wrap preserve pre-wrap preserve preserve wrap hang pre
-line preserve collapse wrap remove break-spaces preserve preserve wrap wrap formal definition ...
...initial valuenormalapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | pre | nowrap | pre-wrap | pre
-line | break-spaces examples basic example code { white-space: pre; } line breaks inside <pre> elements pre { word-wrap: break-word; /* ie 5.5-7 */ white-space: pre-wrap; /* modern browsers */ } in action html <div id="css-code" class="box"> p { white-space: <select> <option>normal</option> <option>nowrap</option> <option>pre</option> <option>pre-wrap</option> <option>pre
-line</option> <option>break-spaces</option> </select> } </div> <div id="results" class="box"> <p> lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore ma...
Video player styling basics - Developer guides
te attribute is now used to indicate whether the video controls are visible or not and these also need to be styled: .controls[data-state=hidden] { display:none; } .controls[data-state=visible] { display:block; } there are a number of properties that also need to be set for all elements within the video controls: .controls > * { float:left; width:3.90625%; height:100%; margin
-left:0.1953125%; display:block; } .controls > *:first-child { margin
-left:0; } all elements are floated left, as they are to be aligned next to one another, and each element is set to have a width of nearly 4% (again the actual value was calculated based on the required dimensions of the buttons), and a height of 100%.
... a value for margin
-left is also set, but the first element (in this case the play/pause button) has this property overridden by the value 0.
...in this case, the margins and padding on the <figure> element need to be removed so that all the available space is taken advantage of, and the buttons are a bit too small so this needs to be altered by setting a new height on the element that has the .controls class set on it: @media screen and (max-width:64em) { figure { padding
-left:0; padding-right:0; height:auto; } .controls { height:1.876rem; } } this works well enough until it is viewed on a smaller screen (680px/42.5em), so another breakpoint is made here.
...the definitions for the elements within the .controls element now also need to changed: @media screen and (max-width:42.5em) { .controls { height:auto; } .controls > * { display:block; width:16.6667%; margin
-left:0; height:2.5rem; margin-top:2.5rem; } .controls .progress { position:absolute; top:0; width:100%; float:none; margin-top:0; } .controls .progress progress { width:98%; margin:0 auto; } .controls button { background-position:center center; } } the .progress container is now moved to the top of the control set via position:absolute, s...
Date and time formats used in HTML - HTML: Hypertext Markup Language
for <input>, the values of type that return a value which contains a string representing a date and/or time are: date datetime datetime
-local month time week examples before getting into the intricacies of how date and time strings are written and parsed in html, here are some examples that should give you a good idea what the more commonly-used date and time string formats look like.
... examples of valid time strings time string time 00:00:30.75 12:00:30.75 am (30.75 seconds after midnight) 12:15 12:15 pm 13:44:25 1:44:25 pm (25 seconds after 1:44 pm) local date and time strings a valid datetime
-local string consists of a date string and a time string concatenated together with either the letter "t" or a space character separating them.
... when you set the value of a datetime
-local input, the string is normalized into a standard form.
... examples of valid datetime
-local strings date/time string normalized date/time string actual date and time 1986-01-28t11:38:00.01 1986-01-28t11:38:00.01 january 28, 1986 at 11:38:00.01 am 1986-01-28 11:38:00.010 1986-01-28t11:38:00.011 january 28, 1986 at 11:38:00.01 am 0170-07-31t22:00:00 0170-07-31t22:002 july 31, 170 at 10:00 pm notice that after normalization, this is the same string as the previous datetime
-local string.
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
having a single top
-level title is also arguably better for screenreader users, and seo.
... sectioning content can be labeled using a combination of the aria
-labelledby and id attributes, with the label concisely describing the purpose of the section.
... example <header> <nav aria
-labelledby="primary-navigation"> <h2 id="primary-navigation">primary navigation</h2> <!-- navigation items --> </nav> </header> <!-- page content --> <footer> <nav aria
-labelledby="footer-navigation"> <h2 id="footer-navigation">footer navigation</h2> <!-- navigation 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".
... using the aria
-labelledby attribute labeling regions • page structure • w3c wai web accessibility tutorials specifications specification status comment html living standardthe definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification.
<hgroup> - HTML: Hypertext Markup Language
the html <hgroup> element represents a multi
-level heading for a section of a document.
... the <hgroup> element allows the primary heading for a document section to be grouped with any secondary headings—such as subheadings or alternative titles—to form a multi
-level heading.
... so in the abstract outline produced by the html outline algorithm defined in the html specification, the <hgroup> as a whole forms a single logical heading, with the entire set of <h1>–<h6> children of the <hgroup> going into the outline as one multi
-level unit, to comprise that single logical heading in the abstract outline.
... to produce any (non-abstract) rendered view of such an outline, some choice must be made in the design of the rendering tool about how to render <hgroup> headings in such a way as to convey their multi
-level nature.
Compression in HTTP - HTTP
compression algorithms used for files can be grouped into two broad categories: loss
-less compression, where the compression-uncompression cycle doesn't alter the data that is recovered.
... for images, gif or png are using loss
-less compression.
... some formats can be used for both loss
-less or lossy compression, like webp, and usually lossy algorithm can be configured to compress more or less, which then of course leads to less or more quality.
... lossy compression algorithms are usually more efficient than loss
-less ones.
CSP: sandbox - HTTP
allow-orientation
-lock allows the page to disable the ability to lock the screen orientation.
... allow-pointer
-lock allows the page to use the pointer lock api.
... allow-top-navigation allows the page to navigate (load) content to the top
-level browsing context.
... allow-top-navigation-by-user-activation lets the resource navigate the top
-level browsing context, but only if initiated by a user gesture.
Feature-Policy: accelerometer - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: autoplay - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: battery - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: camera - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: display-capture - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: document-domain - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: encrypted-media - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: gyroscope - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: layout-animations - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: legacy-image-formats - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: magnetometer - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: microphone - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: midi - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: oversized-images - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: payment - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: picture-in-picture - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: publickey-credentials-get - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: sync-xhr - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: unoptimized-images - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: unsized-media - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: usb - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: vibrate - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
web-share - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
Feature-Policy: xr-spatial-tracking - HTTP
'none': the feature is disabled in top
-level and nested browsing contexts.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top
-level browsing contexts and all nested browsing contexts (iframes).
... 'self': the feature is allowed by default in top
-level browsing contexts and in nested browsing contexts (iframes) in the same origin.
... 'none': the feature is disabled in top
-level and nested browsing contexts.
JavaScript modules - JavaScript
they need to be top
-level items; you can't use export inside a function, for example.
...to import the main.js script, we use this: <script type="module" src="main.js"></script> you can also embed the module's script directly into the html file by placing the javascript code within the body of the <script> element: <script type="module"> /* javascript module code here */ </script> the script into which you import the module features basically acts as the top
-level module.
...too; if we tried to import different functions of the same name into the same top
-level module file, we'd end up with conflicts and errors.
... renaming imports and exports inside your import and export statement's curly braces, you can use the keyword as along with a new feature name, to change the identifying name you will use for a feature inside the top
-level module.
Warning: unreachable code after return statement - JavaScript
the javascript warning "unreachable code after return statement" occurs when using an expression after a return statement, or when using a semicolon
-less return statement but including an expression directly after.
... unreachable code after a return statement might occur in these situations: when using an expression after a return statement, or when using a semicolon
-less return statement but including an expression directly after.
...in the case of semicolon
-less return statements, it can be unclear whether the developer intended to return the statement on the following line, or to stop execution and return.
... warnings will not be shown for semicolon
-less returns if these statements follow it: throw break var function examples invalid cases function f() { var x = 3; x += 4; return x; // return exits the function immediately x -= 3; // so this line will never run; it is unreachable } function f() { return // this is treated like `return;` 3 + 4; // so the function returns, and this line is never reached } valid cases function f() { var x = 3; x += 4; x -= 3; return x; // ok: return after all other statements } function f() { return 3 + 4 // ok: semicolon
-less return with expression on the same line } ...
Functions - JavaScript
arguments: an array
-like object containing the arguments passed to the currently executing function.
...not a source element } } examples // function declaration function foo() {} // function expression (function bar() {}) // function expression x = function hello() {} if (x) { // function expression function world() {} } // function declaration function a() { // function declaration function b() {} if (0) { // function expression function c() {} } } block
-level functions in strict mode, starting with es2015, functions inside blocks are now scoped to that block.
... prior to es2015, block
-level functions were forbidden in strict mode.
... 'use strict'; function f() { return 1; } { function f() { return 2; } } f() === 1; // true // f() === 2 in non-strict mode block
-level functions in non-strict code in a word: don't.
Array - JavaScript
the javascript array class is a global object that is used in the construction of arrays; which are high
-level, list
-like objects.
... description arrays are list
-like objects whose prototype has methods to perform traversal and mutation operations.
... static methods array.from() creates a new array instance from an array
-like or iterable object.
... array.prototype.reduceright() apply a funciton against an accumulator> and each value of the array (from right-to
-left) as to reduce it to a single value.
Object.create() - JavaScript
for example: a simple common debugging function: // display top
-level property name:value pairs of given object function showproperties(obj){ for(var prop in obj){ console.log(prop + ": " + obj[prop] + "\n" ); } } not such simple results: (especially if silent error-trapping had hidden the error messages) ob={}; ob.po=oco; ob.pn=ocn; // create a compound object using the test objects from above as property values > showproperties( ob ) // display top...
...
-level properties - po: [object object] - error: cannot convert object to primitive value note that only first property gets shown.
... (but if the same object is created simply in a different order -- at least in some implementations...) ob={}; ob.pn=ocn; ob.po=oco; // create same compound object again, but create same properties in different order > showproperties( ob ) // display top
-level properties - error: cannot convert object to primitive value note that neither property gets shown.
...rectly, does: ocn = object.create( null ); // create "null" object (same as before) ocn.tostring = tostring; // since new object lacks method then assign it directly from generic version > ocn.tostring() // shows "[object object]" > "ocn is: " + ocn // shows "ocn is: [object object]" ob={}; ob.pn=ocn; ob.po=oco; // create a compound object (same as before) > showproperties(ob) // display top
-level properties - po: [object object] - pn: [object object] however, setting the generic prototype as the new object's prototype works even better: ocn = object.create( null ); // create "null" object (same as before) object.setprototypeof(ocn, object.prototype); // set new object's prototype to the "generic" object (not standard-object) (in addition to all the string-related...
TypedArray.from() - JavaScript
the typedarray.from() method creates a new typed array from an array
-like or iterable object.
... syntax typedarray.from(source[, mapfn[, thisarg]]) where typedarray is one of: int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array bigint64array biguint64array parameters source an array
-like or iterable object to convert to a typed array.
... description typedarray.from() lets you create typed arrays from: array
-like objects (objects with a length property and indexed elements); or iterable objects (objects where you can get its elements, such as map and set).
... when array.from() gets an array
-like which isn't an iterator, it respects holes.
Authoring MathML - MathML
jqmath is another script to parse a simple latex
-like syntax but which also accepts non-ascii characters like √{∑↙{n=1}↖{+∞} 6/n^2} = π to write ∑ n = 1 + ∞ 6 n 2 = π .
... command
-line programs an alternative way is to parse the simple syntax before publishing your web pages.
... that is, you use command
-line programs to generate them and publish these static pages on your server.
...finally, bluegriffon has an add-on to insert mathml formulas in your document, using ascii/latex
-like syntax.
Media container formats (file types) - Web media technologies
audio codecs supported by 3gp codec browser support chrome edge firefox safari amr-nb yes1 amr-wb yes1 amr-wb+ yes1 aac
-lc yes1,2 he-aac v1 yes1,2 he-aac v2 yes1,2 mp3 yes1 [1] firefox only supports 3gp on openmax-based devices, which currently means the boot to gecko (b2g) platform.
... no audio codecs supported by quicktime codec browser support chrome edge firefox safari aac no alaw 2:1 no apple lossless (alac) no he-aac no mpeg-1 audio layer iii (mp3) no microsoft adpcm no µ
-law 2:1 (u
-law) no wave (wav) the waveform audio file format (wave), usually referred to simply as wav due to its filename extension being .wav, is a format developed by microsoft and ibm to store audio bitstream data.
... audio codecs supported by wave codec browser support chrome edge firefox safari adpcm (adaptive differential pulse code modulation) no gsm 06.10 no lpcm (linear pulse code modulation) yes mpeg-1 audio layer iii (mp3) no µ
-law (u
-law) no webm webm (web media) is a format based on matroska which is designed specifically for use in modern web environments.
...you could even choose to offer a retro
-like quicktime or avi fallback for good measure.
Codecs used by WebRTC - Web media technologies
profile
-level-id all webrtc implementations are required to specify and interpret this parameter in their sdp, identifying the sub-profile used by the codec.
...this is useful to note, since in rfc 6184 ("rtp payload format for h.264 video"), profile
-level-id is entirely optional.
... mandatory audio codecs codec name browser compatibility opus chrome, edge, firefox, safari g.711 pcm (a
-law) chrome, firefox, safari g.711 pcm (µ
-law) chrome, firefox, safari see below for more details about any webrtc-specific considerations that exist for each codec listed above.
...both µ
-law and a
-law encodings are allowed.
text-decoration - SVG: Scalable Vector Graphics
it is a shorthand for the text-decoration
-line and text-decoration-style properties.
...ect only on the following five elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 250 50" xmlns="http://www.w3.org/2000/svg"> <text y="20" text-decoration="underline">underlined text</text> <text x="0" y="40" text-decoration="line-through">struck-through text</text> </svg> usage notes value <'text-decoration
-line'> || <'text-decoration-style'> || <'text-decoration-color'> default value see individual properties animatable yes for a description of the values, please refer to the css text-decoration property.
... candidate recommendation defines the property as a shorthand for text-decoration
-line, text-decoration-style, and text-decoration-color.
... candidate recommendation mainly refers to the definition in css text decoration 3 turning the property into a shorthand for text-decoration
-line and text-decoration-style.
writing-mode - SVG: Scalable Vector Graphics
the writing-mode attribute specifies whether the initial inline-progression-direction for a <text> element shall be left-to-right, right-to
-left, or top-to-bottom.
... as a presentation attribute, it can be applied to any element but it has effect only on the following five elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> usage notes default value horizontal-tb value horizontal-tb | vertical-rl | vertical
-lr animatable yes horizontal-tb this value defines a top-to-bottom block flow direction.
... vertical-rl this value defines a right-to
-left block flow direction.
... vertical
-lr this value defines a left-to-right block flow direction.
Index - XSLT: Extensible Stylesheet Language Transformations
19 xslt elements reference element, overview, reference, xslt there are two types of elements discussed here: top
-level elements and instructions.
... a top
-level element must appear as the child of either <xsl:stylesheet> or <xsl:transform>.
... 34 <xsl:import> element, reference, xslt, import the <xsl:import> element is a top
-level element that serves to import the contents of one stylesheet into another stylesheet.
...when used as a top
-level element, the parameter is global .
Using the WebAssembly JavaScript API - WebAssembly
now, to help us understand what is going on here, let’s look at the text representation of our wasm module (which we also meet in converting webassembly format to wasm): (module (func $i (import "imports" "imported_func") (param i32)) (func (export "exported_func") i32.const 42 call $i)) in the second line, you will see that the import has a two
-level namespace — the internal function $i is imported from imports.imported_func.
... we need to reflect this two
-level namespace in javascript when writing the object to be imported into the wasm module.
... memory in the low
-level memory model of webassembly, memory is represented as a contiguous range of untyped bytes called linear memory that are read and written by load and store instructions inside the module.
... thus, tables are currently a rather low
-level primitive used to compile low
-level programming language features safely and portably.
Module structure of the SDK - Archive of obsolete content
sdk modules the modules supplied by the sdk are divided into two sorts: high
-level modules like panel and page-mod provide relatively simple, stable apis for the most common add-on development tasks.
... low
-level modules like heritage and namespace provide more powerful functionality, and are typically less stable and more complex.
...for high
-level modules this is just sdk/<module_name>, and for low
-level modules it is sdk/<path_to_module>/<module_name>: // load the high
-level "tabs" module var tabs = require("sdk/tabs"); // load the low
-level "uuid" module var uuid = require('sdk/util/uuid'); the path to specify for a low
-level module is given along with the module name itself in the title of the module's documentation page (for example, system/environment).
jpm - Archive of obsolete content
jpm is a command
-line tool that enables you to test, run, and package add-ons.
...for example, in an ubuntu or debian terminal window, enter sudo apt-get install nodejs nodejs
-legacy npm.
...on debian and ubuntu, this can be remedied by ensuring you installed the compatibility package, nodejs
-legacy: sudo apt-get install nodejs
-legacy on other distributions, you may have to create a local symlink to nodejs manually: sudo ln -s "$(which nodejs)" /usr/local/bin/node installing jpm after you have npm installed and node on your path, install jpm just as you would any other npm package.
package.json - Archive of obsolete content
lib string representing the top
-level module directory provided in this add-on.
... main a string representing the name of a program module that is located in one of the top
-level module directories specified by lib.
...previously was --update
-link in cfx.
Localization - Archive of obsolete content
to reference localized strings from html, add a data
-l10n-id attribute to the html tag where you want the localized string to appear, and assign the identifier to it: <html> <body> <h1 data
-l10n-id="hello_id"></h1> </body> </html> then you can use this html file to build your interface, for example inside a panel: var button = require("sdk/ui/button/action").actionbutton({ id: "localized-hello", label: "localized hello", icon: "./ic...
...nction() { hello.show(); } }); var hello = require("sdk/panel").panel({ height: 75, width: 150, contenturl: require("sdk/self").data.url("my-panel.html") }); given locale files for "en-us" and "fr" which provide translations of hello_id, the panel will now display "hello!" or "bonjour !", according to the current locale: the translation is inserted into the node which has the data
-l10n-id attribute set.
...o_id= <blink>hello!</blink> localizing element attributes this feature is new in firefox 39 you can localize certain attributes of elements with an l10n-id by setting its value with l10n-id.attributename in the properties file like: hello_id.accesskey= h the following attributes are supported: accesskey alt label title placeholder further the localization of the aria attributes aria
-label, aria-valuetext and aria-moz-hint are supported with the same aliases as on firefox os: arialabel ariavaluetext ariamozhint using localized strings in javascript to reference localized strings from your main add-on code, you do this: var _ = require("sdk/l10n").get; console.log(_("hello_id")); assigning to "_" in particular is not required, but is a convention from the gettext tools...
Enhanced Extension Installation - Archive of obsolete content
to this end, we scan the category extension-install
-locations as the extension system is started (after profile initialization) and add these to our internal set.
...there three kinds of item installation: installation from a file installation by a folder or folder
-link "appearing" in an install location, and a hybrid of the two - an xpi file "appearing" into a directory based install location.
... we drop support for the
-lock-item/-unlock-item flags, as well as the
-list-global-items flag.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
however, you should keep in mind that odd
-looking toolbars are likely to confuse and annoy users.
...*/ 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.
Appendix D: Loading Scripts - Archive of obsolete content
although wary authors can choose to cache instances of their modules so that modules are loaded only once globally, this method can be easily misused to re
-load scripts for each new window where they would be better loaded only once globally per session.
...// the following may be used instead at the top
-level: // // let context = this if (components.utils.getglobalforobject) // gecko 2.x var context = components.utils.getglobalforobject({}); else // gecko 1.x context = {}.__parent__; loadscript("script.js", context); the sub-script loader the mozijssubscriptloader can be used to load local scripts from the chrome:, resource:, and file: protocols into any javascript object.
...although wary authors can choose to cache instances of their modules so that modules are loaded only once globally, this method can be easily misused to re
-load scripts for each new window where they would be better loaded only once globally per session.
JXON - Archive of obsolete content
, "encoding": "ascii" } numbers are recognized (integers and decimals): <root><age>12</age><height>1.73</height></root> becomes { "age": 12, "height": 1.73 } booleans are recognized case insensitive: <root><checked>true</checked><answer>false</answer></root> becomes { "checked": true, "answer": false } strings are escaped: <root>quote: " new
-line: </root> becomes "quote: \" new
-line:\n" empty elements will become null: <root><nil/><empty></empty></root> becomes { "nil": null, "empty": null } if all sibling elements have the same name, they become an array <root><item>1</item><item>2</item><item>three</item></root> becomes [1, 2, "three"] mixed mode text-nodes, comments and attributes ge...
...tml document instead of an xml document: /* the structure of my document */ var omyhtmlstruct = { "html": { "head": { "meta": { "@http-equiv": "content-type", "@content": "text/html; charset=utf-8" }, "title": "my html document", "script": { "@type": "text/javascript", "keyvalue": "alert(\"welcome!\");" }, "style": "p:first
-letter {\n font: italic bold 30px georgia, serif;\n}" }, "body": { "h1": "my html document", "p": "hello world!!" } } }; /* create the document */ var omyhtmldoc = jxon.unbuild(omyhtmlstruct, "http://www.w3.org/1999/xhtml"); …and here is the output of alert((new xmlserializer()).serializetostring(omyhtmldoc)): <html> <head> <meta http-equiv="content-type" content=...
..."text/html; charset=utf-8" /> <title>my html document</title> <script type="text/javascript"> alert("welcome!"); </script> <style> p:first
-letter { font: italic bold 30px georgia, serif; } </style> </head> <body> <h1>my html document</h1> <p>hello world!!</p> </body> </html> note: as we already said in the note within code considerations, despite the bidirectional conversion between xml and json is lossless regarding the whole content and the structure of an xml document, it is not lossless regarding the ordering of elements, which for some xml dialects (like xhtml) is part of the information.
Documentation for BiDi Mozilla - Archive of obsolete content
ibmbidi), written by simon montagu and posted to the mozilla
-layout mailing list.
...note that we are not affected by buggy bidi implementations on specific platforms, since the platform never sees a text fragment with mixed directionality, and is not expected to do anything more complicated than displaying left-to-right text from left to right or right-to
-left text from right to left.
...it is created when resolving text containing a unicode bidi control character, a bdo tag, or right-to
-left alignment caused by a dir tag or css.
Layout System Overview - Archive of obsolete content
layout is used to implement both a full-blown wysiwyg html editor, and a single and multi
-line text entry control.
...here are the high
-level classes that make up the layout system.
...for this overview, the frames, style set, and reflow queue are the most important high
-level parts of the presentation shell.
Message Summary Database - Archive of obsolete content
mdb is a schema
-less db interface, so it's trivial to add new attributes without regenerating the db, and it's trivial for older code to read newer databases, because the code can ignore but maintain the attributes it doesn't know about.
...but i believe sql
-lite has the same problem.
... mork is schema
-less.
Mozilla Application Framework in Detail - Archive of obsolete content
where speed is the foremost consideration, we provide c++ libraries with multi
-language interfaces for comprehensive, performant access to networking, filesystem, content, rendering, and much more.
...necko also provides an abstract "file descriptor" interface for low
-level data access.
...the xpinstall api makes the following functionality available as high
-level javascript objects: an install trigger that initiates installations windows registry access mozilla registration interfaces for registering new mozilla software facilities for detecting and maintaining application versions high
-level objects for manipulating local directories and files complete reference documentation, including useful example installations the following snippet from ...
Mozilla Application Framework - Archive of obsolete content
framework xul a comprehensive, cross-platform ui toolkit with an easy-to
-learn xml language for defining ui structure, a schema for localization, and support for both native and cross-platform (using css) look and feel to make writing uis quick and painless.
... gecko a performant web content rendering/editing engine with world
-leading support for standards that you can drop into your application with a single line of xul.
... lxr a web interface to the mozilla codebase that shows you every file in the repository as well as a line-by
-line breakdown of who changed which line when in each file bonsai a web interface to the checkin log that you can query for checkins between certain dates, of certain files, or by certain developers.
Mozilla Crypto FAQ - Archive of obsolete content
the released source code is dual
-licensed under the mpl and the gpl.
...specific questions about licensing of the psm and nss source code should be directed to the netscape.public.mozilla.license newsgroup or the associated mozilla
-license mailing list.
... as noted above, the psm code implements ssl and (in the future) s/mime support for mozilla by taking advantage of generic high
-level mozilla public apis used to add new protocols and message formats.
PyDOM - Archive of obsolete content
for example, when a top
-level window has something like: <window ...
...for example, let's say you have xul similar to pyxultest: top
-level script code says something like: button = document.getelementbyid("some-button") button.foo = 0 and the button itself might look like: <button id="some-button" label="click here" onclick="event.target.foo += 1; print 'foo is now', event.target.foo"/> note that (a) we have stuck an arbitrary attribute on a dom element and (b) in all cases (e.g., event handler and top
-level script), the dom node needs to be explicitly specified - the globals are the window itself.
... the event handler could also have used getelementbyid - the point is that both the event handler and top
-level script share the same namespace.
Merging TraceMonkey Repo - Archive of obsolete content
conflicting files can be listed via hg resolve
-l.
... exercise caution, because leaving off the
-l will re-merge and lose all of the resolutions you've already performed.
...once you've resolved all the files, all the entries in hg resolve
-l will have rs next to them.
Table Layout Regression Tests - Archive of obsolete content
start the layout debugger via mozilla
-layoutdebug - p foo where foo is just another profile than your main profile.
... execute the baseline test shutdown the layoutdebugger execute mozilla
-layoutdebug - p foo >selftest.txt execute the verify test make a note which tests have failed grep 'failed' selftest.txt (these are false positives, quite frequently they indicate reflow problems, pages showing differently when loaded from cache) make your changes to the source, recompile.
... execute mozilla
-layoutdebug - p foo >outputfile.txt execute the verify test make a note which tests have failed grep 'failed' outputfile.txt check how many tests have failed and analyze your results: if the regression tests have failed at the same place as the previous diagnosed false positives => ignore try to figure out what the other regressions are: are they improving the picture or are they regressions?
Running Tamarin performance tests - Archive of obsolete content
tion of builtin.abc -s --shellabc location of shell_toplevel.abc -x --exclude comma separated list of directories to skip -h --help display help and exit -t --notime do not generate timestamps (cleaner diffs) -f --forcerebuild force rebuild all test files -c --config sets the config string [default os-tvm] -q --quiet display minimum output during testrun
-l -
-log also log all output to given logfile --summaryonly only display final summary --rebuildtests rebuild the tests only - do not run against vm --showtimes shows the time for each test --ascargs args to pass to asc on rebuild of test files --vmargs args to pass to vm --timeout max time to run all tests --testtimeout max time to l...
...om order --seed explicitly specify random seed for --random -s --avm2 second avmplus command to use --avmname nickname for avm to use as column header --avm2name nickname for avm2 to use as column header --detail display results in 'old-style' format --raw output all raw test values -i --iterations number of times to repeat test
-l -
-log logs results to a file -k --socketlog logs results to a socket server -r --runtime name of the runtime vm used, including switch info eg.
...adb supports ssh
-like commands to an android device.
Tamarin build documentation - Archive of obsolete content
note that additional command
-line arguments are only available in the debug configuration.
... build tamarin release shell - get tamarin-redux - export the following variables into the environment $ export android_toolchain=<full path to your android sdk/ndk top folder> $ export android_ndk=$android_toolchain/android-ndk $ export android_ndk_bin=$android_ndk/toolchains/arm
-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin $ export android_sdk=$android_toolchain/android-sdk-mac_86 $ export path=$path:$android_sdk/platform-tools:$android_ndk_bin - example commands to build tamarin: $ hg clone http://hg.mozilla.org/tamarin-redux $ cd tamarin-redux $ mkdir objdir-release $ cd objdir-release $ ../configure.py --arm-arch=armv7-a --target=arm-android $ make to make a debu...
... importing the project into eclipse file >> import >> general >> existing projects into workspace click next the root directory should be the full path to your top
-level tamarin-redux directory ensure the 'avmshell-project' project is checked in the 'projects' list uncheck 'copy projects into workspace' click finish building in eclipse 8 build configurations are included for macos with the gcc 4.0 toolchain: mac-32-release mac-64-release mac-32-debug mac-64-debug mac-32-release-debugger mac-64-release-debugger mac-32-debug-debugger mac-64-debu...
Index - Archive of obsolete content
890 providing command
-line options add-ons, command line, extensions, guide, xulrunner extensions and xul applications can modify the way command line parameters are handled by writing a component that implements the nsicommandlinehandler interface and registering it in a category.
... 914 text
-link xul reference, xul_style_classes no summary!
... 1216 window xul elements, xul reference describes the structure of a top
-level window.
Creating a Window - Archive of obsolete content
you can use the command
-line parameter '-chrome' to specify the xul file to open when mozilla starts.
...(usually the browser window.) for example, we could open the find files dialog with either of the following: mozilla -chrome chrome://findfile/content/findfile.xul mozilla -chrome resource:/chrome/findfile/content/findfile.xul if you run this command from a command
-line (assuming you have one on your platform), the find files dialog will open by default instead of the mozilla browser window.
...instead, it causes the specified file to open as a top
-level window without any browser chrome, such as the address field or menu.
Templates - Archive of obsolete content
let's take a simple example where we want to create a button for each top
-level bookmark.
...this example will only get the top
-level bookmarks (or bookmark folders) as we're going to create buttons.
... example 1 : source <vbox datasources="rdf:bookmarks" ref="nc:bookmarksroot" flex="1"> <template> <button uri="rdf:*" label="rdf:http://home.netscape.com/nc-rdf#name"/> </template> </vbox> here, a vertical box has been created that will contain a column of buttons, one for each top
-level bookmark.
How to enable locale switching in a XULRunner application - Archive of obsolete content
here is a code snippet showing how this is done: the definition of the xul control: <listbox id="locale
-listbox"> <!-- generated list items go in here --> </listbox> <button label="&switchlocale.button;" oncommand="changelocale()"/> the javascript code to populate the control: try { // query available and selected locales var chromeregservice = components.classes["@mozilla.org/chrome/chrome-registry;1"].getservice(); var xulchromereg = chromeregservice.queryinterface(components.interfaces.ns...
...ry); var selectedlocale = xulchromereg.getselectedlocale("localeswitchdemo"); var availablelocales = toolkitchromereg.getlocalesforpackage("localeswitchdemo"); // render locale menulist by iterating through the query result from getlocalesforpackage() const xul_ns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var localelistbox = document.getelementbyid("locale
-listbox"); var selecteditem = null; while(availablelocales.hasmore()) { var locale = availablelocales.getnext(); var listitem = document.createelementns(xul_ns, "listitem"); listitem.setattribute("value", locale); listitem.setattribute("label", locale); if (locale == selectedlocale) { // is this the current locale?
... var localelistbox = document.getelementbyid("locale
-listbox"); var newlocale = localelistbox.selecteditem.value; // write preferred locale to local user config var prefs = components.classes["@mozilla.org/preferences-service;1"].
application/http-index-format specification - Archive of obsolete content
content
-length base 10 digits representing the size of the file in bytes.
... file-type one of the following keywords to represent a special status for a file: file directory symbolic
-link sym-file (a symbolic link to a file) sym-directory (a symbolic link to a directory) permissions unix type file permission syntax.
...100: 300: ftp://test.netscape.com/u/montulli 100: 200: filename content
-length content-type file-type last-modified 201: foo.txt 512 text/plain file tue,%2015%20nov%201994%2008:12:31%20gmt 201: bar.html 9683 text/html file tue,%2025%20oct%201994%2008:12:31%20gmt 201: foobar 0 application/http-index-format directory tue,%2025%20oct%201994%2008:12:31%20gmt original document information author(s): christian biesinger last updated date: may 10, 2004 ...
Theme changes in Firefox 3 - Archive of obsolete content
browser/themes/pinstripe/browser/browser.css .tabbrowser-tab[first-tab="true"] > .tab-image
-left no longer has a margin
-left.
... instead .tabs
-left now displayed and given the same width as the former margin
-left.
... mac os x mac os x themes for firefox 3 should add these two rules to the end of chrome://global/skin/wizard.css: .wizard-buttons-btm { padding:xpx; } .wizard
-label-box { display: none; } the numeric value ofx, the number of pixels of padding in .wizard-buttons-btm, should be the same as the value of the margin for .wizard-buttons-box-2.
-ms-content-zoom-snap-points - Archive of obsolete content
initial valuesnapinterval(0%, 100%)applies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values snapinterval( <percentage>, <percentage> ) specifies where the snap-points will be placed.
... if any value specified is less than that specified by the -ms-content-zoom
-limit-min property, the value of -ms-content-zoom
-limit-min is used.
... if any value specified is greater than that specified by the -ms-content-zoom
-limit-max property, the value of -ms-content-zoom
-limit-max is used.
-ms-content-zooming - Archive of obsolete content
initial valuezoom for the top level element, none for all other elementsapplies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none the initial value of all elements except the top
-level element.
... zoom the initial value of the top
-level element.
...the top
-level element can also be zoomed via double-tap when it is zoom-enabled.
::-ms-fill-upper - Archive of obsolete content
background-clip background-color background-image background-origin background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face f...
...ont-size font-style font-weight height margin-bottom margin
-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-fill-upper specifications not part of any specification.
... see also ::-ms-fill
-lower ::-ms-track ::-ms-thumb ::-moz-range-progress css-tricks: styling cross-browser compatible range inputs with css quirksmode: styling and scripting sliders ...
::-ms-thumb - Archive of obsolete content
background-clip background-color background-image background-origin background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face f...
...ont-size font-style font-weight height margin-bottom margin
-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-thumb specifications not part of any specification.
... see also ::-ms-track ::-ms-fill-upper ::-ms-fill
-lower ::-webkit-slider-thumb ::-moz-range-thumb css-tricks: styling cross-browser compatible range inputs with css quirksmode: styling and scripting sliders ...
Packages - Archive of obsolete content
summary a top
-level object used to access java classes from within javascript code.
... created by the packages object is a top
-level, predefined javascript object.
...for example, you can access a constructor of the frame class as follows: var theframe = new packages.java.awt.frame(); for convenience, javascript provides the top
-level netscape, sun, and java objects that are synonyms for the packages properties with the same names.
XForms Custom Controls - Archive of obsolete content
this will also allow you to be up to date with our current approaches (often the result of hard
-learned lessons) and that will hopefully help you to more easily write your own controls.
...the other is the implementation binding that adds the host
-language specific representation of the xforms control.
... this control --> var img = document.getanonymouselementbyattribute(this, "anonid", "content"); img.setattribute("src", this.stringvalue); return true; </body> </method> </implementation> </binding> </bindings> <xf:model> <xf:instance xmlns=""> <data> <curimg></curimg> <img label="firefox">http://www.mozilla.com/images/firefox
-logo-64x64.png</img> <img label="thunderbird">http://www.mozilla.com/images/thunderbird
-logo-64x64.png</img> <img label="bugzilla">http://www.mozilla.org/images/p-bugz.gif</img> <img label="mozilla">http://www.mozilla.org/images/mozhead-80x64.gif</img> </data> </xf:instance> </xf:model> <style type="text/css"> @namespace xf url(http://www.w3.org/2002/xforms); x...
Common causes of memory leaks in extensions - Extensions
if your add-on makes use of long
-lived timeouts or uses window.setinterval(), you need to take special care to ensure your code won't accidentally leak content windows.
...if you put a reference to anything within this compartment into a long
-lived window object (such as browser.xul), javascript module or xpcom component, the bootstrap.js compartment will become a zombie.
...if the window in question is browser.xul or some long
-lived web app such as gmail, the leaked compartment might survive for quite some time.
Audio for Web games - Game development
to see this in action, let's lay out some separate tracks: <section id="tracks"> <ul> <li data
-loading="true"> <a href="leadguitar.mp3" class="track">lead guitar</a> <p class="loading-text">loading...</p> <button data-playing="false" aria-decribedby="guitar-play
-label"> <span id="guitar-play
-label">play</span> </button> </li> <li data
-loading="true"> <a href="bassguitar.mp3" class="track">bass guitar</a> <p class="loading-text">loading...</...
...p> <button data-playing="false" aria-describedby="bass-play
-label"> <span id="bass-play
-label">play</span> </button> </li> <li data
-loading="true"> <a href="drums.mp3" class="track">drums</a> <p class="loading-text">loading...</p> <button data-playing="false" aria-describedby="drums-play
-label"> <span id="drums-play
-label">play</span> </button> </li> <li data
-loading="true"> <a href="horns.mp3" class="track">horns</a> <p class="loading-text">loading...</p> <button data-playing="false" aria-describedby="horns-play
-label"> <span id="horns-play
-label">play</span> </button> </li> <li data
-loading="true"> <a href="clav.mp3" class="track">clavi</a> <p class="loading-text">loading...
......</p> <button data-playing="false" aria-describedby="clavi-play
-label"> <span id="clavi-play
-label">play</span> </button> </li> </ul> <p class="sourced">all tracks sourced from <a href="http://jplayer.org/">jplayer.org</a></p> </section> all of these tracks are the same tempo and are designed to be synchronized with each other, so we need to make sure they are loaded and available to the api before we are able to play them.
Visual typescript game engine - Game development
this is high
-level programming in this software.
... ├── package.json ├── package
-lock.json ├── webpack.config.js ├── tsconfig.json ├── tslint.json ├── launch.json ├── workplace.code-workspace logo.png license ├── build/ (this is auto generated) | ├── externals/ | ├── templates/ | ├── imgs/ | ├── styles/ | | └── favicon.ico | ├── visualjs2.js | ├── app.html ├── src/ | ├──...
...| ├── examples/ | | ├── platformer/ | ├── html-components/ | | ├── register.html | | ├── login.html | | ├── games
-list.html | | ├── user-profile.html | | ├── store.html | | ├── broadcaster.html | ├── index.html | ├── app-icon.ts | └── app.ts └── server/ | ├── package.json | ├── package
-lock.json | ├── server-config.js | ├── database/ | | ├── database.js | | ├── common/ | | ├── email/ | | ...
Domain - MDN Web Docs Glossary: Definitions of Web-related terms
for example, in "developer.mozilla.org": "org" is called a top
-level domain.
...here, "org" means "organization" which is defined in a top
-level domain registry.
...if you like to own a domain you have to register it with one of the many registrars who are allowed to do so with a top
-level domain registry.
Request header - MDN Web Docs Glossary: Definitions of Web-related terms
for example, the content
-length appearing in a post request is actually an entity header referring to the size of the body of the request message.
... a few request headers after a get request: get /home.html http/1.1 host: developer.mozilla.org user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept
-language: en-us,en;q=0.5 accept-encoding: gzip, deflate, br referer: https://developer.mozilla.org/testpage.html connection: keep-alive upgrade-insecure-requests: 1 if-modified-since: mon, 18 jul 2016 02:36:04 gmt if-none-match: "c561c68d0ba92bbeb8b0fff2a9199f722e3a621a" cache-control: max-age=0 strictly speaking, the content
-length header in this example is not a request header like the others, b...
...ut an entity header: post /myform.html http/1.1 host: developer.mozilla.org user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 content
-length: 128 learn more technical knowledge list of all http headers ...
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
te('parse'); var xpointer = xinclude.getattribute('xpointer'); var encoding = xinclude.getattribute('encoding'); // e.g., utf-8 // "text/xml or application/xml or matches text/*+xml or application/*+xml" before encoding (then utf-8) var accept = xinclude.getattribute('accept'); // header "accept: "+x var acceptlanguage = xinclude.getattribute('accept
-language'); // "accept
-language: "+x var xifallback = xinclude.getelementsbytagnamens('http://www.w3.org/2001/xinclude', 'fallback')[0]; // only one such child is allowed if (href === '' || href === null) { // points to same document if empty (null is equivalent to empty string) href = null; // set for uniformity in testing below if (parse ===...
.../, '') || href.match(/^#/, '')) { alert('fragment identifiers are disallowed in an xinclude "href" attribute'); return false; } var j; var xincludeparent = xinclude.parentnode; try { netscape.security.privilegemanager.enableprivilege('universalxpconnect universalbrowserread'); // necessary with file:///
-located files trying to reach external sites if (href !== null) { var response, responsetype; var request = new xmlhttprequest(); request.open('get', href, false); request.setrequestheader('if-modified-since', 'thu, 1 jan 1970 00:00:00 gmt'); request.setrequestheader('cache-control', ...
...'no-cache'); if (accept) { request.setrequestheader('accept', accept); } if (acceptlanguage) { request.setrequestheader('accept
-language', acceptlanguage); } switch (parse) { case 'text': // priority should be on media type: var contenttype = request.getresponseheader('content-type'); //text/xml; charset="utf-8" // send to get headers first?
CSS selectors - Learn web development
for example, ::first
-line always selects the first line of text inside an element (a <p> in the below case), acting as if a <span> was wrapped around the first formatted line and then selected.
... p::first
-line { } combinators the final group of selectors combine other selectors in order to target elements within our documents.
... type selector h1 { } type selectors universal selector * { } the universal selector class selector .box { } class selectors id selector #unique { } id selectors attribute selector a[title] { } attribute selectors pseudo-class selectors p:first-child { } pseudo-classes pseudo-element selectors p::first
-line { } pseudo-elements descendant combinator article p descendant combinator child combinator article > p child combinator adjacent sibling combinator h1 + p adjacent sibling general sibling combinator h1 ~ p general sibling in this module cascade and inheritance css selectors type, class, and id selectors attribut...
Styling tables - Learn web development
to do this, add the following css to your style.css file: /* spacing */ table { table
-layout: fixed; width: 100%; border-collapse: collapse; border: 3px solid purple; } thead th:nth-child(1) { width: 30%; } thead th:nth-child(2) { width: 20%; } thead th:nth-child(3) { width: 15%; } thead th:nth-child(4) { width: 35%; } th, td { padding: 20px; } the most important parts to note are as follows: a table
-layout value of fixed is generally a good idea to set on y...
...with table
-layout: fixed, you can size your columns according to the width of their headings, and then deal with their content as appropriate.
... use table
-layout: fixed to create a more predictable table layout that allows you to easily set column widths by setting width on their headings (<th>).
Styling lists - Learn web development
sual melting point, usually made from goat/sheep milk.</dd> <dt>green salad</dt> <dd>that green healthy stuff that many of us just use to garnish kebabs.</dd> </dl> if you go to the live example now and investigate the list elements using browser developer tools, you'll notice a couple of styling defaults: the <ul> and <ol> elements have a top and bottom margin of 16px (1em) and a padding
-left of 40px (2.5em.) the list items (<li> elements) have no set defaults for spacing.
... the <dd> elements have margin
-left of 40px (2.5em.) the <p> elements we've included for reference have a top and bottom margin of 16px (1em), the same as the different list types.
... in our finished example, we have styled the unordered list like so (on top of what you've already seen above): ul { padding
-left: 2rem; list-style-type: none; } ul li { padding
-left: 2rem; background-image: url(star.svg); background-position: 0 0; background-size: 1.6rem 1.6rem; background-repeat: no-repeat; } here we've done the following: set the padding
-left of the <ul> down from the default 40px to 20px, then set the same amount on the list items.
Example 1 - Learn web development
inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border
-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); box-sizing : border-box; min-width : 100%; max-height...
... inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border
-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); box-sizing : border-box; min-width : 100%; max-height...
...} .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; box-sizing : border-box; text-align : center; border
-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-box-sizing : border-box; box-sizing : border-box; ...
Other form controls - Learn web development
previous overview: forms next we now look at the functionality of non-<input> form elements in detail, from other control types such as drop-down lists and multi
-line text fields, to other useful form features such as the <output> element (which we saw in action in the previous article), and progress bars.
... multi
-line text fields a multi
-line text field is specified using a <textarea> element, rather than using the <input> element.
... controlling multi
-line rendering <textarea> accepts three attributes to control its rendering across several lines: cols specifies the visible width (columns) of the text control, measured in average character widths.
CSS basics - Learn web development
let's go through these line-by
-line: width: 600px; this forces the body to always be 600 pixels wide.
...a larger value produces a more fuzzy
-looking shadow.
...so to apply margins to the image, we must give the image block
-level behavior using display: block;.
The web and web standards - Learn web development
in 1980, tim berners
-lee (often referred to as timbl) wrote a notebook program called enquire, which featured the concept of links between different nodes.
...simple html looks like this: <h1>this is a top
-level heading</h1> <p>this is a paragraph of text.</p> <img src="cat.jpg" alt="a picture of my cat"> if we adopted a house-building analogy, html would be like the foundations and walls of the house, which give it structure and hold it together.
...there are technical considerations here (such as altering your layout so that it still works ok for right-to
-left, or even vertical languages), and human ones (such as using simple, non-slang language so that people who have your language as their second or third language are more likely to understand your text).
Introduction to web APIs - Learn web development
in the same way, if you want to say, program some 3d graphics, it is a lot easier to do it using an api written in a higher
-level language such as javascript or python, rather than try to directly write low level code (say c or c++) that directly controls the computer's gpu or other graphics functions.
...in the background, the browser is actually using some complex lower
-level code (e.g.
...let's recap this to make it clearer, and also mention where other javascript tools fit in: javascript — a high
-level scripting language built into browsers that allows you to implement functionality on web pages/apps.
Framework main features - Learn web development
jsx jsx, which stands for javascript and xml, is an extension of javascript that brings html
-like syntax to a javascript environment.
...testing tools are not built into the frameworks themselves, but the command
-line interface tools used to generate framework apps give you access to the appropriate testing tools.
... here’s a quick test for our counterbutton written with the help of react testing library — it tests a number of things, such as the button's existance, and whether the button is displaying the correct text after being clicked 0, 1, and 2 times: import react from "react"; import { render, fireevent } from "@testing
-library/react"; import "@testing
-library/jest-dom/extend-expect"; import counterbutton from "./counterbutton"; it("renders a semantic with an initial state of 0", () => { const { getbyrole } = render(<counterbutton />); const btn = getbyrole("button"); expect(btn).tobeinthedocument(); expect(btn).tohavetextcontent("clicked 0 times"); }); it("increments the count when clicked", () => { ...
Working with Svelte stores - Learn web development
script> import { alert } from '../stores.js' import { ondestroy } from 'svelte' let alertcontent = '' const unsubscribe = alert.subscribe(value => alertcontent = value) ondestroy(unsubscribe) </script> {#if alertcontent} <div on:click={() => alertcontent = ''}> <p>{ alertcontent }</p> </div> {/if} <style> div { position: fixed; cursor: pointer; margin-right: 1.5rem; margin
-left: 1.5rem; margin-top: 1rem; right: 0; display: flex; align-items: center; border-radius: 0.2rem; background-color: #565656; color: #fff; font-size: 0.875rem; font-weight: 700; padding: 0.5rem 1.4rem; font-size: 1.5rem; z-index: 100; opacity: 95%; } div p { color: #fff; } div svg { height: 1.6rem; fill: currentcolor; width: 1.4rem; margin-right: 0.5rem; } </st...
...remember that we can access top
-level variables from the markup, and whenever they are modified the dom will update accordingly.
... 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.
Vue conditional rendering: editing existing todos - Learn web development
copy the following code into that file: <template> <form class="stack-small" @submit.prevent="onsubmit"> <div> <label class="edit
-label">edit name for "{{label}}"</label> <input :id="id" type="text" autocomplete="off" v-model.lazy.trim="newlabel" /> </div> <div class="btn-group"> <button type="button" class="btn" @click="oncancel"> cancel <span class="visually-hidden">editing {{label}}</span> </button> <button type="submit" class="btn btn__primary"> save ...
... required: true }, id: { type: string, required: true } }, data() { return { newlabel: this.label }; }, methods: { onsubmit() { if (this.newlabel && this.newlabel !== this.label) { this.$emit("item-edited", this.newlabel); } }, oncancel() { this.$emit("edit-cancelled"); } } }; </script> <style scoped> .edit
-label { font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #0b0c0c; display: block; margin-bottom: 5px; } input { display: inline-block; margin-top: 0.4rem; width: 100%; min-height: 4.4rem; padding: 0.4rem 0.8rem; border: 2px solid #565656; } form { display: flex; flex-direction: row; flex-wrap: wrap; } form ...
... <template> <div class="stack-small"> <div class="custom-checkbox"> <input type="checkbox" class="checkbox" :id="id" :checked="isdone" @change="$emit('checkbox-changed')" /> <label :for="id" class="checkbox
-label">{{label}}</label> </div> <div class="btn-group"> <button type="button" class="btn" @click="toggletoitemeditform"> edit <span class="visually-hidden">{{label}}</span> </button> <button type="button" class="btn btn__danger" @click="deletetodo"> delete <span class="visually-hidden">{{label}}</span> </button> </div> </div> </template> we’...
Handling common JavaScript problems - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages; an idea of the high
-level principles of cross browser testing.
... incorrectly using functions inside loops — for example, in bad-for
-loop.html (see source code), we loop through 10 iterations, each time creating a paragraph and adding an onclick event handler to it.
...see good-for
-loop.html (see the source code also) for a version that works.
Accessibility API cross-reference
in tagged pdf n/a n/a expressed with aria
-labelledby if visible on screen or aria
-label otherwise <caption> (for tables), <figcaption> (for figures), and <label> with a for attribute (for input elements) a <toc> or <l> may contain a <caption> as its first item <caption> or <lbl> a cell in a table cell n/a table_cell cell <td> td not what you think - this is for the damn papercl...
...in aria, the heading level is expressed with the aria
-level attribute.
... n/a accessible_active_descendant_property aria-activedescendant critical info to convey immediately alert_high n/a n/a aria
-live=assertive info that's important, but does not require immediacy alert_medium n/a n/a aria
-live=polite low-priority info such as a tip or hint alert_low n/a n/a n/a this object is changing or moving rapidly animated n/a n/a n/a indicates that the user input is curr...
Mozilla’s UAAG evaluation report
(p1) g provides sequential access to links and input form controls cannot navigate to non
-links and non-input form controls with event handlers cannot configure mozilla to only allow focus changes on explicit user request 9.4 restore history.
...(p2) g provides sequential access to links and input form controls cannot navigate to non
-links and non-input form controls with event handlers no directional navigation, or navigation to links by name 9.8 text search.
...(p2) g use system colors by default (classic theme) underlines links by default does not have ui to highlight non
-link and non-form elements that have event handlers can have user css for user styling of elements with event handlers 10.5 outline view.
Creating a Language Pack
pre-build steps in the .mozconfig, you want to have mk_add_options moz_objdir=@topsrcdir@/obj-firefox-build ac_add_options --disable-compile-environment ac_add_options --with
-l10n-base=../l10n-central # path relative to moz_objdir ac_add_options --enable-application=[browser or mail] the given path should have your localization directory as child (i.e., a subdirectory ab-cd where ab-cd is your locale code).
...issue the following command: $ make merge-x-testing locale_mergedir=$(pwd)/mergedir rm -f -rf mergedir macosx_deployment_target= compare
-locales -m mergedir /users/your_id/mozilla/vc/mozilla-aurora/browser/locales/l10n.ini /users/your_id/mozilla/vc/l10n-central x-testing x-testing: browser chrome browser aboutcerterror.dtd // add and localize this file ...
... $ cd ../../dist/ $ ls
-l total 100216 drwxr-xr-x 5 your_id your_status 170 27 lis 13:33 branding -rw-r--r--@ 1 your_id your_status 25248119 26 lis 14:34 firefox-3.6b5pre.en-us.mac.dmg -rw-r--r--@ 1 your_id your_status 26056973 27 lis 13:40 firefox-3.6b5pre.x-testing.mac.dmg drwxr-xr-x 3 your_id your_status 102 27 lis 13:38 install drwxr-xr-x 3 your_id your_status 102 27 lis 13:40 l10n-stage dr...
ESLint
setting up eslint ./mach eslint --setup running eslint eslint can be run via: ./mach lint
-l eslint you can limit running it to a specific directory with: ./mach lint
-l eslint browser/components or work directory changes: ./mach lint
-l eslint -w or outgoing commits only: ./mach lint
-l eslint -o see ./mach eslint --help for more options when running eslint.
... prior to firefox 55 the location for the eslint binary used to be tools/lint/eslint/node_modules/.bin, since bug 1305023, node_modules is now located in the top
-level directory, and should need no special set-up.
... do something like: // eslint-disable-next
-line no-undef it.does.not.exist(); need more help?
mach
mach (german for to make) is a program via the "command
-line interface" to help developers perform installation tasks such as installing firefox from its c++ source code.
... if it works, you can look at compiler warnings: $ ./mach warnings
-list try running the program: $ ./mach run try running your program in a debugger: $ ./mach run --debug try running some tests: $ ./mach xpcshell-test services/common/tests/unit/ or run an individual test: $ ./mach mochitest browser/base/content/test/general/browser_pinnedtabs.js you run mach from the source directory, so you should be able to use your shell's tab completion to tab-comple...
... mach will colorize terminal output (on terminals that support it - typically most terminals except on windows) mach will scan build output for compiler warnings and will automatically record them to a database which can be queried with mach warnings
-list and mach warnings-summary.
Experimental features in Firefox
nightly 43 yes developer edition 43 no beta 43 no release 43 no preference name layout.css.control-characters.enabled or layout.css.control-characters.visible property: initial
-letter the initial
-letter css property is part of the css inline layout specification and allows you to specify how dropped, raised, and sunken initial letters are displayed.
... nightly 50 no developer edition 50 no beta 50 no release 50 no preference name layout.css.initial
-letter.enabled conic gradients conic gradients expand css gradients to allow the color transitions to be rendered circling around a center point rather than radiating from it.
... webgpu api this new api provides low
-level support for performing computation and graphics rendering using the graphics processing unit (gpu) of the user's device or computer.
PBackground
the root of the tree is known as the top
-level actor, an instance of one of a small number of top
-level protocols.
...the top
-level actor for most things is pcontent, which connects the main thread of the chrome process to the main thread of a child process.
...instead we can go directly to the compositor thread in the parent process by creating a new top
-level protocol that connects the compositor thread in the parent process to the main thread of a child process.
IPDL Tutorial
a protocol hierarchy begins with a single top
-level protocol from which all subprotocol actors are eventually created.
... in mozilla there are two main top
-level protocols: ppluginmodule for remote plugins, and pcontent for remote tabs.
... accessing the protocol tree from c++ the ipdl compiler generates methods that allow actors to access their manager (if the actor isn't top
-level) and their managees (if any) from c++.
Localizing XLIFF files for iOS
enter the command git clone https://github.com/mozilla
-l10n/firefoxios
-l10n/your
-locale-code/ you should now see the firefox-ios project in your selected directoy with the firefox-ios.xliff file in it.
... in the <file> tag, add the target
-language attribute with your locale code as the value (e.g., target
-language="xx-xx").
...each <file> tag requires the target
-language attribute with your locale code as the value (e.g., target
-language="xx-xx").
Localizing with Koala
in a real
-life situation, that would become for example "de" (for german) or "es-es" (for spanish in spain).
...koala features a very handy tool called compare
-locales, which compares the files from en-us with your files in x-testing and gives you statistics about new, changed, missing and obsolete files and strings.
... re-running the comparison a common scheme of working with the compare
-locales tools (included in koala) is to incrementally translate and commit the files and then re-run comparison to see what is left to be translated.
Localizing with Mozilla Translator
besides that, you will need to create one tiny product for other
-licenses/branding/firefox.
... ; assuming we are in a directory containing mozilla-central/ $ mkdir locale-only $ cd locale-only $ mkdir -p browser extensions/reporter other
-licenses/branding/firefox/ $ cd browser; ln -s ../../mozilla-central/browser/locales/; cd ..
... $ cd other
-licenses/branding/firefox/; ln -s ../../../../mozilla-central/other
-licenses/branding/firefox/locales/; cd ../../..
Initial setup
if a community doesn't exist, send an email to the new
-locales newsgroup for additional guidance.
... compare
-locales compare
-locales is a python script that helps you check your work without needing to run firefox or another application.
... wget wget is a command
-line utility that allows you to retrieve files using internet protocols.
Mozilla Web Developer FAQ
a block is centered by setting its margin
-left and margin-right to auto and its width to a value that makes the block narrower than its containing block.
... in the standards mode mozilla does not generate implicit top
-level javascript variable bindings for elements with the id or name attribute.
...the past practice of displaying non
-latin text by assigning non
-latin glyphs to latin code points breaks copying and pasting, breaks searching on the page, breaks indexing by search engines and breaks readability in browsers that do not support downloadable fonts (e.g.
Activity Monitor, Battery Status Menu and top
task_power_info::task_platform_idle_wakeups obtained from the task_info function.) in mac os 10.10 it appears to have been changed to measure interrupt
-level wakeups (a superset of idle wakeups), which are less interesting.
... ioreg
-l | grep board-id in contrast, on mac os 10.9 it is computed via a simpler machine model-independent formula that only factors in cpu usage and wakeup frequency.
... top top is similar to activity monitor, but is a command
-line utility.
Leak-hunting strategies and tips
(by most of the leaks, i mean the leaks of large numbers of different types of objects or leaks of objects that are known to entrain many non
-logged objects such as js objects.
...ments, and docshells only all platforms any build gc and cc logs js objects, dom objects, many other kinds of objects all platforms any build leak tools for medium-size object graphs bloatview, refcount tracing and balancing objects that implement nsisupports or use moz_count_{ctor,dtor} all tier 1 platforms debug build (or build opt with --enable
-logrefcnt) leaksoup (part of tracemalloc) all objects?
... tips disabling arena allocation with many lower
-level leak tools (particularly trace-malloc based ones, like leaksoup) it can be helpful to disable arena allocation of objects that you're interested in, when possible, so that each object is allocated with a separate call to malloc.
Memory reporting
making measurements nsimemoryreporter provides the high
-level interface for a memory reporter, but the heart of a memory reporter is the measurement of the "amount".
...avoiding double measurement is easy in tree
-like structures.
... in graph
-like structures (where an object might be pointed to by more than one other object) it gets more difficult, and might even require some way to mark objects that have been counted (and then a way to unmark them once the measurement is complete).
NSS_3.12_release_notes.html
rmation new in nss 3.12 bugs fixed documentation compatibility feedback introduction network security services (nss) 3.12 is a minor release with the following new features: sqlite-based shareable certificate and key databases libpkix: an rfc 3280 compliant certificate path validation library camellia cipher support tls session ticket extension (rfc 5077) nss 3.12 is tri
-licensed under the mpl 1.1/gpl 2.0/lgpl 2.1.
...bug 403680: cert_pkixverifycert fails if crls are missing, implement cert_pi_revocationflags bug 427706: nss_3_12_rc1 crashes in passwordmgr tests bug 426245: assertion failure went undetected by tinderbox bug 158242: pk11_putcrl is very memory inefficient bug 287563: please make cert_comparenamewithconstraints a non-static function bug 301496: nss_shutdown failure in p7sign bug 324878: crlutil
-l outputs false crl names bug 337010: oom crash [[@ nsc_digestkey] dereferencing possibly null att bug 343231: certutil issues certs for invalid requests bug 353371: klocwork 91117 - null pointer dereference in cert_certchainfromcert bug 353374: klocwork 76494 - null ptr derefs in cert_formatname bug 353375: klocwork 76513 - null ptr deref in nsscertificatelist_docallback bug 353413: klocwork 76541...
...ecitem_allocitem loser bug 288730: compiler warnings in certutil bug 337251: warning: /* within comment bug 362967: export secmod_deletemoduleex bug 389248: nss build failure when nss_enable_ecc is not defined bug 390451: remembered passwords lost when changing master password bug 418546: reference leak in cert_pkixverifycert bug 390074: os/2 sign.cmd doesn't find sqlite3.dll bug 417392: certutil
-l -n reports bogus trust flags documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation.
NSS Config Options
flags: turn on the following flags: ssl
-lock: turn off the ability for applications to change policy with the ssl_setcipherpolicy (or ssl_setpolicy).
... policy
-lock: turn off the ability for applications to change policy with the call nss_setalgorithmpolicy.
... ssl-default
-lock: turn off the ability for applications to change cipher suite states with ssl_enablecipher, ssl_disablecipher.
NSS Tools pk12util
synopsis pk12util -i p12file [-h tokenname] [-v] [common-options] or pk12util -o p12file -n certname [-c keycipher] [-c certcipher] [-m | --key_len keylen] [-n | --cert_key_len certkeylen] [common-options] or pk12util
-l p12file [-h tokenname] [-r] [common-options] where [common-options] = [-d dir] [-p dbprefix] [-k slotpasswordfile | -k slotpassword] [-w p12filepasswordfile | -w p12filepassword] syntax to run the pkcs #12 tool, type ther command pk12util option [arguments] where option and arguments are combinations of the options and arguments listed in the following section.
... three of the options, -i, -o, and
-l, should be considered commands of the pk12util invocation.
...
-l p12file list certificate and private key from from the p12file file.
Pork Tool Development
then any post
-location variables refer to "foo" and pre
-location variables refer to "my_foo".
...cppsourceloc will change the previously provided location information (in variable cpp_source_loc._loc) from post
-location to pre
-location.
... all values from the ast refer to the post
-location.
Rhino serialization
simple serialization example the rhino shell has two new top
-level functions, serialize and deserialize.
...writing an object to a file can be done in a few lines of java code: fileoutputstream fos = new fileoutputstream(filename); scriptableoutputstream out = new scriptableoutputstream(fos, scope); out.writeobject(obj); out.close(); here filename is the file to write to, obj is the object or function to write, and scope is the top
-level scope containing obj.
...default serialization would serialize the object or function we desired but would also serialize object.prototype or even possibly the entire top
-level scope and everything it refers to!
Getting SpiderMonkey source code
downloading gzipped spidermonkey source code you can download gzipped spidermonkey source code from the following urls: http://ftp.mozilla.org/pub/spidermonkey/releases/ http://ftp.mozilla.org/pub/spidermonkey/prereleases/ here is a command
-line example of downloading and unzipping spidermonkey source code version 59.0: mkdir mozilla cd mozilla wget http://ftp.mozilla.org/pub/spidermonkey/prereleases/59/pre1/mozjs-59.0a1.0.tar.bz2 tar xvf mozjs-59.0a1.0.tar.bz2 these commands should work on most platforms including windows, as long as on windows you are using the mozillabuild bash shell.
... once you've logged in, cd into the root of your cvs tree and enter the following command: cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co
-l mozilla/js/src mozilla/js/src/config mozilla/js/src/editline mozilla/js/src/fdlibm this checks out all the files needed in order to build the javascript shell.
...o want the regression tests, add this command: cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/js/tests getting older branch versions of spidermonkey if you want to experiment with a specific branch's version of spidermonkey, you need to check out js/src from branch but check out editline and config from trunk: cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co
-l -r branch_name mozilla/js/src mozilla/js/src/fdlibm cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co
-l mozilla/js/src/config mozilla/js/src/editline change branch_name to the name of the branch you want to check out.
SpiderMonkey Internals
the compiler consists of: a random
-logic rather than table-driven lexical scanner, a recursive-descent parser that produces an ast, and a tree-walking code generator.
...the line-to-pc direction "rounds" toward the next bytecode generated from a line greater than or equal to the input line, and may return the pc of a for
-loop update part, if given the line number of the loop body's closing brace.
... jsclist.h doubly
-linked circular list struct and macros.
Shell global objects
these are the global objects that are set up automatically by the spidermonkey js command
-line interpreter when you start the program.
... getmoduleloadpath() return any --module
-load-path argument passed to the shell.
...all disassembly functions take these options as leading string arguments: -r disassemble recursively
-l show line numbers -s omit source notes dis([fun/code]) disassemble functions into bytecodes.
Building the WebLock UI
statusbarpanel#weblock-status { list-style-image: url("chrome://weblock/wlock.gif"); } statusbarpanel#weblock-status[status="locked"] { list-style-image: url("chrome://weblock/wl
-lock.gif"); } statusbarpanel#weblock-status[status="unlocked"] { list-style-image: url("chrome://weblock/wl-un.gif"); } the style rules are distinguished by the state of the status attribute on the element in the xul with the id "weblock-status." as you can see above, when the status of the element is set to "locked", the image wl
-lock.gif is used to show the state, and when the web locking is...
...(note: we include three images to represent the state of the weblock, but wlock.gif and wl
-lock.gif are identical, since weblock is presumed to be unlocked when it's loaded.
...the gif files that represent the various states are: wlock.gif wl
-lock.gif wl-un.gif note: other-mozlike-browsers or one very much like it.
Component Internals
as this section and the next describe, you can register your component explicitly during installation, or with the regxpcom program, or you can use the autoregistration methods in the service manager to find and register components in a specified components directory: xpinstall apis regxpcom command
-line tool nsicomponentregistrar apis from service manager the registration process is fairly involved.
...an application, for example, could provide a "registration
-less" component directory whose components are automatically registered at startup and unregistered at shutdown.
...in order to support something like an "are you sure you want to quit" dialog, the application needs to provide a higher
-level event (e.g., startshutdown()) which allows for cancellation.
Setting up the Gecko SDK
then, from the new dialog, select "win32 dynamic
-link library".
...in the win32 dynamic
-link library dialog that displays (see below), you can choose the default selection "an empty dll project" as the type of dll.
...cko_sdk_path) \ -i$(gecko_sdk_path)/idl \ -i$(gecko_sdk_path)/include \ -i$(gecko_sdk_path)/xpcom/include \ -i$(gecko_sdk_path)/nspr/include \ -i$(gecko_sdk_path)/string/include \ -i$(gecko_sdk_path)/embedstring/include gecko_ldflags =
-l$(gecko_sdk_path)/bin \
-l$(gecko_sdk_path)/lib \
-lxpcomglue_s \
-lnspr4 \
-lplds4 \
-lxul \ -shared \ $(null) %.h: %.idl $(xpidl) -m header $(gecko_includes) $< %.xpt: %.idl $(xpidl) -m typelib $(gecko_includes) $< %.o: %.cpp makefile $(cxx) -c $(cppflags) $(cxxflags) $(gecko_config_include) $(gecko_defines) $(gecko_includes) $< $(module).
Mozilla internal string guide
bulk write bulkwrite() allows capacity-aware cache-friendly low
-level writes to the string's buffer.
... cache-friendly means that the zero terminator for c compatibility is written after the new content of the string has been written, so the result is a forward-only linear write access pattern instead of a non
-linear back-and-forth sequence resulting from using setlength() followed by beginwriting().
... low
-level means that writing via a raw pointer is possible as with beginwriting().
mozIJSSubScriptLoader
66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 28 (firefox 28 / thunderbird 28 / seamonkey 2.25 / firefox os 1.3) implemented by: @mozilla.org/moz/jssubscript
-loader;1.
... to get this service, use: var mozijssubscriptloader = components.classes["@mozilla.org/moz/jssubscript
-loader;1"] .getservice(components.interfaces.mozijssubscriptloader); note: see components.utils.import for another way to import javascript code.
... any top
-level functions or variables created by the loaded script via var are created as properties of the targetobj target object (but things declared via let and const are not).
nsICommandLineHandler
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) each command line handler is registered in the category "command
-line-handler".
...example: category entry value command
-line-handler b-jsdebug @mozilla.org/venkman/clh;1 command
-line-handler c-extensions @mozilla.org/extension-manager/clh;1 command
-line-handler m-edit @mozilla.org/composer/clh;1 command
-line-handler m-irc @mozilla.org/chatzilla/clh;1 command
-line-handler y-final @mozilla.org/browser/clh-final;1 method overview void handle(in nsicommandline acommandlin...
...if this handler finds arguments that it understands, it should perform the appropriate actions (such as opening a window), and remove the arguments from the command
-line array.
nsIDOMWindowUtils
void garbagecollect( in nsicyclecollectorlistener alistener optional ); parameters alistener optional listener that receives information about the cc graph (see @mozilla.org/cycle-collector
-logger;1 for a logger component) getcursortype() get current cursor type from this window.
... the event is dispatched via the top
-level window, so it could go to any window under that top level.
... <x, y> is relative to the top
-left of the css viewport.
nsIHTMLEditor
void getalignment( out boolean amixed, out short aalign ); parameters amixed true if there is more than one type of list item, or if there is some list and non
-list.
... void getlistitemstate( out boolean amixed, out boolean ali, out boolean adt, out boolean add ); parameters amixed true if there is more than one type of list item, or if there is some list and non
-list.
... void getliststate( out boolean amixed, out boolean aol, out boolean aul, out boolean adl ); parameters amixed true if there is more than one type of list, or if there is some list and non
-list.
nsIMIMEInputStream
it also allows automatic creation of the content
-length header.
...nputstream = components.classes["@mozilla.org/network/mime-input-stream;1"] .createinstance(components.interfaces.nsimimeinputstream); method overview void addheader(in string name, in string value); void setdata(in nsiinputstream stream); attributes attribute type description addcontentlength boolean when true a "content
-length" header is automatically added to the stream.
... the value of the content
-length is automatically calculated using the available() method on the data stream.
nsIWindowsRegKey
(the binary data will be treated as an iso
-latin-1 character string, which it is not).
...javascript callers should take care with the value passed to this method since it will be truncated from a js string (unicode) to a iso
-latin-1 string.
... (the binary data will be treated as an iso
-latin-1 character string, which it is not).
Mozilla
a bird's-eye view of the mozilla framework the purpose of this article is to provide a high
-level technical overview of the architecture of the extensible, object-based mozilla application framework.
...hence there is a need to customize the set of default web services on a per
-locale basis in order to ensure a good user experience across all locales.
...it prevents segmentation faults and guarantees thread safety, all with an easy-to
-learn syntax.
Deprecated tools - Firefox Developer Tools
alternatives in firefox 71+, you can write multi
-line javascript code in the web console editor mode, making it similar to the scratchpad.
...more details on the mailing
-list thread.
...this gave a high
-level view of its operation, and enabled you to ensure that all the nodes are connected in the way you expect.
Network request details - Firefox Developer Tools
name": "backend-timing", "value": "d=74716 t=1560258099074460" }, { "name": "cache-control", "value": "private, must-revalidate, max-age=0" }, { "name": "content-disposition", "value": "inline; filename=api-result.js" }, { "name": "content-encoding", "value": "gzip" }, { "name": "content
-length", "value": "673" }, { "name": "content-type", "value": "text/javascript; charset=utf-8" }, { "name": "date", "value": "tue, 11 jun 2019 13:01:39 gmt" }, { "name": "mediawiki
-login-suppressed", "value": "true" }, { "name": "p3p", "value": "cp=\"this is not a p3p policy!
...lue": "max-age=106384710; includesubdomains; preload" }, { "name": "vary", "value": "accept-encoding,treat-as-untrusted,x-forwarded-proto,cookie,authorization,x-seven" }, { "name": "via", "value": "1.1 varnish (varnish/5.1), 1.1 varnish (varnish/5.1)" }, { "name": "x-analytics", "value": "ns=-1;special=badtitle;wmf
-last-access=11-jun-2019;wmf
-last-access-global=11-jun-2019;https=1" }, { "name": "x-cache", "value": "cp1075 pass, cp1075 pass" }, { "name": "x-cache-status", "value": "pass" }, { "name": "x-client-ip", "value": "204.210.158.136" }, { "name": "x-content-type-options", "value": "nosniff" ...
... "x-search-id", "value": "esvan0r5bnnwscyk2wq09i1im" }, { "name": "x-varnish", "value": "766019457, 417549316" } ] }, "request headers (665 b)": { "headers": [ { "name": "accept", "value": "*/*" }, { "name": "accept-encoding", "value": "gzip, deflate, br" }, { "name": "accept
-language", "value": "en-us,en;q=0.5" }, { "name": "connection", "value": "keep-alive" }, { "name": "cookie", "value": "wmf
-last-access=11-jun-2019; wmf
-last-access-global=11-jun-2019; mwphp7seed=5c9; geoip=us:ny:port_jervis:41.38:-74.67:v4" }, { "name": "dnt", "value": "1" }, { "name": "h...
Paint Flashing Tool - Firefox Developer Tools
the first way applies the transition to the element's margin
-left, while the second way moves the element using the transform property.
... <body> <div id="container"> <div class="moving-box" id="moving-box
-left-margin">transition using margin
-left</div> <div class="moving-box" id="moving-box-transform">transition using transform</div> </div> </body> #container { border: 1px solid; } .moving-box { height: 20%; width:20%; margin: 2%; padding: 2%; background-color: blue; color: white; font-size: 24px; } #moving-box
-left-margin { transition: margin
-left 4s; } #moving-box-transform { transition: transform 4s; } body:hover #moving-box
-left-margin{ margin
-left: 74%; } body:hover #moving-box-transform { transform: translate(300%); } to see the transition, move the mouse into the space below: now switch paint flashing on, and try it again.
... you should see that the margin
-left version triggers a series of repaints as the element moves, while the transform version only causes repaints in the start and end positions.
CanvasRenderingContext2D.getImageData() - Web APIs
syntax ctx.getimagedata(sx, sy, sw, sh); parameters sx the x-axis coordinate of the top
-left corner of the rectangle from which the imagedata will be extracted.
... sy the y-axis coordinate of the top
-left corner of the rectangle from which the imagedata will be extracted.
...the coordinates of the rectangle's top
-left corner are (sx, sy), while the coordinates of the bottom corner are (sx + sw, sy + sh).
CanvasRenderingContext2D.textAlign - Web APIs
"start" the text is aligned at the normal start of the line (left-aligned for left-to-right locales, right-aligned for right-to
-left locales).
... "end" the text is aligned at the normal end of the line (right-aligned for left-to-right locales, left-aligned for right-to
-left locales).
...note that the direction property is manually specified as "ltr", although this is also the default for english
-language text.
Compositing example - Web APIs
var canvas1 = document.createelement("canvas"); var canvas2 = document.createelement("canvas"); var gco = [ 'source-over','source-in','source-out','source-atop', 'destination-over','destination-in','destination-out','destination-atop', 'lighter', 'copy','xor', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard
-light', 'soft
-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity' ].reverse(); var gcotext = [ 'this is the default setting and draws new shapes on top of the existing canvas content.', 'the new shape is drawn only where both the new shape and the destination canvas overlap.
... become darker, and light parts become lighter.', 'retains the darkest pixels of both layers.', 'retains the lightest pixels of both layers.', 'divides the bottom layer by the inverted top layer.', 'divides the inverted bottom layer by the top layer, and then inverts the result.', 'a combination of multiply and screen like overlay, but with top and bottom layer swapped.', 'a softer version of hard
-light.
... r = v; g = a; b = b; break; } } return { r: r, g: g, b: b }; }; var createinterlace = function (size, color1, color2) { var proto = document.createelement("canvas").getcontext("2d"); proto.canvas.width = size * 2; proto.canvas.height = size * 2; proto.fillstyle = color1; // top
-left proto.fillrect(0, 0, size, size); proto.fillstyle = color2; // top-right proto.fillrect(size, 0, size, size); proto.fillstyle = color2; // bottom
-left proto.fillrect(0, size, size, size); proto.fillstyle = color1; // bottom-right proto.fillrect(size, size, size, size); var pattern = proto.createpattern(proto.canvas, "repeat"); pattern.data = proto.canvas.tod...
Using images - Web APIs
it's beyond the scope of this tutorial to look at image pre
-loading tactics, but you should keep that in mind.
...the drawimage() method places the backdrop at the coordinate (0, 0), which is the top
-left corner of the canvas.
... drawimage(image, sx, sy, swidth, sheight, dx, dy, dwidth, dheight) given an image, this function takes the area of the source image specified by the rectangle whose top
-left corner is (sx, sy) and whose width and height are swidth and sheight and draws it into the canvas, placing it on the canvas at (dx, dy) and scaling it to the size specified by dwidth and dheight.
Document: DOMContentLoaded event - Web APIs
bubbles yes cancelable yes (although specified as a simple event that isn't cancelable) interface event event handler property none a different event, load, should be used only to detect a fully
-loaded page.
... function dosomething() { console.info('dom loaded'); } if (document.readystate === 'loading') { // loading hasn't finished yet document.addeventlistener('domcontentloaded', dosomething); } else { // `domcontentloaded` has already fired dosomething(); } live example html <div class="controls"> <button id="reload" type="button">reload</button> </div> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents" rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event
-log { grid-area: log; } .event
-log-contents { resize: none; } label, button { display: bl...
...ock; } #reload { height: 2rem; } js const log = document.queryselector('.event
-log-contents'); const reload = document.queryselector('#reload'); reload.addeventlistener('click', () => { log.textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment html living standardthe definition of 'domcontentload...
Document.requestStorageAccess() - Web APIs
the maximum number of concurrent storage access grants an origin can obtain is a positive integer currently defined as one percent of the number of top
-level origins visited in the current session or 5, whichever is higher.
... the origin is given an ephemeral storage access grant for the current top
-level origin.
... if the user allows storage the requesting origin is given a persistent storage access grant on the current top
-level origin.
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
when you’re only dealing with block
-level elements such as <p> that only contain inline elements such as <em>, <strong>, <span>, etc., you don’t normally care about this because the extra whitespace that does make it to the layout is helpful to separate the words in the sentence.
... consider this example (again, the whitespace characters in the html are marked so they are visible): .people
-list { list-style-type: none; margin: 0; padding: 0; } .people
-list li { display: inline-block; width: 2em; height: 2em; background: #f06; border: 1px solid; } <ul class="people
-list">⏎ ◦◦<li></li>⏎ ◦◦<li></li>⏎ ◦◦<li></li>⏎ ◦◦<li></li>⏎ ◦◦<li></li>⏎ </ul> this renders as follows: hidden example 3 .people
-list { list-style-type: none; mar...
...gin: 0; padding: 0; } .people
-list li { display: inline-block; width: 2em; height: 2em; background: #f06; border: 1px solid; } <ul class="people
-list"> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> you probably don't want the gaps in between the blocks — depending on the use case (is this a list of avatars, or horizontal nav buttons?), you probably want the element sides flush with each other, and to be able to control any spacing yourself.
Element.getBoundingClientRect() - Web APIs
properties other than width and height are relative to the top
-left of the viewport.
...if all the element's border-boxes are empty, then a rectangle is returned with a width and height of zero and where the top and left are the top
-left of the border-box for the first css box (in content order) for the element.
... if you need the bounding rectangle relative to the top
-left corner of the document, just add the current scrolling position to the top and left properties (these can be obtained using window.scrollx and window.scrolly) to get a bounding rectangle which is independent from the current scrolling position.
Fullscreen API - Web APIs
the full-screen mode feature is identified by the string "fullscreen", with a default allow
-list value of "self", meaning that full-screen mode is permitted in top
-level document contexts, as well as to nested browsing contexts loaded from the same origin as the top-most document.
...in firefox 44 and onwards this has been fixed: only elements in the top
-level document or in an <iframe> element with the allowfullscreen attribute can be displayed fullscreen.alternate name uses the non-standard name: mozrequestfullscreenie full support 11prefixed full support 11prefixed prefixed implemented with the vendor prefix: msopera full support ...
...in firefox 44 and onwards this has been fixed: only elements in the top
-level document or in an <iframe> with the allowfullscreen attribute can be displayed fullscreen.alternate name uses the non-standard name: mozrequestfullscreenopera android full support 50 full support 50 full support 14prefixed prefixed implemented with the vendor ...
HTMLImageElement.loading - Web APIs
that means that when load fires, it's possible that any lazy
-loaded images located in the visual viewport may not yet be visible.
... example the addimagetolist() function shown below adds a photo thumbnail to a list of items, using lazy
-loading to avoid loading the image from the network until it's actually needed.
... function addimagetolist(url) { const list = document.queryselector("div.photo
-list"); let newitem = document.createelement("div"); newitem.classname = "photo-item"; let newimg = document.createelement("img"); newimg.loading = "lazy"; newimg.width = 320; newimg.height = 240; newimg.src = url; newitem.appendchild(newimg); list.appendchild(newitem); } specifications specification status comment html living standardthe definition of 'htmlimageelement.loading' in that specification.
IDBObjectStore.add() - Web APIs
dataerror any of the following conditions apply: the object store uses in
-line keys or has a key generator, and a key parameter was provided.
... the object store uses out-of
-line keys and has no key generator, and no key parameter was provided.
... the object store uses in
-line keys but no key generator, and the object store's key path does not yield a valid key.
IDBObjectStore.put() - Web APIs
dataerror any of the following conditions apply: the object store uses in
-line keys or has a key generator, and a key parameter was provided.
... the object store uses out-of
-line keys and has no key generator, and no key parameter was provided.
... the object store uses in
-line keys but no key generator, and the object store's key path does not yield a valid key.
Timing element visibility with the Intersection Observer API - Web APIs
none of them work in our example here, but they exist to help with the presentation of a blog
-like experience.
... the sidebar is represented using an <aside> element, and is styled as follows: aside { grid-column: 1; grid-row: 2; background-color: cornsilk; padding: 5px 10px; } aside ul { padding
-left: 0; } aside ul li { list-style: none; } aside ul li a { text-decoration: none; } the most important thing to note here is that the grid-column is set to 1, to place the sidebar on the left-hand side of the screen.
...the following style is applied to that: main { grid-column: 2; grid-row: 2; margin: 0; margin
-left: 16px; font-size: 16px; } the primary feature here is that the grid position is set to place the body content in column 2, row 2.
Transcoding assets for Media Source Extensions - Web APIs
[0] (c) copyright 2008, blender foundation / www.bigbuckbunny.org / https://peach.blender.org/about/ tools required when working with mse, the following tools are a must have: ffmpeg — a command
-line utility for transcoding your media into the required formats.
... bento4 — a set of command
-line utilities for getting asset metadata and creating content for dash.
...875.mp4 parsing media file 3: video_01250.mp4 parsing media file 4: video_01625.mp4 parsing media file 5: video_02000.mp4 splitting media file (audio) video_00500.mp4 splitting media file (video) video_00500.mp4 splitting media file (video) video_00875.mp4 splitting media file (video) video_01250.mp4 splitting media file (video) video_01625.mp4 splitting media file (video) video_02000.mp4 $ tree
-l 2 output output ├── audio │ └── und ├── stream.mpd └── video ├── 1 ├── 2 ├── 3 ├── 4 └── 5 8 directories, 1 file note: mp4-dash-encode.py does not display ffmpeg error messages.
msRealTime - Web APIs
msrealtime is a read/write property which specifies whether or not to enable low
-latency playback on the media element.
... syntax ptr = object.msrealtime; value boolean value set to true indicates that low
-latency playback will be enabled on the media element.
... low
-latency playback is useful in communication and some gaming scenarios, but is more demanding on power consumption and less reliable for smooth media playback.
Node.ownerDocument - Web APIs
the ownerdocument read-only property of the node interface returns the top
-level document object of the node.
... syntax var document = element.ownerdocument; value document is the top
-level document object in which all the child nodes are created.
... example // given a node "p", get the top
-level html // child of the document object var d = p.ownerdocument; var html = d.documentelement; specifications specification status comment domthe definition of 'node: ownerdocument' in that specification.
RTCIceCandidate.component - Web APIs
usage notes consider this sdp attribute line (a
-line): a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host this is an ice candidate a
-line, whose foundation is 4234997325.
... the next field on the a
-line, "1", is the component id.
...if this value were instead "2", the a
-line would be describing an rtcp candidate, and compoment would be "rtcp".
RTCIceCandidate.port - Web APIs
as is the case with most of rtcicecandidate's properties, the value of port is extracted from the candidate a
-line string specified when creating the rtcicecandidate.
... the a
-line string is obtained either from the rtcicecandidateinit property candidate or from a
-line string passed into the constructor upon using new rtcicecandidate().
... usage notes consider this sdp attribute line (a
-line) which describes an ice candidate: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the port number is found in the sixth field, which is "44323".
RTCIceCandidate.priority - Web APIs
as is the case with most of rtcicecandidate's properties, the value of priority is extracted from the candidate a
-line string specified when creating the rtcicecandidate.
... the a
-line string is obtained either from the rtcicecandidateinit property candidate or from an a
-line string passed into rtcpeerconnection.addicecandidate() instead of an rtcicecandidate.
... usage notes consider this sdp attribute line (a
-line) which describes an ice candidate: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the priority is the number after the protocol, so it's the fourth field in the candidate string.
RTCIceCandidate.relatedAddress - Web APIs
you can't specify the value of relatedaddress in the options object, but the address is automatically extracted from the candidate a
-line, if it's formatted properly, being taken from its rel-address field.
... for host candidates, relatedaddress is null, meaning the field is not included in the candidate's a
-line.
... here's an sdp attribute line (a
-line) describing an ice candidate discovered by the stun server: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 6502 typ srflx raddr 192.168.2.77 rport 32768 generation 0 the remote address, relatedaddress, is the dotted quad (for ipv4) or colon-delineated 64-bit address (for ipv6) immediately following the text "raddr", or "192.168.2.77".
RTCIceCandidate.relatedPort - Web APIs
you can't specify the value of relatedport in the options object, but the address is automatically extracted from the candidate a
-line, if it's formatted properly, being taken from its rel-port field.
... for host candidates, relatedport is null, meaning the field is not included in the candidate's a
-line.
... here's an sdp attribute line (a
-line) describing an ice candidate discovered by the stun server: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 6502 typ srflx raddr 192.168.2.77 rport 32768 generation 0 the remote port, relatedport, is the number immediately following the "rport" label on the a
-line, or 32768.
RTCIceCandidate.sdpMLineIndex - Web APIs
the read-only sdpmlineindex property on the rtcicecandidate interface is a zero-based index of the m
-line describing the media associated with the candidate.
... if you instead call rtcicecandidate() with a string parameter containing the candidate m
-line text, the value of sdpmlineindex is extracted from the m
-line.
... syntax var sdpmlineindex = rtcicecandidate.sdpmlineindex; value a number containing a 0-based index into the set of m
-lines providing media descriptions, indicating which media source is associated with the candidate, or null if no such association is available.
RTCPeerConnection.signalingState - Web APIs
for example, if you receive an answer while the signalingstate isn't "have
-local-offer", you know that something is wrong, since you should only receive answers after creating an offer but before an answer has been received and passed into rtcpeerconnection.setlocaldescription().
... "have
-local-offer" the local peer has called rtcpeerconnection.setlocaldescription(), passing in sdp representing an offer (usually created by calling rtcpeerconnection.createoffer()), and the offer has been applied successfully.
... "have
-local-pranswer" the offer sent by the remote peer has been applied and an answer has been created (usually by calling rtcpeerconnection.createanswer()) and applied by calling rtcpeerconnection.setlocaldescription().
Using Service Workers - Web APIs
in this version, we pass in a json fragment containing all the data for a single image (see what they look like in image
-list.js).
... let’s start this section by looking at a code sample — this is the first block you’ll find in our service worker: self.addeventlistener('install', (event) => { event.waituntil( caches.open('v1').then((cache) => { return cache.addall([ './sw-test/', './sw-test/index.html', './sw-test/style.css', './sw-test/app.js', './sw-test/image
-list.js', './sw-test/star-wars
-logo.jpg', './sw-test/gallery/', './sw-test/gallery/bountyhunters.jpg', './sw-test/gallery/mylittlevader.jpg', './sw-test/gallery/snowtroopers.jpg' ]); }) ); }); here we add an install event listener to the service worker (hence self), and then chain a extendableevent.waituntil() method onto the event — this ens...
...�ll want to update your install event listener in the new service worker to something like this (notice the new version number): self.addeventlistener('install', (event) => { event.waituntil( caches.open('v2').then((cache) => { return cache.addall([ './sw-test/', './sw-test/index.html', './sw-test/style.css', './sw-test/app.js', './sw-test/image
-list.js', … // include other new resources for the new version...
SubtleCrypto - Web APIs
the subtlecrypto interface of the web crypto api provides a number of low
-level cryptographic functions.
... warning: this api provides a number of low
-level cryptographic primitives.
... * digest(): create a fixed
-length, collision-resistant digest of some data.
URLSearchParams.set() - Web APIs
params.set('baz', 3); params.tostring(); // "foo=1&bar=2&baz=3" below is a real
-life example demonstrating how to create a url and set some search parameters.
... you can copy and paste the example in a code environment like codepen, jsfiddle, or the multi
-line javascript interpreter in firefox.
...l.searchparams.set( 'input', '\u2911\u20dc' )// ⤑⃜ theurl.searchparams.set( 'text', atext.join('\n') ) if( bdebug ){ // display the key/value pairs for(var pair of theurl.searchparams.entries()) { console.debug(pair[0] + ' = \'' + pair[1] + '\''); } console.debug(theurl) } return theurl } var url = genurl( /(^\s*\/\/|\s*[^:]\/\/).*\s*$|\s*\/\*(.|\n)+?\*\/\s*$/gm // single/multi
-line comments // /(^\s*\/\/.*|\s*[^:]\/\/.*)/g // single
-line comments ,[ "these should work:", "", "// eslint-disable-next
-line no-unused-vars", "lockpref( 'keyword.url',\t\t'https://duckduckgo.com/html/?q=!+' )\t// test", "/*", " * bla bla ", "*/", "", "/* bla bla */", "", "// bla bla ", "", "these shouldn\'t work:", "console.log(\"http://foo.co.uk/\")...
Web Audio API - Web APIs
using a system based on a source
-listener model, it allows control of the panning model and deals with distance-induced attenuation induced by a moving source (or moving listener).
... delaynode the delaynode interface represents a delay
-line; an audionode audio-processing module that causes a delay between the arrival of an input data and its propagation to the output.
... waveshapernode the waveshapernode interface represents a non
-linear distorter.
Window - Web APIs
window.mozinnerscreenx read only returns the horizontal (x) coordinate of the top
-left corner of the window's viewport, in screen coordinates.
... window.mozinnerscreeny read only returns the vertical (y) coordinate of the top
-left corner of the window's viewport, in screen coordinates.
... window.maximize() fixme: needscontents window.minimize() (top
-level xul windows only) minimizes the window.
Using the log role - Accessibility
to have announcements made as soon as possible and where the user may be interrupted, aria
-live="assertive" can be set for more aggressive updates.
... assistive technology products should listen for such an event and notify the user accordingly: screen readers should announce changes inside a log when the user is idle, unless aria
-live=”assertive” has been set and in which case the user may be interrupted.
... <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"> </ul> </div> working examples: http://websiteaccessibility.donaldevans.com/2011/07/12/aria
-log/ notes using the log role on an element implies that element has aria
-live="polite".
ARIA: rowgroup role - Accessibility
<div role="table" aria
-label="populations" aria-describedby="country_population_desc"> <div id="country_population_desc">world populations by country</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="descending">country</span> <span role="columnheader"aria-sort="none">population</span> </div> </div> <div role="rowgroup"> <div role="row"> <span role="cell">finland</span> <span role="cell">5.5 million</span> </div> <div role="row"> <span role="cell">france</span> <span...
... examples <div role="table" aria
-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-rowcount="81"> <div id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none">aria role</span> <span role="columnheader" aria-sort="none">semantic element</span> </div> </div> ...
... <table role="table" aria
-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-rowcount="81"> <caption id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</caption> <thead role="rowgroup"> <tr role="row"> <th role="columnheader" aria-sort="none">aria role</th> <th role="columnheader" aria-sort="none">semantic element</th> ...
ARIA: checkbox role - Accessibility
<span role="checkbox" aria-checked="false" tabindex="0" aria
-labelledby="chk1
-label"> </span> <label id="chk1
-label">remember my preferences</label> the first rule of aria is if a native html element or attribute has the semantics and behavior you require, use it instead of re-purposing an element and adding aria.
... instead use the native html checkbox of <input type="checkbox">, which natively provides all the functionality required: <input type="checkbox" id="chk1
-label"> <label for="chk1
-label">remember my preferences</label> description the native html checkbox form control can only have two checked states ("checked" or "not checked"), with an indeterminate state settable via javascript.
... html <span role="checkbox" id="chkpref" aria-checked="false" onclick="changecheckbox()" onkeypress="changecheckbox()" tabindex="0" aria
-labelledby="chk1
-label"></span> <label id="chk1
-label" onclick="changecheckbox()" onkeypress="changecheckbox()">remember my preferences</label> css [role="checkbox"] { padding:5px; } [aria-checked="true"]::before { content: "[x]"; } [aria-checked="false"]::before { content: "[ ]"; } javascript function changecheckbox(event) { let item = document.getelementbyid('chkpref'); ...
Basic form hints - Accessibility
wai-aria, the accessible rich internet applications specification from the w3c's web accessibility initiative, provides the aria
-labelledby attribute for these cases.
...note that on line 3, the <ul> element sets the aria
-labelledby attribute to rg1_label, the id of the <h3> element on line 1, which is the label for the radio group.
... <h3 id="rg1_label">lunch options</h3> <ul class="radiogroup" id="rg1" role="radiogroup" aria
-labelledby="rg1_label"> <li id="r1" tabindex="-1" role="radio" aria-checked="false"> <img role="presentation" src="radio-unchecked.gif" /> thai </li> <li id="r2" tabindex="-1" role="radio" aria-checked="false"> <img role="presentation" src="radio-unchecked.gif" /> subway </li> <li id="r3" tabindex="0" role="radio" aria-checked="true"> <img role="presentation" src="radio-checked.gif" /> radio maria </li> </ul> describing with aria form controls sometimes have a description associated with them, in addition to the label.
An overview of accessible web applications and widgets - Accessibility
--> <ol role="tablist"> <li id="ch1tab" role="tab"> <a href="#ch1panel">chapter 1</a> </li> <li id="ch2tab" role="tab"> <a href="#ch2panel">chapter 2</a> </li> <li id="quiztab" role="tab"> <a href="#quizpanel">quiz</a> </li> </ol> <div> <!-- notice the role and aria
-labelledby attributes we've added to describe these panels.
... --> <div id="ch1panel" role="tabpanel" aria
-labelledby="ch1tab">chapter 1 content goes here</div> <div id="ch2panel" role="tabpanel" aria
-labelledby="ch2tab">chapter 2 content goes here</div> <div id="quizpanel" role="tabpanel" aria
-labelledby="quiztab">quiz content goes here</div> </div> aria is well supported by all major browsers, including firefox, safari, opera, chrome, and internet explorer, and many assistive technologies.
...html for a tooltip <div class="text"> <label id="tp1
-label" for="first">first name:</label> <input type="text" id="first" name="first" size="20" aria
-labelledby="tp1
-label" aria-describedby="tp1" aria-required="false" /> <div id="tp1" class="tooltip" role="tooltip" aria-hidden="true">your first name is optional</div> </div> the css for this markup is shown in example 2b.
Cognitive accessibility - Accessibility
cognitive impairment refers to a broad range of disabilities, from people with intellectual disabilities who may have the most
-limited capabilities, to age-related issues with thinking and remembering.
...nclude: attention memory processing speed time management letters and language numbers symbols and math understanding and making choices a solid approach to providing accessible solutions for people with cognitive impairments includes: delivering content in more than one way, such as by text-to-speech or by video; providing easily-understood content, such as text written using plain
-language standards; focusing attention on important content; minimizing distractions, such as unnecessary content or advertisements; providing consistent web page layout and navigation; incorporating familiar elements, such as underlined links that are blue when not visited and purple when visited; dividing processes into logical, essential steps with progress indicators; making website authe...
...links will be removed from the context of their surrounding non
-link content, making the need for understandable link text even more important.
-moz-outline-radius-bottomleft - CSS: Cascading Style Sheets
in mozilla applications, the -moz-outline-radius-bottomleft css property can be used to round the bottom
-left corner of an element's outline.
... <percentage> the radius of the circle defining the rounding of the bottom
-left corner of the element, specified as the percentages of the bottom and left sides of the border box.
... html <p>look at this paragraph's bottom
-left corner.</p> css p { margin: 10px; border: solid cyan; outline: dotted green; -moz-outline-radius-bottomleft: 2em; } result specifications not part of any standard.
-moz-outline-radius-topleft - CSS: Cascading Style Sheets
in mozilla applications, the -moz-outline-radius-topleft css property can be used to round the top
-left corner of an element's outline.
... <percentage> the radius of the circle defining the rounding of the top
-left corner of the element, specified as the percentages of the top and left sides of the border box.
... html <p>look at this paragraph's top
-left corner.</p> css p { margin: 5px; border: solid cyan; outline: dotted red; -moz-outline-radius-topleft: 2em; } result specifications not part of any standard.
-moz-outline-radius - CSS: Cascading Style Sheets
if two values are set, the first one applies to the top
-left and bottom-right corners and the second one to the top-right and bottom
-left corners.
... if three values are set, the first one applies to the top
-left corner, the second one to the top-right and bottom
-left corners and the third one to the bottom-right corner.
... if four values are set, the first one applies to the top
-left corner, the second one to the top-right corner, the third one to the bottom-right corner and the fourth one to the bottom
-left corner.
-webkit-border-before - CSS: Cascading Style Sheets
it corresponds to the border-top, border-right, border-bottom, or border
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... syntax values one or more of the following, in any order: <'border-width'> see border-width <'border-style'> see border-style <'color'> see color formal definition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder
-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder
-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritedyespercentagesas each of the properties of the shorthand:-webkit-border-before-width: logical-width of containing blockcomputed valueas each of the properties o...
...f the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder
-left-width: the absolute length or 0 if border
-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder
-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedcolor: if the value is translucent, the computed value will be the rgba() corresponding one.
:first - CSS: Cascading Style Sheets
(see :first-child for general first element of a node.) /* selects the first page when printing */ @page :first { margin
-left: 50%; margin-top: 50%; } note: you can't change all css properties with this pseudo-class.
...furthermore, you may only use absolute
-length units when defining the margins.
... syntax :first examples html <p>first page.</p> <p>second page.</p> <button>print!</button> css @page :first { margin
-left: 50%; margin-top: 50%; } p { page-break-after: always; } javascript document.queryselector("button").addeventlistener('click', () => { window.print(); }); result press the "print!" button to print the example.
@media - CSS: Cascading Style Sheets
light
-level light level of the environment added in media queries level 5.
... formal syntax @media <media-query
-list> { <group-rule-body> }where <media-query
-list> = <media-query>#where <media-query> = <media-condition> | [ not | only ]?
... reinstates light
-level, inverted-colors and custom media queries, which were removed from level 4.
Introduction to formatting contexts - CSS: Cascading Style Sheets
any block
-level element can be made to create a bfc by the application of certain css properties.
...nts with display: table-caption block elements where overflow has a value other than visible elements with display: flow-root or display: flow-root list-item elements with contain: layout, content, or strict flex items grid items multicol containers elements with column-span set to all this is useful because a new bfc will behave much like the outermost document in that it becomes a mini
-layout inside the main layout.
...our <div> now becomes a mini
-layout inside our layout.
Consistent list indentation - CSS: Cascading Style Sheets
at the moment, we have a situation analogous to these styles: ul, li {margin
-left: 0; padding
-left: 0;} if we dropped this list into a document as-is, there would be no apparent indentation and the markers would be in danger of falling off the left edge of the browser window.
...if you want to reproduce the default display in netscape 6.x, you write: ul {margin
-left: 0; padding
-left: 40px;} if you're more interested in following the internet explorer/opera model, then: ul {margin
-left: 40px; padding
-left: 0;} of course, you can fill in your own preferred values.
...if you want to reset lists to have no indentation, then you still have to zero out both padding and margin: ul {margin
-left: 0; padding
-left: 0;} remember, though, that in so doing, you'll have the bullets hanging outside the list and its parent element.
Introducing the CSS Cascade - CSS: Cascading Style Sheets
example let's look at an example involving multiple sources of css across the various origins; here we have a user agent style sheet, two author style sheets, a user stylesheet, and inline styles within the html: user-agent css: li { margin
-left: 10px } author css 1: li { margin
-left: 0 } /* this is a reset */ author css 2: @media screen { li { margin
-left: 3px } } @media print { li { margin
-left: 1px } } user css: .specific { margin
-left: 1em } html: <ul> <li class="specific">1<sup>st</sup></li> <li>2<sup>nd</sup></li> </ul> in this case, declarations inside li and .specific rules should apply.
... so three declarations are in competition: margin
-left: 0 margin
-left: 3px margin
-left: 1px the last one is ignored (on a screen), and the first two have the same selector, hence the same specificity.
... therefore, it is the last one that is then selected: margin
-left: 3px note that the declaration defined in the user css, though having a greater specificity, is not chosen as the cascade algorithm is applied before the specificity algorithm.
Pseudo-elements - CSS: Cascading Style Sheets
for example, ::first
-line can be used to change the font of the first line of a paragraph.
...*/ p::first
-line { color: blue; text-transform: uppercase; } note: in contrast to pseudo-elements, pseudo-classes can be used to style an element based on its state.
... index of standard pseudo-elements ::after (:after) ::backdrop ::before (:before) ::cue ::cue-region ::first
-letter (:first
-letter) ::first
-line (:first
-line) ::grammar-error ::marker ::part() ::placeholder ::selection ::slotted() ::spelling-error browser lowest version support of internet explorer 8.0 :pseudo-element 9.0 :pseudo-element ::pseudo-element firefox (gecko) 1.0 (1.0) :pseudo-element 1.0 (1.5) :pseudo-ele...
Shorthand properties - CSS: Cascading Style Sheets
m — the first value represents the top edge, the second, the horizontal, that is left and right, ones, and the third value the bottom edge the 4-value syntax: border-width: 1em 2em 3em 4em — the four values represent the top, right, bottom and left edges respectively, always in that order, that is clock-wise starting at the top (the initial letter of top-right-bottom
-left matches the order of the consonant of the word trouble: trbl) (you can also remember it as the order that the hands would rotate on a clock: 1em starts in the 12 o'clock position, then 2em in the 3 o'clock position, then 3em in the 6 o'clock position, and 4em in the 9 o'clock position).
... margin-top: 10px; margin-right: 5px; margin-bottom: 10px; margin
-left: 5px; ...
... shorthand properties: animation, background, border, border-bottom, border-color, border
-left, border-radius, border-right, border-style, border-top, border-width, column-rule, columns, flex, flex-flow, font, grid, grid-area, grid-column, grid-row, grid-template, list-style, margin, offset, outline, overflow, padding, place-content, place-items, place-self, text-decoration, transition ...
CSS Tutorials - CSS: Cascading Style Sheets
beginner
-level css tutorials getting started this guide is aimed at complete beginners: you haven't written one single line of css?
... intermediate
-level css tutorials after the release of css 2 (level 1), new features have been added to css.
... advanced
-level css tutorials css also got new features allowing you to create complex layouts.
border-block-start - CSS: Cascading Style Sheets
it corresponds to the border-top, border-right, border-bottom, or border
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder
-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder
-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or ...
...0 if border-bottom-style is none or hiddenborder
-left-width: the absolute length or 0 if border
-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder
-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedborder-block-start-color: computed coloranimation typeas each of the properties of the shorthand:border-block-start-color: a colorborder-block-start-style: discreteborder-block-start-width: a length formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <he...
border-image - CSS: Cascading Style Sheets
it also applies to ::first
-letter.inheritednopercentagesas each of the properties of the shorthand:border-image-slice: refer to the size of the border imageborder-image-width: refer to the width or height of the border image areacomputed valueas each of the properties of the shorthand:border-image-outset: as specified, but with relative lengths converted into absolute lengthsborder-image-repeat: as specifiedborder-image-slic...
.../fa0192d18e.png") /* source */ 27 / /* slice */ 36px 28px 18px 8px / /* width */ 18px 14px 9px 4px /* outset */ round; /* repeat */ } result gradient html <div id="gradient">this element is surrounded by a gradient-based border image!</div> css #gradient { width: 200px; border: 30px solid; border-image: repeating
-linear-gradient(45deg, #f33, #3bf, #f33 30px) 60; padding: 20px; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image' in that specification.
...it also applies to ::first
-letter.inheritednopercentagesas each of the properties of the shorthand:border-image-slice: refer to the size of the border imageborder-image-width: refer to the width or height of the border image areacomputed valueas each of the properties of the shorthand:border-image-outset: as specified, but with relative lengths converted into absolute lengthsborder-image-repeat: as specifiedborder-image-slice: one to four percentage(s) (as specified) or abso...
border-inline-start - CSS: Cascading Style Sheets
it corresponds to the border-top, border-right, border-bottom, or border
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder
-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder
-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or ...
...0 if border-bottom-style is none or hiddenborder
-left-width: the absolute length or 0 if border
-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder
-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedborder-inline-start-color: computed coloranimation typeas each of the properties of the shorthand:border-inline-start-color: a colorborder-inline-start-style: discreteborder-inline-start-width: a length formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> |...
border-style - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-bottom-style border
-left-style border-right-style border-top-style syntax /* keyword values */ border-style: none; border-style: hidden; border-style: dotted; border-style: dashed; border-style: solid; border-style: double; border-style: groove; border-style: ridge; border-style: inset; border-style: outset; /* vertical | horizontal */ border-style: dotted solid; /* top | horizontal | bottom */ border-style: hi...
... formal definition initial valueas each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder
-left-style: noneapplies toall elements.
... it also applies to ::first
-letter.inheritednocomputed valueas each of the properties of the shorthand:border-bottom-style: as specifiedborder
-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedanimation typediscrete formal syntax <line-style>{1,4}where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset examples table with all property values here is an example of all the property values.
border-width - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-bottom-width border
-left-width border-right-width border-top-width syntax /* keyword values */ border-width: thin; border-width: medium; border-width: thick; /* <length> values */ border-width: 4px; border-width: 1.2rem; /* vertical | horizontal */ border-width: 2px 1.5em; /* top | horizontal | bottom */ border-width: 1px 2em 1.5cm; /* top | right | bottom | left */ border-width: 1px 2em 0 4rem; /* global ke...
... formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder
-left-width: mediumapplies toall elements.
... it also applies to ::first
-letter.inheritednocomputed valueas each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder
-left-width: the absolute length or 0 if border
-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenanimation typeas each of the properties of the shorthand:border-bottom-width: a lengthborder
-left-width: a lengthborder-right-width: a lengthborder-top-width: a length formal syntax <line-width>{1,4}where <line-width> = <length> | thin | medium | thick examples a mix of values and lengths html <p id="sval"> one value: 6px wide border on all 4 sides</p> <p...
border - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder
-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder
-left-style: noneborder-color: as each of the properties of the shorthand:border-top-color: currentcolorborder-right-color: currentcolorborder-bottom-color: currentcolorborder
-left-color: currentcolorapplies toall elements.
... it also applies to ::first
-letter.inheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder
-left-width: the absolute length or 0 if border
-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder
-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedborder-color: as each of the properties of the shorthand:border-bottom-color: computed colorborder
-left-color: computed colorbo...
...rder-right-color: computed colorborder-top-color: computed coloranimation typeas each of the properties of the shorthand:border-color: as each of the properties of the shorthand:border-bottom-color: a colorborder
-left-color: a colorborder-right-color: a colorborder-top-color: a colorborder-style: discreteborder-width: as each of the properties of the shorthand:border-bottom-width: a lengthborder
-left-width: a lengthborder-right-width: a lengthborder-top-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>whe...
break-after - CSS: Cascading Style Sheets
(a recto page is a right page in a left-to-right spread or a left page in a right-to
-left spread.) verso forces one or two page breaks right after the principal box, whichever will make the next page into a verso page.
... (a verso page is a left page in a left-to-right spread or a left right in a right-to
-left spread.) column break values avoid-column avoids any column break right after the principal box.
... formal definition initial valueautoapplies toblock
-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region examples breaking into neat columns in the following example we have a container that contains an <h1> spanning all columns (achieved using column-span: all) and a series of <h2>s a...
break-before - CSS: Cascading Style Sheets
(a recto page is a right page in a left-to-right spread or a left page in a right-to
-left spread.) verso forces one or two page breaks right before the principal box, whichever will make the next page into a verso page.
... (a verso page is a left page in a left-to-right spread or a left right in a right-to
-left spread.) column break values avoid-column avoids any column break right before the principal box.
... formal definition initial valueautoapplies toblock
-level elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region examples breaking into neat columns in the following example we have a container that contains an <h1> spanning all columns (achieved using column-span: all) and a series of <h2>s a...
counters() - CSS: Cascading Style Sheets
non
-latin characters must be encoded using their unicode escape sequences: for example, \000a9 represents the copyright symbol.
... <li></li> <li></li> <li></li> </ol> </li> </ol> </li> </ol> css ol { counter-reset: listcounter; } li { counter-increment: listcounter; } li::marker { content: counters(listcounter, '.', upper-roman) ') '; } li::before { content: counters(listcounter, ".") " == " counters(listcounter, ".", lower-roman) ; } result decimal
-leading-zero compared to lower-alpha html <ol> <li> <ol> <li></li> <li></li> <li></li> </ol> </li> <li></li> <li></li> <li> <ol> <li></li> <li> <ol> <li></li> <li></li> <li></li> </ol> </li> </ol> </li> </ol> css ol { counter-reset: count; } li { ...
...counter-increment: count; } li::marker { content: counters(count, '.', upper-alpha) ') '; } li::before { content: counters(count, ".", decimal
-leading-zero) " == " counters(count, ".", lower-alpha); } result specifications specification status comment css lists module level 3the definition of 'css counters' in that specification.
env() - CSS: Cascading Style Sheets
to tell the browser to use the whole available space on the screen, and so enabling us to use the env() variables, we need to add a new viewport meta value: <meta name="viewport" content="viewport-fit=cover" /> body { padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 20px) env(safe-area-inset-bottom, 20px) env(safe-area-inset
-left, 20px); } in addition, unlike custom properties, which cannot be used outside of declarations, the env() function can be used in place of any part of a property value, or any part of a descriptor (e.g.
... syntax /* using the four safe area inset values with no fallback values */ env(safe-area-inset-top); env(safe-area-inset-right); env(safe-area-inset-bottom); env(safe-area-inset
-left); /* using them with fallback values */ env(safe-area-inset-top, 20px); env(safe-area-inset-right, 1em); env(safe-area-inset-bottom, 0.5vh); env(safe-area-inset
-left, 1.4rem); values safe-area-inset-top, safe-area-inset-right, safe-area-inset-bottom, safe-area-inset
-left the safe-area-inset-* variables are four environment variables that define a rectangle by its top, right, bottom, and...
...</p> p { width: 300px; border: 2px solid red; padding: env(safe-area-inset-top, 50px) env(safe-area-inset-right, 50px) env(safe-area-inset-bottom, 50px) env(safe-area-inset
-left, 50px); } example values padding: env(safe-area-inset-bottom, 50px); /* zero for all rectangular user agents */ padding: env(safe-area-inset-bottom, 50px); /* 50px because ua properties are case sensitive */ padding: env(x, 50px 20px); /* as if padding: '50px 20px' were set because x is not a valid environment variable */ padding: env(x, 50px, 20px); /* ignored because '50px, 20px' is not ...
font-feature-settings - CSS: Cascading Style Sheets
*/ font-feature-settings: "smcp"; font-feature-settings: "smcp" on; font-feature-settings: "swsh" 2; font-feature-settings: "smcp", "swsh" 2; /* global values */ font-feature-settings: inherit; font-feature-settings: initial; font-feature-settings: unset; whenever possible, web authors should instead use the font-variant shorthand property or an associated longhand property such as font-variant
-ligatures, font-variant-caps, font-variant-east-asian, font-variant-alternates, font-variant-numeric or font-variant-position.
... these lead to more effective, predictable, understandable results than font-feature-settings, which is a low
-level feature designed to handle special cases where no other way exists to enable or access an opentype font feature.
...it also applies to ::first
-letter and ::first
-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax normal | <feature-tag-value>#where <feature-tag-value> = <string> [ <integer> | on | off ]?
font-variation-settings - CSS: Cascading Style Sheets
the font-variation-settings css property provides low
-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values.
... description this property is a low
-level mechanism designed to set variable font features where no other way to enable or access those features exist.
...it also applies to ::first
-letter and ::first
-line.inheritedyescomputed valueas specifiedanimation typea transform formal syntax normal | [ <string> <number> ]# examples you can find a number of other variable fonts examples at our variable fonts guide, v-fonts.com, and axis-praxis.org.
grid-column-start - CSS: Cascading Style Sheets
/* <integer> + <custom-ident> values */ grid-column-start: 2; grid-column-start: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-column-start: span 3; grid-column-start: span somegridarea; grid-column-start: span somegridarea 5; /* global values */ grid-column-start: inherit; grid-column-start: initial; grid-column-start: unset; this property is specified as a single <grid
-line> value.
... a <grid
-line> value can be specified as: either the auto keyword or a <custom-ident> value or an <integer> value or both <custom-ident> and <integer>, separated by a space or the keyword span together with either a <custom-ident> or an <integer> or both.
... formal definition initial valueautoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax <grid
-line>where <grid
-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
grid-row-start - CSS: Cascading Style Sheets
ow-start: somegridarea; /* <integer> + <custom-ident> values */ grid-row-start: 2; grid-row-start: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-row-start: span 3; grid-row-start: span somegridarea; grid-row-start: 5 somegridarea span; /* global values */ grid-row-start: inherit; grid-row-start: initial; grid-row-start: unset; this property is specified as a single <grid
-line> value.
... a <grid
-line> value can be specified as: either the auto keyword or a <custom-ident> value or an <integer> value or both <custom-ident> and <integer>, separated by a space or the keyword span together with either a <custom-ident> or an <integer> or both.
... formal definition initial valueautoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax <grid
-line>where <grid
-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
grid-template - CSS: Cascading Style Sheets
]+ [ / <explicit-track
-list> ]?
...]+ [ / <explicit-track
-list> ]?where <line-names> = '[' <custom-ident>* ']'<track-size> = <track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )<explicit-track
-list> = [ <line-names>?
... <track-size> ]+ <line-names>?where <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-breadth> = <length> | <percentage> | min-content | max-content | autowhere <length-percentage> = <length> | <percentage> examples defining a grid template css #page { display: grid; width: 100%; height: 200px; grid-template: [header
-left] "head head" 30px [header-right] [main
-left] "nav main" 1fr [main-right] [footer
-left] "nav foot" 30px [footer-right] / 120px 1fr; } header { background-color: lime; grid-area: head; } nav { background-color: lightblue; grid-area: nav; } main { background-color: yellow; grid-area: main; } footer { background-color: red; grid-area: foot; } html ...
justify-self - CSS: Cascading Style Sheets
the effect of this property is dependent of the layout mode we are in: in block
-level layouts, it aligns an item inside its containing block on the inline axis.
... normal the effect of this keyword is dependent of the layout mode we are in: in block
-level layouts, the keyword is a synonym of start.
... formal definition initial valueautoapplies toblock
-level boxes, absolutely-positioned boxes, and grid itemsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | normal | stretch | <baseline-position> | <overflow-position>?
margin-block-end - CSS: Cascading Style Sheets
-block-end: 10px; /* an absolute length */ margin-block-end: 1em; /* relative to the text size */ margin-block-end: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-block-end: auto; /* global values */ margin-block-end: inherit; margin-block-end: initial; margin-block-end: unset; it corresponds to the margin-top, margin-right, margin-bottom, or margin
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... values the margin-block-end property takes the same values as the margin
-left property.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin
-left'> examples setting block end margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block-end' in that specification.
margin-block-start - CSS: Cascading Style Sheets
10px; /* an absolute length */ margin-block-start: 1em; /* relative to the text size */ margin-block-start: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-block-start: auto; /* global values */ margin-block-start: inherit; margin-block-start: initial; margin-block-start: unset; it corresponds to the margin-top, margin-right, margin-bottom, or margin
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... values the margin-block-start property takes the same values as the margin
-left property.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin
-left'> examples setting block start margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; margin-block-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block-start' in that specification.
margin-block - CSS: Cascading Style Sheets
1em 2em; /* relative to the text size */ margin-block: 5% 2%; /* relative to the nearest block container's width */ margin-block: 10px; /* sets both start and end values */ /* keyword values */ margin-block: auto; /* global values */ margin-block: inherit; margin-block: initial; margin-block: unset; these values corresponds to the margin-top and margin-bottom, or margin-right, and margin
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... constituent properties this property is a shorthand for the following css properties: margin-block-end margin-block-start syntax values the margin-block property takes the same values as the margin
-left property.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typediscrete formal syntax <'margin
-left'>{1,2} examples setting block start and end margins html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-block: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block' in that specification.
margin-inline-end - CSS: Cascading Style Sheets
in other words, it corresponds to the margin-top, margin-right, margin-bottom or margin
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... values the margin-inline-end property takes the same values as the margin
-left property.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin
-left'> examples setting inline end margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; margin-inline-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline-end' in that specification.
margin-inline-start - CSS: Cascading Style Sheets
it corresponds to the margin-top, margin-right, margin-bottom, or margin
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... values the margin-inline-start property takes the same values as the margin
-left property.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typea length formal syntax <'margin
-left'> examples setting inline start margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; margin-inline-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline-start' in that specification.
margin-inline - CSS: Cascading Style Sheets
relative to the text size */ margin-inline: 5% 2%; /* relative to the nearest block container's width */ margin-inline: 10px; /* sets both start and end values */ /* keyword values */ margin-inline: auto; /* global values */ margin-inline: inherit; margin-inline: initial; margin-inline: unset; this property corresponds to the margin-top and margin-bottom, or margin-right, and margin
-left properties, depending on the values defined for writing-mode, direction, and text-orientation.
... constituent properties this property is a shorthand for the following css properties: margin-inline-end margin-inline-start syntax values the margin-inline property takes the same values as the margin
-left property.
... formal definition initial value0applies tosame as margininheritednopercentagesdepends on layout modelcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, autoanimation typediscrete formal syntax <'margin
-left'>{1,2} examples setting inline start and end margins html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-inline: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline' in that specification.
margin - CSS: Cascading Style Sheets
it is a shorthand for margin-top, margin-right, margin-bottom, and margin
-left.
... initial valueas each of the properties of the shorthand:margin-bottom: 0margin
-left: 0margin-right: 0margin-top: 0applies toall elements, except elements with table display types other than table-caption, table and inline-table.
... it also applies to ::first
-letter and ::first
-line.inheritednopercentagesrefer to the width of the containing blockcomputed valueas each of the properties of the shorthand:margin-bottom: the percentage as specified or the absolute lengthmargin
-left: the percentage as specified or the absolute lengthmargin-right: the percentage as specified or the absolute lengthmargin-top: the percentage as specified or the absolute lengthanimation typea length ...
padding-block-end - CSS: Cascading Style Sheets
10px; /* an absolute length */ padding-block-end: 1em; /* a length relative to the text size */ /* <percentage> value */ padding-block-end: 5%; /* a padding relative to the block container's width */ /* global values */ padding-block-end: inherit; padding-block-end: initial; padding-block-end: unset; values the padding-block-end property takes the same values as the padding
-left property.
... description this property corresponds to the padding-top, padding-right, padding-bottom, or padding
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding
-left'> examples setting block end padding for vertical text html content <div> <p class="exampletext">example text</p> </div> css content div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; padding-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-block-end' in...
padding-block-start - CSS: Cascading Style Sheets
/* an absolute length */ padding-block-start: 1em; /* a length relative to the text size */ /* <percentage> value */ padding-block-start: 5%; /* a padding relative to the block container's width */ /* global values */ padding-block-start: inherit; padding-block-start: initial; padding-block-start: unset; values the padding-block-start property takes the same values as the padding
-left property.
... description this property corresponds to the padding-top, padding-right, padding-bottom, or padding
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding
-left'> examples setting block start padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; padding-block-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-block-start' in that specific...
padding-block - CSS: Cascading Style Sheets
ng-block: 1em 2em; /* relative to the text size */ padding-block: 10px; /* sets both start and end values */ /* <percentage> values */ padding-block: 5% 2%; /* relative to the nearest block container's width */ /* global values */ padding-block: inherit; padding-block: initial; padding-block: unset; these values corresponds to the padding-top and padding-bottom, or padding-right, and padding
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... constituent properties this property is a shorthand for the following css properties: padding-block-end padding-block-start syntax values the padding-block property takes the same values as the padding
-left property.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typediscrete formal syntax <'padding
-left'>{1,2} examples setting block padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; padding-block: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-block' in that specification.
padding-inline-end - CSS: Cascading Style Sheets
nd: 10px; /* an absolute length */ padding-inline-end: 1em; /* a length relative to the text size */ /* <percentage> value */ padding-inline-end: 5%; /* a padding relative to the block container's width */ /* global values */ padding-inline-end: inherit; padding-inline-end: initial; padding-inline-end: unset; values the padding-inline-end property takes the same values as the padding
-left property.
... description this property corresponds to the padding-top, padding-right, padding-bottom, or padding
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding
-left'> examples setting inline end padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; padding-inline-end: 20px; background-color: #c8c800; } specifications specification status comment css logical properties and values level 1the definition of 'padding-inline-end' in that specification.
padding-inline-start - CSS: Cascading Style Sheets
* an absolute length */ padding-inline-start: 1em; /* a length relative to the text size */ /* <percentage> value */ padding-inline-start: 5%; /* a padding relative to the block container's width */ /* global values */ padding-inline-start: inherit; padding-inline-start: initial; padding-inline-start: unset; values the padding-inline-start property takes the same values as the padding
-left property.
... description this property corresponds to the padding-top, padding-right, padding-bottom, or padding
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typea length formal syntax <'padding
-left'> examples setting inline start padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; padding-inline-start: 20px; background-color: #c8c800; } specifications specification status comment css logical properties and values level 1the definition of 'padding-inline-start' in that specification.
padding-inline - CSS: Cascading Style Sheets
ge> values */ padding-inline: 5% 2%; /* relative to the nearest block container's width */ /* global values */ padding-inline: inherit; padding-inline: initial; padding-inline: unset; constituent properties this property is a shorthand for the following css properties: padding-inline-end padding-inline-start syntax values the padding-inline property takes the same values as the padding
-left property.
... description values for this property correspond to the padding-top and padding-bottom, or padding-right, and padding
-left property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial value0applies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueas <length>animation typediscrete formal syntax <'padding
-left'>{1,2} examples setting inline padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; padding-inline: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-inline' in that specification.
padding - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: padding-bottom padding
-left padding-right padding-top syntax /* apply to all four sides */ padding: 1em; /* vertical | horizontal */ padding: 5% 10%; /* top | horizontal | bottom */ padding: 1em 2em 2em; /* top | right | bottom | left */ padding: 5px 1em 0 2em; /* global values */ padding: inherit; padding: initial; padding: unset; the padding property may be specified using one, two, three, or four values.
... formal definition initial valueas each of the properties of the shorthand:padding-bottom: 0padding
-left: 0padding-right: 0padding-top: 0applies toall elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column.
... it also applies to ::first
-letter and ::first
-line.inheritednopercentagesrefer to the width of the containing blockcomputed valueas each of the properties of the shorthand:padding-bottom: the percentage as specified or the absolute lengthpadding
-left: the percentage as specified or the absolute lengthpadding-right: the percentage as specified or the absolute lengthpadding-top: the percentage as specified or the absolute lengthanimation typea length formal syntax [ <length> | <percentage> ]{1,4} examples setting padding with pixels html <h4>this element has moderate padding.</h4> <h3>the padding is huge in this element!</h3> css h4 { background-color: lime; padding: 20px 50px; } h3 { background-color: cyan; padding: 110px 50px 50px 110px; } result setting padding with ...
page-break-after - CSS: Cascading Style Sheets
if pages progress right-to
-left, then this acts like left.
...if pages progress right-to
-left, then this acts like right.
...a subset of values should be aliased as follows: page-break-after break-after auto auto left left right right avoid avoid always page formal definition initial valueautoapplies toblock
-level elements in the normal flow of the root element.
page-break-before - CSS: Cascading Style Sheets
if pages progress right-to
-left, then this acts like left.
...if pages progress right-to
-left, then this acts like right.
...a subset of values should be aliased as follows: page-break-before break-before auto auto left left right right avoid avoid always page formal definition initial valueautoapplies toblock
-level elements in the normal flow of the root element.
text-align - CSS: Cascading Style Sheets
values start the same as left if direction is left-to-right and right if direction is right-to
-left.
... end the same as right if direction is left-to-right and left if direction is right-to
-left.
...</p> css .example { text-align: justify; border: solid; } result notes the standard-compatible way to center a block itself without centering its inline content is setting the left and right margin to auto, e.g.: .something { margin: auto; } .something { margin: 0 auto; } .something { margin
-left: auto; margin-right: auto; } specifications specification status comment css logical properties and values level 1the definition of 'text-align' in that specification.
text-transform - CSS: Cascading Style Sheets
it can be used to make text appear in all-uppercase or all
-lowercase, or with each word capitalized.
...it also applies to ::first
-letter and ::first
-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax none | capitalize | uppercase | lowercase | full-width | full-size-kana examples none <p>initial string <strong>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</strong> </p> <p>text-transform: none <strong><span>lorem ipsum dolor sit amet, consectetur adipisicing elit, ...</span...
... recommendation from css level 1the definition of 'text-transform' in that specification., extends letters to non
-latin bi-cameral scripts css level 1the definition of 'text-transform' in that specification.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
border
-left-color, border-right-color, border-top-color, and border-bottom-color lets you set the color of the corresponding side of the element's border.
...for example, if the box's text is being rendered right-to
-left, then the border-inline-start-color is applied to the right side of the border.
...upon opening paletton, we see: next, we enter our color's hex code (d79c7a) into the "base rgb" box at the bottom
-left corner of the tool: we now see a monochromatic palette based on the color we picked from the mars photo.
HTML attribute: step - HTML: Hypertext Markup Language
valid for the numeric input types, including the date, month, week, time, datetime
-local, number and range types, the step attribute is a number that specifies the granularity that the value must adhere to or the keyword any.
... default values for step input type value example date 1 (day) <input type="date" min="2019-12-25" step="1"> month 1 (month) <input type="month" min="2019-12" step="12"> week 1 (week) <input type="week" min="2019-w23" step="2"> time 60 (seconds) <input type="time" min="09:00" step="900"> datetime
-local 1 (day) <input type="datetime
-local" min="019-12-25t19:30" step="7"> number 1 <input type="number" min="0" step="0.1" max="10"> range 1 <input type="range" min="0" step="2" max="10"> if any is not explicity set, valid values for the number, date/time input types, and range input types are equal to the basis for stepping - the min value and i...
...if providing instructions outside of labels, which allows more flexible positioning and design, consider using aria
-labelledby or aria-describedby.
<input type="date"> - HTML: Hypertext Markup Language
the time and datetime
-local input types support time and date+time input.
... label { display: flex; align-items: center; } span::after { padding
-left: 5px; } input:invalid + span::after { content: '✖'; } input:valid+span::after { content: '✓'; } important: client-side form validation is no substitute for validating on the server.
..."year">year:</label> <select id="year" name="year"> </select> </span> </div> </form> the months are hardcoded (as they are always the same), while the day and year values are dynamically generated depending on the currently selected month and year, and the current year (see the code comments below for detailed explanations of how these functions work.) span { padding
-left: 5px; } input:invalid + span::after { content: '✖'; } input:valid + span::after { content: '✓'; } javascript the other part of the code that may be of interest is the feature detection code — to detect whether the browser supports <input type="date">.
<input type="image"> - HTML: Hypertext Markup Language
_top loads the response into the top
-level browsing context; this is the browsing context that is the topmost ancestor of the current context.
... _top: load the response into the top
-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent).
... these are the x and y coordinates of the image that the mouse clicked on to submit the form, where (0,0) is the top
-left of the image.
<input type="month"> - HTML: Hypertext Markup Language
div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; } important: html form validation is not a substitute for scripts that ensure that the entered data is in the proper format.
... div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; } the best way to deal with dates in forms in a cross-browser way (until all of the major browsers have supported them for a while) is to get the user to enter the month and year in separate controls (<select> elements being popular; see below for an implementation), or use javascript libraries suc...
... div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; } javascript the javascript code that handles selecting which approach to use and to set up the list of years to include in the non-native year <select> follows.
<input type="number"> - HTML: Hypertext Markup Language
the css applied to this example is as follows: div { margin-bottom: 10px; } input:invalid+span:after { content: '✖'; padding
-left: 5px; } input:valid+span:after { content: '✓'; padding
-left: 5px; } here we use the :invalid and :valid pseudo classes to display an appropriate invalid or valid icon as generated content on the adjacent <span> element, as a visual indicator of validity.
... div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; } and finally, the javascript: let metersinputgroup = document.queryselector('.metersinputgroup'); let feetinputgroup = document.queryselector('.feetinputgroup'); let metersinput = document.queryselector('#meters'); let feetinput = document.queryselector('#feet'); let inchesinput = document.queryse...
... (note that we're not converting back and forth between meters and feet/inches here, which a real
-life web application would probably do.) note: when the user clicks the button, the required attribute(s) are removed from the input(s) we are hiding, and empty the value attribute(s).
<input type="range"> - HTML: Hypertext Markup Language
html use similar html as in the previous examples, we add the attribute with a value of vertical: <input type="range" min="0" max="11" value="7" step="1" orient="vertical"> writing-mode: bt
-lr; the writing-mode property should generally not be used to alter text direction for internationalization or localization purposes, but can be used for special effects.
... html we use the same html as in the previous examples: <input type="range" min="0" max="11" value="7" step="1"> css we target just the inputs with a type of range, changing the writing mode from the default to bt
-lr, or bottom-to-top and left-to-right: input[type="range"] { writing-mode: bt
-lr; } putting it all together as each of the above examples works in different browsers, you can put all of them in a single example to make it work cross browser: html we keep the orient attribute with a value of vertical for firefox: <input type="range" min="0" max="11" value="7" step="1" orient="vertical"> css we target just the inputs with a type of range, changing the writing mode from the default to bt
-lr, or bottom-to-top and left-to-right, for edge and internet explorer, and a...
...dd -webkit-appearance: slider-vertical for all -webkit-based browsers: input[type="range"] { writing-mode: bt
-lr; -webkit-appearance: slider-vertical; } specifications specification status comment html living standardthe definition of '<input type="range">' in that specification.
<input type="time"> - HTML: Hypertext Markup Language
div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; } the result here is that: only times between 12:00 and 18:00 will be seen as valid; times outside that range will be denoted as invalid.
... div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; } the best way to deal with times in forms in a cross-browser way, for the time being, is to get the user to enter the hours and minutes (and seconds if required) in separate controls (<select> elements are popular; see below for an example), or use javascript libraries such as the jquery timepicke...
... div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; } the other part of the code that may be of interest is the feature detection code — to detect whether the browser supports <input type="time">, we create a new <input> element, try setting its type to time, then immediately check what its type is set to — non-supporting browsers will return te...
<p>: The Paragraph element - HTML: Hypertext Markup Language
paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first
-line indentation, but html paragraphs can be any structural grouping of related content, such as images or form fields.
... paragraphs are block
-level elements, and notably will automatically close if another block
-level element is parsed before the closing </p> tag.
...alternate separation methods, such as first
-line indentation, can be achieved with css: html <p>separating paragraphs with blank lines is easiest for readers to scan, but they can also be separated by indenting their first lines.
itemprop - HTML: Hypertext Markup Language
three properties with values that are strings <div itemscope> <p>my name is <span itemprop="name">neil</span>.</p> <p>my band is called <span itemprop="band">four parts water</span>.</p> <p>i am <span itemprop="nationality">british</span>.</p> </div> one property, "image", whose value is a url <div itemscope> <img itemprop="image" src="google
-logo.png" alt="google"> </div> when a string value can't be easily read and understood by a person (e.g., a long string of numbers and letters), it can be displayed using the value attribute of the data element, with the more easily-understood-by-a human-version given in the element's contents (which is not part of the structured data - see example below).
...the outer item in this example is a top
-level microdata item.
... items that are not part of others are called top
-level microdata items.
Data URLs - HTTP
encoding on a unix system base64 encoding of a file or string on linux and mac os x systems can be achieved using the command
-line base64 (or, as an alternative, the uuencode utility with -m argument).
...to mitigate such issues, top
-level navigation to data:// urls has been blocked in firefox 59+ (release version, nightly/beta from 58), and we hope to see other browsers follow suit soon.
... see blocking top
-level navigations to data urls for firefox 58 for more details.
Configuring servers for Ogg media - HTTP
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.
... as an inferior alternative, gecko can estimate the video length based on the content
-length.
... another probelm with allowing http compression for media streaming: apache servers don't send the content
-length response header if gzip encoding is used.
DPR - HTTP
server has to opt in to receive dpr header from the client by sending accept-ch and accept-ch
-lifetime response headers.
... syntax dpr: <number> examples server first needs to opt in to receive dpr header by sending the response headers accept-ch containing dpr and accept-ch
-lifetime.
... accept-ch: dpr accept-ch
-lifetime: 86400 then on subsequent requests the client might send dpr header back: dpr: 1.0 ...
Device-Memory - HTTP
server has to opt in to receive device-memory header from the client by sending accept-ch and accept-ch
-lifetime response headers.
... device-memory: <number> examples server first needs to opt in to receive device-memory header by sending the response headers accept-ch containing device-memory and accept-ch
-lifetime.
... accept-ch: device-memory accept-ch
-lifetime: 86400 then on subsequent requests the client might send device-memory header back: device-memory: 1 specifications specification status comment device memory 1the definition of 'device-memory' in that specification.
PUT - HTTP
request has body yes successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax put /new.html http/1.1 example request put /new.html http/1.1 host: example.com content-type: text/html content
-length: 16 <p>new file</p> responses if the target resource does not have a current representation and the put request successfully creates one, then the origin server must inform the user agent by sending a 201 (created) response.
... http/1.1 201 created content
-location: /new.html if the target resource does have a current representation and that representation is successfully modified in accordance with the state of the enclosed representation, then the origin server must send either a 200 (ok) or a 204 (no content) response to indicate successful completion of the request.
... http/1.1 204 no content content
-location: /existing.html specifications specification title rfc 7231, section 4.3.4: put hypertext transfer protocol (http/1.1): semantics and content ...
CSS Houdini
houdini is a set of low
-level apis that exposes parts of the css engine, giving developers the power to extend css by hooking into the styling and layout process of a browser’s rendering engine.
... li { background-image: paint(mycomponent, stroke, 10px); --highlights: blue; -
-lowlights: green; } note: with great power comes great responsibility!
... css parser api an api exposing the css parser more directly, for parsing arbitrary css
-like languages into a mildly typed representation.
The arguments object - JavaScript
arguments is an array
-like object accessible inside functions that contains the values of the arguments passed to that function.
... note: “array
-like” means that arguments has a length property and properties indexed from zero, but it doesn't have array's built-in methods like foreach() or map().
... however, it can be converted to a real array: var args = array.prototype.slice.call(arguments); // using an array literal is shorter than above but allocates an empty array var args = [].slice.call(arguments); as you can do with any array
-like object, you can use es2015's array.from() method or spread syntax to convert arguments to a real array: let args = array.from(arguments); // or let args = [...arguments]; the arguments object is useful for functions called with more arguments than they are formally declared to accept.
Array.prototype.reduceRight() - JavaScript
the reduceright() method applies a function against an accumulator and each value of the array (from right-to
-left) to reduce it to a single value.
...if no initialvalue was provided, then accumulator will be equal to the last value in the array and currentvalue will be equal to the second-to
-last value.
...it’s a flowing right-to
-left, calling each function with the output of the last one.
Array.prototype.push() - JavaScript
although strings are native, array
-like objects, they are not suitable in applications of this method, as strings are immutable.
... similarly for the native, array
-like object arguments.
... let vegetables = ['parsnip', 'potato'] let morevegs = ['celery', 'beetroot'] // merge the second array into the first one // equivalent to vegetables.push('celery', 'beetroot') array.prototype.push.apply(vegetables, morevegs) console.log(vegetables) // ['parsnip', 'potato', 'celery', 'beetroot'] using an object in an array
-like fashion as mentioned above, push is intentionally generic, and we can use that to our advantage.
Array.prototype.slice() - JavaScript
slice(2,-1) extracts the third element through the second-to
-last element in the sequence.
...e.log('newcar[0].color = ' + newcar[0].color) this script writes: mycar = [{color: 'red', wheels: 4, engine: {cylinders: 4, size: 2.2}}, 2, 'cherry condition', 'purchased 1997'] newcar = [{color: 'red', wheels: 4, engine: {cylinders: 4, size: 2.2}}, 2] mycar[0].color = red newcar[0].color = red the new color of my honda is purple mycar[0].color = purple newcar[0].color = purple array
-like objects slice method can also be called to convert array
-like objects/collections to a new array.
...the arguments inside a function is an example of an 'array
-like object'.
Intl.Locale.prototype.maximize() - JavaScript
for instance, given the language 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.
... examples using maximize let mylocale = new intl.locale("fr", {hourcycle: "h24", calendar: "gregory"}); console.log(mylocale.basename); // prints "fr" console.log(mylocale.tostring()); // prints "fr-u-ca-gregory-hc-h24" let mylocmaximized = mylocale.maximize(); // prints "fr
-latn-fr".
...console.log(mylocmaximized.basename); // prints "fr
-latn-fr-u-ca-gregory-hc-h24".
Intl - JavaScript
multiple locales may be specified (and a best-supported locale determined by evaluating each of them in order and comparing against the locales supported by the implementation) by passing an array (or array
-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.
... bcp 47 also allows for extensions, each consisting of a single digit or letter (other than "x") and one or more two- to eight
-letter or digit tags, all separated by hyphens.
... finally, an extension using the letter "x" may appear, followed by one or one- to eight
-letter or digit tags.
Math.imul() - JavaScript
the math.imul() function returns the result of the c
-like 32-bit multiplication of the two parameters.
... return value the result of the c
-like 32-bit multiplication of the given arguments.
... description math.imul() allows for 32-bit integer multiplication with c
-like semantics.
Symbol.isConcatSpreadable - JavaScript
it can control behavior for arrays and array
-like objects: for array objects, the default behavior is to spread (flatten) elements.
... for array
-like objects, the default behavior is no spreading or flattening.
...hanumeric = alpha.concat(numeric) console.log(alphanumeric) // result: ['a', 'b', 'c', 1, 2, 3] when setting symbol.isconcatspreadable to false, you can disable the default behavior: let alpha = ['a', 'b', 'c'], let numeric = [1, 2, 3] numeric[symbol.isconcatspreadable] = false let alphanumeric = alpha.concat(numeric) console.log(alphanumeric) // result: ['a', 'b', 'c', [1, 2, 3] ] array
-like objects for array
-like objects, the default is to not spread.
TypedArray - JavaScript
a typedarray object describes an array
-like view of an underlying binary data buffer.
... static methods typedarray.from() creates a new typedarray from an array
-like or iterable object.
... typedarray.prototype.reduceright() apply a function against an accumulator and each value of the array (from right-to
-left) as to reduce it to a single value.
Template literals (Template strings) - JavaScript
you can use multi
-line strings and string interpolation features with them.
... `\`` === '`' // --> true multi
-line strings any newline characters inserted in the source are part of the template literal.
... using normal strings, you would have to use the following syntax in order to get multi
-line strings: console.log('string text line 1\n' + 'string text line 2'); // "string text line 1 // string text line 2" using template literals, you can do the same like this: console.log(`string text line 1 string text line 2`); // "string text line 1 // string text line 2" expression interpolation in order to embed expressions within normal strings, you would use the following syntax: let a = 5; let b = 10; console.log('fifteen is ' + (a + b) + ' and\nnot ' + (2 * a + b) + '.'); // "fifteen is 15 and // not 20." now, with template literals, you are able to make use of the syntactic sugar, making substitutions like this more readable: let a = 5; let b = 10; console.log(`fifteen is ${a + b} and n...
JavaScript typed arrays - JavaScript
javascript typed arrays are array
-like objects that provide a mechanism for reading and writing raw binary data in memory buffers.
... arraybuffer the arraybuffer is a data type that is used to represent a generic, fixed
-length binary data buffer.
...10308 8 64-bit ieee floating point number (16 significant digits e.g., 1.123...15) unrestricted double double bigint64array -263 to 263-1 8 64-bit two's complement signed integer bigint int64_t (signed long long) biguint64array 0 to 264-1 8 64-bit unsigned integer bigint uint64_t (unsigned long long) dataview the dataview is a low
-level interface that provides a getter/setter api to read and write arbitrary data to the buffer.
<math> - MathML
the top
-level element in mathml is <math>.
... specifications specification status comment mathml 3.0the definition of 'the top
-level math element' in that specification.
... recommendation current specification mathml 2.0the definition of 'the top
-level math element' in that specification.
Web video codec guide - Web media technologies
theora is comparable in quality and compression rates to mpeg-4 part 2 visual and avc, making it a very good if not top-of-the
-line choice for video encoding.
... <video controls> <source type="video/webm" src="filename.webm"> <source type="video/mp4" src="filename.mp4"> </video> recommendations for archival, editing, or remixing there are not currently any lossless—or even near
-lossless—video codecs generally available in web browsers.
...for example, the free x264 utility can be used to encode video in avc format using a very high bit rate: x264 --crf 18 -preset ultrafast --output outfilename.mp4 infile while other codecs may have better best-case quality levels when compressing the video by a significant margin, their encoders tend to be slow enough that the nearly
-lossless encoding you get with this compression is vastly faster at about the same overall quality level.
Progressive web apps (PWAs)
progressive web apps are web apps that use emerging web browser apis and features along with traditional progressive enhancement strategy to bring a native app
-like user experience to cross-platform web applications.
...it describes the name of the app, the start url, icons, and all of the other details necessary to transform the website into an app
-like format.
... serviceworkerware — an express
-like microframework for easy service worker development.
glyph-orientation-vertical - SVG: Scalable Vector Graphics
this reorientation rule applies only to the first
-level non-ideographic text.
... all further embedding of writing modes or bidirectional processing will be based on the first
-level rotation.
...(this presentation form does not disable auto
-ligature formation or similar context-driven variations.) the determination of which characters should be auto-rotated may vary across user agents.
stroke-miterlimit - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following nine elements: <altglyph>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="0 0 38 30" xmlns="http://www.w3.org/2000/svg"> <!-- impact of the default miter limit --> <path stroke="black" fill="none" stroke
-linejoin="miter" id="p1" d="m1,9 l7 ,-3 l7 ,3 m2,0 l3.5 ,-3 l3.5 ,3 m2,0 l2 ,-3 l2 ,3 m2,0 l0.75,-3 l0.75,3 m2,0 l0.5 ,-3 l0.5 ,3" /> <!-- impact of the smallest miter limit (1) --> <path stroke="black" fill="none" stroke
-linejoin="miter" stroke-miterlimit="1" id="p2" d="m1,19 l7 ,-3 l7 ,3 m2, 0 l3.5 ,-3...
... l3.5 ,3 m2, 0 l2 ,-3 l2 ,3 m2, 0 l0.75,-3 l0.75,3 m2, 0 l0.5 ,-3 l0.5 ,3" /> <!-- impact of a large miter limit (8) --> <path stroke="black" fill="none" stroke
-linejoin="miter" stroke-miterlimit="8" id="p3" d="m1,29 l7 ,-3 l7 ,3 m2, 0 l3.5 ,-3 l3.5 ,3 m2, 0 l2 ,-3 l2 ,3 m2, 0 l0.75,-3 l0.75,3 m2, 0 l0.5 ,-3 l0.5 ,3" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path stroke="pink" fill="none" stroke-width="0.05" d="m1, 9 l7,-3 l7,3 m2,0 l3.5,-3 l3.5,3 m2,0 l2,-3 l2,3 m2,0 l0.75,-3 l0.75,3 m2,0 l0.5,-3 l0.5,3 m1,19 l7,-3 l7,3 m2,0 l3.5,-3 l3.5,3 m2,0 l2,-3 l2,3 m2,0 l0.75,-3 l0.75,3 m2,0 l0.5,-3 l0.5,3 m1,29...
... l7,-3 l7,3 m2,0 l3.5,-3 l3.5,3 m2,0 l2,-3 l2,3 m2,0 l0.75,-3 l0.75,3 m2,0 l0.5,-3 l0.5,3" /> </svg> when two line segments meet at a sharp angle and miter joins have been specified for stroke
-linejoin, it is possible for the miter to extend far beyond the thickness of the line stroking the path.
<a> - SVG: Scalable Vector Graphics
value type: <list-of
-link-types> ; default value: none; animatable: yes target where to display the linked url.
...uiredextensions, systemlanguage event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-erro...
...rmessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <forei...
<mask> - SVG: Scalable Vector Graphics
value type: userspaceonuse|objectboundingbox ; default value: objectboundingbox; animatable: yes x this attribute defines the x-axis coordinate of the top
-left corner of the masking area.
... value type: <coordinate> ; default value: -10%; animatable: yes y this attribute defines the y-axis coordinate of the top
-left corner of the masking area.
...: 120%; animatable: yes global attributes core attributes most notably: id styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <...
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
mplementation status unknown overflow: hidden; on <hatch> in ua style sheet implementation status unknown 0 0 as default value of transform-origin except root <svg> and <svg> children of <foreign> implementation status unknown use of white-space instead of deprecated xml:space attribute in ua style sheet implementation status unknown @font-face, ::first
-letter and ::first
-line on <text> implementation status unknown svg and html style sheets in html document with inline svg applying to whole document content implementation status unknown presentation attributes on any svg namespaced element implementation status unknown display behavior of <style> defined via ua style sheet implementation status unknown ...
...x 18.0 / thunderbird 18.0 / seamonkey 2.15) and bug 798843 (firefox 26.0 / thunderbird 26.0 / seamonkey 2.23)) child keyword for <paint> values and marker properties implementation status unknown vector-effect property only none and non-scaling-stroke values are supported (bug 528332 (firefox 15 / thunderbird 15 / seamonkey 2.12), bug 1318208) arcs value for stroke
-linejoin not implemented (bug 1239142) auto-start-reverse value for <marker>'s orient attribute implemented (bug 879659) svgpaint removed implementation status unknown fill and stroke taking multiple paints implementation status unknown z-index not implemented (bug 360148 child(<integer>) paint value implementation status unknown ...
... display of zero
-length subpaths depends on stroke
-linecap attribute implementation status unknown markers on all shapes implementation status unknown <marker> element display defined in ua style sheet implementation status unknown only single paints for fills and strokes implementation status unknown color change notes color managed images implementation status unknown rgba, hsl, lab, icc named colors and device colors implementation status unknown color-profile removed implementation status unknown <color-profile> removed implementation status unknown paint servers change notes <solidcolor> (renamed solidcolor) not implemented (bug 1177032) ...
Secure contexts - Web security
get low
-level access to a user's computer.
...a particular document is considered to be in a secure context when it is the active document of a top
-level browsing context (basically, a containing window or tab) that is a secure context.
...that’s because the determination of whether or not a particular document is in a secure context is based only on considering it within the top
-level browsing context with which it is associated — and not whether a non-secure context happened to be used to create it.
Using custom elements - Web Components
high
-level view the controller of custom elements on a web document is the customelementregistry object — this object allows you to register a custom element on the page, return information on what custom elements are registered, etc.
... customized built-in elements now let's have a look at another customized built in element example — expanding
-list (see it live also).
... next, we register the element using the define() method as before, except that this time it also includes an options object that details what element our custom element inherits from: customelements.define('expanding
-list', expandinglist, { extends: "ul" }); using the built-in element in a web document also looks somewhat different: <ul is="expanding
-list"> ...
Understanding WebAssembly text format - WebAssembly
the body is just a linear list of low
-level instructions.
...let’s look at an example: (module (import "console" "log" (func $log (param i32))) (func (export "logit") i32.const 13 call $log)) webassembly has a two
-level namespace so the import statement here is saying that we’re asking to import the log function from the console module.
... summary this finishes our high
-level tour of the major components of the webassembly text format and how they get reflected in the webassembly js api.
WebAssembly
webassembly is a new type of code that can be run in modern web browsers — it is a low
-level assembly
-like language with a compact binary format that runs with near-native performance and provides languages such as c/c++, c# and rust with a compilation target so that they can run on the web.
... guides webassembly concepts get started by reading the high
-level concepts behind webassembly — what it is, why it is so useful, how it fits into the web platform (and beyond), and how to use it.
...this is the low
-level textual representation of a .wasm module shown in browser developer tools when debugging.
Content Scripts - Archive of obsolete content
there are five basic principles: the add-on's main code, including "main.js" and other modules in "lib", can use the sdk high
-level and low
-level apis, but can't access web content directly content scripts can't use the sdk's apis (no access to globals exports, require) but can access web content sdk apis that use content scripts, like page-mod and tabs, provide functions that enable the add-on's main code to load content scripts into web pages content scripts can be loaded in as strings, but are more often stored as s...
...the content script simply replaces the content of the page: // main.js var tabs = require("sdk/tabs"); var contentscriptstring = 'document.body.innerhtml = "<h1>this page has been eaten</h1>";' tabs.activetab.attach({ contentscript: contentscriptstring }); the following high
-level sdk modules can use content scripts to modify web pages: page-mod: enables you to attach content scripts to web pages that match a specific url pattern.
private-browsing - Archive of obsolete content
opting into private browsing add-ons built using the sdk must opt into private browsing by setting the following key in their package.json file: "permissions": {"private-browsing": true} if an add-on has not opted in, then the high
-level sdk modules will not expose private windows, or objects (such as tabs) that are associated with private windows: the windows module will not list any private browser windows, generate any events for private browser windows, or let the add-on open any private browser windows the tabs module will not list any tabs that belong to private browser windows, and the add-on won't receive ...
... additionally, add-ons that use low
-level modules such as window/utils may see private browser windows with certain functions, even if they have not explicitly opted into private browsing.
url - Archive of obsolete content
gettld(url) returns the top
-level domain for the given url: that is, the highest
-level domain under which individual domains may be registered.
... returns string : the top
-level domain for the url.
windows - Archive of obsolete content
here's an example converting from a high
-level browserwindow to a chrome window, and then back the other way: var { modelfor } = require("sdk/model/core"); var { viewfor } = require("sdk/view/core"); var browserwindows = require("sdk/windows").browserwindows; function converttochromeandback(browserwindow) { // get the chrome window for this browserwindow var chromewindow = viewfor(browserwindow); // now we can use the chrome wind...
...ow api console.log(chromewindow.document.location.href); // -> "chrome://browser/content/browser.xul" // convert back to the high
-level window var highlevelwindow = modelfor(chromewindow); // now we can use the sdk's high
-level window api console.log(highlevelwindow.title); } browserwindows.on("open", converttochromeandback); note that directly accessing low
-level chrome objects like this means you're no longer protected by the compatibility guarantees made by the sdk's high
-level apis.
io/file - Archive of obsolete content
this means that on windows paths are specified using the backslash path separator (\), and on unix
-like systems like linux and os x paths are specified using the forward slash path separator (/).
... if your add-on uses literal windows-style path specifications with this api, your add-on likely won't work when users run it on unix
-like systems.
cfx to jpm - Archive of obsolete content
the add-on sdk includes a command
-line tool that you use to initialize, run, test, and package add-ons.
... permanently removed options jpm has dropped support for: --extra-packages --use-config --package-path --pkgdir --no-strip-xpi --harness-option --manifest-overload --output-file --templatedir --keydir --profiledir --overload-modules --static-args --app --no-run --addons --e10s -
-logfile --dependencies --force-mobile --test-runner-pkg instead of --profiledir and --overload-modules, use --profile and --overload.
Developing for Firefox Mobile - Archive of obsolete content
high
-level apis addon-page not supported base64 supported clipboard not supported context-menu not supported hotkeys supported indexed-db supported l10n supported notifications supported page-mod supported page-worker supported panel not supported passwords sup...
...rystring supported request supported selection not supported self supported simple-prefs supported simple-storage supported system supported tabs supported timers supported ui not supported url supported widget not supported windows supported low
-level apis /loader supported chrome supported console/plain-text supported console/traceback supported content/content supported content/loader supported content/mod supported content/worker supported core/heritage supported core/namespace supported core/promise suppo...
Finding window handles - Archive of obsolete content
note: starting in gecko 17.0, nsibasewindow.nativehandle provides the handle (hwnd [widows], gdkwindow* [linux], nswindow* [macosx],...) of a top
-level window, for all plateforms, as a string.
...to see the messy code see here: https://gist.github.com/noitidart/60aab0a96f060240614f#file-_ff-addon-snippet-x11_focusmostrecentwindowofpid-js
-l354 gdk.close(); x11.close(); see also js-ctypes - how to use c from javascript standard os libraries - specifics of js-ctypes per os ...
Preferences - Archive of obsolete content
setting nsipreflocalizedstring preferences is similar to setting nsisupportsstring: var pls = components.classes["@mozilla.org/pref
-localizedstring;1"] .createinstance(components.interfaces.nsipreflocalizedstring); pls.data = val; prefs.setcomplexvalue("preference.with.non.ascii.value", components.interfaces.nsipreflocalizedstring, pls); nsilocalfile and nsirelativefilepref please see the file io article for details on nsilocalfile and nsirelativefilepref.
...) where the default values are read from all mozilla-based applications read (application directory)/defaults/preferences/*.js in addition to that, recent versions of toolkit applications (firefox 1.0, thunderbird 1.0, and the like but not the mozilla suite) read extension defaults -- usually located in (profile folder)/extensions/(id)/defaults/preferences/ these files use simple javascript
-like syntax.
Interaction between privileged and non-privileged pages - Archive of obsolete content
hat is itself namespaced (xml name characters only): "it is also strongly recommended that third parties adding their own events use their own prefix to avoid confusion and lessen the probability of conflicts with other new events.") in the case where your extension's overlay does not interact directly with browser.xul, such as in a sidebar, it might be easier to add the event listener to the top
-level document directly as shown below (also see: accessing the elements of the top
-level document from a child window).
... chromium
-like messaging: json request with json callback web page: <html> <head> <script> var something = { send_request: function(data, callback) { // analogue of chrome.extension.sendrequest var request = document.createtextnode(json.stringify(data)); request.addeventlistener("something-response", function(event) { request.parentnode.removechild(reque...
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
unicharutils has been modified to provide a frozen
-linkage comparator: nsstring mystring = somestring; - if (mystring.equals(otherstring, nscaseinsensitivestringcomparator())) + if (mystring.equals(otherstring, caseinsensitivecompare)) return ns_ok; // woot, we're equal in all things but case when using unicharutils from frozen
-linkage code, link against the unicharutil_external_s static library.
... the following functions, however, are implemented in the glue library and can be used from frozen
-linkage code: ns_newarrayenumerator (excluding deprecated nsisupportsarray version) ns_newemptyenumerator ns_newunionenumerator nscrt functions in nscrt.h are not available to frozen
-linkage code.
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
using venkman read in source code activate venkman, and then select open windows:quicknote.xul:files on the top
-left of the screen.
... the next command will import the source code: gonzui-import.exe mozilla once the import process is complete, type the following command to launch the gonzui server: gonzui-server.exe now you can access gonzui from your web browser by typing the following into your location bar : http://localhost:46984 this lets you browse all packages, click on links to traverse them, and take traversed
-link locations as search starting points (figure a).
The Box Model - Archive of obsolete content
all you need is to set the text
-link class to the label, and add an onclick handler (oncommand won't work for this).
...you'll have to break the string using regular expressions and generate 3 different labels, one with the text
-link class.
The Essentials of an Extension - Archive of obsolete content
one is the email
-like format in the hello world example, which should be something like <project-name>@<yourdomain>.
...ange the manifest file so that it looks like this: content xulschoolhello content/ skin xulschoolhello classic/1.0 skin/unix/ skin xulschoolhello classic/1.0 skin/mac/ os=darwin skin xulschoolhello classic/1.0 skin/win/ os=winnt locale xulschoolhello en-us locale/ this way we can have separate skins for windows, mac os x, and linux (plus other unix
-like systems), each defined in a separate directory.
Setting up an extension development environment - Archive of obsolete content
the -purgecaches command
-line flag disables this behavior.
...ew files in chrome:// (firefox version, thunderbird version) chrome edit plus a user file editor (firefox and thunderbird) firebug a variety of development tools (firefox) pentadactyl, a general purpose extension with builtin tools for extension development, including a command line with chrome javascript evaluation (including property and function argument completion) and the ability to demand
-load external javascript and css files into window chrome.
List of Mozilla-Based Applications - Archive of obsolete content
(product was formerly known as lombardi teamworks) icedragon fast, secure and feature-rich internet browser based on firefox ida e
-learning authoring system about 200 users imvu 3d chat client incredimail mail client seems to use xulrunner instantbird im client xulrunner application itsnat java ajax component based web framework java software platform uses mozilla rhino javalikescript javascript extensible tooling framework uses nspr...
...splashtop web browser browser part of instant-on operating system sqlite-manager database manager standalone version of add-on stealthsurfer secure internet tools on usb key uses firefox and thunderbird streambase complex event processing platform seems to use xulrunner stylizer css editor css editor css editor with built-in firebug
-like diagnostics and gecko 1.8 preview sun java enterprise system server products uses nss sundial browser with advanced domain name technology based on firefox surfeasy private and secure web browsing sweet16 apple ii computer emulator uses spidermonkey as a scriptable debugger for software running in the emulator mozilla sunbir...
Making a Mozilla installation modifiable - Archive of obsolete content
on unix
-like operating systems with bash
-like shells, you can run the following command within that directory to accomplish this task: for file in *.jar; do unzip $file; done on operating systems with dos
-like shells, the following command accomplishes this task: for %file in (*.jar); do unzip %file note that there are platform-specific files — en-mac.jar, en-unix.jar, and en-win.jar — in that direct...
...if mozilla starts up and displays a normal
-looking web browser window, then you have successfully made your copy of mozilla modifiable!
Dehydra Function Reference - Archive of obsolete content
process_function(decl, body) dehydra calls this for each function definition (declarations without bodies are not included), including both top
-level functions, class member functions, and inline class member functions.
..."gnu c" or "gnu c++") arguments this.arguments is a javascript array containing command
-line arguments passed to a script.
Installing Dehydra - Archive of obsolete content
mkdir gcc-objdir mkdir gcc-dist cd gcc-objdir ../gcc-4.5.3/configure --disable-bootstrap --enable
-languages=c,c++ --prefix=$pwd/../gcc-dist make make install building dehydra and treehydra building dehydra requires spidermonkey development headers from the previous step.
...(obsolete dehydra releases can be found on the mozilla ftp site.) hg clone http://hg.mozilla.org/rewriting-and-analysis/dehydra/ cd dehydra export cxx=/usr/bin/g++ ./configure \ --js-headers=$home/obj-js/dist/include \ --js
-libs=$home/obj-js make # run dehydra and treehydra tests make check usage dehydra checking can be performed directly within the mozilla build.
Repackaging Firefox - Archive of obsolete content
non
-localizable preferences, which simply have the value in partner.js directly.
... all of these settings are non
-localizable, so they are set directly in partner.js and do not need to be in the properties file.
jspage - Archive of obsolete content
r h={x:l.x-i.x,y:l.y-i.y};var j=(k&&(k=document.id(k)))?k.getposition():{x:0,y:0}; return{x:h.x-j.x,y:h.y-j.y};},getcoordinates:function(j){if(b(this)){return this.getwindow().getcoordinates();}var h=this.getposition(j),i=this.getsize(); var k={left:h.x,top:h.y,width:i.x,height:i.y};k.right=k.left+k.width;k.bottom=k.top+k.height;return k;},computeposition:function(h){return{left:h.x-e(this,"margin
-left"),top:h.y-e(this,"margin-top")}; },setposition:function(h){return this.setstyles(this.computeposition(h));}});native.implement([document,window],{getsize:function(){if(browser.engine.presto||browser.engine.webkit){var i=this.getwindow(); return{x:i.innerwidth,y:i.innerheight};}var h=a(this);return{x:h.clientwidth,y:h.clientheight};},getscroll:function(){var i=this.getwindow(),h=a(this); return...
...math.max(i.scrollheight,h.y)}; },getposition:function(){return{x:0,y:0};},getcoordinates:function(){var h=this.getsize();return{top:0,left:0,bottom:h.y,right:h.x,height:h.y,width:h.x}; }});var d=element.getcomputedstyle;function e(h,i){return d(h,i).toint()||0;}function f(h){return d(h,"-moz-box-sizing")=="border-box";}function g(h){return e(h,"border-top-width"); }function c(h){return e(h,"border
-left-width");}function b(h){return(/^(?:body|html)$/i).test(h.tagname);}function a(h){var i=h.getdocument();return(!i.compatmode||i.compatmode=="css1compat")?i.html:i.body; }})();element.alias("setposition","position");native.implement([window,document,element],{getheight:function(){return this.getsize().y;},getwidth:function(){return this.getsize().x; },getscrolltop:function(){return this.getscrol...
tab - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to
-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to
-left locales.
toolbarbutton - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to
-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to
-left locales.
tooltip - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to
-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to
-left locales.
treecol - Archive of obsolete content
start the text will be cropped on its left side in left-to-right text locales, and the right side in right-to
-left locales.
... end the text will be cropped on its right side in left-to-right text locales, and the right side in right-to
-left locales.
window - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] describes the structure of a top
-level window.
...rc="application_form.png"/> <description>register online!</description> </hbox> <groupbox align="start"> <caption label="your information"/> <radiogroup> <vbox> <hbox> <label control="your-fname" value="enter first name:"/> <textbox id="your-fname" value="johan"/> </hbox> <hbox> <label control="your
-lname" value="enter last name:"/> <textbox id="your
-lname" value="hernandez"/> </hbox> <hbox> <button oncommand="alert('save!')"> <description>save</description> </button> </hbox> </vbox> </radiogroup> </groupbox> </vbox> </window> attributes accelerated type: booleanset this attribute to true to...
CommandLine - Archive of obsolete content
espec, alocation, atype) { var compreg = acompmgr.queryinterface(nsicomponentregistrar); compreg.registerfactorylocation(class_id, class_name, contract_id, afilespec, alocation, atype); var catman = components.classes["@mozilla.org/categorymanager;1"] .getservice(nsicategorymanager); catman.addcategoryentry("command
-line-handler", cld_category, contract_id, true, true); }, unregisterself : function mod_unreg(acompmgr, alocation, atype) { var compreg = acompmgr.queryinterface(nsicomponentregistrar); compreg.unregisterfactorylocation(class_id, alocation); var catman = components.classes["@mozilla.org/categorymanager;1"] .getservice(nsicat...
...egorymanager); catman.deletecategoryentry("command
-line-handler", cld_category); }, canunload : function (acompmgr) { return true; } }; function nsgetmodule(acompmgr, afilespec) { return apphandlermodule; } create an observer that will get notified when arguments change: chrome/content/cmdline.js function commandlineobserver() { this.register(); } commandlineobserver.prototype = { observe: function(asubject, atopic, adata) { var cmdline = asubject.queryinterface(components.interfaces.nsicommandline); var test = cmdline.handleflagwithparam("test", false); alert("test = " + test); }, register: function() { var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice(components.inte...
Custom app bundles for Mac OS X - Archive of obsolete content
ences/ app-prefs.js (this provides some default values for preferences) application bundle contents in addition to the standard directory hierarchy that's required of all mac os x applications, as shown above in application bundle layout, there are some specific rules for what content goes where: the top
-level directory is given a name that ends with .app which designates the whole package as an application bundle.
... top
-level directory info.plist pkginfo see also xulrunner - tips xulrunner - mac faq external links inside application bundles property list key reference xrtemplate ...
XULRunner tips - Archive of obsolete content
var windowds = components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"] .getservice(components.interfaces.nsiwindowdatasource); var tmpnamespace = {}; var sl = components.classes["@mozilla.org/moz/jssubscript
-loader;1"] .createinstance(components.interfaces.mozijssubscriptloader); sl.loadsubscript("chrome://inspector/content/hooks.js", tmpnamespace); tmpnamespace.inspectdomdocument(document); } now create a hook in your application window to start dom inspector, like this one: <button label="start inpector" oncommand="startdomi()"/> start your application and dom inspector will be insta...
...it has an -app command
-line switch to run a specified xul application instead of starting the browser.
Using SOAP in XULRunner 1.9 - Archive of obsolete content
sponsexml); 46,60c46,62 < $.ajax({ < type: "post", < url: soapclient.proxy, < datatype: "xml", < processdata: false, < data: content, < complete: getresponse, < contenttype: soapclient.contenttype + "; charset=\"" + soapclient.charset + "\"", < beforesend: function(req) { < req.setrequestheader("method", "post"); < req.setrequestheader("content
-length", soapclient.contentlength); < req.setrequestheader("soapserver", soapclient.soapserver); < req.setrequestheader("soapaction", soapreq.action); < } < }); --- > var xhr = new xmlhttprequest(); > xhr.mozbackgroundrequest = true; > xhr.open('post', soapclient.proxy, true); > xhr.onreadystatechange = function() { > if (4 != xhr.readystate) { return; } > ...
... getresponse(xhr); > }; > var headers = { > 'method': 'post', > 'content-type': soapclient.contenttype + '; charset="' + > soapclient.charset + '"', > 'content
-length': soapclient.contentlength, > 'soapserver': soapclient.soapserver, > 'soapaction': soapreq.action > }; > for (var h in headers) { xhr.setrequestheader(h, headers[h]); } > xhr.send(content); ...
mozilla.dev.platform FAQ - Archive of obsolete content
0x00016b50 in xre_createappdata () a: when you <tt>--disable
-libxul</tt>, the xpcom glue doesn't have information about how to load all the dependent libraries like <tt>libgfx.dylib</tt>.
... in order to use xr successfully in <tt>--disable
-libxul</tt> mode, you have to setup dyld_library_path to include <tt>/library/frameworks/xul.framework/versions/1.9a1</tt> - benjamin smedberg, fri, oct 20 2006 9:12 am q: when i try to build a completely standalone xul app on os x (10.4.8).
nsIContentPolicy - Archive of obsolete content
implementations of this interface can be used to control the loading of various types of out-of
-line content, or the processing of certain types of inline content.
... type_document 6 indicates a dom document at the top
-level (that is, directly within a browser tab).
2006-10-27 - Archive of obsolete content
the solution that masaki suggested was to add "
-l/usr/sfw/lib" into moz_cairo_libs of config/autoconf.mk.
... moz_cairo_libs =
-l$(libxul_dist)/lib
-lmozcairo
-lmozlibpixman \
-l/usr/sfw/lib
-lxrender
-lfreetype
-lfontconfig october 27: alex replied to masaki posting, stating that he was going to use the work around that he provided and would provide feedback if it was successful or not.
Introduction to SSL - Archive of obsolete content
the ssl protocol runs above tcp/ip and below higher
-level protocols such as http or imap.
... it uses tcp/ip on behalf of the higher
-level protocols, and in the process allows an ssl-enabled server to authenticate itself to an ssl-enabled client, allows the client to authenticate itself to the server, and allows both machines to establish an encrypted connection.
Vulnerabilities - Archive of obsolete content
this article uses three high
-level vulnerability categories: software flaws, security configuration issues, and software feature misuse.
... one vulnerability might provide root
-level access to a system, while another vulnerability might only permit read access to an insignificant file.
Building a Theme - Archive of obsolete content
select the node finding tool (the arrow-plus-box in the top
-left corner of the dom inspector), and click on any unused space on a toolbar.
... on mac os or linux, you can use the command
-line zip tool: zip -r my_theme.xpi install.rdf chrome.manifest browser communicator global mozapps or, if you have 7-zip installed, you can use that for zipping it up: 7z a -tzip my_theme.xpi chrome chrome.manifest note: the command
-line tool will update an existing zip file, not replace it - so if you have files you've deleted from your theme, be sure to remove the .xpi file before running t...
Summary of Changes - Archive of obsolete content
proprietary or deprecated feature w3c feature or recommended replacement deprecated font html 4.01 span plus css1 color: ; font-family: ; font-size: ; deprecated center or align="center" css1 text-align: center; for in
-line elements like text or image deprecated center or align="center" css1 margin
-left: auto; margin-right: auto; for block
-level elements deprecated bgcolor css1 background-color: ; non-standard embed html 4.01 object deprecated applet html 4.01 object non-standard marquee html 4.01 div plus scripting non-standard bgsound h...
...http://www.w3.org/tr/2004/rec-dom
-le...e3-textcontent ie5+ elemref.style.pixeltop dom level 2: parseint(elemref.style.top, 10) ie5+ elemref.style.pixelleft = x; elemref.style.pixeltop = y; dom level 2: elemref.style.left = x + "px"; elemref.style.top = y + "px"; ie5+ new activexobject("microsoft.xmlhttp") new xmlhttprequest() proprietary or deprecated feature w3c feature or recom...
-ms-scroll-chaining - Archive of obsolete content
initial valuechainedapplies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values chained initial value.
... .imagecontainer { -ms-scroll-chaining: chained; -ms-overflow-style: none; -ms-content-zooming: zoom; -ms-scroll-rails: none; -ms-content-zoom
-limit-min: 100%; -ms-content-zoom
-limit-max: 500%; -ms-scroll-snap-type: proximity; -ms-scroll-snap-points-x: snaplist(100%, 200%, 300%, 400%, 500%); -ms-overflow-style: none; width: 480px; height: 270px; overflow: auto; } specifications not part of any specification.
-ms-wrap-flow - Archive of obsolete content
the -ms-wrap-flow css property is a microsoft extension that specifies how exclusions impact inline content within block
-level elements.
... initial valueautoapplies toblock
-level elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values auto for floated elements, an exclusion is created; for all other elements, an exclusion is not created.
::-ms-browse - Archive of obsolete content
-ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust background-clip background-color background-image background-origin background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face f...
...ont-size font-style font-weight height margin-bottom margin
-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-browse example html <label>select image: <input type="file"></label> css input[type="file"]::-ms-browse { color: red; background-color: yellow; } result output example specifications not part of any specification.
::-ms-check - Archive of obsolete content
-ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust background-clip background-color background-image background-origin background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face f...
...ont-size font-style font-weight height margin-bottom margin
-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-check example html <form> <label for="redbutton">red</label> <input type="radio" id="redbutton"><br> <label for="greencheckbox">green</label> <input type="checkbox" id="greencheckbox"> </form> css input, label { display: inline; } input[type=radio]::-ms-check { border-color: red; /* this will make the border red when the button is checked.
::-ms-expand - Archive of obsolete content
-ms-high-contrast-adjust background-clip background-color background-image background-origin background-position-x background-position-y background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face f...
...ont-size font-style font-weight height margin-bottom margin
-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-clear specifications not part of any specification.
::-ms-reveal - Archive of obsolete content
background-clip background-color background-image background-origin background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face f...
...ont-size font-style font-weight height margin-bottom margin
-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-reveal specifications not part of any specification.
::-ms-ticks-after - Archive of obsolete content
background-clip background-color background-image background-origin background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face f...
...ont-size font-style font-weight height margin-bottom margin
-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-ticks-after ...
::-ms-ticks-before - Archive of obsolete content
background-clip background-color background-image background-origin background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face f...
...ont-size font-style font-weight height margin-bottom margin
-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-ticks-before ...
::-ms-track - Archive of obsolete content
background-clip background-color background-image background-origin background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face f...
...ont-size font-style font-weight height margin-bottom margin
-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-track see also ::-ms-thumb ::-ms-fill-upper ::-ms-fill
-lower ::-webkit-slider-runnable-track ::-moz-range-track css-tricks: styling cross-browser compatible range inputs with css quirksmode: styling and scripting sliders ...
::-ms-value - Archive of obsolete content
background-clip background-color background-image background-origin background-repeat background-size border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border
-left-color border
-left-style border
-left-width border-right-color border-right-style border-right-width border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face f...
...ont-size font-style font-weight height margin-bottom margin
-left margin-right margin-top -ms-background-position-x -ms-background-position-y -ms-high-contrast-adjust opacity outline-color outline-style outline-width padding-bottom padding
-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-value example input::-ms-value { color: lime; font-style: italic; } to disable the default styling: select::-ms-value { background-color: transparent; color: inherit; } specifications not part of any specification.
GetObject - Archive of obsolete content
if pathname is a zero
-length string (""), getobject returns a new object instance of the specified type.
...with a single-instance object, getobject always returns the same instance when called with the zero
-length string ("") syntax, and it causes an error if the pathname argument is omitted.
java - Archive of obsolete content
summary core object a top
-level object used to access any java class in the package java.*.
... created by the java object is a top
-level, predefined javascript object.
netscape - Archive of obsolete content
summary core object a top
-level object used to access any java class in the package netscape.*.
... created by the netscape object is a top
-level, predefined javascript object.
sun - Archive of obsolete content
summary core object a top
-level object used to access any java class in the package sun.*.
... created by the sun object is a top
-level, predefined javascript object.
Archive of obsolete content
rss really simple syndication (rss) is a popular html
-like xml-based data format used for syndication.
...it offers powerful and yet intuitive searching based on xpath, has sql
-like syntax for the query portion, and has scripting features such as function and variable definitions, xml-inclusion, etc.
Desktop gamepad controls - Game development
it brings a console
-like experience to your web games.
... gameplay controls we can offer even more flexibility to the player by giving him main and alternative gamepad movement controls: if(gamepadapi.buttons.pressed('dpad-up','hold')) { // move player up } else if(gamepadapi.buttons.pressed('dpad-down','hold')) { // move player down } if(gamepadapi.buttons.pressed('dpad
-left','hold')) { // move player left } if(gamepadapi.buttons.pressed('dpad-right','hold')) { // move player right } if(gamepadapi.axes.status && gamepadapi.axes.status[0]) { if(gamepadapi.axes.status[0] > 0.5) { // move player up } else if(gamepadapi.axes.status[0] < -0.5) { // move player down } if(gamepadapi.axes.status[1] > 0.5) { // move playe...
Implementing controls using the Gamepad API - Game development
adapi object is used to store everything related to the api: var gamepadapi = { controller: {}, turbo: false, connect: function() {}, disconnect: function() {}, update: function() {}, buttonpressed: function() {}, buttons: [], buttonscache: [], buttonsstatus: [], axesstatus: [] }; the buttons array contains the xbox 360 button layout: buttons: [ 'dpad-up','dpad-down','dpad
-left','dpad-right', 'start','back','axis
-left','axis-right', 'lb','rb','power','a','b','x','y', ], this can be different for other types of gamepads like the ps3 controller (or a no-name, generic one), so you have to be careful and not just assume the button you're expecting will be the same button you'll actually get.
...now it's easier than ever to deliver a console
-like experience to the browser without the need for any plugins.
Efficient animation for web games - Game development
speaking of the assumptions that the browser can make, you should avoid causing it to have to re
-layout during animations.
...something to be careful of is that overflow may end up causing re
-layout, or other expensive calculations.
Block (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
underneath the preceding element in a horizontal writing mode, and above the following element (commonly known as a block
-level element).
... for example, <p> is by default a block
-level element, whereas <a> is an inline element — you can put several links next to one another in your html source and they will sit on the same line as one another in the rendered output.
Block - MDN Web Docs Glossary: Definitions of Web-related terms
underneath the preceding element in a horizontal writing mode, and above the following element (commonly known as a block
-level element).
... for example, <p> is by default a block
-level element, whereas <a> is an inline element — you can put several links next to one another in your html source and they will sit on the same line as one another in the rendered output.
CORS-safelisted request header - MDN Web Docs Glossary: Definitions of Web-related terms
a cors-safelisted request header is one of the following http headers: accept, accept
-language, content
-language, content-type.
... you can safelist more headers using the access-control-allow-headers header and also list the above headers there to circumvent the following additional restrictions: additional restrictions cors-safelisted headers must also fulfill the following requirements in order to be a cors-safelisted request header: for accept
-language and content
-language: can only have values consisting of 0-9, a-z, a-z, space or *,-.;=.
Entity header - MDN Web Docs Glossary: Definitions of Web-related terms
headers like content
-length, content
-language, content-encoding are entities headers.
... a few request headers after a get request: in the following example, content
-length is an entity header, while host and user-agent are requests headers: post /myform.html http/1.1 host: developer.mozilla.org user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 content
-length: 128 learn more technical knowledge list of all http headers ...
HTML - MDN Web Docs Glossary: Definitions of Web-related terms
brief history in 1990, as part of his vision of the web, tim berners
-lee defined the concept of hypertext, which berners
-lee formalized the following year through a markup mainly based on sgml.
...in 1994 berners
-lee founded the w3c to develop the web.
MDN Web Docs Glossary: Definitions of Web-related terms
glyph gonk google chrome gpl gpu graceful degradation grid grid areas grid axis grid cell grid column grid container grid lines grid row grid tracks guard gutters gzip compression h hash head high
-level programming language hmac hoisting host hotlink houdini hpkp hsts html html5 http http header http/2 http/3 https hyperlink hypertext i i18n iana icann ice ide idempotent i...
...tl (right to left) rtp (real-time transport protocol) and srtp (secure rtp) rtsp: real-time streaming protocol ruby s safe same-origin policy scm scope screen reader script-supporting element scroll container scrollport sctp sdp search engine second
-level domain secure sockets layer (ssl) selector (css) self-executing anonymous function semantics seo serialization server server timing session hijacking sgml shadow tree shim signature signature (functions) signature (security) simd simple heade...
Backgrounds and borders - Learn web development
this uses a coordinate system in which the top
-left-hand corner of the box is (0,0), and the box is positioned along the horizontal (x) and vertical (y) axes.
...left-to-right or right-to
-left text, or top-to-bottom).
Normal Flow - Learn web development
by default, block
-level elements are laid out in the block flow direction, based on the parent's writing mode (initial: horizontal-tb) — each one will appear on a new line below the last one, and they will be separated by any margin that is set on them.
... in english therefore, or any other horizontal, top to bottom writing mode, block
-level elements are laid out vertically.
What are browser developer tools? - Learn web development
these tools do a range of things, from inspecting currently
-loaded html, css and javascript to showing which assets the page has requested and how long they took to load.
... exploring the css editor by default, the css editor displays the css rules applied to the currently selected element: these features are especially handy: the rules applied to the current element are shown in order of most-to
-least-specific.
Basic native form controls - Learn web development
note: you can find examples of all the single line text field types on github at single
-line-text-fields.html (see it live also).
... <input type="image" alt="click me!" src="my-img.png" width="80" height="30"> if the image button is used to submit the form, this control doesn't submit its value — instead, the x and y coordinates of the click on the image are submitted (the coordinates are relative to the image, meaning that the upper
-left corner of the image represents the coordinate (0, 0)).
The HTML5 input types - Learn web development
datetime
-local <input type="datetime
-local"> creates a widget to display and pick a date with time with no specific time zone information.
... <input type="datetime
-local" name="datetime" id="datetime"> month <input type="month"> creates a widget to display and pick a month with a year.
Example 2 - Learn web development
; /* 10px */ font-family : verdana, arial, sans-serif; -moz-box-sizing : border-box; box-sizing : border-box; padding : 0.1em 2.5em 0.2em 0.5em; /* 1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit
-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /*...
... 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border
-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-box-sizing : border-box; box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content window.addeventlistener("...
Example 3 - Learn web development
; /* 10px */ font-family : verdana, arial, sans-serif; -moz-box-sizing : border-box; box-sizing : border-box; padding : 0.1em 2.5em 0.2em 0.5em; /* 1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit
-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /*...
... 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border
-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-box-sizing : border-box; box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helper...
Example 4 - Learn web development
; /* 10px */ font-family : verdana, arial, sans-serif; -moz-box-sizing : border-box; box-sizing : border-box; padding : 0.1em 2.5em 0.2em 0.5em; /* 1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit
-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /*...
... 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border
-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-box-sizing : border-box; box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helper...
Example 5 - Learn web development
; /* 10px */ font-family : verdana, arial, sans-serif; -moz-box-sizing : border-box; box-sizing : border-box; padding : 0.1em 2.5em 0.2em 0.5em; /* 1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */ box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit
-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /*...
... 20px */ top : 0; right : 0; padding-top : .1em; -moz-box-sizing : border-box; box-sizing : border-box; text-align : center; border
-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-box-sizing : border-box; box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helper...
Use HTML to solve common problems - Learn web development
how to create a basic html document how to divide a webpage into logical sections how to set up a proper structure of headings and paragraphs basic text
-level semantics html specializes in providing semantic information for a document, so html answers many questions you might have about how to get your message across best in your document.
... how to add multiple languages into a single webpage how to display time and date with html performance how to author fast
-loading html pages ...
Creating hyperlinks - Learn web development
block level links as mentioned before, almost any content can be made into a link, even block
-level elements.
...here's an example with a download link to the latest windows version of firefox: <a href="https://download.mozilla.org/?product=firefox
-latest-ssl&os=win64&lang=en-us" download="firefox
-latest-64bit-installer.exe"> download latest firefox for windows (64-bit) (english, us) </a> active learning: creating a navigation menu for this exercise, we'd like you to link some pages together with a navigation menu to create a multi-page website.
Adding vector graphics to the Web - Learn web development
playable code <h2>live output</h2> <div class="output" style="min-height: 50px;"> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="input" style="width: 95%;min-height: 200px;"> <svg width="100%" height="100%"> <rect width="100%" height="100%" fill="red" /> <circle cx="100%" cy="100%" r="150" fill="blue" stroke="black" /> <polygon points="120,0 240,225 0,225" fill="green"/> <text x="50" y="100"...
... </text> </svg> </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution" disabled> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y
-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } const textarea = document.getelementbyid('code'); const reset = document.getelementbyid('reset'); const solution = document.getelementbyid('solution'); const output = document.queryselector('.output'); let code = textarea.value; let userentry = textarea.value; function updatecode() { output.inne...
Images in HTML - Learn web development
if you get really stuck, press the show solution button to see an answer: playable code <h2>live output</h2> <div class="output" style="min-height: 50px;"> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="input" style="min-height: 100px; width: 95%"> <img> </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-...
...if you get really stuck, press the show solution button to see an answer: playable code 2 <h2>live output</h2> <div class="output" style="min-height: 50px;"> </div> <h2>editable code</h2> <p class="a11y
-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="input" style="min-height: 100px; width: 95%"> </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y
-label ...
HTML table basics - Learn web development
source code: <table> <tr> <td> </td> <td>knocky</td> <td>flor</td> <td>ella</td> <td>juan</td> </tr> <tr> <td>breed</td> <td>jack russell</td> <td>poodle</td> <td>streetdog</td> <td>cocker spaniel</td> </tr> <tr> <td>age</td> <td>16</td> <td>9</td> <td>10</td> <td>5</td> </tr> <tr> <td>owner</td> <td>mother-in
-law</td> <td>me</td> <td>me</td> <td>sister-in
-law</td> </tr> <tr> <td>eating habits</td> <td>eats everyone's leftovers</td> <td>nibbles at food</td> <td>hearty eater</td> <td>will eat till he explodes</td> </tr> </table> now the actual rendered table: knocky flor ella juan breed jack russell poodle streetdog cocker ...
...spaniel age 16 9 10 5 owner mother-in
-law me me sister-in
-law eating habits eats everyone's leftovers nibbles at food hearty eater will eat till he explodes the problem here is that, while you can kind of make out what's going on, it is not as easy to cross reference data as it could be.
What is JavaScript? - Learn web development
a high
-level definition javascript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2d/3d graphics, scrolling video jukeboxes, etc.
... // i am a comment a multi
-line comment is written between the strings /* and */, e.g.
Multimedia: Images - Learn web development
this is a high
-level introduction to optimizing multimedia delivery on the web, covering general principles and techniques.
... loading strategy one of the biggest improvements to most websites is lazy
-loading images beneath-the-fold, rather than downloading them all on initial page load regardless of whether a visitor scrolls to see them or not.
Routing in Ember - Learn web development
by having a getter defined in the return object from the model data, the todos are re
-looked-up so that our changes to the todo list are represented in the rendered list.
... updating the todos display inside todolist one small final thing that we need to fix is that previously, inside todomvc/app/components/todo
-list.hbs, we were accessing the todo-data service directly and looping over all todos, as shown here: {{#each this.todos.all as |todo| }} since we now want to have our todolist component show a filtered list, we'll want to pass an argument to the todolist component representing the "current list of todos", as shown here: {{#each @todos as |todo| }} and that's it for this tutorial!
React interactivity: Editing, filtering, conditional rendering - Learn web development
copy this block of code into the todo() function, beneath your usestate() hook but above the return statement: const editingtemplate = ( <form classname="stack-small"> <div classname="form-group"> <label classname="todo
-label" htmlfor={props.id}> new name for {props.name} </label> <input id={props.id} classname="todo-text" type="text" /> </div> <div classname="btn-group"> <button type="button" classname="btn todo-cancel"> cancel <span classname="visually-hidden">renaming {props.name}</span> </button> <button type="submit" classname="btn btn__primary tod...
...span classname="visually-hidden">new name for {props.name}</span> </button> </div> </form> ); const viewtemplate = ( <div classname="stack-small"> <div classname="c-cb"> <input id={props.id} type="checkbox" defaultchecked={props.completed} onchange={() => props.toggletaskcompleted(props.id)} /> <label classname="todo
-label" htmlfor={props.id}> {props.name} </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edit <span classname="visually-hidden">{props.name}</span> </button> <button type="button" classname="btn btn__danger" onclick={() => props.deletetask(props.id)} > de...
Using Vue computed properties - Learn web development
we'll also add an id and an aria
-labelledby attribute to assign the <h2> contents to be a label for the <ul> element.
... add the described <h2> and update the <ul> inside your app's template as follows: <h2 id="list-summary">{{listsummary}}</h2> <ul aria
-labelledby="list-summary" class="stack
-large"> <li v-for="item in todoitems" :key="item.id"> <to-do-item :label="item.label" :done="item.done" :id="item.id"></to-do-item> </li> </ul> you should now see the list summary in your app, and the total number of items update as you add more todo items!
Getting started with Vue - Learn web development
in this article we'll look at a little bit of vue background, learn how to install it and create a new project, study the high
-level structure of the whole project and an individual component, see how to run the project locally, and get it prepared to start building our example.
... app.vue: this is the top
-level component in your vue app.
Introduction to automated testing - Learn web development
a reasonable set of basic functionalities to run on our project is as follows: html-tidy, css
-lint, and js-hint to lint and report/fix common html/css/js errors (see gulp-htmltidy, gulp-csslint, gulp-jshint).
... autoprefixer and css
-lint install using the following lines: npm install --save-dev gulp-autoprefixer npm install --save-dev gulp-csslint add the following dependencies to gulpfile.js: const autoprefixer = require('gulp-autoprefixer'); const csslint = require('gulp-csslint'); add the following test to the bottom of gulpfile.js: function css(cb) { return gulp.src('src/style.css') .pipe(csslint...
Handling common HTML and CSS problems - Learn web development
so for example: mozilla uses -moz- chrome/opera/safari use -webkit- microsoft uses -ms- here's some examples: -webkit-transform: rotate(90deg); background-image: -moz
-linear-gradient(left,green,yellow); background-image: -webkit-gradient(linear,left center,right center,from(green),to(yellow)); background-image: linear-gradient(to right,green,yellow); the first line shows a transform property with a -webkit- prefix — this was needed to make transforms work in chrome, etc.
... try this simple example: open up google.com, or another site that has a prominent heading or other block
-level element.
Introduction to cross browser testing - Learn web development
objective: to gain an understanding of the high
-level concepts involved in cross browser testing.
... reporting bugs just to reiterate on what was said above, if you discover bugs in browsers, you should report them: firefox bugzilla edgehtml issue tracker safari chrome opera summary this article should have given you a high
-level understanding of the most important concepts you need to know about cross browser testing.
Strategies for carrying out testing - Learn web development
objective: to gain an understanding of the high
-level concepts involved in cross-browser testing.
...you'll probably want something like the following, for a reasonable low
-level device lab: a mac, with the browsers installed that you need to test — this can include firefox, chrome, opera, and safari.
Client-side tooling overview - Learn web development
from a high
-level perspective, you can put client-side tools into the following three broad categories of problems to solve: safety net — tools that are useful during your code development.
...it is available as a node.js command
-line tool and a vs code extension.
Multiprocess on Windows
overview a high
-level overview of the ideas behind the a11y+e10s design is available on the wiki.
... in general, the only com objects which should need to be explicitly wrapped are the iaccessibles for top
-level documents in the content process.
Software accessibility: Where are we today?
if a person was unable to do one of the above
-listed tasks, they found themselves unable to use many popular computer applications.
...one great place to go and learn about this industry is the csun conference in los angeles, which takes place every year in mid
-late march.
Command line options
useful with those command
-line arguments that open their own windows but don't already prevent default windows from opening.
... other options need to be documented -print-xpcom-dir -print-xpcom-dirlist -kill -killall -f -ftimeout -fwait -unsetdefaultmail gtk options -no-deelevate (running windows as administrator with launcher process enabled causes drag and drop errors - how to fix) references chrome: command line test documentation for command
-line features (mozilla.org) toolkit/xre/nsapprunner.cpp browser/components/nsbrowsercontenthandler.js suite/browser/nsbrowsercontenthandler.js mail/components/nsmaildefaulthandler.js installer command line options original document information author(s): ben goodger, steffen wilberg, seth spitzer, daniel wang copyright information: portions of this content are © 1998–2007 by individu...
Creating reftest-based unit tests
making the changes before the document has completely finished loading and painting would mean that the test may not actually test the browser's invalidation logic, since the changed parts of the document may end up displaying correctly purely due to a pending post
-load paint.
... references http://old.nabble.com/please-add-%22in-testsuite-%22-to
-layout-bugs-when-resolving-them!-td7787412.html further documentation: layout/tools/reftest/readme.txt ...
Debugging on Mac OS X
if you are using lldb on the command line (independently of xcode) and you will always run it from either the top source directory, the object directory or else the dist/bin subdirectory of the object directory, then adding the following setting to your $home/.lldbinit is sufficient: settings set target.load-cwd
-lldbinit true however, if you will run lldb from a different directory, or if you will be running it indirectly by debugging in xcode (xcode always runs lldb from "/"), then this setting will not help you.
...# therefore setting `settings set target.load-cwd
-lldbinit true` can't help us # without xcode providing that functionality.) # # the following works by setting a one-shot breakpoint to break on a function # that we know will both run early (which we want when we start first start the # app) and run frequently (which we want so that it will trigger asap if we # attach to an already running app).
HTTP logging
don't let the scary
-looking command line stuff frighten you off; it's not hard at all!
... turning off logging of socket
-level transactions if you're not interested in socket
-level log information, either because it's not relevant to your bug or because you're debugging something that includes a lot of noise that's hard to parse through, you can do that.
Simple SeaMonkey build
debian linux: # this one
-liner should install all necessary build deps sudo aptitude install zip mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev libidl-dev mesa-common-dev autoconf2.13 yasm libgtk2.0-dev libdbus-1-dev libdbus-glib-1-dev python-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libpulse-dev ubuntu linux # for ubuntu 12.04 lts (precise pangolin), ...
...ibasound2-dev libcurl4-openssl-dev libnotify-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libiw-dev libxt-dev mesa-common-dev libpulse-dev fedora linux centos rhel: sudo yum groupinstall 'development tools' 'development libraries' 'gnome software development' sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa
-libgl-devel alsa
-lib-devel libxt-devel gstreamer-devel gstreamer-plugins-base-devel pulseaudio
-libs-devel # 'development tools' is defunct in fedora 19 and above use the following sudo yum groupinstall 'c development tools and libraries' sudo yum group mark install "x software development" mac: install xcode tools.
Eclipse CDT Manual Setup
select the "builder settings" tab, untick "use default build command", set the build command to "just-print-mozilla-build.py" or, if you're on mac, to "bash
-l -c 'just-print-mozilla-build.py'" (on mac eclipse doesn't seem to pick up the environment properly, so it's necessary to invoke just-print-mozilla-build.py indirectly through bash).
...for fennec builds, however, most of the commands are something like "arm
-linux-androideabi-g++", which will not be recognized by the default regex.
Obsolete Build Caveats and Tips
alternatively you can install the command
-line compiler as part of the windows 7 sdk, but you are then expected to use the included windbg debugger.
... the visual c++ 8 command
-line compiler is included with the vista sdk, but you are then expected to use the included windbg debugger.
Message manager overview
the content frame message manager provides the global object for frame scripts (but note that there is trickery to ensure that top
-level variables defined by frame scripts are not shared).
... its most important attributes and functions are: content : access the dom window hosted by the tab docshell : access the top
-level docshell components : access privileged objects and apis addeventlistener() : listen to dom events addmessagelistener() : receive messages from the chrome process sendasyncmessage() : send asynchronous messages to the chrome process sendsyncmessage() : send synchronous messages to the chrome process interfaces nsidomeventtarget nsimessagelistenermanager nsimessagesender nsisyncmessagesender nsicontentframemessagemanager how to access the con...
Using the Browser API
the html browser api is an extension of the html <iframe> element that allows web apps to implement browsers or browser
-like applications.
... it consists of two major parts: custom <iframe> attributes: by adding a mozbrowser attribute to the <iframe> element we can make it appear like a top
-level browser window to the embedded content.
Browser API
the html browser api is an extension of the html <iframe> element that allows web apps to implement browsers or browser
-like applications.
... browser api concepts and usage the browser api consists of two major parts: custom <iframe> attributes: by adding a mozbrowser attribute to the <iframe> element we can make it appear like a top
-level browser window to the embedded content.
Chrome-only CSS reference
it only works in chrome code, and only on mac os x.:-moz
-lwthemethe :-moz
-lwtheme pseudo-class matches in chrome documents when the root element's lightweightthemes attribute is true and a theme is selected.:-moz
-lwtheme-brighttextthe :-moz
-lwtheme-brighttext pseudo-class matches in chrome documents when :-moz
-lwtheme is true and a lightweight theme with a bright text color is selected.:-moz
-lwtheme-darktextthe :-moz
-lwtheme-darktext pseudo-class matches...
... in chrome documents when :-moz
-lwtheme is true and a lightweight theme with a dark text color is selected.::-moz-tree-cellactivated by the properties attribute.::-moz-tree-cell-textactivated by the properties attribute.::-moz-tree-cell-text(hover)the :-moz-tree-cell-text(hover) css pseudo-class will match an element if the mouse cursor is presently hovering over text in a tree cell.::-moz-tree-columnactivated by the properties attribute.::-moz-tree-drop-feedbackactivated by the properties attribute.::-moz-tree-imageactivated by the properties attribute.::-moz-tree-indentationactivated by the properties attribute.::-moz-tree
-lineactivated by the properties attribute.::-moz-tree-progressmeteractivated when the type attribute is set to progressmeter.
HTTP Cache
in this case, the content
-length (or different indicator) header doesn't equal to the data size reported by the cache entry.
... for the disk cache entries we keep some of the most recent and most used cache entries' meta data in memory for immediate zero-thread
-loop opening.
Integrated Authentication
instead, it leverages system libraries that provide spnego; sspi on microsoft windows, and gss-api on linux, mac osx, and other unix
-like systems.
... the preferences are: pref("network.negotiate-auth.trusted-uris", site
-list); pref("network.negotiate-auth.delegation-uris", site
-list); pref("network.automatic-ntlm-auth.trusted-uris", site
-list); where, site
-list is a comma-separated list of url prefixes or domains of the form: site
-list = "mydomain.com, https://myotherdomain.com" network.negotiate-auth.trusted-uris lists the sites that are permitted to engage in spnego authentication with the browser, and netw...
Dict.jsm
methods copy() returns a shallow copy of the dictionary; that is, a copy of the dictionary including the items immediately included within the dictionary; however, any objects referenced by those top
-level objects are not copied.
... return value a new dictionary object containing the same top
-level items as the original dictionary on which the copy() method was called.
OSFile.jsm
the file api is designed for high
-level, highly-restricted manipulation of files by web applications.
... consequently, one of the key design choices of os.file is to provide operations that are low
-level enough that they do not hide any i/o from the developer (which could cause the developer to perform more i/o than they think) and, since not all platforms have the same features, offer system-specific information that the developer can use to optimize his algorithms for a platform.
Localizing with Mercurial
here's how to create a l10n patch with hg and the mq extension: enable mq by adding hg.ext = to your mercurial config file (~/.hgrc on unix
-like systems or mercurial.ini on windows) under the [extensions] section.
... to push to mozilla-hosted repositories, you have to have committer access, and you must edit the file (your
-local-hg-root aka the directory you pulled your locale into)/.hg/hgrc (note, this is not your ~/.hgrc) to add these lines (replacing ab-cd with your locale code): [paths] default = https://hg.mozilla.org/l10n-central/ab-cd/ default-push = ssh://hg.mozilla.org/l10n-central/ab-cd/ you’ll also need to tell ssh which account to use for your pushes, too, by editing ~/.ssh/config and adding these...
Mozilla Framework Based on Templates (MFBT)
(an unnamed temporary lives for a shorter period of time than the scope where it's found, so it usually isn't what was desired.) data structures linkedlist.h implements a type-safe doubly
-linked list class.
... threadlocal.h implements thread
-local storage, aka "tls", also called thread-specific storage.
Python binding for NSS
also, any "global" values which are set in python-nss are actually thread
-local.
... fix return value creation in sslsocket.get_security_status convert licensing to mpl tri
-license the following were added: nss.io.socket.new_socket_pair() nss.io.socket.poll() nss.io.socket.import_tcp_socket() nss.nss.certificate.get_subject_common_name() nss.nss.generate_random() nss.ssl.sslsocket.import_tcp_socket() release 0.1.0 release date 2008-07-09 scm tag source download ...
Proxies in Necko
socks and nsisockettransportservice the aforementioned methods work very well for application
-level proxies.
... however, socks is transparent to upper
-level protocols, and can transport any other tcp- or udp-based protocol.
Creating JavaScript jstest reftests
earlier we discussed the deprecated approach of using the -n naming scheme to identify tests whose passed, failed status is flipped by the post test processing code in jsdriver.pl and post-process
-logs.pl.
... a different approach is to use the expectexitcode(exitcode) function which outputs a string: --- note: in this testcase, we expect exit code <exitcode> --- that tells the post-processing scripts jsdriver.pl or post-process
-logs.pl that the test passes if the shell or browser terminates with that exit code.
How to embed the JavaScript engine
# if you're using version other than spidermonkey 31, please change
-lmozjs-xx to your version.
... [mac] clang++ -std=c++11 -i<objdir>/dist/include
-l<objdir>/dist/lib helloworld.cpp -o helloworld
-lmozjs-31
-lz [linux] g++ -std=c++11 -i<objdir>/dist/include
-l<objdir>/dist/lib helloworld.cpp -o helloworld
-lmozjs-31
-lz
-lpthread
-ldl it should print "helloworld, it is time" (here time is the current time).
Introduction to the JavaScript shell
the javascript shell (js) is a command
-line program included in the spidermonkey source distribution.
... note: evalcx() is only useful for people doing deep internal work on the javascript engine, for testing evalinsandbox
-like environments in the shell.
JSGetObjectOps
description jsobjectops is used by js_newobject's internals to discover the set of high
-level object operations to use for new objects of the given class.
...thus jsclass (which pre-dates jsobjectops in the api) provides a low
-level interface to class-specific code and data, while jsobjectops allows for a higher level of operation, which does not use the object's class except to find the class's jsobjectops struct, by calling clasp->getobjectops, and to finalize the object.
JSObjectOps.getProperty
jsobjectops.getproperty, setproperty, and deleteproperty are high
-level callbacks that implement object property accesses.
... each of these callbacks is responsible for everything involved with an individual property access operation, including: any locking necessary for thread safety; security checks; finding the property, including walking the prototype chain if needed; calling the lower
-level jsclass hooks; calling getters or setters; and actually getting, setting, or deleting the property once it is found.
JSObjectOps.lookupProperty
the jsobjectops.lookupproperty callback is called for every property access (except when a higher
-level callback, such as jsobjectops.getproperty, is overloaded in a way that does not call lookupproperty).
... if jslookuppropop succeeds and returns with *propp non-null, that pointer may be passed as the prop parameter to a jsattributesop, as a short-cut that bypasses id re
-lookup.
JS_GetGCParameter
see also mxr id search for js_getgcparameter mxr id search for js_setgcparameter bug 474801 jsgc_bytes jsgc_number bug 474497 jsgc_max_code_cache_bytes this option no
-longer exists js_getgcparameterforthread js_setgcparameterforthread bug 624229 jsgc_mode bug 631733 jsgc_unused_chunks bug 674480 jsgc_total_chunks bug 641025 jsgc_slice_time_budget bug 673551 jsgc_mark_stack_limit bug 765435 jsgc_high_frequency_time_limit jsgc_high_frequency_low_limit jsgc_high_frequency_high_limit...
... jsgc_high_frequency_heap_growth_max jsgc_high_frequency_heap_growth_min jsgc_low_frequency_heap_growth jsgc_dynamic_heap_growth jsgc_dynamic_mark_slice bug 800063 jsgc_allocation_threshold bug 871005 jsgc_decommit_threshold this option is no
-longer exists bug 1017141 jsgc_min_empty_chunk_count jsgc_max_empty_chunk_count ...
SpiderMonkey 1.8.8
you can download full source code here: insert-actual
-link-when-the-release-happens (md5 checksum: insert-actual-hash-here).
...future direction include-followup-on-experimental
-library-versioning-scheme-here spidermonkey embedders should also be aware that mozilla has no plans to keep the jsapi, nor the jsdbgapi stable for embedders.
Running Automated JavaScript Tests
for a smoke test or if you are not changing language
-level functionality, you may wish to use jstests.py path_to_js_shell --exclude=test262 other options allow you to show the test command lines being run, command output and return codes, run tests named in a given file, exclude tests named in a given file, hide the progress bar, change the timeout, run skipped tests, print output in tinderbox format, run a test in the debugger, or run tests in val...
... running jstest in a browser jstests also runs on browser, with the following command: ./mach jstestbrowser to run specific test, you can use --filter=pattern command
-line argument, where pattern is a regexp pattern that is tested against file:///{path_to_obj_dir}/dist/test-stage/jsreftest/tests/jsreftest.html?test={relative_path_to_test_from_js/src/tests} string: ./mach jstestbrowser --filter=pattern running jstests on treeherder when viewing treeherder after a push to the mozilla repositories, jstests run in the browser are shown as r(j) meaning "javascrip...
Mozilla Projects
compare
-locales compare
-locales is a python script that helps localizers to check their work without running firefox or another application.
... nspr netscape portable runtime (nspr) provides a platform-neutral api for system level and libc
-like functions.
Secure Development Guidelines
r overflow int main() { unsigned int foo = 0xffffffff; printf(“foo: 0x%08x\r\n”, foo); foo++; printf(“foo: 0x%08x\r\n”, foo); } integer overflows/underflows example of an integer underflow int main() { unsigned int foo = 0; printf(“foo: 0x%08x\r\n”, foo); foo--; printf(“foo: 0x%08x\r\n”, foo); } integer overflows/underflows real
-life example (bug 303213) jsbool js_str_escape(jscontext *cx, jsobject *obj, unsigned int argc, jsval *argv, jsval *rval){ ...
... memory leaks example: void *p; size_t new_size; p = realloc(p, new_size); if (p == null) { /* handle error */ } memory leaks: prevention tools like valgrind can help detect memory leaks writing secure code: object management reference counting issues real
-life example (bug 440230) void addref() { ++mrefcnt; ns_log_addref(this, mrefcnt, "nscssvalue::array", sizeof(*this)); } void release() { --mrefcnt; ns_log_release(this, mrefcnt, "nscssvalue::array"); if (mrefcnt == 0) delete this; } reference counting issues: prevention use the largest data type available on your platform for your reference counter use...
Mork
mork structure mork is a schema
-less database format.
...the file is a collection of top
-level structures, of which there exists four: dictionaries, tables, rows, and groups (changesets).
Using the Places history service
please see history service design for information on the design of the history service, and the places database for a higher
-level design overview of places.
... break; } in case the database is locked by a third party process and cannot be opened, a "places-database
-locked" notification is fired, in such a case the service won't be able to initialize.
nsIStyleSheetService
sheets added via this api take effect on all documents, including already
-loaded ones, immediately.
...the removal takes effect immediately, even for already
-loaded documents.
nsITreeView
for very simple tree views, such as those without multi
-level data, you might want to consider using something simpler than a tree view, such as a listbox.
... for tree views with multi
-level data, it's advisable to distinguish between a row which is an empty container (i.e., a row with the potential to hold children but that currently has none), and a non-empty container (i.e., a row that positively does currently have children).
nsIWindowWatcher
it maintains a list of open top
-level windows, and allows some operations on them.
...nsiwindowwatcher keeps a list of all top
-level dom windows currently open, along with their corresponding chrome interfaces.
XPIDL Syntax
end-of
-line) comments are permitted between any two tokens.
...the following is a list of potential features which are parseable but may not result in expected code: struct, union, and enumerated types array declarators (appears to be supported in xpidl_header.c but not xpidl_typelib.c) exception declarations module declarations variable arguments (that makes the abnf get more wonky) sequence types max
-length strings fixed-point numbers "any" and "long double" types.
XPIDL
an exception to the above rule is if the parameter has the iid_is property (a special case for some queryinterface
-like operations).
... resources (mostly outdated) some unsorted notes including a keyword list xpidl is a tool for generating c++ headers, java interfaces, xpconnect typelibs, and html documentation from xpidl files generating xpt files on windows a google groups post with instructions on how to use variable
-length argument lists using xpidl.
Using the Mozilla symbol server
the rest of values are based on the contents of the application.ini file under the [app] heading: for example, the thunderbird 3.1b2 release with name=thunderbird, version=3.1b2, buildid=20100430125415 would have a filename of "thunderbird-3.1b2
-linux-20100430125415-symbols.txt" under the thunderbird directory at symbols.mozilla.org.
... the source server in addition to symbols, mozilla also has a source server, letting you do source
-level debugging and inspection on demand.
Using Objective-C from js-ctypes
$ clang
-lobjc -framework appkit test.c && ./a.out converting c code to js-ctypes code now we have working c code, it can be converted into js-ctypes in a relatively straightforward manner.
... { invoke: ctypes.voidptr_t }, { descriptor: block_descriptor_1.ptr } ]); var block_const = { block_has_copy_dispose: 1 << 25, block_has_ctor: 1 << 26, block_is_global: 1 << 28, block_has_stret: 1 << 29, block_has_signature: 1 << 30 }; // based on work from here: https://github.com/trueinteractions/tint2/blob/f6ce18b16ada165b98b07869314dad1d7bee0252/modules/bridge/core.js#l370
-l394 var bl = block_literal_1(); // set the class of the instance bl.isa = _nsconcreteglobalblock; // global flags bl.flags = block_const.block_has_stret; bl.reserved = 0; bl.invoke = afunctypeptr; // create descriptor var desc = block_descriptor_1(); desc.reserved = 0; desc.size = block_literal_1.size; // set descriptor into block literal bl.descriptor = desc.address(); return b...
Standard OS Libraries
gtk+ is the toolkit to build apps, gdk is more low
-level.
... // placeholder - example soon to come x11 x11 runs primarily on unix® and unix
-like operating systems like linux, all of the bsd variants, sun solaris both native 32 and 64 bit support, solaris x86, mac os x (via darwin) as well as other platforms like os/2 and cygwin.
Plug-in Basics - Plugins
about distributions: example debian 64bit probably use: /lib/x86_64
-linux-gnu/ --> for 64 libs /lib/i386
-linux-gnu/ --> for 32 libs if exist /lib32/ --> this is symlinked (or bind mounted) desired proper directory /lib64/ --> this is symlinked (or bind mounted) desired proper directory more in https://wiki.debian.org/multiarch/thecaseformultiarch if something wrong, please edit.
... var plugin = mimetype.enabledplugin; if (plugin) { // yes, so show the data in
-line document.writeln("here\'s a movie: <object data='mymovie.swf' height='100' width='100'></object>"); } else { // no, so provide a link to the data document.writeln("<a href='mymovie.swf'>click here</a> to see a movie."); } } else { // no, so tell them so document.writeln("sorry, can't show you this movie."); } overview of plug-in structure this section is an ove...
Plugin Roadmap for Firefox - Plugins
the last remaining npapi plugin, adobe flash, has announced an end-of
-life plan.
... see also mozilla firefox october 2015 - npapi plugins in firefox july 2016 - reducing adobe flash usage in firefox july 2017 - firefox roadmap for flash end-of
-life adobe flash november 2015 - flash, html5 and open web standards july 2017 - flash & the future of interactive content google chrome flash roadmap sep 2013 - saying goodbye to our old friend npapi may 2014 - update on npapi deprecation november 2014 - the final countdown for npapi august 2016 - flash and chrome december 2016 - roll-out plan for html5 by default july 2017 - sayi...
Animation inspector example: CSS transitions - Firefox Developer Tools
firefox
-logo-animation example animation using css transitions.
..."icon"/> <span class="note">firefox developer edition</span> </div> css content .channel { padding: 2em; margin: 0.5em; box-shadow: 1px 1px 5px #808080; margin: 1.5em; } .channel > * { vertical-align: middle; line-height: normal; } .icon { width: 50px; height: 50px; filter: grayscale(100%); transition: transform 750ms ease-in, filter 750ms ease-in-out; } .note { margin
-left: 1em; font: 1.5em "open sans",arial,sans-serif; overflow: hidden; white-space: nowrap; display: inline-block; opacity: 0; width: 0; transition: opacity 500ms 150ms, width 500ms 150ms; } .icon#selected { filter: grayscale(0%); transform: scale(1.5); } .icon#selected+span { opacity: 1; width: 300px; } javascript content function toggleselection(e) { if (e.button != ...
Animation inspector example: Web Animations API - Firefox Developer Tools
firefox
-logo-animation example animation using the web animations api.
...g src="https://udn.realityripple.com/samples/e6/a96484b5c3.png" id="icon"/> <span id="note">firefox developer edition</span> </div> css content .channel { padding: 2em; margin: 0.5em; box-shadow: 1px 1px 5px #808080; margin: 1.5em; } .channel > * { vertical-align: middle; line-height: normal; } #icon { width: 50px; height: 50px; filter: grayscale(100%); } #note { margin
-left: 1em; font: 1.5em "open sans",arial,sans-serif; overflow: hidden; white-space: nowrap; display: inline-block; opacity: 0; width: 0; } javascript content var iconkeyframeset = [ { transform: 'scale(1)', filter: 'grayscale(100%)'}, { filter: 'grayscale(100%)', offset: 0.333}, { transform: 'scale(1.5)', offset: 0.666 }, { transform: 'scale(1.5)', filter: 'grayscale(0%)'} ]...
CSSStyleSheet.insertRule() - Web APIs
see browser compatibility for details.) return value the newly inserted rule's index within the stylesheet's rule
-list.
... if rule is @namespace and the rule
-list has more than just @import at-rules and/or @namespace at-rules, the method aborts with an invalidstateerror.
Using dynamic styling information - Web APIs
however, this property only returns style attributes that have been set in
-line (e.g, <td style="background-color: lightblue"> returns the string "background-color:lightblue", or directly for that element using element.style.propertyname, even though there may be other styles on the element from a stylesheet).
...it represents the in
-line styles on a particular element.
Using the CSS Typed Object Model - Web APIs
</p> <dl id="regurgitation"></dl> // get the element const myelement = document.queryselector('a'); // get the <dl> we'll be populating const styleslist = document.queryselector('#regurgitation'); // retrieve all computed styles with computedstylemap() const allcomputedstyles = myelement.computedstylemap(); // array of properties we're interested in const ofinterest = ['font-weight', 'border
-left-color', 'color', '--color']; // iterate through our properties of interest for ( let i = 0; i < ofinterest.length; i++ ) { // properties const cssproperty = document.createelement('dt'); cssproperty.appendchild(document.createtextnode(ofinterest[i])); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.cre...
...atetextnode( allcomputedstyles.get(ofinterest[i]))); styleslist.appendchild(cssvalue); } we included border
-left-color to demonstrate that, had we included all the properties, every value that defaults to currentcolor (including caret-color, outline-color, text-decoration-color, column-rule-color, etc.) would return rgb(255, 0, 0).
CanvasRenderingContext2D.drawImage() - Web APIs
dx the x-axis coordinate in the destination canvas at which to place the top
-left corner of the source image.
... dy the y-axis coordinate in the destination canvas at which to place the top
-left corner of the source image.
CanvasRenderingContext2D.drawWindow() - Web APIs
top
-level browsed documents are usually not transparent because the user's background-color preference is applied, but iframes are transparent if the page doesn't set a background.
...would draw the contents of the current window, in the rectangle (0,0,100,200) in pixels relative to the top
-left of the viewport, on a white background, into the canvas.
CanvasRenderingContext2D.putImageData() - Web APIs
dirtyx optional horizontal position (x coordinate) of the top
-left corner from which the image data will be extracted.
... dirtyy optional vertical position (y coordinate) of the top
-left corner from which the image data will be extracted.
Drawing shapes with canvas - Web APIs
x and y specify the position on the canvas (relative to the origin) of the top
-left corner of the rectangle.
... rect(x, y, width, height) draws a rectangle whose top
-left corner is specified by (x, y) with the specified width and height.
Canvas API - Web APIs
the fillrect() method places its top
-left corner at (10, 10), and gives it a size of 150 units wide by 100 tall.
... html5 canvas deep dive a hands-on, book
-length introduction to the canvas api and webgl.
Crypto.subtle - Web APIs
the crypto.subtle read-only property returns a subtlecrypto which can then be used to perform low
-level cryptographic operations.
... syntax var crypto = crypto.subtle; value a subtlecrypto object you can use to interact with the web crypto api's low
-level cryptography features.
DataTransferItemList.DataTransferItem() - Web APIs
paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri
-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchil...
...drop: html = " + s); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri
-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
DataTransferItemList.add() - Web APIs
paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri
-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendc...
...drop: html = " + s); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri
-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
DataTransferItemList.clear() - Web APIs
paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri
-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendc...
...drop: html = " + s); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri
-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
DataTransferItemList.length - Web APIs
paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri
-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchil...
...drop: html = " + s); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri
-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
DataTransferItemList.remove() - Web APIs
paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri
-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendc...
...drop: html = " + s); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri
-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
Document.createElement() - Web APIs
wcontent = document.createtextnode("hi there and greetings!"); // add the text node to the newly created div newdiv.appendchild(newcontent); // add the newly created element and its content into the dom const currentdiv = document.getelementbyid("div1"); document.body.insertbefore(newdiv, currentdiv); } web component example the following example snippet is taken from our expanding
-list-web-component example (see it live also).
... } } // define the new element customelements.define('expanding
-list', expandinglist, { extends: "ul" }); if we wanted to create an instance of this element programmatically, we'd use a call along the following lines: let expandinglist = document.createelement('ul', { is : 'expanding
-list' }) the new element will be given an is attribute whose value is the custom element's tag name.
Document.execCommand() - Web APIs
formatblock adds an html block
-level element around the line containing the current selection, replacing the block element containing the line if one exists (in firefox, <blockquote> is the exception — it will wrap any containing block element).
...virtually all block
-level elements can be used.
Document: readystatechange event - Web APIs
bubbles no cancelable no interface event event handler property onreadystatechange examples live example html <div class="controls"> <button id="reload" type="button">reload</button> </div> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents" rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event
-log { grid-area: log; } .event
-log-contents { resize: none; } label, button { display: block; } #reload { height: 2rem; } ...
... js const log = document.queryselector('.event
-log-contents'); const reload = document.queryselector('#reload'); reload.addeventlistener('click', () => { log.textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment html living standardthe definition of 'readystatechange' in that specification.
Examples of web and XML development using the DOM - Web APIs
var ss = document.stylesheets; for(var i = 0; i < ss.length; i++) { for(var j = 0; j < ss[i].cssrules.length; j++) { dump( ss[i].cssrules[j].selectortext + "\n" ); } } for a document with a single stylesheet in which the following three rules are defined: body { background-color: darkblue; } p { font-face: arial; font-size: 10pt; margin
-left: .125in; } #lumpy { display: none; } this script outputs the following: body p #lumpy example 5: event propagation this example demonstrates how events fire and are handled in the dom in a very simple way.
...dth = document.getelementbyid("t2"); var w_style = document.defaultview.getcomputedstyle(refdiv, null).getpropertyvalue("width"); txtwidth.value = w_style; var txtbackgroundcolor = document.getelementbyid("t3"); var b_style = document.defaultview.getcomputedstyle(refdiv, null).getpropertyvalue("background-color"); txtbackgroundcolor.value = b_style; } </script> <style> #d1 { margin
-left: 10px; background-color: rgb(173, 216, 230); height: 20px; max-width: 20px; } </style> </head> <body> <div id="d1"> </div> <form action=""> <p> <button type="button" onclick="cstyles();">getcomputedstyle</button> height<input id="t1" type="text" value="1" /> max-width<input id="t2" type="text" value="2" /> bg-color<input id="t3" type="text" value="3" /> </p> ...
Element: compositionend event - Web APIs
('input[type="text"]'); inputelement.addeventlistener('compositionend', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents" rows="8" cols="25"></textarea> <button class="clear
-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event
-log { grid-area: log; } .event
-log-contents { resize: none; } label, button { display: block; } ...
... input[type="text"] { margin: .5rem 0; } kbd { border-radius: 3px; padding: 1px 2px 0; border: 1px solid black; } js const inputelement = document.queryselector('input[type="text"]'); const log = document.queryselector('.event
-log-contents'); const clearlog = document.queryselector('.clear
-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element: compositionstart event - Web APIs
input[type="text"]'); inputelement.addeventlistener('compositionstart', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents" rows="8" cols="25"></textarea> <button class="clear
-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event
-log { grid-area: log; } .event
-log-contents { resize: none; } label, button { display: block; } ...
... input[type="text"] { margin: .5rem 0; } kbd { border-radius: 3px; padding: 1px 2px 0; border: 1px solid black; } js const inputelement = document.queryselector('input[type="text"]'); const log = document.queryselector('.event
-log-contents'); const clearlog = document.queryselector('.clear
-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element: compositionupdate event - Web APIs
nput[type="text"]'); inputelement.addeventlistener('compositionupdate', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents" rows="8" cols="25"></textarea> <button class="clear
-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event
-log { grid-area: log; } .event
-log-contents { resize: none; } label, button { display: block; } ...
... input[type="text"] { margin: .5rem 0; } kbd { border-radius: 3px; padding: 1px 2px 0; border: 1px solid black; } js const inputelement = document.queryselector('input[type="text"]'); const log = document.queryselector('.event
-log-contents'); const clearlog = document.queryselector('.clear
-log'); clearlog.addeventlistener('click', () => { log.textcontent = ''; }); function handleevent(event) { log.textcontent = log.textcontent + `${event.type}: ${event.data}\n`; } inputelement.addeventlistener('compositionstart', handleevent); inputelement.addeventlistener('compositionupdate', handleevent); inputelement.addeventlistener('compositionend', handleevent); result specifications specification status ui events working draft ...
Element: error event - Web APIs
examples live example html <div class="controls"> <button id="img-error" type="button">generate image error</button> <img class="bad-img" /> </div> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents" rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event
-log { grid-area: log; } .event
-log-contents { resize: none; } label, button { display: bl...
...ock; } button { height: 2rem; margin: .5rem; } img { width: 0; height: 0; } js const log = document.queryselector('.event
-log-contents'); const badimg = document.queryselector('.bad-img'); badimg.addeventlistener('error', (event) => { log.textcontent = log.textcontent + `${event.type}: loading image\n`; console.log(event) }); const imgerror = document.queryselector('#img-error'); imgerror.addeventlistener('click', () => { badimg.setattribute('src', 'i-dont-exist'); }); result specifications specification status ui events working draft ...
Element.scrollLeft - Web APIs
if the element's direction is rtl (right-to
-left), then scrollleft is 0 when the scrollbar is at its rightmost position (at the start of the scrolled content), and then increasingly negative as you scroll towards the end of the content.
... if specified as a value less than 0 (greater than 0 for right-to
-left elements), scrollleft is set to 0.
FileReader: abort event - Web APIs
roperty filereader.onabort examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event
-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .example { display: grid; grid-template-areas: "select log" "preview log"; } .f...
...ile-select { grid-area: select; } .preview { grid-area: preview; } .event
-log { grid-area: log; } .event
-log>label { display: block; } .event
-log-contents { resize: none; } js const fileinput = document.queryselector('input[type="file"]'); const preview = document.queryselector('img.preview'); const eventlog = document.queryselector('.event
-log-contents'); const reader = new filereader(); function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}: ${event.loaded} bytes transferred\n`; if (event.type === "load") { preview.src = reader.result; } } function addlisteners(reader) { reader.addeventlistener('loadstart', handleevent); reader.addeventlistener('load', handleevent); reader.addeventlistener('loadend', ha...
FileReader: load event - Web APIs
property filereader.onload examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event
-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .example { display: grid; grid-template-areas: "select log" "preview log"; } .f...
...ile-select { grid-area: select; } .preview { grid-area: preview; } .event
-log { grid-area: log; } .event
-log>label { display: block; } .event
-log-contents { resize: none; } js const fileinput = document.queryselector('input[type="file"]'); const preview = document.queryselector('img.preview'); const eventlog = document.queryselector('.event
-log-contents'); const reader = new filereader(); function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}: ${event.loaded} bytes transferred\n`; if (event.type === "load") { preview.src = reader.result; } } function addlisteners(reader) { reader.addeventlistener('loadstart', handleevent); reader.addeventlistener('load', handleevent); reader.addeventlistener('loadend', ha...
FileReader: loadend event - Web APIs
perty filereader.onloadend examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event
-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .example { display: grid; grid-template-areas: "select log" "preview log"; } .f...
...ile-select { grid-area: select; } .preview { grid-area: preview; } .event
-log { grid-area: log; } .event
-log>label { display: block; } .event
-log-contents { resize: none; } js const fileinput = document.queryselector('input[type="file"]'); const preview = document.queryselector('img.preview'); const eventlog = document.queryselector('.event
-log-contents'); const reader = new filereader(); function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}: ${event.loaded} bytes transferred\n`; if (event.type === "load") { preview.src = reader.result; } } function addlisteners(reader) { reader.addeventlistener('loadstart', handleevent); reader.addeventlistener('load', handleevent); reader.addeventlistener('loadend', ha...
FileReader: loadstart event - Web APIs
rty filereader.onloadstart examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event
-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .example { display: grid; grid-template-areas: "select log" "preview log"; } .f...
...ile-select { grid-area: select; } .preview { grid-area: preview; } .event
-log { grid-area: log; } .event
-log>label { display: block; } .event
-log-contents { resize: none; } js const fileinput = document.queryselector('input[type="file"]'); const preview = document.queryselector('img.preview'); const eventlog = document.queryselector('.event
-log-contents'); const reader = new filereader(); function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}: ${event.loaded} bytes transferred\n`; if (event.type === "load") { preview.src = reader.result; } } function addlisteners(reader) { reader.addeventlistener('loadstart', handleevent); reader.addeventlistener('load', handleevent); reader.addeventlistener('loadend', ha...
FileReader: progress event - Web APIs
erty filereader.onprogress examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event
-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .example { display: grid; grid-template-areas: "select log" "preview log"; } .f...
...ile-select { grid-area: select; } .preview { grid-area: preview; } .event
-log { grid-area: log; } .event
-log>label { display: block; } .event
-log-contents { resize: none; } js const fileinput = document.queryselector('input[type="file"]'); const preview = document.queryselector('img.preview'); const eventlog = document.queryselector('.event
-log-contents'); const reader = new filereader(); function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}: ${event.loaded} bytes transferred\n`; if (event.type === "load") { preview.src = reader.result; } } function addlisteners(reader) { reader.addeventlistener('loadstart', handleevent); reader.addeventlistener('load', handleevent); reader.addeventlistener('loadend', ha...
Using FormData Objects - Web APIs
formdata object yourself, instantiating it then appending fields to it by calling its append() method, like this: var formdata = new formdata(); formdata.append("username", "groucho"); formdata.append("accountnum", 123456); // number 123456 is immediately converted to a string "123456" // html file input, chosen by user formdata.append("userfile", fileinputelement.files[0]); // javascript file
-like object var content = '<a id="a"><b id="b">hey!</b></a>'; // the body of the new file...
...a blob object represents a file
-like object of immutable, raw data.
GeolocationCoordinates.longitude - Web APIs
let button = document.getelementbyid("get
-location"); let lattext = document.getelementbyid("latitude"); let longtext = document.getelementbyid("longitude"); button.addeventlistener("click", function() { navigator.geolocation.getcurrentposition(function(position) { let lat = position.coords.latitude; let long = position.coords.longitude; lattext.innertext = lat.tofixed(2); longtext.innertext = long.tofixed(2); }); });...
...</p> <button id="get
-location"> get my location </button> result take this example for a test drive here: specifications specification status comment geolocation apithe definition of 'coordinates.longitude' in that specification.
HTMLElement: animationcancel event - Web APIs
queryselector('.animated'); animated.onanimationcancel = () => { console.log('animation canceled'); }; animated.style.display = 'none'; live example html <div class="animation-example"> <div class="container"> <p class="animation">you chose a cold night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event
-log"></div> </div> css .container { height: 3rem; } .event
-log { width: 25rem; height: 2rem; border: 1px solid black; margin: 0.2rem; padding: 0.2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation-iteration-count: 2; } @keyframes slidein { from { transform: translatex(100%) scalex(3); } to { transform: translatex(0) scalex(1);...
... } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event
-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iterationcount = 0; animation.addeventlistener('animationstart', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.textcontent = `${animationeventlog.textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.te...
HTMLElement: animationend event - Web APIs
r property: const animated = document.queryselector('.animated'); animated.onanimationend = () => { console.log('animation ended'); }; live example html <div class="animation-example"> <div class="container"> <p class="animation">you chose a cold night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event
-log"></div> </div> css .container { height: 3rem; } .event
-log { width: 25rem; height: 2rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation-iteration-count: 2; } @keyframes slidein { from { margin
-left: 100%; width: 300%; } to { margin
-left: 0%; width: 100%; } }...
... js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event
-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iterationcount = 0; animation.addeventlistener('animationstart', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.textcontent = `${animationeventlog.textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.textcont...
HTMLElement: animationiteration event - Web APIs
ncount = 0; animated.onanimationiteration = () => { iterationcount++; console.log(`animation iteration count: ${iterationcount}`); }; live example html <div class="animation-example"> <div class="container"> <p class="animation">you chose a cold night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event
-log"></div> </div> css .container { height: 3rem; } .event
-log { width: 25rem; height: 2rem; border: 1px solid black; margin: 0.2rem; padding: 0.2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation-iteration-count: 2; } @keyframes slidein { from { transform: translatex(100%) scalex(3); } to { transform: translatex(0) scalex(1);...
... } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event
-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iterationcount = 0; animation.addeventlistener('animationstart', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.textcontent = `${animationeventlog.textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.te...
HTMLElement: animationstart event - Web APIs
start: const animated = document.queryselector('.animated'); animated.onanimationstart = () => { console.log('animation started'); }; live example html <div class="animation-example"> <div class="container"> <p class="animation">you chose a cold night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event
-log"></div> </div> css .container { height: 3rem; } .event
-log { width: 25rem; height: 2rem; border: 1px solid black; margin: 0.2rem; padding: 0.2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation-iteration-count: 2; } @keyframes slidein { from { transform: translatex(100%) scalex(3); } to { transform: translatex(0) scalex(1);...
... } } js const animation = document.queryselector('p.animation'); const animationeventlog = document.queryselector('.animation-example>.event
-log'); const applyanimation = document.queryselector('.animation-example>button.activate'); let iterationcount = 0; animation.addeventlistener('animationstart', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation started' `; }); animation.addeventlistener('animationiteration', () => { iterationcount++; animationeventlog.textcontent = `${animationeventlog.textcontent}'animation iterations: ${iterationcount}' `; }); animation.addeventlistener('animationend', () => { animationeventlog.textcontent = `${animationeventlog.textcontent}'animation ended'`; animation.classlist.remove('active'); applyanimation.te...
HTMLElement.offsetLeft - Web APIs
for block
-level elements, offsettop, offsetleft, offsetwidth, and offsetheight describe the border box of an element relative to the offsetparent.
... however, for inline
-level elements (such as span) that can wrap from one line to the next, offsettop and offsetleft describe the positions of the first border box (use element.getclientrects() to get its width and height), while offsetwidth and offsetheight describe the dimensions of the bounding border box (use element.getboundingclientrect() to get its position).
HTMLImageElement - Web APIs
htmlimageelement.usemap a domstring reflecting the usemap html attribute, containing the page
-local url of the <map> element describing the image map to use.
... the page
-local url is a pound (hash) symbol (#) followed by the id of the <map> element, such as #my-map-element.
HTMLMediaElement: loadstart event - Web APIs
bubbles no cancelable no interface event event handler property onloadstart examples live example html <div class="example"> <button type="button">load video</button> <video controls width="250"></video> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents"></textarea> </div> </div> css .event
-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .example { display: grid; grid-template-areas: "button log" "video log"; } button { grid-area: button; width: 10rem; margin: .5rem 0; } ...
...video { grid-area: video; } .event
-log { grid-area: log; } .event
-log>label { display: block; } js const loadvideo = document.queryselector('button'); const video = document.queryselector('video'); const eventlog = document.queryselector('.event
-log-contents'); let source = null; function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}\n`; } video.addeventlistener('loadstart', handleevent); video.addeventlistener('progress', handleevent); video.addeventlistener('canplay', handleevent); video.addeventlistener('canplaythrough', handleevent); loadvideo.addeventlistener('click', () => { if (source) { document.location.reload(); } else { loadvideo.textcontent = "reset example"; source = document.createelement('s...
HTMLMediaElement: progress event - Web APIs
bubbles no cancelable no interface event event handler property onprogress examples live example html <div class="example"> <button type="button">load video</button> <video controls width="250"></video> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents"></textarea> </div> </div> css .event
-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .example { display: grid; grid-template-areas: "button log" "video log"; } button { grid-area: button; width: 10rem; margin: .5rem 0; } video...
... { grid-area: video; } .event
-log { grid-area: log; } .event
-log>label { display: block; } javascript const loadvideo = document.queryselector('button'); const video = document.queryselector('video'); const eventlog = document.queryselector('.event
-log-contents'); let source = null; function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}\n`; } video.addeventlistener('loadstart', handleevent); video.addeventlistener('progress', handleevent); video.addeventlistener('canplay', handleevent); video.addeventlistener('canplaythrough', handleevent); loadvideo.addeventlistener('click', () => { if (source) { document.location.reload(); } else { loadvideo.textcontent = "reset example"; source = document.createelement...
HTMLScriptElement.referrerPolicy - Web APIs
if referrerpolicy is not explicitly specified on the <script> element, it will adopt a higher
-level referrer policy, i.e.
...if a higher
-level policy is not available, the empty string is treated as being equivalent to no-referrer-when-downgrade.
Dragging and Dropping Multiple Items - Web APIs
for example: var dt = event.datatransfer; dt.mozsetdataat("text/uri
-list", "url1", 0); dt.mozsetdataat("text/plain", "url1", 0); dt.mozsetdataat("text/uri
-list", "url2", 1); dt.mozsetdataat("text/plain", "url2", 1); dt.mozsetdataat("text/uri
-list", "url3", 2); dt.mozsetdataat("text/plain", "url3", 2); // [item1] data=url1, index=0 // [item2] data=url2, index=1 // [item3] data=url3, index=2 after you added three items in two different formats, dt.mozclea...
...rdataat("text/uri
-list", 1); dt.mozcleardataat("text/plain", 1); you've removed the second item clearing all types, then the old third item becomes new second item, and its index decreases.
Ajax navigation example - Web APIs
content.php"; ?> <p>this paragraph is shown only when the navigation starts from <strong>third_page.php</strong>.</p> <div id="ajax-content"> <?php echo $page_content; ?> </div> <p>this paragraph is shown only when the navigation starts from <strong>third_page.php</strong>.</p> <?php include "include/after_content.php"; echo "</body>\n</html>"; } ?> css/style.css: #ajax
-loader { position: fixed; display: table; top: 0; left: 0; width: 100%; height: 100%; } #ajax
-loader > div { display: table-cell; width: 100%; height: 100%; vertical-align: middle; text-align: center; background-color: #000000; opacity: 0.65; } include/after_content.php: <p>this is the footer.
..., 505: "http version not supported", 506: "variant also negotiates (experimental)", 507: "insufficient storage", 508: "loop detected", 509: "unassigned", 510: "not extended", 511: "network authentication required" }; var oreq, bisloading = false, bupdateurl = false; oloadingbox.id = "ajax
-loader"; ocover.onclick = abortreq; oloadingimg.src = "data:image/gif;base64,r0lgodlheaaqapiaap///waaamlcwkjcqgaaagjiyokcgpkskih/c05fvfndqvbfmi4waweaaaah/hpdcmvhdgvkihdpdgggywphegxvywquaw5mbwah+qqjcgaaacwaaaaaeaaqaaadmwi63p4wyklre2mioggznadomgyjrbexwroumcg2lmdewnhqlvsyod2mbzkydadka+diaaah+qqjcgaaacwaaaaaeaaqaaadnai63p5ojcegg4qmu7dmikrxqlfuydezigbmrvsaqhwctxxf7weyb4ag1xjihkmzsiukkhiaifkecqoa...
IDBObjectStoreSync - Web APIs
data_err if this object store uses out-of
-line keys, and the key parameter was not passed.
... data_err if this object store uses out-of
-line keys and no key generator, but no key was given.
IntersectionObserver - Web APIs
the intersectionobserver interface of the intersection observer api provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top
-level document's viewport.
...if no root value was passed to the constructor or its value is null, the top
-level document's viewport is used.
KeyboardEvent.key - Web APIs
html <div class="fx"> <div> <textarea rows="5" name="test-target" id="test-target"></textarea> <button type="button" name="btn-clear-console" id="btn-clear-console">clear console</button> </div> <div class="flex"> <pre id="console
-log"></pre> </div> </div> css .fx { -webkit-display: flex; display: flex; margin
-left: -20px; margin-right: -20px; } .fx > div { padding
-left: 20px; padding-right: 20px; } .fx > div:first-child { width: 30%; } .flex { -webkit-flex: 1; flex: 1; } #test-target { display: block; width: 100%; margin-bottom: 10px; } javascript let textarea = document.getelementbyid('...
...test-target'), consolelog = document.getelementbyid('console
-log'), btnclearconsole = document.getelementbyid('btn-clear-console'); function logmessage(message) { document.getelementbyid("console
-log").innerhtml += message + "<br>"; } textarea.addeventlistener('keydown', (e) => { if (!e.repeat) logmessage(`key "${e.key}" pressed [event: keydown]`); else logmessage(`key "${e.key}" repeating [event: keydown]`); }); textarea.addeventlistener('beforeinput', (e) => { logmessage(`key "${e.data}" about to be input [event: beforeinput]`); }); textarea.addeventlistener('input', (e) => { logmessage(`key "${e.data}" input [event: input]`); }); textarea.addeventlistener('keyup', (e) => { logmessage(`key "${e.key}" released [event: keyup]`); }); btnclearconsole.addeventlist...
PaymentAddress.region - Web APIs
the read-only region property of the paymentaddress interface returns a string containing the top
-level administrative subdivision of the country in which the address is located.
... syntax var paymentregion = paymentaddress.region; value a domstring specifying the top
-level administrative subdivision within the country in which the address is located.
performance.now() - Web APIs
starting with firefox 79, high resolution timers can be used if you cross-origin isolate your document using the cross-origin-opener-policy and cross-origin-embedder-policy headers: cross-origin-opener-policy: same-origin cross-origin-embedder-policy: require-corp these headers ensure a top
-level document does not share a browsing context group with cross-origin documents.
... coop process-isolates your document and potential attackers can't access to your global object if they were opening it in a popup, preventing a set of cross-origin attacks dubbed xs
-leaks.
RTCIceCandidate.address - Web APIs
you can't specify the address in the options object, but the address is automatically extracted from the candidate a
-line, if it's formatted properly.
... usage notes consider this sdp attribute line (a
-line) which describes an ice candidate: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the fifth field, "192.168.0.56" is the ip address in this candidate's a
-line string.
RTCIceCandidate.protocol - Web APIs
the value is automatically extracted from the candidate a
-line, if it's formatted properly.
... usage notes here's an example candidate a
-line from an ice transaction: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the third field, "udp", is the protocol type, indicating that the candidate would use the udp transport protocol.
RTCIceCandidate.type - Web APIs
you can't specify the value of type in the options object, but the address is automatically extracted from the candidate a
-line, if it's formatted properly, being taken from its cand-type field.
... if type is null, that information was missing from the candidate's a
-line, which will cause rtcpeerconnection.addicecandidate() to throw an operationerror exception.
RTCIceComponent - Web APIs
these strings are mapped to corresponding numeric values as they appear in the candidate a
-line in sdp.
...an rtcicecomponent of this value corresponds to the component id field in the candidate a
-line with the value 1.
RTCPeerConnection.addIceCandidate() - Web APIs
the end-of-candidates notification is transmitted to the remote peer using a candidate with an a
-line value of end-of-candidates.
... if no candidate object is specified, or its value is null, an end-of-candidates signal is sent to the remote peer using the end-of-candidates a
-line, formatted simply like this: a=end-of-candidates deprecated parameters in older code and documentation, you may see a callback-based version of this function.
RTCPeerConnection.onsignalingstatechange - Web APIs
andler for the signalingstatechange event using addeventlistener(): myrtcpeerconnection.addeventlistener("signalingstatechange", mysignalingstatechangehandler); or, using an anonymous (inline) handler: myrtcpeerconnection.addeventlistener("signalingstatechange", event => { /* handle the event here */ }); example this snippet shows a handler for signalingstatechange that looks for the "have
-local-pranswer" signaling state—indicating that a remote offer has been received and a local description of type "pranswer" has been applied in response.
... pc.onsignalingstatechange = function(event) { if (pc.signalingstate === "have
-local-pranswer") { // setlocaldescription() has been called with an answer } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onsignalingstatechange' in that specification.
RTCPeerConnection - Web APIs
"have
-local-offer" the local peer has called rtcpeerconnection.setlocaldescription(), passing in sdp representing an offer (usually created by calling rtcpeerconnection.createoffer()), and the offer has been applied successfully.
... "have
-local-pranswer" the offer sent by the remote peer has been applied and an answer has been created (usually by calling rtcpeerconnection.createanswer()) and applied by calling rtcpeerconnection.setlocaldescription().
RTCRtpTransceiver.direction - Web APIs
the sdp contains an a
-line which specifies the directionality.
... for example, if the direction is specified as "sendrecv", the corresponding sdp a
-line is: a=sendrecv specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.direction' in that specification.
Sensor APIs - Web APIs
these sensor types are referred to as low
-level and high
-level respectively.
... sensor permissions sensor permission/feature policy name absoluteorientationsensor 'accelerometer', 'gyroscope', and 'magnetometer' accelerometer 'accelerometer' ambientlightsensor 'ambient
-light-sensor' gyroscope 'gyroscope' linearaccelerationsensor 'accelerometer' magnetometer 'magnetometer' relativeorientationsensor 'accelerometer', and 'gyroscope' readings sensor readings are received through the sensor.onreading callback which is inherited by all sensor types.
SpeechSynthesis: voiceschanged event - Web APIs
you can use the voiceschanged event in an addeventlistener method: var synth = window.speechsynthesis; synth.addeventlistener('voiceschanged', function() { var voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.setattribute('data
-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } }); or use the onvoiceschanged event handler property: synth.onvoiceschanged = function() { var voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang...
... + ')'; option.setattribute('data
-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } specifications specification status comment web speech apithe definition of 'speech synthesis events' in that specification.
Using readable streams - Web APIs
note: this article assumes that you understand the use cases of readable streams, and are aware of the high
-level concepts.
... // fetch the original image fetch('png
-logo.png') // retrieve its body as readablestream .then(response => response.body) // create a gray-scaled png stream out of the original .then(rs => logreadablestream('fetch response stream', rs)) .then(body => body.pipethrough(new pngtransformstream())) .then(rs => logreadablestream('png chunk stream', rs)) summary that explains the basics of “default” readable streams.
TextEncoder.prototype.encodeInto() - Web APIs
if the output allocation (typically within wasm heap) is expected to be short
-lived, it makes sense to simply allocate s.length * 3 bytes for the output, in which case the first conversion attempt is guaranteed to convert the whole string.
... if the output is expected to be long
-lived, it makes sense to compute minimum allocation rounduptobucketsize(s.length), the maximum allocation size s.length * 3, and to have a chosen (as a tradeoff between memory usage and speed) threshold t such that if rounduptobucketsize(s.length) + t >= s.length * 3, you simply allocate for s.length * 3.
UIEvent.layerX - Web APIs
> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordinates please click anywhere on the page.</p> <div id="d1"> <span>this is an un-positioned div so clicking it will return layerx/layery values almost the same as pagex/pagey values.</span> </div> <div id="d2"> <span>this is a positioned div so clicking it will return layerx/layery values that are relative to the top
-left corner of this positioned element.
...this is a positioned div so clicking it will return layerx/layery values that are relative to the top
-left corner of this positioned element.
UIEvent.layerY - Web APIs
> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordinates please click anywhere on the page.</p> <div id="d1"> <span>this is an un-positioned div so clicking it will return layerx/layery values almost the same as pagex/pagey values.</span> </div> <div id="d2"> <span>this is a positioned div so clicking it will return layerx/layery values that are relative to the top
-left corner of this positioned element.
...this is a positioned div so clicking it will return layerx/layery values that are relative to the top
-left corner of this positioned element.
UIEvent.pageY - Web APIs
e> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordinates please click anywhere on the page.</p> <div id="d1"> <span>this is an un-positioned div so clicking it will return layerx/layery values almost the same as pagex/pagey values.</span> </div> <div id="d2"> <span>this is a positioned div so clicking it will return layerx/layery values that are relative to the top
-left corner of this positioned element.
...this is a positioned div so clicking it will return layerx/layery values that are relative to the top
-left corner of this positioned element.
VisualViewport - Web APIs
note: only the top
-level window has a visual viewport that's distinct from the layout viewport.
... therefore, it's generally only the visualviewport object of the top
-level window that's useful.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
coordinates, normalized to [0, 1] gl.vertexattribpointer(2, 2, gl.unsigned_short, true, 20, 16); gl.enablevertexattribarray(2); //set the attributes in the vertex shader to the same indices gl.bindattriblocation(shaderprogram, 0, 'position'); gl.bindattriblocation(shaderprogram, 1, 'normal'); gl.bindattriblocation(shaderprogram, 2, 'texuv'); //since the attribute indices have changed, we must re
-link the shader //note that this will reset all uniforms that were previously set.
... gl.linkprogram(shaderprogram); or we can use the index provided by the graphics card instead of setting the index ourselves; this avoids the re
-linking of the shader program.
Introduction to WebRTC protocols - Web APIs
the lines of text that begin with a given letter are generally referred to as "letter
-lines".
... for example, lines providing media descriptions have the type "m", so those lines are referred to as "m
-lines." for more information to learn more about sdp, see the following useful resources: specification: rfc 4566: sdp: session description protocol iana registry of sdp parameters ...
Writing a WebSocket server in C# - Web APIs
concatenate it with "258eafa5-e914-47da-95ca-c5ab0dc85b11" (a special guid specified by rfc 6455) compute sha-1 and base64 hash of the new value write the hash back as the value of "sec-websocket-accept" response header in an http response if (new system.text.regularexpressions.regex("^get").ismatch(data)) { const string eol = "\r\n"; // http/1.1 defines the sequence cr lf as the end-of
-line marker byte[] response = encoding.utf8.getbytes("http/1.1 101 switching protocols" + eol + "connection: upgrade" + eol + "upgrade: websocket" + eol + "sec-websocket-accept: " + convert.tobase64string( system.security.cryptography.sha1.create().computehash( encoding.utf8.getbytes( new system.text.regularexpressions.reg...
....match(s, "sec-websocket-key: (.*)").groups[1].value.trim(); string swka = swk + "258eafa5-e914-47da-95ca-c5ab0dc85b11"; byte[] swkasha1 = system.security.cryptography.sha1.create().computehash(encoding.utf8.getbytes(swka)); string swkasha1base64 = convert.tobase64string(swkasha1); // http/1.1 defines the sequence cr lf as the end-of
-line marker byte[] response = encoding.utf8.getbytes( "http/1.1 101 switching protocols\r\n" + "connection: upgrade\r\n" + "upgrade: websocket\r\n" + "sec-websocket-accept: " + swkasha1base64 + "\r\n\r\n"); stream.write(response, 0, response.length); } else { ...
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
in advanced 3d games, a camera or camera
-like object could be used to determine what a non-player character can see, relying on the same rendering and physics engine used by player characters for non-player characters.
... the format for storing matrices is generally as a flat array in column-major order; that is, the values from the matrix are written starting with the top
-left corner and moving down to the bottom, then moving over to the right a row and repeating until all values are in the array.
Movement, orientation, and motion: A WebXR example - Web APIs
n(shaderprogram, 'uprojectionmatrix'), modelviewmatrix: gl.getuniformlocation(shaderprogram, 'umodelviewmatrix'), normalmatrix: gl.getuniformlocation(shaderprogram, 'unormalmatrix'), usampler: gl.getuniformlocation(shaderprogram, 'usampler') }, }; buffers = initbuffers(gl); texture = loadtexture(gl, 'https://cdn.glitch.com/a9381af1-18a9-495e-ad01-afddfd15d000%2ffirefox
-logo-solid.png?v=1575659351244'); xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl) }); if (session_type == "immersive-vr") { refspacetype = "local"; } else { refspacetype = "viewer"; } mat4.fromtranslation(cubematrix, viewerstartposition); vec3.copy(cubeorientation, viewerstartorientation); xrsession.requestreferencespace(refspacetype) .the...
...the displaymatrix() method is used for this; this function uses mathml to render the matrix, falling back to a more array
-like format if mathml isn't supported by the user's browser.
Web audio spatialization basics - Web APIs
we need to change the x orientation and the z orientation of the panner coordinates, to move around the y-axis for our left rotation: case 'rotate
-left': transform.rotatey -= degreesy; // 'left' is rotation about y-axis with negative angle increment z = panner.orientationz.value*math.cos(q) - panner.orientationx.value*math.sin(q); x = panner.orientationz.value*math.sin(q) + panner.orientationx.value*math.cos(q); y = panner.orientationy.value; panner.orientationx.value = x; panner.orientationy.value = y; panner.orientationz.v...
...break; case 'back': if (transform.zaxis > innerbound) { transform.zaxis -= 0.01; panner.positionz.value += 40; } break; case 'forward': if (transform.zaxis < outerbound) { transform.zaxis += 0.01; panner.positionz.value -= 40; } break; case 'rotate
-left': transform.rotatey -= degreesy; // 'left' is rotation about y-axis with negative angle increment z = panner.orientationz.value*math.cos(q) - panner.orientationx.value*math.sin(q); x = panner.orientationz.value*math.sin(q) + panner.orientationx.value*math.cos(q); y = panner.orientationy.value; panner.orientationx.value =...
Using the Web Speech API - Web APIs
n one you'll probably use is speechrecognition.onresult, which is fired once a successful result is received: recognition.onresult = function(event) { var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log('confidence: ' + event.results[0][0].confidence); } the second line here is a bit complex
-looking, so let's explain it step by step.
... function populatevoicelist() { voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data
-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } when we come to run the function, we do the following.
Window: error event - Web APIs
examples live example html <div class="controls"> <button id="script-error" type="button">generate script error</button> <img class="bad-img" /> </div> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents" rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event
-log { grid-area: log; } .event
-log-contents { resize: none; } label, button { display: bl...
...ock; } button { height: 2rem; margin: .5rem; } img { width: 0; height: 0; } js const log = document.queryselector('.event
-log-contents'); window.addeventlistener('error', (event) => { log.textcontent = log.textcontent + `${event.type}: ${event.message}\n`; console.log(event) }); const scripterror = document.queryselector('#script-error'); scripterror.addeventlistener('click', () => { const badcode = 'const s;'; eval(badcode); }); result specifications specification status ui events working draft ...
Window.getComputedStyle() - Web APIs
originally, css 2.0 defined the computed values as the "ready to be used" final values of properties after cascading and inheritance, but css 2.1 redefined them as pre
-layout, and used values as post
-layout.
...an example difference between pre- and post
-layout values includes the resolution of percentages for width or height, as those will be replaced by their pixel equivalent only for used values.
Window: load event - Web APIs
examples log a message when the page is fully loaded: window.addeventlistener('load', (event) => { console.log('page is fully loaded'); }); the same, but using the onload event handler property: window.onload = (event) => { console.log('page is fully loaded'); }; live example html <div class="controls"> <button id="reload" type="button">reload</button> </div> <div class="event
-log"> <label>event log:</label> <textarea readonly class="event
-log-contents" rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event
-log { grid-area: log; } .event
-log-contents { resize: none; } label, button { display: bl...
...ock; } #reload { height: 2rem; } js const log = document.queryselector('.event
-log-contents'); const reload = document.queryselector('#reload'); reload.addeventlistener('click', () => { log.textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment ui eventsthe definition of 'load' in that specific...
Window.open() - Web APIs
"javascript:" pseudo
-links become dysfunctional when javascript support is disabled or inexistent.
...javascript in links, jakob nielsen, december 2002 links & javascript living together in harmony, jeff howden, february 2002 comp.lang.javascript newsgroup discussion faq on "javascript:" links never use <a href="#" onclick="window.open(...);"> such pseudo
-link also breaks accessibility of links.
Worklet - Web APIs
the worklet interface is a lightweight version of web workers and gives developers access to low
-level parts of the rendering pipeline.
... web audio render thread web audio api animationworklet for creating scroll
-linked and other high performance procedural animations.
Sending and Receiving Binary Data - Web APIs
var req = new xmlhttprequest(); req.open("post", url, true); // set headers and mime-type appropriately req.setrequestheader("content
-length", 741); req.sendasbinary(abody); line 4 sets the content
-length header to 741, indicating that the data is 741 bytes long.
...in that case, you don't have to set the content
-length header yourself, as the information is fetched from the stream automatically: // make a stream from a file.
XMLHttpRequest: abort event - Web APIs
property onabort examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event
-log"></textarea> css .event
-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = docu...
...ment.queryselector('.event
-log'); function handleevent(e) { log.textcontent = log.textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addev...
XMLHttpRequest: error event - Web APIs
property onerror examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event
-log"></textarea> css .event
-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = docu...
...ment.queryselector('.event
-log'); function handleevent(e) { log.textcontent = log.textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addev...
XMLHttpRequest: load event - Web APIs
r property onload examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event
-log"></textarea> css .event
-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = docu...
...ment.queryselector('.event
-log'); function handleevent(e) { log.textcontent = log.textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addev...
XMLHttpRequest: loadend event - Web APIs
roperty onloadend examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event
-log"></textarea> css .event
-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = docu...
...ment.queryselector('.event
-log'); function handleevent(e) { log.textcontent = log.textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addev...
XMLHttpRequest: loadstart event - Web APIs
perty onloadstart examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event
-log"></textarea> css .event
-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = docu...
...ment.queryselector('.event
-log'); function handleevent(e) { log.textcontent = log.textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addev...
XMLHttpRequest: progress event - Web APIs
operty onprogress examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea readonly class="event
-log"></textarea> css .event
-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'); const log = docu...
...ment.queryselector('.event
-log'); function handleevent(e) { log.textcontent = log.textcontent + `${e.type}: ${e.loaded} bytes transferred\n`; } function addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addev...
XRInputSource - Web APIs
if the device isn't a gamepad
-like device, this property's value is null.
...a primary action may occur when the user presses a button, clicks on a touchpad or the top button of a thumb stick, or uses a hand gesture or spoken command that invokes the button
-like action.
XRViewport - Web APIs
the precise orientation of the coordinate system may vary with other surface types, but in webgl, the origin (0, 0) is located at the bottom
-left corner of the surface.
... thus the values specified in an xrviewport define a rectangle whose bottom
-left corner is at (x, y) and which extends width pixels toward the left and height pixels upward.
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
the result is a rendering context that looks like the diagram below: each time the xrviewerpose's views are iterated over for rendering, the rendering loop obtains an xrview for the left eye which has its top
-left corner at (0, 0) with its width and height being 1280x1440 pixels.
... the right eye it obtains has its top
-left corner at 1280, 0 with the same width and height: 1280x1440.
Using the alert role - Accessibility
dynamic changes that are less urgent should use a less aggressive method, such as aria
-live="polite" or other live region roles.
... session will expire in 2 minutes</p> // removing the 'hidden' class makes the element visible, which will make the screen reader announce the alert: document.getelementbyid("expirationwarning").classname = ""; working examples: alert role example using an aria alert box alert example using a modal aria dialog box notes using the alert role on an element implies that element has aria
-live="assertive".
Using the alertdialog role - Accessibility
this means that most of the instructions provided in the 'using the dialog role' technique are applicable to the alertdialog role as well: the alert dialog must always be given an accessible name (through aria
-labelledby or aria
-label) , and in most cases the alert text will have to be marked up as the alert dialog's accessible description (using aria-describedby).
... <div role="alertdialog" aria
-labelledby="dialog1title" aria-describedby="dialog1desc"> <div role="document" tabindex="0"> <h2 id="dialog1title">your login session is about to expire</h2> <p id="dialog1desc">to extend your session, click the ok button</p> <button>ok</button> </div> </div> working examples: tbd notes aria attributes used alertdialog aria
-labelledby aria-describedby related aria techni...
Using the aria-relevant attribute - Accessibility
the aria-relevant attribute is an optional value used to describe what types of changes have occurred to an aria
-live region, and which are relevant and should be announced.
... any change that is not relevant acts in the same manner it would if the aria
-live attribute were set to off.
Using the slider role - Accessibility
arrow keys should operate as follows (localization for right-to
-left languages should reverse the direction of the arrows): key(s) action right and up arrows increase the selected value left and down arrows decrease the selected value page up and page down optionally increase and decrease the value by a set amount (e.g.
... <label id="day
-label">days</label> <div class="day-slider"> <div id="day-handle" class="day-slider-handle" role="slider" aria
-labelledby="day
-label" aria-valuemin="1" aria-valuemax="7" aria-valuenow="2" aria-valuetext="monday"> </div> </div> the code snippet below shows a function that responds to user input and updates the aria-valuenow and aria-valuetext attributes: var daynames = ["su...
Using ARIA: Roles, states, and properties - Accessibility
bar tooltip landmark roles banner complementary contentinfo form main navigation region search live region roles alert log marquee status timer window roles alertdialog dialog states and properties widget attributes aria-autocomplete aria-checked aria-current aria-disabled aria-errormessage aria-expanded aria-haspopup aria-hidden aria-invalid aria
-label aria
-level aria-modal aria-multiline aria-multiselectable aria-orientation aria-placeholder 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-setsize microsoftedge-specific properties x-ms-aria-flowfrom ...
ARIA: application role - Accessibility
this role should only be used to define very dynamic and desktop
-like web applications.
... aria
-label used to provide the name of the application or purpose of the widget that is being exposed.
ARIA: cell role - Accessibility
examples <div role="table" aria
-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-rowcount="81"> <div id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</div> <div role="rowgroup"> <div role="row"> <span role="columnheader" aria-sort="none" aria-rowindex="1">aria role</span> <span role="columnheader" aria-sort="none" aria-rowindex="1">semantic ele...
... <table role="table" aria
-label="semantic elements" aria-describedby="semantic_elements_table_desc" aria-rowcount="81"> <caption id="semantic_elements_table_desc">semantic elements to use instead of aria's roles</caption> <thead role="rowgroup"> <tr role="row"> <th role="columnheader" aria-sort="none" aria-rowindex="1">aria role</th> <th role="columnheader" aria-sort="none" aria-rowind...
ARIA: button role - Accessibility
in some cases, for example buttons represented by icons, the accessible name may be provided from the aria
-label or aria
-labelledby attributes.
...the accessible name is either the content of the element or the value of an aria
-label or element referenced by an aria
-labelledby attribute, or description, if included.
Web applications and ARIA FAQ - Accessibility
here's the markup for a progress bar widget: <div id="percent
-loaded" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" /> this progress bar is built using a <div>, which is not very descriptive.
...var progressbar = document.getelementbyid("percent
-loaded"); // set its aria roles and states, so that assistive technologies know what kind of widget it is.
ARIA - Accessibility
here's the markup for a progress bar widget: <div id="percent
-loaded" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"> </div> this progress bar is built using a <div>, which has no meaning.
...var progressbar = document.getelementbyid("percent
-loaded"); // set its aria roles and states, // so that assistive technologies know what kind of widget it is.
Web Accessibility: Understanding Colors and Luminance - Accessibility
perception of color in a well
-lit room will be different than perception of that same color on that same computer screen in a dark room.
...css color module level 3 added hsl color values, stating "css3 adds numerical hue-saturation
-lightness (hsl) colors as a complement to numerical rgb colors.
-moz-image-rect - CSS: Cascading Style Sheets
#box1 { background-image: -moz-image-rect(url(https://mdn.mozillademos.org/files/12053/firefox.png), 0%, 50%, 50%, 0%); width:133px; height:136px; position:absolute; } this is the top
-left corner of the image.
... it defines a rectangle containing the top
-left quarter of the image in the file firefox.jpg.
:dir() - CSS: Cascading Style Sheets
/* selects any element with right-to
-left text */ :dir(rtl) { background-color: red; } the :dir() pseudo-class uses only the semantic value of the directionality, i.e., the one defined in the document itself.
... rtl target right-to
-left elements.
:nth-child() - CSS: Cascading Style Sheets
formal syntax :nth-child( <nth> [ of <complex-selector
-list> ]?
... )where <nth> = <an-plus-b> | even | odd<complex-selector
-list> = <complex-selector>#where <complex-selector> = <compound-selector> [ <combinator>?
:visited - CSS: Cascading Style Sheets
styling restrictions for privacy reasons, browsers strictly limit which styles you can apply using this pseudo-class, and how they can be used: allowable css properties are color, background-color, border-color, border-bottom-color, border
-left-color, border-right-color, border-top-color, column-rule-color, outline-color, text-decoration-color, and text-emphasis-color.
... html <a href="#test-visited
-link">have you visited this link yet?</a><br> <a href="">you've already visited this link.</a> css a { /* specify non-transparent defaults to certain properties, allowing them to be styled with the :visited state */ background-color: white; border: 1px solid white; } a:visited { background-color: yellow; border-color: hotpink; color: hotpink; } result specifications ...
@font-feature-values - CSS: Cascading Style Sheets
formal syntax @font-feature-values <family-name># { <feature-value-block
-list> }where <family-name> = <string> | <custom-ident>+<feature-value-block
-list> = <feature-value-block>+where <feature-value-block> = <feature-type> '{' <feature-value-declaration
-list> '}'where <feature-type> = @stylistic | @historical-forms | @styleset | @character-variant | @swash | @ornaments | @annotation<feature-value-declaration
-list> = <feature-value-declaration>where <feature-value-decla...
...ration> = <custom-ident>: <integer>+; examples using @styleset in a @font-feature-values rule /* at-rule for "nice-style" in font one */ @font-feature-values font one { @styleset { nice-style: 12; } } /* at-rule for "nice-style" in font two */ @font-feature-values font two { @styleset { nice-style: 4; } } … /* apply the at-rules with a single declaration */ .nice
-look { font-variant-alternates: styleset(nice-style); } specifications specification status comment css fonts module level 4the definition of '@font-feature-values' in that specification.
@page - CSS: Cascading Style Sheets
formal syntax @page <page-selector
-list> { <page-body> }where <page-selector
-list> = [ <page-selector># ]?<page-body> = <declaration>?
...| <page-margin-box> <page-body>where <page-selector> = <pseudo-page>+ | <ident> <pseudo-page>*<page-margin-box> = <page-margin-box-type> '{' <declaration
-list> '}'where <pseudo-page> = : [ left | right | first | blank ]<page-margin-box-type> = @top
-left-corner | @top
-left | @top-center | @top-right | @top-right-corner | @bottom
-left-corner | @bottom
-left | @bottom-center | @bottom-right | @bottom-right-corner | @left-top | @left-middle | @left-bottom | @right-top | @right-middle | @right-bottom examples @page pseudo-class examples please refer to the various pseudo-classes of @page for examples.
Attribute selectors - CSS: Cascading Style Sheets
*/ div[lang|="zh"] { color: red; } /* all divs with a traditional chinese `data
-lang` are purple.
... */ /* note: you could also use hyphenated attributes without double quotes */ div[data
-lang="zh-tw"] { color: purple; } html <div lang="en-us en-gb en-au en-nz">hello world!</div> <div lang="pt">olá mundo!</div> <div lang="zh-cn">世界您好!</div> <div lang="zh-tw">世界您好!</div> <div data
-lang="zh-tw">世界您好!</div> result html ordered lists the html specification requires the type attribute to be matched case-insensitively due to it primarily being used in the <input> element, trying to use attribute selectors to with the type attribute of an ordered list doesn't work without the case-sensitive modifier.
CSS Backgrounds and Borders - CSS: Cascading Style Sheets
(additionally, element boxes can be decorated with a shadow.) reference css properties background background-attachment background-clip background-color background-image background-origin background-position background-position-x background-position-y background-repeat background-size border border-bottom border-bottom-color border-bottom
-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border
-left border
-left-color border
-left-style border
-left-width border-radius border-right border-right-color border-right-style border-right-width border-styl...
...e border-top border-top-color border-top
-left-radius border-top-right-radius border-top-style border-top-width border-width box-shadow tools using multiple backgrounds explains how to set one or more backgrounds on an element.
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
align-self the align-self property does not apply to block
-level boxes (including floats), because there is more than one item in the block axis.
...a margin of auto will absorb all available space in that dimension, therefore setting a left and right margin of auto, you can push a block into the center: .container { width: 20em; margin
-left: auto; margin-right: auto; } in table layout, you have access to the vertical-align property to align the contents of a cell inside that cell.
Introduction to the CSS basic box model - CSS: Cascading Style Sheets
the thickness of the padding is determined by the padding-top, padding-right, padding-bottom, padding
-left, and shorthand padding properties.
... the size of the margin area is determined by the margin-top, margin-right, margin-bottom, margin
-left, and shorthand margin properties.
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
apper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 100px); grid-template-rows: repeat(3, 100px); height: 500px; width: 500px; grid-gap: 10px; grid-template-areas: "a a b" "a a b" "c d d"; } .item1 { grid-area: a; margin
-left: auto; } .item2 { grid-area: b; } .item3 { grid-area: c; } .item4 { grid-area: d; } <div class="wrapper"> <div class="item1">item 1</div> <div class="item2">item 2</div> <div class="item3">item 3</div> <div class="item4">item 4</div> </div> you can see how the item is aligned by using the firefox grid highlighter: alignment and writing modes in all of these examples i ...
... setting auto margins, using margin-right or margin
-left however, or absolutely positioning items using the top, right, bottom and left offsets would not honor writing modes.
Stacking context example 1 - CSS: Cascading Style Sheets
r /><span class="bold">div #3</span> <br />position: relative; <div id="div4"> <br /><span class="bold">div #4</span> <br />position: absolute; <br />z-index: 2; </div> </div> </body></html> css .bold { font-weight: bold; font: 12px arial; } #div1, #div3 { height: 80px; position: relative; border: 1px dashed #669966; background-color: #ccffcc; padding
-left: 5px; } #div2 { opacity: 0.8; z-index: 1; position: absolute; width: 150px; height: 200px; top: 20px; left: 170px; border: 1px dashed #990000; background-color: #ffdddd; text-align: center; } #div4 { opacity: 0.8; z-index: 2; position: absolute; width: 200px; height: 70px; top: 65px; left: 50px; border: 1px dashed #000099;...
... background-color: #ddddff; text-align: left; padding
-left: 10px; } result ...
Stacking context example 2 - CSS: Cascading Style Sheets
public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html> <head><style type="text/css"> div { font: 12px arial; } span.bold { font-weight: bold; } #div2 { z-index: 2; } #div3 { z-index: 1; } #div4 { z-index: 10; } #div1,#div3 { height: 80px; position: relative; border: 1px dashed #669966; background-color: #ccffcc; padding
-left: 5px; } #div2 { opacity: 0.8; position: absolute; width: 150px; height: 200px; top: 20px; left: 170px; border: 1px dashed #990000; background-color: #ffdddd; text-align: center; } #div4 { opacity: 0.8; position: absolute; width: 200px; height: 70px; top: 65px; left: 50px; border: 1px dashed #000099; background-color: #ddddff; text-align: ...
...left; padding
-left: 10px; } </style></head> <body> <br /> <div id="div1"><br /> <span class="bold">div #1</span><br /> position: relative; <div id="div2"><br /> <span class="bold">div #2</span><br /> position: absolute;<br /> z-index: 2; </div> </div> <br /> <div id="div3"><br /> <span class="bold">div #3</span><br /> position: relative;<br /> z-index: 1; <div id="div4"><br /> <span class="bold">div #4</span><br /> position: absolute;<br /> z-index: 10; </div> </div> </body> </html> ...
CSS Properties Reference - CSS: Cascading Style Sheets
ackground-image backgroundimage background-position backgroundposition background-repeat backgroundrepeat border border border-bottom borderbottom border-bottom-color borderbottomcolor border-bottom-style borderbottomstyle border-bottom-width borderbottomwidth border-color bordercolor border
-left borderleft border
-left-color borderleftcolor border
-left-style borderleftstyle border
-left-width borderleftwidth border-right borderright border-right-color borderrightcolor border-right-style borderrightstyle border-right-width borderrightwidth border-style borderstyle border-top bor...
... font-weight fontweight height height left left letter-spacing letterspacing line-height lineheight list-style liststyle list-style-image liststyleimage list-style-position liststyleposition list-style-type liststyletype margin margin margin-bottom marginbottom margin
-left marginleft margin-right marginright margin-top margintop overflow overflow padding padding padding-bottom paddingbottom padding
-left paddingleft padding-right paddingright padding-top paddingtop page-break-after pagebreakafter page-break-before pagebreakbefore pos...
Using media queries - CSS: Cascading Style Sheets
light
-level light level of the environment added in media queries level 5.
...for instance, you can apply specific styles to widescreen monitors, computers that use mice, or to devices that are being used in low
-light conditions.
Microsoft CSS extensions - CSS: Cascading Style Sheets
-ms-accelerator -ms-block-progression -ms-content-zoom-chaining -ms-content-zooming -ms-content-zoom
-limit -ms-content-zoom
-limit-max -ms-content-zoom
-limit-min -ms-content-zoom-snap -ms-content-zoom-snap-points -ms-content-zoom-snap-type -ms-filter -ms-flow-from -ms-flow-into -ms-high-contrast-adjust -ms-hyphenate
-limit-chars -ms-hyphenate
-limit
-lines -ms-hyphenate
-limit-zone -ms-ime-align -ms-overflow-style -ms-scrollbar-3dlight-color -ms-scrollbar-arrow-color -ms-scrollba...
...r-base-color -ms-scrollbar-darkshadow-color -ms-scrollbar-face-color -ms-scrollbar-highlight-color -ms-scrollbar-shadow-color -ms-scrollbar-track-color -ms-scroll-chaining -ms-scroll
-limit -ms-scroll
-limit-x-max -ms-scroll
-limit-x-min -ms-scroll
-limit-y-max -ms-scroll
-limit-y-min -ms-scroll-rails -ms-scroll-snap-points-x -ms-scroll-snap-points-y -ms-scroll-snap-x -ms-scroll-snap-y -ms-scroll-translation -ms-text-autospace -ms-touch-select -ms-wrap-flow -ms-wrap-margin -ms-wrap-through zoom pseudo-elements ::-ms-browse ::-ms-check ::-ms-clear ::-ms-expand ::-ms-fill ::-ms-fill
-lower ::-ms-fill-upper ::-ms-reveal ::-ms-thumb ::-ms-ticks-after ::-ms-ticks-before ::-ms-tooltip ::-ms-track ::-ms-value media features -ms-high-contrast ...
align-content - CSS: Cascading Style Sheets
formal definition initial valuenormalapplies tomulti
-line flex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | <baseline-position> | <content-distribution> | <overflow-position>?
... candidate recommendation initial definition initial valuenormalapplies tomulti
-line flex containersinheritednocomputed valueas specifiedanimation typediscrete ...
all - CSS: Cascading Style Sheets
user origin rolls back the cascade to the user-agent level, so that the specified values are calculated as if no author
-level or user
-level rules were specified for the element.
... author origin rolls back the cascade to the user level, so that the specified values are calculated as if no author
-level rules were specified for the element.
backdrop-filter - CSS: Cascading Style Sheets
<filter-function
-list> a space-separated list of <filter-function>s or an svg filter that will be applied to the backdrop.
... formal definition initial valuenoneapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednocomputed valueas specifiedanimation typea filter function list formal syntax none | <filter-function
-list>where <filter-function
-list> = [ <filter-function> | <url> ]+where <filter-function> = <blur()> | <brightness()> | <contrast()> | <drop-shadow()> | <grayscale()> | <hue-rotate()> | <invert()> | <opacity()> | <saturate()> | <sepia()>where <blur()> = blur( <length> )<brightness()> = brightness( <number-percentage> )<contrast()> = contrast( [ <number-percentage> ] )<drop-shadow()> = drop-shadow( <length>{2,3} <color>?
background-attachment - CSS: Cascading Style Sheets
it also applies to ::first
-letter and ::first
-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <attachment>#where <attachment> = scroll | fixed | local examples simple example html <p> there were doors all round the hall, but they were all locked; and when alice had been all the way down one side and up the other, trying every door, she walked sadly down the middle, wondering how she...
... suddenly she came upon a little three
-legged table, all made of solid glass; there was nothing on it except a tiny golden key, and alice's first thought was that it might belong to one of the doors of the hall; but, alas!
background-blend-mode - CSS: Cascading Style Sheets
it also applies to ::first
-letter and ::first
-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <blend-mode>#where <blend-mode> = normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard
-light | soft
-light | difference | exclusion | hue | saturation | color | luminosity examples <div id="div"></div> <select id="select"> <option>normal</option> <option>...
...multiply</option> <option selected>screen</option> <option>overlay</option> <option>darken</option> <option>lighten</option> <option>color-dodge</option> <option>color-burn</option> <option>hard
-light</option> <option>soft
-light</option> <option>difference</option> <option>exclusion</option> <option>hue</option> <option>saturation</option> <option>color</option> <option>luminosity</option> </select> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/br.png'),url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: screen; } document.getelementbyid("select").onchange = function(event) { document.getelementbyid("div").style.backgroundblendmode = document.
background-repeat - CSS: Cascading Style Sheets
it also applies to ::first
-letter and ::first
-line.inheritednocomputed valuea list, each item consisting of two keywords, one per dimensionanimation typediscrete formal syntax <repeat-style>#where <repeat-style> = repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2} examples setting background-repeat html <ol> <li>no-repeat <div class="one"></div> </li> <li>repeat <div class="two"></div> </...
... candidate recommendation adds support for multiple background images, the two-value syntax allowing distinct repetition behavior for the horizontal and vertical directions, the space and round keywords, and for backgrounds on inline
-level elements by precisely defining the background painting area.
<basic-shape> - CSS: Cascading Style Sheets
the coordinate system for the shape has its origin at the top
-left corner of the reference box, with the x-axis running to the right and the y-axis running downwards.
... html <div></div> css div { width: 300px; height: 300px; background: repeating
-linear-gradient(red, orange 50px); clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%); animation: 4s poly infinite alternate ease-in-out; margin: 10px auto; } @keyframes poly { from { clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%); } to { clip-path: polygon(50% 30%, 100% 0%, 70% 50%, 100% 100%,...
border-block-color - CSS: Cascading Style Sheets
it corresponds to the border-top-color and border-bottom-color, or border-right-color and border
-left-color property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 10px solid blue; border-block-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-color' in that specification.
border-block-end-color - CSS: Cascading Style Sheets
it corresponds to the border-top-color, border-right-color, border-bottom-color, or border
-left-color property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 10px solid blue; border-block-end-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end-color' in that specification.
border-block-end-style - CSS: Cascading Style Sheets
it corresponds to the border-top-style, border-right-style, border-bottom-style, or border
-left-style property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples dashed border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 5px solid blue; border-block-end-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end-style' in that specification.
border-block-end-width - CSS: Cascading Style Sheets
it corresponds to the border-top-width, border-right-width, border-bottom-width, or border
-left-width property depending on the values defined for writing-mode, direction, and text-orientation.
...tednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples border width with veritcal text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 1px solid blue; border-block-end-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end-width' in that specification.
border-block-start-color - CSS: Cascading Style Sheets
it corresponds to the border-top-color, border-right-color, border-bottom-color, or border
-left-color property depending on the values defined for writing-mode, direction, and text-orientation.
...border-color formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 10px solid blue; border-block-start-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-start-color' in that specification.
border-block-start-style - CSS: Cascading Style Sheets
it corresponds to the border-top-style, border-right-style, border-bottom-style, or border
-left-style property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples dashed border wtih vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 5px solid blue; border-block-start-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-start-style' in that specification.
border-block-start-width - CSS: Cascading Style Sheets
it corresponds to the border-top-width, border-right-width, border-bottom-width, or border
-left-width property depending on the values defined for writing-mode, direction, and text-orientation.
...tednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples border width with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 1px solid blue; border-block-start-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-start-width' in that specification.
border-block-style - CSS: Cascading Style Sheets
it corresponds to the border-top-style and border-bottom-style, or border
-left-style and border-right-style properties depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples dashed border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 5px solid blue; border-block-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-style' in that specification.
border-block-width - CSS: Cascading Style Sheets
it corresponds to the border-top-width and border-bottom-width, or border
-left-width, and border-right-width property depending on the values defined for writing-mode, direction, and text-orientation.
...tednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typediscrete formal syntax <'border-top-width'> examples border width with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 1px solid blue; border-block-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-width' in that specification.
border-bottom-right-radius - CSS: Cascading Style Sheets
the border-bottom-right-radius css property rounds the top
-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner.
...it also applies to ::first
-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples live example code .
border-bottom-width - CSS: Cascading Style Sheets
it also applies to ::first
-letter.inheritednocomputed valuethe absolute length or 0 if border-bottom-style is none or hiddenanimation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples comparing bottom border widths html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-bottom-width: thick; } ...
...opera android full support 10.1safari ios full support 1samsung internet android full support 1.0legend full support full support see also the other border-width-related css properties: border
-left-width, border-right-width, border-top-width, and border-width.
border-inline-color - CSS: Cascading Style Sheets
it corresponds to the border-top-color and border-bottom-color, or border-right-color and border
-left-color property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 10px solid blue; border-inline-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-color' in that specification.
border-inline-end-color - CSS: Cascading Style Sheets
it corresponds to the border-top-color, border-right-color, border-bottom-color, or border
-left-color property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 10px solid blue; border-inline-end-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-color' in that specification.
border-inline-end-style - CSS: Cascading Style Sheets
it corresponds to the border-top-style, border-right-style, border-bottom-style, or border
-left-style property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 5px solid blue; border-inline-end-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-style' in that specification.
border-inline-end-width - CSS: Cascading Style Sheets
it corresponds to the border-top-width, border-right-width, border-bottom-width, or border
-left-width property depending on the values defined for writing-mode, direction, and text-orientation.
...percentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples applying a border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 1px solid blue; border-inline-end-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-width' in that specification.
border-inline-start-color - CSS: Cascading Style Sheets
it corresponds to the border-top-color, border-right-color, border-bottom-color, or border
-left-color property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 10px solid blue; border-inline-start-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-color' in that specification.
border-inline-start-style - CSS: Cascading Style Sheets
it corresponds to the border-top-style, border-right-style, border-bottom-style, or border
-left-style property depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 5px solid blue; border-inline-start-style: dashed; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-style' in that specification.
border-inline-start-width - CSS: Cascading Style Sheets
it corresponds to the border-top-width, border-right-width, border-bottom-width, or border
-left-width property depending on the values defined for writing-mode, direction, and text-orientation.
...ediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 1px solid blue; border-inline-start-width: 5px; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-width' in that specification.
border-inline-style - CSS: Cascading Style Sheets
it corresponds to the border-top-style and border-bottom-style, or border
-left-style and border-right-style properties depending on the values defined for writing-mode, direction, and text-orientation.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html content <div> <p class="exampletext">example text</p> </div> css content div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 5px solid blue; border-inline-style: dashed; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-style' in that specification.
border-inline-width - CSS: Cascading Style Sheets
it corresponds to the border-top-width and border-bottom-width, or border
-left-width, and border-right-width property depending on the values defined for writing-mode, direction, and text-orientation.
...ediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typediscrete formal syntax <'border-top-width'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical
-lr; border: 1px solid blue; border-inline-width: 5px 10px; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-width' in that specification.
border-right-style - CSS: Cascading Style Sheets
it also applies to ::first
-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset examples border styles html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5"...
... see also the other style-related border properties: border-bottom-style, border
-left-style, border-top-style, and border-style.
border-start-end-radius - CSS: Cascading Style Sheets
value the corner will be a circle */ border-start-end-radius: 10px; border-start-end-radius: 1em; /* with two values the corner will be an ellipse */ border-start-end-radius: 1em 2em; /* global values */ border-start-end-radius: inherit; border-start-end-radius: initial; border-start-end-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-bottom
-left-radius property.
...it also applies to ::first
-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples border radius with vertical text html <div> <p class="exampletext">example</p> </div> css div { background-...
border-start-start-radius - CSS: Cascading Style Sheets
corner will be a circle */ border-start-start-radius: 10px; border-start-start-radius: 1em; /* with two values the corner will be an ellipse */ border-start-start-radius: 1em 2em; /* global values */ border-start-start-radius: inherit; border-start-start-radius: initial; border-start-start-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-top
-left-radius property.
...it also applies to ::first
-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples border radius with vertical text html <div> <p class="exampletext">example</p> </div> css div { background-...
border-top-style - CSS: Cascading Style Sheets
it also applies to ::first
-letter.inheritednocomputed valueas specifiedanimation typediscrete formal syntax <line-style>where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset examples html <table> <tr> <td class="b1">none</td> <td class="b2">hidden</td> <td class="b3">dotted</td> <td class="b4">dashed</td> </tr> <tr> <td class="b5">solid</td> ...
...it also applies to ::first
-letter.inheritednocomputed valueas specifiedanimation typediscrete ...
box-align - CSS: Cascading Style Sheets
/* keyword values */ box-align: start; box-align: center; box-align: end; box-align: baseline; box-align: stretch; /* global values */ box
-lines: inherit; box
-lines: initial; box
-lines: unset; the direction of layout depends on the element's orientation: horizontal or vertical.
... full support 1prefixed full support 1prefixed prefixed implemented with the vendor prefix: -webkit-samsung internet android full support 1.0prefixed full support 1.0prefixed prefixed implemented with the vendor prefix: -webkit
-legend full support full support no support no supportnon-standard.
box-shadow - CSS: Cascading Style Sheets
interpolation each shadow in the list (treating none as a 0
-length list) is interpolated via the color (as color) component, and x, y, blur, and (when appropriate) spread (as length) components.
...it also applies to ::first
-letter.inheritednocomputed valueany length made absolute; any specified color computed; otherwise as specifiedanimation typea shadow list formal syntax none | <shadow>#where <shadow> = inset?
clip - CSS: Cascading Style Sheets
ocomputed valueauto if specified as auto, otherwise a rectangle with four values, each of which is auto if specified as auto or the computed length otherwiseanimation typea rectangle formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) examples clipping an image css .dotted-border { border: dotted; position: relative; width: 536px; height: 350px; } #top
-left, #middle, #bottom-right { position: absolute; top: 0; } #top
-left { left: 360px; clip: rect(0 175px 113px 0); } #middle { left: 280px; clip: rect(119px 255px 229px 80px); } #bottom-right { left: 200px; clip: rect(235px 335px 345px 160px); } html <p class="dotted-border"> <img src="https://udn.realityripple.com/samples/8f/15174f3500.jpg" title="original graphic"> <img ...
...id="top
-left" src="https://udn.realityripple.com/samples/8f/15174f3500.jpg" title="graphic clipped to upper left"> <img id="middle" src="https://udn.realityripple.com/samples/8f/15174f3500.jpg" title="graphic clipped towards middle"> <img id="bottom-right" src="https://udn.realityripple.com/samples/8f/15174f3500.jpg" title="graphic clipped to bottom right"> </p> result specifications specification status comment css masking module level 1the definition of 'clip' in that specification.
<custom-ident> - CSS: Cascading Style Sheets
also, quite a few predefined values are implemented by the different browsers: disc, circle, square, decimal, cjk-decimal, decimal
-leading-zero, lower-roman, upper-roman, lower-greek, lower-alpha, lower
-latin, upper-alpha, upper
-latin, arabic-indic, armenian, bengali, cambodian, cjk-earthly-branch, cjk-heavenly-stem, cjk-ideographic, devanagari, ethiopic-numeric, georgian, gujarati, gurmukhi, hebrew, hiragana, hiragana-iroha, japanese-formal, japanese-informal, kannada, katakana, katakana-iroha, khmer, korean-hangul-formal, ko...
... examples valid identifiers nono79 a mix of alphanumeric characters and numbers ground
-level a mix of alphanumeric characters and a dash -test a dash followed by alphanumeric characters _internal an underscore followed by alphanumeric characters \22 toto a unicode character followed by a sequence of alphanumeric characters bili\.bob a correctly escaped period invalid identifiers 34rem it must not start with a decimal digit.
font-optical-sizing - CSS: Cascading Style Sheets
it also applies to ::first
-letter and ::first
-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | none examples disabling optical sizing <p class="optical-sizing">this paragraph is optically sized.
... you should see a difference in supporting browsers.</p> @font-face { src: url('amstelvaralpha-vf.ttf'); font-family:'amstelvar'; font-style: normal; } p { font-size: 36px; font-family: amstelvar; } .no-optical-sizing { font-optical-sizing: none; } note: the font referenced above — which includes optical sizing and is freely
-licensed — is good for testing.
font - CSS: Cascading Style Sheets
prefixed system font keywords browsers often implement several more, prefixed, keywords: gecko implements -moz-window, -moz-document, -moz-desktop, -moz-info, -moz-dialog, -moz-button, -moz-pull-down-menu, -moz
-list, and -moz-field.
...it also applies to ::first
-letter and ::first
-line.inheritedyespercentagesas each of the properties of the shorthand:font-size: refer to the parent element's font sizeline-height: refer to the font size of the element itselfcomputed valueas each of the properties of the shorthand:font-style: as specifiedfont-variant: as specifiedfont-weight: the keyword or the numerical value as specified, with bolder and lighter transformed to the real valuefont-stretch: as specifiedfont-size: as specified, but with relative lengths converted into absolute length...
<gradient> - CSS: Cascading Style Sheets
they are generated with the repeating
-linear-gradient() and repeating-radial-gradient() functions.
... <div class="linear-repeat">repeating linear gradient</div> <br> <div class="radial-repeat">repeating radial gradient</div> div { width: 240px; height: 80px; } .linear-repeat { background: repeating
-linear-gradient(to top left, lightpink, lightpink 5px, white 5px, white 10px); } .radial-repeat { background: repeating-radial-gradient(powderblue, powderblue 8px, white 8px, white 16px); } conic gradient example a simple conic gradient example.
grid-area - CSS: Cascading Style Sheets
if four <grid
-line> values are specified, grid-row-start is set to the first value, grid-column-start is set to the second value, grid-row-end is set to the third value, and grid-column-end is set to the fourth value.
...d-row-start: autogrid-column-start: autogrid-row-end: autogrid-column-end: autoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas each of the properties of the shorthand:grid-row-start: as specifiedgrid-column-start: as specifiedgrid-row-end: as specifiedgrid-column-end: as specifiedanimation typediscrete formal syntax <grid
-line> [ / <grid
-line> ]{0,3}where <grid
-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
grid-row - CSS: Cascading Style Sheets
if two <grid
-line> values are specified, the grid-row-start longhand is set to the value before the slash, and the grid-row-end longhand is set to the value after the slash.
... formal definition initial valueas each of the properties of the shorthand:grid-row-start: autogrid-row-end: autoapplies togrid items and absolutely-positioned boxes whose containing block is a grid containerinheritednocomputed valueas each of the properties of the shorthand:grid-row-start: as specifiedgrid-row-end: as specifiedanimation typediscrete formal syntax <grid
-line> [ / <grid
-line> ]?where <grid
-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
image() - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> where: image-tagsoptional the directionality of the image, either ltr for left-to-right or rtl for right-to
-left.
...list items with dir="rtl" set on the <li> or inheriting the right-to
-left directionality from an ancestor, such as documents set to arabic or hebrew, will have the bullet display on the right, horizontally flippled, as if transform: scalex(-1) had been set.
justify-items - CSS: Cascading Style Sheets
the effect of this property is dependent of the layout mode we are in: in block
-level layouts, it aligns the items inside their containing block on the inline axis.
... normal the effect of this keyword is dependent of the layout mode we are in: in block
-level layouts, the keyword is a synonym of start.
left - CSS: Cascading Style Sheets
when this is the case, the left value has precedence when the container is left-to-right; the right value has precedence when the container is right-to
-left.
...h relative position</p> </div> <div id="example_5"> <pre> position: absolute; right: 0; left: 0; top: 200px; </pre> <p>absolute position with both left and right declared</p> </div> </div> </div> css #wrap { width: 700px; margin: 0 auto; background: #5c5c5c; } pre { white-space: pre; white-space: pre-wrap; white-space: pre
-line; word-wrap: break-word; } #example_1 { width: 200px; height: 200px; position: absolute; left: 20px; top: 20px; background-color: #d8f5ff; } #example_2 { width: 200px; height: 200px; position: relative; top: 0; right: 0; background-color: #c1ffdb; } #example_3 { width: 600px; height: 400px; position: relative; top: 20px; left: 20px; background-color: #ff...
line-height - CSS: Cascading Style Sheets
on block
-level elements, it specifies the minimum height of line boxes within the element.
...it also applies to ::first
-letter and ::first
-line.inheritedyespercentagesrefer to the font size of the element itselfcomputed valuefor percentage and length values, the absolute length, otherwise as specifiedanimation typeeither number or length formal syntax normal | <number> | <length> | <percentage> examples basic example /* all rules below have the same resultant line height */ div { line-height: 1.2; font-size:...
linear-gradient() - CSS: Cascading Style Sheets
ng red */ linear-gradient(0deg, blue, green 40%, red); /* color hint: a gradient going from the left to right, starting red, getting to the midpoint color 10% of the way across the length of the gradient, taking the rest of the 90% of the length to change to blue */ linear-gradient(.25turn, red, 10%, blue); /* multi-position color stop: a gradient tilted 45 degrees, with a red bottom
-left half and a blue top-right half, with a hard line where the gradient changes from red to blue */ linear-gradient(45deg, red 0 50%, blue 50% 100%); values <side-or-corner> the position of the gradient line's starting point.
... to create a linear gradient that repeats so as to fill its container, use the repeating
-linear-gradient() function instead.
offset-path - CSS: Cascading Style Sheets
w" /> <polygon points="993,245 993,190 1086,190 1086,300" fill="red" /> <path id="house" d="m900,190 l993,245 v201 a11,11 0 0,1 1004,190 h1075 a11,11 0 0,1 1086,201 v300 l1294,423 h1216 a11,11 0 0,0 1205,434 v789 a11,11 0 0,1 1194,800 h606 a11,11 0 0,1 595,789 v434 a11,11 0 0,0 584,423 h506 l900,190" fill="none" stroke="black" stroke-width="13" stroke
-linejoin="round" stroke
-linecap="round" /> <path id="firstscissorhalf" class="scissorhalf" d="m30,0 h-10 a10,10 0 0,0 -20,10 a20,20 0 1,1 -40,-10 h20 a10,10 0 0,1 30,0 m-40,20 a10,10 1 0,0 -40,0 a10,10 1 0,0 -40,20 m0,0" transform="translate(0,0)" fill="green" stroke="black" stroke-width="5" stroke
-linejoin="round" stroke
-linecap="ro...
...und" fill-rule="evenodd" /> <path id="secondscissorhalf" class="scissorhalf" d="m30,0 h-10 a10,10 0 0,1 -20,-10 a20,20 0 1,0 -40,10 h20 a10,10 0 0,0 30,0 m-40,-20 a10,10 1 0,0 -40,0 a10,10 1 0,0 -40,-20 m0,0" transform="translate(0,0)" fill="forestgreen" stroke="black" stroke-width="5" stroke
-linejoin="round" stroke
-linecap="round" fill-rule="evenodd" /> </svg> css .scissorhalf { offset-path: path('m900,190 l993,245 v201 a11,11 0 0,1 1004,190 h1075 a11,11 0 0,1 1086,201 v300 l1294,423 h1216 a11,11 0 0,0 1205,434 v789 a11,11 0 0,1 1194,800 h606 a11,11 0 0,1 595,789 v434 a11,11 0 0,0 584,423 h506 l900,190'); animation: followpath 4s linear infinite; } @keyframes followpath { to { motion-offs...
overscroll-behavior-block - CSS: Cascading Style Sheets
formal definition initial valueautoapplies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing block overscrolling in this demo we have two block
-level boxes, one inside the other.
... html <main> <div> <div> <p><code>overscroll-behavior-block</code> has been used to make it so that when the scroll boundaries of the yellow inner box are reached, the whole page does not begin to scroll.</p> </div> </div> </main> css main { height: 3000px; width: 500px; background-color: white; background-image: repeating
-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 19px, rgba(0,0,0,0.5) 20px); } main > div { height: 300px; width: 400px; overflow: auto; position: relative; top: 50px; left: 50px; overscroll-behavior-block: contain; } div > div { height: 1500px; width: 100%; background-color: yellow; background-image: repeating
-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0...
overscroll-behavior-inline - CSS: Cascading Style Sheets
formal definition initial valueautoapplies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing inline overscrolling in this demo we have two block
-level boxes, one inside the other.
... html <main> <div> <div> <p><code>overscroll-behavior-inline</code> has been used to make it so that when the scroll boundaries of the yellow inner box are reached, the whole page does not begin to scroll.</p> </div> </div> </main> css main { height: 400px; width: 3000px; background-color: white; background-image: repeating
-linear-gradient(to right, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 19px, rgba(0,0,0,0.5) 20px); } main > div { height: 300px; width: 400px; overflow: auto; position: relative; top: 50px; left: 50px; overscroll-behavior-inline: contain; } div > div { height: 100%; width: 1500px; background-color: yellow; background-image: repeating
-linear-gradient(to right, rgba(0,0,0,0) 0px, rgba(0,...
overscroll-behavior-y - CSS: Cascading Style Sheets
/* keyword values */ overscroll-behavior-y: auto; /* default */ overscroll-behavior-y: contain; overscroll-behavior-y: none; /* global values */ overscroll-behavior-y: inherit; overscroll-behavior-y: initial; overscroll-behavior-y: unset; initial valueautoapplies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax the overscroll-behavior-y property is specified as a keyword chosen from the list of values below.
... formal definition initial valueautoapplies tonon-replaced block
-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing an underlying element from scrolling vertically .messages { height: 220px; overflow: auto; overscroll-behavior-y: contain; } see overscroll-behavior for a full example and explanation.
place-content - CSS: Cascading Style Sheets
stretch if the combined size of the items is less than the size of the alignment container, any auto-sized items have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container formal definition initial valuenormalapplies tomulti
-line flex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'align-content'> <'justify-content'>?
...s="small">lorem</div> <div class="small">lorem<br/>ipsum</div> <div class="large">lorem</div> <div class="large">lorem<br/>impsum</div> <div class="large"></div> <div class="large"></div> </div> <code>writing-mode:</code><select id="writingmode"> <option value="horizontal-tb" selected>horizontal-tb</option> <option value="vertical-rl">vertical-rl</option> <option value="vertical
-lr">vertical
-lr</option> <option value="sideways-rl">sideways-rl</option> <option value="sideways
-lr">sideways
-lr</option> </select><code>;</code><br/> <code>direction:</code><select id="direction"> <option value="ltr" selected>ltr</option> <option value="rtl">rtl</option> </select><code>;</code><br/> <code>place-content:</code><select id="aligncontentalignment"> <option value="normal">no...
place-self - CSS: Cascading Style Sheets
the property doesn't apply to block
-level boxes, and to table cells.
... formal definition initial valueas each of the properties of the shorthand:align-self: autojustify-self: autoapplies toblock
-level boxes, absolutely-positioned boxes, and grid itemsinheritednocomputed valueas each of the properties of the shorthand:align-self: auto computes to itself on absolutely-positioned elements, and to the computed value of align-items on the parent (minus any legacy keywords) on all other boxes, or start if the box has no parent.
position - CSS: Cascading Style Sheets
sticky the element is positioned according to the normal flow of the document, and then offset relative to its nearest scrolling ancestor and containing block (nearest block
-level ancestor), including table-related elements, based on the values of top, right, bottom, and left.
... </p> <div class="box" id="one">one</div> </div> css .box { width: 100px; height: 100px; background: red; color: white; } #one { position: fixed; top: 80px; left: 10px; background: blue; } .outer { width: 500px; height: 300px; overflow: scroll; padding
-left: 150px; } result sticky positioning sticky positioning can be thought of as a hybrid of relative and fixed positioning.
right - CSS: Cascading Style Sheets
when this is the case, the left value has precedence when the container is left-to-right; the right value has precedence when the container is right-to
-left.
...the right will take precedence if the container's direction is right-to
-left.
text-decoration-thickness - CSS: Cascading Style Sheets
it also applies to ::first
-letter and ::first
-line.inheritednopercentagesrefer to the font size of the element itselfcomputed valueas specifiedanimation typeby computed value type formal syntax auto | from-font | <length> | <percentage> examples varying thickness html <p class="thin">here's some text with a 1px red underline.</p> <p class="thick">this one has a 5px red underline.</p> <p class="shorthand">this uses the ...
...equivalent shorthand.</p> css .thin { text-decoration
-line: underline; text-decoration-style: solid; text-decoration-color: red; text-decoration-thickness: 1px; } .thick { text-decoration
-line: underline; text-decoration-style: solid; text-decoration-color: red; text-decoration-thickness: 5px; } .shorthand { text-decoration: underline solid red 5px; } results specifications specification status comment css text decoration module level 4the definition of 'text-decoration-width' in that specification.
text-overflow - CSS: Cascading Style Sheets
if one value is given, it specifies overflow behavior for the end of the line (the right end for left-to-right text, the left end for right-to
-left text).
...as some not
-listed-at-risk features needed to be removed, the spec was demoted to the working draft level, explaining why browsers implemented this property unprefixed, though not at the cr state.
text-shadow - CSS: Cascading Style Sheets
this property applies to both ::first
-line and ::first
-letter pseudo-elements.
...it also applies to ::first
-letter and ::first
-line.inheritedyescomputed valuea color plus three absolute lengthsanimation typea shadow list formal syntax none | <shadow-t>#where <shadow-t> = [ <length>{2,3} && <color>?
text-underline-offset - CSS: Cascading Style Sheets
it also applies to ::first
-letter and ::first
-line.inheritedyespercentagesrefer to the font size of the element itselfcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length> | <percentage> examples <p class="oneline">here's some text with an offset wavy red underline!</p> <br> <p class="twolines">this text has lines both above and below it.
... only the bottom one is offset.</p> p { text-decoration: underline wavy red; text-underline-offset: 1em; } .twolines { text-decoration-color: purple; text-decoration
-line: underline overline; } specifications specification status comment css text decoration module level 4the definition of 'text-underline-offset' in that specification.
unicode-bidi - CSS: Cascading Style Sheets
for example, if a block of content contains both left-to-right and right-to
-left text, the user-agent uses a complex unicode algorithm to decide how to display the text.
...for block container elements this creates an override for inline
-level descendants not within another block container element.
word-spacing - CSS: Cascading Style Sheets
it also applies to ::first
-letter and ::first
-line.inheritedyespercentagesrefer to the width of the affected glyphcomputed valuean optimum, minimum, and maximum value, each consisting of either an absolute length, a percentage, or the keyword normalanimation typea length formal syntax normal | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment...
... working draft replaces the previous values with a <spacing
-limit> value that defines the same thing, plus the <percentage> value.
Cross-browser audio basics - Developer guides
rting browsers will ignore it --> <a href="audiofile.mp3">audiofile.mp3</a> </audio> <div id="controls"> <span id="loading">loading</span> <button id="play" style="display:none">play</button> <button id="pause" style="display:none" >pause</button> </div> <div id="progress"> <div id="bar"></div> </div> styled like so: #controls { width: 80px; float: left; } #progress { margin
-left: 80px; border: 1px solid black; } #bar { height: 20px; background-color: green; width: 0; } now let's wire this thing up with javascript: window.onload = function(){ var myaudio = document.getelementbyid('my-audio'); var play = document.getelementbyid('play'); var pause = document.getelementbyid('pause'); var loading = document.getelementbyid('loading'); var bar ...
... first of all, we apply a quick update to the progress bar css to display the hand pointer on hover: #progress { margin
-left: 80px; border: 1px solid black; cursor: pointer; } then we add the code that detects the click and moves the 'playhead' to the correct position: var progress = document.getelementbyid('progress'); progress.addeventlistener('click', function(e) { // calculate the normalized position clicked var clickposition = (e.pagex - this.offsetleft) / this.offsetwidth; var clicktime = clic...
Challenge solutions - Developer guides
solution add a rule to the body element (parent of the headings) to reset a new counter, and one to display and increment the counter on the headings: /* numbered headings */ body {counter-reset: headnum;} h3:before { content: "(" counter(headnum, upper
-latin) ") "; counter-increment: headnum; } boxes ocean border challenge add one rule to your stylesheet, making a wide border all around the oceans in a color that reminds you of the sea.
... solution add lines to modify the margin
-left property.
Constraint validation - Developer guides
rangeunderflow constraint violation date, month, week a valid date datetime, datetime
-local, time a valid date and time max range, number a valid number the value must be less than or equal to the value rangeoverflow constraint violation date, month, week a valid date datetime, datetime
-local, time a valid date and time required text, search, url, tel, email, password, date, datetime, datetime
-local, month, week, time, numb...
... stepmismatch constraint violation month an integer number of months week an integer number of weeks datetime, datetime
-local, time an integer number of seconds range, number an integer minlength text, search, url, tel, email, password; also on the <textarea> element an integer length the number of characters (code points) must not be less than the value of the attribute, if non-empty.
Localizations and character encodings - Developer guides
to avoid introducing this problem in locales where web publishing took off after the adoption of utf-8, locales that don't have a non-windows-1252 legacy encoding arising from the practices of the 1990s, should leave the fallback encoding at windows-1252 to facilitate reading content cross
-locale from the old locales whose fallback encoding is windows-1252.
... in order to avoid the problem of web authors creating new utf-8 content without declaring that the content uses utf-8 and in order to maximize the ability of users to read content cross
-locale, do not set the fallback encoding to utf-8 for any newly-introduced localization.
The Unicode Bidirectional Text Algorithm - Developer guides
initial unicode bidi algorithm control characters character code point html entity markup equivalent description left-to-right isolate (lri) u+2066 ⁦ dir="ltr" sets the base direction to ltr, isolating the embedded content from the surrounding text right-to
-left isolate (lri) u+2067 ⁧ dir="rtl" sets the base direction to rtl, isolating the embedded content from the surrounding text first strong isolate (fsi) u+2068 ⁨ dir="auto" isolates the content and sets the base direction according to the first strongly-typed directional character in the embedded content left-to-right embedding (lre) u+202...
...a ‪ dir="ltr" sets the base direction to ltr but allows the embedded text to interact with the surrounding content; this risks the effect spilling over to the outer content right-to
-left embedding (rle) u+202b ‫ dir="rtl" sets the base direction to rtl, but lets the embedded text interact with the surrounding content, risking spillover effects left-to-right override (lro) u+202d ‭ <bdo dir="ltr"> overrides the bidi algorithm, displaying the characters in memory order, from left to right right-to
-left override (rlo) u+202e ‮ <bdo dir="rtl"> overrides the bidi algorithm and displays the embedded characters in reverse memory order, from right to left closing unicode bidi algorithm contro...
HTML attribute: max - HTML: Hypertext Markup Language
valid for the numeric input types, including the date, month, week, time, datetime
-local, number and range types, and both the <progress> and <meter> elements, the max attribute is a number that specifies the most positive value a form control to be considered valid.
... syntax syntax for max values by input type input type syntax example date yyyy-mm-dd <input type="date" max="2019-12-25" step="1"> month yyyy-mm <input type="month" max="2019-12" step="12"> week yyyy-w## <input type="week" max="2019-w23" step=""> time hh:mm <input type="time" max="17:00" step="900"> datetime
-local yyyy-mm-ddthh:mm <input type="datetime
-local" min="2019-12-25t23:59"> number <number> <input type="number" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the maximum value set, the value is considered invalid in contraint validation and will match ...
HTML attribute: min - HTML: Hypertext Markup Language
valid for the numeric input types, including the date, month, week, time, datetime
-local, number and range types, and the <meter> element, the min attribute is a number that specifies the most negative value a form control to be considered valid.
...-5.2"> syntax for min values by input type input type example example date yyyy-mm-dd <input type="date" min="2019-12-25" step="1"> month yyyy-mm <input type="month" min="2019-12" step="12"> week yyyy-w## <input type="week" min="2019-w23" step=""> time hh:mm <input type="time" min="09:00" step="900"> datetime
-local yyyy-mm-ddthh:mm <input type="datetime
-local" min="2019-12-25t19:30"> number <number> <input type="number" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the min value set, the value is considered invalid in contraint validation and will match the ...
HTML attribute: pattern - HTML: Hypertext Markup Language
examples given the following: <p> <label>enter your phone number in the format (123)456-7890 (<input name="tel1" type="tel" pattern="[0-9]{3}" placeholder="###" aria
-label="3-digit area code" size="2"/>)- <input name="tel2" type="tel" pattern="[0-9]{3}" placeholder="###" aria
-label="3-digit prefix" size="2"/> - <input name="tel3" type="tel" pattern="[0-9]{4}" placeholder="####" aria
-label="4-digit number" size="3"/> </label> </p> here we have 3 sections for a north american phone number with an implicit label encompassing all three components of the pho...
... lowercase letters"> <span class="validity"></span> <p>usernames must be lowercase and 4-8 characters in length.</p> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; position: relative; } p { font-size: 80%; color: #999; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; } this renders like so: accessibility concerns when a control has a pattern attribute, the title attribute, if used, must describe the pattern.
<input type="file"> - HTML: Hypertext Markup Language
let's look at a more complete example: <form method="post" enctype="multipart/form-data"> <div> <label for="profile_pic">choose file to upload</label> <input type="file" id="profile_pic" name="profile_pic" accept=".jpg, .jpeg, .png"> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; } this produces a similar
-looking output to the previous example: note: you can find this example on github too — see the source code, and also see it running live.
...type="file" id="image_uploads" name="image_uploads" accept=".jpg, .jpeg, .png" multiple> </div> <div class="preview"> <p>no files currently selected for upload</p> </div> <div> <button>submit</button> </div> </form> html { font-family: sans-serif; } form { width: 580px; background: #ccc; margin: 0 auto; padding: 20px; border: 1px solid black; } form ol { padding
-left: 0; } form li, div > p { background: #eee; display: flex; justify-content: space-between; margin-bottom: 10px; list-style-type: none; border: 1px solid black; } form img { height: 64px; order: 1; } form p { line-height: 32px; padding
-left: 10px; } form label, form button { background-color: #7f9ccb; padding: 5px 10px; border-radius: 5px; border: 1px ridge black;...
<input type="week"> - HTML: Hypertext Markup Language
div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; } the result here is that only weeks between w01 and w52 in 2017 will be seen as valid and be selectable in supporting browsers.
... div { margin-bottom: 10px; position: relative; } input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding
-left: 5px; } input:valid+span:after { position: absolute; content: '✓'; padding
-left: 5px; } the other part of the code that may be of interest is the feature detection code.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
a combination of the <figure> and <figcaption> elements, supplemented by a combination of an id and the aria role and aria
-labelledby attributes allow the preformatted text to be announced as an image, with the figcaption serving as the image's alternate description.
... example <figure role="img" aria
-labelledby="cow-caption"> <pre> ___________________________ < i'm an expert in my field.
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
each source size consists of a comma-separated list of media condition
-length pairs.
... <picture> <source srcset="mdn
-logo-wide.png" media="(min-width: 800px)"> <source srcset="mdn
-logo-medium.png" media="(min-width: 600px)"> <img src="mdn
-logo-narrow.png" alt="mdn web docs"> </picture> with the <picture> element, you must always include an <img> with a fallback image, with an alt attribute to ensure accessibility (unless the image is an irrelevant background decorative image).
<table>: The Table element - HTML: Hypertext Markup Language
set margin
-left and margin-right to auto or margin to 0 auto to achieve an effect that is similar to the align attribute.
... mdn tables for visually impaired users tables with multi
-level headers • tables • w3c wai web accessibility tutorials h43: using id and headers attributes to associate data cells with header cells in data tables | techniques for w3c wcag 2.0 specifications specification status comment html living standardthe definition of 'table element' in that specification.
HTML: Hypertext Markup Language
inline elements and block
-level elements html elements are usually "inline" or "block
-level" elements.
...a block
-level element occupies the entire space of its parent element (container), thereby creating a "block." link types in html, various link types can be used to establish and define the relationship between two documents.
MIME types (IANA media types) - HTTP
checkbox" name="mycheckbox"> check</label> <label>upload file: <input type="file" name="myfile" value="test.txt"></label> <button>send the file</button> </form> will send this message: post / http/1.1 host: localhost:8000 user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept
-language: en-us,en;q=0.5 accept-encoding: gzip, deflate connection: keep-alive upgrade-insecure-requests: 1 content-type: multipart/form-data; boundary=---------------------------8721656041911415653955004498 content
-length: 465 -----------------------------8721656041911415653955004498 content-disposition: form-data; name="mytextfield" test -----------------------------8721656041911415653955004498...
... http/1.1 206 partial content accept-ranges: bytes content-type: multipart/byteranges; boundary=3d6b6a416f9b5 content
-length: 385 --3d6b6a416f9b5 content-type: text/html content-range: bytes 100-200/1270 eta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="vieport" content --3d6b6a416f9b5 content-type: text/html content-range: bytes 300-400/1270 -color: #f0f0f2; margin: 0; padding: 0; font-family: "open sans", "helvetica --3d6b6a416f9b5-- importance of set...
Browser detection using the user agent - HTTP
or, there might be some weird flip-phone
-like device thing in the future where flipping it out extends the screen.
... do not be the developer having a headache over how to deal with the flip-phone
-like device thing.
Accept-CH - HTTP
accept-ch and accept-ch
-lifetime headers should be persisted for all secure requests to ensure client hints are sent reliably.
... syntax accept-ch: <list of client hints> examples accept-ch: dpr, viewport-width accept-ch: width accept-ch
-lifetime: 86400 vary: dpr, viewport-width, width note: remember to vary the response based on the accepted client hints.
Access-Control-Expose-Headers - HTTP
by default, only the 7 cors-safelisted response headers are exposed: cache-control content
-language content
-length content-type expires last-modified pragma if you want clients to be able to access other headers, you have to list them using the access-control-expose-headers header.
... examples to expose a non-cors-safelisted request header, you can specify: access-control-expose-headers: content
-length to additionally expose a custom header, like x-kuma-revision, you can specify multiple headers separated by a comma: access-control-expose-headers: content
-length, x-kuma-revision in requests without credentials, you can also use a wildcard value: access-control-expose-headers: * however, this won't wildcard the authorization header, so if you need to expose that, you will need to list ...
CSP: base-uri - HTTP
'nonce-<base64-value>' an allow
-list for specific inline scripts using a cryptographic nonce (number used once).
...at the same time, any allow
-list or source expressions such as 'self' or 'unsafe-inline' are ignored.
CSP: default-src - HTTP
'nonce-<base64-value>' an allow
-list for specific inline scripts using a cryptographic nonce (number used once).
...at the same time, any allow
-list or source expressions such as 'self' or 'unsafe-inline' are ignored.
CSP: form-action - HTTP
'nonce-<base64-value>' an allow
-list for specific inline scripts using a cryptographic nonce (number used once).
...at the same time, any allow
-list or source expressions such as 'self' or 'unsafe-inline' are ignored.
CSP: img-src - HTTP
'nonce-<base64-value>' an allow
-list for specific inline scripts using a cryptographic nonce (number used once).
...at the same time, any allow
-list or source expressions such as 'self' or 'unsafe-inline' are ignored.
CSP: navigate-to - HTTP
'nonce-<base64-value>' an allow
-list for specific inline scripts using a cryptographic nonce (number used once).
...at the same time, any allow
-list or source expressions such as 'self' or 'unsafe-inline' are ignored.
CSP: script-src-attr - HTTP
'nonce-<base64-value>' an allow
-list for specific inline scripts using a cryptographic nonce (number used once).
...at the same time, any allow
-list or source expressions such as 'self' or 'unsafe-inline' are ignored.
CSP: script-src-elem - HTTP
'nonce-<base64-value>' an allow
-list for specific inline scripts using a cryptographic nonce (number used once).
...at the same time, any allow
-list or source expressions such as 'self' or 'unsafe-inline' are ignored.
CSP: script-src - HTTP
'nonce-<base64-value>' an allow
-list for specific inline scripts using a cryptographic nonce (number used once).
...at the same time, any allow
-list or source expressions such as 'self' or 'unsafe-inline' are ignored.
Cross-Origin-Opener-Policy - HTTP
the http cross-origin-opener-policy (coop) response header allows you to ensure a top
-level document does not share a browsing context group with cross-origin documents.
... coop will process-isolate your document and potential attackers can't access to your global object if they were opening it in a popup, preventing a set of cross-origin attacks dubbed xs
-leaks.
Expect - HTTP
for example, the server may reject a request if its content
-length is too large.
... put /somewhere/fun http/1.1 host: origin.example.com content-type: video/h264 content
-length: 1234567890987 expect: 100-continue the server now checks the request headers and may respond with a 100 (continue) response to instruct the client to go ahead and send the message body, or it will send a 417 (expectation failed) status if any of the expectations cannot be met.
Location - HTTP
location and content
-location are different: location indicates the target of a redirection (or the url of a newly created resource), while content
-location indicates the direct url to use to access the resource when content negotiation happened, without the need of further content negotiation.
... location is a header associated with the response, while content
-location is associated with the entity returned.
Range - HTTP
header type request header forbidden header name no syntax range: <unit>=<range-start>- range: <unit>=<range-start>-<range-end> range: <unit>=<range-start>-<range-end>, <range-start>-<range-end> range: <unit>=<range-start>-<range-end>, <range-start>-<range-end>, <range-start>-<range-end> range: <unit>=-<suffix
-length> directives <unit> the unit in which ranges are specified.
... <suffix
-length> an integer in the given unit indicating the number of units at the end of the file to return.
OPTIONS - HTTP
request has body no successful response has body yes safe yes idempotent yes cacheable no allowed in html forms no syntax options /index.html http/1.1 options * http/1.1 examples identifying allowed request methods to find out which request methods a server supports, one can use the curl command
-line program to issue an options request: curl -x options https://example.org -i the response then contains an allow header that holds the allowed methods: http/1.1 204 no content allow: options, get, head, post cache-control: max-age=604800 date: thu, 13 oct 2016 11:45:00 gmt server: eos (lax004/2813) preflighted requests in cors in cors, a preflight request is sent with the options method s...
... options /resources/post-here/ http/1.1 host: bar.example accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept
-language: en-us,en;q=0.5 accept-encoding: gzip,deflate connection: keep-alive origin: https://foo.example access-control-request-method: post access-control-request-headers: x-pingother, content-type the server now can respond if it will accept a request under these circumstances.
PATCH - HTTP
request has body yes successful response has body yes safe no idempotent no cacheable no allowed in html forms no syntax patch /file.txt http/1.1 example request patch /file.txt http/1.1 host: www.example.com content-type: application/example if-match: "e0023aa4e" content
-length: 100 [description of changes] response a successful response is indicated by any 2xx status code.
... http/1.1 204 no content content
-location: /file.txt etag: "e0023aa4f" specifications specification title rfc 5789: patch patch method for http ...
Network Error Logging - HTTP
the top
-level "body" key contains the network error report.
...the ip address is invalid tcp.address_unreachable the ip address is unreachable tcp.failed the tcp connection failed due to reasons not covered by previous errors http.error the user agent successfully received a response, but it had a 4xx or 5xx status code http.protocol.error the connection was aborted due to an http protocol error http.response.invalid response is empty, has a content
-length mismatch, has improper encoding, and/or other conditions that prevent user agent from processing the response http.response.redirect_loop the request was aborted due to a detected redirect loop http.failed the connection failed due to errors in http protocol not covered by previous errors specifications specification network error logging ...
An overview of HTTP - HTTP
this creates sessions, despite basic http being a state
-less protocol.
...for example: get / http/1.1 host: developer.mozilla.org accept
-language: fr read the response sent by the server, such as: http/1.1 200 ok date: sat, 09 oct 2010 14:28:02 gmt server: apache last-modified: tue, 01 dec 2009 20:18:22 gmt etag: "51142bc1-7449-479b075b2891b" accept-ranges: bytes content
-length: 29769 content-type: text/html <!doctype html...
206 Partial Content - HTTP
status 206 partial content examples a response containing one single range: http/1.1 206 partial content date: wed, 15 nov 2015 06:25:24 gmt last-modified: wed, 15 nov 2015 04:58:08 gmt content-range: bytes 21010-47021/47022 content
-length: 26012 content-type: image/gif ...
... a response containing several ranges: http/1.1 206 partial content date: wed, 15 nov 2015 06:25:24 gmt last-modified: wed, 15 nov 2015 04:58:08 gmt content
-length: 1741 content-type: multipart/byteranges; boundary=string_separator --string_separator content-type: application/pdf content-range: bytes 234-639/8000 ...the first range...
411 Length Required - HTTP
the hypertext transfer protocol (http) 411 length required client error response code indicates that the server refuses to accept the request without a defined content
-length header.
... note: by specification, when sending data in a series of chunks, the content
-length header is omitted and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format.
A re-introduction to JavaScript (JS tutorial) - JavaScript
let allows you to declare block
-level variables.
... add(); // nan // you can't perform addition on undefined you can also pass in more arguments than the function is expecting: add(2, 3, 4); // 5 // added the first two; 4 was ignored that may seem a little silly, but functions have access to an additional variable inside their body called arguments, which is an array
-like object holding all of the values passed to the function.
Working with objects - JavaScript
the exception to this rule is array
-like object reflected from html, such as the forms array
-like object.
... you can always refer to objects in these array
-like objects by either their ordinal number (based on where they appear in the document) or their name (if defined).
Array.prototype.join() - JavaScript
the join() method creates and returns a new string by concatenating all of the elements in an array (or an array
-like object), separated by commas or a specified separator string.
... var a = ['wind', 'water', 'fire']; a.join(); // 'wind,water,fire' a.join(', '); // 'wind, water, fire' a.join(' + '); // 'wind + water + fire' a.join(''); // 'windwaterfire' joining an array
-like object the following example joins array
-like object (arguments), by calling function.prototype.call on array.prototype.join.
Array.prototype.reverse() - JavaScript
const a = [1, 2, 3]; console.log(a); // [1, 2, 3] a.reverse(); console.log(a); // [3, 2, 1] reversing the elements in an array
-like object the following example creates an array
-like object a, containing three elements and a length property, then reverses the array
-like object.
... the call to reverse() returns a reference to the reversed array
-like object a.
BigInt64Array - JavaScript
static methods bigint64array.from() creates a new bigint64array from an array
-like or iterable object.
... bigint64array.prototype.reduceright() applies a function against an accumulator and each value of the array (from right-to
-left) so as to reduce it to a single value.
BigUint64Array - JavaScript
static methods biguint64array.from() creates a new biguint64array from an array
-like or iterable object.
... biguint64array.prototype.reduceright() applies a function against an accumulator and each value of the array (from right-to
-left) so as to reduce it to a single value.
DataView - JavaScript
the dataview view provides a low
-level interface for reading and writing multiple number types in a binary arraybuffer, without having to care about the platform's endianness.
...further, although native bigints are much faster than user
-land library equivalents, bigints will always be much slower than 32-bit integers in javascript due to the nature of their variable size.
Float32Array - JavaScript
static methods float32array.from() creates a new float32array from an array
-like or iterable object.
... float32array.prototype.reduceright() apply a function against an accumulator and each value of the array (from right-to
-left) as to reduce it to a single value.
Float64Array - JavaScript
static methods float64array.from() creates a new float64array from an array
-like or iterable object.
... float64array.prototype.reduceright() apply a function against an accumulator and each value of the array (from right-to
-left) as to reduce it to a single value.
Int16Array - JavaScript
static methods int16array.from() creates a new int16array from an array
-like or iterable object.
... int16array.prototype.reduceright() apply a function against an accumulator and each value of the array (from right-to
-left) as to reduce it to a single value.
Int32Array - JavaScript
static methods int32array.from() creates a new int32array from an array
-like or iterable object.
... int32array.prototype.reduceright() apply a function against an accumulator and each value of the array (from right-to
-left) as to reduce it to a single value.
Int8Array - JavaScript
static methods int8array.from() creates a new int8array from an array
-like or iterable object.
... int8array.prototype.reduceright() apply a function against an accumulator and each value of the array (from right-to
-left) as to reduce it to a single value.
Intl.Locale.prototype.baseName - JavaScript
examples basic example let myloc = new intl.locale("fr
-latn-ca"); // sets locale to canadian french console.log(myloc.tostring()); // prints out "fr
-latn-ca-u-ca-gregory" console.log(myloc.basename); // prints out "fr
-latn-ca" example with options in the input string // sets language to japanese, region to japan, // calendar to gregorian, hour cycle to 24 hours let japan = new intl.locale("ja-jp-u-ca-gregory-hc-24"); console.log(japan.tostring()); /...
.../ prints out "ja-jp-u-ca-gregory-hc-h24" 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) ...
Intl.Locale.prototype.caseFirst - JavaScript
let casefirststr = new intl.locale("fr
-latn-fr-u-kf-upper"); console.log(casefirststr.casefirst); // prints "upper" setting the casefirst value via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can be used to pass extension types.
... let casefirstobj= new intl.locale("en
-latn-us", {casefirst: "lower"}); console.log(us12hour.casefirst); // prints "lower" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.collation - JavaScript
let stringcoll = new intl.locale("en
-latn-us-u-co-emoji"); console.log(stringcoll.collation); // prints "emoji" adding a collation type via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can contain any of several extension types, including collation types.
... let configcoll = new intl.locale("en
-latn-us", {collation: "emoji"}); console.log(configcoll.collation); // prints "emoji" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.language - JavaScript
let langstr = new intl.locale("en
-latn-us"); console.log(langstr.language); // prints "en" overriding language via the configuration object while the language subtag must be specified, the locale constructor takes a configuration object, which can override the language subtag.
... let langobj = new intl.locale("en
-latn-us", {language: "es"}); console.log(langobj.language); // prints "es" specifications specification ecmascript internationalization api (ecma-402) ...
export - JavaScript
js'; examples using named exports in a module my-module.js, we could include the following code: // module "my-module.js" function cube(x) { return x * x * x; } const foo = math.pi + math.sqrt2; var graph = { options: { color:'white', thickness:'2px' }, draw: function() { console.log('from graph draw function'); } } export { cube, foo, graph }; then in the top
-level module included in your html page, we could have: import { cube, foo, graph } from './my-module.js'; graph.options = { color:'blue', thickness:'3px' }; graph.draw(); console.log(cube(3)); // 27 console.log(foo); // 4.555806215962888 it is important to note the following: you need to include this script in your html with a <script> element of type="module", so that it gets re...
......; // assign something useful to myvariable export {myfunction, myvariable}; // in childmodule2.js let myclass = ...; // assign something useful to myclass export myclass; // in parentmodule.js // only aggregating the exports from childmodule1 and childmodule2 // to re-export them export { myfunction, myvariable } from 'childmodule1.js'; export { myclass } from 'childmodule2.js'; // in top
-level module // we can consume the exports from a single module since parentmodule // "collected"/"bundled" them in a single source import { myfunction, myvariable, myclass } from 'parentmodule.js' specifications specification ecmascript (ecma-262)the definition of 'exports' in that specification.
Statements and declarations - JavaScript
for...of iterates over iterable objects (including arrays, array
-like objects, iterators and generators), invoking a custom iteration hook with statements to be executed for the value of each distinct property.
... for await...of iterates over async iterable objects, array
-like objects, iterators and generators, invoking a custom iteration hook with statements to be executed for the value of each distinct property.
name - Web app manifests
name is directionality-capable, which means it can be displayed left-to-right or right-to
-left based on the values of the dir and lang manifest members.
... examples simple name in left-to-right language: "name": "awesome application" right-to
-left name in arabic: "dir": "rtl", "lang": "ar", "name": "!أنا من التطبيق" specification specification status comment feedback web app manifestthe definition of 'name' in that specification.
short_name - Web app manifests
short_name is directionality-capable, which means it can be displayed left-to-right or right-to
-left based on the value of the dir and lang manifest members.
... examples simple short_name in left-to-right language: "name": "awesome application", "short_name": "awesome app" short_name in arabic, which will be displayed right-to
-left: "dir": "rtl", "lang": "ar", "name": "تطبيق رائع", "short_name": "رائع" specification specification status comment feedback web app manifestthe definition of 'short_name' in that specification.
MathML element reference - MathML
mathml presentation elements a to z math <math> (top
-level element) a <maction> (binded actions to sub-expressions) <maligngroup> (alignment group) <malignmark> (alignment points) e <menclose> (enclosed contents) <merror> (enclosed syntax error messages) f <mfenced> (parentheses) <mfrac> (fraction) g <mglyph> (displaying non-standard symbols) i <mi> (identifier) l <mlabeledtr> (labeled row in a table or a matrix) ...
...uperscript pair) t <mtable> (table or matrix) <mtd> (cell in a table or a matrix) <mtext> (text) <mtr> (row in a table or a matrix) u <munder> (underscript) <munderover> (underscript-overscript pair) other elements <semantics> (container for semantic annotations) <annotation> (data annotations) <annotation-xml> (xml annotations) mathml presentation elements by category top
-level elements <math> token elements <mglyph> <mi> <mn> <mo> <ms> <mspace> <mtext> general layout <menclose> <merror> <mfenced> <mfrac> <mpadded> <mphantom> <mroot> <mrow> <msqrt> <mstyle> script and limit elements <mmultiscripts> <mover> <mprescripts> <msub> <msubsup> <msup> <munder> <munderover> <none> tabular math <maligngroup> <malignmark> <mlab...
MathML documentation index - MathML
10 <maction> mathml, mathml reference, mathml:element, mathml:enlivening expressions the following example uses the "toggle" actiontype: 11 <math> mathml, mathml reference, mathml:element the top
-level element in mathml is <math>.
... 19 <mmultiscripts> mathml, mathml reference, mathml:element, mathml:script and limit schemata the mathml <mmultiscripts> element allows you to create tensor
-like objects.
The "codecs" parameter in common media types - Web media technologies
for example, mpeg-4's aac
-lc has an audio object type number of 2, so the full codecs value representing aac
-lc is mp4a.40.2.
... 1 aac main main 2 aac lc (low complexity) main, scalable, hq, ld v2, aac, he-aac, he-aac v2 3 aac ssr (scalable sampling rate) main 4 aac ltp (long term prediction) main, scalable, hq 5 sbr (spectral band replication) he-aac, he-aac v2 6 aac scalable main, scalable, hq 7 twinvq (coding for ultra
-low bit rates) main, scalable 8 celp (code-excited linear prediction) main, scalable, speech, hq, ld 9 hvxc (harmonic vector excitation coding) main, scalable, speech, ld 10 – 11 reserved 12 ttsi (text to speech interface) main, scalable, speech, synthetic, ld 13 main synthetic main, synthetic 14 wavetable ...
Lazy loading - Web Performance
this enables sending the minimal code required to provide value upfront, improving page
-load times.
... <img src="image.jpg" loading="lazy" alt="..." /> <iframe src="video-player.html" loading="lazy"></iframe> the load event fires when the eagerly
-loaded content has all been loaded; at that time, it's entirely possible (or even likely) that there may be lazily
-loaded images that are within the visual viewport that haven't yet loaded.
Add to Home screen - Progressive web apps (PWAs)
(note: in android 8 and higher, a system
-level "add to home screen" permission dialog will be shown first.) if you have mobile chrome available, the experience is slightly different; upon loading our site, you'll see an install banner pop up asking whether you want to add this app to your home screen.
...to make it feel like a distinct app (and not just a web page), you should choose a value such as fullscreen (no ui is shown at all) or standalone (very similar, but system
-level ui elements such as the status bar might be visible).
How to make PWAs installable - Progressive web apps (PWAs)
this makes the web app easier to access; additionally, you can specify that the app be launched in fullscreen or standalone mode, thus removing the default browser user interface that would otherwise be present, creating an even more seamless and native
-like feel.
...this information is needed for the browser to present the web app properly during the installation process, as well as within the device's app
-launching interface, such as the home screen of a mobile device.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
fy({ subscription: subscription, payload: payload, delay: delay, ttl: ttl, }), }); }; when the button is clicked, fetch asks the server to send the notification with the given parameters: payload is the text that to be shown in the notification, delay defines a delay in seconds until the notification will be shown, and ttl is the time-to
-live setting that keeps the notification available on the server for a specified amount of time, also defined in seconds.
...we will only provide a high
-level overview here.
The building blocks of responsive design - Progressive web apps (PWAs)
nav { width: 100%; position: absolute; z-index: 1000; display: -webkit-flex; display: -moz-flex; display: -ms-flexbox; display: flex; } nav button { font-size: 6.8vw; -webkit-flex: 1; -moz-flex: 1; -ms-flex: 1; flex: 1; border
-left: 1px solid rgba(100,100,100,0.4); } nav button:first-child { border
-left: 0; } } in this last set of rules, we change the display value of the <nav> to flex to make it show (it was set to none in the default css at the top of the stylesheet, as it wasn't needed for the other views.) we then use absolute positioning and z-index to make it take up no space in the document flow, and...
...uery that only applies its contents to the markup when device is viewed in landscape orientation: @media all and (max-width: 480px) and (orientation: landscape) { nav { width: auto; -webkit-flex-direction: column; -moz-flex-direction: column; -ms-flex-direction: column; flex-direction: column; } nav button { font-size: 6.8vh; } nav button { border
-left: 0; } x-card:nth-child(1) video, x-card:nth-child(2) img, x-card:nth-child(3) { margin-top: 0; } x-card:nth-child(1) button, x-card:nth-child(2) button { font-size: 2rem; } } this does the following: adjusts the nav buttons, changing the direction the flexbox is laid out in, and altering the font size and borders so they sit vertically instead of horizontally.
begin - SVG: Scalable Vector Graphics
value <begin-value
-list> default value 0s animatable no the <begin-value
-list> is a semicolon-separated list of values.
... value <begin-value
-list> default value 0s animatable no the definition of <begin-value
-list> is the same as for the other animation elements.
clip-path - SVG: Scalable Vector Graphics
een elements: <a>, <circle>, <clippath>, <ellipse>, <g>, <glyph>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <symbol>, <text>, <use> html,body,svg { height:100% } <svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <clippath id="myclip" clippathunits="objectboundingbox"> <circle cx=".5" cy=".5" r=".5" /> </clippath> <!-- top
-left: apply a custom defined clipping path --> <rect x="1" y="1" width="8" height="8" stroke="green" clip-path="url(#myclip)" /> <!-- top-right: apply a css basic shape on a fill-box geometry.
... this is the same as having a custom clipping path with a clippathunits set to objectboundingbox --> <rect x="11" y="1" width="8" height="8" stroke="green" clip-path="circle() fill-box" /> <!-- bottom
-left --> <rect x="1" y="11" width="8" height="8" stroke="green" clip-path="circle() stroke-box" /> <!-- bottom-right: apply a css basic shape on a view-box geometry.
display - SVG: Scalable Vector Graphics
<rect x="20" y="20" width="60" height="60" fill="yellow"></rect> <!-- here the yellow rectangle is not displayed --> <rect x="120" y="0" width="100" height="100" fill="skyblue"></rect> <rect x="140" y="20" width="60" height="60" fill="yellow" display="none"></rect> </svg> usage notes default value inline value [ <display-outside> | <display-inside> ] | <display
-listitem> | <display-internal> | <display-box> | <display
-legacy>where <display-outside> = block | inline | run-in<display-inside> = flow | flow-root | table | flex | grid | ruby<display
-listitem> = <display-outside>?
...&& list-item<display-internal> = table-row-group | table-header-group | table-footer-group | table-row | table-cell | table-column-group | table-column | table-caption | ruby-base | ruby-text | ruby-base-container | ruby-text-container<display-box> = contents | none<display
-legacy> = inline-block | inline
-list-item | inline-table | inline-flex | inline-grid animatable yes for a description of the values, please refer to the css display property.
gradientTransform - SVG: Scalable Vector Graphics
e" /> <stop offset="50%" stop-color="skyblue" /> <stop offset="100%" stop-color="darkblue" /> </radialgradient> <rect x="0" y="0" width="200" height="200" fill="url(#gradient1)" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient2)" style="transform: translatex(220px);" /> </svg> usage notes default value identity transform value <transform
-list> animatable yes <transform
-list> a list of transformation functions specifying some additional transformation from the gradient coordinate system onto the target coordinate system.
... working draft defines the <transformation
-list> value.
media - SVG: Scalable Vector Graphics
<style> html, body, svg { height: 100%; } <svg viewbox="0 0 240 220" xmlns="http://www.w3.org/2000/svg"> <style> rect { fill: black; } </style> <style media="all and (min-width: 600px)"> rect { fill: seagreen; } </style> <text y="15">resize the window to see the effect</text> <rect y="20" width="200" height="200" /> </svg> usage notes value <media-query
-list> default value all animatable yes <media-query
-list> this value holds a media query that needs to match in order for the style sheet to be applied.
... candidate recommendation changed the value definition from different media types as defined in css 2 to <media-query
-list>.
SVG Attribute reference - SVG: Scalable Vector Graphics
intent repeatcount repeatdur requiredextensions requiredfeatures restart result rotate rx ry s scale seed shape-rendering slope spacing specularconstant specularexponent speed spreadmethod startoffset stddeviation stemh stemv stitchtiles stop-color stop-opacity strikethrough-position strikethrough-thickness string stroke stroke-dasharray stroke-dashoffset stroke
-linecap stroke
-linejoin stroke-miterlimit stroke-opacity stroke-width style surfacescale systemlanguage t tabindex tablevalues target targetx targety text-anchor text-decoration text-rendering textlength to transform transform-origin type u u1 u2 underline-position underline-thickness unicode unicode-bidi unicode-range units-per-em v v-alphabetic v-hanging ...
... flood-opacity, font-family, font-size, font-size-adjust, font-stretch, font-style, font-variant, font-weight, glyph-orientation-horizontal, glyph-orientation-vertical, image-rendering, kerning, letter-spacing, lighting-color, marker-end, marker-mid, marker-start, mask, opacity, overflow, pointer-events, shape-rendering, stop-color, stop-opacity, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, text-decoration, text-rendering, transform, transform-origin, unicode-bidi, vector-effect, visibility, word-spacing, writing-mode filters attributes filter primitive attributes height, result, width, x, y transfer function attributes type, tablevalues, slope, intercept, amplitude, exponent, offset animatio...
<circle> - SVG: Scalable Vector Graphics
ssing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<circle>' in that specificatio...
<ellipse> - SVG: Scalable Vector Graphics
ssing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<ellipse>' in that specificati...
<foreignObject> - SVG: Scalable Vector Graphics
uage event attributes global event attributes, graphical event attributes, document event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<foreignobject>' in that specification.
<g> - SVG: Scalable Vector Graphics
ssing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <mark...
<line> - SVG: Scalable Vector Graphics
ssing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<line>' in that specification.
<linearGradient> - SVG: Scalable Vector Graphics
value type: <transform
-list> ; default value: identity transform; animatable: yes href this attribute defines a reference to another <lineargradient> element that will be used as a template.
...ributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:descriptive elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment ...
<marker> - SVG: Scalable Vector Graphics
ably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <patter...
<path> - SVG: Scalable Vector Graphics
ssing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment svg pathsthe definition of '<path>' in that specification.
<pattern> - SVG: Scalable Vector Graphics
value type: <transform
-list>; default value: none; animatable: yes patternunits this attribute defines the coordinate system for attributes x, y, width , and height.
...ably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile...
<polygon> - SVG: Scalable Vector Graphics
ssing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polygon>' in that specificati...
<polyline> - SVG: Scalable Vector Graphics
ssing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polyline>' in that specificat...
<radialGradient> - SVG: Scalable Vector Graphics
value type: <transform
-list> ; default value: identity transform; animatable: yes href this attribute defines a reference to another <lineargradient> element that will be used as a template.
...ributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:descriptive elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment ...
<rect> - SVG: Scalable Vector Graphics
ssing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<rect>' in that specification.
<svg> - SVG: Scalable Vector Graphics
uage event attributes global event attributes, graphical event attributes, document event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <mark...
<symbol> - SVG: Scalable Vector Graphics
tyling attributes class, style event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <mark...
<text> - SVG: Scalable Vector Graphics
ost notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-fl...
...owto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, text content elementpermitted contentcharacter data and any number of the following elements, in any order:animation elementsdescriptive elementstext content elements<a> specifications specification status comment scalable vector graphics (svg) 2the def...
<textPath> - SVG: Scalable Vector Graphics
ssing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:title usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment ...
<tspan> - SVG: Scalable Vector Graphics
ost notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-fl...
...owto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scala...
<use> - SVG: Scalable Vector Graphics
ssing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke
-linecap, stroke
-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-gr...
...abbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria
-label, aria
-labelledby, aria
-level, aria
-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:href, xlink:title usage notes categoriesgraphics element, graphics referencing element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphic...
Tutorials
tips for authoring fast
-loading html pages optimize web pages to provide a more responsive site for visitors and reduce the load on your web server and internet connection.
... a re-introduction to javascript a recap of the javascript programming language aimed at intermediate
-level developers.
<xsl:import> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:import> element is a top
-level element that serves to import the contents of one stylesheet into another stylesheet.
... type top
-level, must appear before any other child of <xsl:stylesheet> or <xsl:transform> in the importing stylesheet.
Index - WebAssembly
found 12 pages: # page tags and summary 1 webassembly landing, webassembly, wasm webassembly is a new type of code that can be run in modern web browsers — it is a low
-level assembly
-like language with a compact binary format that runs with near-native performance and provides languages such as c/c++ with a compilation target so that they can run on the web.
... 10 understanding webassembly text format functions, javascript, s-expressions, webassembly, calls, memory, shared address, table, text format, was, wasm this finishes our high
-level tour of the major components of the webassembly text format and how they get reflected in the webassembly js api.
Compiling from Rust to WebAssembly - WebAssembly
navigate to wherever you keep your personal projects, and type this: $ cargo new -
-lib hello-wasm created library `hello-wasm` project this creates a new library in a subdirectory named hello-wasm with everything you need to get going: +-- cargo.toml +-- src +-- lib.rs first, we have cargo.toml; this is the file that we use to configure our build.
...we give a high
-level explanation here, and gloss over some details; to learn more about rust, please check the free online book the rust programming language.
Modules - Archive of obsolete content
however, the following example shows how it can be used to load scripts from other locations: const { classes: cc interfaces: ci } = components; var instance = cc["@mozilla.org/moz/jssubscript
-loader;1"]; var loader = instance.getservice(ci.mozijssubscriptloader); function loadscript(url) { loader.loadsubscript(url); } when a script is loaded, it is evaluated in the scope of the global object of the script that loaded it.