diff --git a/files/en-us/learn/tools_and_testing/cross_browser_testing/javascript/index.md b/files/en-us/learn/tools_and_testing/cross_browser_testing/javascript/index.md index 5558fdb01dbe2f0..0850eed6376483d 100644 --- a/files/en-us/learn/tools_and_testing/cross_browser_testing/javascript/index.md +++ b/files/en-us/learn/tools_and_testing/cross_browser_testing/javascript/index.md @@ -239,7 +239,7 @@ For example: For a quick example, see [arrow-function.html](https://mdn.github.io/learning-area/tools-testing/cross-browser-testing/javascript/arrow-function.html) (see the [source code](https://github.com/mdn/learning-area/blob/main/tools-testing/cross-browser-testing/javascript/arrow-function.html) also). Arrow functions are supported across all modern browsers, except for IE. - Declaring [strict mode](/en-US/docs/Web/JavaScript/Reference/Strict_mode) at the top of your JavaScript code causes it to be parsed with a stricter set of rules, meaning that more warnings and errors will be thrown, and some things will be disallowed that would otherwise be acceptable. - It is arguably a good idea to use strict mode, as it makes for better, more efficient code, however it has limited/patchy support across browsers (see [Strict mode in browsers](/en-US/docs/Web/JavaScript/Reference/Strict_mode#strict_mode_in_browsers)). + It is arguably a good idea to use strict mode, as it makes for better, more efficient code. Strict mode is supported in all modern browsers. - [Typed arrays](/en-US/docs/Web/JavaScript/Typed_arrays) allow JavaScript code to access and manipulate raw binary data, which is necessary as browser APIs for example start to manipulate streams of raw video and audio data. These are available in IE10 and above, and all modern browsers. diff --git a/files/en-us/mozilla/firefox/releases/25/index.md b/files/en-us/mozilla/firefox/releases/25/index.md index 597cb1b7a00a186..8b55b15c0ac95b6 100644 --- a/files/en-us/mozilla/firefox/releases/25/index.md +++ b/files/en-us/mozilla/firefox/releases/25/index.md @@ -39,7 +39,7 @@ slug: Mozilla/Firefox/Releases/25 - New mathematical methods have been implemented on [`Math`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math): `Math.log10()`, `Math.log2()`, `Math.log1p()`, `Math.expm1()`, `Math.cosh()`, `Math.sinh()`, `Math.tanh()`, `Math.acosh()`, `Math.asinh()`, `Math.atanh()`, `Math.trunc()`, `Math.sign()` and `Math.cbrt()` ([Firefox bug 717379](https://bugzil.la/717379)). - Support for binary and octal integer literals has been added: `0b10101010`, `0B1010`, `0o777`, `0O237` are now valid ([Firefox bug 894026](https://bugzil.la/894026)). - The machine epsilon constant, that is the smallest representable number that added to 1 will not be 1, is now available as {{jsxref("Global_Objects/Number/EPSILON", "Number.EPSILON")}} ([Firefox bug 885798](https://bugzil.la/885798)). -- [Typed arrays](/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) have been updated to [no longer search in the prototype chain for indexed properties](/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#indexed_property_access) ([Firefox bug 829896](https://bugzil.la/829896)). +- [Typed arrays](/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) have been updated to [no longer search in the prototype chain for indexed properties](/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#property_access) ([Firefox bug 829896](https://bugzil.la/829896)). ### Interfaces/APIs/DOM diff --git a/files/en-us/mozilla/firefox/releases/30/index.md b/files/en-us/mozilla/firefox/releases/30/index.md index 3111799353e2ced..5bea54074bc60e2 100644 --- a/files/en-us/mozilla/firefox/releases/30/index.md +++ b/files/en-us/mozilla/firefox/releases/30/index.md @@ -30,7 +30,7 @@ _No change._ - New ES2015-compatible [array comprehensions](/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions) `[for (item of iterable) item]` and [generator comprehensions](/en-US/docs/Web/JavaScript/Reference/Operators/Generator_comprehensions) `(for (item of iterable) item)` have been implemented ([Firefox bug 979865](https://bugzil.la/979865)). - [Typed arrays](/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#property_access) are now extensible and support new named properties ([Firefox bug 695438](https://bugzil.la/695438)). -- The {{jsxref("Error.prototype.stack")}} property now contains column numbers ([Firefox bug 762556](https://bugzil.la/762556)) and has been improved [when using `Function()` and `eval()` calls](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack#stack_of_eval'ed_code). This can help you to better debug minified or generated JavaScript code. +- The {{jsxref("Error.prototype.stack")}} property now contains column numbers ([Firefox bug 762556](https://bugzil.la/762556)) and has been improved [when using `Function()` and `eval()` calls](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack#stack_of_evaled_code). This can help you to better debug minified or generated JavaScript code. - The `Promise.cast()` method has been renamed to {{jsxref("Promise.resolve()")}} ([Firefox bug 966348](https://bugzil.la/966348)). ### Interfaces/APIs/DOM diff --git a/files/en-us/mozilla/firefox/releases/34/index.md b/files/en-us/mozilla/firefox/releases/34/index.md index ece5b976a9f08e0..12ea3d863a39911 100644 --- a/files/en-us/mozilla/firefox/releases/34/index.md +++ b/files/en-us/mozilla/firefox/releases/34/index.md @@ -58,7 +58,7 @@ _No change._ - The experimental {{jsxref("TypedArray.prototype.move()")}} method (only available in former Nightly and Aurora channels) has been replaced with the now implemented standard ES2015 {{jsxref("TypedArray.prototype.copyWithin()")}} method ([Firefox bug 1021379](https://bugzil.la/1021379)). - In [strict mode](/en-US/docs/Web/JavaScript/Reference/Strict_mode), setting a [duplicate property name in object literals](/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#duplicate_property_names) will no longer throw a `SyntaxError` as per ES2015 specification ([Firefox bug 1041128](https://bugzil.la/1041128)). -- In regular expressions (including `String.replace`), the matched text for a capturing group is now `undefined` instead of the empty string when that capturing group didn't get consulted because quantifiers prevented its exercise (see [Firefox bug 369778](https://bugzil.la/369778) and [this example code](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#gecko_specific_notes)). Note that due to web compatibility, RegExp.$N will still return an empty string ([Firefox bug 1053944](https://bugzil.la/1053944)). +- In regular expressions (including `String.replace`), the matched text for a capturing group is now `undefined` instead of the empty string when that capturing group didn't get consulted because quantifiers prevented its exercise (see [Firefox bug 369778](https://bugzil.la/369778) and [this example code](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#firefox-specific_notes)). Note that due to web compatibility, RegExp.$N will still return an empty string ([Firefox bug 1053944](https://bugzil.la/1053944)). - The ES2015 [spread operator](/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax) is now supported in [destructuring](/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) ([Firefox bug 933276](https://bugzil.la/933276)). - [Destructuring](/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) now uses iterator protocol instead of array-like protocol ([Firefox bug 933276](https://bugzil.la/933276)). - {{jsxref("Proxy.revocable()")}} has been implemented ([Firefox bug 978279](https://bugzil.la/978279)). diff --git a/files/en-us/mozilla/firefox/releases/35/index.md b/files/en-us/mozilla/firefox/releases/35/index.md index 1a877944dcd85bb..3879fe739c5168a 100644 --- a/files/en-us/mozilla/firefox/releases/35/index.md +++ b/files/en-us/mozilla/firefox/releases/35/index.md @@ -35,7 +35,7 @@ Highlights: ### JavaScript -- The "[temporal dead zone](/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_and_errors_with_let)" for [`let`](/en-US/docs/Web/JavaScript/Reference/Statements/let) declarations has been implemented. In conformance with ES2015 `let` semantics, the following situations now throw errors. See also this [newsgroup announcement](https://groups.google.com/forum/#!topic/mozilla.dev.platform/tezdW299Zds) and [Firefox bug 1001090](https://bugzil.la/1001090). +- The "[temporal dead zone](/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz)" for [`let`](/en-US/docs/Web/JavaScript/Reference/Statements/let) declarations has been implemented. In conformance with ES2015 `let` semantics, the following situations now throw errors. See also this [newsgroup announcement](https://groups.google.com/forum/#!topic/mozilla.dev.platform/tezdW299Zds) and [Firefox bug 1001090](https://bugzil.la/1001090). - Redeclaring existing variables or arguments using `let` within the same scope in function bodies is now a syntax error. - Using a variable declared using `let` in function bodies before the declaration is reached and evaluated is now a runtime error. diff --git a/files/en-us/mozilla/firefox/releases/36/index.md b/files/en-us/mozilla/firefox/releases/36/index.md index ced14a14bca2f5a..cad67452a702c15 100644 --- a/files/en-us/mozilla/firefox/releases/36/index.md +++ b/files/en-us/mozilla/firefox/releases/36/index.md @@ -64,8 +64,8 @@ Highlights: - `const a = 1; a = 2;` now also throws a {{jsxref("SyntaxError")}} ("invalid assignment to const a"). - The ES2016 method {{jsxref("Array.prototype.includes")}} has been implemented, but for now, it is only enabled in Nightly builds ([Firefox bug 1069063](https://bugzil.la/1069063)). -- The [`delete`](/en-US/docs/Web/JavaScript/Reference/Operators/delete) operator now triggers the "[temporal dead zone](/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_and_errors_with_let)" when using with [`let`](/en-US/docs/Web/JavaScript/Reference/Statements/let) and [`const`](/en-US/docs/Web/JavaScript/Reference/Statements/const) ([Firefox bug 1074571](https://bugzil.la/1074571)). -- The non-standard [`let` blocks and `let` expressions](/en-US/docs/Web/JavaScript/Reference/Statements/let#non-standard_let_extensions) are deprecated and will now log a warning in the console. Do not use them anymore, they will be removed in the future. +- The [`delete`](/en-US/docs/Web/JavaScript/Reference/Operators/delete) operator now triggers the "[temporal dead zone](/en-US/docs/Web/JavaScript/Reference/Statements/let#temporal_dead_zone_tdz)" when using with [`let`](/en-US/docs/Web/JavaScript/Reference/Statements/let) and [`const`](/en-US/docs/Web/JavaScript/Reference/Statements/const) ([Firefox bug 1074571](https://bugzil.la/1074571)). +- The non-standard [`let` blocks and `let` expressions](/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features#statements_2) are deprecated and will now log a warning in the console. Do not use them anymore, they will be removed in the future. - [WeakMap](/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) constructor now handles optional iterable argument ([Firefox bug 1092537](https://bugzil.la/1092537)). ### Interfaces/APIs/DOM diff --git a/files/en-us/mozilla/firefox/releases/40/index.md b/files/en-us/mozilla/firefox/releases/40/index.md index c0bd4224ecfc322..09605247f162870 100644 --- a/files/en-us/mozilla/firefox/releases/40/index.md +++ b/files/en-us/mozilla/firefox/releases/40/index.md @@ -57,7 +57,7 @@ _No change._ - Passing an object which has a property named {{jsxref("Symbol.match")}} with a {{Glossary("truthy")}} value to {{jsxref("String.prototype.startsWith")}}, {{jsxref("String.prototype.endsWith")}}, and `String.prototype.contains` now throws a {{jsxref("TypeError")}} ([Firefox bug 1054755](https://bugzil.la/1054755)). - {{jsxref("RegExp")}} function returns pattern itself if called without {{jsxref("Operators/new", "new")}} and pattern object has a property named {{jsxref("Symbol.match")}} with a {{Glossary("truthy")}} value, and the pattern object's `constructor` property equals to {{jsxref("RegExp")}} function. ([Firefox bug 1147817](https://bugzil.la/1147817)). - Support for the non-standard JS1.7 destructuring for-in has been dropped ([Firefox bug 1083498](https://bugzil.la/1083498)). -- [Non-standard initializer expressions](/en-US/docs/Web/JavaScript/Reference/Statements/for...in#firefox-specific_notes) in [for...in](/en-US/docs/Web/JavaScript/Reference/Statements/for...in) loops are now ignored and will present a warning in the console. ([Firefox bug 748550](https://bugzil.la/748550) and [Firefox bug 1164741](https://bugzil.la/1164741)). +- [Non-standard initializer expressions](/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_for-in_initializer) in [`for...in`](/en-US/docs/Web/JavaScript/Reference/Statements/for...in) loops are now ignored and will present a warning in the console. ([Firefox bug 748550](https://bugzil.la/748550) and [Firefox bug 1164741](https://bugzil.la/1164741)). - [`\u{xxxxxx}`](/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#unicode_code_point_escapes) Unicode code point escapes have been added ([Firefox bug 320500](https://bugzil.la/320500)). - {{jsxref("String.prototype.includes", "String.prototype.contains", "#String.prototype.contains")}} has been replaced with {{jsxref("String.prototype.includes")}}, `String.prototype.contains` is kept as an alias ([Firefox bug 1102219](https://bugzil.la/1102219)). - If the {{jsxref("DataView")}} constructor is called as a function without the {{ jsxref("Operators/new", "new") }} operator, a {{jsxref("TypeError")}} is now thrown as per the ES2015 specification. diff --git a/files/en-us/mozilla/firefox/releases/44/index.md b/files/en-us/mozilla/firefox/releases/44/index.md index f957aae09e31207..0b3fb370224a0b9 100644 --- a/files/en-us/mozilla/firefox/releases/44/index.md +++ b/files/en-us/mozilla/firefox/releases/44/index.md @@ -89,7 +89,7 @@ Highlights: #### Removals -- Support for the non-standard [`let` blocks](/en-US/docs/Web/JavaScript/Reference/Statements/let#let_blocks) has been dropped ([Firefox bug 1167029](https://bugzil.la/1167029). +- Support for the non-standard [`let` blocks](/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features#statements_2) has been dropped ([Firefox bug 1167029](https://bugzil.la/1167029). - The non-standard and deprecated property `Object.prototype.__noSuchMethod__` has been removed ([Firefox bug 683218](https://bugzil.la/683218)). ### Interfaces/APIs/DOM diff --git a/files/en-us/mozilla/firefox/releases/52/index.md b/files/en-us/mozilla/firefox/releases/52/index.md index eb466d7ef2a758f..a767215b10556d5 100644 --- a/files/en-us/mozilla/firefox/releases/52/index.md +++ b/files/en-us/mozilla/firefox/releases/52/index.md @@ -80,7 +80,7 @@ Firefox 52 was released on March 7, 2017. This article lists key changes that ar #### Changes and removals -- [Array destructuring](/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#assigning_the_rest_of_an_array_to_a_variable) now throws a {{jsxref("SyntaxError")}} when using destructuring rest with trailing comma ([Firefox bug 1041341](https://bugzil.la/1041341)). +- [Array destructuring](/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#array_destructuring) now throws a {{jsxref("SyntaxError")}} when using destructuring rest with trailing comma ([Firefox bug 1041341](https://bugzil.la/1041341)). - Duplicate `__proto__` properties are now allowed in [object destructuring](/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) ([Firefox bug 1204024](https://bugzil.la/1204024)). - {{jsxref("Array.prototype.toLocaleString()")}} has been re-implemented to support the Intl API parameters "`locales`" and "`options`" ([Firefox bug 1130636](https://bugzil.la/1130636)). - {{jsxref("TypedArray")}} constructors now accept [iterables](/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) to create new typed arrays ([Firefox bug 1232266](https://bugzil.la/1232266)). diff --git a/files/en-us/mozilla/firefox/releases/53/index.md b/files/en-us/mozilla/firefox/releases/53/index.md index c56b1e8336a8915..d85bc81fcdcf6ff 100644 --- a/files/en-us/mozilla/firefox/releases/53/index.md +++ b/files/en-us/mozilla/firefox/releases/53/index.md @@ -41,7 +41,7 @@ Firefox 53 was released on April 19, 2017. This article lists key changes that a - ECMAScript 2015 semantics for the {{jsxref("Function.name")}} properties have been implemented. This includes inferred names on anonymous functions (`var foo = function() {}`) ([Firefox bug 883377](https://bugzil.la/883377)). - ECMAScript 2015 semantics for closing iterators have been implemented. This affects the [`for...of`](/en-US/docs/Web/JavaScript/Reference/Statements/for...of) loop, for example ([Firefox bug 1147371](https://bugzil.la/1147371)). -- The [Template Literal Revision proposal](https://tc39.es/proposal-template-literal-revision/) that [lifts escape sequence restrictions on tagged template literals](/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_template_literals_and_escape_sequences) has been implemented ([Firefox bug 1317375](https://bugzil.la/1317375)). +- The [Template Literal Revision proposal](https://tc39.es/proposal-template-literal-revision/) that [lifts escape sequence restrictions on tagged template literals](/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates_and_escape_sequences) has been implemented ([Firefox bug 1317375](https://bugzil.la/1317375)). - The static `length` property of {{jsxref("TypedArray")}} objects was changed from 3 to 0 as per ES2016 ([Firefox bug 1317306](https://bugzil.la/1317306)). - {{jsxref("SharedArrayBuffer")}} can now be used in {{jsxref("DataView")}} objects ([Firefox bug 1246597](https://bugzil.la/1246597)). - In earlier versions of the specification, {{jsxref("SharedArrayBuffer")}} objects needed to be explicitly transferred during [structured cloning](/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm). In the new specification they aren't [transferable objects](/en-US/docs/Web/API/Transferable) anymore and thus must not be in the transfer list. The new behavior used to present a console warning only, but will now throw an error ([Firefox bug 1302037](https://bugzil.la/1302037)). diff --git a/files/en-us/mozilla/firefox/releases/89/index.md b/files/en-us/mozilla/firefox/releases/89/index.md index 0db81b64b9bcacd..b2d4454cd58493c 100644 --- a/files/en-us/mozilla/firefox/releases/89/index.md +++ b/files/en-us/mozilla/firefox/releases/89/index.md @@ -28,7 +28,7 @@ _No changes._ ### JavaScript -- Top-level [`await`](/en-US/docs/Web/JavaScript/Reference/Operators/await#top-level-await) is now enabled by default ([Firefox bug 1681046](https://bugzil.la/1681046)). +- Top-level [`await`](/en-US/docs/Web/JavaScript/Reference/Operators/await#top_level_await) is now enabled by default ([Firefox bug 1681046](https://bugzil.la/1681046)). - [ArrayBuffer](/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)s can now be created with a length greater than 2GB-1 (up to 8GB) on 64-bit systems ([Firefox bug 1703505](https://bugzil.la/1703505)). ### HTTP diff --git a/files/en-us/mozilla/firefox/releases/90/index.md b/files/en-us/mozilla/firefox/releases/90/index.md index a12ed6d9a35847f..f8bc5035c9ec2c6 100644 --- a/files/en-us/mozilla/firefox/releases/90/index.md +++ b/files/en-us/mozilla/firefox/releases/90/index.md @@ -27,7 +27,7 @@ This article provides information about the changes in Firefox 90 that will affe ### JavaScript - [Private class static and instance fields and methods](/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields) are now supported by default ([Firefox bug 1708235](https://bugzil.la/1708235) and [Firefox bug 1708236](https://bugzil.la/1708236)). -- The [`in`](/en-US/docs/Web/JavaScript/Reference/Operators/in#private_fields_and_methods) operator can now be used to [check if a class private method or field has been defined](/en-US/docs/Web/JavaScript/Guide/Working_With_Private_Class_Features#checking_if_a_private_fieldmethod_exists). This offers a more compact approach for handling potentially undefined features, as oppose to wrapping code in `try/catch` blocks ([Firefox bug 1648090](https://bugzil.la/1648090)). +- The [`in`](/en-US/docs/Web/JavaScript/Reference/Operators/in) operator can now be used to [check if a class private method or field has been defined](/en-US/docs/Web/JavaScript/Reference/Operators/in#using_the_in_operator_to_implement_branded_checks). This offers a more compact approach for handling potentially undefined features, as oppose to wrapping code in `try/catch` blocks ([Firefox bug 1648090](https://bugzil.la/1648090)). - Custom date/time formats specified as options to the [`Intl.DateTimeFormat()` constructor](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) can now include `dayPeriod` — a value indicating that the approximate time of day (e.g. "in the morning", "at night", etc.) should be included as a `narrow`, `short`, or `long` string ([Firefox bug 1645115](https://bugzil.la/1645115)). - The relative indexing method `at()` has been added to the [`Array`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array), [`String`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) and [`TypedArray`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) global objects. ([Firefox bug 1681371](https://bugzil.la/1681371)) diff --git a/files/en-us/web/api/datatransferitemlist/index.md b/files/en-us/web/api/datatransferitemlist/index.md index 260dab2a0eff6cb..c7548c9f045a9b0 100644 --- a/files/en-us/web/api/datatransferitemlist/index.md +++ b/files/en-us/web/api/datatransferitemlist/index.md @@ -9,7 +9,7 @@ browser-compat: api.DataTransferItemList The **`DataTransferItemList`** object is a list of {{domxref("DataTransferItem")}} objects representing items being dragged. During a _drag operation_, each {{domxref("DragEvent")}} has a {{domxref("DragEvent.dataTransfer","dataTransfer")}} property and that property is a `DataTransferItemList`. -The individual items can be accessed using the [array operator](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#accessing_array_elements) `[]`. +The individual items can be accessed using the [bracket notation](/en-US/docs/Web/JavaScript/Reference/Operators/Property_accessors#bracket_notation) `[]`. This interface has no constructor. diff --git a/files/en-us/web/api/domtokenlist/item/index.md b/files/en-us/web/api/domtokenlist/item/index.md index f040b0b5c5b2689..10bd56b2751fdc0 100644 --- a/files/en-us/web/api/domtokenlist/item/index.md +++ b/files/en-us/web/api/domtokenlist/item/index.md @@ -10,8 +10,8 @@ browser-compat: api.DOMTokenList.item The **`item()`** method of the {{domxref("DOMTokenList")}} interface returns an item in the list, determined by its position in the list, its index. -> **Note:** This method is equivalent as the operator `[]`. -> So `aList.item(i)` is the same as `aList[i]`, like the [operator[]](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#accessing_array_elements) of an {{jsxref("Array")}}. +> **Note:** This method is equivalent as the [bracket notation](/en-US/docs/Web/JavaScript/Reference/Operators/Property_accessors#bracket_notation). +> So `aList.item(i)` is the same as `aList[i]`. ## Syntax diff --git a/files/en-us/web/api/eventtarget/addeventlistener/index.md b/files/en-us/web/api/eventtarget/addeventlistener/index.md index e05bef374bc1391..8997e9678d543a6 100644 --- a/files/en-us/web/api/eventtarget/addeventlistener/index.md +++ b/files/en-us/web/api/eventtarget/addeventlistener/index.md @@ -580,7 +580,7 @@ my_element.addEventListener("click", function (e) { }); ``` -As a reminder, [arrow functions do not have their own `this` context](/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#no_separate_this). +As a reminder, [arrow functions do not have their own `this` context](/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#cannot_be_used_as_methods). ```js my_element.addEventListener("click", (e) => { diff --git a/files/en-us/web/api/setinterval/index.md b/files/en-us/web/api/setinterval/index.md index 3235915186bd96c..ed30f898683b8f7 100644 --- a/files/en-us/web/api/setinterval/index.md +++ b/files/en-us/web/api/setinterval/index.md @@ -144,7 +144,7 @@ See also: [`clearInterval()`](/en-US/docs/Web/API/clearInterval). When you pass a method to `setInterval()` or any other function, it is invoked with the wrong [`this`](/en-US/docs/Web/JavaScript/Reference/Operators/this) -value. This problem is explained in detail in the [JavaScript reference](/en-US/docs/Web/JavaScript/Reference/Operators/this#as_an_object_method). +value. This problem is explained in detail in the [JavaScript reference](/en-US/docs/Web/JavaScript/Reference/Operators/this#callbacks). ### Explanation diff --git a/files/en-us/web/api/settimeout/index.md b/files/en-us/web/api/settimeout/index.md index b495dc2a3958ad8..aff999449edb732 100644 --- a/files/en-us/web/api/settimeout/index.md +++ b/files/en-us/web/api/settimeout/index.md @@ -127,7 +127,7 @@ To create a progression in which one function only fires after the completion of ### The "this" problem When you pass a method to `setTimeout()`, it will be invoked with a `this` value that may differ from your -expectation. The general issue is explained in detail in the [JavaScript reference](/en-US/docs/Web/JavaScript/Reference/Operators/this#as_an_object_method). +expectation. The general issue is explained in detail in the [JavaScript reference](/en-US/docs/Web/JavaScript/Reference/Operators/this#callbacks). Code executed by `setTimeout()` is called from an execution context separate from the function from which `setTimeout` was called. The usual rules for diff --git a/files/en-us/web/api/sourcebufferlist/index.md b/files/en-us/web/api/sourcebufferlist/index.md index d93a583482166a4..8b8232c0d5e800b 100644 --- a/files/en-us/web/api/sourcebufferlist/index.md +++ b/files/en-us/web/api/sourcebufferlist/index.md @@ -11,7 +11,7 @@ The **`SourceBufferList`** interface represents a simple container list for mult The source buffer list containing the `SourceBuffer`s appended to a particular `MediaSource` can be retrieved using the {{domxref("MediaSource.sourceBuffers")}} property. -The individual source buffers can be accessed using the [array operator](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#accessing_array_elements) `[]`. +The individual source buffers can be accessed using the [bracket notation](/en-US/docs/Web/JavaScript/Reference/Operators/Property_accessors#bracket_notation) `[]`. {{InheritanceDiagram}} diff --git a/files/en-us/web/api/web_crypto_api/non-cryptographic_uses_of_subtle_crypto/index.md b/files/en-us/web/api/web_crypto_api/non-cryptographic_uses_of_subtle_crypto/index.md index 4f6343128d56ad8..0d0e201a28fc5a6 100755 --- a/files/en-us/web/api/web_crypto_api/non-cryptographic_uses_of_subtle_crypto/index.md +++ b/files/en-us/web/api/web_crypto_api/non-cryptographic_uses_of_subtle_crypto/index.md @@ -98,7 +98,7 @@ async function hashTheseFiles(e) { At this point you may be thinking to yourself "_I can use this on my own website, so when users go to download a file we can ensure the hashes match to reassure the user their download is secure_". Unfortunately this has two issues that immediate spring to mind: - Executable downloads should **always** be done over HTTPS. This prevents intermediate parties from performing attacks like this so it would be redundant. -- If the attacker is able to replace the download file on the original server, then they can also simply replace the code which invokes the SubtleCrypto interface to bypass it and just state that everything is fine. Probably something sneaky like replacing [strict equality](/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#strict_equality_using_), which can be a pain to spot in your own code: +- If the attacker is able to replace the download file on the original server, then they can also simply replace the code which invokes the SubtleCrypto interface to bypass it and just state that everything is fine. Probably something sneaky like replacing [strict equality](/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#strict_equality_using), which can be a pain to spot in your own code: ```diff --- if (checksum === correctCheckSum) return true;