Search completed in 1.14 seconds.
preceding-sibling - XPath
The
preceding-sibling axis indicates all the nodes that have the same parent as the context node and appear before the context node in the source document. ...
preceding - XPath
The
preceding axis indicates all the nodes that precede the context node in the document except any ancestor, attribute and namespace nodes. ...
NSPR Error Handling
r NSPR types, functions, and macros, see NSPR Naming Conventions. Error Type PRErrorCode Error Functions PR_SetError PR_SetErrorText PR_GetError PR_GetOSError PR_GetErrorTextLength PR_GetErrorText Error Codes Error codes defined in prerror.h: PR_OUT_OF_MEMORY_ERROR Insufficient memory to perform request. PR_BAD_DESCRIPTOR_ERROR The file descriptor used as an argument in the
preceding function is invalid. PR_WOULD_BLOCK_ERROR The operation would have blocked, which conflicts with the semantics that have been established. PR_ACCESS_FAULT_ERROR One of the arguments of the
preceding function specified an invalid memory address. PR_INVALID_METHOD_ERROR The
preceding function is invalid for the type of file descriptor used. PR_ILLEGAL_ACCESS_ERROR One of the arguments of th...
...unction is invalid. PR_WOULD_BLOCK_ERROR The operation would have blocked, which conflicts with the semantics that have been established. PR_ACCESS_FAULT_ERROR One of the arguments of the
preceding function specified an invalid memory address. PR_INVALID_METHOD_ERROR The
preceding function is invalid for the type of file descriptor used. PR_ILLEGAL_ACCESS_ERROR One of the arguments of the
preceding function specified an invalid memory address. PR_UNKNOWN_ERROR Some unknown error has occurred. PR_PENDING_INTERRUPT_ERROR The operation terminated because another thread has interrupted it with PR_Interrupt. PR_NOT_IMPLEMENTED_ERROR The
preceding function has not been implemented. PR_IO_ERROR The
preceding I/O function encountered some sort of an error, perhaps an invalid device. PR_IO_...
... PR_IO_PENDING_ERROR An I/O operation has been attempted on a file descriptor that is currently busy with another operation. PR_DIRECTORY_OPEN_ERROR The directory could not be opened. ...
..._ADDRESS_IN_USE_ERROR Network address specified (PRNetAddr) is in use. PR_CONNECT_REFUSED_ERROR The peer has refused to allow the connection to be established. PR_NETWORK_UNREACHABLE_ERROR The network address specifies a host that is unreachable (perhaps temporary). PR_CONNECT_TIMEOUT_ERROR The connection attempt did not complete in a reasonable period of time. PR_NOT_CONNECTED_ERROR The
preceding function attempted to use connected semantics on a network file descriptor that was not connected. PR_LOAD_LIBRARY_ERROR Failure to load a dynamic library. PR_UNLOAD_LIBRARY_ERROR Failure to unload a dynamic library. PR_FIND_SYMBOL_ERROR Symbol could not be found in the specified library. PR_INSUFFICIENT_RESOURCES_ERROR There are insufficient system resources to process the request. PR_D...
Regular expression syntax cheatsheet - JavaScript
iterally. For example, /b/ matches the character "b". By placing a backslash in front of "b", that is by using /\b/, the character becomes special to mean match a word boundary. For characters that are usually treated specially, indicates that the next character is not special and should be interpreted literally. For example, "*" is a special character that means 0 or more occurrences of the
preceding character should be matched; for example, /a*/ means match 0 or more "a"s. To match * literally, precede it with a backslash; for example, /a\*/ matches "a*". Note that some characters like :, -, @, etc. neither have a special meaning when escaped nor when unescaped. Escape sequences like \:, \-, \@ will be equivalent to their literal, unescaped character equivalents in regular expressi...
...n]) or from the predefined RegExp object's properties ($1, ..., $9). Quantifiers If you are looking to contribute to this document, please also edit the original article Note: In the following, item refers not only to singular characters, but also includes character classes, Unicode property escapes, groups and ranges. Characters Meaning x* Matches the
preceding item "x" 0 or more times. For example, /bo*/ matches "boooo" in "A ghost booooed" and "b" in "A bird warbled", but nothing in "A goat grunted". x+ Matches the
preceding item "x" 1 or more times. Equivalent to {1,}. For example, /a+/ matches the "a" in "candy" and all the "a"'s in "caaaaaaandy". x? Matches the
preceding item "x" 0 or 1 times. For example, ...
...s. For example, /e?le?/ matches the "el" in "angel" and the "le" in "angle." If used immediately after any of the quantifiers *, +, ?, or {}, makes the quantifier non-greedy (matching the minimum number of times), as opposed to the default, which is greedy (matching the maximum number of times). x{n} Where "n" is a positive integer, matches exactly "n" occurrences of the
preceding item "x". For example, /a{2}/ doesn't match the "a" in "candy", but it matches all of the "a"'s in "caandy", and the first two "a"'s in "caaandy". x{n,} Where "n" is a positive integer, matches at least "n" occurrences of the
preceding item "x". For example, /a{2,}/ doesn't match the "a" in "candy", but matches all of the a's in "caandy" and in "caaaaaaandy". x{n...
...For example, /a{1,3}/ matches nothing in "cndy", the "a" in "candy", the two "a"'s in "caandy", and the first three "a"'s in "caaaaaaandy". Notice that when matching "caaaaaaandy", the match is "aaa", even though the original string had more "a"s in it. ...
dx - SVG: Scalable Vector Graphics
" y="50%">SVG</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } altGlyph Warning: As of SVG2 <altGlyph> is deprecated and shouldn't be used. For <altGlyph>, if it contains a single value, dx defines a shift along the x-axis for all alternate glyph. If there are multiple values, dx defines a shift along the x-axis for each individual glyph relative to the
preceding glyph. If there are less values than glyphs, the remaining glyphs use a value of 0. If there are more values than glyphs, extra values are ignored. Value List of <length> Default value none Animatable Yes feDropShadow For <feDropShadow>, dx defines the x offset of the droped shadow. The unit used to resolve the value of the attribute is set by the prim...
...houldn't be used. For <glyphRef>, dx defines the x offset of the glyph, in the font metric system. Value <number> Default value 0 Animatable Yes text For <text>, if it contains a single value, dx defines a shift along the x-axis for all glyphs. If there are multiple values, dx defines a shift along the x-axis for each individual glyph relative to the
preceding glyph. If there are less values than glyphs, the remaining glyphs use a value of 0. If there are more values than glyphs, extra values are ignored. Value List of <length> Default value none Animatable Yes Example html,body,svg { height:100% } <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- Lines materialized the position of the...
... dx="0 10% 20%" x="10%" y="75%">SVG</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } tref Warning: As of SVG2 <tref> is deprecated and shouldn't be used. For <tref>, if it contains a single value, dx defines a shift along the x-axis for all glyphs. If there are multiple values, dx defines a shift along the x-axis for each individual glyph relative to the
preceding glyph. If there are less values than glyphes, the remaining glyphes use a value of 0. If there are more values than glyphes, extra values are ignored. Value List of <length> Default value none Animatable Yes tspan For <tspan>, if it contains a single value, dx defines a shift along the x-axis for all alternate glyph. If there are multiple values, dx d...
... value of 0. If there are more values than glyphes, extra values are ignored. Value List of <length> Default value none Animatable Yes tspan For <tspan>, if it contains a single value, dx defines a shift along the x-axis for all alternate glyph. If there are multiple values, dx defines a shift along the x-axis for each individual glyph relative to the
preceding glyph. If there are less values than glyphs, the remaining glyphs use a value of 0. If there are more values than glyphs, extra values are ignored. Value List of <length> Default value none Animatable Yes Specifications Specification Status Comment Filter Effects Module Level 1The definition of 'dx' in that specification. ...
dy - SVG: Scalable Vector Graphics
" y="30%">SVG</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } altGlyph Warning: As of SVG2 <altGlyph> is deprecated and shouldn't be used. For <altGlyph>, if it contains a single value, dy defines a shift along the y-axis for all alternate glyph. If there are multiple values, dy defines a shift along the y-axis for each individual glyph relative to the
preceding glyph. If there are less values than glyphes, the remaining glyphes use a value of 0. If there are more values than glyphes, extra values are ignored. Value List of <length> Default value none Animatable Yes feDropShadow For <feDropShadow>, dy defines the y offset of the dropped shadow. The unit used to resolve the value of the attribute is set by the ...
...houldn't be used. For <glyphRef>, dy defines the y offset of the glyph, in the font metric system. Value <number> Default value 0 Animatable Yes text For <text>, if it contains a single value, dy defines a shift along the y-axis for all glyphs. If there are multiple values, dy defines a shift along the y-axis for each individual glyph relative to the
preceding glyph. If there are less values than glyphes, the remaining glyphes use a value of 0. If there are more values than glyphes, extra values are ignored. Value List of <length> Default value none Animatable Yes Example html,body,svg { height:100% } <svg viewBox="0 0 150 100" xmlns="http://www.w3.org/2000/svg"> <!-- Horizontal lines --> <line x1="0"...
...text dy="0 10 20" x="90" y="30">SVG</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } tref Warning: As of SVG2 <tref> is deprecated and shouldn't be used. For <tref>, if it contains a single value, dy defines a shift along the y-axis for all glyphs. If there are multiple values, dy defines a shift along the y-axis for each individual glyph relative to the
preceding glyph. If there are less values than glyphes, the remaining glyphes use a value of 0. If there are more values than glyphes, extra values are ignored. Value List of <length> Default value none Animatable Yes tspan For <tspan>, if it contains a single value, dy defines a shift along the y-axis for all alternate glyph. If there are multiple values, dy d...
... value of 0. If there are more values than glyphes, extra values are ignored. Value List of <length> Default value none Animatable Yes tspan For <tspan>, if it contains a single value, dy defines a shift along the y-axis for all alternate glyph. If there are multiple values, dy defines a shift along the y-axis for each individual glyph relative to the
preceding glyph. If there are less values than glyphes, the remaining glyphes use a value of 0. If there are more values than glyphes, extra values are ignored. Value List of <length> Default value none Animatable Yes Specifications Specification Status Comment Filter Effects Module Level 1The definition of 'dy' in that specification.
Bytecode Descriptions
oid Stack: val => undefined Pop the top value on the stack, discard it, and push undefined. Implements: The void operator, step 3. Typeof, TypeofExpr Stack: val => (typeof val) The typeof operator. Infallible. The result is always a string that depends on the type of val. JSOp::Typeof and JSOp::TypeofExpr are the same except that--amazingly--JSOp::Typeof affects the behavior of an immediately
preceding JSOp::GetName or JSOp::GetGName instruction! This is how we implement typeof step 2, making typeof nonExistingVariable return "undefined" instead of throwing a ReferenceError. In a global scope: typeof x compiles to GetGName "x"; Typeof. typeof (0, x) compiles to GetGName "x"; TypeofExpr. Emitting the same bytecode for these two expressions would be a bug. Per spec, the latter throws a Referenc...
...must be AfterYield. Implements: GeneratorStart, steps 4-7. Format: JOF_RESUMEINDEX AfterYield Operands: (uint32_t icIndex) Bytecode emitted after yield expressions. This is useful for the Debugger and AbstractGeneratorObject::isAfterYieldOrAwait. It's treated as jump target op so that the Baseline Interpreter can efficiently restore the frame's interpreterICEntry when resuming a generator. The
preceding instruction in the script must be Yield, InitialYield, or Await. Format: JOF_ICINDEX FinalYieldRval Stack: gen => Suspend and close the current generator, async function, or async generator. gen must be the generator object for the current frame. If the current function is a non-async generator, then the value in the frame's return value slot is returned to the caller. It should be an object o...
...nth element of the stack. n must not be 0. Other Nop Do nothing. This is used when we need distinct bytecode locations for various mechanisms. 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. The lineno operand should agree with this script's source notes about the line number of the
preceding *Eval instruction. NopDestructuring No-op instruction to hint that the top stack value is uninteresting. This affects only debug output and some error messages. In array destructuring, we emit bytecode that is roughly equivalent to result.done ? undefined : result.value. NopDestructuring is emitted after the undefined, so that the expression decompiler and disassembler know to casually ignore ...
background-position - CSS: Cascading Style Sheets
e, to place an item relative to the edges of an element's box. It can be defined using one to four values. If two non-keyword values are used, the first value represents the horizontal position and the second represents the vertical position. If only one value is specified, the second value is assumed to be center. If three or four values are used, the length-percentage values are offsets for the
preceding keyword value(s). 1-value syntax: the value may be: The keyword value center, which centers the image. One of the keyword values top, left, bottom, right. This specifies an edge against which to place the item. The other dimension is then set to 50%, so the item is placed in the middle of the edge specified. A <length> or <percentage>. This specifies the X coordinate relative to the l...
...the first defines X and the second Y. Note that: If one value is top or bottom, then the other value may not be top or bottom. If one value is left or right, then the other value may not be left or right. This means, e.g., that top top and left right are not valid. The default value is top left or 0% 0%. 3-value syntax: Two values are keyword values, and the third is the offset for the
preceding value: The first value is one of the keyword values top, left, bottom, right, or center. If left or right are given here, then this defines X. If top or bottom are given, then this defines Y and the other keyword value defines X. The <length> or <percentage> value, if it is the second value, is the offset for the first value. If it is the third value, it is the offset for the second value.
...for the first value. If it is the third value, it is the offset for the second value. The single length or percentage value is an offset for the keyword value that precedes it. The combination of one keyword with two <length> or <percentage> values is not valid. 4-value syntax: The first and third values are keyword value defining X and Y. The second and fourth values are offsets for the
preceding X and Y keyword values: The first value and third values one of the keyword values top, left, bottom, right. If left or right are given here, then this defines X. If top or bottom are given, then this defines Y and the other keyword value defines X. The second and fourth values are <length> or <percentage> values. The second value is the offset for the first keyword. The fourth value is th...
Quantifiers - JavaScript
uantifiers indicate numbers of characters or expressions to match. Types The following table is also duplicated on this cheatsheet. Do not forget to edit it as well, thanks! Note: In the following, item refers not only to singular characters, but also includes character classes, Unicode property escapes, groups and ranges. Characters Meaning x* Matches the
preceding item "x" 0 or more times. For example, /bo*/ matches "boooo" in "A ghost booooed" and "b" in "A bird warbled", but nothing in "A goat grunted". x+ Matches the
preceding item "x" 1 or more times. Equivalent to {1,}. For example, /a+/ matches the "a" in "candy" and all the "a"'s in "caaaaaaandy". x? Matches the
preceding item "x" 0 or 1 times. For example, ...
...s. For example, /e?le?/ matches the "el" in "angel" and the "le" in "angle." If used immediately after any of the quantifiers *, +, ?, or {}, makes the quantifier non-greedy (matching the minimum number of times), as opposed to the default, which is greedy (matching the maximum number of times). x{n} Where "n" is a positive integer, matches exactly "n" occurrences of the
preceding item "x". For example, /a{2}/ doesn't match the "a" in "candy", but it matches all of the "a"'s in "caandy", and the first two "a"'s in "caaandy". x{n,} Where "n" is a positive integer, matches at least "n" occurrences of the
preceding item "x". For example, /a{2,}/ doesn't match the "a" in "candy", but matches all of the a's in "caandy" and in "caaaaaaandy". x{n...
...For example, /a{1,3}/ matches nothing in "cndy", the "a" in "candy", the two "a"'s in "caandy", and the first three "a"'s in "caaaaaaandy". Notice that when matching "caaaaaaandy", the match is "aaa", even though the original string had more "a"s in it. ...
nsIAccessibleText
ents() Returns the bounding box of the specified position. The virtual character after the last character of the represented text, that is the one at position length is a special case. It represents the current input position and will therefore typically be queried by AT more often than other positions. Because it does not represent an existing character its bounding box is defined in relation to
preceding characters. It should be roughly equivalent to the bounding box of some character when inserted at the end of the text. Its height typically being the maximal height of all the characters in the text or the height of the
preceding character, its width being at least one pixel so that the bounding box is not degenerate. void getCharacterExtents( in long offset, out long x, out long y, out ...
...r there is no character under the point. getRangeExtents() The virtual character after the last character of the represented text, that is the one at position length is a special case. It represents the current input position and will therefore typically be queried by AT more often than other positions. Because it does not represent an existing character its bounding box is defined in relation to
preceding characters. It should be roughly equivalent to the bounding box of some character when inserted at the end of the text. Its height typically being the maximal height of all the characters in the text or the height of the
preceding character, its width being at least one pixel so that the bounding box is not degenerate. void getRangeExtents( in long startOffset, in long endOffset, out long x...
nsIDOMWindowUtils
CSS pixels for each touch to be sent to the window. aRys An array of touch Y radii in CSS pixels for each touch to be sent to the window. aRotationAngles An array of angles in degrees for each touch's touch oval. aForces An array of forces (from 0 to 1) indicating the amount of pressure applied at each touch point. count The number of touches; this is the number of entries in each of the
preceding arrays. aModifiers Modifiers pressed. Using constants defined in nsIDOMNSEvent. Obsolete since Gecko 15.0 Using constants defined as MODIFIER_*. aIgnoreRootScrollFrames A Boolean value indicating whether or not the event should ignore viewport bounds during dispatch. Return value true if the page called Event.preventDefault(), indicating that default processing of the event should not o...
...led profiling of all executed JavaScript code in the browser. This slows down JavaScript execution, but accumulates information about what code has executed that may be queried after a call to stopPCCountProfiling(). void startPCCountProfiling(); Parameters None. stopPCCountProfiling() Stops profiling of executed JavaScript code. Profile information about code that has executed since a
preceding call to startPCCountProfiling() will be constructed, and will be retained until a call to purgePCCounts(). This profile information may be queried using getPCCountScriptCount(), getPCCountScriptSummary(), and getPCCountScriptContents(). void stopPCCountProfiling(); Parameters None. suppressEventHandling() Suppresses/unsuppresses user initiated event handling in window's document and subdocu...
Working with ArrayBuffers
Method B takes ~1400 ms, for an array length of 52,428,800 (which is image size of 1280 x 1024 pixels). Method 3: Transfer byt...
...Method B takes ~1400 ms, for an array length of 52,428,800 (which is image size of 1280 x 1024 pixels). ...
Node.compareDocumentPosition() - Web APIs
The Node.compareDocumentPosition() method reports the position of the given node relative to another node in any document -- not just the given node's document. The return value is a bitmask of the following values: Name Value DOCUMENT_POSITION_DISCONNECTED 1 DOCUMENT_POSITION_
PRECEDING 2 DOCUMENT_POSITION_FOLLOWING 4 DOCUMENT_POSITION_CONTAINS 8 DOCUMENT_POSITION_CONTAINED_BY 16 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC 32 Syntax compareMask = node.compareDocumentPosition(otherNode) Parameters otherNode The other Node with which to compare the first node's document position. Return value An integer value whose bits represent the otherNode's relationship to the calling node. More than one bi...
... to compare the first node's document position. Return value An integer value whose bits represent the otherNode's relationship to the calling node. More than one bit is set if multiple scenarios apply. For example, if otherNode is located earlier in the document and contains the node on which compareDocumentPosition() was called, then both the DOCUMENT_POSITION_CONTAINS and DOCUMENT_POSITION_
PRECEDING bits would be set, producing a value of 10 (0x0A). Example const head = document.head; const body = document.body; if (head.compareDocumentPosition(body) & Node.DOCUMENT_POSITION_FOLLOWING) { console.log('Well-formed document'); } else { console.error('<head> is not before <body>'); } Note: Because the result returned by compareDocumentPosition() is a bitmask, the bitwise AND operator m...
Selection - Web APIs
erties Selection.anchorNodeRead only Returns the Node in which the selection begins. Can return null if selection never existed in the document (e.g., an iframe that was never clicked on). Selection.anchorOffsetRead only Returns a number representing the offset of the selection's anchor within the anchorNode. If anchorNode is a text node, this is the number of characters within anchorNode
preceding the anchor. If anchorNode is an element, this is the number of child nodes of the anchorNode
preceding the anchor. Selection.focusNodeRead only Returns the Node in which the selection ends. Can return null if selection never existed in the document (for example, in an iframe that was never clicked on). Selection.focusOffsetRead only Returns a number representing the offset of the selection'...
...chor. Selection.focusNodeRead only Returns the Node in which the selection ends. Can return null if selection never existed in the document (for example, in an iframe that was never clicked on). Selection.focusOffsetRead only Returns a number representing the offset of the selection's anchor within the focusNode. If focusNode is a text node, this is the number of characters within focusNode
preceding the focus. If focusNode is an element, this is the number of child nodes of the focusNode
preceding the focus. Selection.isCollapsedRead only Returns a Boolean indicating whether the selection's start and end points are at the same position. Selection.rangeCountRead only Returns the number of ranges in the selection. Selection.typeRead only Returns a DOMString describing the type of the ...
itemscope - HTML: Hypertext Markup Language
mprop attributes. <div itemscope itemtype="http://schema.org/Movie"> <h1 itemprop="name">Avatar</h1> <span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span> <span itemprop="genre">Science fiction</span> <a href="https://youtu.be/0AY1XIkX7bY" itemprop="trailer">Trailer</a> </div> Structured data The following table shows the structured data from the
preceding example. itemscope Itemtype Movie itemprop (itemprop name) (itemprop value) itemprop director James Cameron itemprop genre Science Fiction itemprop name Avatar itemprop https://youtu.be/0AY1XIkX7bY Trailer itemscope id attributes When you specify the itemscope attribute for an element, a new item is...
...itemprop="recipeIngredient">Thinly-sliced apples: 6 cups<br></span> <span itemprop="recipeIngredient">White sugar: 3/4 cup<br></span> ... </p> Directions: <br> <div itemprop="recipeInstructions"> 1. Cut and peel apples<br> 2. Mix sugar and cinnamon. Use additional sugar for tart apples. <br> ... </div> </div> Results HTML The following is an example rendering of the
preceding code example. Structured data itemscope itemtype Recipe itemprop name Grandma's Holiday Apple Pie itemprop image https://c1.staticflickr.com/1/30/42759561_8631e2f905_n.jpg itemprop datePublished 2009-11-05 itemprop description This is my grandmother's apple pie recipe. I like to add a dash of nutmeg. itemprop ...
Details of the object model - JavaScript
ion Engineer(name, projs, mach) { this.base = WorkerBee; this.base(name, 'engineering', projs); this.machine = mach || ''; } function Engineer(name, projs, mach) { WorkerBee.call(this, name, 'engineering', projs); this.machine = mach || ''; } Using the javascript call() method makes a cleaner implementation because the base is not needed anymore. Property inheritance revisited The
preceding sections described how JavaScript constructors and prototypes provide hierarchies and inheritance. This section discusses some subtleties that were not necessarily apparent in the earlier discussions. Local versus inherited values When you access an object property, JavaScript performs these steps, as described earlier in this chapter: Check to see if the value exists locally. If it does, re...
... in WorkerBee.prototype. It therefore does not look further up the chain to Employee.prototype. If you want to change the value of an object property at run time and have the new value be inherited by all descendants of the object, you cannot define the property in the object's constructor function. Instead, you add it to the constructor's associated prototype. For example, assume you change the
preceding code to the following: function Employee() { this.dept = 'general'; // Note that this.name (a local variable) does not appear here } Employee.prototype.name = ''; // A single copy function WorkerBee() { this.projects = []; } WorkerBee.prototype = new Employee; var amy = new WorkerBee; Employee.prototype.name = 'Unknown'; In this case, the name property of amy becomes "Unknown". A...
Grammar and types - JavaScript
\uXXXX The Unicode character specified by the four hexadecimal digits XXXX. For example, \u00A9 is the Unicode sequence for the copyright symbol. See Unicode escape sequences. \u{XXXXX} Unicode code point escapes. For example, \u{2F804} is the same as the simple Unicode escapes \uD87E\uDC04. Escaping characters For characters not listed in the table, a
preceding backslash is ignored, but this usage is deprecated and should be avoided. You can insert a quotation mark inside a string by
preceding it with a backslash. This is known as escaping the quotation mark. For example: var quote = "He read \"The Cremation of Sam McGee\" by R.W. Service."; console.log(quote); The result of this would be: He read "The Cremation of Sam McGee" by R.W. Service. To ...
...ote = "He read \"The Cremation of Sam McGee\" by R.W. Service."; console.log(quote); The result of this would be: He read "The Cremation of Sam McGee" by R.W. Service. To include a literal backslash inside a string, you must escape the backslash character. For example, to assign the file path c:\temp to a string, use the following: var home = 'c:\\temp'; You can also escape line breaks by
preceding them with backslash. The backslash and line break are both removed from the value of the string. var str = 'this string \ is broken \ across multiple \ lines.' console.log(str); // this string is broken across multiple lines. Although JavaScript does not have "heredoc" syntax, you can get close by adding a line break escape and an escaped line break at the end of each line: var poem = 'Rose...
Numbers and dates - JavaScript
range is -100,000,000 days to 100,000,000 days relative to 01 January, 1970 UTC. To create a Date object: var dateObjectName = new Date([parameters]); where dateObjectName is the name of the Date object being created; it can be a new object or a property of an existing object. Calling Date without the new keyword returns a string representing the current date and time. The parameters in the
preceding syntax can be any of the following: Nothing: creates today's date and time. For example, today = new Date();. A string representing a date in the following form: "Month day, year hours:minutes:seconds." For example, var Xmas95 = new Date("December 25, 1995 13:30:00"). If you omit hours, minutes, or seconds, the value will be set to zero. A set of integer values for year, month, and day. For ...
...statements build a string value based on the time. The first statement creates a variable temp, assigning it a value using a conditional expression; if hour is greater than 12, (hour - 12), otherwise simply hour, unless hour is 0, in which case it becomes 12. The next statement appends a minute value to temp. If the value of minute is less than 10, the conditional expression adds a string with a
preceding zero; otherwise it adds a string with a demarcating colon. Then a statement appends a seconds value to temp in the same way. Finally, a conditional expression appends "P.M." to temp if hour is 12 or greater; otherwise, it appends "A.M." to temp. << PreviousNext >> ...
String.prototype.charAt() - JavaScript
.length <= (i + 1)) { throw 'High surrogate without following low surrogate'; } var next = str.charCodeAt(i + 1); if (0xDC00 > next || next > 0xDFFF) { throw 'High surrogate without following low surrogate'; } return str.charAt(i) + str.charAt(i + 1); } // Low surrogate (0xDC00 <= code && code <= 0xDFFF) if (i === 0) { throw 'Low surrogate without
preceding high surrogate'; } var prev = str.charCodeAt(i - 1); // (could change last hex to 0xDB7F to treat high private // surrogates as single characters) if (0xD800 > prev || prev > 0xDBFF) { throw 'Low surrogate without
preceding high surrogate'; } // We can pass over low surrogates now as the second component // in a pair which we have already processed return false; } In an E...
...h <= (i + 1)) { throw 'High surrogate without following low surrogate' } let next = str.charCodeAt(i + 1) if (0xDC00 > next || next > 0xDFFF) { throw 'High surrogate without following low surrogate' } return [str.charAt(i) + str.charAt(i + 1), i + 1] } // Low surrogate (0xDC00 <= code && code <= 0xDFFF) if (i === 0) { throw 'Low surrogate without
preceding high surrogate' } let prev = str.charCodeAt(i - 1) // (could change last hex to 0xDB7F to treat high private surrogates // as single characters) if (0xD800 > prev || prev > 0xDBFF) { throw 'Low surrogate without
preceding high surrogate' } // Return the next character instead (and increment) return [str.charAt(i + 1), i + 1] } Fixing charAt() to support non-Basic-Multilin...
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
vel Defines how levels of the source tree should be considered in generating sequential numbers. It has three valid values: single, multiple, and any. The default value is single: single Numbers sibling nodes sequentially, as in the items in a list. The processor goes to the first node in the ancestor-or-self axis that matches the count attribute and then counts that node plus all its
preceding siblings (stopping when it reaches a match to the from attribute, if there is one) that also match the count attribute.If no match is found, the sequence will be an empty list. multiple Numbers nodes as a composite sequence that reflects the hierarchic position of the node, e.g. 1.2.2.5. (The nested format can be specified with the format attribute, e.g. A.1.1). The processor looks...
...equence that reflects the hierarchic position of the node, e.g. 1.2.2.5. (The nested format can be specified with the format attribute, e.g. A.1.1). The processor looks at all ancestors of the current node and the current node itself, stopping when it reaches a match for the from attribute, if there is one. For each node in this list that matches the count attribute, the processor counts how many
preceding matching siblings it has, and adds one for the node itself. If no match is found, the sequence will be an empty list. any (Not supported at this time.) Numbers all matching nodes, regardless of level, sequentially. The ancestor, self, and
preceding axes are all considered. The processor starts at the current node and proceeds in reverse document order, stopping if it reaches a matc...
popChallengeResponse - Archive of obsolete content
-- One Challenge per encryption key certification request (in the -- same order as these requests appear in FullCertTemplates). Challenge ::= SEQUENCE { owf AlgorithmIdentifier OPTIONAL, -- MUST be present in the first Challenge; MAY be omitted in any -- subsequent Challenge in POPODecKeyChallContent (if omitted, -- then the owf used in the immediately
preceding Challenge is -- to be used). witness OCTET STRING, -- the result of applying the one-way function (owf) to a -- randomly-generated INTEGER, A. [Note that a different -- INTEGER MUST be used for each Challenge.] sender GeneralName, -- the name of the sender. key OCTET STRING, -- the public key used to encrypt th...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
e. For nodes that contain text, such as text and comment nodes, it will return their string value. For attribute nodes, the attribute value is returned. For all other nodes, null is returned. ownerDocument Returns the document object containing the current node. parentNode Returns the parent node of the current node. previousSibling Returns the node immediately
preceding the current one. removeAttribute( aName ) Removes the specified attribute from the current node. setAttribute( aName, aValue ) Sets the value of the specified attribute with the specified value. Internet Explorer has a nonstandard quirk, where many of these APIs will skip white space text nodes that are generated, for example, by new line characters. Mozilla will no...
modifiers - Archive of obsolete content
ay conflict with system wide shortcut key. accel: The key used for keyboard shortcuts on the user's platform, which is Control on Windows and Linux, and Command on Mac. Usually, this would be the value you would use. access: The access key for activating menus and other elements. On Windows, this is the Alt key, used in conjuction with an element's accesskey. any: Indicates that all modifiers
preceding it are optional. ...
key - Archive of obsolete content
ay conflict with system wide shortcut key. accel: The key used for keyboard shortcuts on the user's platform, which is Control on Windows and Linux, and Command on Mac. Usually, this would be the value you would use. access: The access key for activating menus and other elements. On Windows, this is the Alt key, used in conjuction with an element's accesskey. any: Indicates that all modifiers
preceding it are optional. oncommand Type: script code This event handler is called when the command is activated. This occurs when a user selects a menu item or presses a keyboard shortcut attached to the command. phase Type: string The event phase where the handler is invoked. This should be set to the value capturing to indicate during the event capturing phase or target to indicate ...
Introduction to SSL - Archive of obsolete content
oducts with Fortezza. for SSL 3.0. Fortezza is an encryption system used by U.S. government agencies to manage sensitive but unclassified information. It provides a hardware implementation of two classified ciphers developed by the federal government: Fortezza KEA and SKIPJACK. Fortezza ciphers for SSL use the Key Exchange Algorithm (KEA) instead of the RSA key-exchange algorithm mentioned in the
preceding section, and use Fortezza cards and DSA for client authentication. Table 2. Cipher Suites Supported by Red Hat When Using Fortezza for SSL 3.0 Strength Category and Recommended Use Cipher Suites Strong Fortezza Cipher Suites Permitted for deployments within the United States only. These cipher suites support encryption that is strong enough for most business or government n...
Processing XML with E4X - Archive of obsolete content
ed dynamic values in markup. Variables and expressions can be used to create attribute values by simply wrapping them with braces ({}) and omitting quotation marks that would normally go around an attribute value, as the following example illustrates: var a = 2; var b = <foo bar={a}>"hi"</foo>; Upon execution the variable is evaluated and quotes are automatically added where appropriate. The
preceding example would result in an XML object which looks like this: <foo bar="2">"hi"</foo>. In attribute substitution, quotation marks are escaped as " while apostrophes are handled normally. var b = 'He said "Don\'t go there."'; var el = <foo a={b}/>; alert(el.toXMLString()); // Gives: <foo a="He said "Don't go there.""/> Less than and ampersand signs are escaped into their entity e...
GetObject - Archive of obsolete content
more than one class of object. For example, a drawing might support three different types of objects: an Application object, a Drawing object, and a Toolbar object, all of which are part of the same file. To specify which object in a file you want to activate, use the optional class argument. For example: var MyObject; MyObject = GetObject("C:\\DRAWINGS\\SAMPLE.DRW", "FIGMENT.DRAWING"); In the
preceding example, FIGMENT is the name of a drawing application and DRAWING is one of the object types it supports. Once an object is activated, you reference it in code using the object variable you defined. In the
preceding example, you access properties and methods of the new object using the object variable MyObject. For example: MyObject.Line(9, 90); MyObject.InsertText(9, 100, "Hello, world."); MyOb...
Reference - Archive of obsolete content
om being poked at accidentally. I also just read a document on proper inheritance using apply(). Well if you combine the two, you can have inherited private variables: function MyClass(){ var property = 5; this.tellMe = function(){ return property; } } function MyOtherClass(){ MyClass.apply( this ); } var o = new MyOtherClass; alert( o.tellMe() ); //alerts 5 as you'd expect -- the
preceding comment was added by Psygnisfive (talk - contribs) on 22:23, 4 December 2006 Terminology We need a terminology appendix. For example, "script" and "program" are synonymous. So are "current object" and "context object". We could also put in layman definitions there for JS constructs like functions and variables. --Maian 01:43, 30 September 2005 (PDT) We should define the terms we are using. In ...
Audio for Web games - Game development
en need to do to ensure smooth playback. The HTMLMediaElement interface comes with lots of properties to help determine whether a track is in a state to be playable. Note: In many ways the concept of buffering is an outdated one. As long as byte-range requests are accepted (which is the default behavior), we should be able to jump to a specific point in the audio without having to download the
preceding content. However, preloading is still useful -- without it, there would always need to be some client-server communication required before playing can commence. Concurrent audio playback A requirement of many games is the need to play more than one piece of audio at the same time; for example, there might be background music playing along with sound effects for various things happening in the ...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
ndles layout, rendering, and DOM, but now stands on its own as a separate rendering engine. 32 Block Disambiguation, Glossary The term block can have several meanings depending on the context. It may refer to: 33 Block (CSS) CSS, CodingScripting, Design, Glossary, HTML A block on a webpage is an HTML element that appears on a new line, i.e. 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. 34 Block (scripting) CodingScripting, Glo...
Pseudo-classes and pseudo-elements - Learn web development
ssible anyway, maybe due to it being generated by a CMS.) All pseudo-classes behave in this same kind of way. They target some bit of your document that is in a certain state, behaving as if you had added a class into your HTML. Take a look at some other examples on MDN: :last-child :only-child :invalid Note: It is valid to write pseudo-classes and elements without any element selector
preceding them. In the example above, you could write :first-child and the rule would apply to any element that is the first child of an <article> element, not just a paragraph first child -- :first-child is equivalent to *:first-child. However, usually you want more control than that, so you need to be more specific. User-action pseudo classes Some pseudo-classes only apply when the user interacts with...
Chrome registration
ble). The ClassID {0000...} must match the ClassID implemented by the component. To generate a unique ClassID, use a UUID generator program or site. contract contract @foobar/mycontract;1 {00000000-0000-0000-0000-000000000000} [flags] Maps a contract ID (a readable string) to the ClassID for a specific implementation. Typically a contract ID will be paired with a component entry immediately
preceding. category category category entry-name value [flags] Registers an entry in the category manager. The specific format and meaning of category entries depend on the category. content A content package is registered with the line: content packagename uri/to/files/ [flags] This will register a location to use when resolving the URI chrome://packagename/content/.... The URI may be absolute ...
Creating localizable web applications
In the above example, not only does the text above the clock charts require translation, but so do the milliseconds captions below them. Many languages use different number formats than English, like 18 148 or 18.148. Also, the last caption includes an exclamation mark, and for some languages (e.g. French), the orthographic rules might require putting a space between the exclamation mark and the
preceding word. Make icons flippable for RTL Image 1. This icon should have its right-to-left equivalent, with the "?" character which is used in some RTL languages, like Arabic and Persian (note that Hebrew uses "?"). You should then display the right icon depending on the locale. The following example shows how to achieve this with CSS. Snippet 1. Bad: <div class="tut_didyouknow"> <img src="/st...
PR_PREV_LINK
Returns the
preceding element in a list. Syntax #include <prclist.h> PRCList *PR_PREV_LINK (PRCList *elemp); Parameter elemp A pointer to the element. Returns A pointer to a list element. Description PR_PREV_LINK returns a pointer to the element
preceding the specified element. It can be used to traverse a list. The
preceding element is not removed from the list. ...
NSS 3.44 release notes
test certificates, use @example.com (not @bogus.com) 1538479 - Post-Handshake messages after async server authentication break when using record layer separation 1521578 - x25519 support in pk11pars.c 1540205 - freebl build fails with -DNSS_DISABLE_CHACHAPOLY 1532312 - post-handshake auth doesn't interoperate with OpenSSL 1542741 - certutil -F crashes with segmentation fault 1546925 - Allow
preceding text in try comment 1534468 - Expose ChaCha20 primitive 1418944 - Quote CC/CXX variables passed to nspr 1543545 - Allow to build NSS as a static library 1487597 - Early data that arrives before the handshake completes can be read afterwards 1548398 - freebl_gtest not building on Linux/Mac 1548722 - Fix some Coverity warnings 1540652 - softoken/sdb.c: Logically dead code 1549413 - Android ...
PKCS11 FAQ
awte. (Red Hat Certificate Server also uses this method). The public key is sent to the server base-64-DER-encoded with an (optional) signed challenge. Are persistent objects that are stored on the token, such as private keys and certificates, created by the PKCS #11 module? Is it safe to assume that NSS never calls C_CreateObject for those persistent objects? No. As stated in the answer to the
preceding question, when NSS does a keygen it uses C_GenerateKeyPair if the token supports the keygen method. If the token does not support keygen, NSS generates the key internally and uses C_CreateObject to load the private key into the token. When the certificate is received after the keygen, NSS loads it into the token with C_CreateObject. NSS also does a similiar operation for importing private keys an...
Scripting Java
ng("Java") Java js> jsString = "JavaScript" JavaScript js> javaString.length() 4 js> jsString.length 10 Rhino provides some help in reducing the differences between the two types. First, you can pass a JavaScript string to a Java method that requires a Java string and Rhino will perform the conversion. We actually saw this feature in action on the call to the java.lang.String constructor in the
preceding example. Rhino also makes the JavaScript methods available to Java strings if the java.lang.String class doesn't already define them. For example: js> javaString.match(/a.*/) ava JavaImporter Constructor JavaImporter is a new global constructor that allows to omit explicit package names when scripting Java: var SwingGui = JavaImporter(Packages.javax.swing, Packag...
Invariants
that is a transparent optimization as long as we follow the rules.) A thread holding a property lock never leaves or suspends the current request. With a few exceptions (known to brendan and probably jst and mrbkap), we never call a JSAPI callback with a property locked. (That would risk deadlock too.) Name instructions The first operand to a JSOP_SETNAME instruction is always produced by a
preceding JSOP_BINDNAME instruction. (Taken together, ECMA 262-3 ?11.13.1 and ECMA 262-3 ?10.1.4 specify that in an assignment such as x = f(), the name lookup for x occurs before f is called. JSOP_BINDNAME performs this lookup.) The rules below (not exactly invariants) govern the bytecode emitted for NameExpressions. Background: The fastest instructions for NameExpressions are fat opcodes that combine a...
IAccessibleText
ts() Returns the bounding box of the specified position. The virtual character after the last character of the represented text(), that is the one at position length is a special case. It represents the current input position and will therefore typically be queried by AT more often than other positions. Because it does not represent an existing character its bounding box is defined in relation to
preceding characters. It should be roughly equivalent to the bounding box of some character when inserted at the end of the text(). Its height typically being the maximal height of all the characters in the text() or the height of the
preceding character, its width being at least one pixel so that the bounding box is not degenerate. [propget] HRESULT characterExtents( [in] long offset, [in] enum IA2Coo...
nsISelectionPrivate
eshing view/scroll, and call times of nsTextFrame::GetPointFromOffset whose return value is to be cached. See bug 35296 and bug 199412 Native code only! interlinePosition boolean type short Returns the type of the selection (see nsISelectionController for available constants). Read only. ...
Examine and edit CSS - Firefox Developer Tools
e. If you are satisfied with the changes you have made, you can copy the new settings to page the edited rule into your stylesheet. Right-click on the changes panel and select Copy Rule from the context menu. The Copy Rule command copies the entire element, class, or id definition, including any unchanged rules and the rules that describe your changes. For example, copying the changes in the
preceding image, you get the following: .text-content p { box-sizing:border-box; max-width:24rem; text-decoration: underline; color: cadetblue; font-weight: bold; } Add rules You can add new rules in the Rules view. Just right-click to show the context menu and select "Add rule". This will add a new CSS rule whose selector matches the currently selected node. There's also a button that enables y...
Element - Web APIs
ement with nodes parsed from the given string. Element.part Represents the part identifier(s) of the element (i.e. set using the part attribute), returned as a DOMTokenList. Element.prefix Read only A DOMString representing the namespace prefix of the element, or null if no prefix is specified. NonDocumentTypeChildNode.previousElementSibling Read only Is a Element, the element immediately
preceding the given one in the tree, or null if there is no sibling element. Element.scrollHeight Read only Returns a Number representing the scroll view height of an element. Element.scrollLeft Is a Number representing the left scroll offset of the element. Element.scrollLeftMax Read only Returns a Number representing the maximum left scroll offset possible for the element. Element.scrollTop A...
EventTarget.addEventListener() - Web APIs
ther. Note: Because objects are stored in variables by reference, you can return an object from a function to keep it alive (preserve it in memory so you don't lose the data) after that function stops executing. Legacy Internet Explorer and attachEvent In Internet Explorer versions before IE 9, you have to use attachEvent(), rather than the standard addEventListener(). For IE, we modify the
preceding example to: if (el.addEventListener) { el.addEventListener('click', modifyText, false); } else if (el.attachEvent) { el.attachEvent('onclick', modifyText); } There is a drawback to attachEvent(): The value of this will be a reference to the window object, instead of the element on which it was fired. The attachEvent() method could be paired with the onresize event to detect when certain ...
FileReader.readAsDataURL() - Web APIs
method is used to read the contents of the specified Blob or File. When the read operation is finished, the readyState becomes DONE, and the loadend is triggered. At that time, the result attribute contains the data as a data: URL representing the file's data as a base64 encoded string. Note: The blob's result cannot be directly decoded as Base64 without first removing the Data-URL declaration
preceding the Base64-encoded data. To retrieve only the Base64 encoded string, first remove data:*/*;base64, from the result. Syntax instanceOfFileReader.readAsDataURL(blob); Parameters blob The Blob or File from which to read. Example HTML <input type="file" onchange="previewFile()"><br> <img src="" height="200" alt="Image preview..."> JavaScript function previewFile() { const preview = do...
Index - Web APIs
operty returns the parent of the specified node in the DOM tree. 2732 Node.prefix API, DOM, Obsolete, Property The Node.prefix read-only property returns the namespace prefix of the specified node, or null if no prefix is specified. 2733 Node.previousSibling API, DOM, Gecko, Property The Node.previousSibling read-only property returns the node immediately
preceding the specified one in its parent's childNodes list, or null if the specified node is the first in that list. 2734 Node.removeChild() API, DOM, Method, NeedsSpecTable, Node, Reference The Node.removeChild() method removes a child node from the DOM and returns the removed node. 2735 Node.replaceChild() API, DOM, Method, Node, Reference The Node.replaceChild(...
Node.previousSibling - Web APIs
Syntax previousNode = node.previousSibling; Example <img id="b0"> <img id="b1"> <img id="b2"> console.log(document.getElementById("b1").previousSibling); // <img id="b0"> console.log(document.getElementById("b2").previousSibling.id); // "b1" Notes Gecko-based browsers insert text nodes into a document to represent whitespace in the source markup. ...
Movement, orientation, and motion: A WebXR example - Web APIs
hen the user initially begins their drag of the mouse. Next, we compile the shader programs; get references to its variables; initialize the buffers that store the array of each position; the indexes into the position table for each vertex; the vertex normals; and the texture coordinates for each vertex. This is all taken directly from the WebGL sample code, so refer to Lighting in WebGL and its
preceding articles Creating 3D objects using WebGL and Using textures in WebGL. Then our loadTexture() function is called to load the texture file. Now that the rendering structures and data are loaded, we start preparing to run the XRSession. We connect the session to the WebGL layer so it konws what to use as a rendering surface by calling XRSession.updateRenderState() with a baseLayer set to a new XRW...
:-moz-ui-invalid - CSS: Cascading Style Sheets
ss is applied according to the following rules: If the control does not have focus, and the value is invalid, apply this pseudo-class. If the control has focus, and the value was valid (including empty) when it gained focus, do not apply the pseudo-class. If the control has focus, and the value was invalid when it gained focus, re-validate on every keystroke. If the element is required, the
preceding rules apply only if the user has changed the value or attempted to submit the form. The result is that if the control was valid when the user started interacting with it, the validity styling is changed only when the user shifts focus to another control. However, if the user is trying to correct a previously-flagged value, the control shows immediately when the value becomes valid. Required ite...
:-moz-ui-valid - CSS: Cascading Style Sheets
eudo-class is applied according to the following rules: If the control does not have focus, and the value is valid, apply this pseudo-class. If the control has focus, and the value was valid (including empty) when it gained focus, apply this pseudo-class. If the control has focus, and the value was invalid when it gained focus, re-validate on every keystroke. If the element is required, the
preceding rules apply only if the user has changed the value or attempted to submit the form. The result is that if the control was valid when the user started interacting with it, the validity styling is changed only when the user shifts focus to another control. However, if the user is trying to correct a previously-flagged value, the control shows immediately when the value becomes valid. Required ite...
Value definition syntax - CSS: Cascading Style Sheets
st one time. Note: the double bar has precedence over the single bar, meaning that bold | thin || <length> is equivalent to bold | [ thin || <length> ]. It describes bold, thin, <length>, <length> thin, or thin <length> but not bold <length> as only one entity from each side of the | combinator can be present. Component value multipliers A multiplier is a sign that indicate how many times a
preceding entity can be repeated. Without a multiplier, an entity must appear exactly one time. Note that multipliers cannot be added and have all precedence over combinators. Asterisk (*) The asterisk multiplier indicates that the entity may appear zero, one or several times. bold smaller* This example matches the following values: bold bold smaller bold smaller smaller bold smaller smaller sma...
offset-position - CSS: Cascading Style Sheets
e, to place an item relative to the edges of an element's box. It can be defined using one to four values. If two non-keyword values are used, the first value represents the horizontal position and the second represents the vertical position. If only one value is specified, the second value is assumed to be center. If three or four values are used, the length-percentage values are offsets for the
preceding keyword value(s). For more explanation of these value types, see background-position. Formal definition Initial valueautoApplies totransformable elementsInheritednoPercentagesreferToSizeOfContainingBlockComputed valuefor <length> the absolute value, otherwise a percentageAnimation typea position Formal syntax auto | <position>where <position> = [ [ left | center | right ] | [ top | center | ...
HTML5 Parser - Developer guides
. In an inline script, in order to use the literal strings <script, </script>, and <!--, you should prevent them from being parsed literally by expressing them as \u003cscript,\u003c/script>, and \u003c!--. The older practice of escaping the string </script> by surrounding it with comment markers, while supported by HTML5, is problematic in cases where the closing comment marker is omitted (see
preceding point). You can avoid such problems by using the character code for the initial '<' instead. (It is valid to use an escape character, e.g., <\/script>, but this strategy does not work for <script and <!--, because \s and \! are not valid JavaScript escapes; the character code strategy is more general-purpose.) Inline SVG and MathML support As a completely new parsing feature, HTML5 introduced ...
<dd>: The Description Details element - HTML: Hypertext Markup Language
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Content categories None. Permitted content Flow content. Tag omission The start tag is required. The end tag may be omitted if the <dd> element is immediately followed by another <dd> element or a <dt> element, or if there is no more content in the parent element. ...
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
tofocus attribute. Automatically focusing on a control can cause the page to scroll on load. The focus can also cause dynamic keyboards to display on some touch devices. While a screen reader will announce the label of the form control receiving focus, the screen reader will not announce anything before the label, and the sighted user on a small device will equally miss the context created by the
preceding content. capture Introduced in the HTML Media Capture specification and valid for the file input type only, the capture attribute defines which media--microphone, video, or camera--should be used to capture a new file for upload with file upload control in supporting scenarios. See the file input type. checked Valid for both radio and checkbox types, checked is a Boolean attribute. If...
<ol>: The Ordered List element - HTML: Hypertext Markup Language
s 1 for numbers (default) The specified type is used for the entire list unless a different type attribute is used on an enclosed <li> element. Note: Unless the type of the list number matters (like legal or technical documents where items are referenced by their number/letter), use the CSS list-style-type property instead. Usage notes Typically, ordered list items display with a
preceding marker, such as a number or letter. The <ol> and <ul> elements may nest as deeply as desired, alternating between <ol> and <ul> however you like. The <ol> and <ul> elements both represent a list of items. The difference is with the <ol> element, the order is meaningful. For example: Steps in a recipe Turn-by-turn directions The list of ingredients in decreasing proportion on nutrition info...
HTML elements reference - HTML: Hypertext Markup Language
t) indicates that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation (see Notes for how to change it). A URL for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the <cite> element. <dd> The HTML <dd> element provides the description, definition, or value for the
preceding term (<dt>) in a description list (<dl>). <div> The HTML Content Division element (<div>) is the generic container for flow content. It has no effect on the content or layout until styled using CSS. <dl> The HTML <dl> element represents a description list. The element encloses a list of groups of terms (specified using the <dt> element) and descriptions (provided by <d...
HTML documentation index - HTML: Hypertext Markup Language
ement contains a set of <option> elements that represent the permissible or recommended options available to choose from within other controls. 87 <dd>: The Description Details element Definition, Description Details, Element, HTML, HTML grouping content, Reference, Web, dd, description list, details The HTML <dd> element provides the description, definition, or value for the
preceding term (<dt>) in a description list (<dl>). 88 <del>: The Deleted Text element Deleted Text, Element, HTML, HTML edits, Reference, Web, del The HTML <del> element represents a range of text that has been deleted from a document. 89 <details>: The Details disclosure element Disclosure Box, Disclosure Widget, Element, HTML, HTML interactive elements, Reference, Web...
Link types - HTML: Hypertext Markup Language
t navigation. See Preloading content with rel="preload" for more details. <link> <a>, <area>, <form> prerender Suggests that the browser fetch the linked resource in advance, and that it also render the prefetched content offscreen so it can be quickly presented to the user once needed. <link> <a>, <area>, <form> prev Indicates that the hyperlink leads to the
preceding resource of the sequence the current page is in. Note: You can also use the next keyword to specify a link to the next page in the sequence. Although recognized, the synonym previous is incorrect and must be avoided. <a>, <area>, <link>, <form> None. search Indicates that the hyperlink references a document whose interface is specially designed for searching in...
Forwarded - HTTP
Forwarded: by=<identifier>;for=<identifier>;host=<host>;proto=<http|https> Directives <identifier> An identifier disclosing the information that is altered or lost when using a proxy. This can be either: an IP address (v4 or v6, optionally with a port, and ipv6 quoted and enclosed in square brackets), an obfuscated identifier (such as "_hidden" or "_secret"), or "unknown" when the
preceding entity is not known (and you still want to indicate that forwarding of the request was made). by=<identifier> The interface where the request came in to the proxy server. for=<identifier> The client that initiated the request and subsequent proxies in a chain of proxies. host=<host> The Host request header field as received by the proxy. proto=<http|https> Indicates which protocol w...
X-DNS-Prefetch-Control - HTTP
hout providing specific anchors using that hostname by using the rel attribute on the <link> element with a link type of dns-prefetch: <link rel="dns-prefetch" href="https://www.mozilla.org/contribute/"> In this example, the domain name "www.mozilla.org/contribute" will be pre-resolved. Similarly, the link element can be used to resolve hostnames without providing a complete URL, but only, by
preceding the hostname with two slashes: <link rel="dns-prefetch" href="//www.mozilla.org/contribute/"> Forced prefetching of hostnames might be useful, for example, on the homepage of a site to force pre-resolution of domain names that are referenced frequently throughout the site even though they are not used on the home page itself. This will improve the overall performance of site even though the pe...
Control flow and error handling - JavaScript
monthName = getMonthName(myMonth); // function could throw exception } catch (e) { monthName = 'unknown'; logMyErrors(e); // pass exception object to error handler (i.e. your own function) } The catch block You can use a catch block to handle all exceptions that may be generated in the try block. catch (catchID) { statements } The catch block specifies an identifier (catchID in the
preceding syntax) that holds the value specified by the throw statement. You can use this identifier to get information about the exception that was thrown. JavaScript creates this identifier when the catch block is entered. The identifier lasts only for the duration of the catch block. Once the catch block finishes executing, the identifier no longer exists. For example, the following code throws an exc...
Functions - JavaScript
d more about objects and methods in Working with objects. Calling functions Defining a function does not execute it. Defining it simply names the function and specifies what to do when the function is called. Calling the function actually performs the specified actions with the indicated parameters. For example, if you define the function square, you could call it as follows: square(5); The
preceding statement calls the function with an argument of 5. The function executes its statements and returns the value 25. Functions must be in scope when they are called, but the function declaration can be hoisted (appear below the call in the code), as in this example: console.log(square(5)); /* ... */ function square(n) { return n * n } The scope of a function is the function in which it is decla...
Character classes - JavaScript
iterally. For example, /b/ matches the character "b". By placing a backslash in front of "b", that is by using /\b/, the character becomes special to mean match a word boundary. For characters that are usually treated specially, indicates that the next character is not special and should be interpreted literally. For example, "*" is a special character that means 0 or more occurrences of the
preceding character should be matched; for example, /a*/ means match 0 or more "a"s. To match * literally, precede it with a backslash; for example, /a\*/ matches "a*". To match this character literally, escape it with itself. In other words to search for \ use /\\/. Examples Looking for a series of digits var randomData = "015 354 8787 687351 3512 8735"; var regexpFourDigi...
Regular expressions - JavaScript
the exact substring "abc". Using special characters When the search for a match requires something more than a direct match, such as finding one or more b's, or finding white space, you can include special characters in the pattern. For example, to match a single "a" followed by zero or more "b"s followed by "c", you'd use the pattern /ab*c/: the * after "b" means "0 or more occurrences of the
preceding item." In the string "cbbabbbbcdebc", this pattern will match the substring "abbbbc". The following pages provide lists of the different special characters that fit into each category, along with descriptions and examples. Assertions Assertions include boundaries, which indicate the beginnings and endings of lines and words, and other patterns indicating in some way that a match is possible ...
Deprecated and obsolete features - JavaScript
ee input. $* See multiline. $& See lastMatch. $+ See lastParen. $` See leftContext. $' See rightContext. input The string against which a regular expression is matched. lastMatch The last matched characters. lastParen The last parenthesized substring match, if any. leftContext The substring
preceding the most recent match. rightContext The substring following the most recent match. The following are now properties of RegExp instances, no longer of the RegExp object: Property Description global Whether or not to test the regular expression against all possible matches in a string, or only against the first. ignoreCase Whether or not to ig...
Function.prototype.bind() - JavaScript
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Syntax let boundFunc = func.bind(thisArg[, arg1[, arg2[, ...argN]]]) Parameters thisArg The value to be passed as the this parameter to the target function func when the bound function is called. ...
Object.prototype.toString() - JavaScript
ed, color, and sex of the object, in the form "property = value;". Dog.prototype.toString = function dogToString() { const ret = 'Dog ' + this.name + ' is a ' + this.sex + ' ' + this.color + ' ' + this.breed; return ret; } Or, using ES6 template strings: Dog.prototype.toString = function dogToString() { return `Dog ${this.name} is a ${this.sex} ${this.color} ${this.breed}`; } With the
preceding code in place, any time theDog is used in a string context, JavaScript automatically calls the dogToString() function, which returns the following string: "Dog Gabby is a female chocolate Lab" Using toString() to detect object class toString() can be used with every object and (by default) allows you to get its class. To use the Object.prototype.toString() with every object, you need to call...
Object.prototype.valueOf() - JavaScript
custom objects You can create a function to be called in place of the default valueOf method. Your function must take no arguments. Suppose you have an object type MyNumberType and you want to create a valueOf method for it. The following code assigns a user-defined function to the object's valueOf method: MyNumberType.prototype.valueOf = function() { return customPrimitiveValue; }; With the
preceding code in place, any time an object of type MyNumberType is used in a context where it is to be represented as a primitive value, JavaScript automatically calls the function defined in the
preceding code. An object's valueOf method is usually invoked by JavaScript, but you can invoke it yourself as follows: myNumberType.valueOf() Note: Objects in string contexts convert via the toString() metho...
RegExp.leftContext ($`) - JavaScript
RegExp.$` is an alias for this property. Description The leftContext property is static, it is not a property of an individual regular expression object. Instead, you always use it as RegExp.leftContext or RegExp['$`']. The value of the leftContext property is read-only and modified whenever a successful match is made. You can not use the shorthand alias with the dot property accessor (RegExp.$`), because the parser expects a starting template string in that case and a SyntaxError is thrown. ...
RegExp - JavaScript
er source, such as user input. Flags in constructor Starting with ECMAScript 6, new RegExp(/ab+c/, 'i') no longer throws a TypeError ("can't supply flags when constructing one RegExp from another") when the first argument is a RegExp and the second flags argument is present. A new RegExp from the arguments is created instead. When using the constructor function, the normal string escape rules (
preceding special characters with \ when included in a string) are necessary. For example, the following are equivalent: let re = /\w+/ let re = new RegExp('\\w+') Perl-like RegExp properties Note that several of the RegExp properties have both long and short (Perl-like) names. Both names always refer to the same value. (Perl is the programming language from which JavaScript modeled its regular expres...
Property accessors - JavaScript
object.$1 = 'foo'; console.log(object.$1); // 'foo' object.1 = 'bar'; // SyntaxError console.log(object.1); // SyntaxError Here, the method named createElement is retrieved from document and is called. document.createElement('pre') If you use a method for a numeric literal, and the numeric literal has no exponent and no decimal point, you should leave white-space(s) before the dot
preceding the method call, so that the dot is not interpreted as a decimal point. 77 .toExponential() // or 77 .toExponential() // or ;(77).toExponential() // or 77..toExponential() // or 77.0.toExponential() // because 77. === 77.0, no ambiguity Bracket notation In the object[property_name] syntax, the property_name is just a string or Symbol. So, it can be any string, including '1foo', '!bar!', or eve...
Template literals (Template strings) - JavaScript
the backtick (` `) (grave accent) character instead of double or single quotes. Template literals can contain placeholders. These are indicated by the dollar sign and curly braces (${expression}). The expressions in the placeholders and the text between the backticks (` `) get passed to a function. The default function just concatenates the parts into a single string. If there is an expression
preceding the template literal (tag here), this is called a tagged template. In that case, the tag expression (usually a function) gets called with the template literal, which you can then manipulate before outputting. To escape a backtick in a template literal, put a backslash (\) before the backtick. `\`` === '`' // --> true Multi-line strings Any newline characters inserted in the source are part of...
in - SVG: Scalable Vector Graphics
nd this is the first filter primitive, then this filter primitive will use SourceGraphic as its input. If no value is provided and this is a subsequent filter primitive, then this filter primitive will use the result from the previous filter primitive as its input. If the value for result appears multiple times within a given <filter> element, then a reference to that result will use the closest
preceding filter primitive with the given value for attribute result. Fourteen elements are using this attribute: <feBlend>, <feColorMatrix>, <feComponentTransfer>, <feComposite>, <feConvolveMatrix>, <feDiffuseLighting>, <feDisplacementMap>, <feDropShadow>, <feGaussianBlur>, <feMergeNode>, <feMorphology>, <feOffset>, <feSpecularLighting>, <feTile> Usage notes Value SourceGraphic | SourceAlph...
keyTimes - SVG: Scalable Vector Graphics
"0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> Usage notes Value <number> [ ; <number> ]* ;? Default value None Animatable No The value of the keyTimes attribute is a semicolon-separated list of values. There must be exactly as many values in the keyTimes list as in the values list. Each successive time value must be greater than or equal to the
preceding time value. The keyTimes list semantics depends upon the interpolation mode: For linear and spline animation, the first time value in the list must be 0, and the last time value in the list must be 1. The key time associated with each value defines when the value is set; values are interpolated between the key times. For discrete animation, the first time value in the list must be 0. The tim...
result - SVG: Scalable Vector Graphics
None Animatable Yes <filter-primitive-reference> This value is a <custom-ident> and defines the name for the filter primitive. It is only meaningful within a given <filter> element and thus has only local scope. It is legal for the same <filter-primitive-reference> to appear multiple times within the same <filter> element. When referenced, this value will use the closest
preceding filter primitive with the given result. Specifications Specification Status Comment Filter Effects Module Level 1The definition of 'result' in that specification. Working Draft Clarifies that the value is a <custom-ident>. Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of 'result' in that specification. Recommendation Initial ...
Using custom elements - Web Components
is focused, it displays the text in a pop up information box to provide further in-context information. To begin with, the JavaScript file defines a class called PopUpInfo, which extends the generic HTMLElement class. class PopUpInfo extends HTMLElement { constructor() { // Always call super first in constructor super(); // write element functionality in here ... } } The
preceding code snippet contains the constructor() definition for the class, which always starts by calling super() so that the correct prototype chain is established. Inside the constructor, we define all the functionality the element will have when an instance of it is instantiated. In this case we attach a shadow root to the custom element, use some DOM manipulation to create the element's internal shad...
Axes - XPath
ing Indicates all the nodes that have the same parent as the context node and appear after the context node in the source document. namespace (not supported) Indicates all the nodes that are in scope for the context node. In this case, the context node must be an element node. parent Indicates the single node that is the parent of the context node. It can be abbreviated as two periods (..).
preceding Indicates all the nodes that precede the context node in the document except any ancestor, attribute and namespace nodes.
preceding-sibling Indicates all the nodes that have the same parent as the context node and appear before the context node in the source document. self Indicates the context node itself. It can be abbreviated as a single period (.). ...
Comparison of CSS Selectors and XPath - XPath
XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes This article seeks to document the difference between CSS Selectors and XPath for web developers to be able to better choose the right tool for the right job. ...
Index - XPath
The following-sibling axis indicates all the nodes that have the same parent as the context node and appear after the context node in the source document. 11 namespace Axe, XPath (not supported) 12 parent Axe, XPath The parent axis indicates the single node that is the parent of the context node. It can be abbreviated as two periods (..). 13
preceding Axe, XPath The
preceding axis indicates all the nodes that precede the context node in the document except any ancestor, attribute and namespace nodes. 14
preceding-sibling Axe, XPath The
preceding-sibling axis indicates all the nodes that have the same parent as the context node and appear before the context node in the source document. 15 self Axe, ...
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
d) xsl:stylesheet (partially supported) xsl:template (supported) xsl:text (partially supported) xsl:transform (supported) xsl:value-of (partially supported) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) Axes ancestor ancestor-or-self attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent
preceding preceding-sibling self Functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially support...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
(supported) xsl:stylesheet (partially supported) xsl:template (supported) xsl:text (partially supported) xsl:transform (supported) xsl:value-of (partially supported) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) Axes ancestor ancestor-or-self attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent
preceding preceding-sibling self Functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() ...