Skip to content

Commit

Permalink
Site updated at 2024-01-21 08:51:43 UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
icai committed Jan 21, 2024
1 parent 0fd4662 commit 386e76a
Show file tree
Hide file tree
Showing 937 changed files with 41,772 additions and 18,817 deletions.

Large diffs are not rendered by default.

136 changes: 83 additions & 53 deletions javascript/classes.html

Large diffs are not rendered by default.

101 changes: 73 additions & 28 deletions javascript/classes/constructor.html

Large diffs are not rendered by default.

170 changes: 130 additions & 40 deletions javascript/classes/extends.html

Large diffs are not rendered by default.

536 changes: 536 additions & 0 deletions javascript/classes/private_properties.html

Large diffs are not rendered by default.

95 changes: 66 additions & 29 deletions javascript/classes/public_class_fields.html

Large diffs are not rendered by default.

71 changes: 49 additions & 22 deletions javascript/classes/static.html

Large diffs are not rendered by default.

63 changes: 41 additions & 22 deletions javascript/classes/static_initialization_blocks.html

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletions javascript/errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="canonical" href="https://docs.w3cub.com/javascript/errors.html">
<link href="/favicon.png" rel="icon">
<link rel="stylesheet" type="text/css" href="/assets/application-9c7b0d969c0ce639a6c01c2badcdd81667c7c66206aa3d0fccc5cb0585fb1b912dab72ea882101d18010680927514b4b77b107282db8f756fbf63301fe9c88b0.css">
<link rel="stylesheet" type="text/css" href="/assets/application-c8f743fc70bb84079c3cf4b71f5f99835529659c30689b2fd6193651a680f383ef1d96896f8966c7ca8a0160ffd557685bb8ad12820ec6002d60143812238086.css">
<script type="text/javascript" src="/assets/application-79c555f6b25481fffac2cac30a7f3e54e608ca09e9e8e42bb1790095ba6d0fcace47d6bc624ddce952c70370892f2d46864f89e6943d4f7f7ff16c8a3231a91a.js"></script>
<script src="/json/javascript.js"></script>

Expand Down Expand Up @@ -85,8 +85,7 @@ <h1 class="_logo">
<div class="_page _mdn">


<h1>JavaScript error reference</h1>
<div class="section-content">
<header><h1>JavaScript error reference</h1></header><div class="section-content">
<p>Below, you'll find a list of errors which are thrown by JavaScript. These errors can be a helpful debugging aid, but the reported problem isn't always immediately clear. The pages below will provide additional details about these errors. Each error is an object based upon the <a href="global_objects/error"><code>Error</code></a> object, and has a <code>name</code> and a <code>message</code>.</p> <p>Errors displayed in the Web console may include a link to the corresponding page below to help you quickly comprehend the problem in your code.</p> <p>For a beginner's introductory tutorial on fixing JavaScript errors, see <a href="https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/What_went_wrong">What went wrong? Troubleshooting JavaScript</a>.</p>
</div>
<section aria-labelledby="list_of_errors"><h2 id="list_of_errors">List of errors</h2>
Expand All @@ -97,7 +96,7 @@ <h1>JavaScript error reference</h1>
<li><a href="errors/too_much_recursion">InternalError: too much recursion</a></li>
<li><a href="errors/bigint_division_by_zero">RangeError: BigInt division by zero</a></li>
<li><a href="errors/bigint_negative_exponent">RangeError: BigInt negative exponent</a></li>
<li><a href="errors/not_a_codepoint">RangeError: argument is not a valid code point</a></li>
<li><a href="errors/not_a_valid_code_point">RangeError: argument is not a valid code point</a></li>
<li><a href="errors/invalid_array_length">RangeError: invalid array length</a></li>
<li><a href="errors/invalid_date">RangeError: invalid date</a></li>
<li><a href="errors/precision_range">RangeError: precision is out of range</a></li>
Expand All @@ -114,20 +113,23 @@ <h1>JavaScript error reference</h1>
<li><a href="errors/strict_non_simple_params">SyntaxError: "use strict" not allowed in function with non-simple parameters</a></li>
<li><a href="errors/reserved_identifier">SyntaxError: "x" is a reserved identifier</a></li>
<li><a href="errors/json_bad_parse">SyntaxError: JSON.parse: bad parsing</a></li>
<li><a href="errors/malformed_formal_parameter">SyntaxError: Malformed formal parameter</a></li>
<li><a href="errors/hash_outside_class">SyntaxError: Unexpected '#' used outside of class body</a></li>
<li><a href="errors/unexpected_token">SyntaxError: Unexpected token</a></li>
<li><a href="errors/deprecated_source_map_pragma">SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead</a></li>
<li><a href="errors/invalid_for-of_initializer">SyntaxError: a declaration in the head of a for-of loop can't have an initializer</a></li>
<li><a href="errors/delete_in_strict_mode">SyntaxError: applying the 'delete' operator to an unqualified name is deprecated</a></li>
<li><a href="errors/bad_await">SyntaxError: await is only valid in async functions, async generators and modules</a></li>
<li><a href="errors/cant_use_nullish_coalescing_unparenthesized">SyntaxError: cannot use `??` unparenthesized within `||` and `&amp;&amp;` expressions</a></li>
<li><a href="errors/bad_continue">SyntaxError: continue must be inside loop</a></li>
<li><a href="errors/invalid_for-in_initializer">SyntaxError: for-in loop head declarations may not have initializers</a></li>
<li><a href="errors/unnamed_function_statement">SyntaxError: function statement requires a name</a></li>
<li><a href="errors/either_be_both_static_or_non-static">SyntaxError: getter and setter for private name #x should either be both static or non-static</a></li>
<li><a href="errors/identifier_after_number">SyntaxError: identifier starts immediately after numeric literal</a></li>
<li><a href="errors/illegal_character">SyntaxError: illegal character</a></li>
<li><a href="errors/invalid_bigint_syntax">SyntaxError: invalid BigInt syntax</a></li>
<li><a href="errors/invalid_assignment_left-hand_side">SyntaxError: invalid assignment left-hand side</a></li>
<li><a href="errors/bad_regexp_flag">SyntaxError: invalid regular expression flag "x"</a></li>
<li><a href="errors/label_not_found">SyntaxError: label not found</a></li>
<li><a href="errors/missing_parenthesis_after_argument_list">SyntaxError: missing ) after argument list</a></li>
<li><a href="errors/missing_parenthesis_after_condition">SyntaxError: missing ) after condition</a></li>
<li><a href="errors/missing_colon_after_property_id">SyntaxError: missing : after property id</a></li>
Expand All @@ -140,8 +142,9 @@ <h1>JavaScript error reference</h1>
<li><a href="errors/missing_curly_after_function_body">SyntaxError: missing } after function body</a></li>
<li><a href="errors/missing_curly_after_property_list">SyntaxError: missing } after property list</a></li>
<li><a href="errors/redeclared_parameter">SyntaxError: redeclaration of formal parameter "x"</a></li>
<li><a href="errors/bad_return_or_yield">SyntaxError: return not in function</a></li>
<li><a href="errors/bad_return">SyntaxError: return not in function</a></li>
<li><a href="errors/equal_as_assign">SyntaxError: test for equality (==) mistyped as assignment (=)?</a></li>
<li><a href="errors/bad_break">SyntaxError: unlabeled break must be inside loop or switch</a></li>
<li><a href="errors/unparenthesized_unary_expr_lhs_exponentiation">SyntaxError: unparenthesized unary expression can't appear on the left-hand side of '**'</a></li>
<li><a href="errors/unterminated_string_literal">SyntaxError: unterminated string literal</a></li>
<li><a href="errors/no_properties">TypeError: "x" has no properties</a></li>
Expand All @@ -168,11 +171,7 @@ <h1>JavaScript error reference</h1>
<li><a href="errors/cant_delete">TypeError: property "x" is non-configurable and can't be deleted</a></li>
<li><a href="errors/getter_only">TypeError: setting getter-only property "x"</a></li>
<li><a href="errors/malformed_uri">URIError: malformed URI sequence</a></li>
<li><a href="errors/bad_octal">Warning: 08/09 is not a legal ECMA-262 octal constant</a></li>
<li><a href="errors/already_has_pragma">Warning: -file- is being assigned a //# sourceMappingURL, but already has one</a></li>
<li><a href="errors/deprecated_tolocaleformat">Warning: Date.prototype.toLocaleFormat is deprecated</a></li>
<li><a href="errors/deprecated_string_generics">Warning: String.x is deprecated; use String.prototype.x instead</a></li>
<li><a href="errors/deprecated_expression_closures">Warning: expression closures are deprecated</a></li>
<li><a href="errors/stmt_after_return">Warning: unreachable code after return statement</a></li>
</ul>
</div></section><div class="_attribution">
Expand Down
23 changes: 15 additions & 8 deletions javascript/errors/already_has_pragma.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="canonical" href="https://docs.w3cub.com/javascript/errors/already_has_pragma.html">
<link href="/favicon.png" rel="icon">
<link rel="stylesheet" type="text/css" href="/assets/application-9c7b0d969c0ce639a6c01c2badcdd81667c7c66206aa3d0fccc5cb0585fb1b912dab72ea882101d18010680927514b4b77b107282db8f756fbf63301fe9c88b0.css">
<link rel="stylesheet" type="text/css" href="/assets/application-c8f743fc70bb84079c3cf4b71f5f99835529659c30689b2fd6193651a680f383ef1d96896f8966c7ca8a0160ffd557685bb8ad12820ec6002d60143812238086.css">
<script type="text/javascript" src="/assets/application-79c555f6b25481fffac2cac30a7f3e54e608ca09e9e8e42bb1790095ba6d0fcace47d6bc624ddce952c70370892f2d46864f89e6943d4f7f7ff16c8a3231a91a.js"></script>
<script src="/json/javascript.js"></script>

Expand Down Expand Up @@ -85,22 +85,29 @@ <h1 class="_logo">
<div class="_page _mdn">


<h1>Warning: -file- is being assigned a //# sourceMappingURL, but already has one</h1>
<div class="section-content"><p>The JavaScript warning "-file- is being assigned a //# sourceMappingURL, but already has one." occurs when a source map has been specified more than once for a given JavaScript source.</p></div>
<header><h1>Warning: -file- is being assigned a //# sourceMappingURL, but already has one</h1></header><div class="section-content"><p>The JavaScript warning "-file- is being assigned a //# sourceMappingURL, but already has one." occurs when a source map has been specified more than once for a given JavaScript source.</p></div>
<section aria-labelledby="message"><h2 id="message">Message</h2>
<div class="section-content"><pre class="notranslate">Warning: -file- is being assigned a //# sourceMappingURL, but already has one.
<div class="section-content"><pre data-language="plain">Warning: -file- is being assigned a //# sourceMappingURL, but already has one.
</pre></div></section><section aria-labelledby="error_type"><h2 id="error_type">Error type</h2>
<div class="section-content"><p>A warning. JavaScript execution won't be halted.</p></div></section><section aria-labelledby="what_went_wrong"><h2 id="what_went_wrong">What went wrong?</h2>
<div class="section-content">
<p>A source map has been specified more than once for a given JavaScript source.</p> <p>JavaScript sources are often combined and minified to make delivering them from the server more efficient. With <a href="https://developer.chrome.com/blog/sourcemaps/" target="_blank">source maps</a>, the debugger can map the code being executed to the original source files. There are two ways to assign a source map, either by using a comment or by setting a header to the JavaScript file.</p>
</div></section><section aria-labelledby="examples"><h2 id="examples">Examples</h2>
</section><section aria-labelledby="setting_source_maps"><h3 id="setting_source_maps">Setting source maps</h3>
<div class="section-content">
<p>Setting a source map by using a comment in the file:</p> <div class="code-example"><pre data-language="js"><span class="token comment">//# sourceMappingURL=http://example.com/path/to/your/sourcemap.map</span>
</pre></div> <p>Or, alternatively, you can set a header to your JavaScript file:</p> <div class="code-example"><pre data-language="http"><span class="token header"><span class="token header-name keyword">X-SourceMap</span><span class="token punctuation">:</span> <span class="token header-value">/path/to/file.js.map</span></span>
</pre></div>
<p>Setting a source map by using a comment in the file:</p> <div class="code-example">
<div class="example-header"><span class="language-name">js</span></div>
<pre data-signature="6CIVxpZ7VvIBrccTPaKb+4GEARfVGM9biU/WgKHLLDw=" data-language="js"><span class="token comment">//# sourceMappingURL=http://example.com/path/to/your/sourcemap.map</span>
</pre>
</div> <p>Or, alternatively, you can set a header to your JavaScript file:</p> <div class="code-example">
<div class="example-header"><span class="language-name">http</span></div>
<pre data-signature="7WwK9+AgRse49wZS1OFKGF4tHKKEbQ9TQQ2C2sF0W2I=" data-language="http"><span class="token header"><span class="token header-name keyword">X-SourceMap</span><span class="token punctuation">:</span> <span class="token header-value">/path/to/file.js.map</span></span>
</pre>
</div>
</div></section><section aria-labelledby="see_also"><h2 id="see_also">See also</h2>
<div class="section-content"><ul> <li><a href="https://firefox-source-docs.mozilla.org/devtools-user/debugger/how_to/use_a_source_map/index.html" target="_blank">How to use a source map – Firefox Tools documentation</a></li> <li><a href="https://developer.chrome.com/blog/sourcemaps/" target="_blank">Introduction to source maps (2012)</a></li> </ul></div></section><div class="_attribution">
<div class="section-content"><ul> <li>
<a href="https://firefox-source-docs.mozilla.org/devtools-user/debugger/how_to/use_a_source_map/index.html" target="_blank">Use a source map</a> in the Firefox source docs</li> <li>
<a href="https://developer.chrome.com/blog/sourcemaps/" target="_blank">Introduction to JavaScript source maps</a> on developer.chrome.com (2012)</li> </ul></div></section><div class="_attribution">
<p class="_attribution-p">
© 2005–2023 MDN contributors.<br>Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.<br>
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Already_has_pragma" class="_attribution-link">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Already_has_pragma</a>
Expand Down
Loading

0 comments on commit 386e76a

Please sign in to comment.